@bikdotai/bik-component-library 0.0.861-beta.0 → 0.0.861

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/cjs/components/bik-layout/CommonStyles.js +6 -4
  2. package/dist/cjs/components/bik-layout/CommonStyles.js.map +1 -1
  3. package/dist/cjs/components/button/themes.js +3 -3
  4. package/dist/cjs/components/button/themes.js.map +1 -1
  5. package/dist/cjs/components/datePicker/DatePicker.js +1 -1
  6. package/dist/cjs/components/datePicker/DatePicker.js.map +1 -1
  7. package/dist/cjs/components/datePicker/DatePicker.styled.js +14 -20
  8. package/dist/cjs/components/datePicker/DatePicker.styled.js.map +1 -1
  9. package/dist/cjs/components/dropdown/ChipInput.js +1 -1
  10. package/dist/cjs/components/dropdown/ChipInput.js.map +1 -1
  11. package/dist/cjs/components/dropdown/Common.styled.js +5 -6
  12. package/dist/cjs/components/dropdown/Common.styled.js.map +1 -1
  13. package/dist/cjs/components/dropdown/Dropdown.js +1 -1
  14. package/dist/cjs/components/dropdown/Dropdown.js.map +1 -1
  15. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  16. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
  17. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +6 -7
  18. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
  19. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
  20. package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
  21. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js +2 -2
  22. package/dist/cjs/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
  23. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js +2 -2
  24. package/dist/cjs/components/feature-announcements/MajorUpdatePopup.js.map +1 -1
  25. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js +1 -1
  26. package/dist/cjs/components/feature-announcements/MinorUpdatePopup.js.map +1 -1
  27. package/dist/cjs/components/input/Input.js +1 -1
  28. package/dist/cjs/components/input/Input.js.map +1 -1
  29. package/dist/cjs/components/input/Input.styled.js +12 -25
  30. package/dist/cjs/components/input/Input.styled.js.map +1 -1
  31. package/dist/cjs/components/tabs/Tabs.js +1 -1
  32. package/dist/cjs/components/tabs/Tabs.js.map +1 -1
  33. package/dist/cjs/components/tabs/Tabs.styles.js +8 -22
  34. package/dist/cjs/components/tabs/Tabs.styles.js.map +1 -1
  35. package/dist/cjs/components/tag/Tag.js +1 -1
  36. package/dist/cjs/components/tag/Tag.js.map +1 -1
  37. package/dist/cjs/components/tag/Tag.styled.js +0 -4
  38. package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
  39. package/dist/cjs/components/tag/model.js.map +1 -1
  40. package/dist/esm/components/bik-layout/CommonStyles.js +3 -1
  41. package/dist/esm/components/bik-layout/CommonStyles.js.map +1 -1
  42. package/dist/esm/components/button/themes.js +1 -1
  43. package/dist/esm/components/button/themes.js.map +1 -1
  44. package/dist/esm/components/datePicker/DatePicker.js +21 -22
  45. package/dist/esm/components/datePicker/DatePicker.js.map +1 -1
  46. package/dist/esm/components/datePicker/DatePicker.styled.d.ts +0 -10
  47. package/dist/esm/components/datePicker/DatePicker.styled.js +16 -23
  48. package/dist/esm/components/datePicker/DatePicker.styled.js.map +1 -1
  49. package/dist/esm/components/dropdown/ChipInput.d.ts +0 -1
  50. package/dist/esm/components/dropdown/ChipInput.js +30 -37
  51. package/dist/esm/components/dropdown/ChipInput.js.map +1 -1
  52. package/dist/esm/components/dropdown/Common.styled.js +6 -7
  53. package/dist/esm/components/dropdown/Common.styled.js.map +1 -1
  54. package/dist/esm/components/dropdown/Dropdown.d.ts +0 -2
  55. package/dist/esm/components/dropdown/Dropdown.js +89 -96
  56. package/dist/esm/components/dropdown/Dropdown.js.map +1 -1
  57. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +171 -180
  58. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
  59. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.d.ts +1 -1
  60. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js +15 -16
  61. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.js.map +1 -1
  62. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.d.ts +0 -1
  63. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +18 -19
  64. package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
  65. package/dist/esm/components/dropdown/type.d.ts +0 -4
  66. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js +420 -346
  67. package/dist/esm/components/feature-announcements/FeatureAnnouncementProvider.js.map +1 -1
  68. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js +33 -35
  69. package/dist/esm/components/feature-announcements/MajorUpdatePopup.js.map +1 -1
  70. package/dist/esm/components/feature-announcements/MinorUpdatePopup.js +47 -48
  71. package/dist/esm/components/feature-announcements/MinorUpdatePopup.js.map +1 -1
  72. package/dist/esm/components/feature-announcements/types/props.types.d.ts +2 -2
  73. package/dist/esm/components/input/Input.js +121 -124
  74. package/dist/esm/components/input/Input.js.map +1 -1
  75. package/dist/esm/components/input/Input.model.d.ts +0 -4
  76. package/dist/esm/components/input/Input.styled.d.ts +0 -2
  77. package/dist/esm/components/input/Input.styled.js +25 -38
  78. package/dist/esm/components/input/Input.styled.js.map +1 -1
  79. package/dist/esm/components/tabs/Tabs.js +81 -103
  80. package/dist/esm/components/tabs/Tabs.js.map +1 -1
  81. package/dist/esm/components/tabs/Tabs.model.d.ts +0 -7
  82. package/dist/esm/components/tabs/Tabs.styles.d.ts +0 -2
  83. package/dist/esm/components/tabs/Tabs.styles.js +9 -23
  84. package/dist/esm/components/tabs/Tabs.styles.js.map +1 -1
  85. package/dist/esm/components/tag/Tag.d.ts +1 -1
  86. package/dist/esm/components/tag/Tag.js +15 -17
  87. package/dist/esm/components/tag/Tag.js.map +1 -1
  88. package/dist/esm/components/tag/Tag.styled.d.ts +0 -1
  89. package/dist/esm/components/tag/Tag.styled.js +6 -10
  90. package/dist/esm/components/tag/Tag.styled.js.map +1 -1
  91. package/dist/esm/components/tag/model.d.ts +0 -5
  92. package/dist/esm/components/tag/model.js.map +1 -1
  93. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureAnnouncementProvider.js","sources":["../../../../src/components/feature-announcements/FeatureAnnouncementProvider.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport Joyride, { ACTIONS } from 'react-joyride';\nimport { SELECTORS } from './constants';\nimport { useFeatureAnnouncements } from './hooks';\nimport MajorUpdatePopup from './MajorUpdatePopup';\nimport MinorUpdatePopup from './MinorUpdatePopup';\nimport { FeatureAnnouncement, FeatureAnnouncementProviderProps } from './types';\nimport { VideoModal } from './VideoModal';\n\nconst FeatureAnnouncementProvider: React.FC<\n\tFeatureAnnouncementProviderProps\n> = ({\n\tchildren,\n\tfetchVisibleFeatures,\n\tgetStoreFeatureProgress,\n\tfetchFeatureById,\n\tmarkFeatureAsViewedForStore,\n\tisFeatureApplicableToCurrentPage,\n\tmodule,\n\trouter,\n\tstoreId,\n\tonAnnouncementShown,\n\tonAnnouncementInteracted,\n}) => {\n\tconst {\n\t\tmajorUpdateFeatures,\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\tmarkFeatureAsViewed,\n\t} = useFeatureAnnouncements({\n\t\tfetchVisibleFeatures,\n\t\tgetStoreFeatureProgress,\n\t\tfetchFeatureById,\n\t\tmarkFeatureAsViewedForStore,\n\t\tisFeatureApplicableToCurrentPage,\n\t\tmodule,\n\t\trouter,\n\t});\n\n\tconst [currentMajorFeature, setCurrentMajorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [currentMinorFeature, setCurrentMinorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [runJoyride, setRunJoyride] = useState(false);\n\tconst [joyrideSteps, setJoyrideSteps] = useState<any[]>([]);\n\tconst [runMajorJoyride, setRunMajorJoyride] = useState(false);\n\tconst [majorJoyrideSteps, setMajorJoyrideSteps] = useState<any[]>([]);\n\tconst [isProcessingMajorUpdate, setIsProcessingMajorUpdate] = useState(false);\n\tconst [isProcessingMinorUpdate, setIsProcessingMinorUpdate] = useState(false);\n\tconst [availableMinorFeatures, setAvailableMinorFeatures] = useState<\n\t\tFeatureAnnouncement[]\n\t>([]);\n\tconst [minorFeaturesSkipped, setMinorFeaturesSkipped] = useState(false);\n\tconst [showMinorUpdates, setShowMinorUpdates] = useState(false);\n\tconst [isVideoModalOpen, setIsVideoModalOpen] = useState(false);\n\tconst [videoUrl, setVideoUrl] = useState('');\n\tconst [blockPopups, setBlockPopups] = useState(false);\n\tconst [isClosingMajor, setIsClosingMajor] = useState(false);\n\tconst [isClosingMinor, setIsClosingMinor] = useState(false);\n\tconst [majorJoyrideKey, setMajorJoyrideKey] = useState(0);\n\tconst [minorJoyrideKey, setMinorJoyrideKey] = useState(0);\n\tconst [shownMinorFeatureIds, setShownMinorFeatureIds] = useState<Set<string>>(\n\t\tnew Set(),\n\t);\n\n\t// Add custom style for spotlight cutout effect\n\tuseEffect(() => {\n\t\tconst styleId = 'minor-spotlight-cutout-style';\n\t\tlet styleElement = document.getElementById(styleId) as HTMLStyleElement;\n\n\t\tif (!styleElement) {\n\t\t\tstyleElement = document.createElement('style');\n\t\t\tstyleElement.id = styleId;\n\t\t\tdocument.head.appendChild(styleElement);\n\t\t}\n\n\t\tstyleElement.textContent = `\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t`;\n\n\t\treturn () => {\n\t\t\tconst el = document.getElementById(styleId);\n\t\t\tif (el) {\n\t\t\t\tel.remove();\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t// Force Joyride remount on navigation to prevent stale state\n\tuseEffect(() => {\n\t\tsetMajorJoyrideKey((prev) => prev + 1);\n\t\tsetMinorJoyrideKey((prev) => prev + 1);\n\t\tsetIsClosingMajor(false);\n\t\tsetIsClosingMinor(false);\n\t\t// Reset session tracking on navigation to allow features to show on new pages\n\t\tsetShownMinorFeatureIds(new Set());\n\t}, [router?.pathname]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tmajorUpdateFeatures.length > 0 &&\n\t\t\t!currentMajorFeature &&\n\t\t\t!isLoading &&\n\t\t\t!isProcessingMajorUpdate &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tsetShowMinorUpdates(false);\n\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\tsetRunJoyride(false);\n\t\t\tsetJoyrideSteps([]);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetAvailableMinorFeatures([]);\n\n\t\t\tlet attempts = 0;\n\t\t\tconst MAX_ATTEMPTS = 10;\n\n\t\t\tconst checkWhatsNewButton = () => {\n\t\t\t\tattempts++;\n\t\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t\t);\n\n\t\t\t\tif (whatsNewButton) {\n\t\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t\t} else if (attempts < MAX_ATTEMPTS) {\n\t\t\t\t\tsetTimeout(checkWhatsNewButton, 1000);\n\t\t\t\t} else {\n\t\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tcheckWhatsNewButton();\n\t\t} else if (majorUpdateFeatures.length === 0 && !isLoading) {\n\t\t\tsetShowMinorUpdates(true);\n\t\t}\n\t}, [\n\t\tmajorUpdateFeatures,\n\t\tcurrentMajorFeature,\n\t\tisLoading,\n\t\tisProcessingMajorUpdate,\n\t\tblockPopups,\n\t]);\n\n\tuseEffect(() => {\n\t\t// Only run this special logic if a feature is being forced via URL\n\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\n\t\tif (!featureIdFromQuery || isLoading || minorUpdateFeatures.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst forcedFeature = minorUpdateFeatures.find(\n\t\t\t(f) => f.id === featureIdFromQuery,\n\t\t);\n\n\t\tif (!forcedFeature || !forcedFeature.featureTag) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Prevent the standard flow from interfering\n\t\tsetMinorFeaturesSkipped(true);\n\t\t// Mark that we're processing to prevent other effects from interfering\n\t\tsetIsProcessingMinorUpdate(true);\n\n\t\tlet attempts = 0;\n\t\tconst maxAttempts = 25; // 5 seconds\n\t\tconst interval = setInterval(() => {\n\t\t\tattempts++;\n\t\t\tconst targetSelector =\n\t\t\t\tforcedFeature.featureTag.startsWith('#') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('.') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('[')\n\t\t\t\t\t? forcedFeature.featureTag\n\t\t\t\t\t: `#${forcedFeature.featureTag}`;\n\n\t\t\tconst element = document.querySelector(targetSelector);\n\n\t\t\tif (element) {\n\t\t\t\t// In test mode, pass the feature array directly to avoid async state issues\n\t\t\t\tconst testModeFeatures = [forcedFeature];\n\t\t\t\tsetAvailableMinorFeatures(testModeFeatures);\n\t\t\t\tshowMinorUpdateJoyride(forcedFeature, testModeFeatures);\n\t\t\t\t// Don't reset processing flag here - let user interaction handle it\n\t\t\t\t// This prevents auto-closing when multiple popups exist or when scrolling\n\t\t\t\tclearInterval(interval);\n\t\t\t} else if (attempts >= maxAttempts) {\n\t\t\t\t// Fallback for safety, though user expects it to be there.\n\t\t\t\t// We could log an error here.\n\t\t\t\t// Only reset on timeout (element not found)\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\tclearInterval(interval);\n\t\t\t}\n\t\t}, 200);\n\n\t\treturn () => {\n\t\t\tclearInterval(interval);\n\t\t\t// Don't reset processing flag on cleanup - it causes premature popup closure\n\t\t\t// The flag will be managed by user interactions (skip/explore handlers)\n\t\t};\n\t}, [minorUpdateFeatures, router?.query?.['featureId'], isLoading]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tminorUpdateFeatures.length > 0 &&\n\t\t\t!isLoading &&\n\t\t\t!runJoyride &&\n\t\t\t!isProcessingMinorUpdate &&\n\t\t\t!currentMinorFeature &&\n\t\t\t!minorFeaturesSkipped &&\n\t\t\tshowMinorUpdates &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tlet observer: MutationObserver | null = null;\n\t\t\tlet scrollListener: (() => void) | null = null;\n\t\t\tlet checkTimeout: ReturnType<typeof setTimeout> | null = null;\n\t\t\tlet isCleanedUp = false;\n\n\t\t\tconst checkElementsAndStartTour = () => {\n\t\t\t\tif (\n\t\t\t\t\tisCleanedUp ||\n\t\t\t\t\tisProcessingMinorUpdate ||\n\t\t\t\t\tcurrentMinorFeature ||\n\t\t\t\t\tminorFeaturesSkipped ||\n\t\t\t\t\t!showMinorUpdates\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tconst availableFeatures = minorUpdateFeatures.filter((feature) => {\n\t\t\t\t\tif (!feature.featureTag || feature.featureTag.trim() === '') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Skip features already shown in this session\n\t\t\t\t\tif (shownMinorFeatureIds.has(feature.id)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst targetSelector =\n\t\t\t\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t\t\t\t? feature.featureTag\n\t\t\t\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t\t\t\tconst element = document.querySelector(targetSelector);\n\t\t\t\t\treturn element !== null;\n\t\t\t\t});\n\n\t\t\t\tif (availableFeatures.length > 0) {\n\t\t\t\t\tsetAvailableMinorFeatures(availableFeatures);\n\t\t\t\t\t// Pass features directly to avoid async state issues\n\t\t\t\t\tshowMinorUpdateJoyride(availableFeatures[0], availableFeatures);\n\n\t\t\t\t\tif (observer) {\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\tobserver = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (scrollListener) {\n\t\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t\t\tscrollListener = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t\tcheckTimeout = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tobserver = new MutationObserver((mutations) => {\n\t\t\t\tlet shouldCheck = false;\n\t\t\t\tfor (const mutation of mutations) {\n\t\t\t\t\tif (mutation.type === 'childList' && mutation.addedNodes.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < mutation.addedNodes.length; i++) {\n\t\t\t\t\t\t\tconst node = mutation.addedNodes[i];\n\t\t\t\t\t\t\tif (node.nodeType === Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tconst element = node as Element;\n\t\t\t\t\t\t\t\tif (element.id || element.querySelector('[id]')) {\n\t\t\t\t\t\t\t\t\tshouldCheck = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (shouldCheck) break;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates &&\n\t\t\t\t\tshouldCheck\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 200);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tscrollListener = () => {\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\t// Use RAF for smoother performance synced with browser paint\n\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (observer) {\n\t\t\t\tobserver.observe(document.body, {\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (scrollListener) {\n\t\t\t\twindow.addEventListener('scroll', scrollListener, { passive: true });\n\t\t\t}\n\n\t\t\tcheckElementsAndStartTour();\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 100);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 1000);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 500);\n\n\t\t\treturn () => {\n\t\t\t\tisCleanedUp = true;\n\t\t\t\tif (observer) {\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t}\n\t\t\t\tif (scrollListener) {\n\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t}\n\t\t\t\tif (checkTimeout) {\n\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t}\n\t\t\t};\n\t\t} else if (minorUpdateFeatures.length === 0 || isLoading) {\n\t\t\t// Don't clear joyride if we're in test mode with an active feature\n\t\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\t\t\tconst isTestModeWithActiveFeature =\n\t\t\t\tfeatureIdFromQuery && currentMinorFeature;\n\n\t\t\tif (!isTestModeWithActiveFeature) {\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetAvailableMinorFeatures([]);\n\t\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\t}\n\t\t}\n\t}, [\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\trunJoyride,\n\t\tisProcessingMinorUpdate,\n\t\tcurrentMinorFeature,\n\t\tminorFeaturesSkipped,\n\t\tshowMinorUpdates,\n\t\tmarkFeatureAsViewed,\n\t\tblockPopups,\n\t]);\n\n\tconst showMajorUpdateJoyride = (feature) => {\n\t\tsetCurrentMajorFeature(feature);\n\n\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t(f) => f.id === feature.id,\n\t\t);\n\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\tconst majorSteps = [\n\t\t\t{\n\t\t\t\ttarget: SELECTORS.WHATS_NEW_BUTTON,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(feature)}\n\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\thandleExploreFeature(feature, triggeredAction)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMajor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\n\t\tsetMajorJoyrideSteps(majorSteps);\n\t\tsetRunMajorJoyride(true);\n\n\t\t// Fire announcement shown callback\n\t\tif (onAnnouncementShown && storeId) {\n\t\t\tonAnnouncementShown({\n\t\t\t\tstoreId,\n\t\t\t\tannouncementId: feature.id,\n\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleSkipMajorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tawait Promise.all(\n\t\t\t\t\tmajorUpdateFeatures.map((majorFeature) =>\n\t\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id),\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t// Fire announcement interacted callback for Skip\n\t\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\t\tstoreId,\n\t\t\t\t\t\tannouncementId: targetFeature.id,\n\t\t\t\t\t\tannouncementTitle: targetFeature.title,\n\t\t\t\t\t\timageUrl: targetFeature.displayImage || targetFeature.image,\n\t\t\t\t\t\tvideoUrl: targetFeature.productVideo,\n\t\t\t\t\t\tbuttonClicked: 'Skip',\n\t\t\t\t\t\tbuttonName: 'Skip',\n\t\t\t\t\t\tbuttonUrl: undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t} else {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleExploreFeature = useCallback(\n\t\tasync (feature, triggeredAction?: string) => {\n\t\t\tsetIsProcessingMajorUpdate(true);\n\t\t\t// Await so the feature is marked before any page navigation\n\t\t\tawait markFeatureAsViewed(feature.id);\n\t\t\tconst action = triggeredAction ?? feature.primaryButton?.action;\n\t\t\tif (action === 'Play Video' && feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tif (action === 'Open link') {\n\t\t\t\tconst url =\n\t\t\t\t\tfeature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\t\tif (url && !url.startsWith('http')) {\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsetRunMajorJoyride(false);\n\t\t\tsetCurrentMajorFeature(null);\n\t\t\tsetMajorJoyrideSteps([]);\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === feature.id,\n\t\t\t);\n\t\t\tconst isLastMajorUpdate = currentIndex === majorUpdateFeatures.length - 1;\n\t\t\tif (isLastMajorUpdate) {\n\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t}\n\n\t\t\t// Fire announcement interacted callback for Primary button\n\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\tstoreId,\n\t\t\t\t\tannouncementId: feature.id,\n\t\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t\t\tbuttonClicked: 'Primary',\n\t\t\t\t\tbuttonName: feature.buttonText || 'Explore',\n\t\t\t\t\tbuttonUrl: feature.redirectUrl || feature.productVideo,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t}, 500);\n\t\t},\n\t\t[majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handlePreviousMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = majorUpdateFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMajorFeature(prevFeature);\n\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleExploreFeature(prevFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures],\n\t);\n\n\tconst handleNextMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < majorUpdateFeatures.length - 1) {\n\t\t\t\tconst nextFeature = majorUpdateFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMajorFeature(nextFeature);\n\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleExploreFeature(nextFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst showMajorUpdatePopup = () => {\n\t\tif (majorUpdateFeatures.length > 0 && !currentMajorFeature) {\n\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t);\n\n\t\t\tif (whatsNewButton) {\n\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t}\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\t(window as any).showMajorUpdatePopup = showMajorUpdatePopup;\n\t\treturn () => {\n\t\t\tdelete (window as any).showMajorUpdatePopup;\n\t\t};\n\t}, [majorUpdateFeatures, currentMajorFeature]);\n\tconst handleMajorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMajorFeature) {\n\t\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\t\tmajorUpdateFeatures.forEach((majorFeature) => {\n\t\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id);\n\t\t\t\t\t});\n\n\t\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleMinorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMinorFeature) {\n\t\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\t\tmarkFeatureAsViewed(currentMinorFeature.id);\n\n\t\t\t\t\t// Check if there are more features to show\n\t\t\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t\t\t(f) => f.id === currentMinorFeature.id,\n\t\t\t\t\t);\n\t\t\t\t\tconst isLastFeature =\n\t\t\t\t\t\tcurrentIndex === availableMinorFeatures.length - 1;\n\n\t\t\t\t\tif (isLastFeature) {\n\t\t\t\t\t\t// Only skip remaining features if this was the last one\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\tconst showMinorUpdateJoyride = async (feature, featuresToUse?) => {\n\t\tsetCurrentMinorFeature(feature);\n\n\t\t// Use provided features array or fall back to state (for test mode)\n\t\tconst features = featuresToUse || availableMinorFeatures;\n\t\tconst currentIndex = features.findIndex((f) => f.id === feature.id);\n\t\tconst totalFeatures = features.length;\n\n\t\tconst targetSelector =\n\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t? feature.featureTag\n\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t// Scroll to target element smoothly before showing popup\n\t\tconst targetElement = document.querySelector(targetSelector);\n\t\tif (targetElement) {\n\t\t\ttry {\n\t\t\t\t// Dynamically import to avoid circular dependencies\n\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t);\n\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t} catch (error) {\n\t\t\t\t// Scroll failed silently\n\t\t\t}\n\t\t}\n\n\t\tconst minorSteps = [\n\t\t\t{\n\t\t\t\ttarget: targetSelector,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(feature)}\n\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\thandleExploreMinorFeature(feature, triggeredAction)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom',\n\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMinor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t\tsetJoyrideSteps(minorSteps);\n\t\tsetRunJoyride(true);\n\t};\n\n\tconst handleSkipMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\tawait markFeatureAsViewed(targetFeature.id);\n\n\t\t\t\t// Add to session tracker to prevent re-showing\n\t\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(targetFeature.id));\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\t// Find next unshown feature\n\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t(f) => f.id !== targetFeature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t\t);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tcurrentMinorFeature,\n\t\t\tavailableMinorFeatures,\n\t\t\tmarkFeatureAsViewed,\n\t\t\tshownMinorFeatureIds,\n\t\t],\n\t);\n\n\tconst handleExploreMinorFeature = useCallback(\n\t\tasync (feature, triggeredAction?: string) => {\n\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t// Only mark the current feature as viewed\n\t\t\t// Await so the feature is marked before any page navigation\n\t\t\tawait markFeatureAsViewed(feature.id);\n\n\t\t\t// Add to session tracker to prevent re-showing\n\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(feature.id));\n\n\t\t\tconst action = triggeredAction ?? feature.primaryButton?.action;\n\n\t\t\tif (action === 'Play Video' && feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tif (action === 'Open link') {\n\t\t\t\tconst url =\n\t\t\t\t\tfeature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\t\tif (url && !url.startsWith('http')) {\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsetRunJoyride(false);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetJoyrideSteps([]);\n\n\t\t\t// Find next unshown feature (only auto-advance if no video modal)\n\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t(f) => f.id !== feature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t// Only auto-advance if no video modal is opened\n\t\t\t\tif (nextFeature && action !== 'Play Video') {\n\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t} else if (!nextFeature) {\n\t\t\t\t\t// No more features to show\n\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t}\n\t\t\t\t// If video modal opened, wait for user to close it before advancing\n\t\t\t}, 500);\n\t\t},\n\t\t[availableMinorFeatures, markFeatureAsViewed, shownMinorFeatureIds],\n\t);\n\n\tconst handlePreviousMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = availableMinorFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMinorFeature(prevFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tprevFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? prevFeature.featureTag\n\t\t\t\t\t\t: `#${prevFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the previous feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleExploreMinorFeature(prevFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures],\n\t);\n\n\tconst handleNextMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < availableMinorFeatures.length - 1) {\n\t\t\t\tconst nextFeature = availableMinorFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMinorFeature(nextFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tnextFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? nextFeature.featureTag\n\t\t\t\t\t\t: `#${nextFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the next feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleExploreMinorFeature(nextFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\t\t\t\tsetMinorFeaturesSkipped(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{children}\n\n\t\t\t{majorJoyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`major-joyride-${majorJoyrideKey}`}\n\t\t\t\t\tsteps={majorJoyrideSteps}\n\t\t\t\t\trun={runMajorJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMajorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={false}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tspotlightClicks={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMajor ? 'transparent' : '#212121',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{joyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`minor-joyride-${minorJoyrideKey}`}\n\t\t\t\t\tsteps={joyrideSteps}\n\t\t\t\t\trun={runJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMinorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={false}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tscrollToFirstStep={true}\n\t\t\t\t\tscrollOffset={120}\n\t\t\t\t\tdisableScrolling={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMinor ? 'transparent' : '#ffffff',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\tboxShadow: isClosingMinor\n\t\t\t\t\t\t\t\t? 'none'\n\t\t\t\t\t\t\t\t: '0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t<VideoModal\n\t\t\t\tisOpen={isVideoModalOpen}\n\t\t\t\tvideoUrl={videoUrl}\n\t\t\t\tonClose={() => {\n\t\t\t\t\tsetIsVideoModalOpen(false);\n\t\t\t\t\tsetVideoUrl('');\n\t\t\t\t\tsetBlockPopups(false);\n\n\t\t\t\t\t// After video modal closes, check if there are more features to show\n\t\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t\t(f) => !shownMinorFeatureIds.has(f.id),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature after video\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t/>\n\t\t</>\n\t);\n};\n\nexport default FeatureAnnouncementProvider;\n"],"names":["FeatureAnnouncementProvider","children","fetchVisibleFeatures","getStoreFeatureProgress","fetchFeatureById","markFeatureAsViewedForStore","isFeatureApplicableToCurrentPage","module","router","storeId","onAnnouncementShown","onAnnouncementInteracted","majorUpdateFeatures","minorUpdateFeatures","isLoading","markFeatureAsViewed","useFeatureAnnouncements","currentMajorFeature","setCurrentMajorFeature","useState","currentMinorFeature","setCurrentMinorFeature","runJoyride","setRunJoyride","joyrideSteps","setJoyrideSteps","runMajorJoyride","setRunMajorJoyride","majorJoyrideSteps","setMajorJoyrideSteps","isProcessingMajorUpdate","setIsProcessingMajorUpdate","isProcessingMinorUpdate","setIsProcessingMinorUpdate","availableMinorFeatures","setAvailableMinorFeatures","minorFeaturesSkipped","setMinorFeaturesSkipped","showMinorUpdates","setShowMinorUpdates","isVideoModalOpen","setIsVideoModalOpen","videoUrl","setVideoUrl","blockPopups","setBlockPopups","isClosingMajor","setIsClosingMajor","isClosingMinor","setIsClosingMinor","majorJoyrideKey","setMajorJoyrideKey","minorJoyrideKey","setMinorJoyrideKey","shownMinorFeatureIds","setShownMinorFeatureIds","useEffect","styleId","styleElement","el","prev","attempts","MAX_ATTEMPTS","checkWhatsNewButton","showMajorUpdateJoyride","featureIdFromQuery","forcedFeature","f","maxAttempts","interval","targetSelector","testModeFeatures","showMinorUpdateJoyride","observer","scrollListener","checkTimeout","isCleanedUp","checkElementsAndStartTour","availableFeatures","feature","mutations","shouldCheck","mutation","i","node","element","currentIndex","totalFeatures","majorSteps","SELECTORS","jsx","MajorUpdatePopup","handleSkipMajorUpdate","triggeredAction","handleExploreFeature","handlePreviousMajorUpdate","handleNextMajorUpdate","useCallback","targetFeature","majorFeature","action","url","prevFeature","prevIndex","updatedSteps","nextFeature","nextIndex","showMajorUpdatePopup","handleMajorJoyrideCallback","data","ACTIONS","handleMinorJoyrideCallback","featuresToUse","features","targetElement","scrollToElementSmooth","minorSteps","MinorUpdatePopup","handleSkipMinorUpdate","handleExploreMinorFeature","handlePreviousMinorUpdate","handleNextMinorUpdate","jsxs","Fragment","Joyride","VideoModal"],"mappings":"icASMA,GAEF,CAAC,CACJ,SAAAC,EACA,qBAAAC,GACA,wBAAAC,GACA,iBAAAC,GACA,4BAAAC,GACA,iCAAAC,GACA,OAAAC,GACA,OAAAC,EACA,QAAAC,EACA,oBAAAC,GACA,yBAAAC,CACD,IAAM,CACL,KAAM,CACL,oBAAAC,EACA,oBAAAC,EACA,UAAAC,EACA,oBAAAC,CAAA,EACGC,2BAAwB,CAC3B,qBAAAd,GACA,wBAAAC,GACA,iBAAAC,GACA,4BAAAC,GACA,iCAAAC,GACA,OAAAC,GACA,OAAAC,CAAA,CACA,EAEK,CAACS,EAAqBC,CAAsB,EACjDC,EAAAA,SAAqC,IAAI,EACpC,CAACC,EAAqBC,CAAsB,EACjDF,EAAAA,SAAqC,IAAI,EACpC,CAACG,EAAYC,CAAa,EAAIJ,EAAAA,SAAS,EAAK,EAC5C,CAACK,GAAcC,CAAe,EAAIN,EAAAA,SAAgB,CAAA,CAAE,EACpD,CAACO,GAAiBC,CAAkB,EAAIR,EAAAA,SAAS,EAAK,EACtD,CAACS,GAAmBC,CAAoB,EAAIV,EAAAA,SAAgB,CAAA,CAAE,EAC9D,CAACW,GAAyBC,CAA0B,EAAIZ,EAAAA,SAAS,EAAK,EACtE,CAACa,EAAyBC,CAA0B,EAAId,EAAAA,SAAS,EAAK,EACtE,CAACe,EAAwBC,CAAyB,EAAIhB,EAAAA,SAE1D,CAAA,CAAE,EACE,CAACiB,EAAsBC,CAAuB,EAAIlB,EAAAA,SAAS,EAAK,EAChE,CAACmB,EAAkBC,CAAmB,EAAIpB,EAAAA,SAAS,EAAK,EACxD,CAACqB,GAAkBC,CAAmB,EAAItB,EAAAA,SAAS,EAAK,EACxD,CAACuB,GAAUC,CAAW,EAAIxB,EAAA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,EACzBE,EAAY,EAAE,EACdE,EAAe,EAAK,EAGpB,MAAM4D,EAAcvE,EAAuB,KACzCiC,GAAM,CAACb,EAAqB,IAAIa,EAAE,EAAE,CAAA,EAGlCsC,EAEH,WAAW,IAAM,CAChBjC,EAAuBiC,EAAavE,CAAsB,CAC3D,EAAG,GAAG,EAGNG,EAAwB,EAAI,CAE9B,CAAA,CAAA,CACD,EACD,CAEF"}
1
+ {"version":3,"file":"FeatureAnnouncementProvider.js","sources":["../../../../src/components/feature-announcements/FeatureAnnouncementProvider.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport Joyride, { ACTIONS } from 'react-joyride';\nimport { SELECTORS } from './constants';\nimport { useFeatureAnnouncements } from './hooks';\nimport MajorUpdatePopup from './MajorUpdatePopup';\nimport MinorUpdatePopup from './MinorUpdatePopup';\nimport { FeatureAnnouncement, FeatureAnnouncementProviderProps } from './types';\nimport { VideoModal } from './VideoModal';\n\nconst FeatureAnnouncementProvider: React.FC<\n\tFeatureAnnouncementProviderProps\n> = ({\n\tchildren,\n\tfetchVisibleFeatures,\n\tgetStoreFeatureProgress,\n\tfetchFeatureById,\n\tmarkFeatureAsViewedForStore,\n\tisFeatureApplicableToCurrentPage,\n\tmodule,\n\trouter,\n\tstoreId,\n\tonAnnouncementShown,\n\tonAnnouncementInteracted,\n}) => {\n\tconst {\n\t\tmajorUpdateFeatures,\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\tmarkFeatureAsViewed,\n\t} = useFeatureAnnouncements({\n\t\tfetchVisibleFeatures,\n\t\tgetStoreFeatureProgress,\n\t\tfetchFeatureById,\n\t\tmarkFeatureAsViewedForStore,\n\t\tisFeatureApplicableToCurrentPage,\n\t\tmodule,\n\t\trouter,\n\t});\n\n\tconst [currentMajorFeature, setCurrentMajorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [currentMinorFeature, setCurrentMinorFeature] =\n\t\tuseState<FeatureAnnouncement | null>(null);\n\tconst [runJoyride, setRunJoyride] = useState(false);\n\tconst [joyrideSteps, setJoyrideSteps] = useState<any[]>([]);\n\tconst [runMajorJoyride, setRunMajorJoyride] = useState(false);\n\tconst [majorJoyrideSteps, setMajorJoyrideSteps] = useState<any[]>([]);\n\tconst [isProcessingMajorUpdate, setIsProcessingMajorUpdate] = useState(false);\n\tconst [isProcessingMinorUpdate, setIsProcessingMinorUpdate] = useState(false);\n\tconst [availableMinorFeatures, setAvailableMinorFeatures] = useState<\n\t\tFeatureAnnouncement[]\n\t>([]);\n\tconst [minorFeaturesSkipped, setMinorFeaturesSkipped] = useState(false);\n\tconst [showMinorUpdates, setShowMinorUpdates] = useState(false);\n\tconst [isVideoModalOpen, setIsVideoModalOpen] = useState(false);\n\tconst [videoUrl, setVideoUrl] = useState('');\n\tconst [blockPopups, setBlockPopups] = useState(false);\n\tconst [isClosingMajor, setIsClosingMajor] = useState(false);\n\tconst [isClosingMinor, setIsClosingMinor] = useState(false);\n\tconst [majorJoyrideKey, setMajorJoyrideKey] = useState(0);\n\tconst [minorJoyrideKey, setMinorJoyrideKey] = useState(0);\n\tconst [shownMinorFeatureIds, setShownMinorFeatureIds] = useState<Set<string>>(\n\t\tnew Set(),\n\t);\n\n\t// Add custom style for spotlight cutout effect\n\tuseEffect(() => {\n\t\tconst styleId = 'minor-spotlight-cutout-style';\n\t\tlet styleElement = document.getElementById(styleId) as HTMLStyleElement;\n\n\t\tif (!styleElement) {\n\t\t\tstyleElement = document.createElement('style');\n\t\t\tstyleElement.id = styleId;\n\t\t\tdocument.head.appendChild(styleElement);\n\t\t}\n\n\t\tstyleElement.textContent = `\n\t\t\t.react-joyride__spotlight {\n\t\t\t\ttransition: box-shadow 0.3s ease-in-out !important;\n\t\t\t\twill-change: box-shadow, transform;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__tooltip {\n\t\t\t\twill-change: transform, opacity;\n\t\t\t\ttransform: translateZ(0);\n\t\t\t}\n\t\t\t.react-joyride__floater {\n\t\t\t\tright: 12px !important;\n\t\t\t\tleft: auto !important;\n\t\t\t}\n\t\t`;\n\n\t\treturn () => {\n\t\t\tconst el = document.getElementById(styleId);\n\t\t\tif (el) {\n\t\t\t\tel.remove();\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t// Force Joyride remount on navigation to prevent stale state\n\tuseEffect(() => {\n\t\tsetMajorJoyrideKey((prev) => prev + 1);\n\t\tsetMinorJoyrideKey((prev) => prev + 1);\n\t\tsetIsClosingMajor(false);\n\t\tsetIsClosingMinor(false);\n\t\t// Reset session tracking on navigation to allow features to show on new pages\n\t\tsetShownMinorFeatureIds(new Set());\n\t}, [router?.pathname]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tmajorUpdateFeatures.length > 0 &&\n\t\t\t!currentMajorFeature &&\n\t\t\t!isLoading &&\n\t\t\t!isProcessingMajorUpdate &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tsetShowMinorUpdates(false);\n\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\tsetRunJoyride(false);\n\t\t\tsetJoyrideSteps([]);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetAvailableMinorFeatures([]);\n\n\t\t\tlet attempts = 0;\n\t\t\tconst MAX_ATTEMPTS = 10;\n\n\t\t\tconst checkWhatsNewButton = () => {\n\t\t\t\tattempts++;\n\t\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t\t);\n\n\t\t\t\tif (whatsNewButton) {\n\t\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t\t} else if (attempts < MAX_ATTEMPTS) {\n\t\t\t\t\tsetTimeout(checkWhatsNewButton, 1000);\n\t\t\t\t} else {\n\t\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tcheckWhatsNewButton();\n\t\t} else if (majorUpdateFeatures.length === 0 && !isLoading) {\n\t\t\tsetShowMinorUpdates(true);\n\t\t}\n\t}, [\n\t\tmajorUpdateFeatures,\n\t\tcurrentMajorFeature,\n\t\tisLoading,\n\t\tisProcessingMajorUpdate,\n\t\tblockPopups,\n\t]);\n\n\tuseEffect(() => {\n\t\t// Only run this special logic if a feature is being forced via URL\n\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\n\t\tif (!featureIdFromQuery || isLoading || minorUpdateFeatures.length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst forcedFeature = minorUpdateFeatures.find(\n\t\t\t(f) => f.id === featureIdFromQuery,\n\t\t);\n\n\t\tif (!forcedFeature || !forcedFeature.featureTag) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Prevent the standard flow from interfering\n\t\tsetMinorFeaturesSkipped(true);\n\t\t// Mark that we're processing to prevent other effects from interfering\n\t\tsetIsProcessingMinorUpdate(true);\n\n\t\tlet attempts = 0;\n\t\tconst maxAttempts = 25; // 5 seconds\n\t\tconst interval = setInterval(() => {\n\t\t\tattempts++;\n\t\t\tconst targetSelector =\n\t\t\t\tforcedFeature.featureTag.startsWith('#') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('.') ||\n\t\t\t\tforcedFeature.featureTag.startsWith('[')\n\t\t\t\t\t? forcedFeature.featureTag\n\t\t\t\t\t: `#${forcedFeature.featureTag}`;\n\n\t\t\tconst element = document.querySelector(targetSelector);\n\n\t\t\tif (element) {\n\t\t\t\t// In test mode, pass the feature array directly to avoid async state issues\n\t\t\t\tconst testModeFeatures = [forcedFeature];\n\t\t\t\tsetAvailableMinorFeatures(testModeFeatures);\n\t\t\t\tshowMinorUpdateJoyride(forcedFeature, testModeFeatures);\n\t\t\t\t// Don't reset processing flag here - let user interaction handle it\n\t\t\t\t// This prevents auto-closing when multiple popups exist or when scrolling\n\t\t\t\tclearInterval(interval);\n\t\t\t} else if (attempts >= maxAttempts) {\n\t\t\t\t// Fallback for safety, though user expects it to be there.\n\t\t\t\t// We could log an error here.\n\t\t\t\t// Only reset on timeout (element not found)\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\tclearInterval(interval);\n\t\t\t}\n\t\t}, 200);\n\n\t\treturn () => {\n\t\t\tclearInterval(interval);\n\t\t\t// Don't reset processing flag on cleanup - it causes premature popup closure\n\t\t\t// The flag will be managed by user interactions (skip/explore handlers)\n\t\t};\n\t}, [minorUpdateFeatures, router?.query?.['featureId'], isLoading]);\n\n\tuseEffect(() => {\n\t\tif (\n\t\t\tminorUpdateFeatures.length > 0 &&\n\t\t\t!isLoading &&\n\t\t\t!runJoyride &&\n\t\t\t!isProcessingMinorUpdate &&\n\t\t\t!currentMinorFeature &&\n\t\t\t!minorFeaturesSkipped &&\n\t\t\tshowMinorUpdates &&\n\t\t\t!blockPopups\n\t\t) {\n\t\t\tlet observer: MutationObserver | null = null;\n\t\t\tlet scrollListener: (() => void) | null = null;\n\t\t\tlet checkTimeout: ReturnType<typeof setTimeout> | null = null;\n\t\t\tlet isCleanedUp = false;\n\n\t\t\tconst checkElementsAndStartTour = () => {\n\t\t\t\tif (\n\t\t\t\t\tisCleanedUp ||\n\t\t\t\t\tisProcessingMinorUpdate ||\n\t\t\t\t\tcurrentMinorFeature ||\n\t\t\t\t\tminorFeaturesSkipped ||\n\t\t\t\t\t!showMinorUpdates\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tconst availableFeatures = minorUpdateFeatures.filter((feature) => {\n\t\t\t\t\tif (!feature.featureTag || feature.featureTag.trim() === '') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Skip features already shown in this session\n\t\t\t\t\tif (shownMinorFeatureIds.has(feature.id)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst targetSelector =\n\t\t\t\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\t\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t\t\t\t? feature.featureTag\n\t\t\t\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t\t\t\tconst element = document.querySelector(targetSelector);\n\t\t\t\t\treturn element !== null;\n\t\t\t\t});\n\n\t\t\t\tif (availableFeatures.length > 0) {\n\t\t\t\t\tsetAvailableMinorFeatures(availableFeatures);\n\t\t\t\t\t// Pass features directly to avoid async state issues\n\t\t\t\t\tshowMinorUpdateJoyride(availableFeatures[0], availableFeatures);\n\n\t\t\t\t\tif (observer) {\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\tobserver = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (scrollListener) {\n\t\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t\t\tscrollListener = null;\n\t\t\t\t\t}\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t\tcheckTimeout = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tobserver = new MutationObserver((mutations) => {\n\t\t\t\tlet shouldCheck = false;\n\t\t\t\tfor (const mutation of mutations) {\n\t\t\t\t\tif (mutation.type === 'childList' && mutation.addedNodes.length > 0) {\n\t\t\t\t\t\tfor (let i = 0; i < mutation.addedNodes.length; i++) {\n\t\t\t\t\t\t\tconst node = mutation.addedNodes[i];\n\t\t\t\t\t\t\tif (node.nodeType === Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\t\tconst element = node as Element;\n\t\t\t\t\t\t\t\tif (element.id || element.querySelector('[id]')) {\n\t\t\t\t\t\t\t\t\tshouldCheck = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (shouldCheck) break;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates &&\n\t\t\t\t\tshouldCheck\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 200);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tscrollListener = () => {\n\t\t\t\tif (\n\t\t\t\t\t!runJoyride &&\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tif (checkTimeout) {\n\t\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t\t}\n\t\t\t\t\t// Use RAF for smoother performance synced with browser paint\n\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\tcheckTimeout = setTimeout(() => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\t\t\t\tshowMinorUpdates\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (observer) {\n\t\t\t\tobserver.observe(document.body, {\n\t\t\t\t\tchildList: true,\n\t\t\t\t\tsubtree: true,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (scrollListener) {\n\t\t\t\twindow.addEventListener('scroll', scrollListener, { passive: true });\n\t\t\t}\n\n\t\t\tcheckElementsAndStartTour();\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 100);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 1000);\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (\n\t\t\t\t\t!isCleanedUp &&\n\t\t\t\t\t!isProcessingMinorUpdate &&\n\t\t\t\t\t!currentMinorFeature &&\n\t\t\t\t\t!minorFeaturesSkipped &&\n\t\t\t\t\tshowMinorUpdates\n\t\t\t\t) {\n\t\t\t\t\tcheckElementsAndStartTour();\n\t\t\t\t}\n\t\t\t}, 500);\n\n\t\t\treturn () => {\n\t\t\t\tisCleanedUp = true;\n\t\t\t\tif (observer) {\n\t\t\t\t\tobserver.disconnect();\n\t\t\t\t}\n\t\t\t\tif (scrollListener) {\n\t\t\t\t\twindow.removeEventListener('scroll', scrollListener);\n\t\t\t\t}\n\t\t\t\tif (checkTimeout) {\n\t\t\t\t\tclearTimeout(checkTimeout);\n\t\t\t\t}\n\t\t\t};\n\t\t} else if (minorUpdateFeatures.length === 0 || isLoading) {\n\t\t\t// Don't clear joyride if we're in test mode with an active feature\n\t\t\tconst featureIdFromQuery = router?.query?.['featureId'] as string;\n\t\t\tconst isTestModeWithActiveFeature =\n\t\t\t\tfeatureIdFromQuery && currentMinorFeature;\n\n\t\t\tif (!isTestModeWithActiveFeature) {\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetAvailableMinorFeatures([]);\n\t\t\t\tsetMinorFeaturesSkipped(false);\n\t\t\t}\n\t\t}\n\t}, [\n\t\tminorUpdateFeatures,\n\t\tisLoading,\n\t\trunJoyride,\n\t\tisProcessingMinorUpdate,\n\t\tcurrentMinorFeature,\n\t\tminorFeaturesSkipped,\n\t\tshowMinorUpdates,\n\t\tmarkFeatureAsViewed,\n\t\tblockPopups,\n\t]);\n\n\tconst showMajorUpdateJoyride = (feature) => {\n\t\tsetCurrentMajorFeature(feature);\n\n\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t(f) => f.id === feature.id,\n\t\t);\n\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\tconst majorSteps = [\n\t\t\t{\n\t\t\t\ttarget: SELECTORS.WHATS_NEW_BUTTON,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(feature)}\n\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\thandleExploreFeature(feature, triggeredAction)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonSecondaryAction={(triggeredAction) =>\n\t\t\t\t\t\t\thandleSecondaryMajorFeature(feature, triggeredAction)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMajor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\n\t\tsetMajorJoyrideSteps(majorSteps);\n\t\tsetRunMajorJoyride(true);\n\n\t\t// Fire announcement shown callback\n\t\tif (onAnnouncementShown && storeId) {\n\t\t\tonAnnouncementShown({\n\t\t\t\tstoreId,\n\t\t\t\tannouncementId: feature.id,\n\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleSkipMajorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tawait Promise.all(\n\t\t\t\t\tmajorUpdateFeatures.map((majorFeature) =>\n\t\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id),\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t// Fire announcement interacted callback for Skip\n\t\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\t\tstoreId,\n\t\t\t\t\t\tannouncementId: targetFeature.id,\n\t\t\t\t\t\tannouncementTitle: targetFeature.title,\n\t\t\t\t\t\timageUrl: targetFeature.displayImage || targetFeature.image,\n\t\t\t\t\t\tvideoUrl: targetFeature.productVideo,\n\t\t\t\t\t\tbuttonClicked: 'Skip',\n\t\t\t\t\t\tbuttonName: 'Skip',\n\t\t\t\t\t\tbuttonUrl: undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t} else {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleExploreFeature = useCallback(\n\t\tasync (feature, triggeredAction?: string) => {\n\t\t\tsetIsProcessingMajorUpdate(true);\n\t\t\t// Await so the feature is marked before any page navigation\n\t\t\tawait markFeatureAsViewed(feature.id);\n\t\t\tconst action = triggeredAction ?? feature.primaryButton?.action;\n\t\t\tif (action === 'Play Video' && feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tif (action === 'Open link') {\n\t\t\t\tconst url =\n\t\t\t\t\tfeature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\t\tif (url && !url.startsWith('http')) {\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsetRunMajorJoyride(false);\n\t\t\tsetCurrentMajorFeature(null);\n\t\t\tsetMajorJoyrideSteps([]);\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === feature.id,\n\t\t\t);\n\t\t\tconst isLastMajorUpdate = currentIndex === majorUpdateFeatures.length - 1;\n\t\t\tif (isLastMajorUpdate) {\n\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t}\n\n\t\t\t// Fire announcement interacted callback for Primary button\n\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\tstoreId,\n\t\t\t\t\tannouncementId: feature.id,\n\t\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t\t\tbuttonClicked: 'Primary',\n\t\t\t\t\t// Mirrors the rendered button and the navigation target, which both\n\t\t\t\t\t// prefer primaryButton over the legacy top-level fields.\n\t\t\t\t\tbuttonName:\n\t\t\t\t\t\tfeature.primaryButton?.text || feature.buttonText || 'Explore',\n\t\t\t\t\tbuttonUrl:\n\t\t\t\t\t\tfeature.primaryButton?.redirectionUrl ||\n\t\t\t\t\t\tfeature.redirectUrl ||\n\t\t\t\t\t\tfeature.productVideo,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t}, 500);\n\t\t},\n\t\t[majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleSecondaryMajorFeature = useCallback(\n\t\tasync (feature, triggeredAction?: string) => {\n\t\t\tsetIsProcessingMajorUpdate(true);\n\t\t\t// Await so the feature is marked before any page navigation\n\t\t\tawait markFeatureAsViewed(feature.id);\n\t\t\tconst action = triggeredAction ?? feature.secondaryButton?.action;\n\t\t\t// Redirection is handled by the popup; only the video modal is opened here.\n\t\t\tif (action === 'Play Video' && feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tsetRunMajorJoyride(false);\n\t\t\tsetCurrentMajorFeature(null);\n\t\t\tsetMajorJoyrideSteps([]);\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === feature.id,\n\t\t\t);\n\t\t\tconst isLastMajorUpdate = currentIndex === majorUpdateFeatures.length - 1;\n\t\t\tif (isLastMajorUpdate) {\n\t\t\t\tsetShowMinorUpdates(true);\n\t\t\t}\n\n\t\t\t// Fire announcement interacted callback for Secondary button\n\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\tstoreId,\n\t\t\t\t\tannouncementId: feature.id,\n\t\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t\t\tbuttonClicked: 'Secondary',\n\t\t\t\t\tbuttonName: feature.secondaryButton?.text || 'Secondary',\n\t\t\t\t\tbuttonUrl: feature.secondaryButton?.redirectionUrl,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t}, 500);\n\t\t},\n\t\t[majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handlePreviousMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = majorUpdateFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMajorFeature(prevFeature);\n\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleExploreFeature(prevFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSecondaryAction={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleSecondaryMajorFeature(prevFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures],\n\t);\n\n\tconst handleNextMajorUpdate = useCallback(\n\t\t(feature) => {\n\t\t\tconst targetFeature = feature || currentMajorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = majorUpdateFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < majorUpdateFeatures.length - 1) {\n\t\t\t\tconst nextFeature = majorUpdateFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMajorFeature(nextFeature);\n\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = majorUpdateFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: '[data-testid=\"whats-new-button\"]',\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MajorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleExploreFeature(nextFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSecondaryAction={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleSecondaryMajorFeature(nextFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMajorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMajor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom-start',\n\t\t\t\t\t\tplacementBeacon: 'top-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMajor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetMajorJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\n\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst showMajorUpdatePopup = () => {\n\t\tif (majorUpdateFeatures.length > 0 && !currentMajorFeature) {\n\t\t\tconst whatsNewButton = document.querySelector(\n\t\t\t\t'[data-testid=\"whats-new-button\"]',\n\t\t\t);\n\n\t\t\tif (whatsNewButton) {\n\t\t\t\tshowMajorUpdateJoyride(majorUpdateFeatures[0]);\n\t\t\t}\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\t(window as any).showMajorUpdatePopup = showMajorUpdatePopup;\n\t\treturn () => {\n\t\t\tdelete (window as any).showMajorUpdatePopup;\n\t\t};\n\t}, [majorUpdateFeatures, currentMajorFeature]);\n\tconst handleMajorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMajorFeature) {\n\t\t\t\t\tsetIsProcessingMajorUpdate(true);\n\n\t\t\t\t\tmajorUpdateFeatures.forEach((majorFeature) => {\n\t\t\t\t\t\tmarkFeatureAsViewed(majorFeature.id);\n\t\t\t\t\t});\n\n\t\t\t\t\tsetShowMinorUpdates(true);\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMajorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunMajorJoyride(false);\n\t\t\t\tsetCurrentMajorFeature(null);\n\t\t\t\tsetMajorJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMajorFeature, majorUpdateFeatures, markFeatureAsViewed],\n\t);\n\n\tconst handleMinorJoyrideCallback = useCallback(\n\t\t(data) => {\n\t\t\tconst { action } = data;\n\n\t\t\tif (action === ACTIONS.CLOSE) {\n\t\t\t\tif (currentMinorFeature) {\n\t\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\t\tmarkFeatureAsViewed(currentMinorFeature.id);\n\n\t\t\t\t\t// Check if there are more features to show\n\t\t\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t\t\t(f) => f.id === currentMinorFeature.id,\n\t\t\t\t\t);\n\t\t\t\t\tconst isLastFeature =\n\t\t\t\t\t\tcurrentIndex === availableMinorFeatures.length - 1;\n\n\t\t\t\t\tif (isLastFeature) {\n\t\t\t\t\t\t// Only skip remaining features if this was the last one\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\tconst showMinorUpdateJoyride = async (feature, featuresToUse?) => {\n\t\tsetCurrentMinorFeature(feature);\n\n\t\t// Use provided features array or fall back to state (for test mode)\n\t\tconst features = featuresToUse || availableMinorFeatures;\n\t\tconst currentIndex = features.findIndex((f) => f.id === feature.id);\n\t\tconst totalFeatures = features.length;\n\n\t\tconst targetSelector =\n\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t? feature.featureTag\n\t\t\t\t: `#${feature.featureTag}`;\n\n\t\t// Scroll to target element smoothly before showing popup\n\t\tconst targetElement = document.querySelector(targetSelector);\n\t\tif (targetElement) {\n\t\t\ttry {\n\t\t\t\t// Dynamically import to avoid circular dependencies\n\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t);\n\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t} catch (error) {\n\t\t\t\t// Scroll failed silently\n\t\t\t}\n\t\t}\n\n\t\tconst minorSteps = [\n\t\t\t{\n\t\t\t\ttarget: targetSelector,\n\t\t\t\tcontent: (\n\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\tfeature={feature}\n\t\t\t\t\t\tcurrentIndex={currentIndex}\n\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(feature)}\n\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\thandleExploreMinorFeature(feature, triggeredAction)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonSecondaryAction={(triggeredAction) =>\n\t\t\t\t\t\t\thandleSecondaryMinorFeature(feature, triggeredAction)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(feature)}\n\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(feature)}\n\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tplacement: 'bottom',\n\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\tdisableBeacon: true,\n\t\t\t\thideCloseButton: true,\n\t\t\t\thideSkipButton: true,\n\t\t\t\thideFooter: true,\n\t\t\t\toffset: 0,\n\t\t\t\tdata: { feature, isMinor: true },\n\t\t\t\tstyles: {\n\t\t\t\t\ttooltip: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t},\n\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t},\n\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t\tsetJoyrideSteps(minorSteps);\n\t\tsetRunJoyride(true);\n\n\t\t// Fire announcement shown callback\n\t\tif (onAnnouncementShown && storeId) {\n\t\t\tonAnnouncementShown({\n\t\t\t\tstoreId,\n\t\t\t\tannouncementId: feature.id,\n\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleSkipMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (targetFeature) {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t\t// Only mark the current feature as viewed, not all features\n\t\t\t\tawait markFeatureAsViewed(targetFeature.id);\n\n\t\t\t\t// Add to session tracker to prevent re-showing\n\t\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(targetFeature.id));\n\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\t// Find next unshown feature\n\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t(f) => f.id !== targetFeature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t\t);\n\n\t\t\t\t// Fire announcement interacted callback for Skip\n\t\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\t\tstoreId,\n\t\t\t\t\t\tannouncementId: targetFeature.id,\n\t\t\t\t\t\tannouncementTitle: targetFeature.title,\n\t\t\t\t\t\timageUrl: targetFeature.displayImage || targetFeature.image,\n\t\t\t\t\t\tvideoUrl: targetFeature.productVideo,\n\t\t\t\t\t\tbuttonClicked: 'Skip',\n\t\t\t\t\t\tbuttonName: 'Skip',\n\t\t\t\t\t\tbuttonUrl: undefined,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tcurrentMinorFeature,\n\t\t\tavailableMinorFeatures,\n\t\t\tmarkFeatureAsViewed,\n\t\t\tshownMinorFeatureIds,\n\t\t],\n\t);\n\n\tconst handleExploreMinorFeature = useCallback(\n\t\tasync (feature, triggeredAction?: string) => {\n\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t// Only mark the current feature as viewed\n\t\t\t// Await so the feature is marked before any page navigation\n\t\t\tawait markFeatureAsViewed(feature.id);\n\n\t\t\t// Add to session tracker to prevent re-showing\n\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(feature.id));\n\n\t\t\tconst action = triggeredAction ?? feature.primaryButton?.action;\n\n\t\t\tif (action === 'Play Video' && feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tif (action === 'Open link') {\n\t\t\t\tconst url =\n\t\t\t\t\tfeature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\t\tif (url && !url.startsWith('http')) {\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsetRunJoyride(false);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetJoyrideSteps([]);\n\n\t\t\t// Find next unshown feature (only auto-advance if no video modal)\n\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t(f) => f.id !== feature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t);\n\n\t\t\t// Fire announcement interacted callback for Primary button\n\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\tstoreId,\n\t\t\t\t\tannouncementId: feature.id,\n\t\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t\t\tbuttonClicked: 'Primary',\n\t\t\t\t\t// Mirrors the rendered button and the navigation target, which both\n\t\t\t\t\t// prefer primaryButton over the legacy top-level fields.\n\t\t\t\t\tbuttonName:\n\t\t\t\t\t\tfeature.primaryButton?.text || feature.buttonText || 'Explore',\n\t\t\t\t\tbuttonUrl:\n\t\t\t\t\t\tfeature.primaryButton?.redirectionUrl ||\n\t\t\t\t\t\tfeature.redirectUrl ||\n\t\t\t\t\t\tfeature.productVideo,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\t// Only auto-advance if no video modal is opened\n\t\t\t\tif (nextFeature && action !== 'Play Video') {\n\t\t\t\t\t// Auto-advance to next feature\n\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t} else if (!nextFeature) {\n\t\t\t\t\t// No more features to show\n\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t}\n\t\t\t\t// If video modal opened, wait for user to close it before advancing\n\t\t\t}, 500);\n\t\t},\n\t\t[availableMinorFeatures, markFeatureAsViewed, shownMinorFeatureIds],\n\t);\n\n\tconst handleSecondaryMinorFeature = useCallback(\n\t\tasync (feature, triggeredAction?: string) => {\n\t\t\tsetIsProcessingMinorUpdate(true);\n\n\t\t\t// Await so the feature is marked before any page navigation\n\t\t\tawait markFeatureAsViewed(feature.id);\n\n\t\t\t// Add to session tracker to prevent re-showing\n\t\t\tsetShownMinorFeatureIds((prev) => new Set(prev).add(feature.id));\n\n\t\t\tconst action = triggeredAction ?? feature.secondaryButton?.action;\n\t\t\t// Redirection is handled by the popup; only the video modal is opened here.\n\t\t\tif (action === 'Play Video' && feature.productVideo) {\n\t\t\t\tsetVideoUrl(feature.productVideo);\n\t\t\t\tsetIsVideoModalOpen(true);\n\t\t\t\tsetBlockPopups(true);\n\t\t\t}\n\n\t\t\tsetRunJoyride(false);\n\t\t\tsetCurrentMinorFeature(null);\n\t\t\tsetJoyrideSteps([]);\n\n\t\t\t// Find next unshown feature (only auto-advance if no video modal)\n\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t(f) => f.id !== feature.id && !shownMinorFeatureIds.has(f.id),\n\t\t\t);\n\n\t\t\t// Fire announcement interacted callback for Secondary button\n\t\t\tif (onAnnouncementInteracted && storeId) {\n\t\t\t\tonAnnouncementInteracted({\n\t\t\t\t\tstoreId,\n\t\t\t\t\tannouncementId: feature.id,\n\t\t\t\t\tannouncementTitle: feature.title,\n\t\t\t\t\timageUrl: feature.displayImage || feature.image,\n\t\t\t\t\tvideoUrl: feature.productVideo,\n\t\t\t\t\tbuttonClicked: 'Secondary',\n\t\t\t\t\tbuttonName: feature.secondaryButton?.text || 'Secondary',\n\t\t\t\t\tbuttonUrl: feature.secondaryButton?.redirectionUrl,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tsetIsProcessingMinorUpdate(false);\n\n\t\t\t\tif (nextFeature && action !== 'Play Video') {\n\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t} else if (!nextFeature) {\n\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t}\n\t\t\t}, 500);\n\t\t},\n\t\t[availableMinorFeatures, markFeatureAsViewed, shownMinorFeatureIds],\n\t);\n\n\tconst handlePreviousMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\tconst prevFeature = availableMinorFeatures[currentIndex - 1];\n\t\t\t\tsetCurrentMinorFeature(prevFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tprevFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tprevFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? prevFeature.featureTag\n\t\t\t\t\t\t: `#${prevFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the previous feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst prevIndex = currentIndex - 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={prevFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={prevIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleExploreMinorFeature(prevFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSecondaryAction={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleSecondaryMinorFeature(prevFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(prevFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: prevFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures],\n\t);\n\n\tconst handleNextMinorUpdate = useCallback(\n\t\tasync (feature) => {\n\t\t\tconst targetFeature = feature || currentMinorFeature;\n\n\t\t\tif (!targetFeature) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst currentIndex = availableMinorFeatures.findIndex(\n\t\t\t\t(f) => f.id === targetFeature.id,\n\t\t\t);\n\n\t\t\tif (currentIndex < availableMinorFeatures.length - 1) {\n\t\t\t\tconst nextFeature = availableMinorFeatures[currentIndex + 1];\n\t\t\t\tsetCurrentMinorFeature(nextFeature);\n\n\t\t\t\tconst targetSelector =\n\t\t\t\t\tnextFeature.featureTag.startsWith('#') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('.') ||\n\t\t\t\t\tnextFeature.featureTag.startsWith('[')\n\t\t\t\t\t\t? nextFeature.featureTag\n\t\t\t\t\t\t: `#${nextFeature.featureTag}`;\n\n\t\t\t\t// Scroll to the next feature element\n\t\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\t\tif (targetElement) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { scrollToElementSmooth } = await import(\n\t\t\t\t\t\t\t'./utils/elementHelpers'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tawait scrollToElementSmooth(targetElement, 120);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t// Scroll failed silently\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst nextIndex = currentIndex + 1;\n\t\t\t\tconst totalFeatures = availableMinorFeatures.length;\n\n\t\t\t\tconst updatedSteps = [\n\t\t\t\t\t{\n\t\t\t\t\t\ttarget: targetSelector,\n\t\t\t\t\t\tcontent: (\n\t\t\t\t\t\t\t<MinorUpdatePopup\n\t\t\t\t\t\t\t\tfeature={nextFeature}\n\t\t\t\t\t\t\t\tcurrentIndex={nextIndex}\n\t\t\t\t\t\t\t\ttotalFeatures={totalFeatures}\n\t\t\t\t\t\t\t\tonSkip={() => handleSkipMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonExplore={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleExploreMinorFeature(nextFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSecondaryAction={(triggeredAction) =>\n\t\t\t\t\t\t\t\t\thandleSecondaryMinorFeature(nextFeature, triggeredAction)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonPrevious={() => handlePreviousMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tonNext={() => handleNextMinorUpdate(nextFeature)}\n\t\t\t\t\t\t\t\tsetIsClosing={setIsClosingMinor}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\tplacementBeacon: 'bottom-end',\n\t\t\t\t\t\tdisableBeacon: true,\n\t\t\t\t\t\thideCloseButton: true,\n\t\t\t\t\t\thideSkipButton: true,\n\t\t\t\t\t\thideFooter: true,\n\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\tdata: { feature: nextFeature, isMinor: true },\n\t\t\t\t\t\tstyles: {\n\t\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t];\n\n\t\t\t\tsetJoyrideSteps(updatedSteps);\n\t\t\t} else {\n\t\t\t\tsetIsProcessingMinorUpdate(true);\n\t\t\t\tsetMinorFeaturesSkipped(true);\n\n\t\t\t\tmarkFeatureAsViewed(targetFeature.id);\n\t\t\t\tsetRunJoyride(false);\n\t\t\t\tsetCurrentMinorFeature(null);\n\t\t\t\tsetJoyrideSteps([]);\n\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tsetIsProcessingMinorUpdate(false);\n\t\t\t\t}, 500);\n\t\t\t}\n\t\t},\n\t\t[currentMinorFeature, availableMinorFeatures, markFeatureAsViewed],\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{children}\n\n\t\t\t{majorJoyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`major-joyride-${majorJoyrideKey}`}\n\t\t\t\t\tsteps={majorJoyrideSteps}\n\t\t\t\t\trun={runMajorJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMajorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={false}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tspotlightClicks={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMajor ? 'transparent' : '#212121',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '16px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t{joyrideSteps.length > 0 && (\n\t\t\t\t<Joyride\n\t\t\t\t\tkey={`minor-joyride-${minorJoyrideKey}`}\n\t\t\t\t\tsteps={joyrideSteps}\n\t\t\t\t\trun={runJoyride}\n\t\t\t\t\tcontinuous={false}\n\t\t\t\t\tshowProgress={false}\n\t\t\t\t\tshowSkipButton={false}\n\t\t\t\t\tcallback={handleMinorJoyrideCallback}\n\t\t\t\t\tdisableOverlayClose={false}\n\t\t\t\t\tdisableCloseOnEsc={false}\n\t\t\t\t\tdisableOverlay={false}\n\t\t\t\t\tscrollToFirstStep={true}\n\t\t\t\t\tscrollOffset={120}\n\t\t\t\t\tdisableScrolling={false}\n\t\t\t\t\tstyles={{\n\t\t\t\t\t\toptions: {\n\t\t\t\t\t\t\tprimaryColor: '#007bff',\n\t\t\t\t\t\t\tzIndex: 10000,\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t\tarrowColor: isClosingMinor ? 'transparent' : '#ffffff',\n\t\t\t\t\t\t},\n\t\t\t\t\t\toverlay: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tspotlight: {\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborderRadius: '8px',\n\t\t\t\t\t\t\tboxShadow: isClosingMinor\n\t\t\t\t\t\t\t\t? 'none'\n\t\t\t\t\t\t\t\t: '0 0 0 9999px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.8), 0 0 20px 8px rgba(255, 255, 255, 0.4)',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltip: {\n\t\t\t\t\t\t\tborderRadius: '4px',\n\t\t\t\t\t\t\tfontSize: '14px',\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t\tbackgroundColor: 'transparent',\n\t\t\t\t\t\t\tborder: 'none',\n\t\t\t\t\t\t\tfilter: 'none',\n\t\t\t\t\t\t\tboxShadow: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttooltipContent: {\n\t\t\t\t\t\t\tpadding: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonNext: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonBack: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonSkip: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tbuttonClose: {\n\t\t\t\t\t\t\tdisplay: 'none',\n\t\t\t\t\t\t},\n\t\t\t\t\t}}\n\t\t\t\t\tlocale={{\n\t\t\t\t\t\tback: 'Back',\n\t\t\t\t\t\tclose: 'Close',\n\t\t\t\t\t\tlast: 'Close',\n\t\t\t\t\t\tnext: 'Next',\n\t\t\t\t\t\tskip: 'Skip',\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t)}\n\n\t\t\t<VideoModal\n\t\t\t\tisOpen={isVideoModalOpen}\n\t\t\t\tvideoUrl={videoUrl}\n\t\t\t\tonClose={() => {\n\t\t\t\t\tsetIsVideoModalOpen(false);\n\t\t\t\t\tsetVideoUrl('');\n\t\t\t\t\tsetBlockPopups(false);\n\n\t\t\t\t\t// After video modal closes, check if there are more features to show\n\t\t\t\t\tconst nextFeature = availableMinorFeatures.find(\n\t\t\t\t\t\t(f) => !shownMinorFeatureIds.has(f.id),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (nextFeature) {\n\t\t\t\t\t\t// Auto-advance to next feature after video\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\tshowMinorUpdateJoyride(nextFeature, availableMinorFeatures);\n\t\t\t\t\t\t}, 300);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// No more features to show\n\t\t\t\t\t\tsetMinorFeaturesSkipped(true);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t/>\n\t\t</>\n\t);\n};\n\nexport default FeatureAnnouncementProvider;\n"],"names":["FeatureAnnouncementProvider","children","fetchVisibleFeatures","getStoreFeatureProgress","fetchFeatureById","markFeatureAsViewedForStore","isFeatureApplicableToCurrentPage","module","router","storeId","onAnnouncementShown","onAnnouncementInteracted","majorUpdateFeatures","minorUpdateFeatures","isLoading","markFeatureAsViewed","useFeatureAnnouncements","currentMajorFeature","setCurrentMajorFeature","useState","currentMinorFeature","setCurrentMinorFeature","runJoyride","setRunJoyride","joyrideSteps","setJoyrideSteps","runMajorJoyride","setRunMajorJoyride","majorJoyrideSteps","setMajorJoyrideSteps","isProcessingMajorUpdate","setIsProcessingMajorUpdate","isProcessingMinorUpdate","setIsProcessingMinorUpdate","availableMinorFeatures","setAvailableMinorFeatures","minorFeaturesSkipped","setMinorFeaturesSkipped","showMinorUpdates","setShowMinorUpdates","isVideoModalOpen","setIsVideoModalOpen","videoUrl","setVideoUrl","blockPopups","setBlockPopups","isClosingMajor","setIsClosingMajor","isClosingMinor","setIsClosingMinor","majorJoyrideKey","setMajorJoyrideKey","minorJoyrideKey","setMinorJoyrideKey","shownMinorFeatureIds","setShownMinorFeatureIds","useEffect","styleId","styleElement","el","prev","attempts","MAX_ATTEMPTS","checkWhatsNewButton","showMajorUpdateJoyride","featureIdFromQuery","forcedFeature","f","maxAttempts","interval","targetSelector","testModeFeatures","showMinorUpdateJoyride","observer","scrollListener","checkTimeout","isCleanedUp","checkElementsAndStartTour","availableFeatures","feature","mutations","shouldCheck","mutation","i","node","element","currentIndex","totalFeatures","majorSteps","SELECTORS","jsx","MajorUpdatePopup","handleSkipMajorUpdate","triggeredAction","handleExploreFeature","handleSecondaryMajorFeature","handlePreviousMajorUpdate","handleNextMajorUpdate","useCallback","targetFeature","majorFeature","action","url","prevFeature","prevIndex","updatedSteps","nextFeature","nextIndex","showMajorUpdatePopup","handleMajorJoyrideCallback","data","ACTIONS","handleMinorJoyrideCallback","featuresToUse","features","targetElement","scrollToElementSmooth","minorSteps","MinorUpdatePopup","handleSkipMinorUpdate","handleExploreMinorFeature","handleSecondaryMinorFeature","handlePreviousMinorUpdate","handleNextMinorUpdate","jsxs","Fragment","Joyride","VideoModal"],"mappings":"icASMA,GAEF,CAAC,CACJ,SAAAC,EACA,qBAAAC,GACA,wBAAAC,GACA,iBAAAC,GACA,4BAAAC,GACA,iCAAAC,GACA,OAAAC,GACA,OAAAC,EACA,QAAAC,EACA,oBAAAC,EACA,yBAAAC,CACD,IAAM,CACL,KAAM,CACL,oBAAAC,EACA,oBAAAC,EACA,UAAAC,EACA,oBAAAC,CAAA,EACGC,2BAAwB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D,CAEF"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),u=require("react"),C=require("../../assets/icons/chevronRight2.svg.js"),$=require("../../assets/icons/play.svg.js"),w=require("./constants/index.js"),Q=require("./styles/majorPopup.styles.js"),Y=require("./utils/htmlHelpers.js"),y=require("./utils/animationHelpers.js"),x=require("./utils/elementHelpers.js"),Z=({feature:n,currentIndex:d,totalFeatures:h,onSkip:B,onExplore:T,onPrevious:O,onNext:R,setIsClosing:m,onSecondaryAction:A,ratio:L="16:9",padding:S})=>{const[M,j]=u.useState(!1),[k,V]=u.useState(!1),[W,g]=u.useState(""),l=u.useRef(null),[E,b]=u.useState(!1),[_,v]=u.useState(!0),p=u.useRef(null),[U,i]=u.useState(L),q=u.useRef(null);u.useEffect(()=>{M&&V(!0)},[M]);const D=e=>{y.hideJoyrideArrow(l.current);const r=x.findWhatsNewButton();if(r&&l.current){const o=y.calculateCloseTransform(l.current,r);g(o)}else g("scale(0)");m?.(!0),j(!0),y.executeAfterAnimation(e)},H=e=>{const r=e.currentTarget,o=r.naturalWidth,c=r.naturalHeight;if(o&&c){const a=o/c;Math.abs(a-16/9)<.1?i("16:9"):Math.abs(a-1)<.1?i("1:1"):Math.abs(a-4/3)<.1?i("4:3"):a>1.5?i("16:9"):a<.9?i("4:3"):i("1:1")}},N=e=>{const r=e.currentTarget,o=r.videoWidth,c=r.videoHeight;if(o&&c){const a=o/c;Math.abs(a-16/9)<.1?i("16:9"):Math.abs(a-1)<.1?i("1:1"):Math.abs(a-4/3)<.1?i("4:3"):a>1.5?i("16:9"):a<.9?i("4:3"):i("1:1")}},I=()=>{const e=n.primaryButton?.action;if(e==="Open link"){const o=n.primaryButton?.redirectionUrl||n.redirectUrl;o&&o.startsWith("http")&&window.open(o,"_blank","noopener,noreferrer")}T(e),y.hideJoyrideArrow(l.current);const r=x.findWhatsNewButton();if(r&&l.current){const o=y.calculateCloseTransform(l.current,r);g(o)}else g("scale(0)");m?.(!0),j(!0)},J=e=>{e.preventDefault(),e.stopPropagation(),D(B)},X=e=>{e.preventDefault(),e.stopPropagation(),O()},K=e=>{e.preventDefault(),e.stopPropagation(),R()},P=e=>{e.preventDefault(),e.stopPropagation();const r=n.secondaryButton?.action,o=A||B;let c=null;if(r==="Play Video")T("Play Video");else if(r==="Open link"){const f=n.secondaryButton?.redirectionUrl;f&&(f.startsWith("http")?window.open(f,"_blank","noopener,noreferrer"):c=f)}y.hideJoyrideArrow(l.current);const a=x.findWhatsNewButton();if(a&&l.current){const f=y.calculateCloseTransform(l.current,a);g(f)}else g("scale(0)");m?.(!0),j(!0),y.executeAfterAnimation(async()=>{await o(),c&&(window.location.href=c)})},t=Q.getMajorPopupStyles(k,W,U,S||n.padding,n.primaryButton?.style,n.secondaryButton?.style),z=e=>{e.stopPropagation(),p.current&&(p.current.paused?(p.current.play(),b(!1),v(!1)):(p.current.pause(),b(!0),v(!0)))},G=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),p.current&&(p.current.paused?(p.current.play(),b(!1),v(!1)):(p.current.pause(),b(!0),v(!0))))};return s.jsx("div",{style:t.outerWrapper,children:s.jsxs("div",{ref:l,style:{...t.container,opacity:k?0:1,transition:"opacity 0.2s ease-in-out, transform 0.3s ease"},children:[s.jsx("style",{children:`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),u=require("react"),C=require("../../assets/icons/chevronRight2.svg.js"),$=require("../../assets/icons/play.svg.js"),P=require("./constants/index.js"),Q=require("./styles/majorPopup.styles.js"),Y=require("./utils/htmlHelpers.js"),y=require("./utils/animationHelpers.js"),x=require("./utils/elementHelpers.js"),Z=({feature:n,currentIndex:d,totalFeatures:h,onSkip:B,onExplore:w,onPrevious:O,onNext:R,setIsClosing:m,onSecondaryAction:A,ratio:L="16:9",padding:S})=>{const[T,j]=u.useState(!1),[M,W]=u.useState(!1),[_,g]=u.useState(""),l=u.useRef(null),[k,b]=u.useState(!1),[U,v]=u.useState(!0),p=u.useRef(null),[V,i]=u.useState(L),q=u.useRef(null);u.useEffect(()=>{T&&W(!0)},[T]);const D=e=>{y.hideJoyrideArrow(l.current);const r=x.findWhatsNewButton();if(r&&l.current){const o=y.calculateCloseTransform(l.current,r);g(o)}else g("scale(0)");m?.(!0),j(!0),y.executeAfterAnimation(e)},H=e=>{const r=e.currentTarget,o=r.naturalWidth,c=r.naturalHeight;if(o&&c){const a=o/c;Math.abs(a-16/9)<.1?i("16:9"):Math.abs(a-1)<.1?i("1:1"):Math.abs(a-4/3)<.1?i("4:3"):a>1.5?i("16:9"):a<.9?i("4:3"):i("1:1")}},N=e=>{const r=e.currentTarget,o=r.videoWidth,c=r.videoHeight;if(o&&c){const a=o/c;Math.abs(a-16/9)<.1?i("16:9"):Math.abs(a-1)<.1?i("1:1"):Math.abs(a-4/3)<.1?i("4:3"):a>1.5?i("16:9"):a<.9?i("4:3"):i("1:1")}},I=()=>{const e=n.primaryButton?.action;if(e==="Open link"){const o=n.primaryButton?.redirectionUrl||n.redirectUrl;o&&o.startsWith("http")&&window.open(o,"_blank","noopener,noreferrer")}w(e),y.hideJoyrideArrow(l.current);const r=x.findWhatsNewButton();if(r&&l.current){const o=y.calculateCloseTransform(l.current,r);g(o)}else g("scale(0)");m?.(!0),j(!0)},J=e=>{e.preventDefault(),e.stopPropagation(),D(B)},X=e=>{e.preventDefault(),e.stopPropagation(),O()},K=e=>{e.preventDefault(),e.stopPropagation(),R()},E=e=>{e.preventDefault(),e.stopPropagation();const r=n.secondaryButton?.action,o=A||B;let c=null;if(r==="Open link"){const f=n.secondaryButton?.redirectionUrl;f&&(f.startsWith("http")?window.open(f,"_blank","noopener,noreferrer"):c=f)}y.hideJoyrideArrow(l.current);const a=x.findWhatsNewButton();if(a&&l.current){const f=y.calculateCloseTransform(l.current,a);g(f)}else g("scale(0)");m?.(!0),j(!0),y.executeAfterAnimation(async()=>{await o(r),c&&(window.location.href=c)})},t=Q.getMajorPopupStyles(M,_,V,S||n.padding,n.primaryButton?.style,n.secondaryButton?.style),z=e=>{e.stopPropagation(),p.current&&(p.current.paused?(p.current.play(),b(!1),v(!1)):(p.current.pause(),b(!0),v(!0)))},G=e=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),e.stopPropagation(),p.current&&(p.current.paused?(p.current.play(),b(!1),v(!1)):(p.current.pause(),b(!0),v(!0))))};return s.jsx("div",{style:t.outerWrapper,children:s.jsxs("div",{ref:l,style:{...t.container,opacity:M?0:1,transition:"opacity 0.2s ease-in-out, transform 0.3s ease"},children:[s.jsx("style",{children:`
2
2
  [data-popup-content] ul {
3
3
  margin: 0;
4
4
  padding-left: 20px;
@@ -11,5 +11,5 @@
11
11
  line-height: 16px;
12
12
  font-family: Inter, sans-serif;
13
13
  }
14
- `}),s.jsxs("div",{style:t.contentWrapper,children:[s.jsx("div",{style:t.imageContainer,children:n.productVideo?s.jsxs(s.Fragment,{children:[s.jsx("video",{ref:p,src:n.productVideo,style:t.image,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,controls:!0,"aria-label":`Product video for ${n.title}`,onLoadedMetadata:N}),(E||_)&&s.jsx("div",{style:t.videoOverlay,onClick:z,role:"button",tabIndex:0,"aria-label":E?"Play video":"Pause video",onKeyDown:G,children:s.jsx($.default,{width:20,height:20})})]}):n.displayImage?s.jsx("img",{ref:q,src:n.displayImage,alt:n.title,style:t.image,onLoad:H,onError:e=>{n.image&&(e.target.src=n.image)}}):s.jsx("div",{style:t.imagePlaceholder,children:w.TEXT.FEATURE_PREVIEW_PLACEHOLDER})}),s.jsxs("div",{style:t.contentContainer,children:[s.jsx("div",{style:t.skipButtonContainer,children:s.jsx("button",{onClick:J,style:t.skipButton.base,onMouseEnter:e=>Object.assign(e.currentTarget.style,t.skipButton.hover),onMouseLeave:e=>Object.assign(e.currentTarget.style,t.skipButton.base),"aria-label":"Skip feature announcement",children:"Skip"})}),s.jsx("h3",{style:t.title,children:n.title}),s.jsx("div",{"data-popup-content":!0,style:t.content,dangerouslySetInnerHTML:{__html:Y.decodeHTMLEntities(n.content||n.body||"")}}),s.jsxs("div",{style:t.actionsWrapper,children:[s.jsxs("div",{style:t.buttonsGroup,children:[s.jsx("button",{onClick:I,style:t.exploreButton.base,onMouseEnter:e=>Object.assign(e.currentTarget.style,t.exploreButton.hover),onMouseLeave:e=>Object.assign(e.currentTarget.style,t.exploreButton.base),children:n.primaryButton?.text||n.buttonText||w.TEXT.DEFAULT_BUTTON_TEXT}),n.secondaryButton?.text&&(n.secondaryButton?.redirectionUrl&&n.secondaryButton?.action!=="Play Video"?s.jsx("a",{href:n.secondaryButton.redirectionUrl,target:n.secondaryButton.redirectionUrl.startsWith("http")?"_blank":"_self",rel:n.secondaryButton.redirectionUrl.startsWith("http")?"noopener noreferrer":void 0,onClick:P,style:t.secondaryButton.base,onMouseEnter:e=>Object.assign(e.currentTarget.style,t.secondaryButton.hover),onMouseLeave:e=>Object.assign(e.currentTarget.style,t.secondaryButton.base),children:n.secondaryButton.text}):s.jsx("button",{onClick:P,style:t.secondaryButton.base,onMouseEnter:e=>Object.assign(e.currentTarget.style,t.secondaryButton.hover),onMouseLeave:e=>Object.assign(e.currentTarget.style,t.secondaryButton.base),children:n.secondaryButton.text}))]}),h>1&&s.jsxs("div",{style:t.navigationContainer,children:[s.jsx("button",{onClick:X,disabled:d===0,style:t.navigationButton(d===0).base,onMouseEnter:e=>{d!==0&&Object.assign(e.currentTarget.style,t.navigationButton(!1).hover)},onMouseLeave:e=>{d!==0&&Object.assign(e.currentTarget.style,t.navigationButton(!1).base)},"aria-label":"Previous feature",children:s.jsx(C.default,{style:{transform:"rotate(180deg)"}})}),s.jsx("button",{onClick:K,disabled:d===h-1,style:t.navigationButton(d===h-1).base,onMouseEnter:e=>{d!==h-1&&Object.assign(e.currentTarget.style,t.navigationButton(!1).hover)},onMouseLeave:e=>{d!==h-1&&Object.assign(e.currentTarget.style,t.navigationButton(d===h-1).base)},"aria-label":"Next feature",children:s.jsx(C.default,{})})]})]})]})]})]})})};exports.default=Z;
14
+ `}),s.jsxs("div",{style:t.contentWrapper,children:[s.jsx("div",{style:t.imageContainer,children:n.productVideo?s.jsxs(s.Fragment,{children:[s.jsx("video",{ref:p,src:n.productVideo,style:t.image,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,controls:!0,"aria-label":`Product video for ${n.title}`,onLoadedMetadata:N}),(k||U)&&s.jsx("div",{style:t.videoOverlay,onClick:z,role:"button",tabIndex:0,"aria-label":k?"Play video":"Pause video",onKeyDown:G,children:s.jsx($.default,{width:20,height:20})})]}):n.displayImage?s.jsx("img",{ref:q,src:n.displayImage,alt:n.title,style:t.image,onLoad:H,onError:e=>{n.image&&(e.target.src=n.image)}}):s.jsx("div",{style:t.imagePlaceholder,children:P.TEXT.FEATURE_PREVIEW_PLACEHOLDER})}),s.jsxs("div",{style:t.contentContainer,children:[s.jsx("div",{style:t.skipButtonContainer,children:s.jsx("button",{onClick:J,style:t.skipButton.base,onMouseEnter:e=>Object.assign(e.currentTarget.style,t.skipButton.hover),onMouseLeave:e=>Object.assign(e.currentTarget.style,t.skipButton.base),"aria-label":"Skip feature announcement",children:"Skip"})}),s.jsx("h3",{style:t.title,children:n.title}),s.jsx("div",{"data-popup-content":!0,style:t.content,dangerouslySetInnerHTML:{__html:Y.decodeHTMLEntities(n.content||n.body||"")}}),s.jsxs("div",{style:t.actionsWrapper,children:[s.jsxs("div",{style:t.buttonsGroup,children:[s.jsx("button",{onClick:I,style:t.exploreButton.base,onMouseEnter:e=>Object.assign(e.currentTarget.style,t.exploreButton.hover),onMouseLeave:e=>Object.assign(e.currentTarget.style,t.exploreButton.base),children:n.primaryButton?.text||n.buttonText||P.TEXT.DEFAULT_BUTTON_TEXT}),n.secondaryButton?.text&&(n.secondaryButton?.redirectionUrl&&n.secondaryButton?.action!=="Play Video"?s.jsx("a",{href:n.secondaryButton.redirectionUrl,target:n.secondaryButton.redirectionUrl.startsWith("http")?"_blank":"_self",rel:n.secondaryButton.redirectionUrl.startsWith("http")?"noopener noreferrer":void 0,onClick:E,style:t.secondaryButton.base,onMouseEnter:e=>Object.assign(e.currentTarget.style,t.secondaryButton.hover),onMouseLeave:e=>Object.assign(e.currentTarget.style,t.secondaryButton.base),children:n.secondaryButton.text}):s.jsx("button",{onClick:E,style:t.secondaryButton.base,onMouseEnter:e=>Object.assign(e.currentTarget.style,t.secondaryButton.hover),onMouseLeave:e=>Object.assign(e.currentTarget.style,t.secondaryButton.base),children:n.secondaryButton.text}))]}),h>1&&s.jsxs("div",{style:t.navigationContainer,children:[s.jsx("button",{onClick:X,disabled:d===0,style:t.navigationButton(d===0).base,onMouseEnter:e=>{d!==0&&Object.assign(e.currentTarget.style,t.navigationButton(!1).hover)},onMouseLeave:e=>{d!==0&&Object.assign(e.currentTarget.style,t.navigationButton(!1).base)},"aria-label":"Previous feature",children:s.jsx(C.default,{style:{transform:"rotate(180deg)"}})}),s.jsx("button",{onClick:K,disabled:d===h-1,style:t.navigationButton(d===h-1).base,onMouseEnter:e=>{d!==h-1&&Object.assign(e.currentTarget.style,t.navigationButton(!1).hover)},onMouseLeave:e=>{d!==h-1&&Object.assign(e.currentTarget.style,t.navigationButton(d===h-1).base)},"aria-label":"Next feature",children:s.jsx(C.default,{})})]})]})]})]})]})})};exports.default=Z;
15
15
  //# sourceMappingURL=MajorUpdatePopup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MajorUpdatePopup.js","sources":["../../../../src/components/feature-announcements/MajorUpdatePopup.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport Arrow from '../../assets/icons/chevronRight2.svg';\nimport PlayIcon from '../../assets/icons/play.svg';\nimport { TEXT } from './constants';\nimport { getMajorPopupStyles } from './styles';\nimport { MajorUpdatePopupProps } from './types';\nimport {\n\tcalculateCloseTransform,\n\tdecodeHTMLEntities,\n\texecuteAfterAnimation,\n\tfindWhatsNewButton,\n\thideJoyrideArrow,\n} from './utils';\n\nconst MajorUpdatePopup: React.FC<MajorUpdatePopupProps> = ({\n\tfeature,\n\tcurrentIndex,\n\ttotalFeatures,\n\tonSkip,\n\tonExplore,\n\tonPrevious,\n\tonNext,\n\tsetIsClosing: setIsClosingParent,\n\tonSecondaryAction,\n\tratio = '16:9',\n\tpadding,\n}) => {\n\tconst [isClosing, setIsClosing] = useState(false);\n\tconst [startAnimation, setStartAnimation] = useState(false);\n\tconst [transform, setTransform] = useState('');\n\tconst popupRef = useRef<HTMLDivElement>(null);\n\tconst [isVideoPaused, setIsVideoPaused] = useState(false);\n\tconst [showPlayIcon, setShowPlayIcon] = useState(true);\n\tconst videoRef = useRef<HTMLVideoElement>(null);\n\tconst [imageAspectRatio, setImageAspectRatio] = useState<\n\t\t'16:9' | '1:1' | '4:3'\n\t>(ratio);\n\n\tconst imageRef = useRef<HTMLImageElement>(null);\n\n\tuseEffect(() => {\n\t\tif (isClosing) {\n\t\t\t// Start the shrink animation immediately\n\t\t\tsetStartAnimation(true);\n\t\t}\n\t}, [isClosing]);\n\n\tconst handleClose = (callback: () => Promise<void> | void): void => {\n\t\thideJoyrideArrow(popupRef.current);\n\n\t\tconst targetButton = findWhatsNewButton();\n\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t\texecuteAfterAnimation(callback);\n\t};\n\n\tconst handleImageLoad = (e: React.SyntheticEvent<HTMLImageElement>) => {\n\t\tconst img = e.currentTarget;\n\t\tconst width = img.naturalWidth;\n\t\tconst height = img.naturalHeight;\n\n\t\tif (width && height) {\n\t\t\tconst aspectRatio = width / height;\n\n\t\t\t// Determine closest predefined ratio\n\t\t\tif (Math.abs(aspectRatio - 16 / 9) < 0.1) {\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (Math.abs(aspectRatio - 1) < 0.1) {\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t} else if (Math.abs(aspectRatio - 4 / 3) < 0.1) {\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else if (aspectRatio > 1.5) {\n\t\t\t\t// Wide images default to 16:9\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (aspectRatio < 0.9) {\n\t\t\t\t// Tall images default to 4:3\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else {\n\t\t\t\t// Close to square, use 1:1\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleVideoLoadedMetadata = (\n\t\te: React.SyntheticEvent<HTMLVideoElement>,\n\t) => {\n\t\tconst video = e.currentTarget;\n\t\tconst width = video.videoWidth;\n\t\tconst height = video.videoHeight;\n\n\t\tif (width && height) {\n\t\t\tconst aspectRatio = width / height;\n\n\t\t\tif (Math.abs(aspectRatio - 16 / 9) < 0.1) {\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (Math.abs(aspectRatio - 1) < 0.1) {\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t} else if (Math.abs(aspectRatio - 4 / 3) < 0.1) {\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else if (aspectRatio > 1.5) {\n\t\t\t\t// Wide videos default to 16:9\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (aspectRatio < 0.9) {\n\t\t\t\t// Tall videos default to 4:3\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else {\n\t\t\t\t// Close to square, use 1:1\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleExplore = (): void => {\n\t\tconst action = feature.primaryButton?.action;\n\n\t\tif (action === 'Open link') {\n\t\t\tconst url = feature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tonExplore(action);\n\n\t\t// Run closing animation in background\n\t\thideJoyrideArrow(popupRef.current);\n\t\tconst targetButton = findWhatsNewButton();\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t};\n\n\tconst handleSkipClick = (e: React.MouseEvent<HTMLButtonElement>): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\thandleClose(onSkip);\n\t};\n\n\tconst handlePreviousClick = (\n\t\te: React.MouseEvent<HTMLButtonElement>,\n\t): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tonPrevious();\n\t};\n\n\tconst handleNextClick = (e: React.MouseEvent<HTMLButtonElement>): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tonNext();\n\t};\n\n\tconst handleSecondaryAction = (e: React.MouseEvent): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tconst action = feature.secondaryButton?.action;\n\t\tconst closeCallback = onSecondaryAction || onSkip;\n\t\tlet internalUrl: string | null = null;\n\n\t\t// Handle based on action type\n\t\tif (action === 'Play Video') {\n\t\t\tonExplore('Play Video');\n\t\t} else if (action === 'Open link') {\n\t\t\tconst url = feature.secondaryButton?.redirectionUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t} else {\n\t\t\t\t\tinternalUrl = url;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (action === 'Close popup' || action === '') {\n\t\t\t// Just close the popup (empty action also closes)\n\t\t\t// callback is executed after closing animation completes\n\t\t}\n\n\t\t// Always close popup after secondary action\n\t\thideJoyrideArrow(popupRef.current);\n\t\tconst targetButton = findWhatsNewButton();\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t\texecuteAfterAnimation(async () => {\n\t\t\tawait closeCallback();\n\t\t\tif (internalUrl) {\n\t\t\t\twindow.location.href = internalUrl;\n\t\t\t}\n\t\t});\n\t};\n\n\tconst styles = getMajorPopupStyles(\n\t\tstartAnimation,\n\t\ttransform,\n\t\timageAspectRatio,\n\t\tpadding || feature.padding,\n\t\tfeature.primaryButton?.style,\n\t\tfeature.secondaryButton?.style,\n\t);\n\n\tconst handleVideoClick = (e: React.MouseEvent) => {\n\t\te.stopPropagation();\n\t\tif (videoRef.current) {\n\t\t\tif (videoRef.current.paused) {\n\t\t\t\tvideoRef.current.play();\n\t\t\t\tsetIsVideoPaused(false);\n\t\t\t\tsetShowPlayIcon(false);\n\t\t\t} else {\n\t\t\t\tvideoRef.current.pause();\n\t\t\t\tsetIsVideoPaused(true);\n\t\t\t\tsetShowPlayIcon(true);\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleVideoKeyDown = (e: React.KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tif (videoRef.current) {\n\t\t\t\tif (videoRef.current.paused) {\n\t\t\t\t\tvideoRef.current.play();\n\t\t\t\t\tsetIsVideoPaused(false);\n\t\t\t\t\tsetShowPlayIcon(false);\n\t\t\t\t} else {\n\t\t\t\t\tvideoRef.current.pause();\n\t\t\t\t\tsetIsVideoPaused(true);\n\t\t\t\t\tsetShowPlayIcon(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<div style={styles.outerWrapper}>\n\t\t\t<div\n\t\t\t\tref={popupRef}\n\t\t\t\tstyle={{\n\t\t\t\t\t...styles.container,\n\t\t\t\t\topacity: startAnimation ? 0 : 1,\n\t\t\t\t\ttransition: 'opacity 0.2s ease-in-out, transform 0.3s ease',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<style>{`\n\t\t\t\t[data-popup-content] ul {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\tlist-style-type: disc;\n\t\t\t\t}\n\t\t\t\t[data-popup-content] ul li {\n\t\t\t\t\tmargin-bottom: 8px;\n\t\t\t\t\tcolor: rgba(255, 255, 255, 0.8);\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\tline-height: 16px;\n\t\t\t\t\tfont-family: Inter, sans-serif;\n\t\t\t\t}\n\t\t\t`}</style>\n\t\t\t\t{/* Content Wrapper - contains image and text side by side */}\n\t\t\t\t<div style={styles.contentWrapper}>\n\t\t\t\t\t{/* Image/Video section */}\n\t\t\t\t\t<div style={styles.imageContainer}>\n\t\t\t\t\t\t{feature.productVideo ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<video\n\t\t\t\t\t\t\t\t\tref={videoRef}\n\t\t\t\t\t\t\t\t\tsrc={feature.productVideo}\n\t\t\t\t\t\t\t\t\tstyle={styles.image}\n\t\t\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\t\t\tplaysInline\n\t\t\t\t\t\t\t\t\tcontrols\n\t\t\t\t\t\t\t\t\taria-label={`Product video for ${feature.title}`}\n\t\t\t\t\t\t\t\t\tonLoadedMetadata={handleVideoLoadedMetadata}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{(isVideoPaused || showPlayIcon) && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={styles.videoOverlay}\n\t\t\t\t\t\t\t\t\t\tonClick={handleVideoClick}\n\t\t\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t\t\t\taria-label={isVideoPaused ? 'Play video' : 'Pause video'}\n\t\t\t\t\t\t\t\t\t\tonKeyDown={handleVideoKeyDown}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<PlayIcon width={20} height={20} />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : feature.displayImage ? (\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tref={imageRef}\n\t\t\t\t\t\t\t\tsrc={feature.displayImage}\n\t\t\t\t\t\t\t\talt={feature.title}\n\t\t\t\t\t\t\t\tstyle={styles.image}\n\t\t\t\t\t\t\t\tonLoad={handleImageLoad}\n\t\t\t\t\t\t\t\tonError={(e) => {\n\t\t\t\t\t\t\t\t\tif (feature.image) {\n\t\t\t\t\t\t\t\t\t\t(e.target as HTMLImageElement).src = feature.image;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div style={styles.imagePlaceholder}>\n\t\t\t\t\t\t\t\t{TEXT.FEATURE_PREVIEW_PLACEHOLDER}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Content section */}\n\t\t\t\t\t<div style={styles.contentContainer}>\n\t\t\t\t\t\t{/* Skip Button at top-right */}\n\t\t\t\t\t\t<div style={styles.skipButtonContainer}>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tonClick={handleSkipClick}\n\t\t\t\t\t\t\t\tstyle={styles.skipButton.base}\n\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\tObject.assign(e.currentTarget.style, styles.skipButton.hover)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\tObject.assign(e.currentTarget.style, styles.skipButton.base)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-label=\"Skip feature announcement\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tSkip\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{/* Title */}\n\t\t\t\t\t\t<h3 style={styles.title}>{feature.title}</h3>\n\n\t\t\t\t\t\t{/* Content/Description */}\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tdata-popup-content\n\t\t\t\t\t\t\tstyle={styles.content}\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t\t\t__html: decodeHTMLEntities(\n\t\t\t\t\t\t\t\t\tfeature.content || feature.body || '',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{/* Actions - Buttons and Navigation */}\n\t\t\t\t\t\t<div style={styles.actionsWrapper}>\n\t\t\t\t\t\t\t<div style={styles.buttonsGroup}>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tonClick={handleExplore}\n\t\t\t\t\t\t\t\t\tstyle={styles.exploreButton.base}\n\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\tstyles.exploreButton.hover,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\tstyles.exploreButton.base,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{feature.primaryButton?.text ||\n\t\t\t\t\t\t\t\t\t\tfeature.buttonText ||\n\t\t\t\t\t\t\t\t\t\tTEXT.DEFAULT_BUTTON_TEXT}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t{/* Secondary Button (Optional) */}\n\t\t\t\t\t\t\t\t{feature.secondaryButton?.text &&\n\t\t\t\t\t\t\t\t\t(feature.secondaryButton?.redirectionUrl &&\n\t\t\t\t\t\t\t\t\tfeature.secondaryButton?.action !== 'Play Video' ? (\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={feature.secondaryButton.redirectionUrl}\n\t\t\t\t\t\t\t\t\t\t\ttarget={\n\t\t\t\t\t\t\t\t\t\t\t\tfeature.secondaryButton.redirectionUrl.startsWith(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'http',\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '_blank'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '_self'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\trel={\n\t\t\t\t\t\t\t\t\t\t\t\tfeature.secondaryButton.redirectionUrl.startsWith(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'http',\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'noopener noreferrer'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonClick={handleSecondaryAction}\n\t\t\t\t\t\t\t\t\t\t\tstyle={styles.secondaryButton.base}\n\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.hover,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.base,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{feature.secondaryButton.text}\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\tonClick={handleSecondaryAction}\n\t\t\t\t\t\t\t\t\t\t\tstyle={styles.secondaryButton.base}\n\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.hover,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.base,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{feature.secondaryButton.text}\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t{/* Navigation arrows */}\n\t\t\t\t\t\t\t{totalFeatures > 1 && (\n\t\t\t\t\t\t\t\t<div style={styles.navigationContainer}>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tonClick={handlePreviousClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={currentIndex === 0}\n\t\t\t\t\t\t\t\t\t\tstyle={styles.navigationButton(currentIndex === 0).base}\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).hover,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).base,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\taria-label=\"Previous feature\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Arrow style={{ transform: 'rotate(180deg)' }} />\n\t\t\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tonClick={handleNextClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={currentIndex === totalFeatures - 1}\n\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(\n\t\t\t\t\t\t\t\t\t\t\t\tcurrentIndex === totalFeatures - 1,\n\t\t\t\t\t\t\t\t\t\t\t).base\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== totalFeatures - 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).hover,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== totalFeatures - 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentIndex === totalFeatures - 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t).base,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\taria-label=\"Next feature\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Arrow />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t{/* Close contentWrapper */}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default MajorUpdatePopup;\n"],"names":["MajorUpdatePopup","feature","currentIndex","totalFeatures","onSkip","onExplore","onPrevious","onNext","setIsClosingParent","onSecondaryAction","ratio","padding","isClosing","setIsClosing","useState","startAnimation","setStartAnimation","transform","setTransform","popupRef","useRef","isVideoPaused","setIsVideoPaused","showPlayIcon","setShowPlayIcon","videoRef","imageAspectRatio","setImageAspectRatio","imageRef","useEffect","handleClose","callback","hideJoyrideArrow","targetButton","findWhatsNewButton","transformValue","calculateCloseTransform","executeAfterAnimation","handleImageLoad","img","width","height","aspectRatio","handleVideoLoadedMetadata","video","handleExplore","action","url","handleSkipClick","handlePreviousClick","handleNextClick","handleSecondaryAction","closeCallback","internalUrl","styles","getMajorPopupStyles","handleVideoClick","handleVideoKeyDown","jsx","jsxs","Fragment","PlayIcon","TEXT","decodeHTMLEntities","Arrow"],"mappings":"scAcMA,EAAoD,CAAC,CAC1D,QAAAC,EACA,aAAAC,EACA,cAAAC,EACA,OAAAC,EACA,UAAAC,EACA,WAAAC,EACA,OAAAC,EACA,aAAcC,EACd,kBAAAC,EACA,MAAAC,EAAQ,OACR,QAAAC,CACD,IAAM,CACL,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAK,EAC1C,CAACC,EAAgBC,CAAiB,EAAIF,EAAAA,SAAS,EAAK,EACpD,CAACG,EAAWC,CAAY,EAAIJ,EAAAA,SAAS,EAAE,EACvCK,EAAWC,EAAAA,OAAuB,IAAI,EACtC,CAACC,EAAeC,CAAgB,EAAIR,EAAAA,SAAS,EAAK,EAClD,CAACS,EAAcC,CAAe,EAAIV,EAAAA,SAAS,EAAI,EAC/CW,EAAWL,EAAAA,OAAyB,IAAI,EACxC,CAACM,EAAkBC,CAAmB,EAAIb,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C1B,EAEH,EAGCnD,EAAgB,GAChBwD,EAAAA,KAAC,MAAA,CAAI,MAAOL,EAAO,oBAClB,SAAA,CAAAI,EAAAA,IAAC,SAAA,CACA,QAAST,EACT,SAAU/C,IAAiB,EAC3B,MAAOoD,EAAO,iBAAiBpD,IAAiB,CAAC,EAAE,KACnD,aAAe,GAAM,CAChBA,IAAiB,GACpB,OAAO,OACN,EAAE,cAAc,MAChBoD,EAAO,iBAAiB,EAAK,EAAE,KAAA,CAGlC,EACA,aAAe,GAAM,CAChBpD,IAAiB,GACpB,OAAO,OACN,EAAE,cAAc,MAChBoD,EAAO,iBAAiB,EAAK,EAAE,IAAA,CAGlC,EACA,aAAW,mBAEX,eAACU,UAAA,CAAM,MAAO,CAAE,UAAW,iBAAiB,CAAG,CAAA,CAAA,EAGhDN,EAAAA,IAAC,SAAA,CACA,QAASR,EACT,SAAUhD,IAAiBC,EAAgB,EAC3C,MACCmD,EAAO,iBACNpD,IAAiBC,EAAgB,CAAA,EAChC,KAEH,aAAe,GAAM,CAChBD,IAAiBC,EAAgB,GACpC,OAAO,OACN,EAAE,cAAc,MAChBmD,EAAO,iBAAiB,EAAK,EAAE,KAAA,CAGlC,EACA,aAAe,GAAM,CAChBpD,IAAiBC,EAAgB,GACpC,OAAO,OACN,EAAE,cAAc,MAChBmD,EAAO,iBACNpD,IAAiBC,EAAgB,CAAA,EAChC,IAAA,CAGL,EACA,aAAW,eAEX,eAAC6D,EAAAA,QAAA,CAAA,CAAM,CAAA,CAAA,CACR,CAAA,CACD,CAAA,CAAA,CAEF,CAAA,CAAA,CACD,CAAA,CAAA,CAED,CAAA,CAAA,CAAA,EAEF,CAEF"}
