@clickview/lite 0.104.0-rc.0 → 0.104.0-rc.1

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 (86) hide show
  1. package/dist/.vite/manifest.json +686 -686
  2. package/dist/bundles.json +1 -1
  3. package/dist/en.json +1 -1
  4. package/dist/scripts/{BYC-9gzd.chunk.js → 6BvA1WyF.chunk.js} +2 -2
  5. package/dist/scripts/{BYC-9gzd.chunk.js.map → 6BvA1WyF.chunk.js.map} +1 -1
  6. package/dist/scripts/B1hsuVfV2.chunk.js +2 -0
  7. package/dist/scripts/{BwBWuxjr2.chunk.js.map → B1hsuVfV2.chunk.js.map} +1 -1
  8. package/dist/scripts/{CFxoQ45v.chunk.js → B4GpjPP-.chunk.js} +2 -2
  9. package/dist/scripts/{CFxoQ45v.chunk.js.map → B4GpjPP-.chunk.js.map} +1 -1
  10. package/dist/scripts/{HyBCRhmv2.chunk.js → BAYtWmRb2.chunk.js} +3 -3
  11. package/dist/scripts/{HyBCRhmv2.chunk.js.map → BAYtWmRb2.chunk.js.map} +1 -1
  12. package/dist/scripts/{CVEuWE2q2.chunk.js → BBAIRd3r2.chunk.js} +2 -2
  13. package/dist/scripts/{CVEuWE2q2.chunk.js.map → BBAIRd3r2.chunk.js.map} +1 -1
  14. package/dist/scripts/{C2Hgija5.chunk.js → BGH3t983.chunk.js} +2 -2
  15. package/dist/scripts/{C2Hgija5.chunk.js.map → BGH3t983.chunk.js.map} +1 -1
  16. package/dist/scripts/{DsSd-eh2.chunk.js → BIjzNf4b.chunk.js} +2 -2
  17. package/dist/scripts/{DsSd-eh2.chunk.js.map → BIjzNf4b.chunk.js.map} +1 -1
  18. package/dist/scripts/{D20SeFH5.chunk.js → BLad2z5b.chunk.js} +2 -2
  19. package/dist/scripts/{D20SeFH5.chunk.js.map → BLad2z5b.chunk.js.map} +1 -1
  20. package/dist/scripts/{BklRyGO0.chunk.js → BMZNQKEe.chunk.js} +2 -2
  21. package/dist/scripts/{BklRyGO0.chunk.js.map → BMZNQKEe.chunk.js.map} +1 -1
  22. package/dist/scripts/{BOuzZEkK2.chunk.js → BPjqerK42.chunk.js} +2 -2
  23. package/dist/scripts/BPjqerK42.chunk.js.map +1 -0
  24. package/dist/scripts/{fjQ026Rz2.chunk.js → BQS6kDvJ2.chunk.js} +2 -2
  25. package/dist/scripts/{fjQ026Rz2.chunk.js.map → BQS6kDvJ2.chunk.js.map} +1 -1
  26. package/dist/scripts/{CnfcodVE2.chunk.js → BeOS0_E02.chunk.js} +2 -2
  27. package/dist/scripts/{CnfcodVE2.chunk.js.map → BeOS0_E02.chunk.js.map} +1 -1
  28. package/dist/scripts/{kz-JIHlB2.chunk.js → Bnyn-It62.chunk.js} +2 -2
  29. package/dist/scripts/{kz-JIHlB2.chunk.js.map → Bnyn-It62.chunk.js.map} +1 -1
  30. package/dist/scripts/{BbKY_Dwq.chunk.js → CJCh1Gq6.chunk.js} +2 -2
  31. package/dist/scripts/{BbKY_Dwq.chunk.js.map → CJCh1Gq6.chunk.js.map} +1 -1
  32. package/dist/scripts/{CoUj6M-_.chunk.js → CKGiikBV.chunk.js} +2 -2
  33. package/dist/scripts/{CoUj6M-_.chunk.js.map → CKGiikBV.chunk.js.map} +1 -1
  34. package/dist/scripts/{B8t1n8_x2.chunk.js → CL5P1KMy2.chunk.js} +2 -2
  35. package/dist/scripts/{B8t1n8_x2.chunk.js.map → CL5P1KMy2.chunk.js.map} +1 -1
  36. package/dist/scripts/{Bz-3cXSL.chunk.js → CMKTpGri.chunk.js} +2 -2
  37. package/dist/scripts/{Bz-3cXSL.chunk.js.map → CMKTpGri.chunk.js.map} +1 -1
  38. package/dist/scripts/{ByMZucv2.chunk.js → CgL1gDuH.chunk.js} +2 -2
  39. package/dist/scripts/{ByMZucv2.chunk.js.map → CgL1gDuH.chunk.js.map} +1 -1
  40. package/dist/scripts/{VDqAyMTi2.chunk.js → ClMXRZea2.chunk.js} +2 -2
  41. package/dist/scripts/{VDqAyMTi2.chunk.js.map → ClMXRZea2.chunk.js.map} +1 -1
  42. package/dist/scripts/{Bw2cauzs2.chunk.js → Cm6SLr7W2.chunk.js} +3 -3
  43. package/dist/scripts/{Bw2cauzs2.chunk.js.map → Cm6SLr7W2.chunk.js.map} +1 -1
  44. package/dist/scripts/{gF9PGTMC.chunk.js → Cmjtel65.chunk.js} +2 -2
  45. package/dist/scripts/{gF9PGTMC.chunk.js.map → Cmjtel65.chunk.js.map} +1 -1
  46. package/dist/scripts/{DwLSTi6C.chunk.js → CnYpIR5V.chunk.js} +2 -2
  47. package/dist/scripts/{DwLSTi6C.chunk.js.map → CnYpIR5V.chunk.js.map} +1 -1
  48. package/dist/scripts/{BpFyfI-52.chunk.js → D2vAOC7r2.chunk.js} +2 -2
  49. package/dist/scripts/{BpFyfI-52.chunk.js.map → D2vAOC7r2.chunk.js.map} +1 -1
  50. package/dist/scripts/{29-YRbOp.chunk.js → D4uneRs9.chunk.js} +2 -2
  51. package/dist/scripts/{29-YRbOp.chunk.js.map → D4uneRs9.chunk.js.map} +1 -1
  52. package/dist/scripts/{DbQFpTve.chunk.js → DIeIfhGe.chunk.js} +2 -2
  53. package/dist/scripts/{DbQFpTve.chunk.js.map → DIeIfhGe.chunk.js.map} +1 -1
  54. package/dist/scripts/{CrGWZr2R2.chunk.js → DRHbASmP2.chunk.js} +2 -2
  55. package/dist/scripts/{CrGWZr2R2.chunk.js.map → DRHbASmP2.chunk.js.map} +1 -1
  56. package/dist/scripts/{n4utAY5E2.chunk.js → DTnfO2MH2.chunk.js} +2 -2
  57. package/dist/scripts/{n4utAY5E2.chunk.js.map → DTnfO2MH2.chunk.js.map} +1 -1
  58. package/dist/scripts/{BcMb1XKL.chunk.js → DUJvtd00.chunk.js} +2 -2
  59. package/dist/scripts/{BcMb1XKL.chunk.js.map → DUJvtd00.chunk.js.map} +1 -1
  60. package/dist/scripts/{B0DGioRk.chunk.js → DWz2oR7C.chunk.js} +2 -2
  61. package/dist/scripts/{B0DGioRk.chunk.js.map → DWz2oR7C.chunk.js.map} +1 -1
  62. package/dist/scripts/{CTUTwtJp.chunk.js → DZD8iLCw.chunk.js} +2 -2
  63. package/dist/scripts/{CTUTwtJp.chunk.js.map → DZD8iLCw.chunk.js.map} +1 -1
  64. package/dist/scripts/{C-gsezmj.chunk.js → D_foXB2p.chunk.js} +2 -2
  65. package/dist/scripts/{C-gsezmj.chunk.js.map → D_foXB2p.chunk.js.map} +1 -1
  66. package/dist/scripts/{Br8WvETm.chunk.js → Dhv7zSEB.chunk.js} +2 -2
  67. package/dist/scripts/{Br8WvETm.chunk.js.map → Dhv7zSEB.chunk.js.map} +1 -1
  68. package/dist/scripts/{B6p7xJj9.chunk.js → DpHKtTzO.chunk.js} +2 -2
  69. package/dist/scripts/{B6p7xJj9.chunk.js.map → DpHKtTzO.chunk.js.map} +1 -1
  70. package/dist/scripts/{DynqFaq92.chunk.js → GcexF25w2.chunk.js} +2 -2
  71. package/dist/scripts/{DynqFaq92.chunk.js.map → GcexF25w2.chunk.js.map} +1 -1
  72. package/dist/scripts/{DYN56vJ6.chunk.js → _XhYAc8v.chunk.js} +2 -2
  73. package/dist/scripts/{DYN56vJ6.chunk.js.map → _XhYAc8v.chunk.js.map} +1 -1
  74. package/dist/scripts/{app-4vEzpLow.js → app-DamRTcio.js} +4 -4
  75. package/dist/scripts/{app-4vEzpLow.js.map → app-DamRTcio.js.map} +1 -1
  76. package/dist/scripts/{B2PLlkVH.chunk.js → dZhIkfV6.chunk.js} +3 -3
  77. package/dist/scripts/{B2PLlkVH.chunk.js.map → dZhIkfV6.chunk.js.map} +1 -1
  78. package/dist/scripts/{DZQhE4mm.chunk.js → eSX6I2aK.chunk.js} +2 -2
  79. package/dist/scripts/{DZQhE4mm.chunk.js.map → eSX6I2aK.chunk.js.map} +1 -1
  80. package/dist/scripts/{DnogtDGY2.chunk.js → gTfMMiRw2.chunk.js} +2 -2
  81. package/dist/scripts/{DnogtDGY2.chunk.js.map → gTfMMiRw2.chunk.js.map} +1 -1
  82. package/dist/scripts/{DYW8v4_j2.chunk.js → xUmhnDE42.chunk.js} +2 -2
  83. package/dist/scripts/{DYW8v4_j2.chunk.js.map → xUmhnDE42.chunk.js.map} +1 -1
  84. package/package.json +1 -1
  85. package/dist/scripts/BOuzZEkK2.chunk.js.map +0 -1
  86. package/dist/scripts/BwBWuxjr2.chunk.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"DYW8v4_j2.chunk.js","names":[],"sources":["../../src/shared/views/play-clip/components/clipped-from/ClippedFrom.tsx","../../src/shared/views/play-clip/components/play-clip/play-clip.module.scss","../../src/shared/views/play-clip/components/play-clip/PlayClip.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CurrentUser, PresentationAudience, VideoTypes } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nconst namespace = 'shared.playClip';\n\ninterface ClippedFromProps {\n originalVideo: VideoTypes;\n queryParams: PlayViewQueryParams;\n audiences: PresentationAudience[];\n shareId?: string;\n headingRef: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n currentUser: CurrentUser;\n commonVideoProps: CommonVideoProps;\n}\n\nexport function ClippedFrom(props: ClippedFromProps) {\n const { hasPermissions } = usePermissions();\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem, presentationSlug: null });\n\n return (\n <section\n className='play-page-section'\n id={PlayPageAnchor.ClippedFrom}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.ClippedFrom, el);\n }}\n >\n <h2 className='h4 mb-0'><Text namespace={namespace} phrase='clippedFrom' /></h2>\n <VideoActionsContext.Provider value={videoActions}>\n <VideoList\n videos={[props.originalVideo]}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n hasPermissions={hasPermissions}\n presentationAudiences={props.audiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n commonVideoProps={props.commonVideoProps}\n />\n </VideoActionsContext.Provider>\n </section>\n );\n}\n","@import '~styles/utils/include-media';\n:local {\n .main.expandedToc {\n width: calc(100% - 15rem); //minus sidebar toc width and margin\n }\n\n .main.theatreMode {\n width: 100% !important;\n }\n\n .theatreModeContent {\n display: flex;\n margin: auto !important;\n\n @include media('<=xl') {\n max-width: 100%;\n }\n }\n\n .theatreModePlayPageContainer {\n //override TeacherLayoutComponent container style\n @media (min-width: 1200px) {\n max-width: none !important;\n }\n }\n\n .theatreModeLeftContent {\n width: calc(100% - 15rem);\n @include media('<=lg') {\n width: 100%;\n }\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { VideoDetailsWithScrollbarV2 } from 'libs/shared/components/play-page/details/VideoDetailsV2';\nimport { hasGlanceData } from 'libs/shared/components/play-page/glance/VideoAtAGlanceUtilsV2';\nimport { VideoAtAGlanceV2 } from 'libs/shared/components/play-page/glance/VideoAtAGlanceV2';\nimport { getResources, PlayPageResources } from 'libs/shared/components/play-page/resources-widget/PlayPageResources';\nimport { SeoConstants } from 'libs/shared/constants/SeoConstants';\nimport { GlobalPlayerConsumer } from 'libs/shared/context/player-context/components/GlobalPlayerConsumer';\nimport { usePlayerContext } from 'libs/shared/context/player-context/PlayerContext';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { HasProductFunc } from 'libs/shared/hooks/UseProducts';\nimport { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { Clip, CurrentUser, InteractiveMetadata, Link, PointOfInterest, PresentationAudience, Resource } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { DownloadHelper } from 'libs/shared/utils/DownloadHelper';\nimport { MasterTypeHelper } from 'libs/shared/utils/MasterTypeHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { CitationWidget } from 'shared/components/citations/CitationWidget';\nimport { ArchivedBanner } from 'shared/components/play-page/ArchivedBanner';\nimport { PlayPageClips } from 'shared/components/play-page/components/play-page-clips/PlayPageClips';\nimport { PlayPageInteractives } from 'shared/components/play-page/components/play-page-interactives/PlayPageInteractives';\nimport { TableOfContentsContainer, TOC_IGNORE_BOUNDARY } from 'shared/components/play-page/components/table-of-contents/TableOfContents';\nimport { PlayPageTitleAndActions } from 'shared/components/play-page/components/title-and-actions/PlayPageTitleAndActions';\nimport { getFolderAppLink, getLibraryAppLink } from 'shared/components/play-page/PlayPageUtils';\nimport { RestrictionBanner } from 'shared/components/play-page/RestrictionBanner';\nimport { PlayerPlaceholder } from 'shared/components/player-placeholder/PlayerPlaceholder';\nimport { RelatedVideos } from 'shared/components/related-videos/RelatedVideos';\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { ViewModelKeys } from 'shared/constants/LiteViewModels';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { useResourcePopup } from 'shared/views/play/components/play-page/hooks/useResourcePopup';\nimport { getContentClassName, getIsTheatreMode, getMainClassName } from 'shared/views/play/components/play-page/PlayPageUtils';\nimport { usePlayPageTableOfContent } from 'shared/views/play/hooks/usePlayPageTableOfContent';\nimport { useSectionHeadings } from 'shared/views/play/hooks/useSectionHeadings';\nimport { useTheatreModeStyle } from 'shared/views/play/hooks/useTheatreStyle';\nimport { PlayPageUtils } from 'shared/views/play/PlayPageUtil';\nimport { ClippedFrom } from 'shared/views/play-clip/components/clipped-from/ClippedFrom';\n\nimport styles from './play-clip.module.scss';\n\nconst getResourceAppLink = (videoId: string, shareId: string, canViewResource: boolean) =>\n (resource: Resource | Link) => {\n if (!canViewResource) {\n return {\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n };\n }\n\n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PREVIEW_PDF,\n args: [resource.id],\n params: {\n videoId: videoId,\n shareId: shareId\n }\n };\n };\n\ninterface PlayClipProps {\n clip: Clip;\n clips: Clip[];\n interactives: InteractiveMetadata[];\n currentUser: CurrentUser;\n relatedVideos: RelatedVideosHash;\n queryParams: PlayViewQueryParams;\n hasProduct: HasProductFunc;\n audiences: PresentationAudience[];\n shareId?: string;\n canManageVideoAccess: boolean;\n pointsOfInterest?: PointOfInterest[];\n featureAccess: VideoFeaturesHash;\n tableOfContentsId: string;\n shouldShowSideTableOfContents: boolean;\n hasTopicDirectories: boolean;\n hasTheatreMode: boolean;\n breadcrumbs?: Breadcrumb[];\n commonVideoProps: CommonVideoProps;\n}\n\nexport function PlayClip(props: PlayClipProps): JSX.Element {\n const playerContext = usePlayerContext();\n\n const { hasPermissions } = usePermissions();\n const { canConsume } = VideoHelper.getCanBeConsumed(props.clip);\n \n const theatreMode = getIsTheatreMode(props.hasTheatreMode, playerContext);\n const shouldUseTheareModeStyle = useTheatreModeStyle(\n props.hasTheatreMode,\n playerContext.mode,\n playerContext.defaultDisplayMode\n );\n\n function toggleTheatreMode(value: boolean) {\n playerContext.playerRef?.current?.toggleTheatreMode?.(value);\n }\n\n const {\n tableOfContentsActiveId,\n setTableOfContentsActiveId,\n controlledId,\n setControlledId,\n tableOfContentsExpanded,\n onToggleTableOfContents\n } = usePlayPageTableOfContent(props.tableOfContentsId, props.hasTheatreMode, theatreMode);\n\n const hasGlance = hasGlanceData(props.clip) && props.featureAccess.canViewGlance;\n\n const { headingRef, headingElements } = useSectionHeadings(hasGlance);\n const items = headingElements.map(ele => {\n return {\n id: ele.id as PlayPageAnchor,\n name: PlayPageUtils.getSectionHeading(\n ele.id as PlayPageAnchor,\n {\n clips: props.clips,\n interactives: props.interactives,\n resources: props.clip.resources?.data,\n isPlayClipPage: true\n }\n )\n };\n });\n\n useTableOfContentsActiveHeading({\n setActiveId: setTableOfContentsActiveId,\n headingElements,\n controlledId,\n setControlledId\n });\n\n useTableOfContentsScroll(headingElements, controlledId);\n\n const isArchived = VideoHelper.isVideoTypeArchived(props.clip);\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\n /**\n * Need to use a ref because if we use state, onExitImmersiveReader will have a stale\n * reference of the state. This is because the state is changed in onLaunchImmersiveReader\n * which is passed in at the same time as onExitImmersiveReader\n */\n const shouldPlayOnExitImmersiveReader = React.useRef(false);\n\n const clipResourceAppLink = getResourceAppLink(\n props.clip.id,\n props.shareId,\n props.featureAccess.canViewResourceItems\n );\n\n useResourcePopup({\n resourcePopupId: props.queryParams?.resourceId,\n resources: props.clip.resources?.data,\n getResourceAppLink: clipResourceAppLink\n });\n\n function onLaunchImmersiveReader(): void {\n shouldPlayOnExitImmersiveReader.current = !playerContext?.playerRef?.current?.isPaused();\n playerContext?.playerRef?.current?.pause();\n }\n\n function onExitImmersiveReader(): void {\n if (!shouldPlayOnExitImmersiveReader.current)\n return;\n\n playerContext?.playerRef?.current?.play();\n }\n\n function canAccessOriginal(): boolean {\n if (!props.clip._parentVideo || !props.clip._canBeConsumed?.value)\n return false;\n\n if (!props.currentUser?.isAuthenticated)\n return false;\n\n if (!props.hasProduct(ProductId.Primary))\n return false;\n\n if (hasStudentExperience)\n return false;\n\n return true;\n }\n\n function getOriginalVideoAppLink(): Core.AppLink {\n if (!canAccessOriginal())\n return null;\n \n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [\n null,\n props.clip._parentVideo.id,\n TextHelper.slugify(props.clip._parentVideo.name)\n ]\n };\n }\n\n const showPlayerPlaceholder = playerContext.mode === 'picture-in-picture' || props.featureAccess.canViewPublicLayout;\n\n const otherClips = props.clips?.filter(c => c.id.toString() !== props.clip.id.toString()) ?? [];\n\n const calcClassNameProps = {\n hasTheatreMode: props.hasTheatreMode,\n shouldShowSideTableOfContents: props.shouldShowSideTableOfContents,\n tableOfContentsExpanded,\n theatreMode\n };\n const mainClassName = getMainClassName(calcClassNameProps);\n const contentClassName = getContentClassName(calcClassNameProps);\n\n const [ , setContainerClassName ] = useViewModel(ViewModelKeys.PLAY_PAGE_CONTAINER_CLASS_NAME);\n\n const resources = getResources(props.clip, hasPermissions(PermissionName.StudentExperience));\n const downloadableResources = resources.filter(MasterTypeHelper.isResource);\n\n function onDownloadClick() {\n if (downloadableResources.length === 1) {\n DownloadHelper.downloadResource(\n downloadableResources[0],\n { clipId: props.clip.id, clipName: props.clip.name },\n { location: LocationContext.PlayClip, actionType: UserAction.Download, entity: EntityType.Resource }\n );\n return;\n }\n \n Core.AppLinkHelper.trigger({\n application: AppChannels.VIDEOS,\n action: Actions.Videos.RESOURCE_DOWNLOAD,\n args: [ props.clip?.id, props.shareId ]\n });\n }\n \n React.useEffect(() => {\n if (!theatreMode) {\n setContainerClassName('');\n } else {\n setContainerClassName(styles.theatreModePlayPageContainer);\n }\n }, [theatreMode]);\n\n React.useEffect(() => {\n return () => setContainerClassName('');\n }, []);\n\n return (\n <div className={`px-4 play-page-sections-container ${props.shouldShowSideTableOfContents ? 'row g-0' : ''}`}>\n <main className={`${styles.main} ${mainClassName}`}>\n {!!props.breadcrumbs?.length && (\n <div className='mb-2'>\n <Breadcrumbs breadcrumbs={props.breadcrumbs} />\n </div>\n )}\n\n <RestrictionBanner\n restrictions={props.clip._restrictions}\n yearGroups={props.commonVideoProps.yearGroups}\n objectId={props.clip.id}\n objectTypeId={MasterType.Clip}\n canManageVideoAccess={props.canManageVideoAccess}\n />\n\n {isArchived && (\n <ArchivedBanner\n typeId={props.clip.typeId}\n hasStudentExperience={hasStudentExperience}\n />\n )}\n\n <section\n id={PlayPageAnchor.Video}\n className={`mb-2 ${SeoConstants.GLOBAL_PLAYER_SELECTOR}`}\n ref={el => { (el && headingRef?.current) && headingRef.current.set(PlayPageAnchor.Video, el); }}\n >\n {canConsume && (\n <GlobalPlayerConsumer\n key={props.clip.id}\n objectId={props.clip.id}\n objectTypeId={props.clip.typeId}\n shareId={props.shareId}\n context={props.queryParams?.context}\n contextId={props.queryParams?.contextId}\n moviesAndTv={props.queryParams?.mtv}\n playNext={props.queryParams?.playNext}\n startTime={props.queryParams?.t ?? props.queryParams?.startTime}\n mode='default'\n location='play-page'\n />\n )}\n\n <div className={showPlayerPlaceholder ? '' : 'd-none'}>\n <PlayerPlaceholder\n video={props.clip}\n type='pip'\n />\n </div>\n </section>\n\n <div className={contentClassName}>\n <div className={shouldUseTheareModeStyle ? `${styles.theatreModeLeftContent}` : 'w-100'}>\n <PlayPageTitleAndActions\n presentationSlug={null}\n media={props.clip}\n yearGroups={props.commonVideoProps.yearGroups}\n audiences={props.audiences}\n originalVideoAppLink={getOriginalVideoAppLink()}\n featureAccess={props.featureAccess}\n shareId={props.shareId}\n showTitlePadlock={!props.commonVideoProps.hasStudentExperience\n && !props.commonVideoProps.hasGuestExperience}\n />\n\n {/* if no glance render video details here */}\n {hasGlance ? (\n <VideoAtAGlanceV2\n video={props.clip}\n pointsOfInterest={props.pointsOfInterest}\n setStartTime={(time: number) => playerContext.playerRef.current?.currentTime(time)}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n canViewGlance={hasGlance}\n />\n ) : (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n getLibraryAppLink={getLibraryAppLink}\n getFolderAppLink={getFolderAppLink}\n />\n )}\n\n <PlayPageResources\n video={props.clip}\n canViewResources={props.featureAccess.canViewResourceItems}\n imageCdnUrl={props.commonVideoProps.imageCdnUrl}\n getAppLink={clipResourceAppLink}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n resourceThumbnailFallbackUrl={ImageUrls.Fallbacks.RESOURCE_THUMBNAIL}\n headingRef={headingRef}\n onDownloadClick={onDownloadClick}\n resources={resources}\n downloadableResources={downloadableResources}\n aboutResourcesAppLink={VideoAppLinkHelper.getAboutResourceAppLink()}\n />\n\n <PlayPageInteractives\n presentationSlug={null}\n video={props.clip}\n interactives={props.interactives}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n canViewInteractives={props.featureAccess.canViewInteractives}\n headingRef={headingRef}\n commonVideoProps={props.commonVideoProps}\n />\n\n <PlayPageClips\n presentationSlug={null}\n clips={otherClips || []}\n video={props.clip}\n canViewClips={props.featureAccess.canViewClips}\n audiences={props.audiences}\n headingRef={headingRef}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n commonVideoProps={props.commonVideoProps}\n />\n\n {/* if has glance, render video details here */}\n {hasGlance && (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n showHeading\n getLibraryAppLink={hasPermissions(PermissionName.ViewLibraries) ? getLibraryAppLink : null}\n getFolderAppLink={hasPermissions(PermissionName.ViewLibraries) ? getFolderAppLink : null}\n />\n )}\n \n {!!canAccessOriginal() && (\n <ClippedFrom\n originalVideo={props.clip._parentVideo}\n shareId={props.shareId}\n queryParams={props.queryParams}\n audiences={props.audiences}\n headingRef={headingRef}\n currentUser={props.currentUser}\n commonVideoProps={props.commonVideoProps}\n />\n )}\n\n {!VideoHelper.isUgc(props.clip._parentVideo) && (\n <CitationWidget\n headingRef={headingRef}\n media={props.clip}\n parentVideo={props.clip._parentVideo}\n contentRegion={props.currentUser.contentRegion}\n shareId={props.shareId}\n presentationSlug={null}\n />\n )}\n\n <RelatedVideos\n presentationSlug={null}\n currentVideo={props.clip}\n relatedVideos={props.relatedVideos}\n currentUser={props.currentUser}\n audiences={props.audiences}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n moviesAndTv={props.queryParams.mtv}\n commonVideoProps={props.commonVideoProps}\n />\n </div>\n {theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={ null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={true}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </div>\n </main>\n\n {!theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={props.hasTheatreMode ? toggleTheatreMode : null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={false}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </div>\n );\n}\n"],"mappings":"wiDAeM,EAAY,kBAYlB,SAAgB,GAAY,EAAyB,CACnD,GAAM,CAAE,kBAAmB,EAAe,EACpC,EAAe,EAAgB,CAAE,SAAU,EAAqB,UAAW,iBAAkB,IAAK,CAAC,EAEzG,OACE,EAAA,EAAA,KAAA,CAAC,UAAD,CACE,UAAU,oBACV,GAAI,EAAe,YACnB,IAAK,GAAM,CACT,GAAO,EAAM,YAAY,SAAY,EAAM,WAAW,QAAQ,IAAI,EAAe,YAAa,CAAE,CAClG,WALF,EAOE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,oBAAU,EAAA,EAAA,IAAA,CAAC,EAAD,CAAiB,YAAW,OAAO,aAAe,CAAA,CAAK,CAAA,GAC/E,EAAA,EAAA,IAAA,C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EAAA,IAAA,CAAC,EAAD,CACE,WAAY,EACZ,cAAe,EACf,kBAAmB,EAAM,eAAiB,EAAoB,KACvD,QACP,SAAU,EACO,kBACjB,cAAe,CAAE,QAAS,EAAM,KAAK,GAAI,UAAW,EAAM,KAAK,IAAK,EACpE,WAAY,EAAM,8BAClB,cAAe,GACf,iBAAkB,EAAM,eACxB,WAAY,EAAM,QAAA,CACnB,CAAA,CAEA,GAET"}
