@clickview/exchange 0.63.0-rc.0 → 0.63.0

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 (123) hide show
  1. package/dist/.vite/manifest.json +525 -525
  2. package/dist/bundles.json +1 -1
  3. package/dist/en.json +1 -1
  4. package/dist/scripts/{XXzDL37Y.chunk.js → -x9MMtVv.chunk.js} +2 -2
  5. package/dist/scripts/{XXzDL37Y.chunk.js.map → -x9MMtVv.chunk.js.map} +1 -1
  6. package/dist/scripts/{BRJldyG42.chunk.js → 4oWF2EyV2.chunk.js} +2 -2
  7. package/dist/scripts/{BRJldyG42.chunk.js.map → 4oWF2EyV2.chunk.js.map} +1 -1
  8. package/dist/scripts/{Bbv7q795.chunk.js → 5Z0rGCy2.chunk.js} +2 -2
  9. package/dist/scripts/{Bbv7q795.chunk.js.map → 5Z0rGCy2.chunk.js.map} +1 -1
  10. package/dist/scripts/{Buz0cl_A2.chunk.js → 8vJGuJF-2.chunk.js} +2 -2
  11. package/dist/scripts/{Buz0cl_A2.chunk.js.map → 8vJGuJF-2.chunk.js.map} +1 -1
  12. package/dist/scripts/{DHyCd_bU2.chunk.js → B0jhFNam2.chunk.js} +3 -3
  13. package/dist/scripts/{DHyCd_bU2.chunk.js.map → B0jhFNam2.chunk.js.map} +1 -1
  14. package/dist/scripts/{C56J8vQn2.chunk.js → B3tq0EFi2.chunk.js} +2 -2
  15. package/dist/scripts/{C56J8vQn2.chunk.js.map → B3tq0EFi2.chunk.js.map} +1 -1
  16. package/dist/scripts/{z3xPIUA8.chunk.js → B6EmIhMh.chunk.js} +2 -2
  17. package/dist/scripts/{z3xPIUA8.chunk.js.map → B6EmIhMh.chunk.js.map} +1 -1
  18. package/dist/scripts/{CvGdC4sR2.chunk.js → BEgLlK2Z2.chunk.js} +2 -2
  19. package/dist/scripts/{CvGdC4sR2.chunk.js.map → BEgLlK2Z2.chunk.js.map} +1 -1
  20. package/dist/scripts/{DZzghMqE2.chunk.js → BEyI0jsC2.chunk.js} +2 -2
  21. package/dist/scripts/{DZzghMqE2.chunk.js.map → BEyI0jsC2.chunk.js.map} +1 -1
  22. package/dist/scripts/{hZmx1ZBr.chunk.js → BHzUOyzG.chunk.js} +2 -2
  23. package/dist/scripts/{hZmx1ZBr.chunk.js.map → BHzUOyzG.chunk.js.map} +1 -1
  24. package/dist/scripts/{CBskpS-O.chunk.js → BI2S4EFA.chunk.js} +2 -2
  25. package/dist/scripts/{CBskpS-O.chunk.js.map → BI2S4EFA.chunk.js.map} +1 -1
  26. package/dist/scripts/{_yGE4YHL2.chunk.js → BTsePUCN2.chunk.js} +2 -2
  27. package/dist/scripts/{_yGE4YHL2.chunk.js.map → BTsePUCN2.chunk.js.map} +1 -1
  28. package/dist/scripts/{CSI2paIO2.chunk.js → BaXT2aKo2.chunk.js} +2 -2
  29. package/dist/scripts/{CSI2paIO2.chunk.js.map → BaXT2aKo2.chunk.js.map} +1 -1
  30. package/dist/scripts/{CmvWR08f.chunk.js → BibFbDqs.chunk.js} +2 -2
  31. package/dist/scripts/{CmvWR08f.chunk.js.map → BibFbDqs.chunk.js.map} +1 -1
  32. package/dist/scripts/{DUcxhK9t.chunk.js → BjzONPz9.chunk.js} +2 -2
  33. package/dist/scripts/{DUcxhK9t.chunk.js.map → BjzONPz9.chunk.js.map} +1 -1
  34. package/dist/scripts/{DRwPcxvr.chunk.js → BnbM9YhY.chunk.js} +2 -2
  35. package/dist/scripts/{DRwPcxvr.chunk.js.map → BnbM9YhY.chunk.js.map} +1 -1
  36. package/dist/scripts/{l5SFnLQO.chunk.js → BrEvIvRP.chunk.js} +2 -2
  37. package/dist/scripts/{l5SFnLQO.chunk.js.map → BrEvIvRP.chunk.js.map} +1 -1
  38. package/dist/scripts/{CcQK2DGq2.chunk.js → C1guWVFU2.chunk.js} +2 -2
  39. package/dist/scripts/{CcQK2DGq2.chunk.js.map → C1guWVFU2.chunk.js.map} +1 -1
  40. package/dist/scripts/{BWVFXuZ42.chunk.js → C3K3VtRR2.chunk.js} +2 -2
  41. package/dist/scripts/{BWVFXuZ42.chunk.js.map → C3K3VtRR2.chunk.js.map} +1 -1
  42. package/dist/scripts/{lWeC_K_B.chunk.js → CAJOpkKZ.chunk.js} +2 -2
  43. package/dist/scripts/{lWeC_K_B.chunk.js.map → CAJOpkKZ.chunk.js.map} +1 -1
  44. package/dist/scripts/{feXppHqr.chunk.js → CAOBwDbU.chunk.js} +2 -2
  45. package/dist/scripts/{feXppHqr.chunk.js.map → CAOBwDbU.chunk.js.map} +1 -1
  46. package/dist/scripts/{BTP30DaC.chunk.js → CAQAUQMB.chunk.js} +2 -2
  47. package/dist/scripts/{BTP30DaC.chunk.js.map → CAQAUQMB.chunk.js.map} +1 -1
  48. package/dist/scripts/{4onqOCbS.chunk.js → CAoPaL8M.chunk.js} +2 -2
  49. package/dist/scripts/{4onqOCbS.chunk.js.map → CAoPaL8M.chunk.js.map} +1 -1
  50. package/dist/scripts/{YL1EBDd_.chunk.js → CCvXN2-C.chunk.js} +2 -2
  51. package/dist/scripts/{YL1EBDd_.chunk.js.map → CCvXN2-C.chunk.js.map} +1 -1
  52. package/dist/scripts/{D7MdAl-52.chunk.js → CDXcKno52.chunk.js} +2 -2
  53. package/dist/scripts/{D7MdAl-52.chunk.js.map → CDXcKno52.chunk.js.map} +1 -1
  54. package/dist/scripts/{B1_Y3iw-.chunk.js → CGLWqKaa.chunk.js} +2 -2
  55. package/dist/scripts/{B1_Y3iw-.chunk.js.map → CGLWqKaa.chunk.js.map} +1 -1
  56. package/dist/scripts/{BX4WdpiX.chunk.js → CHQN7xOX.chunk.js} +2 -2
  57. package/dist/scripts/{BX4WdpiX.chunk.js.map → CHQN7xOX.chunk.js.map} +1 -1
  58. package/dist/scripts/{3OI-aLOc.chunk.js → CSbvS-Cl.chunk.js} +2 -2
  59. package/dist/scripts/{3OI-aLOc.chunk.js.map → CSbvS-Cl.chunk.js.map} +1 -1
  60. package/dist/scripts/{CWY-sFVd.chunk.js → CYFRcx63.chunk.js} +2 -2
  61. package/dist/scripts/{CWY-sFVd.chunk.js.map → CYFRcx63.chunk.js.map} +1 -1
  62. package/dist/scripts/{DfMfBgzn2.chunk.js → CeeAb-HT2.chunk.js} +2 -2
  63. package/dist/scripts/{DfMfBgzn2.chunk.js.map → CeeAb-HT2.chunk.js.map} +1 -1
  64. package/dist/scripts/{DspWTyv22.chunk.js → Cllrumah2.chunk.js} +2 -2
  65. package/dist/scripts/{DspWTyv22.chunk.js.map → Cllrumah2.chunk.js.map} +1 -1
  66. package/dist/scripts/{CPzPIQB92.chunk.js → CoK2sqzN2.chunk.js} +2 -2
  67. package/dist/scripts/{CPzPIQB92.chunk.js.map → CoK2sqzN2.chunk.js.map} +1 -1
  68. package/dist/scripts/{DUVTdegJ.chunk.js → CsrTrVKj.chunk.js} +2 -2
  69. package/dist/scripts/{DUVTdegJ.chunk.js.map → CsrTrVKj.chunk.js.map} +1 -1
  70. package/dist/scripts/{C-mZmrh2.chunk.js → CuE3TVwa.chunk.js} +2 -2
  71. package/dist/scripts/{C-mZmrh2.chunk.js.map → CuE3TVwa.chunk.js.map} +1 -1
  72. package/dist/scripts/{D9yYpvIx.chunk.js → D-ivDlyL.chunk.js} +2 -2
  73. package/dist/scripts/{D9yYpvIx.chunk.js.map → D-ivDlyL.chunk.js.map} +1 -1
  74. package/dist/scripts/{ZgHZpHus2.chunk.js → D36Shrdb2.chunk.js} +2 -2
  75. package/dist/scripts/{ZgHZpHus2.chunk.js.map → D36Shrdb2.chunk.js.map} +1 -1
  76. package/dist/scripts/{DiivzK1E.chunk.js → D3Jgk2dT.chunk.js} +2 -2
  77. package/dist/scripts/{DiivzK1E.chunk.js.map → D3Jgk2dT.chunk.js.map} +1 -1
  78. package/dist/scripts/{DDU0lRB02.chunk.js → D6EZoO4S2.chunk.js} +2 -2
  79. package/dist/scripts/{DDU0lRB02.chunk.js.map → D6EZoO4S2.chunk.js.map} +1 -1
  80. package/dist/scripts/{Ca1aJXXk.chunk.js → DDO16-at.chunk.js} +2 -2
  81. package/dist/scripts/{Ca1aJXXk.chunk.js.map → DDO16-at.chunk.js.map} +1 -1
  82. package/dist/scripts/{DQhm12vh2.chunk.js → DGRBUJ6T2.chunk.js} +2 -2
  83. package/dist/scripts/{DQhm12vh2.chunk.js.map → DGRBUJ6T2.chunk.js.map} +1 -1
  84. package/dist/scripts/{PVFChK662.chunk.js → DGy73Ett2.chunk.js} +2 -2
  85. package/dist/scripts/{PVFChK662.chunk.js.map → DGy73Ett2.chunk.js.map} +1 -1
  86. package/dist/scripts/{BhygUKHG2.chunk.js → DHV6S1fA2.chunk.js} +2 -2
  87. package/dist/scripts/{BhygUKHG2.chunk.js.map → DHV6S1fA2.chunk.js.map} +1 -1
  88. package/dist/scripts/{ClJxBHin2.chunk.js → DM0JzOpR2.chunk.js} +2 -2
  89. package/dist/scripts/{ClJxBHin2.chunk.js.map → DM0JzOpR2.chunk.js.map} +1 -1
  90. package/dist/scripts/{Ovy1FgPr2.chunk.js → DOuiFwIH2.chunk.js} +2 -2
  91. package/dist/scripts/{Ovy1FgPr2.chunk.js.map → DOuiFwIH2.chunk.js.map} +1 -1
  92. package/dist/scripts/{C5zVzLiv.chunk.js → DRZvc_n5.chunk.js} +2 -2
  93. package/dist/scripts/{C5zVzLiv.chunk.js.map → DRZvc_n5.chunk.js.map} +1 -1
  94. package/dist/scripts/{e-cJ9kRJ.chunk.js → DUCTNoXj.chunk.js} +2 -2
  95. package/dist/scripts/{e-cJ9kRJ.chunk.js.map → DUCTNoXj.chunk.js.map} +1 -1
  96. package/dist/scripts/{MsShPjH12.chunk.js → Da2KHzN02.chunk.js} +2 -2
  97. package/dist/scripts/{MsShPjH12.chunk.js.map → Da2KHzN02.chunk.js.map} +1 -1
  98. package/dist/scripts/{VrblzwSV.chunk.js → DklryBsJ.chunk.js} +2 -2
  99. package/dist/scripts/{VrblzwSV.chunk.js.map → DklryBsJ.chunk.js.map} +1 -1
  100. package/dist/scripts/{V1sSszjJ.chunk.js → DsA2RTbF.chunk.js} +2 -2
  101. package/dist/scripts/{V1sSszjJ.chunk.js.map → DsA2RTbF.chunk.js.map} +1 -1
  102. package/dist/scripts/{kAq4UzUo.chunk.js → Dsmr6Wly.chunk.js} +2 -2
  103. package/dist/scripts/{kAq4UzUo.chunk.js.map → Dsmr6Wly.chunk.js.map} +1 -1
  104. package/dist/scripts/{PVKBLI-T2.chunk.js → DsolW3Wd2.chunk.js} +2 -2
  105. package/dist/scripts/{PVKBLI-T2.chunk.js.map → DsolW3Wd2.chunk.js.map} +1 -1
  106. package/dist/scripts/{C4y3yewN.chunk.js → UK8sD-oL.chunk.js} +2 -2
  107. package/dist/scripts/{C4y3yewN.chunk.js.map → UK8sD-oL.chunk.js.map} +1 -1
  108. package/dist/scripts/{C79TzhHV.chunk.js → aXgcldgY.chunk.js} +2 -2
  109. package/dist/scripts/{C79TzhHV.chunk.js.map → aXgcldgY.chunk.js.map} +1 -1
  110. package/dist/scripts/{app-DddMB3QD.js → app-lnmpv5W4.js} +3 -3
  111. package/dist/scripts/app-lnmpv5W4.js.map +1 -0
  112. package/dist/scripts/{CRtOlUhH.chunk.js → c2oA1XgG.chunk.js} +2 -2
  113. package/dist/scripts/{CRtOlUhH.chunk.js.map → c2oA1XgG.chunk.js.map} +1 -1
  114. package/dist/scripts/{CKC7r8Ck2.chunk.js → dkfSCDWH2.chunk.js} +2 -2
  115. package/dist/scripts/{CKC7r8Ck2.chunk.js.map → dkfSCDWH2.chunk.js.map} +1 -1
  116. package/dist/scripts/{Dwhojt8g2.chunk.js → jErHNuXU2.chunk.js} +2 -2
  117. package/dist/scripts/{Dwhojt8g2.chunk.js.map → jErHNuXU2.chunk.js.map} +1 -1
  118. package/dist/scripts/{BXh_8LxI2.chunk.js → mkasrghR2.chunk.js} +2 -2
  119. package/dist/scripts/{BXh_8LxI2.chunk.js.map → mkasrghR2.chunk.js.map} +1 -1
  120. package/dist/scripts/{D2D0ku9V2.chunk.js → s776Po8a2.chunk.js} +2 -2
  121. package/dist/scripts/{D2D0ku9V2.chunk.js.map → s776Po8a2.chunk.js.map} +1 -1
  122. package/package.json +1 -1
  123. package/dist/scripts/app-DddMB3QD.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"B1_Y3iw-.chunk.js","names":[],"sources":["../../../../libs/shared/src/enums/CuratorGroup.ts","../../../../libs/shared/src/hooks/useCurationStudio.ts","../../../../libs/shared/src/hooks/useVideohydration.ts","../../src/apps/exchange/hooks/useGetExchangeActions.ts"],"sourcesContent":["/**\n * The values in this enum directly\n * map to the group names in Master.\n */\nexport enum CuratorGroup {\n Developer = 'Curator Devs',\n Content = 'Content',\n Curator = 'Curators',\n Support = 'Support',\n SalesSupport = 'Sales Support',\n GraphicDesigner = 'Graphic Designers',\n MetadataEditor = 'Metadata Editors',\n ResourcingManager = 'Resourcing Managers',\n SeniorContentManager = 'Senior Content Manager',\n Marketing = 'Marketing',\n Sales = 'Sales Representatives',\n StreamableCurator = 'Streamable Curator',\n SupportExtraPermission = 'Support - Extra Permissions',\n SeoManager = 'SEO Manager',\n ContentReviewer = 'Content Reviewer'\n}\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/react/index';\n\nimport { CuratorGroup } from 'libs/shared/enums/CuratorGroup';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { Config, CuratorUserGroupCollection, CurrentUser } from 'libs/shared/interfaces';\n\nconst namespace = 'shared.hooks';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport type CurationStudioType = 'clickview' | 'clickview-live';\n\nfunction getClickViewLink(baseUrl: string, objectType: MasterType | string, id: string, presentationId?: string) {\n const baseManageUrl = UrlHelper.safeUrlConcat(baseUrl, 'manage');\n const baseExchangeUrl = UrlHelper.safeUrlConcat(baseUrl, 'exchange');\n const href = (base: string, path: string, id: string) => UrlHelper.safeUrlConcat(base, `${path}/${id}`);\n\n switch (objectType) {\n case MasterType.Subject:\n return UrlHelper.safeUrlConcat(baseManageUrl, `subjects/presentations/${presentationId}/classifications/${id}/edit`);\n case MasterType.Video:\n return href(baseManageUrl, 'videos', id);\n case MasterType.Playlist:\n return href(baseManageUrl, 'playlists', id);\n case MasterType.Series:\n return href(baseManageUrl, 'series', id);\n case MasterType.Company:\n return href(baseManageUrl, 'companies', id);\n case MasterType.Interactive:\n return href(baseManageUrl, 'interactives', id);\n case MasterType.Clip:\n return href(baseManageUrl, 'clips', id);\n case MasterType.Category:\n return href(baseExchangeUrl, 'categories', id);\n }\n}\n\nfunction getClickViewLiveLink(baseUrl: string, objectType: MasterType | string, id: string, presentationId?: string) {\n const baseSLUrl = UrlHelper.safeUrlConcat(baseUrl, 'streamable-learning');\n const href = (base: string, path: string, id: string) => UrlHelper.safeUrlConcat(base, `${path}/${id}`);\n\n switch (objectType) {\n case MasterType.Subject:\n return UrlHelper.safeUrlConcat(baseSLUrl, `${presentationId}/classifications/${id}/edit`);\n case MasterType.Video:\n return href(baseSLUrl, 'videos', id);\n case MasterType.Company:\n return href(baseSLUrl, 'companies', id);\n }\n}\n\nexport function getOpenInCurationStudioLink(\n baseUrl: string,\n objectType: MasterType | string,\n id: string,\n presentationId?: string,\n type: CurationStudioType = 'clickview'\n) {\n if (type === 'clickview-live')\n return getClickViewLiveLink(baseUrl, objectType, id, presentationId);\n\n return getClickViewLink(baseUrl, objectType, id, presentationId);\n}\n\nexport function getOpenInCurationStudioLabel(): string {\n return getPhrase('openInCurationStudio');\n}\n\nconst CLICKVIEW_CURATOR_GROUPS = [ CuratorGroup.Curator, CuratorGroup.Content, CuratorGroup.Developer ];\nconst CLICKVIEW_LIVE_CURATOR_GROUPS = [CuratorGroup.StreamableCurator];\n\nexport function useCurationStudio(type: CurationStudioType = 'clickview') {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const { data: userGroups } = Flight.useBasicFetch<CuratorUserGroupCollection>(\n (currentUser.data?.id) && UserRequests.groups(currentUser.data?.id)\n );\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const curatorGroups = type === 'clickview-live' ? CLICKVIEW_LIVE_CURATOR_GROUPS : CLICKVIEW_CURATOR_GROUPS;\n\n function isUserCurator(): boolean {\n return curatorGroups.some(group => userGroups?.data.find(userGroup => userGroup.name === group));\n }\n\n return {\n openInCurationStudioLabel: getOpenInCurationStudioLabel(),\n isUserCurator: isUserCurator(),\n getOpenInCurationStudioLink: (objectType: MasterType | string, id: string, presentationId?: string) =>\n getOpenInCurationStudioLink(config.data?.curatorUrl, objectType, id, presentationId, type)\n };\n}\n","import { Flight } from 'libs/common/react/index';\n\nimport { VideoTypes } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nexport enum VideoHydrationType {\n PlayPage\n}\n\ninterface UseVideoHydrationOptions {\n type: VideoHydrationType;\n shareId?: string;\n}\n\nexport function useVideoHydration(options: UseVideoHydrationOptions) {\n const getResponse = Flight.useGetResponseFunc();\n const fetch = Flight.useGetFetch();\n \n function getRequest(video: VideoTypes): Flight.Request {\n if (options.type !== VideoHydrationType.PlayPage)\n return null;\n\n return VideoHelper.getVideoRequest(video.id, video.typeId, options.shareId);\n }\n \n function hydrate(video: VideoTypes): void {\n const request = getRequest(video);\n const resp = getResponse(request.key);\n\n resp.shouldFetch && fetch(request);\n }\n\n function isHydrated(video: VideoTypes): boolean {\n const request = getRequest(video);\n const resp = getResponse(request.key);\n\n return resp.hasCompleted;\n }\n\n return { hydrate, isHydrated };\n}\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { EntityType, LocationContext, UserAction, VideoActionDescriptor, WorkflowPhase } from 'libs/analytics/interfaces';\nimport { UrlHelper } from 'libs/analytics/utils/UrlHelper';\n\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { LibraryRequests } from 'libs/shared/flight-requests/LibraryRequests';\nimport { useCurationStudio } from 'libs/shared/hooks/useCurationStudio';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useVideoHydration, VideoHydrationType } from 'libs/shared/hooks/useVideohydration';\nimport { AddVideoSvg } from 'libs/shared/images/svg/actions/AddVideoSvg';\nimport { NewWindowSvg } from 'libs/shared/images/svg/actions/NewWindowSvg';\nimport { Config, Library, Video, VideoTypes } from 'libs/shared/interfaces';\n\nimport { Actions } from 'shared/constants/ExchangeActions';\nimport { AppChannels } from 'shared/constants/ExchangeRadioChannels';\n\nconst namespace = 'exchange.exchangeHooks';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ntype Location = 'preview' | 'video-list';\n\nconst FETCH_MORE_ACTION_OPTION: ActionOptions = {\n lazyPlaceholder: true\n};\n\nexport function useGetExchangeActions(location: Location) {\n const { hasPermissions } = usePermissions();\n\n const { isUserCurator, openInCurationStudioLabel, getOpenInCurationStudioLink } = useCurationStudio();\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const requestLibraries = Flight.useBasicFetch<Library[]>(\n hasPermissions(PermissionName.ContributeVideo) &&\n LibraryRequests.libraryRequestLibraries()\n );\n\n const { hydrate, isHydrated } = useVideoHydration({\n type: VideoHydrationType.PlayPage\n });\n \n function getVideoActions(video: Video): ActionOptions[] {\n const isPreview = location === 'preview';\n const analyticsData = { id: video.id, name: video.name };\n const locationContext = isPreview ? LocationContext.VideoItemPreview : LocationContext.VideoListItem;\n\n const actions: ActionOptions[] = [{\n order: 10,\n label: isPreview ? getPhrase('openInClickView') : '',\n svg: NewWindowSvg,\n tooltip: isPreview ? '' : getPhrase('openInClickView'),\n className: isPreview ? 'btn btn-dark me-2' : '',\n button: true,\n href: config.data && UrlHelper.safeUrlConcat(config.data.liteUrl, `/videos/${video.id}`),\n analyticsData,\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Video,\n descriptor: VideoActionDescriptor.OpenInClickView,\n location: locationContext,\n workflowPhase: WorkflowPhase.Start\n }\n }, {\n order: 20,\n label: isPreview ? getPhrase('addVideo') : null,\n svg: !isPreview ? AddVideoSvg : undefined,\n tooltip: isPreview ? '' : getPhrase('addVideo'),\n button: !isPreview,\n appLink: {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.ADD,\n args: [video.id]\n },\n analyticsData,\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Video,\n descriptor: VideoActionDescriptor.AddToWorkspace,\n location: locationContext,\n workflowPhase: WorkflowPhase.Start\n }\n }, {\n order: 30,\n label: getPhrase('suggest'),\n className: '',\n appLink: {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.SUGGEST_EDIT,\n args: [video.id],\n params: { location: locationContext }\n },\n analyticsData,\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Video,\n descriptor: VideoActionDescriptor.SuggestEdit,\n location: locationContext,\n workflowPhase: WorkflowPhase.Start\n }\n }];\n\n if (!isHydrated(video)) {\n return [ ...actions, FETCH_MORE_ACTION_OPTION ];\n }\n\n if (video._canAddToLibrary?.customLibrary && requestLibraries.data?.length) {\n actions.push({\n order: 25,\n label: getPhrase('addToLibrary'),\n className: '',\n appLink: {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.ADD_TO_LIBRARY,\n args: [video.id]\n },\n analyticsData,\n analyticsOptions: {\n actionType: UserAction.Create,\n entity: EntityType.LibraryRequest,\n workflowPhase: WorkflowPhase.Start,\n location: locationContext\n }\n });\n }\n\n if (video._canDownload?.value) {\n actions.push({\n order: 40,\n label: getPhrase('download'),\n className: '',\n appLink: {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.DOWNLOAD_VIDEO,\n args: [video.id]\n },\n analyticsData,\n analyticsOptions: {\n actionType: UserAction.Download,\n entity: EntityType.Video,\n workflowPhase: WorkflowPhase.Start,\n location: locationContext\n }\n });\n }\n\n if (isUserCurator) {\n actions.push({\n order: 50,\n label: openInCurationStudioLabel,\n openInNewTab: true,\n href: getOpenInCurationStudioLink(MasterType.Video, video.id)\n });\n }\n\n return actions;\n }\n\n return {\n getVideoActions,\n fetchMoreActions: (video: VideoTypes) => hydrate(video)\n };\n}\n"],"mappings":"sgBAIA,IAAY,EAAL,SAAA,EAAA,OACL,GAAA,UAAA,eACA,EAAA,QAAA,UACA,EAAA,QAAA,WACA,EAAA,QAAA,UACA,EAAA,aAAA,gBACA,EAAA,gBAAA,oBACA,EAAA,eAAA,mBACA,EAAA,kBAAA,sBACA,EAAA,qBAAA,yBACA,EAAA,UAAA,YACA,EAAA,MAAA,wBACA,EAAA,kBAAA,qBACA,EAAA,uBAAA,8BACA,EAAA,WAAA,cACA,EAAA,gBAAA,yBACD,CCTK,EAAY,EAAgB,iBADhB,eAC2C,CAI7D,SAAS,EAAiB,EAAiB,EAAiC,EAAY,EAAyB,CAC/G,IAAM,EAAgB,EAAU,cAAc,EAAS,SAAS,CAC1D,EAAkB,EAAU,cAAc,EAAS,WAAW,CAC9D,GAAQ,EAAc,EAAc,IAAe,EAAU,cAAc,EAAM,GAAG,EAAK,GAAG,IAAK,CAEvG,OAAQ,EAAR,CACE,KAAK,EAAW,QACd,OAAO,EAAU,cAAc,EAAe,0BAA0B,EAAe,mBAAmB,EAAG,OAAO,CACtH,KAAK,EAAW,MACd,OAAO,EAAK,EAAe,SAAU,EAAG,CAC1C,KAAK,EAAW,SACd,OAAO,EAAK,EAAe,YAAa,EAAG,CAC7C,KAAK,EAAW,OACd,OAAO,EAAK,EAAe,SAAU,EAAG,CAC1C,KAAK,EAAW,QACd,OAAO,EAAK,EAAe,YAAa,EAAG,CAC7C,KAAK,EAAW,YACd,OAAO,EAAK,EAAe,eAAgB,EAAG,CAChD,KAAK,EAAW,KACd,OAAO,EAA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,WAAY,EAAW,SACvB,OAAQ,EAAW,MACnB,cAAe,EAAc,MAC7B,SAAU,GAEb,CAAC,CAGA,GACF,EAAQ,KAAK,CACX,MAAO,GACP,MAAO,EACP,aAAc,GACd,KAAM,EAA4B,EAAW,MAAO,EAAM,GAAA,CAC3D,CAAC,CAGG,GApDE,CAAE,GAAG,EAAS,EAA0B,CAuDnD,MAAO,CACL,kBACA,iBAAmB,GAAsB,EAAQ,EAAA,CAClD"}