1
+ {"version":3,"file":"MajorUpdatePopup.js","sources":["../../../../src/components/feature-announcements/MajorUpdatePopup.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport Arrow from '../../assets/icons/chevronRight2.svg';\nimport PlayIcon from '../../assets/icons/play.svg';\nimport { TEXT } from './constants';\nimport { getMajorPopupStyles } from './styles';\nimport { MajorUpdatePopupProps } from './types';\nimport {\n\tcalculateCloseTransform,\n\tdecodeHTMLEntities,\n\texecuteAfterAnimation,\n\tfindWhatsNewButton,\n\thideJoyrideArrow,\n} from './utils';\n\nconst MajorUpdatePopup: React.FC<MajorUpdatePopupProps> = ({\n\tfeature,\n\tcurrentIndex,\n\ttotalFeatures,\n\tonSkip,\n\tonExplore,\n\tonPrevious,\n\tonNext,\n\tsetIsClosing: setIsClosingParent,\n\tonSecondaryAction,\n\tratio = '16:9',\n\tpadding,\n}) => {\n\tconst [isClosing, setIsClosing] = useState(false);\n\tconst [startAnimation, setStartAnimation] = useState(false);\n\tconst [transform, setTransform] = useState('');\n\tconst popupRef = useRef<HTMLDivElement>(null);\n\tconst [isVideoPaused, setIsVideoPaused] = useState(false);\n\tconst [showPlayIcon, setShowPlayIcon] = useState(true);\n\tconst videoRef = useRef<HTMLVideoElement>(null);\n\tconst [imageAspectRatio, setImageAspectRatio] = useState<\n\t\t'16:9' | '1:1' | '4:3'\n\t>(ratio);\n\n\tconst imageRef = useRef<HTMLImageElement>(null);\n\n\tuseEffect(() => {\n\t\tif (isClosing) {\n\t\t\t// Start the shrink animation immediately\n\t\t\tsetStartAnimation(true);\n\t\t}\n\t}, [isClosing]);\n\n\tconst handleClose = (callback: () => Promise<void> | void): void => {\n\t\thideJoyrideArrow(popupRef.current);\n\n\t\tconst targetButton = findWhatsNewButton();\n\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t\texecuteAfterAnimation(callback);\n\t};\n\n\tconst handleImageLoad = (e: React.SyntheticEvent<HTMLImageElement>) => {\n\t\tconst img = e.currentTarget;\n\t\tconst width = img.naturalWidth;\n\t\tconst height = img.naturalHeight;\n\n\t\tif (width && height) {\n\t\t\tconst aspectRatio = width / height;\n\n\t\t\t// Determine closest predefined ratio\n\t\t\tif (Math.abs(aspectRatio - 16 / 9) < 0.1) {\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (Math.abs(aspectRatio - 1) < 0.1) {\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t} else if (Math.abs(aspectRatio - 4 / 3) < 0.1) {\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else if (aspectRatio > 1.5) {\n\t\t\t\t// Wide images default to 16:9\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (aspectRatio < 0.9) {\n\t\t\t\t// Tall images default to 4:3\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else {\n\t\t\t\t// Close to square, use 1:1\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleVideoLoadedMetadata = (\n\t\te: React.SyntheticEvent<HTMLVideoElement>,\n\t) => {\n\t\tconst video = e.currentTarget;\n\t\tconst width = video.videoWidth;\n\t\tconst height = video.videoHeight;\n\n\t\tif (width && height) {\n\t\t\tconst aspectRatio = width / height;\n\n\t\t\tif (Math.abs(aspectRatio - 16 / 9) < 0.1) {\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (Math.abs(aspectRatio - 1) < 0.1) {\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t} else if (Math.abs(aspectRatio - 4 / 3) < 0.1) {\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else if (aspectRatio > 1.5) {\n\t\t\t\t// Wide videos default to 16:9\n\t\t\t\tsetImageAspectRatio('16:9');\n\t\t\t} else if (aspectRatio < 0.9) {\n\t\t\t\t// Tall videos default to 4:3\n\t\t\t\tsetImageAspectRatio('4:3');\n\t\t\t} else {\n\t\t\t\t// Close to square, use 1:1\n\t\t\t\tsetImageAspectRatio('1:1');\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleExplore = (): void => {\n\t\tconst action = feature.primaryButton?.action;\n\n\t\tif (action === 'Open link') {\n\t\t\tconst url = feature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tonExplore(action);\n\n\t\t// Run closing animation in background\n\t\thideJoyrideArrow(popupRef.current);\n\t\tconst targetButton = findWhatsNewButton();\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t};\n\n\tconst handleSkipClick = (e: React.MouseEvent<HTMLButtonElement>): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\thandleClose(onSkip);\n\t};\n\n\tconst handlePreviousClick = (\n\t\te: React.MouseEvent<HTMLButtonElement>,\n\t): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tonPrevious();\n\t};\n\n\tconst handleNextClick = (e: React.MouseEvent<HTMLButtonElement>): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\t\tonNext();\n\t};\n\n\tconst handleSecondaryAction = (e: React.MouseEvent): void => {\n\t\te.preventDefault();\n\t\te.stopPropagation();\n\n\t\tconst action = feature.secondaryButton?.action;\n\t\tconst closeCallback: (triggeredAction?: string) => Promise<void> | void =\n\t\t\tonSecondaryAction || onSkip;\n\t\tlet internalUrl: string | null = null;\n\n\t\t// Handle based on action type. 'Play Video' is opened by closeCallback so the\n\t\t// click is not attributed to the primary button via onExplore.\n\t\tif (action === 'Open link') {\n\t\t\tconst url = feature.secondaryButton?.redirectionUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t} else {\n\t\t\t\t\tinternalUrl = url;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (action === 'Close popup' || action === '') {\n\t\t\t// Just close the popup (empty action also closes)\n\t\t\t// callback is executed after closing animation completes\n\t\t}\n\n\t\t// Always close popup after secondary action\n\t\thideJoyrideArrow(popupRef.current);\n\t\tconst targetButton = findWhatsNewButton();\n\t\tif (targetButton && popupRef.current) {\n\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\tpopupRef.current,\n\t\t\t\ttargetButton,\n\t\t\t);\n\t\t\tsetTransform(transformValue);\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t\texecuteAfterAnimation(async () => {\n\t\t\tawait closeCallback(action);\n\t\t\tif (internalUrl) {\n\t\t\t\twindow.location.href = internalUrl;\n\t\t\t}\n\t\t});\n\t};\n\n\tconst styles = getMajorPopupStyles(\n\t\tstartAnimation,\n\t\ttransform,\n\t\timageAspectRatio,\n\t\tpadding || feature.padding,\n\t\tfeature.primaryButton?.style,\n\t\tfeature.secondaryButton?.style,\n\t);\n\n\tconst handleVideoClick = (e: React.MouseEvent) => {\n\t\te.stopPropagation();\n\t\tif (videoRef.current) {\n\t\t\tif (videoRef.current.paused) {\n\t\t\t\tvideoRef.current.play();\n\t\t\t\tsetIsVideoPaused(false);\n\t\t\t\tsetShowPlayIcon(false);\n\t\t\t} else {\n\t\t\t\tvideoRef.current.pause();\n\t\t\t\tsetIsVideoPaused(true);\n\t\t\t\tsetShowPlayIcon(true);\n\t\t\t}\n\t\t}\n\t};\n\n\tconst handleVideoKeyDown = (e: React.KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\tif (videoRef.current) {\n\t\t\t\tif (videoRef.current.paused) {\n\t\t\t\t\tvideoRef.current.play();\n\t\t\t\t\tsetIsVideoPaused(false);\n\t\t\t\t\tsetShowPlayIcon(false);\n\t\t\t\t} else {\n\t\t\t\t\tvideoRef.current.pause();\n\t\t\t\t\tsetIsVideoPaused(true);\n\t\t\t\t\tsetShowPlayIcon(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\treturn (\n\t\t<div style={styles.outerWrapper}>\n\t\t\t<div\n\t\t\t\tref={popupRef}\n\t\t\t\tstyle={{\n\t\t\t\t\t...styles.container,\n\t\t\t\t\topacity: startAnimation ? 0 : 1,\n\t\t\t\t\ttransition: 'opacity 0.2s ease-in-out, transform 0.3s ease',\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<style>{`\n\t\t\t\t[data-popup-content] ul {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\tlist-style-type: disc;\n\t\t\t\t}\n\t\t\t\t[data-popup-content] ul li {\n\t\t\t\t\tmargin-bottom: 8px;\n\t\t\t\t\tcolor: rgba(255, 255, 255, 0.8);\n\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\tline-height: 16px;\n\t\t\t\t\tfont-family: Inter, sans-serif;\n\t\t\t\t}\n\t\t\t`}</style>\n\t\t\t\t{/* Content Wrapper - contains image and text side by side */}\n\t\t\t\t<div style={styles.contentWrapper}>\n\t\t\t\t\t{/* Image/Video section */}\n\t\t\t\t\t<div style={styles.imageContainer}>\n\t\t\t\t\t\t{feature.productVideo ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<video\n\t\t\t\t\t\t\t\t\tref={videoRef}\n\t\t\t\t\t\t\t\t\tsrc={feature.productVideo}\n\t\t\t\t\t\t\t\t\tstyle={styles.image}\n\t\t\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\t\t\tplaysInline\n\t\t\t\t\t\t\t\t\tcontrols\n\t\t\t\t\t\t\t\t\taria-label={`Product video for ${feature.title}`}\n\t\t\t\t\t\t\t\t\tonLoadedMetadata={handleVideoLoadedMetadata}\n\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t{(isVideoPaused || showPlayIcon) && (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tstyle={styles.videoOverlay}\n\t\t\t\t\t\t\t\t\t\tonClick={handleVideoClick}\n\t\t\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t\t\t\t\t\taria-label={isVideoPaused ? 'Play video' : 'Pause video'}\n\t\t\t\t\t\t\t\t\t\tonKeyDown={handleVideoKeyDown}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<PlayIcon width={20} height={20} />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) : feature.displayImage ? (\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tref={imageRef}\n\t\t\t\t\t\t\t\tsrc={feature.displayImage}\n\t\t\t\t\t\t\t\talt={feature.title}\n\t\t\t\t\t\t\t\tstyle={styles.image}\n\t\t\t\t\t\t\t\tonLoad={handleImageLoad}\n\t\t\t\t\t\t\t\tonError={(e) => {\n\t\t\t\t\t\t\t\t\tif (feature.image) {\n\t\t\t\t\t\t\t\t\t\t(e.target as HTMLImageElement).src = feature.image;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<div style={styles.imagePlaceholder}>\n\t\t\t\t\t\t\t\t{TEXT.FEATURE_PREVIEW_PLACEHOLDER}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{/* Content section */}\n\t\t\t\t\t<div style={styles.contentContainer}>\n\t\t\t\t\t\t{/* Skip Button at top-right */}\n\t\t\t\t\t\t<div style={styles.skipButtonContainer}>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tonClick={handleSkipClick}\n\t\t\t\t\t\t\t\tstyle={styles.skipButton.base}\n\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\tObject.assign(e.currentTarget.style, styles.skipButton.hover)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\tObject.assign(e.currentTarget.style, styles.skipButton.base)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-label=\"Skip feature announcement\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tSkip\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{/* Title */}\n\t\t\t\t\t\t<h3 style={styles.title}>{feature.title}</h3>\n\n\t\t\t\t\t\t{/* Content/Description */}\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tdata-popup-content\n\t\t\t\t\t\t\tstyle={styles.content}\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t\t\t__html: decodeHTMLEntities(\n\t\t\t\t\t\t\t\t\tfeature.content || feature.body || '',\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t{/* Actions - Buttons and Navigation */}\n\t\t\t\t\t\t<div style={styles.actionsWrapper}>\n\t\t\t\t\t\t\t<div style={styles.buttonsGroup}>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tonClick={handleExplore}\n\t\t\t\t\t\t\t\t\tstyle={styles.exploreButton.base}\n\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\tstyles.exploreButton.hover,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\tstyles.exploreButton.base,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{feature.primaryButton?.text ||\n\t\t\t\t\t\t\t\t\t\tfeature.buttonText ||\n\t\t\t\t\t\t\t\t\t\tTEXT.DEFAULT_BUTTON_TEXT}\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t{/* Secondary Button (Optional) */}\n\t\t\t\t\t\t\t\t{feature.secondaryButton?.text &&\n\t\t\t\t\t\t\t\t\t(feature.secondaryButton?.redirectionUrl &&\n\t\t\t\t\t\t\t\t\tfeature.secondaryButton?.action !== 'Play Video' ? (\n\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\thref={feature.secondaryButton.redirectionUrl}\n\t\t\t\t\t\t\t\t\t\t\ttarget={\n\t\t\t\t\t\t\t\t\t\t\t\tfeature.secondaryButton.redirectionUrl.startsWith(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'http',\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t? '_blank'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: '_self'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\trel={\n\t\t\t\t\t\t\t\t\t\t\t\tfeature.secondaryButton.redirectionUrl.startsWith(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'http',\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'noopener noreferrer'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonClick={handleSecondaryAction}\n\t\t\t\t\t\t\t\t\t\t\tstyle={styles.secondaryButton.base}\n\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.hover,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.base,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{feature.secondaryButton.text}\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\tonClick={handleSecondaryAction}\n\t\t\t\t\t\t\t\t\t\t\tstyle={styles.secondaryButton.base}\n\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.hover,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) =>\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.secondaryButton.base,\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{feature.secondaryButton.text}\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t{/* Navigation arrows */}\n\t\t\t\t\t\t\t{totalFeatures > 1 && (\n\t\t\t\t\t\t\t\t<div style={styles.navigationContainer}>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tonClick={handlePreviousClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={currentIndex === 0}\n\t\t\t\t\t\t\t\t\t\tstyle={styles.navigationButton(currentIndex === 0).base}\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).hover,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).base,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\taria-label=\"Previous feature\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Arrow style={{ transform: 'rotate(180deg)' }} />\n\t\t\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tonClick={handleNextClick}\n\t\t\t\t\t\t\t\t\t\tdisabled={currentIndex === totalFeatures - 1}\n\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(\n\t\t\t\t\t\t\t\t\t\t\t\tcurrentIndex === totalFeatures - 1,\n\t\t\t\t\t\t\t\t\t\t\t).base\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== totalFeatures - 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(false).hover,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={(e) => {\n\t\t\t\t\t\t\t\t\t\t\tif (currentIndex !== totalFeatures - 1) {\n\t\t\t\t\t\t\t\t\t\t\t\tObject.assign(\n\t\t\t\t\t\t\t\t\t\t\t\t\te.currentTarget.style,\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyles.navigationButton(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentIndex === totalFeatures - 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t).base,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\taria-label=\"Next feature\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<Arrow />\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t{/* Close contentWrapper */}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default MajorUpdatePopup;\n"],"names":["MajorUpdatePopup","feature","currentIndex","totalFeatures","onSkip","onExplore","onPrevious","onNext","setIsClosingParent","onSecondaryAction","ratio","padding","isClosing","setIsClosing","useState","startAnimation","setStartAnimation","transform","setTransform","popupRef","useRef","isVideoPaused","setIsVideoPaused","showPlayIcon","setShowPlayIcon","videoRef","imageAspectRatio","setImageAspectRatio","imageRef","useEffect","handleClose","callback","hideJoyrideArrow","targetButton","findWhatsNewButton","transformValue","calculateCloseTransform","executeAfterAnimation","handleImageLoad","img","width","height","aspectRatio","handleVideoLoadedMetadata","video","handleExplore","action","url","handleSkipClick","handlePreviousClick","handleNextClick","handleSecondaryAction","closeCallback","internalUrl","styles","getMajorPopupStyles","handleVideoClick","handleVideoKeyDown","jsx","jsxs","Fragment","PlayIcon","TEXT","decodeHTMLEntities","Arrow"],"mappings":"scAcMA,EAAoD,CAAC,CAC1D,QAAAC,EACA,aAAAC,EACA,cAAAC,EACA,OAAAC,EACA,UAAAC,EACA,WAAAC,EACA,OAAAC,EACA,aAAcC,EACd,kBAAAC,EACA,MAAAC,EAAQ,OACR,QAAAC,CACD,IAAM,CACL,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAK,EAC1C,CAACC,EAAgBC,CAAiB,EAAIF,EAAAA,SAAS,EAAK,EACpD,CAACG,EAAWC,CAAY,EAAIJ,EAAAA,SAAS,EAAE,EACvCK,EAAWC,EAAAA,OAAuB,IAAI,EACtC,CAACC,EAAeC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Tag]:{value:"Module"}});const t=require("react/jsx-runtime"),a=require("react"),x=require("./constants/index.js"),C=require("./styles/minorPopup.styles.js"),S=require("./utils/htmlHelpers.js"),d=require("./utils/animationHelpers.js"),_=require("./utils/elementHelpers.js"),A=({feature:e,currentIndex:w,totalFeatures:B,onSkip:T,onExplore:u,onPrevious:P,onNext:b,setIsClosing:y})=>{const[m,p]=a.useState(!1),[h,E]=a.useState(!1),[f,c]=a.useState(""),r=a.useRef(null);a.useEffect(()=>{m&&E(!0)},[m]);const j=()=>{const o=e.primaryButton?.action;if(o==="Open link"){const i=e.primaryButton?.redirectionUrl||e.redirectUrl;i&&i.startsWith("http")&&window.open(i,"_blank","noopener,noreferrer")}if(u(o),d.hideJoyrideArrow(r.current),r.current&&e.featureTag){const i=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,l=document.querySelector(i);if(l){const s=d.calculateCloseTransform(r.current,l);c(s)}else c("scale(0)")}else c("scale(0)");y?.(!0),p(!0)},v=()=>{const o=e.secondaryButton?.action,i=T;let l=null;if(o==="Play Video")u("Play Video");else if(o==="Open link"){const s=e.secondaryButton?.redirectionUrl;s&&(s.startsWith("http")?window.open(s,"_blank","noopener,noreferrer"):l=s)}if(d.hideJoyrideArrow(r.current),r.current&&e.featureTag){const s=_.findFeatureTagElement(e.featureTag);if(s){const g=d.calculateCloseTransform(r.current,s);c(g)}else c("scale(0)")}else c("scale(0)");y?.(!0),p(!0),d.executeAfterAnimation(async()=>{await i(),l&&(window.location.href=l)})},n=C.getMinorPopupStyles(h,f);return t.jsxs("div",{ref:r,style:n.container,children:[t.jsx("div",{style:n.imageContainer,children:e.displayImage?t.jsx("div",{style:n.imageWrapper,children:t.jsx("img",{src:e.displayImage,alt:e.title,style:n.image,onError:o=>{e.image&&(o.target.src=e.image)}})}):t.jsx("div",{style:n.imagePlaceholder,children:x.TEXT.FEATURE_PREVIEW_PLACEHOLDER})}),t.jsxs("div",{style:n.contentContainer,children:[t.jsxs("div",{children:[t.jsx("h3",{style:n.title,children:e.title}),t.jsx("div",{style:n.content,dangerouslySetInnerHTML:{__html:S.decodeHTMLEntities(e.content||e.body||"")}})]}),t.jsxs("div",{style:n.actionsContainer,children:[e.secondaryButton?.text&&t.jsx("span",{onClick:v,style:n.understoodText,children:e.secondaryButton.text}),t.jsx("button",{onClick:j,style:n.exploreButton,children:e.primaryButton?.text||e.buttonText||x.TEXT.DEFAULT_BUTTON_TEXT})]})]})]})};exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),a=require("react"),g=require("./constants/index.js"),S=require("./styles/minorPopup.styles.js"),_=require("./utils/htmlHelpers.js"),d=require("./utils/animationHelpers.js"),A=require("./utils/elementHelpers.js"),w=({feature:e,currentIndex:B,totalFeatures:b,onSkip:x,onExplore:T,onPrevious:q,onNext:U,setIsClosing:u,onSecondaryAction:h})=>{const[m,p]=a.useState(!1),[E,f]=a.useState(!1),[j,c]=a.useState(""),s=a.useRef(null);a.useEffect(()=>{m&&f(!0)},[m]);const v=()=>{const o=e.primaryButton?.action;if(o==="Open link"){const i=e.primaryButton?.redirectionUrl||e.redirectUrl;i&&i.startsWith("http")&&window.open(i,"_blank","noopener,noreferrer")}if(T(o),d.hideJoyrideArrow(s.current),s.current&&e.featureTag){const i=e.featureTag.startsWith("#")||e.featureTag.startsWith(".")||e.featureTag.startsWith("[")?e.featureTag:`#${e.featureTag}`,l=document.querySelector(i);if(l){const r=d.calculateCloseTransform(s.current,l);c(r)}else c("scale(0)")}else c("scale(0)");u?.(!0),p(!0)},C=()=>{const o=e.secondaryButton?.action,i=h||x;let l=null;if(o==="Open link"){const r=e.secondaryButton?.redirectionUrl;r&&(r.startsWith("http")?window.open(r,"_blank","noopener,noreferrer"):l=r)}if(d.hideJoyrideArrow(s.current),s.current&&e.featureTag){const r=A.findFeatureTagElement(e.featureTag);if(r){const y=d.calculateCloseTransform(s.current,r);c(y)}else c("scale(0)")}else c("scale(0)");u?.(!0),p(!0),d.executeAfterAnimation(async()=>{await i(o),l&&(window.location.href=l)})},n=S.getMinorPopupStyles(E,j);return t.jsxs("div",{ref:s,style:n.container,children:[t.jsx("div",{style:n.imageContainer,children:e.displayImage?t.jsx("div",{style:n.imageWrapper,children:t.jsx("img",{src:e.displayImage,alt:e.title,style:n.image,onError:o=>{e.image&&(o.target.src=e.image)}})}):t.jsx("div",{style:n.imagePlaceholder,children:g.TEXT.FEATURE_PREVIEW_PLACEHOLDER})}),t.jsxs("div",{style:n.contentContainer,children:[t.jsxs("div",{children:[t.jsx("h3",{style:n.title,children:e.title}),t.jsx("div",{style:n.content,dangerouslySetInnerHTML:{__html:_.decodeHTMLEntities(e.content||e.body||"")}})]}),t.jsxs("div",{style:n.actionsContainer,children:[e.secondaryButton?.text&&t.jsx("span",{onClick:C,style:n.understoodText,children:e.secondaryButton.text}),t.jsx("button",{onClick:v,style:n.exploreButton,children:e.primaryButton?.text||e.buttonText||g.TEXT.DEFAULT_BUTTON_TEXT})]})]})]})};exports.default=w;
2
2
  //# sourceMappingURL=MinorUpdatePopup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MinorUpdatePopup.js","sources":["../../../../src/components/feature-announcements/MinorUpdatePopup.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { TEXT } from './constants';\nimport { getMinorPopupStyles } from './styles';\nimport { MinorUpdatePopupProps } from './types';\nimport {\n\tcalculateCloseTransform,\n\tdecodeHTMLEntities,\n\texecuteAfterAnimation,\n\tfindFeatureTagElement,\n\thideJoyrideArrow,\n} from './utils';\n\nconst MinorUpdatePopup: React.FC<MinorUpdatePopupProps> = ({\n\tfeature,\n\tcurrentIndex,\n\ttotalFeatures,\n\tonSkip,\n\tonExplore,\n\tonPrevious,\n\tonNext,\n\tsetIsClosing: setIsClosingParent,\n}) => {\n\tconst [isClosing, setIsClosing] = useState(false);\n\tconst [startAnimation, setStartAnimation] = useState(false);\n\tconst [transform, setTransform] = useState('');\n\tconst popupRef = useRef<HTMLDivElement>(null);\n\n\t// Hide Joyride arrow when closing starts, then trigger animation immediately\n\tuseEffect(() => {\n\t\tif (isClosing) {\n\t\t\t// Start the shrink animation immediately\n\t\t\tsetStartAnimation(true);\n\t\t}\n\t}, [isClosing]);\n\n\tconst handleExplore = (): void => {\n\t\tconst action = feature.primaryButton?.action;\n\n\t\tif (action === 'Open link') {\n\t\t\tconst url = feature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tonExplore(action);\n\n\t\t// Run closing animation in background\n\t\thideJoyrideArrow(popupRef.current);\n\t\tif (popupRef.current && feature.featureTag) {\n\t\t\tconst targetSelector =\n\t\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t\t? feature.featureTag\n\t\t\t\t\t: `#${feature.featureTag}`;\n\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\tif (targetElement) {\n\t\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\t\tpopupRef.current,\n\t\t\t\t\ttargetElement,\n\t\t\t\t);\n\t\t\t\tsetTransform(transformValue);\n\t\t\t} else {\n\t\t\t\tsetTransform('scale(0)');\n\t\t\t}\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t};\n\n\tconst handleSecondaryAction = (): void => {\n\t\tconst action = feature.secondaryButton?.action;\n\t\tconst closeCallback = onSkip;\n\t\tlet internalUrl: string | null = null;\n\n\t\t// Handle based on action type\n\t\tif (action === 'Play Video') {\n\t\t\tonExplore('Play Video');\n\t\t} else if (action === 'Open link') {\n\t\t\tconst url = feature.secondaryButton?.redirectionUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t} else {\n\t\t\t\t\tinternalUrl = url;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (action === 'Close popup' || action === '') {\n\t\t\t// Just close the popup\n\t\t}\n\n\t\t// Always close popup after secondary action\n\t\thideJoyrideArrow(popupRef.current);\n\t\tif (popupRef.current && feature.featureTag) {\n\t\t\tconst targetElement = findFeatureTagElement(feature.featureTag);\n\t\t\tif (targetElement) {\n\t\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\t\tpopupRef.current,\n\t\t\t\t\ttargetElement,\n\t\t\t\t);\n\t\t\t\tsetTransform(transformValue);\n\t\t\t} else {\n\t\t\t\tsetTransform('scale(0)');\n\t\t\t}\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t\texecuteAfterAnimation(async () => {\n\t\t\tawait closeCallback();\n\t\t\tif (internalUrl) {\n\t\t\t\twindow.location.href = internalUrl;\n\t\t\t}\n\t\t});\n\t};\n\n\tconst styles = getMinorPopupStyles(startAnimation, transform);\n\n\treturn (\n\t\t<div ref={popupRef} style={styles.container}>\n\t\t\t{/* Image section */}\n\t\t\t<div style={styles.imageContainer}>\n\t\t\t\t{feature.displayImage ? (\n\t\t\t\t\t<div style={styles.imageWrapper}>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={feature.displayImage}\n\t\t\t\t\t\t\talt={feature.title}\n\t\t\t\t\t\t\tstyle={styles.image}\n\t\t\t\t\t\t\tonError={(e) => {\n\t\t\t\t\t\t\t\tif (feature.image) {\n\t\t\t\t\t\t\t\t\t(e.target as HTMLImageElement).src = feature.image;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div style={styles.imagePlaceholder}>\n\t\t\t\t\t\t{TEXT.FEATURE_PREVIEW_PLACEHOLDER}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\n\t\t\t{/* Content section */}\n\t\t\t<div style={styles.contentContainer}>\n\t\t\t\t<div>\n\t\t\t\t\t<h3 style={styles.title}>{feature.title}</h3>\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={styles.content}\n\t\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t\t__html: decodeHTMLEntities(feature.content || feature.body || ''),\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t{/* Action buttons */}\n\t\t\t\t<div style={styles.actionsContainer}>\n\t\t\t\t\t{/* Secondary Button (if configured, shows as text link on left) */}\n\t\t\t\t\t{feature.secondaryButton?.text && (\n\t\t\t\t\t\t<span onClick={handleSecondaryAction} style={styles.understoodText}>\n\t\t\t\t\t\t\t{feature.secondaryButton.text}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{/* Primary Button (always shows) */}\n\t\t\t\t\t<button onClick={handleExplore} style={styles.exploreButton}>\n\t\t\t\t\t\t{feature.primaryButton?.text ||\n\t\t\t\t\t\t\tfeature.buttonText ||\n\t\t\t\t\t\t\tTEXT.DEFAULT_BUTTON_TEXT}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default MinorUpdatePopup;\n"],"names":["MinorUpdatePopup","feature","currentIndex","totalFeatures","onSkip","onExplore","onPrevious","onNext","setIsClosingParent","isClosing","setIsClosing","useState","startAnimation","setStartAnimation","transform","setTransform","popupRef","useRef","useEffect","handleExplore","action","url","hideJoyrideArrow","targetSelector","targetElement","transformValue","calculateCloseTransform","handleSecondaryAction","closeCallback","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OL,EAAO,iBAClB,SAAA,CAAAK,OAAC,MAAA,CACA,SAAA,CAAAH,MAAC,KAAA,CAAG,MAAOF,EAAO,MAAQ,WAAQ,MAAM,EACxCE,EAAAA,IAAC,MAAA,CACA,MAAOF,EAAO,QACd,wBAAyB,CACxB,OAAQM,EAAAA,mBAAmBrC,EAAQ,SAAWA,EAAQ,MAAQ,EAAE,CAAA,CACjE,CAAA,CACD,EACD,EAGAoC,EAAAA,KAAC,MAAA,CAAI,MAAOL,EAAO,iBAEjB,SAAA,CAAA/B,EAAQ,iBAAiB,MACzBiC,EAAAA,IAAC,OAAA,CAAK,QAASP,EAAuB,MAAOK,EAAO,eAClD,SAAA/B,EAAQ,gBAAgB,KAC1B,EAIDiC,EAAAA,IAAC,SAAA,CAAO,QAASf,EAAe,MAAOa,EAAO,cAC5C,SAAA/B,EAAQ,eAAe,MACvBA,EAAQ,YACRmC,EAAAA,KAAK,mBAAA,CACP,CAAA,CAAA,CACD,CAAA,CAAA,CACD,CAAA,EACD,CAEF"}
1
+ {"version":3,"file":"MinorUpdatePopup.js","sources":["../../../../src/components/feature-announcements/MinorUpdatePopup.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { TEXT } from './constants';\nimport { getMinorPopupStyles } from './styles';\nimport { MinorUpdatePopupProps } from './types';\nimport {\n\tcalculateCloseTransform,\n\tdecodeHTMLEntities,\n\texecuteAfterAnimation,\n\tfindFeatureTagElement,\n\thideJoyrideArrow,\n} from './utils';\n\nconst MinorUpdatePopup: React.FC<MinorUpdatePopupProps> = ({\n\tfeature,\n\tcurrentIndex,\n\ttotalFeatures,\n\tonSkip,\n\tonExplore,\n\tonPrevious,\n\tonNext,\n\tsetIsClosing: setIsClosingParent,\n\tonSecondaryAction,\n}) => {\n\tconst [isClosing, setIsClosing] = useState(false);\n\tconst [startAnimation, setStartAnimation] = useState(false);\n\tconst [transform, setTransform] = useState('');\n\tconst popupRef = useRef<HTMLDivElement>(null);\n\n\t// Hide Joyride arrow when closing starts, then trigger animation immediately\n\tuseEffect(() => {\n\t\tif (isClosing) {\n\t\t\t// Start the shrink animation immediately\n\t\t\tsetStartAnimation(true);\n\t\t}\n\t}, [isClosing]);\n\n\tconst handleExplore = (): void => {\n\t\tconst action = feature.primaryButton?.action;\n\n\t\tif (action === 'Open link') {\n\t\t\tconst url = feature.primaryButton?.redirectionUrl || feature.redirectUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tonExplore(action);\n\n\t\t// Run closing animation in background\n\t\thideJoyrideArrow(popupRef.current);\n\t\tif (popupRef.current && feature.featureTag) {\n\t\t\tconst targetSelector =\n\t\t\t\tfeature.featureTag.startsWith('#') ||\n\t\t\t\tfeature.featureTag.startsWith('.') ||\n\t\t\t\tfeature.featureTag.startsWith('[')\n\t\t\t\t\t? feature.featureTag\n\t\t\t\t\t: `#${feature.featureTag}`;\n\t\t\tconst targetElement = document.querySelector(targetSelector);\n\t\t\tif (targetElement) {\n\t\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\t\tpopupRef.current,\n\t\t\t\t\ttargetElement,\n\t\t\t\t);\n\t\t\t\tsetTransform(transformValue);\n\t\t\t} else {\n\t\t\t\tsetTransform('scale(0)');\n\t\t\t}\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t};\n\n\tconst handleSecondaryAction = (): void => {\n\t\tconst action = feature.secondaryButton?.action;\n\t\tconst closeCallback: (triggeredAction?: string) => Promise<void> | void =\n\t\t\tonSecondaryAction || onSkip;\n\t\tlet internalUrl: string | null = null;\n\n\t\t// Handle based on action type. 'Play Video' is opened by closeCallback so the\n\t\t// click is not attributed to the primary button via onExplore.\n\t\tif (action === 'Open link') {\n\t\t\tconst url = feature.secondaryButton?.redirectionUrl;\n\t\t\tif (url) {\n\t\t\t\tconst isExternal = url.startsWith('http');\n\t\t\t\tif (isExternal) {\n\t\t\t\t\twindow.open(url, '_blank', 'noopener,noreferrer');\n\t\t\t\t} else {\n\t\t\t\t\tinternalUrl = url;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (action === 'Close popup' || action === '') {\n\t\t\t// Just close the popup\n\t\t}\n\n\t\t// Always close popup after secondary action\n\t\thideJoyrideArrow(popupRef.current);\n\t\tif (popupRef.current && feature.featureTag) {\n\t\t\tconst targetElement = findFeatureTagElement(feature.featureTag);\n\t\t\tif (targetElement) {\n\t\t\t\tconst transformValue = calculateCloseTransform(\n\t\t\t\t\tpopupRef.current,\n\t\t\t\t\ttargetElement,\n\t\t\t\t);\n\t\t\t\tsetTransform(transformValue);\n\t\t\t} else {\n\t\t\t\tsetTransform('scale(0)');\n\t\t\t}\n\t\t} else {\n\t\t\tsetTransform('scale(0)');\n\t\t}\n\t\tsetIsClosingParent?.(true);\n\t\tsetIsClosing(true);\n\t\texecuteAfterAnimation(async () => {\n\t\t\tawait closeCallback(action);\n\t\t\tif (internalUrl) {\n\t\t\t\twindow.location.href = internalUrl;\n\t\t\t}\n\t\t});\n\t};\n\n\tconst styles = getMinorPopupStyles(startAnimation, transform);\n\n\treturn (\n\t\t<div ref={popupRef} style={styles.container}>\n\t\t\t{/* Image section */}\n\t\t\t<div style={styles.imageContainer}>\n\t\t\t\t{feature.displayImage ? (\n\t\t\t\t\t<div style={styles.imageWrapper}>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={feature.displayImage}\n\t\t\t\t\t\t\talt={feature.title}\n\t\t\t\t\t\t\tstyle={styles.image}\n\t\t\t\t\t\t\tonError={(e) => {\n\t\t\t\t\t\t\t\tif (feature.image) {\n\t\t\t\t\t\t\t\t\t(e.target as HTMLImageElement).src = feature.image;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div style={styles.imagePlaceholder}>\n\t\t\t\t\t\t{TEXT.FEATURE_PREVIEW_PLACEHOLDER}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\n\t\t\t{/* Content section */}\n\t\t\t<div style={styles.contentContainer}>\n\t\t\t\t<div>\n\t\t\t\t\t<h3 style={styles.title}>{feature.title}</h3>\n\t\t\t\t\t<div\n\t\t\t\t\t\tstyle={styles.content}\n\t\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t\t__html: decodeHTMLEntities(feature.content || feature.body || ''),\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t{/* Action buttons */}\n\t\t\t\t<div style={styles.actionsContainer}>\n\t\t\t\t\t{/* Secondary Button (if configured, shows as text link on left) */}\n\t\t\t\t\t{feature.secondaryButton?.text && (\n\t\t\t\t\t\t<span onClick={handleSecondaryAction} style={styles.understoodText}>\n\t\t\t\t\t\t\t{feature.secondaryButton.text}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{/* Primary Button (always shows) */}\n\t\t\t\t\t<button onClick={handleExplore} style={styles.exploreButton}>\n\t\t\t\t\t\t{feature.primaryButton?.text ||\n\t\t\t\t\t\t\tfeature.buttonText ||\n\t\t\t\t\t\t\tTEXT.DEFAULT_BUTTON_TEXT}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default MinorUpdatePopup;\n"],"names":["MinorUpdatePopup","feature","currentIndex","totalFeatures","onSkip","onExplore","onPrevious","onNext","setIsClosingParent","onSecondaryAction","isClosing","setIsClosing","useState","startAnimation","setStartAnimation","transform","setTransform","popupRef","useRef","useEffect","handleExplore","action","url","hideJoyrideArrow","targetSelector","targetElement","transformValue","calculateCloseTransform","handleSecondaryAction","closeCallback","internalUrl","findFeatureTagElement","executeAfterAnim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