1
+ {"version":3,"file":"xUmhnDE42.chunk.js","names":[],"sources":["../../src/shared/views/play-clip/components/clipped-from/ClippedFrom.tsx","../../src/shared/views/play-clip/components/play-clip/play-clip.module.scss","../../src/shared/views/play-clip/components/play-clip/PlayClip.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CurrentUser, PresentationAudience, VideoTypes } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nconst namespace = 'shared.playClip';\n\ninterface ClippedFromProps {\n originalVideo: VideoTypes;\n queryParams: PlayViewQueryParams;\n audiences: PresentationAudience[];\n shareId?: string;\n headingRef: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n currentUser: CurrentUser;\n commonVideoProps: CommonVideoProps;\n}\n\nexport function ClippedFrom(props: ClippedFromProps) {\n const { hasPermissions } = usePermissions();\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem, presentationSlug: null });\n\n return (\n <section\n className='play-page-section'\n id={PlayPageAnchor.ClippedFrom}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.ClippedFrom, el);\n }}\n >\n <h2 className='h4 mb-0'><Text namespace={namespace} phrase='clippedFrom' /></h2>\n <VideoActionsContext.Provider value={videoActions}>\n <VideoList\n videos={[props.originalVideo]}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n hasPermissions={hasPermissions}\n presentationAudiences={props.audiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n commonVideoProps={props.commonVideoProps}\n />\n </VideoActionsContext.Provider>\n </section>\n );\n}\n","@import '~styles/utils/include-media';\n:local {\n .main.expandedToc {\n width: calc(100% - 15rem); //minus sidebar toc width and margin\n }\n\n .main.theatreMode {\n width: 100% !important;\n }\n\n .theatreModeContent {\n display: flex;\n margin: auto !important;\n\n @include media('<=xl') {\n max-width: 100%;\n }\n }\n\n .theatreModePlayPageContainer {\n //override TeacherLayoutComponent container style\n @media (min-width: 1200px) {\n max-width: none !important;\n }\n }\n\n .theatreModeLeftContent {\n width: calc(100% - 15rem);\n @include media('<=lg') {\n width: 100%;\n }\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { VideoDetailsWithScrollbarV2 } from 'libs/shared/components/play-page/details/VideoDetailsV2';\nimport { hasGlanceData } from 'libs/shared/components/play-page/glance/VideoAtAGlanceUtilsV2';\nimport { VideoAtAGlanceV2 } from 'libs/shared/components/play-page/glance/VideoAtAGlanceV2';\nimport { getResources, PlayPageResources } from 'libs/shared/components/play-page/resources-widget/PlayPageResources';\nimport { SeoConstants } from 'libs/shared/constants/SeoConstants';\nimport { GlobalPlayerConsumer } from 'libs/shared/context/player-context/components/GlobalPlayerConsumer';\nimport { usePlayerContext } from 'libs/shared/context/player-context/PlayerContext';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { HasProductFunc } from 'libs/shared/hooks/UseProducts';\nimport { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { Clip, CurrentUser, InteractiveMetadata, Link, PointOfInterest, PresentationAudience, Resource } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { DownloadHelper } from 'libs/shared/utils/DownloadHelper';\nimport { MasterTypeHelper } from 'libs/shared/utils/MasterTypeHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { CitationWidget } from 'shared/components/citations/CitationWidget';\nimport { ArchivedBanner } from 'shared/components/play-page/ArchivedBanner';\nimport { PlayPageClips } from 'shared/components/play-page/components/play-page-clips/PlayPageClips';\nimport { PlayPageInteractives } from 'shared/components/play-page/components/play-page-interactives/PlayPageInteractives';\nimport { TableOfContentsContainer, TOC_IGNORE_BOUNDARY } from 'shared/components/play-page/components/table-of-contents/TableOfContents';\nimport { PlayPageTitleAndActions } from 'shared/components/play-page/components/title-and-actions/PlayPageTitleAndActions';\nimport { getFolderAppLink, getLibraryAppLink } from 'shared/components/play-page/PlayPageUtils';\nimport { RestrictionBanner } from 'shared/components/play-page/RestrictionBanner';\nimport { PlayerPlaceholder } from 'shared/components/player-placeholder/PlayerPlaceholder';\nimport { RelatedVideos } from 'shared/components/related-videos/RelatedVideos';\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { ViewModelKeys } from 'shared/constants/LiteViewModels';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { useResourcePopup } from 'shared/views/play/components/play-page/hooks/useResourcePopup';\nimport { getContentClassName, getIsTheatreMode, getMainClassName } from 'shared/views/play/components/play-page/PlayPageUtils';\nimport { usePlayPageTableOfContent } from 'shared/views/play/hooks/usePlayPageTableOfContent';\nimport { useSectionHeadings } from 'shared/views/play/hooks/useSectionHeadings';\nimport { useTheatreModeStyle } from 'shared/views/play/hooks/useTheatreStyle';\nimport { PlayPageUtils } from 'shared/views/play/PlayPageUtil';\nimport { ClippedFrom } from 'shared/views/play-clip/components/clipped-from/ClippedFrom';\n\nimport styles from './play-clip.module.scss';\n\nconst getResourceAppLink = (videoId: string, shareId: string, canViewResource: boolean) =>\n (resource: Resource | Link) => {\n if (!canViewResource) {\n return {\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n };\n }\n\n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PREVIEW_PDF,\n args: [resource.id],\n params: {\n videoId: videoId,\n shareId: shareId\n }\n };\n };\n\ninterface PlayClipProps {\n clip: Clip;\n clips: Clip[];\n interactives: InteractiveMetadata[];\n currentUser: CurrentUser;\n relatedVideos: RelatedVideosHash;\n queryParams: PlayViewQueryParams;\n hasProduct: HasProductFunc;\n audiences: PresentationAudience[];\n shareId?: string;\n canManageVideoAccess: boolean;\n pointsOfInterest?: PointOfInterest[];\n featureAccess: VideoFeaturesHash;\n tableOfContentsId: string;\n shouldShowSideTableOfContents: boolean;\n hasTopicDirectories: boolean;\n hasTheatreMode: boolean;\n breadcrumbs?: Breadcrumb[];\n commonVideoProps: CommonVideoProps;\n}\n\nexport function PlayClip(props: PlayClipProps): JSX.Element {\n const playerContext = usePlayerContext();\n\n const { hasPermissions } = usePermissions();\n const { canConsume } = VideoHelper.getCanBeConsumed(props.clip);\n \n const theatreMode = getIsTheatreMode(props.hasTheatreMode, playerContext);\n const shouldUseTheareModeStyle = useTheatreModeStyle(\n props.hasTheatreMode,\n playerContext.mode,\n playerContext.defaultDisplayMode\n );\n\n function toggleTheatreMode(value: boolean) {\n playerContext.playerRef?.current?.toggleTheatreMode?.(value);\n }\n\n const {\n tableOfContentsActiveId,\n setTableOfContentsActiveId,\n controlledId,\n setControlledId,\n tableOfContentsExpanded,\n onToggleTableOfContents\n } = usePlayPageTableOfContent(props.tableOfContentsId, props.hasTheatreMode, theatreMode);\n\n const hasGlance = hasGlanceData(props.clip) && props.featureAccess.canViewGlance;\n\n const { headingRef, headingElements } = useSectionHeadings(hasGlance);\n const items = headingElements.map(ele => {\n return {\n id: ele.id as PlayPageAnchor,\n name: PlayPageUtils.getSectionHeading(\n ele.id as PlayPageAnchor,\n {\n clips: props.clips,\n interactives: props.interactives,\n resources: props.clip.resources?.data,\n isPlayClipPage: true\n }\n )\n };\n });\n\n useTableOfContentsActiveHeading({\n setActiveId: setTableOfContentsActiveId,\n headingElements,\n controlledId,\n setControlledId\n });\n\n useTableOfContentsScroll(headingElements, controlledId);\n\n const isArchived = VideoHelper.isVideoTypeArchived(props.clip);\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\n /**\n * Need to use a ref because if we use state, onExitImmersiveReader will have a stale\n * reference of the state. This is because the state is changed in onLaunchImmersiveReader\n * which is passed in at the same time as onExitImmersiveReader\n */\n const shouldPlayOnExitImmersiveReader = React.useRef(false);\n\n const clipResourceAppLink = getResourceAppLink(\n props.clip.id,\n props.shareId,\n props.featureAccess.canViewResourceItems\n );\n\n useResourcePopup({\n resourcePopupId: props.queryParams?.resourceId,\n resources: props.clip.resources?.data,\n getResourceAppLink: clipResourceAppLink\n });\n\n function onLaunchImmersiveReader(): void {\n shouldPlayOnExitImmersiveReader.current = !playerContext?.playerRef?.current?.isPaused();\n playerContext?.playerRef?.current?.pause();\n }\n\n function onExitImmersiveReader(): void {\n if (!shouldPlayOnExitImmersiveReader.current)\n return;\n\n playerContext?.playerRef?.current?.play();\n }\n\n function canAccessOriginal(): boolean {\n if (!props.clip._parentVideo || !props.clip._canBeConsumed?.value)\n return false;\n\n if (!props.currentUser?.isAuthenticated)\n return false;\n\n if (!props.hasProduct(ProductId.Primary))\n return false;\n\n if (hasStudentExperience)\n return false;\n\n return true;\n }\n\n function getOriginalVideoAppLink(): Core.AppLink {\n if (!canAccessOriginal())\n return null;\n \n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [\n null,\n props.clip._parentVideo.id,\n TextHelper.slugify(props.clip._parentVideo.name)\n ]\n };\n }\n\n const showPlayerPlaceholder = playerContext.mode === 'picture-in-picture' || props.featureAccess.canViewPublicLayout;\n\n const otherClips = props.clips?.filter(c => c.id.toString() !== props.clip.id.toString()) ?? [];\n\n const calcClassNameProps = {\n hasTheatreMode: props.hasTheatreMode,\n shouldShowSideTableOfContents: props.shouldShowSideTableOfContents,\n tableOfContentsExpanded,\n theatreMode\n };\n const mainClassName = getMainClassName(calcClassNameProps);\n const contentClassName = getContentClassName(calcClassNameProps);\n\n const [ , setContainerClassName ] = useViewModel(ViewModelKeys.PLAY_PAGE_CONTAINER_CLASS_NAME);\n\n const resources = getResources(props.clip, hasPermissions(PermissionName.StudentExperience));\n const downloadableResources = resources.filter(MasterTypeHelper.isResource);\n\n function onDownloadClick() {\n if (downloadableResources.length === 1) {\n DownloadHelper.downloadResource(\n downloadableResources[0],\n { clipId: props.clip.id, clipName: props.clip.name },\n { location: LocationContext.PlayClip, actionType: UserAction.Download, entity: EntityType.Resource }\n );\n return;\n }\n \n Core.AppLinkHelper.trigger({\n application: AppChannels.VIDEOS,\n action: Actions.Videos.RESOURCE_DOWNLOAD,\n args: [ props.clip?.id, props.shareId ]\n });\n }\n \n React.useEffect(() => {\n if (!theatreMode) {\n setContainerClassName('');\n } else {\n setContainerClassName(styles.theatreModePlayPageContainer);\n }\n }, [theatreMode]);\n\n React.useEffect(() => {\n return () => setContainerClassName('');\n }, []);\n\n return (\n <div className={`px-4 play-page-sections-container ${props.shouldShowSideTableOfContents ? 'row g-0' : ''}`}>\n <main className={`${styles.main} ${mainClassName}`}>\n {!!props.breadcrumbs?.length && (\n <div className='mb-2'>\n <Breadcrumbs breadcrumbs={props.breadcrumbs} />\n </div>\n )}\n\n <RestrictionBanner\n restrictions={props.clip._restrictions}\n yearGroups={props.commonVideoProps.yearGroups}\n objectId={props.clip.id}\n objectTypeId={MasterType.Clip}\n canManageVideoAccess={props.canManageVideoAccess}\n />\n\n {isArchived && (\n <ArchivedBanner\n typeId={props.clip.typeId}\n hasStudentExperience={hasStudentExperience}\n />\n )}\n\n <section\n id={PlayPageAnchor.Video}\n className={`mb-2 ${SeoConstants.GLOBAL_PLAYER_SELECTOR}`}\n ref={el => { (el && headingRef?.current) && headingRef.current.set(PlayPageAnchor.Video, el); }}\n >\n {canConsume && (\n <GlobalPlayerConsumer\n key={props.clip.id}\n objectId={props.clip.id}\n objectTypeId={props.clip.typeId}\n shareId={props.shareId}\n context={props.queryParams?.context}\n contextId={props.queryParams?.contextId}\n moviesAndTv={props.queryParams?.mtv}\n playNext={props.queryParams?.playNext}\n startTime={props.queryParams?.t ?? props.queryParams?.startTime}\n mode='default'\n location='play-page'\n />\n )}\n\n <div className={showPlayerPlaceholder ? '' : 'd-none'}>\n <PlayerPlaceholder\n video={props.clip}\n type='pip'\n />\n </div>\n </section>\n\n <div className={contentClassName}>\n <div className={shouldUseTheareModeStyle ? `${styles.theatreModeLeftContent}` : 'w-100'}>\n <PlayPageTitleAndActions\n presentationSlug={null}\n media={props.clip}\n yearGroups={props.commonVideoProps.yearGroups}\n audiences={props.audiences}\n originalVideoAppLink={getOriginalVideoAppLink()}\n featureAccess={props.featureAccess}\n shareId={props.shareId}\n showTitlePadlock={!props.commonVideoProps.hasStudentExperience\n && !props.commonVideoProps.hasGuestExperience}\n />\n\n {/* if no glance render video details here */}\n {hasGlance ? (\n <VideoAtAGlanceV2\n video={props.clip}\n pointsOfInterest={props.pointsOfInterest}\n setStartTime={(time: number) => playerContext.playerRef.current?.currentTime(time)}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n canViewGlance={hasGlance}\n />\n ) : (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n getLibraryAppLink={getLibraryAppLink}\n getFolderAppLink={getFolderAppLink}\n />\n )}\n\n <PlayPageResources\n video={props.clip}\n canViewResources={props.featureAccess.canViewResourceItems}\n imageCdnUrl={props.commonVideoProps.imageCdnUrl}\n getAppLink={clipResourceAppLink}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n resourceThumbnailFallbackUrl={ImageUrls.Fallbacks.RESOURCE_THUMBNAIL}\n headingRef={headingRef}\n onDownloadClick={onDownloadClick}\n resources={resources}\n downloadableResources={downloadableResources}\n aboutResourcesAppLink={VideoAppLinkHelper.getAboutResourceAppLink()}\n />\n\n <PlayPageInteractives\n presentationSlug={null}\n video={props.clip}\n interactives={props.interactives}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n canViewInteractives={props.featureAccess.canViewInteractives}\n headingRef={headingRef}\n commonVideoProps={props.commonVideoProps}\n />\n\n <PlayPageClips\n presentationSlug={null}\n clips={otherClips || []}\n video={props.clip}\n canViewClips={props.featureAccess.canViewClips}\n audiences={props.audiences}\n headingRef={headingRef}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n commonVideoProps={props.commonVideoProps}\n />\n\n {/* if has glance, render video details here */}\n {hasGlance && (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n showHeading\n getLibraryAppLink={hasPermissions(PermissionName.ViewLibraries) ? getLibraryAppLink : null}\n getFolderAppLink={hasPermissions(PermissionName.ViewLibraries) ? getFolderAppLink : null}\n />\n )}\n \n {!!canAccessOriginal() && (\n <ClippedFrom\n originalVideo={props.clip._parentVideo}\n shareId={props.shareId}\n queryParams={props.queryParams}\n audiences={props.audiences}\n headingRef={headingRef}\n currentUser={props.currentUser}\n commonVideoProps={props.commonVideoProps}\n />\n )}\n\n {!VideoHelper.isUgc(props.clip._parentVideo) && (\n <CitationWidget\n headingRef={headingRef}\n media={props.clip}\n parentVideo={props.clip._parentVideo}\n contentRegion={props.currentUser.contentRegion}\n shareId={props.shareId}\n presentationSlug={null}\n />\n )}\n\n <RelatedVideos\n presentationSlug={null}\n currentVideo={props.clip}\n relatedVideos={props.relatedVideos}\n currentUser={props.currentUser}\n audiences={props.audiences}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n moviesAndTv={props.queryParams.mtv}\n commonVideoProps={props.commonVideoProps}\n />\n </div>\n {theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={ null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={true}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </div>\n </main>\n\n {!theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={props.hasTheatreMode ? toggleTheatreMode : null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={false}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </div>\n );\n}\n"],"mappings":"wiDAeM,EAAY,kBAYlB,SAAgB,GAAY,EAAyB,CACnD,GAAM,CAAE,kBAAmB,EAAe,EACpC,EAAe,EAAgB,CAAE,SAAU,EAAqB,UAAW,iBAAkB,IAAK,CAAC,EAEzG,OACE,EAAA,EAAA,KAAA,CAAC,UAAD,CACE,UAAU,oBACV,GAAI,EAAe,YACnB,IAAK,GAAM,CACT,GAAO,EAAM,YAAY,SAAY,EAAM,WAAW,QAAQ,IAAI,EAAe,YAAa,CAAE,CAClG,WALF,EAOE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,oBAAU,EAAA,EAAA,IAAA,CAAC,EAAD,CAAiB,YAAW,OAAO,aAAe,CAAA,CAAK,CAAA,GAC/E,E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,CAAC,IACA,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,WAAY,EACZ,cAAe,EACf,kBAAmB,EAAM,eAAiB,EAAoB,KACvD,QACP,SAAU,EACO,kBACjB,cAAe,CAAE,QAAS,EAAM,KAAK,GAAI,UAAW,EAAM,KAAK,IAAK,EACpE,WAAY,EAAM,8BAClB,cAAe,GACf,iBAAkB,EAAM,eACxB,WAAY,EAAM,QAAA,CACnB,CAAA,CAEA,GAET"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/lite",
3
- "version": "0.104.0-rc.0",
3
+ "version": "0.104.0-rc.1",
4
4
  "description": "ClickView Lite",
5
5
  "main": "dist/scripts/bundle.js",
6
6
  "types": "dist/projects/lite/src/index.d.ts",
@@ -1 +0,0 @@
1
- {"version":3,"mappings":";okBAoBM,EAA4C,CAChD,KAAM,MACN,KAAM,SACN,KAAM,OACN,OAAQ,OACV,EAEA,SAAgB,EAAa,EAAiC,CAC5D,OAAQ,EAAR,CACE,IAAK,GACL,IAAK,GACH,MAAO,OACT,IAAK,GACH,MAAO,OACT,IAAK,GACH,MAAO,OACT,IAAK,GACH,MAAO,QACX,CAEA,OAAO,IACT,CAEA,SAAS,EAAc,EAAa,EAAe,EAAoC,CAOrF,OANI,IAAU,GAAK,IAAQ,EAClB,SAEL,GAAO,EAAQ,EACV,MAAM,EAAQ,KAEhB,UACT,CAEA,SAAgB,EAA0B,EAAuC,CAC/E,IAAM,EAAW,EAAa,EAAM,KAAK,EAEzC,OACE,UAAC,MAAD,CAAK,UAAW,EAAW,OAAQ,EAAM,SAAS,WAAlD,EACE,SAAC,KAAD,CAAI,UAAW,EACb,gDACA,EAAO,IACT,WACG,MAAM,KAAK,CAAE,OAAQ,CAAE,GAAI,EAAG,KAC7B,SAAC,KAAD,CAEE,UAAW,EACT,yDACA,EAAc,EAAK,EAAM,MAAO,CAAQ,CAC1C,CACD,EALM,kBAAkB,GAKxB,CACF,CACC,IACJ,SAAC,M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AW,EAAM,gBACjB,KAAK,kBACL,MAAO,EAAU,iBAAiB,EAClC,YAAa,EAAU,4BAA4B,EACnD,KAAK,WACL,aAAa,MACb,mBACD,GAEA,EAAM,wBACL,SAAC,EAAD,CACE,GAAG,oBACH,KAAK,oBACL,MAAO,EAAU,mBAAmB,EACpC,KAAK,WACL,QAAS,EAAY,OAAO,kBAC5B,wBAAwB,QACzB,GAGF,CAAC,EAAM,cACN,UAAC,MAAD,CAAK,UAAW,EAAM,8BAAtB,CACI,CAAC,EAAM,kBAAoB,CAAC,CAAC,EAAM,gBACnC,SAAC,SAAD,CACE,KAAK,SACL,UAAW,qBAAqB,EAAM,aAAe,KAAO,SAAW,KACvE,QAAS,EAAM,wBAEf,SAAC,EAAD,CAAiB,YAAW,OAAO,QAAU,EACvC,IAEV,SAAC,EAAD,CACE,MAAO,GACP,WAAY,EAAM,YAAc,EAAU,MAAM,EAChD,QAAS,EAAM,cACf,KAAM,EAAM,UACb,EACE,GAEH,GAEV","names":[],"ignoreList":[],"sources":["../../../../libs/shared/src/components/password-strength-indicator/PasswordStrengthIndicator.tsx","../../../../libs/shared/src/hooks/usePasswordStrength.ts","../../../../libs/shared/src/apps/user-manager/components/change-password-form-v2/ChangePasswordFormV2.tsx"],"sourcesContent":["import React from 'react';\n\nimport { classNames } from 'libs/common/react/utils/ClassNameHelper';\n\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { WarningOutlineSvg } from 'libs/shared/images/svg/status/WarningOutlineSvg';\n\nimport styles from './password-strength-indicator.module.scss';\n\ninterface PasswordStrengthIndicatorProps {\n score: number;\n warning?: string;\n suggestions?: string[];\n suggestionHeader: string;\n strengthText: string;\n className?: string;\n}\n\ntype PasswordStrength = 'weak' | 'fair' | 'good' | 'strong';\n\nconst mapping: Record<PasswordStrength, string> = {\n weak: 'red',\n fair: 'orange',\n good: 'blue',\n strong: 'green'\n};\n\nexport function scoreMapping(score: number): PasswordStrength {\n switch (score) {\n case 0:\n case 1:\n return 'weak';\n case 2:\n return 'fair';\n case 3:\n return 'good';\n case 4:\n return 'strong';\n }\n\n return null;\n}\n\nfunction getBarBgColor(idx: number, score: number, strength: PasswordStrength): string {\n if (score === 0 && idx === 0)\n return 'bg-red';\n\n if (idx <= score - 1)\n return `bg-${mapping[strength]}`;\n\n return 'bg-light';\n}\n\nexport function PasswordStrengthIndicator(props: PasswordStrengthIndicatorProps) {\n const strength = scoreMapping(props.score);\n\n return (\n <div className={classNames('pb-3', props.className)}>\n <ul className={classNames(\n 'list-group list-group-horizontal d-flex gap-2',\n styles.bars\n )}>\n {Array.from({ length: 4 }, (_, idx) => (\n <li\n key={`password-block_${idx}`}\n className={classNames(\n 'list-group-item rounded-pill border-0 flex-grow-1 py-1',\n getBarBgColor(idx, props.score, strength)\n )}\n />\n ))}\n </ul>\n <div className={classNames('mb-1 text-end')}>\n {strength &&\n <span className={classNames(\n `text-${mapping[strength]}`\n )}>\n {props.strengthText}\n </span>\n }\n </div>\n {(props.warning || props.suggestions?.length > 0) &&\n <div className='bg-light-orange d-flex gap-3 py-2 px-3'>\n <SvgContainer\n svg={WarningOutlineSvg}\n className='d-inline-block svg-container text-orange'\n size={SvgContainerSize.Standard}\n />\n <div>\n <span>{props.suggestionHeader}</span>\n <ul className='mb-0'>\n {props.warning && <li className='mt-1'>{props.warning}</li>}\n {\n props.suggestions?.map((reason, idx) => (\n <li key={`suggestion-${idx}`} className='mt-1'>{reason}</li>\n ))\n }\n </ul>\n </div>\n </div>}\n </div>\n );\n}\n","import React from 'react';\nimport type { ZxcvbnFactory } from '@zxcvbn-ts/core';\n\nimport { useDebounce } from 'libs/shared/hooks/UseDebounce';\n\nexport type PasswordStrengthResult = ReturnType<ZxcvbnFactory['check']>;\n\n/**\n * check() is synchronous and CPU bound (checkAsync only awaits async matchers, it does not\n * move off the main thread), so we debounce rather than score on every keystroke.\n */\nconst DEBOUNCE_MS = 150;\n\nconst USER_INPUTS = ['clickview'];\n\nlet zxcvbnPromise: Promise<ZxcvbnFactory> = null;\n\n/**\n * Call this on focus of a password field to start the download while the user is still\n * typing their first few characters.\n */\nexport function prefetchZxcvbn(): Promise<ZxcvbnFactory> {\n // the promise is assigned synchronously so concurrent callers share one download\n if (!zxcvbnPromise)\n zxcvbnPromise = createZxcvbnFactory().catch(error => {\n zxcvbnPromise = null; // let the next keystroke retry\n throw error;\n });\n\n return zxcvbnPromise;\n}\n\nasync function createZxcvbnFactory(): Promise<ZxcvbnFactory> {\n const [ core, common, en ] = await Promise.all([\n import('@zxcvbn-ts/core'),\n import('@zxcvbn-ts/language-common'),\n import('@zxcvbn-ts/language-en')\n ]);\n\n return new core.ZxcvbnFactory({\n graphs: common.adjacencyGraphs,\n dictionary: {\n ...common.dictionary,\n ...en.dictionary,\n userInputs: USER_INPUTS\n }\n });\n}\n\n/**\n * Returns null until the dictionaries have loaded and the debounced password has been\n * scored.\n */\nexport function usePasswordStrength(password: string): PasswordStrengthResult {\n const debouncedPassword = useDebounce(password, DEBOUNCE_MS);\n const [ result, setResult ] = React.useState<PasswordStrengthResult>(null);\n\n React.useEffect(() => {\n if (!debouncedPassword) {\n setResult(null);\n return;\n }\n\n let isCancelled = false;\n\n prefetchZxcvbn().then(zxcvbn => {\n if (!isCancelled)\n setResult(zxcvbn.check(debouncedPassword));\n }, () => {\n if (!isCancelled)\n setResult(null);\n\n () => {};\n });\n\n return () => {\n isCancelled = true;\n };\n }, [debouncedPassword]);\n\n return result;\n}\n","import React from 'react';\nimport { ButtonProps } from 'react-bootstrap';\nimport { Form, useFormikContext } from 'formik';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { ChangePasswordRequest } from 'libs/shared/apps/user-manager/interfaces';\nimport { FormButtons } from 'libs/shared/components/forms/form-buttons/FormButtons';\nimport { FormField, FormSize } from 'libs/shared/components/forms/form-field/FormField';\nimport { PasswordStrengthIndicator, scoreMapping } from 'libs/shared/components/password-strength-indicator/PasswordStrengthIndicator';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { prefetchZxcvbn, usePasswordStrength } from 'libs/shared/hooks/usePasswordStrength';\n\nconst namespace = 'shared.changePasswordFormV2';\nconst warningNamespace = 'shared.changePasswordFormWarning';\nconst suggestionNamespace = 'shared.changePasswordFormSuggestion';\n\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst REPEAT_WARNINGS = [ 'extendedRepeat', 'simpleRepeat' ];\n\ninterface ChangePasswordFormProps {\n onClickCancel?: () => void;\n \n hideButtons?: boolean;\n buttonContainerClass?: string;\n buttonSize?: FormSize;\n hideCancelButton?: boolean;\n hideCurrentPassword?: boolean;\n inputWidthClass?: string;\n showChangeOnNextLogin?: boolean;\n\n submitText?: string;\n submitVariant?: ButtonProps['variant'];\n\n minLength: number;\n passwordStrengthClassName?: string;\n}\n\nChangePasswordFormV2.defaultProps = {\n submitVariant: 'outline-dark',\n buttonContainerClass: 'btn-container d-flex justify-content-end align-items-center',\n inputWidthClass: 'w-100'\n};\n\nexport function ChangePasswordFormV2(props: ChangePasswordFormProps): JSX.Element {\n const formikProps = useFormikContext<ChangePasswordRequest>();\n\n const passwordCheck = usePasswordStrength(formikProps.values.newPassword);\n\n const warningKey = passwordCheck?.feedback?.warning;\n\n // warning is stronger than suggestion but we are treating them the same and displaying them together\n const warning = warningKey && LanguageService.getPhrase(warningNamespace, warningKey);\n\n const suggestions = passwordCheck?.feedback.suggestions\n .filter(suggestion => suggestion !== warningKey &&\n !(suggestion === 'repeated' && REPEAT_WARNINGS.includes(warningKey)))\n .map(suggestion => LanguageService.getPhrase(suggestionNamespace, suggestion));\n\n const score = passwordCheck?.score;\n\n return (\n <Form>\n {!props.hideCurrentPassword && (\n <FormField\n className={props.inputWidthClass}\n name='currentPassword'\n label={getPhrase('currentPassword')}\n placeholder={getPhrase('currentPasswordPlaceholder')}\n type='password'\n autoComplete='current-password'\n showRequiredStar\n />\n )}\n\n <FormField\n className={props.inputWidthClass}\n name='newPassword'\n label={getPhrase('newPassword')}\n placeholder={getPhrase('newPasswordPlaceholder')}\n type='password'\n autoComplete='new-password'\n onFocus={() => prefetchZxcvbn()}\n showRequiredStar\n />\n\n {props.minLength <= formikProps.values.newPassword.length && !!passwordCheck &&\n <div className='mt-n2'>\n <PasswordStrengthIndicator\n score={score}\n suggestions={suggestions}\n warning={warning}\n className={props.passwordStrengthClassName}\n suggestionHeader={getPhrase('suggestionHeader')}\n strengthText={getPhrase(scoreMapping(score))}\n />\n </div>\n }\n\n <FormField\n className={props.inputWidthClass}\n name='confirmPassword'\n label={getPhrase('confirmPassword')}\n placeholder={getPhrase('confirmPasswordPlaceholder')}\n type='password'\n autoComplete='off'\n showRequiredStar\n />\n\n {props.showChangeOnNextLogin &&\n <FormField\n id='changeOnNextLogin'\n name='changeOnNextLogin'\n label={getPhrase('changeOnNextLogin')}\n type='checkbox'\n checked={formikProps.values.changeOnNextLogin}\n checkboxLabelFontWeight='normal'\n />\n }\n \n {!props.hideButtons && (\n <div className={props.buttonContainerClass}>\n {(!props.hideCancelButton && !!props.onClickCancel) && (\n <button\n type='button'\n className={`btn btn-link me-2 ${props.buttonSize === 'lg' ? 'btn-lg' : ''}`}\n onClick={props.onClickCancel}\n >\n <Text namespace={namespace} phrase='cancel' />\n </button>\n )}\n <FormButtons\n isNew={false}\n submitText={props.submitText || getPhrase('save')}\n variant={props.submitVariant}\n size={props.buttonSize}\n />\n </div>\n )}\n </Form>\n );\n}\n"],"file":"BOuzZEkK2.chunk.js"}
@@ -1,2 +0,0 @@
1
- import{o as e}from"./DAXXjFlN.chunk.js";import{t}from"./C2w0pmFW.chunk.js";import{t as n}from"./CgCqPbjJ.chunk.js";import{t as r}from"./dLd5d3X22.chunk.js";import{t as i}from"./DpCWroEe2.chunk.js";var a=e(t(),1);function o(e){let[t,o]=r(n.SIGN_UP_ENTRY_DATA),s=i.getCurrentRoute()?.appLink;function c(){if(t)return t}function l(e){let{app:n,id:r,metadata:i}=e;n===t?.app&&r===t?.id||o({app:n,id:r,metadata:i})}return a.useEffect(()=>{e&&l(e)},[e]),a.useEffect(()=>{o(null)},[`${s?.application}:${s?.action}`]),{entryPage:c()}}export{o as t};
2
- //# sourceMappingURL=BwBWuxjr2.chunk.js.map