1
+ {"version":3,"file":"CGLWqKaa.chunk.js","names":[],"sources":["../../../../libs/shared/src/enums/CuratorGroup.ts","../../../../libs/shared/src/hooks/useCurationStudio.ts","../../../../libs/shared/src/hooks/useVideohydration.ts","../../src/apps/exchange/hooks/useGetExchangeActions.ts"],"sourcesContent":["/**\n * The values in this enum directly\n * map to the group names in Master.\n */\nexport enum CuratorGroup {\n Developer = 'Curator Devs',\n Content = 'Content',\n Curator = 'Curators',\n Support = 'Support',\n SalesSupport = 'Sales Support',\n GraphicDesigner = 'Graphic Designers',\n MetadataEditor = 'Metadata Editors',\n ResourcingManager = 'Resourcing Managers',\n SeniorContentManager = 'Senior Content Manager',\n Marketing = 'Marketing',\n Sales = 'Sales Representatives',\n StreamableCurator = 'Streamable Curator',\n SupportExtraPermission = 'Support - Extra Permissions',\n SeoManager = 'SEO Manager',\n ContentReviewer = 'Content Reviewer'\n}\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/react/index';\n\nimport { CuratorGroup } from 'libs/shared/enums/CuratorGroup';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { Config, CuratorUserGroupCollection, CurrentUser } from 'libs/shared/interfaces';\n\nconst namespace = 'shared.hooks';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport type CurationStudioType = 'clickview' | 'clickview-live';\n\nfunction getClickViewLink(baseUrl: string, objectType: MasterType | string, id: string, presentationId?: string) {\n const baseManageUrl = UrlHelper.safeUrlConcat(baseUrl, 'manage');\n const baseExchangeUrl = UrlHelper.safeUrlConcat(baseUrl, 'exchange');\n const href = (base: string, path: string, id: string) => UrlHelper.safeUrlConcat(base, `${path}/${id}`);\n\n switch (objectType) {\n case MasterType.Subject:\n return UrlHelper.safeUrlConcat(baseManageUrl, `subjects/presentations/${presentationId}/classifications/${id}/edit`);\n case MasterType.Video:\n return href(baseManageUrl, 'videos', id);\n case MasterType.Playlist:\n return href(baseManageUrl, 'playlists', id);\n case MasterType.Series:\n return href(baseManageUrl, 'series', id);\n case MasterType.Company:\n return href(baseManageUrl, 'companies', id);\n case MasterType.Interactive:\n return href(baseManageUrl, 'interactives', id);\n case MasterType.Clip:\n return href(baseManageUrl, 'clips', id);\n case MasterType.Category:\n return href(baseExchangeUrl, 'categories', id);\n }\n}\n\nfunction getClickViewLiveLink(baseUrl: string, objectType: MasterType | string, id: string, presentationId?: string) {\n const baseSLUrl = UrlHelper.safeUrlConcat(baseUrl, 'streamable-learning');\n const href = (base: string, path: string, id: string) => UrlHelper.safeUrlConcat(base, `${path}/${id}`);\n\n switch (objectType) {\n case MasterType.Subject:\n return UrlHelper.safeUrlConcat(baseSLUrl, `${presentationId}/classifications/${id}/edit`);\n case MasterType.Video:\n return href(baseSLUrl, 'videos', id);\n case MasterType.Company:\n return href(baseSLUrl, 'companies', id);\n }\n}\n\nexport function getOpenInCurationStudioLink(\n baseUrl: string,\n objectType: MasterType | string,\n id: string,\n presentationId?: string,\n type: CurationStudioType = 'clickview'\n) {\n if (type === 'clickview-live')\n return getClickViewLiveLink(baseUrl, objectType, id, presentationId);\n\n return getClickViewLink(baseUrl, objectType, id, presentationId);\n}\n\nexport function getOpenInCurationStudioLabel(): string {\n return getPhrase('openInCurationStudio');\n}\n\nconst CLICKVIEW_CURATOR_GROUPS = [ CuratorGroup.Curator, CuratorGroup.Content, CuratorGroup.Developer ];\nconst CLICKVIEW_LIVE_CURATOR_GROUPS = [CuratorGroup.StreamableCurator];\n\nexport function useCurationStudio(type: CurationStudioType = 'clickview') {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const { data: userGroups } = Flight.useBasicFetch<CuratorUserGroupCollection>(\n (currentUser.data?.id) && UserRequests.groups(currentUser.data?.id)\n );\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const curatorGroups = type === 'clickview-live' ? CLICKVIEW_LIVE_CURATOR_GROUPS : CLICKVIEW_CURATOR_GROUPS;\n\n function isUserCurator(): boolean {\n return curatorGroups.some(group => userGroups?.data.find(userGroup => userGroup.name === group));\n }\n\n return {\n openInCurationStudioLabel: getOpenInCurationStudioLabel(),\n isUserCurator: isUserCurator(),\n getOpenInCurationStudioLink: (objectType: MasterType | string, id: string, presentationId?: string) =>\n getOpenInCurationStudioLink(config.data?.curatorUrl, objectType, id, presentationId, type)\n };\n}\n","import { Flight } from 'libs/common/react/index';\n\nimport { VideoTypes } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nexport enum VideoHydrationType {\n PlayPage\n}\n\ninterface UseVideoHydrationOptions {\n type: VideoHydrationType;\n shareId?: string;\n}\n\nexport function useVideoHydration(options: UseVideoHydrationOptions) {\n const getResponse = Flight.useGetResponseFunc();\n const fetch = Flight.useGetFetch();\n \n function getRequest(video: VideoTypes): Flight.Request {\n if (options.type !== VideoHydrationType.PlayPage)\n return null;\n\n return VideoHelper.getVideoRequest(video.id, video.typeId, options.shareId);\n }\n \n function hydrate(video: VideoTypes): void {\n const request = getRequest(video);\n const resp = getResponse(request.key);\n\n resp.shouldFetch && fetch(request);\n }\n\n function isHydrated(video: VideoTypes): boolean {\n const request = getRequest(video);\n const resp = getResponse(request.key);\n\n return resp.hasCompleted;\n }\n\n return { hydrate, isHydrated };\n}\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { EntityType, LocationContext, UserAction, VideoActionDescriptor, WorkflowPhase } from 'libs/analytics/interfaces';\nimport { UrlHelper } from 'libs/analytics/utils/UrlHelper';\n\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { LibraryRequests } from 'libs/shared/flight-requests/LibraryRequests';\nimport { useCurationStudio } from 'libs/shared/hooks/useCurationStudio';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useVideoHydration, VideoHydrationType } from 'libs/shared/hooks/useVideohydration';\nimport { AddVideoSvg } from 'libs/shared/images/svg/actions/AddVideoSvg';\nimport { NewWindowSvg } from 'libs/shared/images/svg/actions/NewWindowSvg';\nimport { Config, Library, Video, VideoTypes } from 'libs/shared/interfaces';\n\nimport { Actions } from 'shared/constants/ExchangeActions';\nimport { AppChannels } from 'shared/constants/ExchangeRadioChannels';\n\nconst namespace = 'exchange.exchangeHooks';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ntype Location = 'preview' | 'video-list';\n\nconst FETCH_MORE_ACTION_OPTION: ActionOptions = {\n lazyPlaceholder: true\n};\n\nexport function useGetExchangeActions(location: Location) {\n const { hasPermissions } = usePermissions();\n\n const { isUserCurator, openInCurationStudioLabel, getOpenInCurationStudioLink } = useCurationStudio();\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const requestLibraries = Flight.useBasicFetch<Library[]>(\n hasPermissions(PermissionName.ContributeVideo) &&\n LibraryRequests.libraryRequestLibraries()\n );\n\n const { hydrate, isHydrated } = useVideoHydration({\n type: VideoHydrationType.PlayPage\n });\n \n function getVideoActions(video: Video): ActionOptions[] {\n const isPreview = location === 'preview';\n const analyticsData = { id: video.id, name: video.name };\n const locationContext = isPreview ? LocationContext.VideoItemPreview : LocationContext.VideoListItem;\n\n const actions: ActionOptions[] = [{\n order: 10,\n label: isPreview ? getPhrase('openInClickView') : '',\n svg: NewWindowSvg,\n tooltip: isPreview ? '' : getPhrase('openInClickView'),\n className: isPreview ? 'btn btn-dark me-2' : '',\n button: true,\n href: config.data && UrlHelper.safeUrlConcat(config.data.liteUrl, `/videos/${video.id}`),\n analyticsData,\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Video,\n descriptor: VideoActionDescriptor.OpenInClickView,\n location: locationContext,\n workflowPhase: WorkflowPhase.Start\n }\n }, {\n order: 20,\n label: isPreview ? getPhrase('addVideo') : null,\n svg: !isPreview ? AddVideoSvg : undefined,\n tooltip: isPreview ? '' : getPhrase('addVideo'),\n button: !isPreview,\n appLink: {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.ADD,\n args: [video.id]\n },\n analyticsData,\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Video,\n descriptor: VideoActionDescriptor.AddToWorkspace,\n location: locationContext,\n workflowPhase: WorkflowPhase.Start\n }\n }, {\n order: 30,\n label: getPhrase('suggest'),\n className: '',\n appLink: {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.SUGGEST_EDIT,\n args: [video.id],\n params: { location: locationContext }\n },\n analyticsData,\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Video,\n descriptor: VideoActionDescriptor.SuggestEdit,\n location: locationContext,\n workflowPhase: WorkflowPhase.Start\n }\n }];\n\n if (!isHydrated(video)) {\n return [ ...actions, FETCH_MORE_ACTION_OPTION ];\n }\n\n if (video._canAddToLibrary?.customLibrary && requestLibraries.data?.length) {\n actions.push({\n order: 25,\n label: getPhrase('addToLibrary'),\n className: '',\n appLink: {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.ADD_TO_LIBRARY,\n args: [video.id]\n },\n analyticsData,\n analyticsOptions: {\n actionType: UserAction.Create,\n entity: EntityType.LibraryRequest,\n workflowPhase: WorkflowPhase.Start,\n location: locationContext\n }\n });\n }\n\n if (video._canDownload?.value) {\n actions.push({\n order: 40,\n label: getPhrase('download'),\n className: '',\n appLink: {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.DOWNLOAD_VIDEO,\n args: [video.id]\n },\n analyticsData,\n analyticsOptions: {\n actionType: UserAction.Download,\n entity: EntityType.Video,\n workflowPhase: WorkflowPhase.Start,\n location: locationContext\n }\n });\n }\n\n if (isUserCurator) {\n actions.push({\n order: 50,\n label: openInCurationStudioLabel,\n openInNewTab: true,\n href: getOpenInCurationStudioLink(MasterType.Video, video.id)\n });\n }\n\n return actions;\n }\n\n return {\n getVideoActions,\n fetchMoreActions: (video: VideoTypes) => hydrate(video)\n };\n}\n"],"mappings":"sgBAIA,IAAY,EAAL,SAAA,EAAA,OACL,GAAA,UAAA,eACA,EAAA,QAAA,UACA,EAAA,QAAA,WACA,EAAA,QAAA,UACA,EAAA,aAAA,gBACA,EAAA,gBAAA,oBACA,EAAA,eAAA,mBACA,EAAA,kBAAA,sBACA,EAAA,qBAAA,yBACA,EAAA,UAAA,YACA,EAAA,MAAA,wBACA,EAAA,kBAAA,qBACA,EAAA,uBAAA,8BACA,EAAA,WAAA,cACA,EAAA,gBAAA,yBACD,CCTK,EAAY,EAAgB,iBADhB,eAC2C,CAI7D,SAAS,EAAiB,EAAiB,EAAiC,EAAY,EAAyB,CAC/G,IAAM,EAAgB,EAAU,cAAc,EAAS,SAAS,CAC1D,EAAkB,EAAU,cAAc,EAAS,WAAW,CAC9D,GAAQ,EAAc,EAAc,IAAe,EAAU,cAAc,EAAM,GAAG,EAAK,GAAG,IAAK,CAEvG,OAAQ,EAAR,CACE,KAAK,EAAW,QACd,OAAO,EAAU,cAAc,EAAe,0BAA0B,EAAe,mBAAmB,EAAG,OAAO,CACtH,KAAK,EAAW,MACd,OAAO,EAAK,EAAe,SAAU,EAAG,CAC1C,KAAK,EAAW,SACd,OAAO,EAAK,EAAe,YAAa,EAAG,CAC7C,KAAK,EAAW,OACd,OAAO,EAAK,EAAe,S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AO,GACP,MAAO,EAAU,WAAW,CAC5B,UAAW,GACX,QAAS,CACP,YAAa,EAAY,SACzB,OAAQ,EAAQ,SAAS,eACzB,KAAM,CAAC,EAAM,GAAA,CACd,CACD,gBACA,iBAAkB,CAChB,WAAY,EAAW,SACvB,OAAQ,EAAW,MACnB,cAAe,EAAc,MAC7B,SAAU,GAEb,CAAC,CAGA,GACF,EAAQ,KAAK,CACX,MAAO,GACP,MAAO,EACP,aAAc,GACd,KAAM,EAA4B,EAAW,MAAO,EAAM,GAAA,CAC3D,CAAC,CAGG,GApDE,CAAE,GAAG,EAAS,EAA0B,CAuDnD,MAAO,CACL,kBACA,iBAAmB,GAAsB,EAAQ,EAAA,CAClD"}
@@ -1,2 +1,2 @@
1
- import{C as e,D as t,O as n,b as r,bt as i,d as a,fn as o,o as s,s as c}from"./B1i9atik.chunk.js";import{_ as l,g as u,t as d,v as f}from"./NpQVkKE2.chunk.js";import{t as p}from"./BG5Aor0J.chunk.js";import{t as m}from"./CzvVp9iC.chunk.js";import{n as h}from"./B6rKNJWQ.chunk.js";import{t as g}from"./YhCzLJGK.chunk.js";import{tt as _}from"./app-DddMB3QD.js";import{s as v}from"./B4b3fF2e.chunk.js";import{t as y}from"./V1sSszjJ.chunk.js";var b=function(e){return e.LatestReleases=`latest-releases`,e.ExploreAllTopics=`explore-all-topics`,e.ClassificationLatestReleases=`classification-latest-releases`,e.ClassificationDirectory=`classification-directory`,e}({}),x=[`video`,`clip`,`interactive`],S=[`playlist`,`series`,`clip`,`classification`,`interactive`,`video`,`company`,`category`,`partner_profile`],C=[`user`],w=`sort.classification.presentation.audience.yearGroup.moviesAndTv.type.rating.interactives.clips.classroom.hasResources.hasSubtitles.productionYear.isHd.producedByClickView.duration.tagOrClassification.status.isAdmin.bulkActionType.userType.filter.channel.dateBroadcast.categoryId.hasInteractives.jobStatus.source.customerStatus.specialEventType.customerType.seriesId.scopeId`.split(`.`),T={type:!0},E=w.reduce((e,t)=>({...e,[t]:!T[t]}),{}),D=function(e){return e.MyVideos=`my-videos`,e.School=`school`,e.ExchangeArchive=`exchange-archive`,e.ClickView=`clickview`,e.LiveStreams=`livestreams`,e}({}),O=function(e){return e.Video=`video`,e.Series=`series`,e.Playlist=`playlist`,e.Classification=`classification`,e.Clip=`clip`,e.Interactive=`interactive`,e.Company=`company`,e.Category=`category`,e.PartnerProfile=`partner_profile`,e}({}),k=function(e){return e.ThumbnailHeroMedia=`thumbnail_hero_media`,e.ThumbnailFeaturedMedia=`thumbnail_featured_media`,e.ThumbnailSlidingListSmall=`thumbnail_sliding_list_small`,e.ThumbnailSlidingListSmallV2=`thumbnail_sliding_list_small_v2`,e.ThumbnailSlidingListLarge=`thumbnail_sliding_list_large`,e.ThumbnailFixedListMediaSmall=`thumbnail_fixed_list_media_small`,e.ThumbnailFixedListMediaLarge=`thumbnail_fixed_list_media_large`,e.ThumbnailFixedListFolderSmall=`thumbnail_fixed_list_folder_small`,e.ThumbnailVerticalList=`thumbnail_vertical_list`,e.PopoutThumbnailSlidingListLarge=`popout_thumbnail_sliding_list_large`,e.PopoutThumbnailSlidingListSmall=`popout_thumbnail_sliding_list_small`,e.FeaturedThumbnailSlidingList=`featured_thumbnail_sliding_list`,e.ThumbnailFixedListXLarge=`thumbnail_fixed_list_xlarge`,e.CoverSlidingPillListSmall=`cover_sliding_pill_list_small`,e.CoverFixedPillListLarge=`cover_fixed_pill_list_large`,e.StatsCoverFixedPillListLarge=`stats_cover_fixed_pill_list_large`,e.CoverFixedPillListXSmall=`cover_fixed_pill_list_xsmall`,e.ThumbnailFixedListLarge=`thumbnail_fixed_list_large`,e.ThumbnailFixedListSmall=`thumbnail_fixed_list_small`,e.EditableCoverFixedPillListSmall=`editable_cover_fixed_pill_list_small`,e.HeroBanner=`hero_banner`,e.HeroThumbnailSmall=`hero_thumbnail_small`,e.HeroBlockColourSmall=`hero_block_colour_small`,e.CurriculumResourcesAccordion=`curriculum_resources_accordion`,e.CurriculumCodeSearchResults=`curriculum_code_search_results`,e.CoverFixedTileList=`cover_fixed_tile_list`,e.PosterSlidingListLarge=`poster_sliding_list_large`,e.PosterSlidingListMedium=`poster_sliding_list_medium`,e.PosterSlidingListSmall=`poster_sliding_list_small`,e.PosterFixedListLarge=`poster_fixed_list_large`,e.HeroBannerSmall=`hero_banner_small`,e.Heading=`heading`,e.AuthorReviewer=`author_reviewer`,e.Question=`question`,e.QuestionAccordion=`question_accordion`,e.CircleLogoSlidingList=`circle_logo_sliding_list`,e.RectangularLogoSlidingList=`rectangular_logo_sliding_list`,e.RectangularLogoFixedList=`rectangular_logo_fixed_list`,e.ThumbnailFixedListSearchCta=`thumbnail_fixed_list_search_cta`,e.InfiniteThumbnailVerticalList=`infinite_thumbnail_vertical_list`,e.FilterSlidingPillListSmall=`filter_sliding_pill_list_small`,e.EventIconSlidingList=`event_icon_sliding_list`,e.TagSlidingList=`tag_sliding_list`,e.SearchSuggestionsBlurb=`search_suggestions_blurb`,e}({}),A=function(e){return e.CuratedMedia=`curated_media`,e.PlaylistMedia=`playlist_media`,e.SeriesMedia=`series_media`,e.ClassificationMedia=`classification_media`,e.LatestReleasedVideos=`latest_released_videos`,e.ContinueWatching=`continue_watching_videos`,e.CompanyLatestReleasedVideo=`company_latest_released_video`,e.CompanyVideos=`company_videos`,e.ClassificationLatestReleasedVideo=`classification_latest_released_video`,e.ClassificationLatestReleasedVideosV2=`classification_latest_released_videos_v2`,e.CompanyClassificationVideos=`company_classification_videos`,e.ClassificationDashboardMedia=`classification_dashboard_media`,e.ClassificationDashboardExternalMedia=`classification_dashboard_external_media`,e.SeasonalClassificationMedia=`seasonal_classification_media`,e.TrendingClassificationsMedia=`trending_classifications_media`,e.ClassificationCurriculumMedia=`classification_curriculum_media`,e.CuratedClassifications=`curated_classifications`,e.Classifications=`classifications`,e.ClassificationLatestReleasedVideos=`classification_latest_released_videos`,e.SpecialEventClassifications=`special_event_classifications`,e.LatestReleasedClassifications=`latest_released_classifications`,e.TrendingClassifications=`trending_classifications`,e.CuratedSeries=`curated_series`,e.CuratedPlaylists=`curated_playlists`,e.Blurb=`blurb`,e.DynamicBlurb=`dynamic_blurb`,e.AuthorReviewer=`author_reviewer`,e.Faq=`faq`,e.CuratedCompanies=`curated_companies`,e.CuratedContentPartners=`curated_content_partners`,e.ContentPartnerLatestReleasedVideos=`content_partner_latest_released_videos`,e.ContentPartnerSeries=`content_partner_series`,e.ContentPartnerVideos=`content_partner_videos`,e.SpotlightContentPartners=`spotlight_curated_content_partners`,e.ContentPartners=`content_partners`,e.ContentPartnersHub=`content_partners_hub`,e.TrendingContentPartnersVideo=`content_partner_trending_videos`,e.ContentPartnerAllVideos=`content_partner_all_videos`,e.Ratings=`ratings`,e.Presentations=`presentations`,e.UpcomingLivestreams=`upcoming_livestreams`,e.CuratedMultimedia=`curated_multimedia`,e.ClassificationPlaylists=`classification_playlists`,e.ClassificationSeries=`classification_series`,e.ClassificationFeaturedVideo=`classification_featured_video`,e.ClassificationPinnedVideos=`classification_pinned_videos`,e.SearchRelevantTopics=`search_relevant_topics`,e.SearchCompanies=`search_companies`,e.SearchTopResults=`search_top_results`,e.SearchSeries=`search_series`,e.SearchPlaylists=`search_playlists`,e.SearchMyVideosFolder=`search_my_videos_folders`,e.SearchMySchoolLibraryFolder=`search_my_school_library_folders`,e.SearchMyVideos=`search_my_videos`,e.SearchMySchoolLibraryVideos=`search_my_school_library_videos`,e.SearchExchangeArchive=`search_exchange_archive`,e.SearchClickViewLive=`search_clickview_live`,e.SearchRelatedResults=`search_related_results`,e.SearchTags=`search_tags`,e.SearchCurriculumCode=`search_curriculum_code`,e.SearchSuggestions=`search_suggestions`,e.SearchContentPartners=`search_content_partners`,e}({}),j={onSelectCuratedObject(e,t){let n={...t.values.data,objectIds:p.addOrRemoveImmutable(t.values.data.objectIds||[],e.id)};t.setFieldValue(`data`,n),t.setTouched({...t.touched,data:{objectIds:!0}})},onRemoveCuratedObject(e,t){let n={...t.values.data,objectIds:t.values.data.objectIds.filter(t=>t!==e)};t.setFieldValue(`data`,n)},getDashboardTarget(e){return e.targetType===v.Discover?`discover:presentation:${e.presentationId}`:e.targetType===v.Classification?`classification:${e.classificationId}`:e.targetType===v.ClassificationDirectory?`classification:${e.classificationId}:directory`:e.targetType===v.ClassificationCurriculum?`classification:${e.classificationId}:curriculum`:e.targetType===v.MoviesAndTv?`moviesAndTv:presentation:${e.presentationId}`:e.targetType===v.Company?`company:${e.companyId}:presentation:${e.presentationId}`:e.targetType===v.PartnerProfile?`partnerprofile:${e.slug}`:e.targetType===v.DiscoverPartnerProfiles?`discover:partners`:e.targetType===v.PartnerProfileHub?`discover:partners:hub`:null},getUnknownDashboardTarget(e){let{presentationId:t,companyId:n,targetType:r,classificationId:i,slug:a}=e;if(r===v.Discover)return j.getDashboardTarget({targetType:v.Discover,presentationId:t});if(r===v.MoviesAndTv)return j.getDashboardTarget({targetType:v.MoviesAndTv,presentationId:t});if(r===v.Company)return j.getDashboardTarget({targetType:v.Company,presentationId:t,companyId:n});if(r===v.Classification)return j.getDashboardTarget({targetType:v.Classification,classificationId:i});if(r===v.ClassificationDirectory)return j.getDashboardTarget({targetType:v.ClassificationDirectory,classificationId:i});if(r===v.ClassificationCurriculum)return j.getDashboardTarget({targetType:v.ClassificationCurriculum,classificationId:i});if(r===v.PartnerProfile)return j.getDashboardTarget({targetType:v.PartnerProfile,slug:a});if(r===v.DiscoverPartnerProfiles)return j.getDashboardTarget({targetType:v.DiscoverPartnerProfiles});if(r===v.PartnerProfileHub)return j.getDashboardTarget({targetType:v.PartnerProfileHub})},getDashboardTargetInfo(e){let t=j.getDashboardTargetType(e),n=e?.target?.split(`:`);return t===v.Discover?{targetType:v.Discover,presentationId:n[2]}:t===v.Classification?{targetType:v.Classification,classificationId:n[1]}:t===v.ClassificationDirectory?{targetType:v.ClassificationDirectory,classificationId:n[1]}:t===v.ClassificationCurriculum?{targetType:v.ClassificationCurriculum,classificationId:n[1]}:t===v.MoviesAndTv?{targetType:v.MoviesAndTv,presentationId:n[2]}:t===v.Company?{targetType:v.Company,companyId:n[1],presentationId:n[3]}:t===v.PartnerProfile?{targetType:v.PartnerProfile,slug:n[1]}:null},getDashboardTargetType(e){return e?.target?e.target.startsWith(`discover`)?e.target.endsWith(`partners`)?v.DiscoverPartnerProfiles:e.target.endsWith(`hub`)?v.PartnerProfileHub:v.Discover:e.target.startsWith(`classification`)?e.target.endsWith(`directory`)?v.ClassificationDirectory:e.target.endsWith(`curriculum`)?v.ClassificationCurriculum:v.Classification:e.target.startsWith(`moviesAndTv`)?v.MoviesAndTv:e.target.startsWith(`company`)?v.Company:e.target.startsWith(`partnerprofile`)?v.PartnerProfile:null:null},isType(e,t){return j.getDashboardTargetType(e)===t},isCuratedDashboard(e){let t=e,n=j.getDashboardTargetType(t);return n===v.Discover||n===v.Classification||n===v.ClassificationDirectory||n===v.ClassificationCurriculum||n===v.MoviesAndTv||n===v.Company},getLatestReleasedTimeRange(){let e=new Date;return{from:g.format(g.endOf(g.subtract(e,2,`month`),`day`),`YYYY-MM-DD`),to:g.format(g.endOf(e,`day`),`YYYY-MM-DD`)}},getWidgetParams(e,t,n,r,i,a){let o={};return r&&(o.audienceId=r),e===A.ClassificationCurriculumMedia&&(o.curriculumPresentationId=i),{...o,...N[e]?.getCustomParams?.(t,n,a)}},isSystemGeneratedDashboard(e){let t=new Set([A.ClassificationFeaturedVideo,A.ClassificationPinnedVideos,A.ClassificationPlaylists,A.ClassificationSeries]);return e?.some(e=>t.has(e.widgetId))},isClassificationDashboard(e){return[v.Classification,v.ClassificationDirectory,v.ClassificationCurriculum].includes(e?.targetType)},isContentPartnerDashboard(e){return e?.targetType===v.PartnerProfile},isDirectoryDashboard(e){return e?.targetType===v.ClassificationDirectory},isWidgetTypeEnabled(e,t,n){return N[e]?.predicate?.({settingsHash:t,targetType:n})??!0}};function M(e){return e.settingsHash?.hasPartnerProfiles??!1}var N={[A.CuratedMedia]:{getCustomParams:()=>({})},[A.PlaylistMedia]:{getCustomParams:()=>({})},[A.SeriesMedia]:{getCustomParams:e=>{switch(e){case k.ThumbnailFixedListMediaLarge:return{limit:2};case k.ThumbnailHeroMedia:case k.ThumbnailFeaturedMedia:return{limit:1};default:return{limit:12}}},getCollectionAppLink:(e,t)=>e?.series?.(p.first(t))},[A.ClassificationMedia]:{getCustomParams:()=>({})},[A.LatestReleasedVideos]:{getCustomParams:()=>j.getLatestReleasedTimeRange()},[A.ContinueWatching]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e?.watchHistory?.()},[A.CompanyLatestReleasedVideo]:{getCustomParams:()=>({})},[A.CompanyVideos]:{getCustomParams:()=>({})},[A.ClassificationLatestReleasedVideo]:{getCustomParams:()=>({})},[A.ClassificationLatestReleasedVideosV2]:{getCustomParams:()=>({limit:12}),minContent:4},[A.SeasonalClassificationMedia]:{getCustomParams:()=>({limit:12}),minContent:4},[A.CompanyClassificationVideos]:{getCustomParams:()=>({}),minContent:4},[A.TrendingClassificationsMedia]:{getCustomParams:()=>({limit:12}),minContent:4},[A.CuratedClassifications]:{getCustomParams:()=>({})},[A.TrendingClassifications]:{getCustomParams:()=>({limit:6}),minContent:3},[A.Classifications]:{getCustomParams:(e,t)=>{if(t===v.Discover){if(e===k.EditableCoverFixedPillListSmall)return{canBePreferred:!0,isFollowing:!0};if([k.PosterSlidingListSmall,k.CoverFixedPillListXSmall].includes(e))return{canBePreferred:!0}}return{}}},[A.ClassificationLatestReleasedVideos]:{getCustomParams:()=>j.getLatestReleasedTimeRange()},[A.SpecialEventClassifications]:{getCustomParams:()=>({from:g.format(new Date,`YYYY-MM-DD`)})},[A.LatestReleasedClassifications]:{getCustomParams:()=>({limit:6}),minContent:3},[A.CuratedSeries]:{getCustomParams:()=>({})},[A.CuratedPlaylists]:{getCustomParams:()=>({})},[A.Blurb]:{getCustomParams:()=>({})},[A.DynamicBlurb]:{getCustomParams:()=>({})},[A.AuthorReviewer]:{getCustomParams:()=>({})},[A.Faq]:{getCustomParams:()=>({})},[A.CuratedCompanies]:{getCustomParams:()=>({}),predicate:e=>!e.settingsHash?.hasPartnerProfiles},[A.Ratings]:{getCustomParams:()=>({})},[A.Presentations]:{getCustomParams:()=>({})},[A.UpcomingLivestreams]:{getCustomParams:()=>({from:g.format(new Date,`YYYY-MM-DD`)})},[A.CuratedMultimedia]:{getCustomParams:()=>({})},[A.ClassificationPlaylists]:{getCustomParams:()=>({})},[A.ClassificationSeries]:{getCustomParams:()=>({})},[A.ClassificationFeaturedVideo]:{getCustomParams:()=>({})},[A.ClassificationPinnedVideos]:{getCustomParams:()=>({})},[A.ClassificationDashboardExternalMedia]:{getCustomParams:()=>({})},[A.ClassificationDashboardMedia]:{getCustomParams:()=>({})},[A.SearchRelevantTopics]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchRelevantTopics],type:[O.Classification]})},[A.SearchCompanies]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchCompanies],type:[O.Company]}),predicate:e=>!e.settingsHash?.hasPartnerProfiles},[A.SearchSeries]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchSeries],type:[O.Series]})},[A.SearchPlaylists]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchPlaylists],type:[O.Playlist]})},[A.SearchMyVideosFolder]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchMyVideosFolder],source:[D.MyVideos]})},[A.SearchMySchoolLibraryFolder]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchMySchoolLibraryFolder],source:[D.School]})},[A.SearchMyVideos]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchMyVideos],source:[D.MyVideos]})},[A.SearchMySchoolLibraryVideos]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchMySchoolLibraryVideos],source:[D.School]})},[A.SearchExchangeArchive]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchExchangeArchive],source:[D.ExchangeArchive]})},[A.SearchClickViewLive]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchClickViewLive],source:[D.LiveStreams]}),predicate:e=>e.settingsHash?.clickViewLive??!1},[A.SearchRelatedResults]:{getCustomParams:()=>({})},[A.SearchTopResults]:{getCustomParams:()=>({})},[A.ClassificationCurriculumMedia]:{getCustomParams:()=>({})},[A.SearchTags]:{getCustomParams:()=>({})},[A.SearchCurriculumCode]:{getCustomParams:()=>({})},[A.SearchSuggestions]:{getCustomParams:()=>({})},[A.SearchContentPartners]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchContentPartners],type:[O.PartnerProfile]}),predicate:M},[A.CuratedContentPartners]:{getCustomParams:()=>({limit:12}),predicate:M},[A.ContentPartnerLatestReleasedVideos]:{getCustomParams:()=>({}),predicate:M},[A.ContentPartnerSeries]:{getCollectionAppLink:e=>e?.scopedSearchHome?.({type:[O.Series]}),getCustomParams:()=>({limit:12}),predicate:M},[A.ContentPartnerVideos]:{getCustomParams:()=>({}),predicate:M},[A.SpotlightContentPartners]:{getCustomParams:()=>({}),predicate:M},[A.ContentPartners]:{getCustomParams:(e,t,n)=>({letterPrefix:n?.params?.letterPrefix,sort:n?.params?.sort}),predicate:M},[A.ContentPartnersHub]:{getCustomParams:(e,t,n)=>t===v.PartnerProfileHub?{objectId:n?.params?.objectId}:{},predicate:M},[A.TrendingContentPartnersVideo]:{getCustomParams:()=>({}),predicate:M},[A.ContentPartnerAllVideos]:{getCustomParams:e=>e===k.ThumbnailFixedListSearchCta?{limit:3}:{},predicate:M}},P=o(t()),F=e();function I(e){return(0,F.jsx)(`svg`,{...e,children:(0,F.jsx)(`path`,{d:`m13.026 4.377 8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0M12 5 3.5 19h17zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2m.75-3.677a.69.69 0 0 1-.7.677.69.69 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677s.7.303.7.677z`,fill:`currentColor`})})}var L=function(e){return e[e.Draft=0]=`Draft`,e[e.Published=1]=`Published`,e[e.Archived=2]=`Archived`,e}({}),R=function(e){return e.Draft=`Draft`,e.Published=`Published`,e.Archived=`Archived`,e}(R||{}),z={getSliderAnalyticsOptions:()=>({actionType:r.Click,location:a.SlidingList,entity:c.Widget,descriptor:s.Slide}),getSliderItemAnalyticsOptions:()=>({location:a.SlidingListItem}),getSliderHeadingAnalyticsOptions:()=>({actionType:r.Click,location:a.SlidingList,entity:c.Widget,descriptor:s.Title}),useGetContent(e,t,n,r,i){return P.useMemo(()=>{if(!e)return{content:null,unfilteredContent:null};if(!Array.isArray(e))return{content:e,unfilteredContent:e};let a=r?.reduce((e,t)=>(e[t.id]=t,e),{})??{},o=i.reduce((e,t)=>(e[t]=!0,e),{}),s=[...e],c=s.sort((e,t)=>{if(!(`id`in e)||!(`id`in t))return 0;let n=a[e.id]?.index??s.findIndex(t=>`id`in t&&t.id===e.id),r=a[t.id]?.index??s.findIndex(e=>`id`in e&&e.id===t.id);return n<r?-1:n>r?1:0});return z.isBelowContentMinimum(c,t)&&!n?{content:[],unfilteredContent:c}:{content:c.filter(e=>!(a[`id`in e&&e.id]?.hidden||o[`id`in e&&e.id])),unfilteredContent:c}},[e,r])},isBelowContentMinimum(e,t){let n=N[t]?.minContent||0;return e?.length<n},getCustomAppLink(e){return!(`metadata`in e)||!(`appLinks`in e)||!(`appLink`in e.metadata)?null:e.metadata?.appLink===b.LatestReleases&&`latestReleases`in e.appLinks?e.appLinks?.latestReleases?.():e.metadata?.appLink===b.ExploreAllTopics&&`allTopics`in e.appLinks&&`presentation`in e?e.appLinks?.allTopics?.(e.presentation.id):null},getWidgetStatus(e){let t=e.status;if(typeof t==`string`)switch(t){case R.Archived:t=L.Archived;break;case R.Published:t=L.Published;break;case R.Draft:t=L.Draft;break}return t},formatResponseData(e,t){let n=e.content;if(!n)return e;if(`author`in n)return e.content=[n],e;switch(`data`in n?e.content=n.data:Array.isArray(n)||(e.content=[n]),e.widgetId){case A.ClassificationSeries:e.content=e.content.filter(e=>`tallPoster`in e&&!!e.tallPoster?.id);break;case A.ClassificationPlaylists:e.content=e.content.filter(e=>`cover`in e&&!!e.cover?.id);break;case A.ContinueWatching:e.content=e.content.map(e=>`object`in e&&e.object);default:break;case A.Presentations:e.content=e.content.filter(e=>`id`in e&&e.id.toString()!==t?.id?.toString());break}return e},isWidgetInTableOfContents(e){return!!e?.showInTableOfContents},hasNoContent(e){return e===A.Blurb},canDisplayOnScreenSize(e,t,n){return t===A.Blurb&&n===k.HeroBannerSmall?!e.xs&&!e.sm:!0},isCompanyWidget(e){switch(e){case A.CompanyLatestReleasedVideo:case A.CompanyVideos:case A.UpcomingLivestreams:return!0;default:return!1}},getVideoContent(e){let t=p.first(e);return y.isType(t,_.Series)?t.videos.data:e},showRemoveButton(e){return e===A.ContinueWatching},mergeWidgets(e,t){let r=n.deepClone(e),i=p.groupBy(r,`widgetId`),a=[];for(let e of Object.values(i)){let n=null,r=[];for(let i of e){if(!n){n=i;continue}if(i.templateId!==n.templateId){r.push(n),n=i;continue}t(n,i)}n&&r.push(n),a.push(...r)}return a}},B={widgetTextButton:`_widgetTextButton_em1zx_1`},V=m.encloseNamespace(`shared.widgetHeader`);function H(e){return i.getHref(e.appLink)?(0,F.jsx)(`div`,{className:`ms-3 ${B.widgetTextButton}`,children:(0,F.jsx)(u,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:{location:a.SlidingList,...e.analyticsOptions,descriptor:s.SeeMore},className:`text-decoration-none ${e.appLink?`curated-widget-link`:``}`,children:(0,F.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading`,children:V(`seeAll`)})})}):null}function U(e){return(0,F.jsx)(`div`,{className:`ms-3 ${B.widgetTextButton} text-decoration-none cursor-pointer`,onClick:e.onClose,children:(0,F.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading`,children:V(`hide`)})})}function W(e){return(0,F.jsx)(`div`,{className:`ms-3 ${B.widgetTextButton} text-decoration-none`,children:e.showFollowSpinner?(0,F.jsx)(h,{as:`span`,animation:`border`,role:`status`,size:`sm`}):(0,F.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading cursor-pointer`,onClick:()=>e.onFollow(!e.isFollowing),children:V(e.isFollowing?`unfollow`:`follow`)})})}function G(e){let t=!!e.description;if(!e.name&&!e.description)return(0,F.jsx)(F.Fragment,{});let n=z.isBelowContentMinimum(e.content,e.widgetTypeId),r=N[e.widgetTypeId]?.minContent??0;return(0,F.jsxs)(`div`,{className:`curated-widget-header`,children:[(0,F.jsxs)(`div`,{className:`d-flex justify-content-between`,children:[!!e.name&&(0,F.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,F.jsx)(u,{appLink:e.appLink,analyticsData:e.analyticsData,className:`text-decoration-none ${e.appLink?`curated-widget-link text-reset`:``}`,onClick:e.onAppLinkClick,children:(0,F.jsxs)(`h2`,{className:`h4 curated-widget-heading`,children:[e.isPreviewing&&n&&(0,F.jsx)(d,{svg:I,title:`Widget is below the minimum content threshold of ${r} and won't be displayed.`,tooltipSpanHack:!0,tooltipSpanHackClassName:`d-inline text-danger me-1`}),e.name]})}),!!P.isValidElement(e.badgeComponent)&&e.badgeComponent]}),(0,F.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center gap-2`,children:[!!e.appLink&&!t&&!!e.showSeeMoreLink&&(0,F.jsx)(H,{...e}),f.isFunction(e.onFollow)&&(0,F.jsx)(W,{isFollowing:e.isFollowing,onFollow:e.onFollow,showFollowSpinner:e.showFollowSpinner}),f.isFunction(e.onClose)&&(0,F.jsx)(U,{onClose:e.onClose})]})]}),t&&(0,F.jsxs)(`div`,{className:`d-flex justify-content-between align-items-end`,children:[(0,F.jsx)(`p`,{className:`description curated-widget-description`,children:(0,F.jsx)(`span`,{children:e.description})}),!!e.appLink&&!!e.showSeeMoreLink&&(0,F.jsx)(H,{...e})]})]})}var K=function(e){return e.Normal=`normal`,e.Pedagogy=`pedagogy`,e.Hidden=`hidden`,e.Skill=`skill`,e.Curation=`curation`,e}({}),q={tagList:`_tagList_ihahv_1`,badgeBase:`_badgeBase_ihahv_5`,disabled:`_disabled_ihahv_8`,partialTag:`_partialTag_ihahv_16`,removeBadge:`_removeBadge_ihahv_19`,removeBadgeText:`_removeBadgeText_ihahv_23`,close:`_close_ihahv_26`},J=m.encloseNamespace(`shared.tags`);function Y(e,t){switch(e){case K.Pedagogy:case K.Skill:return`pedagogy-tag text-white`;case K.Hidden:return`hidden-tag fw-normal`;case K.Normal:return t?``:`bg-gray-100 fw-normal`;default:return``}}function X(e){let{tag:t,appLink:n,onClick:r,disabled:i,tagClass:a=`tag`}=e,o=t.name.toLowerCase(),s=t.tagType?.toLowerCase(),c=s===K.Normal&&e.themeColours&&!!e.themeColours?.secondary,d=`${q.badgeBase} rounded-pill py-1 px-2 my-1 me-1 ${a} ${Y(s,c)}`,f=`text-truncate text-nowrap`;c&&(d+=` text-white`),(n||r)&&!i&&(d+=` cursor-pointer`),i&&(d+=` `+q.disabled),e.onRemove&&(d+=` `+q.removeBadge,f+=` ${q.removeBadgeText} d-inline-flex align-items-center lh-1`),n||(d+=` d-inline-block`);let p=c?{backgroundColor:e.themeColours.secondary}:{};return n?(0,F.jsx)(u,{onClick:r,appLink:n,className:d,title:o,style:p,children:(0,F.jsx)(`span`,{className:f,children:o})}):(0,F.jsx)(`button`,{onClick:r,className:d,title:o,style:p,"aria-label":`${J(`ariaFilter`)} ${o}`,children:(0,F.jsxs)(`span`,{className:f,children:[o,e.onRemove&&(0,F.jsx)(l,{onClick:e.onRemove,className:`${q.close} btn-close font-size-normal`,role:`button`,"aria-label":`Close`})]})})}export{z as a,D as c,x as d,G as i,S as l,q as n,A as o,K as r,E as s,X as t,C as u};
2
- //# sourceMappingURL=BX4WdpiX.chunk.js.map
1
+ import{C as e,D as t,O as n,b as r,bt as i,d as a,fn as o,o as s,s as c}from"./B1i9atik.chunk.js";import{_ as l,g as u,t as d,v as f}from"./NpQVkKE2.chunk.js";import{t as p}from"./BG5Aor0J.chunk.js";import{t as m}from"./CzvVp9iC.chunk.js";import{n as h}from"./B6rKNJWQ.chunk.js";import{t as g}from"./YhCzLJGK.chunk.js";import{tt as _}from"./app-lnmpv5W4.js";import{s as v}from"./B4b3fF2e.chunk.js";import{t as y}from"./DsA2RTbF.chunk.js";var b=function(e){return e.LatestReleases=`latest-releases`,e.ExploreAllTopics=`explore-all-topics`,e.ClassificationLatestReleases=`classification-latest-releases`,e.ClassificationDirectory=`classification-directory`,e}({}),x=[`video`,`clip`,`interactive`],S=[`playlist`,`series`,`clip`,`classification`,`interactive`,`video`,`company`,`category`,`partner_profile`],C=[`user`],w=`sort.classification.presentation.audience.yearGroup.moviesAndTv.type.rating.interactives.clips.classroom.hasResources.hasSubtitles.productionYear.isHd.producedByClickView.duration.tagOrClassification.status.isAdmin.bulkActionType.userType.filter.channel.dateBroadcast.categoryId.hasInteractives.jobStatus.source.customerStatus.specialEventType.customerType.seriesId.scopeId`.split(`.`),T={type:!0},E=w.reduce((e,t)=>({...e,[t]:!T[t]}),{}),D=function(e){return e.MyVideos=`my-videos`,e.School=`school`,e.ExchangeArchive=`exchange-archive`,e.ClickView=`clickview`,e.LiveStreams=`livestreams`,e}({}),O=function(e){return e.Video=`video`,e.Series=`series`,e.Playlist=`playlist`,e.Classification=`classification`,e.Clip=`clip`,e.Interactive=`interactive`,e.Company=`company`,e.Category=`category`,e.PartnerProfile=`partner_profile`,e}({}),k=function(e){return e.ThumbnailHeroMedia=`thumbnail_hero_media`,e.ThumbnailFeaturedMedia=`thumbnail_featured_media`,e.ThumbnailSlidingListSmall=`thumbnail_sliding_list_small`,e.ThumbnailSlidingListSmallV2=`thumbnail_sliding_list_small_v2`,e.ThumbnailSlidingListLarge=`thumbnail_sliding_list_large`,e.ThumbnailFixedListMediaSmall=`thumbnail_fixed_list_media_small`,e.ThumbnailFixedListMediaLarge=`thumbnail_fixed_list_media_large`,e.ThumbnailFixedListFolderSmall=`thumbnail_fixed_list_folder_small`,e.ThumbnailVerticalList=`thumbnail_vertical_list`,e.PopoutThumbnailSlidingListLarge=`popout_thumbnail_sliding_list_large`,e.PopoutThumbnailSlidingListSmall=`popout_thumbnail_sliding_list_small`,e.FeaturedThumbnailSlidingList=`featured_thumbnail_sliding_list`,e.ThumbnailFixedListXLarge=`thumbnail_fixed_list_xlarge`,e.CoverSlidingPillListSmall=`cover_sliding_pill_list_small`,e.CoverFixedPillListLarge=`cover_fixed_pill_list_large`,e.StatsCoverFixedPillListLarge=`stats_cover_fixed_pill_list_large`,e.CoverFixedPillListXSmall=`cover_fixed_pill_list_xsmall`,e.ThumbnailFixedListLarge=`thumbnail_fixed_list_large`,e.ThumbnailFixedListSmall=`thumbnail_fixed_list_small`,e.EditableCoverFixedPillListSmall=`editable_cover_fixed_pill_list_small`,e.HeroBanner=`hero_banner`,e.HeroThumbnailSmall=`hero_thumbnail_small`,e.HeroBlockColourSmall=`hero_block_colour_small`,e.CurriculumResourcesAccordion=`curriculum_resources_accordion`,e.CurriculumCodeSearchResults=`curriculum_code_search_results`,e.CoverFixedTileList=`cover_fixed_tile_list`,e.PosterSlidingListLarge=`poster_sliding_list_large`,e.PosterSlidingListMedium=`poster_sliding_list_medium`,e.PosterSlidingListSmall=`poster_sliding_list_small`,e.PosterFixedListLarge=`poster_fixed_list_large`,e.HeroBannerSmall=`hero_banner_small`,e.Heading=`heading`,e.AuthorReviewer=`author_reviewer`,e.Question=`question`,e.QuestionAccordion=`question_accordion`,e.CircleLogoSlidingList=`circle_logo_sliding_list`,e.RectangularLogoSlidingList=`rectangular_logo_sliding_list`,e.RectangularLogoFixedList=`rectangular_logo_fixed_list`,e.ThumbnailFixedListSearchCta=`thumbnail_fixed_list_search_cta`,e.InfiniteThumbnailVerticalList=`infinite_thumbnail_vertical_list`,e.FilterSlidingPillListSmall=`filter_sliding_pill_list_small`,e.EventIconSlidingList=`event_icon_sliding_list`,e.TagSlidingList=`tag_sliding_list`,e.SearchSuggestionsBlurb=`search_suggestions_blurb`,e}({}),A=function(e){return e.CuratedMedia=`curated_media`,e.PlaylistMedia=`playlist_media`,e.SeriesMedia=`series_media`,e.ClassificationMedia=`classification_media`,e.LatestReleasedVideos=`latest_released_videos`,e.ContinueWatching=`continue_watching_videos`,e.CompanyLatestReleasedVideo=`company_latest_released_video`,e.CompanyVideos=`company_videos`,e.ClassificationLatestReleasedVideo=`classification_latest_released_video`,e.ClassificationLatestReleasedVideosV2=`classification_latest_released_videos_v2`,e.CompanyClassificationVideos=`company_classification_videos`,e.ClassificationDashboardMedia=`classification_dashboard_media`,e.ClassificationDashboardExternalMedia=`classification_dashboard_external_media`,e.SeasonalClassificationMedia=`seasonal_classification_media`,e.TrendingClassificationsMedia=`trending_classifications_media`,e.ClassificationCurriculumMedia=`classification_curriculum_media`,e.CuratedClassifications=`curated_classifications`,e.Classifications=`classifications`,e.ClassificationLatestReleasedVideos=`classification_latest_released_videos`,e.SpecialEventClassifications=`special_event_classifications`,e.LatestReleasedClassifications=`latest_released_classifications`,e.TrendingClassifications=`trending_classifications`,e.CuratedSeries=`curated_series`,e.CuratedPlaylists=`curated_playlists`,e.Blurb=`blurb`,e.DynamicBlurb=`dynamic_blurb`,e.AuthorReviewer=`author_reviewer`,e.Faq=`faq`,e.CuratedCompanies=`curated_companies`,e.CuratedContentPartners=`curated_content_partners`,e.ContentPartnerLatestReleasedVideos=`content_partner_latest_released_videos`,e.ContentPartnerSeries=`content_partner_series`,e.ContentPartnerVideos=`content_partner_videos`,e.SpotlightContentPartners=`spotlight_curated_content_partners`,e.ContentPartners=`content_partners`,e.ContentPartnersHub=`content_partners_hub`,e.TrendingContentPartnersVideo=`content_partner_trending_videos`,e.ContentPartnerAllVideos=`content_partner_all_videos`,e.Ratings=`ratings`,e.Presentations=`presentations`,e.UpcomingLivestreams=`upcoming_livestreams`,e.CuratedMultimedia=`curated_multimedia`,e.ClassificationPlaylists=`classification_playlists`,e.ClassificationSeries=`classification_series`,e.ClassificationFeaturedVideo=`classification_featured_video`,e.ClassificationPinnedVideos=`classification_pinned_videos`,e.SearchRelevantTopics=`search_relevant_topics`,e.SearchCompanies=`search_companies`,e.SearchTopResults=`search_top_results`,e.SearchSeries=`search_series`,e.SearchPlaylists=`search_playlists`,e.SearchMyVideosFolder=`search_my_videos_folders`,e.SearchMySchoolLibraryFolder=`search_my_school_library_folders`,e.SearchMyVideos=`search_my_videos`,e.SearchMySchoolLibraryVideos=`search_my_school_library_videos`,e.SearchExchangeArchive=`search_exchange_archive`,e.SearchClickViewLive=`search_clickview_live`,e.SearchRelatedResults=`search_related_results`,e.SearchTags=`search_tags`,e.SearchCurriculumCode=`search_curriculum_code`,e.SearchSuggestions=`search_suggestions`,e.SearchContentPartners=`search_content_partners`,e}({}),j={onSelectCuratedObject(e,t){let n={...t.values.data,objectIds:p.addOrRemoveImmutable(t.values.data.objectIds||[],e.id)};t.setFieldValue(`data`,n),t.setTouched({...t.touched,data:{objectIds:!0}})},onRemoveCuratedObject(e,t){let n={...t.values.data,objectIds:t.values.data.objectIds.filter(t=>t!==e)};t.setFieldValue(`data`,n)},getDashboardTarget(e){return e.targetType===v.Discover?`discover:presentation:${e.presentationId}`:e.targetType===v.Classification?`classification:${e.classificationId}`:e.targetType===v.ClassificationDirectory?`classification:${e.classificationId}:directory`:e.targetType===v.ClassificationCurriculum?`classification:${e.classificationId}:curriculum`:e.targetType===v.MoviesAndTv?`moviesAndTv:presentation:${e.presentationId}`:e.targetType===v.Company?`company:${e.companyId}:presentation:${e.presentationId}`:e.targetType===v.PartnerProfile?`partnerprofile:${e.slug}`:e.targetType===v.DiscoverPartnerProfiles?`discover:partners`:e.targetType===v.PartnerProfileHub?`discover:partners:hub`:null},getUnknownDashboardTarget(e){let{presentationId:t,companyId:n,targetType:r,classificationId:i,slug:a}=e;if(r===v.Discover)return j.getDashboardTarget({targetType:v.Discover,presentationId:t});if(r===v.MoviesAndTv)return j.getDashboardTarget({targetType:v.MoviesAndTv,presentationId:t});if(r===v.Company)return j.getDashboardTarget({targetType:v.Company,presentationId:t,companyId:n});if(r===v.Classification)return j.getDashboardTarget({targetType:v.Classification,classificationId:i});if(r===v.ClassificationDirectory)return j.getDashboardTarget({targetType:v.ClassificationDirectory,classificationId:i});if(r===v.ClassificationCurriculum)return j.getDashboardTarget({targetType:v.ClassificationCurriculum,classificationId:i});if(r===v.PartnerProfile)return j.getDashboardTarget({targetType:v.PartnerProfile,slug:a});if(r===v.DiscoverPartnerProfiles)return j.getDashboardTarget({targetType:v.DiscoverPartnerProfiles});if(r===v.PartnerProfileHub)return j.getDashboardTarget({targetType:v.PartnerProfileHub})},getDashboardTargetInfo(e){let t=j.getDashboardTargetType(e),n=e?.target?.split(`:`);return t===v.Discover?{targetType:v.Discover,presentationId:n[2]}:t===v.Classification?{targetType:v.Classification,classificationId:n[1]}:t===v.ClassificationDirectory?{targetType:v.ClassificationDirectory,classificationId:n[1]}:t===v.ClassificationCurriculum?{targetType:v.ClassificationCurriculum,classificationId:n[1]}:t===v.MoviesAndTv?{targetType:v.MoviesAndTv,presentationId:n[2]}:t===v.Company?{targetType:v.Company,companyId:n[1],presentationId:n[3]}:t===v.PartnerProfile?{targetType:v.PartnerProfile,slug:n[1]}:null},getDashboardTargetType(e){return e?.target?e.target.startsWith(`discover`)?e.target.endsWith(`partners`)?v.DiscoverPartnerProfiles:e.target.endsWith(`hub`)?v.PartnerProfileHub:v.Discover:e.target.startsWith(`classification`)?e.target.endsWith(`directory`)?v.ClassificationDirectory:e.target.endsWith(`curriculum`)?v.ClassificationCurriculum:v.Classification:e.target.startsWith(`moviesAndTv`)?v.MoviesAndTv:e.target.startsWith(`company`)?v.Company:e.target.startsWith(`partnerprofile`)?v.PartnerProfile:null:null},isType(e,t){return j.getDashboardTargetType(e)===t},isCuratedDashboard(e){let t=e,n=j.getDashboardTargetType(t);return n===v.Discover||n===v.Classification||n===v.ClassificationDirectory||n===v.ClassificationCurriculum||n===v.MoviesAndTv||n===v.Company},getLatestReleasedTimeRange(){let e=new Date;return{from:g.format(g.endOf(g.subtract(e,2,`month`),`day`),`YYYY-MM-DD`),to:g.format(g.endOf(e,`day`),`YYYY-MM-DD`)}},getWidgetParams(e,t,n,r,i,a){let o={};return r&&(o.audienceId=r),e===A.ClassificationCurriculumMedia&&(o.curriculumPresentationId=i),{...o,...N[e]?.getCustomParams?.(t,n,a)}},isSystemGeneratedDashboard(e){let t=new Set([A.ClassificationFeaturedVideo,A.ClassificationPinnedVideos,A.ClassificationPlaylists,A.ClassificationSeries]);return e?.some(e=>t.has(e.widgetId))},isClassificationDashboard(e){return[v.Classification,v.ClassificationDirectory,v.ClassificationCurriculum].includes(e?.targetType)},isContentPartnerDashboard(e){return e?.targetType===v.PartnerProfile},isDirectoryDashboard(e){return e?.targetType===v.ClassificationDirectory},isWidgetTypeEnabled(e,t,n){return N[e]?.predicate?.({settingsHash:t,targetType:n})??!0}};function M(e){return e.settingsHash?.hasPartnerProfiles??!1}var N={[A.CuratedMedia]:{getCustomParams:()=>({})},[A.PlaylistMedia]:{getCustomParams:()=>({})},[A.SeriesMedia]:{getCustomParams:e=>{switch(e){case k.ThumbnailFixedListMediaLarge:return{limit:2};case k.ThumbnailHeroMedia:case k.ThumbnailFeaturedMedia:return{limit:1};default:return{limit:12}}},getCollectionAppLink:(e,t)=>e?.series?.(p.first(t))},[A.ClassificationMedia]:{getCustomParams:()=>({})},[A.LatestReleasedVideos]:{getCustomParams:()=>j.getLatestReleasedTimeRange()},[A.ContinueWatching]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e?.watchHistory?.()},[A.CompanyLatestReleasedVideo]:{getCustomParams:()=>({})},[A.CompanyVideos]:{getCustomParams:()=>({})},[A.ClassificationLatestReleasedVideo]:{getCustomParams:()=>({})},[A.ClassificationLatestReleasedVideosV2]:{getCustomParams:()=>({limit:12}),minContent:4},[A.SeasonalClassificationMedia]:{getCustomParams:()=>({limit:12}),minContent:4},[A.CompanyClassificationVideos]:{getCustomParams:()=>({}),minContent:4},[A.TrendingClassificationsMedia]:{getCustomParams:()=>({limit:12}),minContent:4},[A.CuratedClassifications]:{getCustomParams:()=>({})},[A.TrendingClassifications]:{getCustomParams:()=>({limit:6}),minContent:3},[A.Classifications]:{getCustomParams:(e,t)=>{if(t===v.Discover){if(e===k.EditableCoverFixedPillListSmall)return{canBePreferred:!0,isFollowing:!0};if([k.PosterSlidingListSmall,k.CoverFixedPillListXSmall].includes(e))return{canBePreferred:!0}}return{}}},[A.ClassificationLatestReleasedVideos]:{getCustomParams:()=>j.getLatestReleasedTimeRange()},[A.SpecialEventClassifications]:{getCustomParams:()=>({from:g.format(new Date,`YYYY-MM-DD`)})},[A.LatestReleasedClassifications]:{getCustomParams:()=>({limit:6}),minContent:3},[A.CuratedSeries]:{getCustomParams:()=>({})},[A.CuratedPlaylists]:{getCustomParams:()=>({})},[A.Blurb]:{getCustomParams:()=>({})},[A.DynamicBlurb]:{getCustomParams:()=>({})},[A.AuthorReviewer]:{getCustomParams:()=>({})},[A.Faq]:{getCustomParams:()=>({})},[A.CuratedCompanies]:{getCustomParams:()=>({}),predicate:e=>!e.settingsHash?.hasPartnerProfiles},[A.Ratings]:{getCustomParams:()=>({})},[A.Presentations]:{getCustomParams:()=>({})},[A.UpcomingLivestreams]:{getCustomParams:()=>({from:g.format(new Date,`YYYY-MM-DD`)})},[A.CuratedMultimedia]:{getCustomParams:()=>({})},[A.ClassificationPlaylists]:{getCustomParams:()=>({})},[A.ClassificationSeries]:{getCustomParams:()=>({})},[A.ClassificationFeaturedVideo]:{getCustomParams:()=>({})},[A.ClassificationPinnedVideos]:{getCustomParams:()=>({})},[A.ClassificationDashboardExternalMedia]:{getCustomParams:()=>({})},[A.ClassificationDashboardMedia]:{getCustomParams:()=>({})},[A.SearchRelevantTopics]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchRelevantTopics],type:[O.Classification]})},[A.SearchCompanies]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchCompanies],type:[O.Company]}),predicate:e=>!e.settingsHash?.hasPartnerProfiles},[A.SearchSeries]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchSeries],type:[O.Series]})},[A.SearchPlaylists]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchPlaylists],type:[O.Playlist]})},[A.SearchMyVideosFolder]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchMyVideosFolder],source:[D.MyVideos]})},[A.SearchMySchoolLibraryFolder]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchMySchoolLibraryFolder],source:[D.School]})},[A.SearchMyVideos]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchMyVideos],source:[D.MyVideos]})},[A.SearchMySchoolLibraryVideos]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchMySchoolLibraryVideos],source:[D.School]})},[A.SearchExchangeArchive]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchExchangeArchive],source:[D.ExchangeArchive]})},[A.SearchClickViewLive]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchClickViewLive],source:[D.LiveStreams]}),predicate:e=>e.settingsHash?.clickViewLive??!1},[A.SearchRelatedResults]:{getCustomParams:()=>({})},[A.SearchTopResults]:{getCustomParams:()=>({})},[A.ClassificationCurriculumMedia]:{getCustomParams:()=>({})},[A.SearchTags]:{getCustomParams:()=>({})},[A.SearchCurriculumCode]:{getCustomParams:()=>({})},[A.SearchSuggestions]:{getCustomParams:()=>({})},[A.SearchContentPartners]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[A.SearchContentPartners],type:[O.PartnerProfile]}),predicate:M},[A.CuratedContentPartners]:{getCustomParams:()=>({limit:12}),predicate:M},[A.ContentPartnerLatestReleasedVideos]:{getCustomParams:()=>({}),predicate:M},[A.ContentPartnerSeries]:{getCollectionAppLink:e=>e?.scopedSearchHome?.({type:[O.Series]}),getCustomParams:()=>({limit:12}),predicate:M},[A.ContentPartnerVideos]:{getCustomParams:()=>({}),predicate:M},[A.SpotlightContentPartners]:{getCustomParams:()=>({}),predicate:M},[A.ContentPartners]:{getCustomParams:(e,t,n)=>({letterPrefix:n?.params?.letterPrefix,sort:n?.params?.sort}),predicate:M},[A.ContentPartnersHub]:{getCustomParams:(e,t,n)=>t===v.PartnerProfileHub?{objectId:n?.params?.objectId}:{},predicate:M},[A.TrendingContentPartnersVideo]:{getCustomParams:()=>({}),predicate:M},[A.ContentPartnerAllVideos]:{getCustomParams:e=>e===k.ThumbnailFixedListSearchCta?{limit:3}:{},predicate:M}},P=o(t()),F=e();function I(e){return(0,F.jsx)(`svg`,{...e,children:(0,F.jsx)(`path`,{d:`m13.026 4.377 8.5 14A1.2 1.2 0 0 1 20.5 20.2h-17a1.2 1.2 0 0 1-1.026-1.823l8.5-14a1.2 1.2 0 0 1 2.052 0M12 5 3.5 19h17zm0 13a1 1 0 1 1 0-2 1 1 0 0 1 0 2m.75-3.677a.69.69 0 0 1-.7.677.69.69 0 0 1-.7-.677V8.677c0-.374.313-.677.7-.677s.7.303.7.677z`,fill:`currentColor`})})}var L=function(e){return e[e.Draft=0]=`Draft`,e[e.Published=1]=`Published`,e[e.Archived=2]=`Archived`,e}({}),R=function(e){return e.Draft=`Draft`,e.Published=`Published`,e.Archived=`Archived`,e}(R||{}),z={getSliderAnalyticsOptions:()=>({actionType:r.Click,location:a.SlidingList,entity:c.Widget,descriptor:s.Slide}),getSliderItemAnalyticsOptions:()=>({location:a.SlidingListItem}),getSliderHeadingAnalyticsOptions:()=>({actionType:r.Click,location:a.SlidingList,entity:c.Widget,descriptor:s.Title}),useGetContent(e,t,n,r,i){return P.useMemo(()=>{if(!e)return{content:null,unfilteredContent:null};if(!Array.isArray(e))return{content:e,unfilteredContent:e};let a=r?.reduce((e,t)=>(e[t.id]=t,e),{})??{},o=i.reduce((e,t)=>(e[t]=!0,e),{}),s=[...e],c=s.sort((e,t)=>{if(!(`id`in e)||!(`id`in t))return 0;let n=a[e.id]?.index??s.findIndex(t=>`id`in t&&t.id===e.id),r=a[t.id]?.index??s.findIndex(e=>`id`in e&&e.id===t.id);return n<r?-1:n>r?1:0});return z.isBelowContentMinimum(c,t)&&!n?{content:[],unfilteredContent:c}:{content:c.filter(e=>!(a[`id`in e&&e.id]?.hidden||o[`id`in e&&e.id])),unfilteredContent:c}},[e,r])},isBelowContentMinimum(e,t){let n=N[t]?.minContent||0;return e?.length<n},getCustomAppLink(e){return!(`metadata`in e)||!(`appLinks`in e)||!(`appLink`in e.metadata)?null:e.metadata?.appLink===b.LatestReleases&&`latestReleases`in e.appLinks?e.appLinks?.latestReleases?.():e.metadata?.appLink===b.ExploreAllTopics&&`allTopics`in e.appLinks&&`presentation`in e?e.appLinks?.allTopics?.(e.presentation.id):null},getWidgetStatus(e){let t=e.status;if(typeof t==`string`)switch(t){case R.Archived:t=L.Archived;break;case R.Published:t=L.Published;break;case R.Draft:t=L.Draft;break}return t},formatResponseData(e,t){let n=e.content;if(!n)return e;if(`author`in n)return e.content=[n],e;switch(`data`in n?e.content=n.data:Array.isArray(n)||(e.content=[n]),e.widgetId){case A.ClassificationSeries:e.content=e.content.filter(e=>`tallPoster`in e&&!!e.tallPoster?.id);break;case A.ClassificationPlaylists:e.content=e.content.filter(e=>`cover`in e&&!!e.cover?.id);break;case A.ContinueWatching:e.content=e.content.map(e=>`object`in e&&e.object);default:break;case A.Presentations:e.content=e.content.filter(e=>`id`in e&&e.id.toString()!==t?.id?.toString());break}return e},isWidgetInTableOfContents(e){return!!e?.showInTableOfContents},hasNoContent(e){return e===A.Blurb},canDisplayOnScreenSize(e,t,n){return t===A.Blurb&&n===k.HeroBannerSmall?!e.xs&&!e.sm:!0},isCompanyWidget(e){switch(e){case A.CompanyLatestReleasedVideo:case A.CompanyVideos:case A.UpcomingLivestreams:return!0;default:return!1}},getVideoContent(e){let t=p.first(e);return y.isType(t,_.Series)?t.videos.data:e},showRemoveButton(e){return e===A.ContinueWatching},mergeWidgets(e,t){let r=n.deepClone(e),i=p.groupBy(r,`widgetId`),a=[];for(let e of Object.values(i)){let n=null,r=[];for(let i of e){if(!n){n=i;continue}if(i.templateId!==n.templateId){r.push(n),n=i;continue}t(n,i)}n&&r.push(n),a.push(...r)}return a}},B={widgetTextButton:`_widgetTextButton_em1zx_1`},V=m.encloseNamespace(`shared.widgetHeader`);function H(e){return i.getHref(e.appLink)?(0,F.jsx)(`div`,{className:`ms-3 ${B.widgetTextButton}`,children:(0,F.jsx)(u,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:{location:a.SlidingList,...e.analyticsOptions,descriptor:s.SeeMore},className:`text-decoration-none ${e.appLink?`curated-widget-link`:``}`,children:(0,F.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading`,children:V(`seeAll`)})})}):null}function U(e){return(0,F.jsx)(`div`,{className:`ms-3 ${B.widgetTextButton} text-decoration-none cursor-pointer`,onClick:e.onClose,children:(0,F.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading`,children:V(`hide`)})})}function W(e){return(0,F.jsx)(`div`,{className:`ms-3 ${B.widgetTextButton} text-decoration-none`,children:e.showFollowSpinner?(0,F.jsx)(h,{as:`span`,animation:`border`,role:`status`,size:`sm`}):(0,F.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading cursor-pointer`,onClick:()=>e.onFollow(!e.isFollowing),children:V(e.isFollowing?`unfollow`:`follow`)})})}function G(e){let t=!!e.description;if(!e.name&&!e.description)return(0,F.jsx)(F.Fragment,{});let n=z.isBelowContentMinimum(e.content,e.widgetTypeId),r=N[e.widgetTypeId]?.minContent??0;return(0,F.jsxs)(`div`,{className:`curated-widget-header`,children:[(0,F.jsxs)(`div`,{className:`d-flex justify-content-between`,children:[!!e.name&&(0,F.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,F.jsx)(u,{appLink:e.appLink,analyticsData:e.analyticsData,className:`text-decoration-none ${e.appLink?`curated-widget-link text-reset`:``}`,onClick:e.onAppLinkClick,children:(0,F.jsxs)(`h2`,{className:`h4 curated-widget-heading`,children:[e.isPreviewing&&n&&(0,F.jsx)(d,{svg:I,title:`Widget is below the minimum content threshold of ${r} and won't be displayed.`,tooltipSpanHack:!0,tooltipSpanHackClassName:`d-inline text-danger me-1`}),e.name]})}),!!P.isValidElement(e.badgeComponent)&&e.badgeComponent]}),(0,F.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center gap-2`,children:[!!e.appLink&&!t&&!!e.showSeeMoreLink&&(0,F.jsx)(H,{...e}),f.isFunction(e.onFollow)&&(0,F.jsx)(W,{isFollowing:e.isFollowing,onFollow:e.onFollow,showFollowSpinner:e.showFollowSpinner}),f.isFunction(e.onClose)&&(0,F.jsx)(U,{onClose:e.onClose})]})]}),t&&(0,F.jsxs)(`div`,{className:`d-flex justify-content-between align-items-end`,children:[(0,F.jsx)(`p`,{className:`description curated-widget-description`,children:(0,F.jsx)(`span`,{children:e.description})}),!!e.appLink&&!!e.showSeeMoreLink&&(0,F.jsx)(H,{...e})]})]})}var K=function(e){return e.Normal=`normal`,e.Pedagogy=`pedagogy`,e.Hidden=`hidden`,e.Skill=`skill`,e.Curation=`curation`,e}({}),q={tagList:`_tagList_ihahv_1`,badgeBase:`_badgeBase_ihahv_5`,disabled:`_disabled_ihahv_8`,partialTag:`_partialTag_ihahv_16`,removeBadge:`_removeBadge_ihahv_19`,removeBadgeText:`_removeBadgeText_ihahv_23`,close:`_close_ihahv_26`},J=m.encloseNamespace(`shared.tags`);function Y(e,t){switch(e){case K.Pedagogy:case K.Skill:return`pedagogy-tag text-white`;case K.Hidden:return`hidden-tag fw-normal`;case K.Normal:return t?``:`bg-gray-100 fw-normal`;default:return``}}function X(e){let{tag:t,appLink:n,onClick:r,disabled:i,tagClass:a=`tag`}=e,o=t.name.toLowerCase(),s=t.tagType?.toLowerCase(),c=s===K.Normal&&e.themeColours&&!!e.themeColours?.secondary,d=`${q.badgeBase} rounded-pill py-1 px-2 my-1 me-1 ${a} ${Y(s,c)}`,f=`text-truncate text-nowrap`;c&&(d+=` text-white`),(n||r)&&!i&&(d+=` cursor-pointer`),i&&(d+=` `+q.disabled),e.onRemove&&(d+=` `+q.removeBadge,f+=` ${q.removeBadgeText} d-inline-flex align-items-center lh-1`),n||(d+=` d-inline-block`);let p=c?{backgroundColor:e.themeColours.secondary}:{};return n?(0,F.jsx)(u,{onClick:r,appLink:n,className:d,title:o,style:p,children:(0,F.jsx)(`span`,{className:f,children:o})}):(0,F.jsx)(`button`,{onClick:r,className:d,title:o,style:p,"aria-label":`${J(`ariaFilter`)} ${o}`,children:(0,F.jsxs)(`span`,{className:f,children:[o,e.onRemove&&(0,F.jsx)(l,{onClick:e.onRemove,className:`${q.close} btn-close font-size-normal`,role:`button`,"aria-label":`Close`})]})})}export{z as a,D as c,x as d,G as i,S as l,q as n,A as o,K as r,E as s,X as t,C as u};
2
+ //# sourceMappingURL=CHQN7xOX.chunk.js.map