{"version":3,"file":"index-65420f5a.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/PricingSettingAutoPrice.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/Map/StatLabel.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/PricingSettingHeader.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/PricingSettingManualPrice.tsx","../../src/components/Listings/InventoryEventPage/InventoryEventDetail/components/DetailPanel/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): Promise;\n\n bulkUpdateTicketTypeRules(input: ValueTupleOfBulkEditPreviewAndDeliveryTypeAndIListOfTicketTypePriority, updateKey: string | undefined, supportBackgroundProgress: boolean | null | 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): Promise {\n let url_ = this.baseUrl + \"/api/BulkEditListing/BulkUpdateTicketTypeRulesPreview\";\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): 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 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 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 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 ConsignmentFilterPurchaseSearchView = \"ConsignmentFilterPurchaseSearchView\",\n HideNavAndFilterBars = \"HideNavAndFilterBars\",\n ReportSinglePagedV1V2 = \"ReportSinglePagedV1V2\",\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 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 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}\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 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.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.sort((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","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.sort((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.sort((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 .sort((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 .sort(\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 filteredData.sort((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 sortEventsByDate(filteredData, isSortDescending);\n }\n\n return filteredData;\n};\n\nexport const sortEventsByDate = (\n events: EventWithData[],\n isSortDescending?: boolean | null\n) => {\n events.sort((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 events.sort((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 ?? []).sort((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.sort((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;\n dataSorted?.sort((a: PurchaseVendor, b: PurchaseVendor) =>\n 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;\n dataSorted?.sort((a: PurchaseVendor, b: PurchaseVendor) =>\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 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 .sort((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.sort(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, 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 { ticketTypesOrderedByPriority, numBlockedTicketTypes, isEmptyTicketTypesOverridesFromResponse } = useMemo(\n () => {\n\n const ticketTypePriorityOverrides = [...(overridesForDeliveryType?.ticketTypePriorities ?? [])]\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)\n .length ?? 0;\n\n const orderedTicketTypePriority = ticketTypePriorityOverrides\n .sort(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(tt => !orderedTicketTypePriority.includes(tt));\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(missingTicketTypePriority),\n numBlockedTicketTypes,\n isEmptyTicketTypesOverridesFromResponse: ticketTypePriorityOverrides.length == 0\n }\n },\n [\n overridesForDeliveryType?.ticketTypePriorities,\n ticketTypes\n ]\n );\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 = \n isEmptyTicketTypesOverridesFromResponse ? 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 = 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?.sort((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 ?? []).sort((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 .sort((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}\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 .sort((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 .sort((t1, t2) => t1.key.localeCompare(t2.key))\n .map((t, i) => ({ ...t, ordinal: i }));\n }\n\n tagsOrdinalFilled = tagsOrdinalFilled.sort(\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?.sort((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 .sort((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 .sort(\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 const 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 sortEventsByName(events, eventSortQuery.isSortDescending);\n } else {\n 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\n const isCurrency = valueType === ReportValueType.Money;\n const isPercent = valueType === ReportValueType.Money;\n const isDateTime = valueType === ReportValueType.DateTime;\n\n const isBoolean = valueType === ReportValueType.Boolean;\n\n return {\n isNumeric,\n isCurrency,\n isPercent,\n isDateTime,\n isBoolean,\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?.sort((a, b) => a.localeCompare(b)) ?? [],\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 .sort((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 ?.sort((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 .sort((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 { newBigIntId } from 'src/utils/idUtils';\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(tg.tickets?.value?.sort((a, b) => a.ord - b.ord)),\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 ?.sort((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.sort((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 .sort((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 { useUserHasFeature } from 'src/hooks/useUserHasFeature';\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 Feature,\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 .sort(\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.sort((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.sort((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 if (eventSortQuery.sortBy === EventSort.MainDisplay) {\n sortEventsByName(\n eventsWithMergeSuggestions,\n eventSortQuery.isSortDescending\n );\n } else {\n sortEventsByDate(\n eventsWithMergeSuggestions,\n eventSortQuery.isSortDescending\n );\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 .sort((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 .sort((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 ).sort((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.sort((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 ).sort((a, b) => a.name.localeCompare(b.name));\n onSelectedSectionsChange(updated);\n } else {\n const updated = uniqBy(selectedSections.concat(mirrors), 'id').sort(\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 .sort((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.sort((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 .sort((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 () => groupTemplates.sort((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 .sort((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 .sort(groupPrioritySort(idToSortingCriteria, deprioritizedQuantities))\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 .sort(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 .sort(groupPrioritySort(idToSortingCriteria, deprioritizedQuantities))\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 .sort(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 .sort(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 ?.sort(\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 .sort(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 .sort((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 .sort(\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 .sort(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 () => eventListings?.sort((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 .sort(groupPrioritySort(idToSortingCriteria, newValues))\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 .sort((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 .sort((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 .sort((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 .sort((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 .sort((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 ?? []).sort((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 .sort((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 .sort((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 .sort((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 .sort(\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 .sort(\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 .sort((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 .sort(\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 .sort(\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 .sort(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 .sort((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 .sort((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.sort((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 ).sort((a, b) => a.name.localeCompare(b.name));\n onSelectedSectionsChange?.(updated);\n } else {\n const updated = uniqBy(filterSections.concat(mirrors), 'id').sort(\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 .sort((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 { ScrollableToolbar } from 'src/core/ui/ScrollableToolbar';\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 .sort((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 { 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 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.sort(),\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,\n TicketTypeOverride,\n} from 'src/WebApiController';\n\nimport { BulkEditFooter } from '../common/BulkEditFooter';\nimport { BulkEditHeader } from '../common/BulkEditHeader';\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 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\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);\n } else {\n onOkay(\n deliveryType,\n ticketTypeRules,\n hasBackgroundBulkEditFeature,\n undefined,\n preview\n );\n }\n setIsLoading(false);\n },\n [\n onOkay,\n deliveryType,\n ticketTypeRules,\n preview,\n hasBackgroundBulkEditFeature,\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 \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 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 );\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 );\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 ?.sort((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 .sort((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 row: { original },\n align,\n style,\n}: {\n getValue: Getter;\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 {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.sort((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.sort((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 .sort((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 .sort((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 ?.sort((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].sort(\n (a, b) => (a.listingOrd || 0) - (b.listingOrd || 0)\n );\n } else {\n sortedTickets = [...selectedTickets].sort((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;\n dataSorted?.sort((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 .sort((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(tg.tickets?.value?.sort((a, b) => a.ord - b.ord)),\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 .sort((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 .sort((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};\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 .sort((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 .sort((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 ?.sort((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, 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 { 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 .sort((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 ?.sort((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, 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 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 .sort((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 ).sort((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.sort((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 ).sort((a, b) => a.name.localeCompare(b.name));\n onSelectedSectionsChange(updated);\n } else {\n const updated = uniqBy(selectedSections.concat(mirrors), 'id').sort(\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 .sort((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 ?.sort((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 ?.sort((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 ?.sort((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 { getEventsWithNonZeroCounts } 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 return allEvents.every((ev) => ev.counts != null && ev.event != null);\n }, [catalogResults?.events]);\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(cloneDeep(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].sort((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].sort((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 .sort((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 .sort((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.sort((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?.sort((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 .sort((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.sort((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 .sort((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;\n dataSorted?.sort((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.sort((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 .sort((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 .sort((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).sort((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 .sort((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 .sort((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 .sort((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 .sort(\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 .sort((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.sort((a, b) => (a.ordinal ?? 0) - (b.ordinal ?? 0));\n } else if (nameAvailable) {\n rowDataArr.sort((a, b) => compareByNumericPrefix(a.rowName, b.rowName));\n } else {\n rowDataArr.sort((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 .sort((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 .sort((a, b) => a.rowOrdinal! - b.rowOrdinal!);\n const unordered = scores\n .filter(({ rowOrdinal }) => rowOrdinal == null)\n .sort((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 .sort((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 .sort((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 .sort((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 .sort((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 .sort((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 .sort((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 ?.sort((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 .sort(\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 .sort(\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 .sort(\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.sort(\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 ?.sort(\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 .sort(\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?.sort((a, b) =>\n compareMarketplace(a.marketplace, b.marketplace)\n ),\n },\n });\n\n useEffect(() => {\n const newMkpEventInfos = mkpEventInfos?.sort((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 { 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 * 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 { 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 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 .sort(\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 .sort(\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 .sort((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 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?: Listing | 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: Listing | 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 clsx from 'clsx';\nimport { isEqual } from 'lodash-es';\nimport { ChangeEvent, useCallback, useMemo } from 'react';\nimport { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { useToggle } from 'react-use';\nimport {\n OnOutlierSettingsChangeArgs,\n useAutoPricingSettingsFormContext,\n} from 'src/components/AutoPricing/useAutoPricingSettingsFormContext';\nimport { OkButton } from 'src/components/Buttons/OkButton';\nimport { useActivePosEntityContext } from 'src/contexts/ActivePosEntityContext';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport {\n Content,\n FormatContent,\n useContent,\n} 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 { 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 { useUndercutAmountSettings } from 'src/hooks/useUndercutAmountSettings';\nimport { ExpandIcon, FoldIcon, InfoOutlineIcon } from 'src/svgs/Viagogo';\nimport { MinusIcon, PlusIcon } from 'src/svgs/Viagogo';\nimport { calculatePercentile } from 'src/utils/arrayUtils';\nimport {\n getUndercutPriceRepresentingMode,\n OUTLIER_MODE_KTH_LOWEST_STRATEGY,\n OutlierModeKthLowestStrategy,\n} from 'src/utils/autoPricingUtils';\nimport { UndercutPriceSettingsMode } from 'src/utils/autoPricingUtils';\nimport { ContentId } from 'src/utils/constants/contentId';\nimport { STANDARD_DEVIATIONS_TO_CID } from 'src/utils/constants/contentIdMaps';\nimport { FormatContentId } from 'src/utils/constants/formatContentId';\nimport { isSuccess } from 'src/utils/errorUtils';\nimport {\n getAllInPriceFromListPrice,\n getListPriceFromAllinPrice,\n} from 'src/utils/inventoryUtils';\nimport { numberToOrdinal, roundToPrecision } from 'src/utils/numberFormatter';\nimport { tryInvokeApi } from 'src/utils/tryExecuteUtils';\nimport {\n ListingClient,\n ListingDetails,\n ListingDetailsAutoPricingSectionUpdates,\n UiCurrency,\n} from 'src/WebApiController';\nimport { AutoPricingOutlierMode } from 'src/WebApiController';\n\nimport * as styles from './ListingDetailPanel.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\nexport const PricingSettingAutoPrice: React.FC<\n PricingSettingAutoPriceProps\n> = ({ uiCurrency, sellerFee, useVerticalView }) => {\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\ntype CompListingPricesProps = {\n useVerticalView: boolean;\n uiCurrency: UiCurrency;\n};\n\nconst CompListingPrices: React.FC = ({\n useVerticalView,\n uiCurrency,\n}) => {\n const { watch, setValue } =\n 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\ntype OutlierSettingsProps = {\n useVerticalView: boolean;\n};\n\nconst OutlierSettings: React.FC = ({\n useVerticalView,\n}) => {\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 {outlierKthLowestStrategy == OutlierModeKthLowestStrategy.Relative ? (\n {ignoreListingsText}\n }\n postfixDisplay={\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 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 postfixDisplay={\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 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 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 { 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 { 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 './ListingDetailPanel.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 './ListingDetailPanel.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 { useMeasure } from 'react-use';\nimport { ConnectedComparableListings } from 'src/components/Listings/ConnectedComparableListings';\nimport { useAppContext } from 'src/contexts/AppContext';\nimport { useInventoryEventDetailContext } from 'src/contexts/InventoryEventDetailContext/InventoryEventDetailContext';\nimport { useLocalizationContext } from 'src/contexts/LocalizationContext';\nimport { Stack } from 'src/core/ui';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport { getListPriceFromAllinPrice } from 'src/utils/inventoryUtils';\nimport {\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n Marketplace,\n} from 'src/WebApiController';\n\nimport * as styles from './ListingDetailPanel.css';\nimport { PricingSettingAutoPrice } from './PricingSettingAutoPrice';\nimport { PricingSettingHeader } from './PricingSettingHeader';\nimport { PricingSettingManualPrice } from './PricingSettingManualPrice';\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 { 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 [detailsRef, { height }] = useMeasure();\n\n const shouldDetailsSideBySide = useMemo(() => height < 650, [height]);\n\n const { watch } = useFormContext();\n const { autoPricingEnabled } = watch();\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 return (\n \n {selectedListing ? (\n \n \n
    \n \n
    \n\n
    \n {autoPricingEnabled ? (\n \n ) : (\n \n )}\n
    \n
    \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 './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 Feature,\n ListingDetailsAutoPricingSectionUpdates,\n 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 } =\n 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 { useGetListingAutoPricingSettings } from 'src/hooks/useGetListingAutoPricingSettings';\nimport { flattenListingGroup } from 'src/modals/GroupListings/components/groupingUtils';\nimport {\n Event,\n Listing,\n ListingDetailsAutoPricingSectionUpdates,\n ListingGroup,\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 });\n }, [eventListings, selectedListingIds]);\n\n const {\n pricingSettings: listingPricingSettings,\n loaded: listingSettingLoaded,\n } = useGetListingAutoPricingSettings(selectedListing, event);\n\n const methods = useForm({\n defaultValues: {},\n });\n\n useEffect(() => {\n if (listingSettingLoaded) {\n methods.reset(listingPricingSettings ?? {});\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [listingPricingSettings, listingSettingLoaded]);\n\n return (\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 .sort((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 .sort((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.sort((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.sort((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 .sort((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.sort((a, b) => a.localeCompare(b)),\n ...customColumnIds.sort((a, b) => a.localeCompare(b)),\n ...activeTagNames.sort((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.sort((a, b) => a.localeCompare(b)),\n ...customColumnIds.sort((a, b) => a.localeCompare(b)),\n ...activeTagNames.sort((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.sort((a, b) => a.localeCompare(b)),\n ...customColumnIds.sort((a, b) => a.localeCompare(b)),\n ...activeTagNames.sort((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.sort((a, b) => a.localeCompare(b)),\n ...customColumnIds.sort((a, b) => a.localeCompare(b)),\n ...activeTagNames.sort((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';\n\nexport const listingsReportMandatoryFiltersToShow: FilterToolbarItemId[] = [\n 'eventDates',\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 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 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 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.sort((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.sort((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 } =\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 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 = value ? new Date(value).toISOString() : 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 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 (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 { 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 .sort(([, 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 .sort(([, 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 : `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 { 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} 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 ?? []).sort(\n sortCountryRestrictions\n ),\n vendorRestrictions: (vendorRestrictionQuery.data ?? []).sort(\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 .sort(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 ].sort(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 ].sort(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 .sort(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.sort(sortTicketTypeWithPriority);\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 {\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].sort((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 .sort((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(\n (pa) => 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","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","updateSalesOfListings","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","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","ConsignmentFilterPurchaseSearchView","HideNavAndFilterBars","ReportSinglePagedV1V2","AutomatiqUnprocessedOrdersHoldingPen","ReEvaluatePredeliveryStateAndTopTicketType","AddPurchasePaymentRefundStates","PurchasePaymentConversion","EnforcePurchasePaymentCurrency","MarketplacePaymentConversion","WasteSale","UseShLnLookup","BlockPricingCompListingEndpoint","BlockPricingCalculationEndpoint","BlockEventDashboardEndpoint","AlwaysGetEventLevelSettingsFromAutoPricer","WriteAutopriceConfigUpdateToSbt","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","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","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","sort","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","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","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","toSorted","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","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","BuyerUserId","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","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","setDeliveryType","setTicketTypeRules","LaunchChangeTicketTypeRule","useBulkChangeTicketTypeRuleAction","openBulkChangeTicketTypeRuleDialog","closeBulkChangeTicketTypeRuleDialog","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","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","allEvents","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","CheckPrice","percentDifference","absolutePercentDifference","isWithinThreshold","isBelow","PricingSettingAutoPrice","useVerticalView","resetText","setPriceFloorText","medianListingPrice","ticketPrices","priceComparisonResult","CompListingPrices","determinPriceText","movePriceText","thenText","adjustPriceText","compListingPriceTextFirst","compListingPriceTextThen","OutlierSettings","showOutlierSettings","setShowOutlierSettings","ignoreListingsText","belowTheText","cheapestText","lowestLimitOptions","StatLabel","PricingSettingHeader","sanitizedSeatDisplay","PricingSettingManualPrice","setPriceText","setListPrice","listPriceNew","ListingDetailPanel","detailsRef","shouldDetailsSideBySide","flattenedListingGroup","listingWithUpdatedPrice","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","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","useListingReportFilters","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","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","tracesSampleRate","profilesSampleRate","replaysSessionSampleRate","replaysOnErrorSampleRate","createRoot","render"],"mappings":"kyQAAYA,IAAAA,WAAAA,IACVC,EAAAA,OAAS,SACTC,EAAAA,MAAQ,QACRC,EAAAA,cAAgB,gBAChBC,EAAAA,OAAS,SACTC,EAAAA,aAAe,eACfC,EAAAA,KAAO,OACPC,EAAAA,UAAY,YACZC,EAAAA,gBAAkB,kBAClBC,EAAAA,MAAQ,QACRC,EAAAA,YAAc,cACdC,EAAAA,UAAY,YACZC,EAAAA,eAAiB,iBACjBC,EAAAA,aAAe,eACfC,EAAAA,qBAAuB,uBACvBC,EAAAA,SAAW,WACXC,EAAAA,cAAgB,gBAChBC,EAAAA,aAAe,eACfC,EAAAA,QAAU,UACVC,EAAAA,UAAY,YACZC,EAAAA,WAAa,aACbC,EAAAA,MAAQ,QACRC,EAAAA,SAAW,WACXC,EAAAA,kBAAoB,oBACpBC,EAAAA,SAAW,WACXC,EAAAA,UAAY,YACZC,EAAAA,WAAa,aACbC,EAAAA,eAAiB,iBACjBC,EAAAA,eAAiB,iBACjBC,EAAAA,WAAa,aA7BH7B,IAAAA,WAAAA,CAAAA,CAAAA,ECOL,MAAM8B,mBAAqBA,IAE9BC,UAAUC,WAAaD,UAAUC,UAAUC,OACvCF,UAAUC,UAAU,CAAC,EACrBD,UAAUG,SAKLC,oBAAsBA,IAC1BJ,UAAUC,WAAaD,UAAUC,UAAUC,OAC9CF,UAAUC,UACV,CAACD,UAAUG,QAAQ,EAGZE,uBAAyBA,IAC7BD,oBAAsBE,EAAAA,KAAK,GAAG,EAG1BC,sBAAyBJ,GAC7BK,iBAAiBL,EAASM,WAAW,IAAK,EAAE,C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AAiBJ,GAAiBhiK,YAAY,CACtE,EACAlB,EACE,yBACAyhF,sBACE8hF,GACAL,GAAiB/hK,sBACnB,CACF,EACAnB,EACE,yBACAyhF,sBACE+hF,GACAN,GAAiB9hK,sBACnB,CACF,EACF,EAEF,CACEpB,EACAkjK,GAAiB/hK,uBACjB+hK,GAAiBhiK,aACjBgiK,GAAiB9hK,sBAAsB,CAE3C,EAEMqiK,GAAsB3yN,yBACzBxtJ,IAWK,CACE,KAAA,CACJogX,mBAAAA,GACAC,oBAAAA,GACAC,sBAAAA,GACAC,qCAAAA,GACAC,6CAAAA,GACAC,6CAAAA,GACAC,kCAAAA,GACAC,6BAAAA,GACAC,kDAAAA,GACAC,sCAAAA,EACE7gX,EAAAA,GAEJ,GACEogX,KAAuB5pX,QACvB6pX,KAAwB7pX,QACxB8pX,KAA0B9pX,QAC1B+pX,KAAyC/pX,QACzCgqX,KAAiDhqX,QACjDiqX,KAAiDjqX,QACjDkqX,KAAsClqX,QACtCmqX,KAAiCnqX,QACjCoqX,KAAsDpqX,QACtDqqX,KAA0CrqX,OAC1C,CACMsqX,MAAAA,GACJN,GACI,GACAD,GACAQ,GACJR,GACI,GACAC,GACN9jK,EACE,kBACAyhF,sBACEiiF,GACAP,GAAoB5iK,eACtB,CACF,EACAP,EACE,mBACAyhF,sBACEkiF,GACAR,GAAoB3iK,gBACtB,CACF,EACAR,EACE,qBACAyhF,sBACEmiF,GACAT,GAAoB1iK,kBACtB,CACF,EACAT,EACE,oCACAyhF,sBACE2iF,GACAjB,GAAoB9Y,iCACtB,CACF,EACArqJ,EACE,4CACAyhF,sBACE4iF,GACAlB,GAAoBziK,yCACtB,CACF,EACAV,EACE,4CACAyhF,sBACEsiF,GACAZ,GAAoBhZ,yCACtB,CACF,EACAnqJ,EACE,iCACAyhF,sBACEuiF,GACAb,GAAoB7Y,8BACtB,CACF,EACAtqJ,EACE,4BACAyhF,sBACEwiF,GACAd,GAAoBT,yBACtB,CACF,EACA1iK,EACE,iDACAy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