@clickview/exchange 0.62.0-rc.1 → 0.62.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.
- package/dist/.vite/manifest.json +542 -542
- package/dist/bundles.json +1 -1
- package/dist/en.json +1 -1
- package/dist/scripts/{BPYdRA7H.chunk.js → 0uwnPAi2.chunk.js} +2 -2
- package/dist/scripts/{BPYdRA7H.chunk.js.map → 0uwnPAi2.chunk.js.map} +1 -1
- package/dist/scripts/{eUKFc6dK.chunk.js → 6f-CHYL3.chunk.js} +2 -2
- package/dist/scripts/{eUKFc6dK.chunk.js.map → 6f-CHYL3.chunk.js.map} +1 -1
- package/dist/scripts/{BS8sYAAh.chunk.js → B09qwiFG.chunk.js} +2 -2
- package/dist/scripts/{BS8sYAAh.chunk.js.map → B09qwiFG.chunk.js.map} +1 -1
- package/dist/scripts/{BbrEvwAi2.chunk.js → B0uOvqjG2.chunk.js} +2 -2
- package/dist/scripts/{BbrEvwAi2.chunk.js.map → B0uOvqjG2.chunk.js.map} +1 -1
- package/dist/scripts/{EIJf9JbR2.chunk.js → B8BobN3r2.chunk.js} +2 -2
- package/dist/scripts/{EIJf9JbR2.chunk.js.map → B8BobN3r2.chunk.js.map} +1 -1
- package/dist/scripts/{Ca_-2JTE2.chunk.js → B8wHzPHI2.chunk.js} +2 -2
- package/dist/scripts/{Ca_-2JTE2.chunk.js.map → B8wHzPHI2.chunk.js.map} +1 -1
- package/dist/scripts/{DkB0qBxI.chunk.js → BAIdKirt.chunk.js} +2 -2
- package/dist/scripts/{DkB0qBxI.chunk.js.map → BAIdKirt.chunk.js.map} +1 -1
- package/dist/scripts/{Bi8itw8v2.chunk.js → BAwP70HI2.chunk.js} +2 -2
- package/dist/scripts/{Bi8itw8v2.chunk.js.map → BAwP70HI2.chunk.js.map} +1 -1
- package/dist/scripts/{BHbt9wzx.chunk.js → BEv09vqz.chunk.js} +2 -2
- package/dist/scripts/{BHbt9wzx.chunk.js.map → BEv09vqz.chunk.js.map} +1 -1
- package/dist/scripts/{8pXw5z942.chunk.js → BLs3APIS2.chunk.js} +2 -2
- package/dist/scripts/{8pXw5z942.chunk.js.map → BLs3APIS2.chunk.js.map} +1 -1
- package/dist/scripts/{DuPL-nK72.chunk.js → BP0LMV9S2.chunk.js} +2 -2
- package/dist/scripts/{DuPL-nK72.chunk.js.map → BP0LMV9S2.chunk.js.map} +1 -1
- package/dist/scripts/{EO2xPuAQ.chunk.js → BPttZx0-.chunk.js} +2 -2
- package/dist/scripts/{EO2xPuAQ.chunk.js.map → BPttZx0-.chunk.js.map} +1 -1
- package/dist/scripts/{NtrZI2Ef.chunk.js → BQk9Mhlr.chunk.js} +2 -2
- package/dist/scripts/{NtrZI2Ef.chunk.js.map → BQk9Mhlr.chunk.js.map} +1 -1
- package/dist/scripts/{amjwjus3.chunk.js → BXIfsdxg.chunk.js} +2 -2
- package/dist/scripts/{amjwjus3.chunk.js.map → BXIfsdxg.chunk.js.map} +1 -1
- package/dist/scripts/{DKz4jhnr2.chunk.js → B_P4D3Hf2.chunk.js} +2 -2
- package/dist/scripts/{DKz4jhnr2.chunk.js.map → B_P4D3Hf2.chunk.js.map} +1 -1
- package/dist/scripts/{DfOgl-0-2.chunk.js → BgskDBpT2.chunk.js} +2 -2
- package/dist/scripts/{DfOgl-0-2.chunk.js.map → BgskDBpT2.chunk.js.map} +1 -1
- package/dist/scripts/{BsLLiG1-.chunk.js → BhOZYAZn.chunk.js} +2 -2
- package/dist/scripts/{BsLLiG1-.chunk.js.map → BhOZYAZn.chunk.js.map} +1 -1
- package/dist/scripts/{BaSi1pig.chunk.js → Bn9ROglk.chunk.js} +2 -2
- package/dist/scripts/{BaSi1pig.chunk.js.map → Bn9ROglk.chunk.js.map} +1 -1
- package/dist/scripts/{SDRXIwM22.chunk.js → Bo8PhXY12.chunk.js} +3 -3
- package/dist/scripts/{SDRXIwM22.chunk.js.map → Bo8PhXY12.chunk.js.map} +1 -1
- package/dist/scripts/{C3Hw2TpW2.chunk.js → BrVyRSUS2.chunk.js} +2 -2
- package/dist/scripts/{C3Hw2TpW2.chunk.js.map → BrVyRSUS2.chunk.js.map} +1 -1
- package/dist/scripts/{DmVXt6_V.chunk.js → BxLgTmMl.chunk.js} +2 -2
- package/dist/scripts/{DmVXt6_V.chunk.js.map → BxLgTmMl.chunk.js.map} +1 -1
- package/dist/scripts/{DsHiClyc2.chunk.js → Bxsu4S752.chunk.js} +2 -2
- package/dist/scripts/{DsHiClyc2.chunk.js.map → Bxsu4S752.chunk.js.map} +1 -1
- package/dist/scripts/{MYu2AEsL.chunk.js → C-PORBUs.chunk.js} +2 -2
- package/dist/scripts/{MYu2AEsL.chunk.js.map → C-PORBUs.chunk.js.map} +1 -1
- package/dist/scripts/{CxUrOnxW2.chunk.js → C1StI3Bl2.chunk.js} +2 -2
- package/dist/scripts/{CxUrOnxW2.chunk.js.map → C1StI3Bl2.chunk.js.map} +1 -1
- package/dist/scripts/{CKL4ViMC.chunk.js → C6Hr-vqw.chunk.js} +2 -2
- package/dist/scripts/{CKL4ViMC.chunk.js.map → C6Hr-vqw.chunk.js.map} +1 -1
- package/dist/scripts/{Bue5_bLM.chunk.js → CBnNAkzx.chunk.js} +2 -2
- package/dist/scripts/{Bue5_bLM.chunk.js.map → CBnNAkzx.chunk.js.map} +1 -1
- package/dist/scripts/{C03mMZ4k.chunk.js → CFkqPGiT.chunk.js} +2 -2
- package/dist/scripts/{C03mMZ4k.chunk.js.map → CFkqPGiT.chunk.js.map} +1 -1
- package/dist/scripts/{vvCGyl_q.chunk.js → CKD2j1rw.chunk.js} +2 -2
- package/dist/scripts/{vvCGyl_q.chunk.js.map → CKD2j1rw.chunk.js.map} +1 -1
- package/dist/scripts/{DqM6hYTJ2.chunk.js → CSKzCsLv2.chunk.js} +2 -2
- package/dist/scripts/{DqM6hYTJ2.chunk.js.map → CSKzCsLv2.chunk.js.map} +1 -1
- package/dist/scripts/{B7m3cCi42.chunk.js → CZgaUoHE2.chunk.js} +2 -2
- package/dist/scripts/{B7m3cCi42.chunk.js.map → CZgaUoHE2.chunk.js.map} +1 -1
- package/dist/scripts/{CL9SkODG.chunk.js → C_7tv1r9.chunk.js} +2 -2
- package/dist/scripts/{CL9SkODG.chunk.js.map → C_7tv1r9.chunk.js.map} +1 -1
- package/dist/scripts/{CKZJ2qae2.chunk.js → C_jUsStb2.chunk.js} +2 -2
- package/dist/scripts/{CKZJ2qae2.chunk.js.map → C_jUsStb2.chunk.js.map} +1 -1
- package/dist/scripts/{DSZkTUVU.chunk.js → CdNTKjPA.chunk.js} +2 -2
- package/dist/scripts/{DSZkTUVU.chunk.js.map → CdNTKjPA.chunk.js.map} +1 -1
- package/dist/scripts/{CfNYdg0m.chunk.js → ChDwbV8F.chunk.js} +2 -2
- package/dist/scripts/{CfNYdg0m.chunk.js.map → ChDwbV8F.chunk.js.map} +1 -1
- package/dist/scripts/{pOL5_XNC.chunk.js → Cq-TpkxJ.chunk.js} +2 -2
- package/dist/scripts/{pOL5_XNC.chunk.js.map → Cq-TpkxJ.chunk.js.map} +1 -1
- package/dist/scripts/{F1LOVRO_.chunk.js → CrCX606H.chunk.js} +2 -2
- package/dist/scripts/{F1LOVRO_.chunk.js.map → CrCX606H.chunk.js.map} +1 -1
- package/dist/scripts/{BtdygabL2.chunk.js → CrDpB82d2.chunk.js} +2 -2
- package/dist/scripts/{BtdygabL2.chunk.js.map → CrDpB82d2.chunk.js.map} +1 -1
- package/dist/scripts/{BvamDkjt2.chunk.js → Czivka682.chunk.js} +2 -2
- package/dist/scripts/{BvamDkjt2.chunk.js.map → Czivka682.chunk.js.map} +1 -1
- package/dist/scripts/{sViLex0Q.chunk.js → DEP_Z-S0.chunk.js} +2 -2
- package/dist/scripts/{sViLex0Q.chunk.js.map → DEP_Z-S0.chunk.js.map} +1 -1
- package/dist/scripts/{1iKkdpYv.chunk.js → DQBoqkL7.chunk.js} +2 -2
- package/dist/scripts/{1iKkdpYv.chunk.js.map → DQBoqkL7.chunk.js.map} +1 -1
- package/dist/scripts/{C2AXrtJf.chunk.js → DeXP2wHV.chunk.js} +2 -2
- package/dist/scripts/{C2AXrtJf.chunk.js.map → DeXP2wHV.chunk.js.map} +1 -1
- package/dist/scripts/{U0UyGd9c2.chunk.js → Df82DFJ62.chunk.js} +2 -2
- package/dist/scripts/{U0UyGd9c2.chunk.js.map → Df82DFJ62.chunk.js.map} +1 -1
- package/dist/scripts/{BlOKamx72.chunk.js → DgrEIxhT2.chunk.js} +2 -2
- package/dist/scripts/{BlOKamx72.chunk.js.map → DgrEIxhT2.chunk.js.map} +1 -1
- package/dist/scripts/{OBYDGOgI2.chunk.js → DhT0tpZm2.chunk.js} +2 -2
- package/dist/scripts/{OBYDGOgI2.chunk.js.map → DhT0tpZm2.chunk.js.map} +1 -1
- package/dist/scripts/{Ct_4zyE3.chunk.js → Dhe09-jE.chunk.js} +2 -2
- package/dist/scripts/{Ct_4zyE3.chunk.js.map → Dhe09-jE.chunk.js.map} +1 -1
- package/dist/scripts/{xEGWFFpD2.chunk.js → DhtgaF-y2.chunk.js} +2 -2
- package/dist/scripts/{xEGWFFpD2.chunk.js.map → DhtgaF-y2.chunk.js.map} +1 -1
- package/dist/scripts/{nMyWveQA2.chunk.js → Div1wl-R2.chunk.js} +2 -2
- package/dist/scripts/{nMyWveQA2.chunk.js.map → Div1wl-R2.chunk.js.map} +1 -1
- package/dist/scripts/{DG6L7zHU2.chunk.js → DjuXXgD-2.chunk.js} +2 -2
- package/dist/scripts/{DG6L7zHU2.chunk.js.map → DjuXXgD-2.chunk.js.map} +1 -1
- package/dist/scripts/{BAN6QE-X.chunk.js → Dkazht4Q.chunk.js} +2 -2
- package/dist/scripts/{BAN6QE-X.chunk.js.map → Dkazht4Q.chunk.js.map} +1 -1
- package/dist/scripts/{D_k-Kl3-2.chunk.js → DmmZ2XbB2.chunk.js} +2 -2
- package/dist/scripts/{D_k-Kl3-2.chunk.js.map → DmmZ2XbB2.chunk.js.map} +1 -1
- package/dist/scripts/{l7UAnIb0.chunk.js → Dr35AMvf.chunk.js} +2 -2
- package/dist/scripts/{l7UAnIb0.chunk.js.map → Dr35AMvf.chunk.js.map} +1 -1
- package/dist/scripts/{CK_CN_mA.chunk.js → HgLS_KfH.chunk.js} +2 -2
- package/dist/scripts/{CK_CN_mA.chunk.js.map → HgLS_KfH.chunk.js.map} +1 -1
- package/dist/scripts/{Pixwk-h-.chunk.js → W8Q7Z6fd.chunk.js} +2 -2
- package/dist/scripts/{Pixwk-h-.chunk.js.map → W8Q7Z6fd.chunk.js.map} +1 -1
- package/dist/scripts/{BzJLc19T2.chunk.js → XWykPl9h2.chunk.js} +2 -2
- package/dist/scripts/{BzJLc19T2.chunk.js.map → XWykPl9h2.chunk.js.map} +1 -1
- package/dist/scripts/{G-hiM6b42.chunk.js → _3n_0ch72.chunk.js} +2 -2
- package/dist/scripts/{G-hiM6b42.chunk.js.map → _3n_0ch72.chunk.js.map} +1 -1
- package/dist/scripts/{app-BGxmHvGl.js → app-CgkYY4K0.js} +3 -3
- package/dist/scripts/app-CgkYY4K0.js.map +1 -0
- package/dist/scripts/{BINz0dmF.chunk.js → go6zFmPK.chunk.js} +2 -2
- package/dist/scripts/{BINz0dmF.chunk.js.map → go6zFmPK.chunk.js.map} +1 -1
- package/dist/scripts/{DFXpg6rF.chunk.js → p5-1Ey-R.chunk.js} +2 -2
- package/dist/scripts/{DFXpg6rF.chunk.js.map → p5-1Ey-R.chunk.js.map} +1 -1
- package/dist/scripts/{BobZ5p_m2.chunk.js → qrcrWbQJ2.chunk.js} +2 -2
- package/dist/scripts/{BobZ5p_m2.chunk.js.map → qrcrWbQJ2.chunk.js.map} +1 -1
- package/package.json +1 -1
- package/dist/scripts/app-BGxmHvGl.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as e,D as t,O as n,b as r,d as i,mn as a,o,s}from"./CnnBLBPY.chunk.js";import{_ as c,g as l,t as u,v as d}from"./DW0w8_XN.chunk.js";import{t as f}from"./CBDo4oAU.chunk.js";import{t as p}from"./GN6vNflP.chunk.js";import{n as m}from"./dawN348Z.chunk.js";import{t as h}from"./xL848v0O.chunk.js";import{tt as g}from"./app-BGxmHvGl.js";import{s as _}from"./CXtVyCmH.chunk.js";import{t as v}from"./BINz0dmF.chunk.js";var y=function(e){return e.LatestReleases=`latest-releases`,e.ExploreAllTopics=`explore-all-topics`,e.ClassificationLatestReleases=`classification-latest-releases`,e.ClassificationDirectory=`classification-directory`,e}({}),b=[`video`,`clip`,`interactive`],x=[`playlist`,`series`,`clip`,`classification`,`interactive`,`video`,`company`,`category`,`partner_profile`],S=[`user`],C=`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(`.`),w={type:!0},T=C.reduce((e,t)=>({...e,[t]:!w[t]}),{}),E=function(e){return e.MyVideos=`my-videos`,e.School=`school`,e.ExchangeArchive=`exchange-archive`,e.ClickView=`clickview`,e.LiveStreams=`livestreams`,e}({}),D=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}({}),O=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}({}),k=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.SearchRelatedResults=`search_related_results`,e.SearchTags=`search_tags`,e.SearchCurriculumCode=`search_curriculum_code`,e.SearchSuggestions=`search_suggestions`,e.SearchContentPartners=`search_content_partners`,e}({}),A={onSelectCuratedObject(e,t){let n={...t.values.data,objectIds:f.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===_.Discover?`discover:presentation:${e.presentationId}`:e.targetType===_.Classification?`classification:${e.classificationId}`:e.targetType===_.ClassificationDirectory?`classification:${e.classificationId}:directory`:e.targetType===_.ClassificationCurriculum?`classification:${e.classificationId}:curriculum`:e.targetType===_.MoviesAndTv?`moviesAndTv:presentation:${e.presentationId}`:e.targetType===_.Company?`company:${e.companyId}:presentation:${e.presentationId}`:e.targetType===_.PartnerProfile?`partnerprofile:${e.slug}`:e.targetType===_.DiscoverPartnerProfiles?`discover:partners`:e.targetType===_.PartnerProfileHub?`discover:partners:hub`:null},getUnknownDashboardTarget(e){let{presentationId:t,companyId:n,targetType:r,classificationId:i,slug:a}=e;if(r===_.Discover)return A.getDashboardTarget({targetType:_.Discover,presentationId:t});if(r===_.MoviesAndTv)return A.getDashboardTarget({targetType:_.MoviesAndTv,presentationId:t});if(r===_.Company)return A.getDashboardTarget({targetType:_.Company,presentationId:t,companyId:n});if(r===_.Classification)return A.getDashboardTarget({targetType:_.Classification,classificationId:i});if(r===_.ClassificationDirectory)return A.getDashboardTarget({targetType:_.ClassificationDirectory,classificationId:i});if(r===_.ClassificationCurriculum)return A.getDashboardTarget({targetType:_.ClassificationCurriculum,classificationId:i});if(r===_.PartnerProfile)return A.getDashboardTarget({targetType:_.PartnerProfile,slug:a});if(r===_.DiscoverPartnerProfiles)return A.getDashboardTarget({targetType:_.DiscoverPartnerProfiles});if(r===_.PartnerProfileHub)return A.getDashboardTarget({targetType:_.PartnerProfileHub})},getDashboardTargetInfo(e){let t=A.getDashboardTargetType(e),n=e?.target?.split(`:`);return t===_.Discover?{targetType:_.Discover,presentationId:n[2]}:t===_.Classification?{targetType:_.Classification,classificationId:n[1]}:t===_.ClassificationDirectory?{targetType:_.ClassificationDirectory,classificationId:n[1]}:t===_.ClassificationCurriculum?{targetType:_.ClassificationCurriculum,classificationId:n[1]}:t===_.MoviesAndTv?{targetType:_.MoviesAndTv,presentationId:n[2]}:t===_.Company?{targetType:_.Company,companyId:n[1],presentationId:n[3]}:t===_.PartnerProfile?{targetType:_.PartnerProfile,slug:n[1]}:null},getDashboardTargetType(e){return e?.target?e.target.startsWith(`discover`)?e.target.endsWith(`partners`)?_.DiscoverPartnerProfiles:e.target.endsWith(`hub`)?_.PartnerProfileHub:_.Discover:e.target.startsWith(`classification`)?e.target.endsWith(`directory`)?_.ClassificationDirectory:e.target.endsWith(`curriculum`)?_.ClassificationCurriculum:_.Classification:e.target.startsWith(`moviesAndTv`)?_.MoviesAndTv:e.target.startsWith(`company`)?_.Company:e.target.startsWith(`partnerprofile`)?_.PartnerProfile:null:null},isType(e,t){return A.getDashboardTargetType(e)===t},isCuratedDashboard(e){let t=e,n=A.getDashboardTargetType(t);return n===_.Discover||n===_.Classification||n===_.ClassificationDirectory||n===_.ClassificationCurriculum||n===_.MoviesAndTv||n===_.Company},getLatestReleasedTimeRange(){let e=new Date;return{from:h.format(h.endOf(h.subtract(e,2,`month`),`day`),`YYYY-MM-DD`),to:h.format(h.endOf(e,`day`),`YYYY-MM-DD`)}},getWidgetParams(e,t,n,r,i,a){let o={};return r&&(o.audienceId=r),e===k.ClassificationCurriculumMedia&&(o.curriculumPresentationId=i),{...o,...M[e]?.getCustomParams?.(t,n,a)}},isSystemGeneratedDashboard(e){let t=new Set([k.ClassificationFeaturedVideo,k.ClassificationPinnedVideos,k.ClassificationPlaylists,k.ClassificationSeries]);return e?.some(e=>t.has(e.widgetId))},isClassificationDashboard(e){return[_.Classification,_.ClassificationDirectory,_.ClassificationCurriculum].includes(e?.targetType)},isContentPartnerDashboard(e){return e?.targetType===_.PartnerProfile},isDirectoryDashboard(e){return e?.targetType===_.ClassificationDirectory},isWidgetTypeEnabled(e,t,n){return M[e]?.predicate?.({settingsHash:t,targetType:n})??!0}};function j(e){return e.settingsHash?.hasPartnerProfiles??!1}var M={[k.CuratedMedia]:{getCustomParams:()=>({})},[k.PlaylistMedia]:{getCustomParams:()=>({})},[k.SeriesMedia]:{getCustomParams:e=>{switch(e){case O.ThumbnailFixedListMediaLarge:return{limit:2};case O.ThumbnailHeroMedia:case O.ThumbnailFeaturedMedia:return{limit:1};default:return{limit:12}}},getCollectionAppLink:(e,t)=>e?.series?.(f.first(t))},[k.ClassificationMedia]:{getCustomParams:()=>({})},[k.LatestReleasedVideos]:{getCustomParams:()=>A.getLatestReleasedTimeRange()},[k.ContinueWatching]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e?.watchHistory?.()},[k.CompanyLatestReleasedVideo]:{getCustomParams:()=>({})},[k.CompanyVideos]:{getCustomParams:()=>({})},[k.ClassificationLatestReleasedVideo]:{getCustomParams:()=>({})},[k.ClassificationLatestReleasedVideosV2]:{getCustomParams:()=>({limit:12}),minContent:4},[k.SeasonalClassificationMedia]:{getCustomParams:()=>({limit:12}),minContent:4},[k.CompanyClassificationVideos]:{getCustomParams:()=>({}),minContent:4},[k.TrendingClassificationsMedia]:{getCustomParams:()=>({limit:12}),minContent:4},[k.CuratedClassifications]:{getCustomParams:()=>({})},[k.TrendingClassifications]:{getCustomParams:()=>({limit:6}),minContent:3},[k.Classifications]:{getCustomParams:(e,t)=>{if(t===_.Discover){if(e===O.EditableCoverFixedPillListSmall)return{canBePreferred:!0,isFollowing:!0};if([O.PosterSlidingListSmall,O.CoverFixedPillListXSmall].includes(e))return{canBePreferred:!0}}return{}}},[k.ClassificationLatestReleasedVideos]:{getCustomParams:()=>A.getLatestReleasedTimeRange()},[k.SpecialEventClassifications]:{getCustomParams:()=>({from:h.format(new Date,`YYYY-MM-DD`)})},[k.LatestReleasedClassifications]:{getCustomParams:()=>({limit:6}),minContent:3},[k.CuratedSeries]:{getCustomParams:()=>({})},[k.CuratedPlaylists]:{getCustomParams:()=>({})},[k.Blurb]:{getCustomParams:()=>({})},[k.DynamicBlurb]:{getCustomParams:()=>({})},[k.AuthorReviewer]:{getCustomParams:()=>({})},[k.Faq]:{getCustomParams:()=>({})},[k.CuratedCompanies]:{getCustomParams:()=>({}),predicate:e=>!e.settingsHash?.hasPartnerProfiles},[k.Ratings]:{getCustomParams:()=>({})},[k.Presentations]:{getCustomParams:()=>({})},[k.UpcomingLivestreams]:{getCustomParams:()=>({from:h.format(new Date,`YYYY-MM-DD`)})},[k.CuratedMultimedia]:{getCustomParams:()=>({})},[k.ClassificationPlaylists]:{getCustomParams:()=>({})},[k.ClassificationSeries]:{getCustomParams:()=>({})},[k.ClassificationFeaturedVideo]:{getCustomParams:()=>({})},[k.ClassificationPinnedVideos]:{getCustomParams:()=>({})},[k.ClassificationDashboardExternalMedia]:{getCustomParams:()=>({})},[k.ClassificationDashboardMedia]:{getCustomParams:()=>({})},[k.SearchRelevantTopics]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchRelevantTopics],type:[D.Classification]})},[k.SearchCompanies]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchCompanies],type:[D.Company]}),predicate:e=>!e.settingsHash?.hasPartnerProfiles},[k.SearchSeries]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchSeries],type:[D.Series]})},[k.SearchPlaylists]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchPlaylists],type:[D.Playlist]})},[k.SearchMyVideosFolder]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchMyVideosFolder],source:[E.MyVideos]})},[k.SearchMySchoolLibraryFolder]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchMySchoolLibraryFolder],source:[E.School]})},[k.SearchMyVideos]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchMyVideos],source:[E.MyVideos]})},[k.SearchMySchoolLibraryVideos]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchMySchoolLibraryVideos],source:[E.School]})},[k.SearchExchangeArchive]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchExchangeArchive],source:[E.ExchangeArchive]})},[k.SearchRelatedResults]:{getCustomParams:()=>({})},[k.SearchTopResults]:{getCustomParams:()=>({})},[k.ClassificationCurriculumMedia]:{getCustomParams:()=>({})},[k.SearchTags]:{getCustomParams:()=>({})},[k.SearchCurriculumCode]:{getCustomParams:()=>({})},[k.SearchSuggestions]:{getCustomParams:()=>({})},[k.SearchContentPartners]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchContentPartners],type:[D.PartnerProfile]}),predicate:j},[k.CuratedContentPartners]:{getCustomParams:()=>({limit:12}),predicate:j},[k.ContentPartnerLatestReleasedVideos]:{getCustomParams:()=>({}),predicate:j},[k.ContentPartnerSeries]:{getCollectionAppLink:e=>e?.scopedSearchHome?.({type:[D.Series]}),getCustomParams:()=>({limit:12}),predicate:j},[k.ContentPartnerVideos]:{getCustomParams:()=>({}),predicate:j},[k.SpotlightContentPartners]:{getCustomParams:()=>({}),predicate:j},[k.ContentPartners]:{getCustomParams:(e,t,n)=>({letterPrefix:n?.params?.letterPrefix,sort:n?.params?.sort}),predicate:j},[k.ContentPartnersHub]:{getCustomParams:(e,t,n)=>t===_.PartnerProfileHub?{objectId:n?.params?.objectId}:{},predicate:j},[k.TrendingContentPartnersVideo]:{getCustomParams:()=>({}),predicate:j},[k.ContentPartnerAllVideos]:{getCustomParams:e=>e===O.ThumbnailFixedListSearchCta?{limit:3}:{},predicate:j}},N=a(t()),P=e();function F(e){return(0,P.jsx)(`svg`,{...e,children:(0,P.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 I=function(e){return e[e.Draft=0]=`Draft`,e[e.Published=1]=`Published`,e[e.Archived=2]=`Archived`,e}({}),L=function(e){return e.Draft=`Draft`,e.Published=`Published`,e.Archived=`Archived`,e}(L||{}),R={getSliderAnalyticsOptions:()=>({actionType:r.Click,location:i.SlidingList,entity:s.Widget,descriptor:o.Slide}),getSliderItemAnalyticsOptions:()=>({location:i.SlidingListItem}),getSliderHeadingAnalyticsOptions:()=>({actionType:r.Click,location:i.SlidingList,entity:s.Widget,descriptor:o.Title}),useGetContent(e,t,n,r,i){return N.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 R.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=M[t]?.minContent||0;return e?.length<n},getCustomAppLink(e){return!(`metadata`in e)||!(`appLinks`in e)||!(`appLink`in e.metadata)?null:e.metadata?.appLink===y.LatestReleases&&`latestReleases`in e.appLinks?e.appLinks?.latestReleases?.():e.metadata?.appLink===y.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 L.Archived:t=I.Archived;break;case L.Published:t=I.Published;break;case L.Draft:t=I.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 k.ClassificationSeries:e.content=e.content.filter(e=>`tallPoster`in e&&!!e.tallPoster?.id);break;case k.ClassificationPlaylists:e.content=e.content.filter(e=>`cover`in e&&!!e.cover?.id);break;case k.ContinueWatching:e.content=e.content.map(e=>`object`in e&&e.object);default:break;case k.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===k.Blurb},canDisplayOnScreenSize(e,t,n){return t===k.Blurb&&n===O.HeroBannerSmall?!e.xs&&!e.sm:!0},isCompanyWidget(e){switch(e){case k.CompanyLatestReleasedVideo:case k.CompanyVideos:case k.UpcomingLivestreams:return!0;default:return!1}},getVideoContent(e){let t=f.first(e);return v.isType(t,g.Series)?t.videos.data:e},showRemoveButton(e){return e===k.ContinueWatching},mergeWidgets(e,t){let r=n.deepClone(e),i=f.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}},z={widgetTextButton:`_widgetTextButton_em1zx_1`},B=p.encloseNamespace(`shared.widgetHeader`);function V(e){return(0,P.jsx)(`div`,{className:`ms-3 ${z.widgetTextButton}`,children:(0,P.jsx)(l,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:{location:i.SlidingList,...e.analyticsOptions,descriptor:o.SeeMore},className:`text-decoration-none ${e.appLink?`curated-widget-link`:``}`,children:(0,P.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading`,children:B(`seeAll`)})})})}function H(e){return(0,P.jsx)(`div`,{className:`ms-3 ${z.widgetTextButton} text-decoration-none cursor-pointer`,onClick:e.onClose,children:(0,P.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading`,children:B(`hide`)})})}function U(e){return(0,P.jsx)(`div`,{className:`ms-3 ${z.widgetTextButton} text-decoration-none`,children:e.showFollowSpinner?(0,P.jsx)(m,{as:`span`,animation:`border`,role:`status`,size:`sm`}):(0,P.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading cursor-pointer`,onClick:()=>e.onFollow(!e.isFollowing),children:B(e.isFollowing?`unfollow`:`follow`)})})}function W(e){let t=!!e.description;if(!e.name&&!e.description)return(0,P.jsx)(P.Fragment,{});let n=R.isBelowContentMinimum(e.content,e.widgetTypeId),r=M[e.widgetTypeId]?.minContent??0;return(0,P.jsxs)(`div`,{className:`curated-widget-header`,children:[(0,P.jsxs)(`div`,{className:`d-flex justify-content-between`,children:[!!e.name&&(0,P.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,P.jsx)(l,{appLink:e.appLink,analyticsData:e.analyticsData,className:`text-decoration-none ${e.appLink?`curated-widget-link text-reset`:``}`,onClick:e.onAppLinkClick,children:(0,P.jsxs)(`h2`,{className:`h4 curated-widget-heading`,children:[e.isPreviewing&&n&&(0,P.jsx)(u,{svg:F,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]})}),!!N.isValidElement(e.badgeComponent)&&e.badgeComponent]}),(0,P.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center gap-2`,children:[!!e.appLink&&!t&&!!e.showSeeMoreLink&&(0,P.jsx)(V,{...e}),d.isFunction(e.onFollow)&&(0,P.jsx)(U,{isFollowing:e.isFollowing,onFollow:e.onFollow,showFollowSpinner:e.showFollowSpinner}),d.isFunction(e.onClose)&&(0,P.jsx)(H,{onClose:e.onClose})]})]}),t&&(0,P.jsxs)(`div`,{className:`d-flex justify-content-between align-items-end`,children:[(0,P.jsx)(`p`,{className:`description curated-widget-description`,children:(0,P.jsx)(`span`,{children:e.description})}),!!e.appLink&&!!e.showSeeMoreLink&&(0,P.jsx)(V,{...e})]})]})}var G=function(e){return e.Normal=`normal`,e.Pedagogy=`pedagogy`,e.Hidden=`hidden`,e.Skill=`skill`,e.Curation=`curation`,e}({}),K={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`},q=p.encloseNamespace(`shared.tags`);function J(e,t){switch(e){case G.Pedagogy:case G.Skill:return`pedagogy-tag text-white`;case G.Hidden:return`hidden-tag fw-normal`;case G.Normal:return t?``:`bg-gray-100 fw-normal`;default:return``}}function Y(e){let{tag:t,appLink:n,onClick:r,disabled:i,tagClass:a=`tag`}=e,o=t.name.toLowerCase(),s=t.tagType?.toLowerCase(),u=s===G.Normal&&e.themeColours&&!!e.themeColours?.secondary,d=`${K.badgeBase} rounded-pill py-1 px-2 my-1 me-1 ${a} ${J(s,u)}`,f=`text-truncate text-nowrap`;u&&(d+=` text-white`),(n||r)&&!i&&(d+=` cursor-pointer`),i&&(d+=` `+K.disabled),e.onRemove&&(d+=` `+K.removeBadge,f+=` ${K.removeBadgeText} d-inline-flex align-items-center lh-1`),n||(d+=` d-inline-block`);let p=u?{backgroundColor:e.themeColours.secondary}:{};return n?(0,P.jsx)(l,{onClick:r,appLink:n,className:d,title:o,style:p,children:(0,P.jsx)(`span`,{className:f,children:o})}):(0,P.jsx)(`button`,{onClick:r,className:d,title:o,style:p,"aria-label":`${q(`ariaFilter`)} ${o}`,children:(0,P.jsxs)(`span`,{className:f,children:[o,e.onRemove&&(0,P.jsx)(c,{onClick:e.onRemove,className:`${K.close} btn-close font-size-normal`,role:`button`,"aria-label":`Close`})]})})}export{R as a,E as c,b as d,W as i,x as l,K as n,k as o,G as r,T as s,Y as t,S as u};
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{C as e,D as t,O as n,b as r,d as i,mn as a,o,s}from"./CnnBLBPY.chunk.js";import{_ as c,g as l,t as u,v as d}from"./DW0w8_XN.chunk.js";import{t as f}from"./CBDo4oAU.chunk.js";import{t as p}from"./GN6vNflP.chunk.js";import{n as m}from"./dawN348Z.chunk.js";import{t as h}from"./xL848v0O.chunk.js";import{tt as g}from"./app-CgkYY4K0.js";import{s as _}from"./CXtVyCmH.chunk.js";import{t as v}from"./go6zFmPK.chunk.js";var y=function(e){return e.LatestReleases=`latest-releases`,e.ExploreAllTopics=`explore-all-topics`,e.ClassificationLatestReleases=`classification-latest-releases`,e.ClassificationDirectory=`classification-directory`,e}({}),b=[`video`,`clip`,`interactive`],x=[`playlist`,`series`,`clip`,`classification`,`interactive`,`video`,`company`,`category`,`partner_profile`],S=[`user`],C=`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(`.`),w={type:!0},T=C.reduce((e,t)=>({...e,[t]:!w[t]}),{}),E=function(e){return e.MyVideos=`my-videos`,e.School=`school`,e.ExchangeArchive=`exchange-archive`,e.ClickView=`clickview`,e.LiveStreams=`livestreams`,e}({}),D=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}({}),O=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}({}),k=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.SearchRelatedResults=`search_related_results`,e.SearchTags=`search_tags`,e.SearchCurriculumCode=`search_curriculum_code`,e.SearchSuggestions=`search_suggestions`,e.SearchContentPartners=`search_content_partners`,e}({}),A={onSelectCuratedObject(e,t){let n={...t.values.data,objectIds:f.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===_.Discover?`discover:presentation:${e.presentationId}`:e.targetType===_.Classification?`classification:${e.classificationId}`:e.targetType===_.ClassificationDirectory?`classification:${e.classificationId}:directory`:e.targetType===_.ClassificationCurriculum?`classification:${e.classificationId}:curriculum`:e.targetType===_.MoviesAndTv?`moviesAndTv:presentation:${e.presentationId}`:e.targetType===_.Company?`company:${e.companyId}:presentation:${e.presentationId}`:e.targetType===_.PartnerProfile?`partnerprofile:${e.slug}`:e.targetType===_.DiscoverPartnerProfiles?`discover:partners`:e.targetType===_.PartnerProfileHub?`discover:partners:hub`:null},getUnknownDashboardTarget(e){let{presentationId:t,companyId:n,targetType:r,classificationId:i,slug:a}=e;if(r===_.Discover)return A.getDashboardTarget({targetType:_.Discover,presentationId:t});if(r===_.MoviesAndTv)return A.getDashboardTarget({targetType:_.MoviesAndTv,presentationId:t});if(r===_.Company)return A.getDashboardTarget({targetType:_.Company,presentationId:t,companyId:n});if(r===_.Classification)return A.getDashboardTarget({targetType:_.Classification,classificationId:i});if(r===_.ClassificationDirectory)return A.getDashboardTarget({targetType:_.ClassificationDirectory,classificationId:i});if(r===_.ClassificationCurriculum)return A.getDashboardTarget({targetType:_.ClassificationCurriculum,classificationId:i});if(r===_.PartnerProfile)return A.getDashboardTarget({targetType:_.PartnerProfile,slug:a});if(r===_.DiscoverPartnerProfiles)return A.getDashboardTarget({targetType:_.DiscoverPartnerProfiles});if(r===_.PartnerProfileHub)return A.getDashboardTarget({targetType:_.PartnerProfileHub})},getDashboardTargetInfo(e){let t=A.getDashboardTargetType(e),n=e?.target?.split(`:`);return t===_.Discover?{targetType:_.Discover,presentationId:n[2]}:t===_.Classification?{targetType:_.Classification,classificationId:n[1]}:t===_.ClassificationDirectory?{targetType:_.ClassificationDirectory,classificationId:n[1]}:t===_.ClassificationCurriculum?{targetType:_.ClassificationCurriculum,classificationId:n[1]}:t===_.MoviesAndTv?{targetType:_.MoviesAndTv,presentationId:n[2]}:t===_.Company?{targetType:_.Company,companyId:n[1],presentationId:n[3]}:t===_.PartnerProfile?{targetType:_.PartnerProfile,slug:n[1]}:null},getDashboardTargetType(e){return e?.target?e.target.startsWith(`discover`)?e.target.endsWith(`partners`)?_.DiscoverPartnerProfiles:e.target.endsWith(`hub`)?_.PartnerProfileHub:_.Discover:e.target.startsWith(`classification`)?e.target.endsWith(`directory`)?_.ClassificationDirectory:e.target.endsWith(`curriculum`)?_.ClassificationCurriculum:_.Classification:e.target.startsWith(`moviesAndTv`)?_.MoviesAndTv:e.target.startsWith(`company`)?_.Company:e.target.startsWith(`partnerprofile`)?_.PartnerProfile:null:null},isType(e,t){return A.getDashboardTargetType(e)===t},isCuratedDashboard(e){let t=e,n=A.getDashboardTargetType(t);return n===_.Discover||n===_.Classification||n===_.ClassificationDirectory||n===_.ClassificationCurriculum||n===_.MoviesAndTv||n===_.Company},getLatestReleasedTimeRange(){let e=new Date;return{from:h.format(h.endOf(h.subtract(e,2,`month`),`day`),`YYYY-MM-DD`),to:h.format(h.endOf(e,`day`),`YYYY-MM-DD`)}},getWidgetParams(e,t,n,r,i,a){let o={};return r&&(o.audienceId=r),e===k.ClassificationCurriculumMedia&&(o.curriculumPresentationId=i),{...o,...M[e]?.getCustomParams?.(t,n,a)}},isSystemGeneratedDashboard(e){let t=new Set([k.ClassificationFeaturedVideo,k.ClassificationPinnedVideos,k.ClassificationPlaylists,k.ClassificationSeries]);return e?.some(e=>t.has(e.widgetId))},isClassificationDashboard(e){return[_.Classification,_.ClassificationDirectory,_.ClassificationCurriculum].includes(e?.targetType)},isContentPartnerDashboard(e){return e?.targetType===_.PartnerProfile},isDirectoryDashboard(e){return e?.targetType===_.ClassificationDirectory},isWidgetTypeEnabled(e,t,n){return M[e]?.predicate?.({settingsHash:t,targetType:n})??!0}};function j(e){return e.settingsHash?.hasPartnerProfiles??!1}var M={[k.CuratedMedia]:{getCustomParams:()=>({})},[k.PlaylistMedia]:{getCustomParams:()=>({})},[k.SeriesMedia]:{getCustomParams:e=>{switch(e){case O.ThumbnailFixedListMediaLarge:return{limit:2};case O.ThumbnailHeroMedia:case O.ThumbnailFeaturedMedia:return{limit:1};default:return{limit:12}}},getCollectionAppLink:(e,t)=>e?.series?.(f.first(t))},[k.ClassificationMedia]:{getCustomParams:()=>({})},[k.LatestReleasedVideos]:{getCustomParams:()=>A.getLatestReleasedTimeRange()},[k.ContinueWatching]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e?.watchHistory?.()},[k.CompanyLatestReleasedVideo]:{getCustomParams:()=>({})},[k.CompanyVideos]:{getCustomParams:()=>({})},[k.ClassificationLatestReleasedVideo]:{getCustomParams:()=>({})},[k.ClassificationLatestReleasedVideosV2]:{getCustomParams:()=>({limit:12}),minContent:4},[k.SeasonalClassificationMedia]:{getCustomParams:()=>({limit:12}),minContent:4},[k.CompanyClassificationVideos]:{getCustomParams:()=>({}),minContent:4},[k.TrendingClassificationsMedia]:{getCustomParams:()=>({limit:12}),minContent:4},[k.CuratedClassifications]:{getCustomParams:()=>({})},[k.TrendingClassifications]:{getCustomParams:()=>({limit:6}),minContent:3},[k.Classifications]:{getCustomParams:(e,t)=>{if(t===_.Discover){if(e===O.EditableCoverFixedPillListSmall)return{canBePreferred:!0,isFollowing:!0};if([O.PosterSlidingListSmall,O.CoverFixedPillListXSmall].includes(e))return{canBePreferred:!0}}return{}}},[k.ClassificationLatestReleasedVideos]:{getCustomParams:()=>A.getLatestReleasedTimeRange()},[k.SpecialEventClassifications]:{getCustomParams:()=>({from:h.format(new Date,`YYYY-MM-DD`)})},[k.LatestReleasedClassifications]:{getCustomParams:()=>({limit:6}),minContent:3},[k.CuratedSeries]:{getCustomParams:()=>({})},[k.CuratedPlaylists]:{getCustomParams:()=>({})},[k.Blurb]:{getCustomParams:()=>({})},[k.DynamicBlurb]:{getCustomParams:()=>({})},[k.AuthorReviewer]:{getCustomParams:()=>({})},[k.Faq]:{getCustomParams:()=>({})},[k.CuratedCompanies]:{getCustomParams:()=>({}),predicate:e=>!e.settingsHash?.hasPartnerProfiles},[k.Ratings]:{getCustomParams:()=>({})},[k.Presentations]:{getCustomParams:()=>({})},[k.UpcomingLivestreams]:{getCustomParams:()=>({from:h.format(new Date,`YYYY-MM-DD`)})},[k.CuratedMultimedia]:{getCustomParams:()=>({})},[k.ClassificationPlaylists]:{getCustomParams:()=>({})},[k.ClassificationSeries]:{getCustomParams:()=>({})},[k.ClassificationFeaturedVideo]:{getCustomParams:()=>({})},[k.ClassificationPinnedVideos]:{getCustomParams:()=>({})},[k.ClassificationDashboardExternalMedia]:{getCustomParams:()=>({})},[k.ClassificationDashboardMedia]:{getCustomParams:()=>({})},[k.SearchRelevantTopics]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchRelevantTopics],type:[D.Classification]})},[k.SearchCompanies]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchCompanies],type:[D.Company]}),predicate:e=>!e.settingsHash?.hasPartnerProfiles},[k.SearchSeries]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchSeries],type:[D.Series]})},[k.SearchPlaylists]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchPlaylists],type:[D.Playlist]})},[k.SearchMyVideosFolder]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchMyVideosFolder],source:[E.MyVideos]})},[k.SearchMySchoolLibraryFolder]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchMySchoolLibraryFolder],source:[E.School]})},[k.SearchMyVideos]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchMyVideos],source:[E.MyVideos]})},[k.SearchMySchoolLibraryVideos]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchMySchoolLibraryVideos],source:[E.School]})},[k.SearchExchangeArchive]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchExchangeArchive],source:[E.ExchangeArchive]})},[k.SearchRelatedResults]:{getCustomParams:()=>({})},[k.SearchTopResults]:{getCustomParams:()=>({})},[k.ClassificationCurriculumMedia]:{getCustomParams:()=>({})},[k.SearchTags]:{getCustomParams:()=>({})},[k.SearchCurriculumCode]:{getCustomParams:()=>({})},[k.SearchSuggestions]:{getCustomParams:()=>({})},[k.SearchContentPartners]:{getCustomParams:()=>({}),getCollectionAppLink:e=>e.searchHome({focus:[k.SearchContentPartners],type:[D.PartnerProfile]}),predicate:j},[k.CuratedContentPartners]:{getCustomParams:()=>({limit:12}),predicate:j},[k.ContentPartnerLatestReleasedVideos]:{getCustomParams:()=>({}),predicate:j},[k.ContentPartnerSeries]:{getCollectionAppLink:e=>e?.scopedSearchHome?.({type:[D.Series]}),getCustomParams:()=>({limit:12}),predicate:j},[k.ContentPartnerVideos]:{getCustomParams:()=>({}),predicate:j},[k.SpotlightContentPartners]:{getCustomParams:()=>({}),predicate:j},[k.ContentPartners]:{getCustomParams:(e,t,n)=>({letterPrefix:n?.params?.letterPrefix,sort:n?.params?.sort}),predicate:j},[k.ContentPartnersHub]:{getCustomParams:(e,t,n)=>t===_.PartnerProfileHub?{objectId:n?.params?.objectId}:{},predicate:j},[k.TrendingContentPartnersVideo]:{getCustomParams:()=>({}),predicate:j},[k.ContentPartnerAllVideos]:{getCustomParams:e=>e===O.ThumbnailFixedListSearchCta?{limit:3}:{},predicate:j}},N=a(t()),P=e();function F(e){return(0,P.jsx)(`svg`,{...e,children:(0,P.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 I=function(e){return e[e.Draft=0]=`Draft`,e[e.Published=1]=`Published`,e[e.Archived=2]=`Archived`,e}({}),L=function(e){return e.Draft=`Draft`,e.Published=`Published`,e.Archived=`Archived`,e}(L||{}),R={getSliderAnalyticsOptions:()=>({actionType:r.Click,location:i.SlidingList,entity:s.Widget,descriptor:o.Slide}),getSliderItemAnalyticsOptions:()=>({location:i.SlidingListItem}),getSliderHeadingAnalyticsOptions:()=>({actionType:r.Click,location:i.SlidingList,entity:s.Widget,descriptor:o.Title}),useGetContent(e,t,n,r,i){return N.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 R.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=M[t]?.minContent||0;return e?.length<n},getCustomAppLink(e){return!(`metadata`in e)||!(`appLinks`in e)||!(`appLink`in e.metadata)?null:e.metadata?.appLink===y.LatestReleases&&`latestReleases`in e.appLinks?e.appLinks?.latestReleases?.():e.metadata?.appLink===y.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 L.Archived:t=I.Archived;break;case L.Published:t=I.Published;break;case L.Draft:t=I.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 k.ClassificationSeries:e.content=e.content.filter(e=>`tallPoster`in e&&!!e.tallPoster?.id);break;case k.ClassificationPlaylists:e.content=e.content.filter(e=>`cover`in e&&!!e.cover?.id);break;case k.ContinueWatching:e.content=e.content.map(e=>`object`in e&&e.object);default:break;case k.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===k.Blurb},canDisplayOnScreenSize(e,t,n){return t===k.Blurb&&n===O.HeroBannerSmall?!e.xs&&!e.sm:!0},isCompanyWidget(e){switch(e){case k.CompanyLatestReleasedVideo:case k.CompanyVideos:case k.UpcomingLivestreams:return!0;default:return!1}},getVideoContent(e){let t=f.first(e);return v.isType(t,g.Series)?t.videos.data:e},showRemoveButton(e){return e===k.ContinueWatching},mergeWidgets(e,t){let r=n.deepClone(e),i=f.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}},z={widgetTextButton:`_widgetTextButton_em1zx_1`},B=p.encloseNamespace(`shared.widgetHeader`);function V(e){return(0,P.jsx)(`div`,{className:`ms-3 ${z.widgetTextButton}`,children:(0,P.jsx)(l,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:{location:i.SlidingList,...e.analyticsOptions,descriptor:o.SeeMore},className:`text-decoration-none ${e.appLink?`curated-widget-link`:``}`,children:(0,P.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading`,children:B(`seeAll`)})})})}function H(e){return(0,P.jsx)(`div`,{className:`ms-3 ${z.widgetTextButton} text-decoration-none cursor-pointer`,onClick:e.onClose,children:(0,P.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading`,children:B(`hide`)})})}function U(e){return(0,P.jsx)(`div`,{className:`ms-3 ${z.widgetTextButton} text-decoration-none`,children:e.showFollowSpinner?(0,P.jsx)(m,{as:`span`,animation:`border`,role:`status`,size:`sm`}):(0,P.jsx)(`p`,{className:`hover-text-underline text-dark curated-widget-heading cursor-pointer`,onClick:()=>e.onFollow(!e.isFollowing),children:B(e.isFollowing?`unfollow`:`follow`)})})}function W(e){let t=!!e.description;if(!e.name&&!e.description)return(0,P.jsx)(P.Fragment,{});let n=R.isBelowContentMinimum(e.content,e.widgetTypeId),r=M[e.widgetTypeId]?.minContent??0;return(0,P.jsxs)(`div`,{className:`curated-widget-header`,children:[(0,P.jsxs)(`div`,{className:`d-flex justify-content-between`,children:[!!e.name&&(0,P.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,P.jsx)(l,{appLink:e.appLink,analyticsData:e.analyticsData,className:`text-decoration-none ${e.appLink?`curated-widget-link text-reset`:``}`,onClick:e.onAppLinkClick,children:(0,P.jsxs)(`h2`,{className:`h4 curated-widget-heading`,children:[e.isPreviewing&&n&&(0,P.jsx)(u,{svg:F,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]})}),!!N.isValidElement(e.badgeComponent)&&e.badgeComponent]}),(0,P.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center gap-2`,children:[!!e.appLink&&!t&&!!e.showSeeMoreLink&&(0,P.jsx)(V,{...e}),d.isFunction(e.onFollow)&&(0,P.jsx)(U,{isFollowing:e.isFollowing,onFollow:e.onFollow,showFollowSpinner:e.showFollowSpinner}),d.isFunction(e.onClose)&&(0,P.jsx)(H,{onClose:e.onClose})]})]}),t&&(0,P.jsxs)(`div`,{className:`d-flex justify-content-between align-items-end`,children:[(0,P.jsx)(`p`,{className:`description curated-widget-description`,children:(0,P.jsx)(`span`,{children:e.description})}),!!e.appLink&&!!e.showSeeMoreLink&&(0,P.jsx)(V,{...e})]})]})}var G=function(e){return e.Normal=`normal`,e.Pedagogy=`pedagogy`,e.Hidden=`hidden`,e.Skill=`skill`,e.Curation=`curation`,e}({}),K={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`},q=p.encloseNamespace(`shared.tags`);function J(e,t){switch(e){case G.Pedagogy:case G.Skill:return`pedagogy-tag text-white`;case G.Hidden:return`hidden-tag fw-normal`;case G.Normal:return t?``:`bg-gray-100 fw-normal`;default:return``}}function Y(e){let{tag:t,appLink:n,onClick:r,disabled:i,tagClass:a=`tag`}=e,o=t.name.toLowerCase(),s=t.tagType?.toLowerCase(),u=s===G.Normal&&e.themeColours&&!!e.themeColours?.secondary,d=`${K.badgeBase} rounded-pill py-1 px-2 my-1 me-1 ${a} ${J(s,u)}`,f=`text-truncate text-nowrap`;u&&(d+=` text-white`),(n||r)&&!i&&(d+=` cursor-pointer`),i&&(d+=` `+K.disabled),e.onRemove&&(d+=` `+K.removeBadge,f+=` ${K.removeBadgeText} d-inline-flex align-items-center lh-1`),n||(d+=` d-inline-block`);let p=u?{backgroundColor:e.themeColours.secondary}:{};return n?(0,P.jsx)(l,{onClick:r,appLink:n,className:d,title:o,style:p,children:(0,P.jsx)(`span`,{className:f,children:o})}):(0,P.jsx)(`button`,{onClick:r,className:d,title:o,style:p,"aria-label":`${q(`ariaFilter`)} ${o}`,children:(0,P.jsxs)(`span`,{className:f,children:[o,e.onRemove&&(0,P.jsx)(c,{onClick:e.onRemove,className:`${K.close} btn-close font-size-normal`,role:`button`,"aria-label":`Close`})]})})}export{R as a,E as c,b as d,W as i,x as l,K as n,k as o,G as r,T as s,Y as t,S as u};
|
|
2
|
+
//# sourceMappingURL=BPttZx0-.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EO2xPuAQ.chunk.js","names":[],"sources":["../../../../libs/shared/src/interfaces/models/curated-widget/CuratedWidget.ts","../../../../libs/shared/src/apps/search/interfaces/SearchTypes.ts","../../../../libs/shared/src/apps/search/interfaces/SearchFilter.ts","../../../../libs/shared/src/enums/WidgetTemplate.ts","../../../../libs/shared/src/enums/WidgetTypeId.ts","../../../../libs/shared/src/utils/DashboardHelper.ts","../../../../libs/shared/src/constants/WidgetTypeIdConfig.ts","../../../../libs/shared/src/images/svg/status/WarningOutlineSvg.tsx","../../../../libs/shared/src/enums/WidgetStatus.ts","../../../../libs/shared/src/utils/WidgetHelper.ts","../../../../libs/shared/src/components/widgets/curated-widgets/components/header/widget-header.module.scss","../../../../libs/shared/src/components/widgets/curated-widgets/components/header/WidgetHeader.tsx","../../../../libs/shared/src/enums/TagType.ts","../../../../libs/shared/src/components/tags/tags.module.scss","../../../../libs/shared/src/components/tags/TagItem.tsx"],"sourcesContent":["import { HashObject } from 'libs/common/react/interfaces';\n\nimport { AllWidgetTemplateProps } from 'libs/shared/components/widgets/curated-widgets/WidgetProps';\nimport { ButtonIcon } from 'libs/shared/constants/WidgetThemingConstants';\nimport { WidgetStatus } from 'libs/shared/enums/WidgetStatus';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { CuratedObjectsWidgetData, CuratedWidgetContent, CuratedWidgetData } from 'libs/shared/interfaces';\n\nexport enum CuratedDashboardAppLink {\n LatestReleases = 'latest-releases',\n ExploreAllTopics = 'explore-all-topics',\n ClassificationLatestReleases = 'classification-latest-releases',\n ClassificationDirectory = 'classification-directory'\n}\n\nexport enum CuratedWidgetCtaAppLink {\n TopicDirectory = 'topic-directory',\n TopicNewReleases = 'topic-new-releases',\n CuratedTopic = 'curated-topic'\n}\n\nexport interface BaseWidget<TContent extends HashObject = HashObject> {\n index: number;\n templateId: WidgetTemplate;\n widgetId: WidgetTypeId;\n name: string;\n description?: string;\n content?: TContent;\n}\n\nexport interface WidgetCta {\n text?: string;\n href?: string;\n icon?: ButtonIcon;\n appLink?: CuratedWidgetCtaAppLink;\n}\n\nexport type WidgetMetadata = AllWidgetTemplateProps['metadata'] & {\n showInTableOfContents: boolean,\n tocIndentation: number,\n headingOptional: boolean,\n aiAddedVideo: boolean\n};\n\nexport interface WidgetPreference {\n id: string;\n index?: number;\n hidden?: boolean;\n}\n\nexport interface CuratedWidget<\n TData extends CuratedWidgetData = CuratedWidgetData,\n TContent extends CuratedWidgetContent = CuratedWidgetContent\n> extends BaseWidget<TContent> {\n id: string;\n dashboardId: string;\n data: TData;\n status: WidgetStatus;\n metadata?: Partial<WidgetMetadata>;\n preferences?: WidgetPreference[];\n cursor?: string;\n\n // If a widget has curriculum IDs set, then it won't be accessible to anyone who doesn't have one of those curriculums\n curriculumIds?: string[];\n}\n\nexport type CuratedMediaWidget<\n TContent extends CuratedWidgetContent = CuratedWidgetContent\n> = CuratedWidget<CuratedObjectsWidgetData, TContent>;\n","import { ObjectHash } from 'backbone';\nimport Bloodhound from 'bloodhound';\n\nimport { SearchIndices } from 'libs/shared/apps/search/interfaces';\n\nexport interface RemoteSearch<T> extends Bloodhound.BloodhoundOptions<T> {\n remote: Bloodhound.RemoteOptions<T>;\n}\n\nexport interface LocalSearch<T> extends Bloodhound.BloodhoundOptions<T> {\n local: T[] | (() => T[]);\n}\n\nexport type TypeaheadDataSource<T> = Bloodhound<T> |\n((query: string, syncResults: (result: T[]) => void, asyncResults?: (result: T[]) => void) => void);\n\nexport interface InstantSearchBloodhound<T> {\n bloodhound: TypeaheadDataSource<T>;\n name: string;\n}\n\nexport type TypeaheadConfig<T> = Twitter.Typeahead.Dataset<T>;\n\nexport interface TypeaheadConfigHandler<T> {\n (source?: InstantSearchBloodhound<T>, index?: number, options?: ObjectHash): Twitter.Typeahead.Dataset<T>;\n}\n\nexport interface BloodhoundConfigHandler<T> {\n (source: string, options?: ObjectHash): LocalSearch<T> | RemoteSearch<T>;\n}\n\nexport interface TypeaheadSourceItem<T> {\n name: string;\n typeaheadConfig: TypeaheadConfigHandler<T>;\n bloodhoundConfig?: BloodhoundConfigHandler<T>;\n options?: ObjectHash;\n}\n\nexport const AllSearchIndicesVideoStyle: SearchIndices[] = [ 'video', 'clip', 'interactive' ];\nexport const AllSearchIndicesInSearch: SearchIndices[] = [ 'playlist', 'series', 'clip', 'classification', 'interactive', 'video', 'company', 'category', 'partner_profile' ];\nexport const AllSearchIndicesInUserManager: SearchIndices[] = ['user'];\n","import { SvgIcon } from 'libs/shared/utils/SvgHelper';\n\nimport { FilterStateHash } from '../reducers';\n\nimport { FilterProps } from './FilterProps';\nimport { SearchIndices } from './SearchResults';\n\nconst FilterIdNames =\n [\n 'sort', // \"sort\" isn't even a filter but it tends to go with our filters in our designs\n 'classification',\n 'presentation',\n 'audience',\n 'yearGroup',\n 'moviesAndTv',\n 'type',\n 'rating',\n 'interactives',\n 'clips',\n 'classroom',\n 'hasResources',\n 'hasSubtitles',\n 'productionYear',\n 'isHd',\n 'producedByClickView',\n 'duration',\n 'tagOrClassification',\n 'status',\n 'isAdmin',\n 'bulkActionType',\n 'userType',\n 'filter',\n 'channel',\n 'dateBroadcast',\n 'categoryId',\n 'hasInteractives',\n 'jobStatus',\n 'source',\n 'customerStatus',\n 'specialEventType',\n 'customerType',\n 'seriesId',\n 'scopeId'\n ] as const;\n\n/**\n * Any filters that shouldn't be sent to the backend as a filter\n * and are instead handled differently by the frontend\n */\nconst FilterBlacklist: Partial<Record<FilterIds, boolean>> = {\n type: true\n};\n\nexport type FilterIds = typeof FilterIdNames[number];\n\nexport const FilterWhitelist = FilterIdNames.reduce((acc, prev) => {\n return {\n ...acc,\n [prev]: !FilterBlacklist[prev]\n };\n}, {} as Record<FilterIds, boolean>);\n\nexport type FilterType = 'radio' | 'checkbox' | 'nested-checkbox' | 'grouped-checkbox' | 'switch' | 'more-filters' | 'rating' | 'dropdown' | 'tag' | 'button';\n\nexport interface SearchFilter<TFilterOptionId = string> {\n id: FilterIds;\n type: FilterType;\n compatibleIndices: SearchIndices[];\n\n name?: string;\n icon?: SvgIcon;\n description?: string;\n options?: FilterOption<TFilterOptionId>[];\n labelPrefix?: string;\n\n // For second layer options, for example 'presentation' checkbox filter has 'audience' as second layer option\n secondaryId?: FilterIds;\n\n customComponent?: (props: FilterProps) => JSX.Element;\n disabled?: boolean;\n disableOptions?: (options: FilterOption[], filters: SearchFilter[], state: FilterStateHash) => FilterOption[];\n}\n\nexport interface MoreFilters extends Omit<SearchFilter, 'id' | 'compatibleIndices'> {\n filters: SearchFilter[];\n id: string;\n}\n\nexport interface FilterOption<TId = string> {\n id: TId;\n name: string;\n default?: boolean;\n disabled?: boolean;\n secondLayerSelection?: FilterOption[];\n secondLayerOptions?: FilterOption[];\n group?: string;\n}\n\nexport type ProductionYearFilterOptions =\n 'any-year' |\n 'this-year' |\n 'last-3-years' |\n 'last-5-years';\n\nexport type DurationFilterOptions =\n 'bite-sized' |\n 'short' |\n 'medium' |\n 'long';\n\nexport enum SourceFilterOptions {\n MyVideos = 'my-videos',\n School = 'school',\n ExchangeArchive = 'exchange-archive',\n ClickView = 'clickview',\n LiveStreams = 'livestreams'\n}\n\nexport enum TypeFilterOptions {\n Video = 'video',\n Series = 'series',\n Playlist = 'playlist',\n Classification = 'classification',\n Clip = 'clip',\n Interactive = 'interactive',\n Company = 'company',\n Category = 'category',\n PartnerProfile = 'partner_profile'\n}\n","export enum WidgetTemplate {\n // Videos\n ThumbnailHeroMedia = 'thumbnail_hero_media',\n ThumbnailFeaturedMedia = 'thumbnail_featured_media',\n ThumbnailSlidingListSmall = 'thumbnail_sliding_list_small',\n ThumbnailSlidingListSmallV2 = 'thumbnail_sliding_list_small_v2',\n ThumbnailSlidingListLarge = 'thumbnail_sliding_list_large',\n ThumbnailFixedListMediaSmall = 'thumbnail_fixed_list_media_small',\n ThumbnailFixedListMediaLarge = 'thumbnail_fixed_list_media_large',\n ThumbnailFixedListFolderSmall = 'thumbnail_fixed_list_folder_small',\n ThumbnailVerticalList = 'thumbnail_vertical_list',\n PopoutThumbnailSlidingListLarge = 'popout_thumbnail_sliding_list_large',\n PopoutThumbnailSlidingListSmall = 'popout_thumbnail_sliding_list_small',\n FeaturedThumbnailSlidingList = 'featured_thumbnail_sliding_list',\n ThumbnailFixedListXLarge = 'thumbnail_fixed_list_xlarge',\n\n // Topics\n CoverSlidingPillListSmall = 'cover_sliding_pill_list_small',\n CoverFixedPillListLarge = 'cover_fixed_pill_list_large',\n StatsCoverFixedPillListLarge = 'stats_cover_fixed_pill_list_large',\n CoverFixedPillListXSmall = 'cover_fixed_pill_list_xsmall',\n ThumbnailFixedListLarge = 'thumbnail_fixed_list_large',\n ThumbnailFixedListSmall = 'thumbnail_fixed_list_small',\n EditableCoverFixedPillListSmall = 'editable_cover_fixed_pill_list_small',\n HeroBanner = 'hero_banner',\n HeroThumbnailSmall = 'hero_thumbnail_small',\n HeroBlockColourSmall = 'hero_block_colour_small',\n\n // Curriculum\n CurriculumResourcesAccordion = 'curriculum_resources_accordion',\n CurriculumCodeSearchResults = 'curriculum_code_search_results',\n\n // Playlists\n CoverFixedTileList = 'cover_fixed_tile_list',\n\n // Topics & Series\n PosterSlidingListLarge = 'poster_sliding_list_large',\n PosterSlidingListMedium = 'poster_sliding_list_medium',\n PosterSlidingListSmall = 'poster_sliding_list_small',\n PosterFixedListLarge = 'poster_fixed_list_large',\n\n // Blurbs & Topics\n HeroBannerSmall = 'hero_banner_small',\n\n // Text-based blurbs\n Heading = 'heading',\n AuthorReviewer = 'author_reviewer',\n Question = 'question',\n QuestionAccordion = 'question_accordion',\n\n // Companies / Studios / Content Partners\n CircleLogoSlidingList = 'circle_logo_sliding_list',\n RectangularLogoSlidingList = 'rectangular_logo_sliding_list',\n RectangularLogoFixedList = 'rectangular_logo_fixed_list',\n ThumbnailFixedListSearchCta = 'thumbnail_fixed_list_search_cta',\n InfiniteThumbnailVerticalList = 'infinite_thumbnail_vertical_list',\n\n // Rating filters\n FilterSlidingPillListSmall = 'filter_sliding_pill_list_small',\n\n // Special events\n EventIconSlidingList = 'event_icon_sliding_list',\n\n // Tags filter\n TagSlidingList = 'tag_sliding_list',\n\n SearchSuggestionsBlurb = 'search_suggestions_blurb'\n}\n","export enum WidgetTypeId {\n // Video group\n CuratedMedia = 'curated_media',\n PlaylistMedia = 'playlist_media',\n SeriesMedia = 'series_media',\n ClassificationMedia = 'classification_media',\n LatestReleasedVideos = 'latest_released_videos',\n ContinueWatching = 'continue_watching_videos',\n CompanyLatestReleasedVideo = 'company_latest_released_video',\n CompanyVideos = 'company_videos',\n ClassificationLatestReleasedVideo = 'classification_latest_released_video',\n ClassificationLatestReleasedVideosV2 = 'classification_latest_released_videos_v2',\n CompanyClassificationVideos = 'company_classification_videos',\n ClassificationDashboardMedia = 'classification_dashboard_media',\n ClassificationDashboardExternalMedia = 'classification_dashboard_external_media',\n SeasonalClassificationMedia = 'seasonal_classification_media',\n TrendingClassificationsMedia = 'trending_classifications_media',\n ClassificationCurriculumMedia = 'classification_curriculum_media',\n\n // Topics group\n CuratedClassifications = 'curated_classifications',\n Classifications = 'classifications',\n ClassificationLatestReleasedVideos = 'classification_latest_released_videos',\n SpecialEventClassifications = 'special_event_classifications',\n LatestReleasedClassifications = 'latest_released_classifications',\n TrendingClassifications = 'trending_classifications',\n\n // Series group\n CuratedSeries = 'curated_series',\n\n // Playlists group\n CuratedPlaylists = 'curated_playlists',\n\n // Blurb group\n Blurb = 'blurb',\n DynamicBlurb = 'dynamic_blurb',\n AuthorReviewer = 'author_reviewer',\n Faq = 'faq',\n\n // Network group\n CuratedCompanies = 'curated_companies',\n\n // Partner Profile group\n CuratedContentPartners = 'curated_content_partners',\n ContentPartnerLatestReleasedVideos = 'content_partner_latest_released_videos',\n ContentPartnerSeries = 'content_partner_series',\n ContentPartnerVideos = 'content_partner_videos',\n SpotlightContentPartners = 'spotlight_curated_content_partners',\n ContentPartners = 'content_partners',\n ContentPartnersHub = 'content_partners_hub',\n TrendingContentPartnersVideo = 'content_partner_trending_videos',\n ContentPartnerAllVideos = 'content_partner_all_videos',\n\n // Search filter group\n Ratings = 'ratings',\n\n // Presentations group\n Presentations = 'presentations',\n\n // Livestreams group\n UpcomingLivestreams = 'upcoming_livestreams',\n\n // Multimedia group\n CuratedMultimedia = 'curated_multimedia',\n\n // Legacy widget types\n ClassificationPlaylists = 'classification_playlists',\n ClassificationSeries = 'classification_series',\n ClassificationFeaturedVideo = 'classification_featured_video',\n ClassificationPinnedVideos = 'classification_pinned_videos',\n\n // Search widget types\n SearchRelevantTopics = 'search_relevant_topics',\n SearchCompanies = 'search_companies',\n SearchTopResults = 'search_top_results',\n SearchSeries = 'search_series',\n SearchPlaylists = 'search_playlists',\n SearchMyVideosFolder = 'search_my_videos_folders',\n SearchMySchoolLibraryFolder = 'search_my_school_library_folders',\n SearchMyVideos = 'search_my_videos',\n SearchMySchoolLibraryVideos = 'search_my_school_library_videos',\n SearchExchangeArchive = 'search_exchange_archive',\n SearchRelatedResults = 'search_related_results',\n SearchTags = 'search_tags',\n SearchCurriculumCode = 'search_curriculum_code',\n SearchSuggestions = 'search_suggestions',\n SearchContentPartners = 'search_content_partners'\n}\n","import { FormikContextType } from 'formik';\n\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SearchResultObjectTypes } from 'libs/shared/apps/search/interfaces';\nimport { GetCustomParamOptions, WidgetTypeIdConfig } from 'libs/shared/constants/WidgetTypeIdConfig';\nimport { UserGroup } from 'libs/shared/enums/UserGroup';\nimport { OnlineUserRole } from 'libs/shared/enums/UserRole';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { SettingsHash } from 'libs/shared/hooks/useSettings';\nimport { BaseObject, ClassificationCurriculumInfo, ClassificationDashboardInfo, ClassificationDirectoryInfo, CuratedDashboard, CuratedMediaWidget, CuratedWidget, CuratedWidgetQueryParams, DashboardTargetInfo, DashboardTargetType, PartnerProfileDashboardInfo, UnknownDashboardTargetInfo } from 'libs/shared/interfaces';\n\ninterface LatestReleasesTimeRange {\n from: string;\n to: string;\n}\n\nexport const DashboardHelper = {\n\n /**\n * Same implementation as GetUserGroup() in Online.\n * @param userRole \n */\n getUserGroup(userRole: OnlineUserRole): UserGroup {\n if (userRole === OnlineUserRole.Student)\n return UserGroup.Learner;\n\n return UserGroup.Staff;\n }\n};\n\nexport const CuratedDashboardHelper = {\n onSelectCuratedObject(\n selectedObj: SearchResultObjectTypes | BaseObject,\n formikProps: FormikContextType<CuratedMediaWidget<BaseObject[]>>\n ) {\n const data = {\n ...formikProps.values.data,\n objectIds: ArrayHelper.addOrRemoveImmutable(formikProps.values.data.objectIds || [], selectedObj.id)\n };\n \n formikProps.setFieldValue('data', data);\n \n formikProps.setTouched({\n ...formikProps.touched,\n data: {\n objectIds: true\n }\n });\n },\n\n onRemoveCuratedObject(\n objectId: string,\n formikProps: FormikContextType<CuratedMediaWidget<BaseObject[]>>\n ) {\n const newData = {\n ...formikProps.values.data,\n objectIds: formikProps.values.data.objectIds.filter(id => id !== objectId)\n };\n\n formikProps.setFieldValue('data', newData);\n },\n\n getDashboardTarget(info: DashboardTargetInfo): string {\n if (info.targetType === DashboardTargetType.Discover)\n return `discover:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.Classification)\n return `classification:${info.classificationId}`;\n\n if (info.targetType === DashboardTargetType.ClassificationDirectory)\n return `classification:${info.classificationId}:directory`;\n\n if (info.targetType === DashboardTargetType.ClassificationCurriculum)\n return `classification:${info.classificationId}:curriculum`;\n\n if (info.targetType === DashboardTargetType.MoviesAndTv)\n return `moviesAndTv:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.Company)\n return `company:${info.companyId}:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.PartnerProfile)\n return `partnerprofile:${info.slug}`;\n\n if (info.targetType === DashboardTargetType.DiscoverPartnerProfiles)\n return `discover:partners`;\n\n if (info.targetType === DashboardTargetType.PartnerProfileHub)\n return `discover:partners:hub`;\n\n return null;\n },\n\n getUnknownDashboardTarget(options: UnknownDashboardTargetInfo): string {\n const {\n presentationId,\n companyId,\n targetType,\n classificationId,\n slug\n } = options;\n\n if (targetType === DashboardTargetType.Discover) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Discover,\n presentationId\n });\n }\n \n if (targetType === DashboardTargetType.MoviesAndTv) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.MoviesAndTv,\n presentationId\n });\n }\n \n if (targetType === DashboardTargetType.Company) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Company,\n presentationId,\n companyId\n });\n }\n \n if (targetType === DashboardTargetType.Classification) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Classification,\n classificationId\n });\n }\n \n if (targetType === DashboardTargetType.ClassificationDirectory) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.ClassificationDirectory,\n classificationId\n });\n }\n \n if (targetType === DashboardTargetType.ClassificationCurriculum) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.ClassificationCurriculum,\n classificationId\n });\n }\n\n if (targetType === DashboardTargetType.PartnerProfile) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.PartnerProfile,\n slug\n });\n }\n\n if (targetType === DashboardTargetType.DiscoverPartnerProfiles) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.DiscoverPartnerProfiles\n });\n }\n\n if (targetType === DashboardTargetType.PartnerProfileHub) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.PartnerProfileHub\n });\n }\n },\n\n getDashboardTargetInfo(dashboard: CuratedDashboard): DashboardTargetInfo {\n const type = CuratedDashboardHelper.getDashboardTargetType(dashboard);\n const split = dashboard?.target?.split(':');\n\n if (type === DashboardTargetType.Discover) {\n return {\n targetType: DashboardTargetType.Discover,\n presentationId: split[2]\n };\n }\n\n if (type === DashboardTargetType.Classification) {\n return {\n targetType: DashboardTargetType.Classification,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.ClassificationDirectory) {\n return {\n targetType: DashboardTargetType.ClassificationDirectory,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.ClassificationCurriculum) {\n return {\n targetType: DashboardTargetType.ClassificationCurriculum,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.MoviesAndTv) {\n return {\n targetType: DashboardTargetType.MoviesAndTv,\n presentationId: split[2]\n };\n }\n\n if (type === DashboardTargetType.Company) {\n return {\n targetType: DashboardTargetType.Company,\n companyId: split[1],\n presentationId: split[3]\n };\n }\n\n if (type === DashboardTargetType.PartnerProfile) {\n return {\n targetType: DashboardTargetType.PartnerProfile,\n slug: split[1]\n };\n }\n\n return null;\n },\n\n getDashboardTargetType(dashboard: CuratedDashboard): DashboardTargetType {\n if (!dashboard?.target)\n return null;\n\n if (dashboard.target.startsWith('discover')) {\n if (dashboard.target.endsWith('partners'))\n return DashboardTargetType.DiscoverPartnerProfiles;\n\n if (dashboard.target.endsWith('hub'))\n return DashboardTargetType.PartnerProfileHub;\n\n return DashboardTargetType.Discover;\n }\n\n if (dashboard.target.startsWith('classification')) {\n if (dashboard.target.endsWith('directory'))\n return DashboardTargetType.ClassificationDirectory;\n\n if (dashboard.target.endsWith('curriculum'))\n return DashboardTargetType.ClassificationCurriculum;\n\n return DashboardTargetType.Classification;\n }\n\n if (dashboard.target.startsWith('moviesAndTv'))\n return DashboardTargetType.MoviesAndTv;\n\n if (dashboard.target.startsWith('company')) {\n return DashboardTargetType.Company;\n }\n\n if (dashboard.target.startsWith('partnerprofile'))\n return DashboardTargetType.PartnerProfile;\n\n return null;\n },\n\n isType(dashboard: CuratedDashboard, target: DashboardTargetType): boolean {\n return CuratedDashboardHelper.getDashboardTargetType(dashboard) === target;\n },\n\n isCuratedDashboard(obj: BaseObject): obj is CuratedDashboard {\n const dashboard = obj as CuratedDashboard;\n\n const targetType = CuratedDashboardHelper.getDashboardTargetType(dashboard);\n\n if (targetType === DashboardTargetType.Discover)\n return true;\n\n if (targetType === DashboardTargetType.Classification)\n return true;\n\n if (targetType === DashboardTargetType.ClassificationDirectory)\n return true;\n\n if (targetType === DashboardTargetType.ClassificationCurriculum)\n return true;\n\n if (targetType === DashboardTargetType.MoviesAndTv)\n return true;\n\n if (targetType === DashboardTargetType.Company)\n return true;\n\n return false;\n },\n\n getLatestReleasedTimeRange(): LatestReleasesTimeRange {\n const now = new Date();\n const from = DateHelper.format(DateHelper.endOf(DateHelper.subtract(now, 2, 'month'), 'day'), 'YYYY-MM-DD');\n const to = DateHelper.format(DateHelper.endOf(now, 'day'), 'YYYY-MM-DD');\n return { from, to };\n },\n\n getWidgetParams(\n widgetTypeId: WidgetTypeId,\n templateId: WidgetTemplate,\n target: DashboardTargetType,\n audienceIds?: string | string[],\n preferredCurriculumId?: string,\n options?: GetCustomParamOptions\n ): CuratedWidgetQueryParams {\n const params: CuratedWidgetQueryParams = { };\n\n if (audienceIds)\n params.audienceId = audienceIds;\n\n if (widgetTypeId === WidgetTypeId.ClassificationCurriculumMedia)\n params.curriculumPresentationId = preferredCurriculumId;\n\n return {\n ...params,\n ...WidgetTypeIdConfig[widgetTypeId]?.getCustomParams?.(templateId, target, options)\n };\n },\n\n isSystemGeneratedDashboard(widgets: CuratedWidget[]): boolean {\n const systemGeneratedClassificationWidgetTypes = new Set<WidgetTypeId>([\n WidgetTypeId.ClassificationFeaturedVideo,\n WidgetTypeId.ClassificationPinnedVideos,\n WidgetTypeId.ClassificationPlaylists,\n WidgetTypeId.ClassificationSeries\n ]);\n\n return widgets?.some(widget => systemGeneratedClassificationWidgetTypes.has(widget.widgetId));\n },\n\n isClassificationDashboard(\n targetInfo: DashboardTargetInfo\n ): targetInfo is ClassificationDashboardInfo | ClassificationDirectoryInfo | ClassificationCurriculumInfo {\n return [\n DashboardTargetType.Classification,\n DashboardTargetType.ClassificationDirectory,\n DashboardTargetType.ClassificationCurriculum\n ].includes(targetInfo?.targetType);\n },\n\n isContentPartnerDashboard(targetInfo: DashboardTargetInfo): targetInfo is PartnerProfileDashboardInfo {\n return targetInfo?.targetType === DashboardTargetType.PartnerProfile;\n },\n\n isDirectoryDashboard(\n targetInfo: DashboardTargetInfo\n ): targetInfo is ClassificationDirectoryInfo {\n return targetInfo?.targetType === DashboardTargetType.ClassificationDirectory;\n },\n\n isWidgetTypeEnabled(\n widgetTypeId: WidgetTypeId,\n settingsHash: SettingsHash,\n targetType: DashboardTargetType\n ): boolean {\n const config = WidgetTypeIdConfig[widgetTypeId];\n \n return config?.predicate?.({ settingsHash, targetType }) ?? true;\n }\n};\n","import { Core } from 'libs/common/backbone/index';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SourceFilterOptions, TypeFilterOptions } from '../apps/search/interfaces';\nimport { WidgetAppLinks } from '../components/widgets/curated-widgets/WidgetProps';\nimport { WidgetTemplate } from '../enums/WidgetTemplate';\nimport { WidgetTypeId } from '../enums/WidgetTypeId';\nimport { SettingsHash } from '../hooks/useSettings';\nimport { CuratedWidgetContent, CuratedWidgetQueryParams, DashboardTargetType, Series } from '../interfaces';\nimport { CuratedDashboardHelper } from '../utils/DashboardHelper';\n\ninterface WidgetTypeIdPredicateOptions {\n settingsHash: SettingsHash;\n targetType: DashboardTargetType;\n}\n\nexport interface GetCustomParamOptions {\n params?: CuratedWidgetQueryParams;\n}\n\ninterface WidgetTypeIdConfigType {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => CuratedWidgetQueryParams;\n minContent?: number;\n getCollectionAppLink?: (\n appLinks: Partial<WidgetAppLinks>,\n content?: CuratedWidgetContent\n ) => Core.AppLink;\n /**\n * Predicate used to determine if the widget\n * should be displayed based on the target\n * type and settings. Useful for feature flagging widgets.\n */\n predicate?: (options: WidgetTypeIdPredicateOptions) => boolean;\n}\n\nfunction partnerProfileWidgetTypeIdPredicate(options: WidgetTypeIdPredicateOptions): boolean {\n return options.settingsHash?.hasPartnerProfiles ?? false;\n}\n\nexport const WidgetTypeIdConfig: Record<WidgetTypeId, WidgetTypeIdConfigType> = {\n [WidgetTypeId.CuratedMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.PlaylistMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SeriesMedia]: {\n getCustomParams: (widgetTemplate: WidgetTemplate) => {\n switch (widgetTemplate) {\n case WidgetTemplate.ThumbnailFixedListMediaLarge:\n return { limit: 2 };\n case WidgetTemplate.ThumbnailHeroMedia:\n case WidgetTemplate.ThumbnailFeaturedMedia:\n return { limit: 1 };\n default:\n return { limit: 12 };\n }\n },\n getCollectionAppLink: (appLinks, content) => appLinks?.series?.(ArrayHelper.first(content) as Series)\n },\n [WidgetTypeId.ClassificationMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.LatestReleasedVideos]: {\n getCustomParams: () => {\n return CuratedDashboardHelper.getLatestReleasedTimeRange();\n }\n },\n [WidgetTypeId.ContinueWatching]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks?.watchHistory?.()\n },\n [WidgetTypeId.CompanyLatestReleasedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.CompanyVideos]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationLatestReleasedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationLatestReleasedVideosV2]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n [WidgetTypeId.SeasonalClassificationMedia]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n [WidgetTypeId.CompanyClassificationVideos]: {\n getCustomParams: () => ({}),\n minContent: 4\n },\n [WidgetTypeId.TrendingClassificationsMedia]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n\n [WidgetTypeId.CuratedClassifications]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.TrendingClassifications]: {\n getCustomParams: () => {\n return {\n limit: 6\n };\n },\n minContent: 3\n },\n [WidgetTypeId.Classifications]: {\n getCustomParams: (template: WidgetTemplate, targetType: DashboardTargetType) => {\n if (targetType === DashboardTargetType.Discover) {\n if (template === WidgetTemplate.EditableCoverFixedPillListSmall) {\n return {\n canBePreferred: true,\n isFollowing: true\n };\n }\n\n if ([ WidgetTemplate.PosterSlidingListSmall, WidgetTemplate.CoverFixedPillListXSmall ].includes(template)) {\n return {\n canBePreferred: true\n };\n }\n }\n\n return {};\n }\n },\n [WidgetTypeId.ClassificationLatestReleasedVideos]: {\n getCustomParams: () => {\n return CuratedDashboardHelper.getLatestReleasedTimeRange();\n }\n },\n [WidgetTypeId.SpecialEventClassifications]: {\n getCustomParams: () => ({\n from: DateHelper.format(new Date(), 'YYYY-MM-DD')\n })\n },\n [WidgetTypeId.LatestReleasedClassifications]: {\n getCustomParams: () => {\n return {\n limit: 6\n };\n },\n minContent: 3\n },\n\n [WidgetTypeId.CuratedSeries]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.CuratedPlaylists]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.Blurb]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.DynamicBlurb]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.AuthorReviewer]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.Faq]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.CuratedCompanies]: {\n getCustomParams: () => ({}),\n predicate: options => {\n if (options.settingsHash?.hasPartnerProfiles)\n return false;\n return true;\n }\n },\n\n [WidgetTypeId.Ratings]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.Presentations]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.UpcomingLivestreams]: {\n getCustomParams: () => ({\n from: DateHelper.format(new Date(), 'YYYY-MM-DD')\n })\n },\n\n [WidgetTypeId.CuratedMultimedia]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.ClassificationPlaylists]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationSeries]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationFeaturedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationPinnedVideos]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationDashboardExternalMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationDashboardMedia]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.SearchRelevantTopics]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchRelevantTopics],\n type: [TypeFilterOptions.Classification]\n })\n },\n [WidgetTypeId.SearchCompanies]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchCompanies],\n type: [TypeFilterOptions.Company]\n }),\n predicate: options => {\n if (options.settingsHash?.hasPartnerProfiles)\n return false;\n return true;\n }\n },\n [WidgetTypeId.SearchSeries]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchSeries],\n type: [TypeFilterOptions.Series]\n })\n },\n [WidgetTypeId.SearchPlaylists]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchPlaylists],\n type: [TypeFilterOptions.Playlist]\n })\n },\n [WidgetTypeId.SearchMyVideosFolder]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMyVideosFolder],\n source: [SourceFilterOptions.MyVideos]\n })\n },\n [WidgetTypeId.SearchMySchoolLibraryFolder]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMySchoolLibraryFolder],\n source: [SourceFilterOptions.School]\n })\n },\n [WidgetTypeId.SearchMyVideos]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMyVideos],\n source: [SourceFilterOptions.MyVideos]\n })\n },\n [WidgetTypeId.SearchMySchoolLibraryVideos]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMySchoolLibraryVideos],\n source: [SourceFilterOptions.School]\n })\n },\n [WidgetTypeId.SearchExchangeArchive]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchExchangeArchive],\n source: [SourceFilterOptions.ExchangeArchive]\n })\n },\n [WidgetTypeId.SearchRelatedResults]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchTopResults]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationCurriculumMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchTags]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchCurriculumCode]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchSuggestions]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchContentPartners]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchContentPartners],\n type: [TypeFilterOptions.PartnerProfile]\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.CuratedContentPartners]: {\n getCustomParams: () => ({\n limit: 12\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerLatestReleasedVideos]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerSeries]: {\n getCollectionAppLink: appLinks => {\n return appLinks?.scopedSearchHome?.({\n type: [TypeFilterOptions.Series]\n });\n },\n getCustomParams: () => ({\n limit: 12\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerVideos]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.SpotlightContentPartners]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartners]: {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => ({\n letterPrefix: options?.params?.letterPrefix,\n sort: options?.params?.sort\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnersHub]: {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => {\n if (targetType !== DashboardTargetType.PartnerProfileHub)\n return {};\n\n return {\n objectId: options?.params?.objectId\n };\n },\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.TrendingContentPartnersVideo]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerAllVideos]: {\n getCustomParams: (widgetTemplate: WidgetTemplate) => {\n if (widgetTemplate === WidgetTemplate.ThumbnailFixedListSearchCta)\n return { limit: 3 };\n\n return {};\n },\n predicate: partnerProfileWidgetTypeIdPredicate\n }\n};\n","import React from 'react';\n\nexport function WarningOutlineSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n 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'\n fill='currentColor'\n />\n </svg>\n );\n}\n","export enum WidgetStatus {\n Draft = 0,\n Published = 1,\n Archived = 2\n}\n\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { AnalyticsOptions, ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { WidgetStatus } from 'libs/shared/enums/WidgetStatus';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { Breakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { BaseWidget, CuratedDashboardAppLink, CuratedWidget, CuratedWidgetContent, Playlist, Presentation, Series, Video, VideoTypes, VideoWidgetTemplateContent, WidgetMetadata, WidgetPreference } from 'libs/shared/interfaces';\n\nimport { AnyWidgetTemplateProps } from '../components/widgets/curated-widgets/WidgetProps';\nimport { WidgetTypeIdConfig } from '../constants/WidgetTypeIdConfig';\nimport { MasterType } from '../enums/MasterType';\n\nimport { MasterTypeHelper } from './MasterTypeHelper';\n\nenum WidgetStatusString {\n Draft = 'Draft',\n Published = 'Published',\n Archived = 'Archived'\n}\n\nexport const WidgetHelper = {\n /**\n * Used by both the FixedWidget and DynamicWidget\n */\n getSliderAnalyticsOptions: (): AnalyticsOptions => ({\n actionType: UserAction.Click,\n location: LocationContext.SlidingList,\n entity: EntityType.Widget,\n descriptor: ClickDescriptor.Slide\n }),\n\n /**\n * Used by both the FixedWidget and DynamicWidget\n */\n getSliderItemAnalyticsOptions: (): AnalyticsOptions => ({\n location: LocationContext.SlidingListItem\n }),\n\n getSliderHeadingAnalyticsOptions: (): AnalyticsOptions => ({\n actionType: UserAction.Click,\n location: LocationContext.SlidingList,\n entity: EntityType.Widget,\n descriptor: ClickDescriptor.Title\n }),\n\n useGetContent(\n content: CuratedWidgetContent,\n widgetTypeId: WidgetTypeId,\n isPreviewing: boolean,\n preferences: WidgetPreference[],\n removedItemIds: string[]\n ): { content: CuratedWidgetContent, unfilteredContent: CuratedWidgetContent } {\n return React.useMemo(() => {\n if (!content)\n return { content: null, unfilteredContent: null };\n\n if (!Array.isArray(content))\n return { content, unfilteredContent: content };\n\n const preferencesHash = preferences?.reduce((acc: HashObject, current) => {\n acc[current.id] = current;\n return acc;\n }, {}) ?? {};\n\n const removedItemIdsHash = removedItemIds.reduce((acc: HashObject, current) => {\n acc[current] = true;\n return acc;\n }, {});\n\n const contentCopy = [...content];\n \n const sortedContent = contentCopy.sort((a, b) => {\n if (!('id' in a) || !('id' in b))\n return 0;\n\n const aIndex = preferencesHash[a.id]?.index ?? contentCopy.findIndex(c => 'id' in c && c.id === a.id);\n const bIndex = preferencesHash[b.id]?.index ?? contentCopy.findIndex(c => 'id' in c && c.id === b.id);\n\n if (aIndex < bIndex)\n return -1;\n\n if (aIndex > bIndex)\n return 1;\n\n return 0;\n });\n\n if (WidgetHelper.isBelowContentMinimum(sortedContent, widgetTypeId) && !isPreviewing) {\n return {\n content: [],\n unfilteredContent: sortedContent\n };\n }\n\n const filteredContent = sortedContent.filter(item => {\n if (preferencesHash['id' in item && item.id]?.hidden)\n return false;\n\n if (removedItemIdsHash['id' in item && item.id])\n return false;\n\n return true;\n });\n\n return {\n content: filteredContent,\n unfilteredContent: sortedContent\n };\n }, [ content, preferences ]);\n },\n\n isBelowContentMinimum(content: CuratedWidgetContent, widgetTypeId: WidgetTypeId): boolean {\n const minContent = WidgetTypeIdConfig[widgetTypeId]?.minContent || 0;\n return content?.length < minContent;\n },\n\n getCustomAppLink(props: AnyWidgetTemplateProps): Core.AppLink | null {\n if (\n !('metadata' in props) ||\n !('appLinks' in props) ||\n !('appLink' in props.metadata)\n ) {\n return null;\n }\n\n if (props.metadata?.appLink === CuratedDashboardAppLink.LatestReleases && 'latestReleases' in props.appLinks)\n return props.appLinks?.latestReleases?.();\n\n if (props.metadata?.appLink === CuratedDashboardAppLink.ExploreAllTopics && 'allTopics' in props.appLinks && 'presentation' in props)\n return props.appLinks?.allTopics?.(props.presentation.id);\n\n return null;\n },\n\n getWidgetStatus(widget: CuratedWidget): WidgetStatus {\n let status = widget.status;\n\n if (typeof (status) === 'string') {\n switch (status) {\n case WidgetStatusString.Archived:\n status = WidgetStatus.Archived;\n break;\n case WidgetStatusString.Published:\n status = WidgetStatus.Published;\n break;\n case WidgetStatusString.Draft:\n status = WidgetStatus.Draft;\n break;\n }\n }\n\n return status;\n },\n\n formatResponseData(widget: CuratedWidget, presentation?: Presentation): CuratedWidget {\n const content = widget.content;\n\n if (!content)\n return widget;\n\n if ('author' in content) {\n widget.content = [content] as CuratedWidgetContent;\n return widget;\n }\n\n if ('data' in content)\n widget.content = content.data as CuratedWidgetContent;\n else if (!Array.isArray(content))\n widget.content = [content]; // Handle `classification_featured_video` widgets, which don't return content as an array\n\n switch (widget.widgetId) {\n case WidgetTypeId.ClassificationSeries:\n widget.content = widget.content.filter((c): c is Series => 'tallPoster' in c && !!c.tallPoster?.id);\n break;\n case WidgetTypeId.ClassificationPlaylists:\n widget.content = widget.content.filter((c): c is Playlist => 'cover' in c && !!c.cover?.id);\n break;\n case WidgetTypeId.ContinueWatching:\n widget.content = widget.content.map(c => 'object' in c && c.object);\n default:\n break;\n case WidgetTypeId.Presentations:\n widget.content = widget.content.filter((c): c is Presentation => 'id' in c && c.id.toString() !== presentation?.id?.toString());\n break;\n }\n\n return widget;\n },\n \n isWidgetInTableOfContents(metadata: Partial<WidgetMetadata>): boolean {\n return !!metadata?.showInTableOfContents;\n },\n\n /**\n * Widget container view won't render a widget with no content typically,\n * but some widgets (such as blurbs) have no content, but should render anyway.\n */\n hasNoContent(widgetTypeId: WidgetTypeId): boolean {\n if (widgetTypeId === WidgetTypeId.Blurb)\n return true;\n\n return false;\n },\n\n /**\n * If any widgets should be hidden on smaller screen sizes, add them here.\n * If this needs to be more flexible at some point, it should be added to\n * the widget settings and metadata object.\n */\n canDisplayOnScreenSize(\n breakpoints: Breakpoints,\n widgetTypeId: WidgetTypeId,\n widgetTemplate: WidgetTemplate\n ): boolean {\n if (widgetTypeId === WidgetTypeId.Blurb && widgetTemplate === WidgetTemplate.HeroBannerSmall)\n return !breakpoints.xs && !breakpoints.sm;\n\n return true;\n },\n\n isCompanyWidget(widgetTypeId: WidgetTypeId): boolean {\n switch (widgetTypeId) {\n case WidgetTypeId.CompanyLatestReleasedVideo:\n case WidgetTypeId.CompanyVideos:\n case WidgetTypeId.UpcomingLivestreams:\n return true;\n default:\n return false;\n }\n },\n\n getVideoContent(content: VideoWidgetTemplateContent): VideoTypes[] {\n const firstItem = ArrayHelper.first<Video | Series>(content);\n\n if (MasterTypeHelper.isType<Series>(firstItem, MasterType.Series))\n return firstItem.videos.data;\n\n return content as VideoTypes[];\n },\n\n showRemoveButton(widgetTypeId: WidgetTypeId): boolean {\n return widgetTypeId === WidgetTypeId.ContinueWatching;\n },\n\n /**\n * Paginated data returns more widgets so if we dont merge the widget content by widget type id,\n * it would add another widget to the page rather than appending content to the relevant\n * search result index\n * \n * For example:\n * Say we receive these widgets for a query:\n * - topics widget\n * - related results widget\n * \n * If a user scrolls down to the end of page we fetch more items from the last widget\n * which in this case is 'related results widget'. \n * Now our overall response looks like this\n * - topics widget\n * - related results widget\n * - related results widget\n * \n * Since this is a new widget item entry it will be rendered as a new widget with seprate headings etc.\n * In this case we want to combine these two widgets data into one so its looks like this again:\n * - topics widget\n * - related results widget (data is combined)\n * \n * But what if widget we get recieve has a different widget template id. This currently happens for\n * the 'series widget' - series widget can have the tall poster template or the thumbnail like template.\n * \n * so to visualize this it can be like:\n * - topics widget\n * - top results widget\n * - series widget (template: tall poster)\n * - series widget (template: thumbnail)\n * \n * Since they technically will look different based on the template id we will not merge the data in this case.\n * It will merge the data to the same widget as long as the combination of widget Id + template Id is the same.\n * \n * Since they are separate widgets they will render duplicate headings - we handle this in css instead which\n * checks for adjacent siblings and if its the same widget - it hides the widget heading so it will look\n * like its a single widget rather than separate widgets.\n * \n * - Nish\n */\n mergeWidgets<T extends BaseWidget>(\n items: T[],\n mergeContent: (target: T, source: T) => void\n ): T[] {\n const widgets = ObjectHelper.deepClone(items);\n const groupedWidgets = ArrayHelper.groupBy(widgets, 'widgetId');\n const mergedWidgets: T[] = [];\n\n for (const widgetGroup of Object.values(groupedWidgets)) {\n let currentMergedWidget: T | null = null;\n const groupMergedWidgets: T[] = [];\n\n for (const widget of widgetGroup) {\n if (!currentMergedWidget) {\n currentMergedWidget = widget;\n continue;\n }\n\n if (widget.templateId !== currentMergedWidget.templateId) {\n groupMergedWidgets.push(currentMergedWidget);\n currentMergedWidget = widget;\n continue;\n }\n\n mergeContent(currentMergedWidget, widget);\n }\n\n if (currentMergedWidget) {\n groupMergedWidgets.push(currentMergedWidget);\n }\n mergedWidgets.push(...groupMergedWidgets);\n }\n\n return mergedWidgets;\n }\n};\n",":local {\n .widgetTextButton {\n margin-top: 0.1rem;\n flex-shrink: 0;\n }\n}","import React from 'react';\nimport { Spinner } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor, LocationContext } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SvgContainer } from 'libs/shared/components/svg-container/SvgContainer';\nimport { WidgetTypeIdConfig } from 'libs/shared/constants/WidgetTypeIdConfig';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { WarningOutlineSvg } from 'libs/shared/images/svg/status/WarningOutlineSvg';\nimport { WidgetHelper } from 'libs/shared/utils/WidgetHelper';\n\nimport styles from './widget-header.module.scss';\n\nconst namespace = 'shared.widgetHeader';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface WidgetHeaderProps {\n name: string;\n description?: string | JSX.Element;\n isPreviewing?: boolean;\n content?: any[];\n widgetTypeId?: WidgetTypeId;\n badgeComponent?: JSX.Element;\n\n appLink?: Core.AppLink;\n onAppLinkClick?: () => void;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n \n showSeeMoreLink?: boolean;\n onClose?: () => void;\n onFollow?: (shouldFollow: boolean) => void;\n isFollowing?: boolean;\n showFollowSpinner?: boolean;\n}\n\nfunction SeeMore(props: WidgetHeaderProps) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton}`}>\n <AppLink\n appLink={props.appLink}\n analyticsData={props.analyticsData }\n analyticsOptions={{\n location: LocationContext.SlidingList,\n ...props.analyticsOptions,\n descriptor: ClickDescriptor.SeeMore\n }}\n className={`text-decoration-none ${props.appLink ? 'curated-widget-link' : ''}`}\n >\n <p className='hover-text-underline text-dark curated-widget-heading'>{getPhrase('seeAll')}</p>\n </AppLink>\n </div>\n );\n}\n\nfunction CloseWidgetButton(props: { onClose: () => void }) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton} text-decoration-none cursor-pointer`} onClick={props.onClose}>\n <p className='hover-text-underline text-dark curated-widget-heading'>{getPhrase('hide')}</p>\n </div>\n );\n}\n\nfunction FollowWidgetButton(props: {\n isFollowing: boolean,\n onFollow: (shouldFollow: boolean) => void,\n showFollowSpinner: boolean\n}) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton} text-decoration-none`}>\n {\n props.showFollowSpinner ?\n <Spinner as='span' animation='border' role='status' size='sm' /> :\n <p className='hover-text-underline text-dark curated-widget-heading cursor-pointer' onClick={() => props.onFollow(!props.isFollowing)}>\n {getPhrase(props.isFollowing ? 'unfollow' : 'follow')}\n </p>\n }\n </div>\n );\n}\n\nexport function WidgetHeader(props: WidgetHeaderProps): JSX.Element {\n const hasDescription = !!props.description;\n\n if (!props.name && !props.description)\n return <></>;\n\n const isBelowMinimum = WidgetHelper.isBelowContentMinimum(props.content, props.widgetTypeId);\n const minContent = WidgetTypeIdConfig[props.widgetTypeId]?.minContent ?? 0;\n\n return (\n <div className='curated-widget-header'>\n <div className='d-flex justify-content-between'>\n {!!props.name && (\n <div className='d-flex align-items-center'>\n <AppLink\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n className={`text-decoration-none ${props.appLink ? 'curated-widget-link text-reset' : ''}`}\n onClick={props.onAppLinkClick}\n >\n <h2 className='h4 curated-widget-heading'>\n {props.isPreviewing && isBelowMinimum && (\n <SvgContainer\n svg={WarningOutlineSvg}\n title={`Widget is below the minimum content threshold of ${minContent} and won't be displayed.`}\n tooltipSpanHack\n tooltipSpanHackClassName='d-inline text-danger me-1'\n />\n )}\n {props.name}\n </h2>\n </AppLink>\n {!!React.isValidElement(props.badgeComponent) && props.badgeComponent}\n </div>\n )}\n <div className='d-flex justify-content-between align-items-center gap-2'>\n {!!props.appLink && !hasDescription && !!props.showSeeMoreLink && <SeeMore {...props}/>}\n {FunctionHelper.isFunction(props.onFollow) &&\n <FollowWidgetButton\n isFollowing={props.isFollowing}\n onFollow={props.onFollow}\n showFollowSpinner={props.showFollowSpinner}\n />\n }\n {FunctionHelper.isFunction(props.onClose) && <CloseWidgetButton onClose={props.onClose}/>}\n </div>\n </div>\n \n {hasDescription && (\n <div className='d-flex justify-content-between align-items-end'>\n <p className='description curated-widget-description'>\n <span>{props.description}</span>\n </p>\n {!!props.appLink && !!props.showSeeMoreLink && <SeeMore {...props}/> }\n </div>\n )}\n </div>\n );\n}\n","export enum TagType {\n Normal = 'normal',\n Pedagogy = 'pedagogy',\n Hidden = 'hidden',\n Skill = 'skill',\n Curation = 'curation'\n}\n\n/**\n * This should **only** be used to create new tags in master (as it only accepts enum values).\n * Use the string enum above for all other cases.\n */\nexport enum TagTypeNumber {\n Normal = 0,\n Pedagogy = 1,\n Hidden = 2,\n Skill = 3,\n Curation = 4\n}\n",":local {\n $badge-base-height: 1.5rem;\n\n .tagList {\n display: flex;\n flex-wrap: wrap;\n }\n\n .badgeBase {\n height: $badge-base-height;\n }\n \n .disabled {\n background-color: $gray-200;\n color: $gray-500;\n\n &:hover {\n background-color: $gray-200;\n color: $gray-500;\n }\n }\n\n .partialTag {\n width: 5rem;\n }\n\n .removeBadge {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .removeBadgeText {\n line-height: $badge-base-height;\n }\n \n .close {\n opacity: 1;\n background-size: 0.625rem;\n\n &:not(:disabled):hover {\n opacity: 1;\n }\n }\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { TagType } from 'libs/shared/enums/TagType';\nimport { Tag, ThemeColours } from 'libs/shared/interfaces';\n\nimport { DivButton } from '../div-button/DivButton';\n\nimport styles from './tags.module.scss';\n\nconst namespace = 'shared.tags';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface TagItemProps {\n tag: Tag;\n themeColours?: ThemeColours;\n appLink?: Core.AppLink;\n onClick?: () => void;\n onRemove?: () => void;\n disabled?: boolean;\n tagClass?: string;\n}\n\nfunction getTagTypeClass(tagType: TagType, hasThemeColour: boolean): string {\n switch (tagType) {\n case TagType.Pedagogy:\n case TagType.Skill:\n return 'pedagogy-tag text-white';\n\n case TagType.Hidden:\n return 'hidden-tag fw-normal';\n\n case TagType.Normal:\n if (!hasThemeColour)\n return 'bg-gray-100 fw-normal';\n return '';\n\n default:\n return '';\n }\n}\n\nexport function TagItem(props: TagItemProps): JSX.Element {\n const { tag, appLink, onClick, disabled, tagClass = 'tag' } = props;\n\n const name = tag.name.toLowerCase();\n const tagType = tag.tagType?.toLowerCase() as TagType;\n\n const hasThemeColour = (tagType === TagType.Normal && props.themeColours) && !!props.themeColours?.secondary;\n let classNames = `${styles.badgeBase} rounded-pill py-1 px-2 my-1 me-1 ${tagClass} ${getTagTypeClass(tagType, hasThemeColour)}`;\n let textContainerClass = `text-truncate text-nowrap`;\n\n if (hasThemeColour)\n classNames += ' text-white';\n\n if ((appLink || onClick) && !disabled)\n classNames += ' cursor-pointer';\n\n if (disabled)\n classNames += ' ' + styles.disabled;\n\n if (props.onRemove) {\n classNames += ' ' + styles.removeBadge;\n textContainerClass += ' ' + `${styles.removeBadgeText} d-inline-flex align-items-center lh-1`;\n }\n if (!appLink)\n classNames += ' d-inline-block';\n\n const style: React.CSSProperties = hasThemeColour ?\n { backgroundColor: props.themeColours.secondary } :\n {};\n\n if (appLink) {\n return (\n <AppLink\n onClick={onClick}\n appLink={appLink}\n className={classNames}\n title={name}\n style={style}\n >\n <span className={textContainerClass}>{name}</span>\n </AppLink>\n );\n }\n\n return (\n <button\n onClick={onClick}\n className={classNames}\n title={name}\n style={style}\n aria-label={`${getPhrase('ariaFilter')} ${name}`}\n >\n <span className={textContainerClass}>\n {name}\n {props.onRemove &&\n <DivButton\n onClick={props.onRemove}\n className={`${styles.close} btn-close font-size-normal`}\n role='button'\n aria-label='Close'\n />\n }\n </span>\n </button>\n );\n}\n"],"mappings":"oaASA,IAAY,EAAL,SAAA,EAAA,OACL,GAAA,eAAA,kBACA,EAAA,iBAAA,qBACA,EAAA,6BAAA,iCACA,EAAA,wBAAA,iCACD,CCwBY,EAA8C,CAAE,QAAS,OAAQ,cAAe,CAChF,EAA4C,CAAE,WAAY,SAAU,OAAQ,iBAAkB,cAAe,QAAS,UAAW,WAAY,kBAAmB,CAChK,EAAiD,CAAC,OAAO,CCjChE,EACJ,kYAmCC,CAMG,EAAuD,CAC3D,KAAM,GACP,CAIY,EAAkB,EAAc,QAAQ,EAAK,KACjD,CACL,GAAG,GACF,GAAO,CAAC,EAAgB,GAC1B,EACA,EAAE,CAA+B,CAkDxB,EAAL,SAAA,EAAA,OACL,GAAA,SAAA,YACA,EAAA,OAAA,SACA,EAAA,gBAAA,mBACA,EAAA,UAAA,YACA,EAAA,YAAA,oBACD,CAEW,EAAL,SAAA,EAAA,OACL,GAAA,MAAA,QACA,EAAA,OAAA,SACA,EAAA,SAAA,WACA,EAAA,eAAA,iBACA,EAAA,KAAA,OACA,EAAA,YAAA,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GAAG,EAAgB,EAAS,EAAe,GACzH,EAAqB,4BAErB,IACF,GAAc,gBAEX,GAAW,IAAY,CAAC,IAC3B,GAAc,mBAEZ,IACF,GAAc,IAAM,EAAO,UAEzB,EAAM,WACR,GAAc,IAAM,EAAO,YAC3B,GAAsB,IAAS,EAAO,gBAAgB,yCAEnD,IACH,GAAc,mBAEhB,IAAM,EAA6B,EACjC,CAAE,gBAAiB,EAAM,aAAa,UAAW,CACjD,EAAE,CAgBJ,OAdI,GAEA,EAAA,EAAA,KAAC,EAAD,CACW,UACA,UACT,UAAW,EACX,MAAO,EACA,kBAEP,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,WAAqB,EAAY,CAAA,CAC1C,CAAA,EAKZ,EAAA,EAAA,KAAC,SAAD,CACW,UACT,UAAW,EACX,MAAO,EACA,QACP,aAAY,GAAG,EAAU,aAAa,CAAC,GAAG,cAE1C,EAAA,EAAA,MAAC,OAAD,CAAM,UAAW,WAAjB,CACG,EACA,EAAM,WACL,EAAA,EAAA,KAAC,EAAD,CACE,QAAS,EAAM,SACf,UAAW,GAAG,EAAO,MAAM,6BAC3B,KAAK,SACL,aAAW,QACX,CAAA,CAAA,GAGC,CAAA"}
|
|
1
|
+
{"version":3,"file":"BPttZx0-.chunk.js","names":[],"sources":["../../../../libs/shared/src/interfaces/models/curated-widget/CuratedWidget.ts","../../../../libs/shared/src/apps/search/interfaces/SearchTypes.ts","../../../../libs/shared/src/apps/search/interfaces/SearchFilter.ts","../../../../libs/shared/src/enums/WidgetTemplate.ts","../../../../libs/shared/src/enums/WidgetTypeId.ts","../../../../libs/shared/src/utils/DashboardHelper.ts","../../../../libs/shared/src/constants/WidgetTypeIdConfig.ts","../../../../libs/shared/src/images/svg/status/WarningOutlineSvg.tsx","../../../../libs/shared/src/enums/WidgetStatus.ts","../../../../libs/shared/src/utils/WidgetHelper.ts","../../../../libs/shared/src/components/widgets/curated-widgets/components/header/widget-header.module.scss","../../../../libs/shared/src/components/widgets/curated-widgets/components/header/WidgetHeader.tsx","../../../../libs/shared/src/enums/TagType.ts","../../../../libs/shared/src/components/tags/tags.module.scss","../../../../libs/shared/src/components/tags/TagItem.tsx"],"sourcesContent":["import { HashObject } from 'libs/common/react/interfaces';\n\nimport { AllWidgetTemplateProps } from 'libs/shared/components/widgets/curated-widgets/WidgetProps';\nimport { ButtonIcon } from 'libs/shared/constants/WidgetThemingConstants';\nimport { WidgetStatus } from 'libs/shared/enums/WidgetStatus';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { CuratedObjectsWidgetData, CuratedWidgetContent, CuratedWidgetData } from 'libs/shared/interfaces';\n\nexport enum CuratedDashboardAppLink {\n LatestReleases = 'latest-releases',\n ExploreAllTopics = 'explore-all-topics',\n ClassificationLatestReleases = 'classification-latest-releases',\n ClassificationDirectory = 'classification-directory'\n}\n\nexport enum CuratedWidgetCtaAppLink {\n TopicDirectory = 'topic-directory',\n TopicNewReleases = 'topic-new-releases',\n CuratedTopic = 'curated-topic'\n}\n\nexport interface BaseWidget<TContent extends HashObject = HashObject> {\n index: number;\n templateId: WidgetTemplate;\n widgetId: WidgetTypeId;\n name: string;\n description?: string;\n content?: TContent;\n}\n\nexport interface WidgetCta {\n text?: string;\n href?: string;\n icon?: ButtonIcon;\n appLink?: CuratedWidgetCtaAppLink;\n}\n\nexport type WidgetMetadata = AllWidgetTemplateProps['metadata'] & {\n showInTableOfContents: boolean,\n tocIndentation: number,\n headingOptional: boolean,\n aiAddedVideo: boolean\n};\n\nexport interface WidgetPreference {\n id: string;\n index?: number;\n hidden?: boolean;\n}\n\nexport interface CuratedWidget<\n TData extends CuratedWidgetData = CuratedWidgetData,\n TContent extends CuratedWidgetContent = CuratedWidgetContent\n> extends BaseWidget<TContent> {\n id: string;\n dashboardId: string;\n data: TData;\n status: WidgetStatus;\n metadata?: Partial<WidgetMetadata>;\n preferences?: WidgetPreference[];\n cursor?: string;\n\n // If a widget has curriculum IDs set, then it won't be accessible to anyone who doesn't have one of those curriculums\n curriculumIds?: string[];\n}\n\nexport type CuratedMediaWidget<\n TContent extends CuratedWidgetContent = CuratedWidgetContent\n> = CuratedWidget<CuratedObjectsWidgetData, TContent>;\n","import { ObjectHash } from 'backbone';\nimport Bloodhound from 'bloodhound';\n\nimport { SearchIndices } from 'libs/shared/apps/search/interfaces';\n\nexport interface RemoteSearch<T> extends Bloodhound.BloodhoundOptions<T> {\n remote: Bloodhound.RemoteOptions<T>;\n}\n\nexport interface LocalSearch<T> extends Bloodhound.BloodhoundOptions<T> {\n local: T[] | (() => T[]);\n}\n\nexport type TypeaheadDataSource<T> = Bloodhound<T> |\n((query: string, syncResults: (result: T[]) => void, asyncResults?: (result: T[]) => void) => void);\n\nexport interface InstantSearchBloodhound<T> {\n bloodhound: TypeaheadDataSource<T>;\n name: string;\n}\n\nexport type TypeaheadConfig<T> = Twitter.Typeahead.Dataset<T>;\n\nexport interface TypeaheadConfigHandler<T> {\n (source?: InstantSearchBloodhound<T>, index?: number, options?: ObjectHash): Twitter.Typeahead.Dataset<T>;\n}\n\nexport interface BloodhoundConfigHandler<T> {\n (source: string, options?: ObjectHash): LocalSearch<T> | RemoteSearch<T>;\n}\n\nexport interface TypeaheadSourceItem<T> {\n name: string;\n typeaheadConfig: TypeaheadConfigHandler<T>;\n bloodhoundConfig?: BloodhoundConfigHandler<T>;\n options?: ObjectHash;\n}\n\nexport const AllSearchIndicesVideoStyle: SearchIndices[] = [ 'video', 'clip', 'interactive' ];\nexport const AllSearchIndicesInSearch: SearchIndices[] = [ 'playlist', 'series', 'clip', 'classification', 'interactive', 'video', 'company', 'category', 'partner_profile' ];\nexport const AllSearchIndicesInUserManager: SearchIndices[] = ['user'];\n","import { SvgIcon } from 'libs/shared/utils/SvgHelper';\n\nimport { FilterStateHash } from '../reducers';\n\nimport { FilterProps } from './FilterProps';\nimport { SearchIndices } from './SearchResults';\n\nconst FilterIdNames =\n [\n 'sort', // \"sort\" isn't even a filter but it tends to go with our filters in our designs\n 'classification',\n 'presentation',\n 'audience',\n 'yearGroup',\n 'moviesAndTv',\n 'type',\n 'rating',\n 'interactives',\n 'clips',\n 'classroom',\n 'hasResources',\n 'hasSubtitles',\n 'productionYear',\n 'isHd',\n 'producedByClickView',\n 'duration',\n 'tagOrClassification',\n 'status',\n 'isAdmin',\n 'bulkActionType',\n 'userType',\n 'filter',\n 'channel',\n 'dateBroadcast',\n 'categoryId',\n 'hasInteractives',\n 'jobStatus',\n 'source',\n 'customerStatus',\n 'specialEventType',\n 'customerType',\n 'seriesId',\n 'scopeId'\n ] as const;\n\n/**\n * Any filters that shouldn't be sent to the backend as a filter\n * and are instead handled differently by the frontend\n */\nconst FilterBlacklist: Partial<Record<FilterIds, boolean>> = {\n type: true\n};\n\nexport type FilterIds = typeof FilterIdNames[number];\n\nexport const FilterWhitelist = FilterIdNames.reduce((acc, prev) => {\n return {\n ...acc,\n [prev]: !FilterBlacklist[prev]\n };\n}, {} as Record<FilterIds, boolean>);\n\nexport type FilterType = 'radio' | 'checkbox' | 'nested-checkbox' | 'grouped-checkbox' | 'switch' | 'more-filters' | 'rating' | 'dropdown' | 'tag' | 'button';\n\nexport interface SearchFilter<TFilterOptionId = string> {\n id: FilterIds;\n type: FilterType;\n compatibleIndices: SearchIndices[];\n\n name?: string;\n icon?: SvgIcon;\n description?: string;\n options?: FilterOption<TFilterOptionId>[];\n labelPrefix?: string;\n\n // For second layer options, for example 'presentation' checkbox filter has 'audience' as second layer option\n secondaryId?: FilterIds;\n\n customComponent?: (props: FilterProps) => JSX.Element;\n disabled?: boolean;\n disableOptions?: (options: FilterOption[], filters: SearchFilter[], state: FilterStateHash) => FilterOption[];\n}\n\nexport interface MoreFilters extends Omit<SearchFilter, 'id' | 'compatibleIndices'> {\n filters: SearchFilter[];\n id: string;\n}\n\nexport interface FilterOption<TId = string> {\n id: TId;\n name: string;\n default?: boolean;\n disabled?: boolean;\n secondLayerSelection?: FilterOption[];\n secondLayerOptions?: FilterOption[];\n group?: string;\n}\n\nexport type ProductionYearFilterOptions =\n 'any-year' |\n 'this-year' |\n 'last-3-years' |\n 'last-5-years';\n\nexport type DurationFilterOptions =\n 'bite-sized' |\n 'short' |\n 'medium' |\n 'long';\n\nexport enum SourceFilterOptions {\n MyVideos = 'my-videos',\n School = 'school',\n ExchangeArchive = 'exchange-archive',\n ClickView = 'clickview',\n LiveStreams = 'livestreams'\n}\n\nexport enum TypeFilterOptions {\n Video = 'video',\n Series = 'series',\n Playlist = 'playlist',\n Classification = 'classification',\n Clip = 'clip',\n Interactive = 'interactive',\n Company = 'company',\n Category = 'category',\n PartnerProfile = 'partner_profile'\n}\n","export enum WidgetTemplate {\n // Videos\n ThumbnailHeroMedia = 'thumbnail_hero_media',\n ThumbnailFeaturedMedia = 'thumbnail_featured_media',\n ThumbnailSlidingListSmall = 'thumbnail_sliding_list_small',\n ThumbnailSlidingListSmallV2 = 'thumbnail_sliding_list_small_v2',\n ThumbnailSlidingListLarge = 'thumbnail_sliding_list_large',\n ThumbnailFixedListMediaSmall = 'thumbnail_fixed_list_media_small',\n ThumbnailFixedListMediaLarge = 'thumbnail_fixed_list_media_large',\n ThumbnailFixedListFolderSmall = 'thumbnail_fixed_list_folder_small',\n ThumbnailVerticalList = 'thumbnail_vertical_list',\n PopoutThumbnailSlidingListLarge = 'popout_thumbnail_sliding_list_large',\n PopoutThumbnailSlidingListSmall = 'popout_thumbnail_sliding_list_small',\n FeaturedThumbnailSlidingList = 'featured_thumbnail_sliding_list',\n ThumbnailFixedListXLarge = 'thumbnail_fixed_list_xlarge',\n\n // Topics\n CoverSlidingPillListSmall = 'cover_sliding_pill_list_small',\n CoverFixedPillListLarge = 'cover_fixed_pill_list_large',\n StatsCoverFixedPillListLarge = 'stats_cover_fixed_pill_list_large',\n CoverFixedPillListXSmall = 'cover_fixed_pill_list_xsmall',\n ThumbnailFixedListLarge = 'thumbnail_fixed_list_large',\n ThumbnailFixedListSmall = 'thumbnail_fixed_list_small',\n EditableCoverFixedPillListSmall = 'editable_cover_fixed_pill_list_small',\n HeroBanner = 'hero_banner',\n HeroThumbnailSmall = 'hero_thumbnail_small',\n HeroBlockColourSmall = 'hero_block_colour_small',\n\n // Curriculum\n CurriculumResourcesAccordion = 'curriculum_resources_accordion',\n CurriculumCodeSearchResults = 'curriculum_code_search_results',\n\n // Playlists\n CoverFixedTileList = 'cover_fixed_tile_list',\n\n // Topics & Series\n PosterSlidingListLarge = 'poster_sliding_list_large',\n PosterSlidingListMedium = 'poster_sliding_list_medium',\n PosterSlidingListSmall = 'poster_sliding_list_small',\n PosterFixedListLarge = 'poster_fixed_list_large',\n\n // Blurbs & Topics\n HeroBannerSmall = 'hero_banner_small',\n\n // Text-based blurbs\n Heading = 'heading',\n AuthorReviewer = 'author_reviewer',\n Question = 'question',\n QuestionAccordion = 'question_accordion',\n\n // Companies / Studios / Content Partners\n CircleLogoSlidingList = 'circle_logo_sliding_list',\n RectangularLogoSlidingList = 'rectangular_logo_sliding_list',\n RectangularLogoFixedList = 'rectangular_logo_fixed_list',\n ThumbnailFixedListSearchCta = 'thumbnail_fixed_list_search_cta',\n InfiniteThumbnailVerticalList = 'infinite_thumbnail_vertical_list',\n\n // Rating filters\n FilterSlidingPillListSmall = 'filter_sliding_pill_list_small',\n\n // Special events\n EventIconSlidingList = 'event_icon_sliding_list',\n\n // Tags filter\n TagSlidingList = 'tag_sliding_list',\n\n SearchSuggestionsBlurb = 'search_suggestions_blurb'\n}\n","export enum WidgetTypeId {\n // Video group\n CuratedMedia = 'curated_media',\n PlaylistMedia = 'playlist_media',\n SeriesMedia = 'series_media',\n ClassificationMedia = 'classification_media',\n LatestReleasedVideos = 'latest_released_videos',\n ContinueWatching = 'continue_watching_videos',\n CompanyLatestReleasedVideo = 'company_latest_released_video',\n CompanyVideos = 'company_videos',\n ClassificationLatestReleasedVideo = 'classification_latest_released_video',\n ClassificationLatestReleasedVideosV2 = 'classification_latest_released_videos_v2',\n CompanyClassificationVideos = 'company_classification_videos',\n ClassificationDashboardMedia = 'classification_dashboard_media',\n ClassificationDashboardExternalMedia = 'classification_dashboard_external_media',\n SeasonalClassificationMedia = 'seasonal_classification_media',\n TrendingClassificationsMedia = 'trending_classifications_media',\n ClassificationCurriculumMedia = 'classification_curriculum_media',\n\n // Topics group\n CuratedClassifications = 'curated_classifications',\n Classifications = 'classifications',\n ClassificationLatestReleasedVideos = 'classification_latest_released_videos',\n SpecialEventClassifications = 'special_event_classifications',\n LatestReleasedClassifications = 'latest_released_classifications',\n TrendingClassifications = 'trending_classifications',\n\n // Series group\n CuratedSeries = 'curated_series',\n\n // Playlists group\n CuratedPlaylists = 'curated_playlists',\n\n // Blurb group\n Blurb = 'blurb',\n DynamicBlurb = 'dynamic_blurb',\n AuthorReviewer = 'author_reviewer',\n Faq = 'faq',\n\n // Network group\n CuratedCompanies = 'curated_companies',\n\n // Partner Profile group\n CuratedContentPartners = 'curated_content_partners',\n ContentPartnerLatestReleasedVideos = 'content_partner_latest_released_videos',\n ContentPartnerSeries = 'content_partner_series',\n ContentPartnerVideos = 'content_partner_videos',\n SpotlightContentPartners = 'spotlight_curated_content_partners',\n ContentPartners = 'content_partners',\n ContentPartnersHub = 'content_partners_hub',\n TrendingContentPartnersVideo = 'content_partner_trending_videos',\n ContentPartnerAllVideos = 'content_partner_all_videos',\n\n // Search filter group\n Ratings = 'ratings',\n\n // Presentations group\n Presentations = 'presentations',\n\n // Livestreams group\n UpcomingLivestreams = 'upcoming_livestreams',\n\n // Multimedia group\n CuratedMultimedia = 'curated_multimedia',\n\n // Legacy widget types\n ClassificationPlaylists = 'classification_playlists',\n ClassificationSeries = 'classification_series',\n ClassificationFeaturedVideo = 'classification_featured_video',\n ClassificationPinnedVideos = 'classification_pinned_videos',\n\n // Search widget types\n SearchRelevantTopics = 'search_relevant_topics',\n SearchCompanies = 'search_companies',\n SearchTopResults = 'search_top_results',\n SearchSeries = 'search_series',\n SearchPlaylists = 'search_playlists',\n SearchMyVideosFolder = 'search_my_videos_folders',\n SearchMySchoolLibraryFolder = 'search_my_school_library_folders',\n SearchMyVideos = 'search_my_videos',\n SearchMySchoolLibraryVideos = 'search_my_school_library_videos',\n SearchExchangeArchive = 'search_exchange_archive',\n SearchRelatedResults = 'search_related_results',\n SearchTags = 'search_tags',\n SearchCurriculumCode = 'search_curriculum_code',\n SearchSuggestions = 'search_suggestions',\n SearchContentPartners = 'search_content_partners'\n}\n","import { FormikContextType } from 'formik';\n\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SearchResultObjectTypes } from 'libs/shared/apps/search/interfaces';\nimport { GetCustomParamOptions, WidgetTypeIdConfig } from 'libs/shared/constants/WidgetTypeIdConfig';\nimport { UserGroup } from 'libs/shared/enums/UserGroup';\nimport { OnlineUserRole } from 'libs/shared/enums/UserRole';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { SettingsHash } from 'libs/shared/hooks/useSettings';\nimport { BaseObject, ClassificationCurriculumInfo, ClassificationDashboardInfo, ClassificationDirectoryInfo, CuratedDashboard, CuratedMediaWidget, CuratedWidget, CuratedWidgetQueryParams, DashboardTargetInfo, DashboardTargetType, PartnerProfileDashboardInfo, UnknownDashboardTargetInfo } from 'libs/shared/interfaces';\n\ninterface LatestReleasesTimeRange {\n from: string;\n to: string;\n}\n\nexport const DashboardHelper = {\n\n /**\n * Same implementation as GetUserGroup() in Online.\n * @param userRole \n */\n getUserGroup(userRole: OnlineUserRole): UserGroup {\n if (userRole === OnlineUserRole.Student)\n return UserGroup.Learner;\n\n return UserGroup.Staff;\n }\n};\n\nexport const CuratedDashboardHelper = {\n onSelectCuratedObject(\n selectedObj: SearchResultObjectTypes | BaseObject,\n formikProps: FormikContextType<CuratedMediaWidget<BaseObject[]>>\n ) {\n const data = {\n ...formikProps.values.data,\n objectIds: ArrayHelper.addOrRemoveImmutable(formikProps.values.data.objectIds || [], selectedObj.id)\n };\n \n formikProps.setFieldValue('data', data);\n \n formikProps.setTouched({\n ...formikProps.touched,\n data: {\n objectIds: true\n }\n });\n },\n\n onRemoveCuratedObject(\n objectId: string,\n formikProps: FormikContextType<CuratedMediaWidget<BaseObject[]>>\n ) {\n const newData = {\n ...formikProps.values.data,\n objectIds: formikProps.values.data.objectIds.filter(id => id !== objectId)\n };\n\n formikProps.setFieldValue('data', newData);\n },\n\n getDashboardTarget(info: DashboardTargetInfo): string {\n if (info.targetType === DashboardTargetType.Discover)\n return `discover:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.Classification)\n return `classification:${info.classificationId}`;\n\n if (info.targetType === DashboardTargetType.ClassificationDirectory)\n return `classification:${info.classificationId}:directory`;\n\n if (info.targetType === DashboardTargetType.ClassificationCurriculum)\n return `classification:${info.classificationId}:curriculum`;\n\n if (info.targetType === DashboardTargetType.MoviesAndTv)\n return `moviesAndTv:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.Company)\n return `company:${info.companyId}:presentation:${info.presentationId}`;\n\n if (info.targetType === DashboardTargetType.PartnerProfile)\n return `partnerprofile:${info.slug}`;\n\n if (info.targetType === DashboardTargetType.DiscoverPartnerProfiles)\n return `discover:partners`;\n\n if (info.targetType === DashboardTargetType.PartnerProfileHub)\n return `discover:partners:hub`;\n\n return null;\n },\n\n getUnknownDashboardTarget(options: UnknownDashboardTargetInfo): string {\n const {\n presentationId,\n companyId,\n targetType,\n classificationId,\n slug\n } = options;\n\n if (targetType === DashboardTargetType.Discover) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Discover,\n presentationId\n });\n }\n \n if (targetType === DashboardTargetType.MoviesAndTv) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.MoviesAndTv,\n presentationId\n });\n }\n \n if (targetType === DashboardTargetType.Company) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Company,\n presentationId,\n companyId\n });\n }\n \n if (targetType === DashboardTargetType.Classification) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.Classification,\n classificationId\n });\n }\n \n if (targetType === DashboardTargetType.ClassificationDirectory) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.ClassificationDirectory,\n classificationId\n });\n }\n \n if (targetType === DashboardTargetType.ClassificationCurriculum) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.ClassificationCurriculum,\n classificationId\n });\n }\n\n if (targetType === DashboardTargetType.PartnerProfile) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.PartnerProfile,\n slug\n });\n }\n\n if (targetType === DashboardTargetType.DiscoverPartnerProfiles) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.DiscoverPartnerProfiles\n });\n }\n\n if (targetType === DashboardTargetType.PartnerProfileHub) {\n return CuratedDashboardHelper.getDashboardTarget({\n targetType: DashboardTargetType.PartnerProfileHub\n });\n }\n },\n\n getDashboardTargetInfo(dashboard: CuratedDashboard): DashboardTargetInfo {\n const type = CuratedDashboardHelper.getDashboardTargetType(dashboard);\n const split = dashboard?.target?.split(':');\n\n if (type === DashboardTargetType.Discover) {\n return {\n targetType: DashboardTargetType.Discover,\n presentationId: split[2]\n };\n }\n\n if (type === DashboardTargetType.Classification) {\n return {\n targetType: DashboardTargetType.Classification,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.ClassificationDirectory) {\n return {\n targetType: DashboardTargetType.ClassificationDirectory,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.ClassificationCurriculum) {\n return {\n targetType: DashboardTargetType.ClassificationCurriculum,\n classificationId: split[1]\n };\n }\n\n if (type === DashboardTargetType.MoviesAndTv) {\n return {\n targetType: DashboardTargetType.MoviesAndTv,\n presentationId: split[2]\n };\n }\n\n if (type === DashboardTargetType.Company) {\n return {\n targetType: DashboardTargetType.Company,\n companyId: split[1],\n presentationId: split[3]\n };\n }\n\n if (type === DashboardTargetType.PartnerProfile) {\n return {\n targetType: DashboardTargetType.PartnerProfile,\n slug: split[1]\n };\n }\n\n return null;\n },\n\n getDashboardTargetType(dashboard: CuratedDashboard): DashboardTargetType {\n if (!dashboard?.target)\n return null;\n\n if (dashboard.target.startsWith('discover')) {\n if (dashboard.target.endsWith('partners'))\n return DashboardTargetType.DiscoverPartnerProfiles;\n\n if (dashboard.target.endsWith('hub'))\n return DashboardTargetType.PartnerProfileHub;\n\n return DashboardTargetType.Discover;\n }\n\n if (dashboard.target.startsWith('classification')) {\n if (dashboard.target.endsWith('directory'))\n return DashboardTargetType.ClassificationDirectory;\n\n if (dashboard.target.endsWith('curriculum'))\n return DashboardTargetType.ClassificationCurriculum;\n\n return DashboardTargetType.Classification;\n }\n\n if (dashboard.target.startsWith('moviesAndTv'))\n return DashboardTargetType.MoviesAndTv;\n\n if (dashboard.target.startsWith('company')) {\n return DashboardTargetType.Company;\n }\n\n if (dashboard.target.startsWith('partnerprofile'))\n return DashboardTargetType.PartnerProfile;\n\n return null;\n },\n\n isType(dashboard: CuratedDashboard, target: DashboardTargetType): boolean {\n return CuratedDashboardHelper.getDashboardTargetType(dashboard) === target;\n },\n\n isCuratedDashboard(obj: BaseObject): obj is CuratedDashboard {\n const dashboard = obj as CuratedDashboard;\n\n const targetType = CuratedDashboardHelper.getDashboardTargetType(dashboard);\n\n if (targetType === DashboardTargetType.Discover)\n return true;\n\n if (targetType === DashboardTargetType.Classification)\n return true;\n\n if (targetType === DashboardTargetType.ClassificationDirectory)\n return true;\n\n if (targetType === DashboardTargetType.ClassificationCurriculum)\n return true;\n\n if (targetType === DashboardTargetType.MoviesAndTv)\n return true;\n\n if (targetType === DashboardTargetType.Company)\n return true;\n\n return false;\n },\n\n getLatestReleasedTimeRange(): LatestReleasesTimeRange {\n const now = new Date();\n const from = DateHelper.format(DateHelper.endOf(DateHelper.subtract(now, 2, 'month'), 'day'), 'YYYY-MM-DD');\n const to = DateHelper.format(DateHelper.endOf(now, 'day'), 'YYYY-MM-DD');\n return { from, to };\n },\n\n getWidgetParams(\n widgetTypeId: WidgetTypeId,\n templateId: WidgetTemplate,\n target: DashboardTargetType,\n audienceIds?: string | string[],\n preferredCurriculumId?: string,\n options?: GetCustomParamOptions\n ): CuratedWidgetQueryParams {\n const params: CuratedWidgetQueryParams = { };\n\n if (audienceIds)\n params.audienceId = audienceIds;\n\n if (widgetTypeId === WidgetTypeId.ClassificationCurriculumMedia)\n params.curriculumPresentationId = preferredCurriculumId;\n\n return {\n ...params,\n ...WidgetTypeIdConfig[widgetTypeId]?.getCustomParams?.(templateId, target, options)\n };\n },\n\n isSystemGeneratedDashboard(widgets: CuratedWidget[]): boolean {\n const systemGeneratedClassificationWidgetTypes = new Set<WidgetTypeId>([\n WidgetTypeId.ClassificationFeaturedVideo,\n WidgetTypeId.ClassificationPinnedVideos,\n WidgetTypeId.ClassificationPlaylists,\n WidgetTypeId.ClassificationSeries\n ]);\n\n return widgets?.some(widget => systemGeneratedClassificationWidgetTypes.has(widget.widgetId));\n },\n\n isClassificationDashboard(\n targetInfo: DashboardTargetInfo\n ): targetInfo is ClassificationDashboardInfo | ClassificationDirectoryInfo | ClassificationCurriculumInfo {\n return [\n DashboardTargetType.Classification,\n DashboardTargetType.ClassificationDirectory,\n DashboardTargetType.ClassificationCurriculum\n ].includes(targetInfo?.targetType);\n },\n\n isContentPartnerDashboard(targetInfo: DashboardTargetInfo): targetInfo is PartnerProfileDashboardInfo {\n return targetInfo?.targetType === DashboardTargetType.PartnerProfile;\n },\n\n isDirectoryDashboard(\n targetInfo: DashboardTargetInfo\n ): targetInfo is ClassificationDirectoryInfo {\n return targetInfo?.targetType === DashboardTargetType.ClassificationDirectory;\n },\n\n isWidgetTypeEnabled(\n widgetTypeId: WidgetTypeId,\n settingsHash: SettingsHash,\n targetType: DashboardTargetType\n ): boolean {\n const config = WidgetTypeIdConfig[widgetTypeId];\n \n return config?.predicate?.({ settingsHash, targetType }) ?? true;\n }\n};\n","import { Core } from 'libs/common/backbone/index';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SourceFilterOptions, TypeFilterOptions } from '../apps/search/interfaces';\nimport { WidgetAppLinks } from '../components/widgets/curated-widgets/WidgetProps';\nimport { WidgetTemplate } from '../enums/WidgetTemplate';\nimport { WidgetTypeId } from '../enums/WidgetTypeId';\nimport { SettingsHash } from '../hooks/useSettings';\nimport { CuratedWidgetContent, CuratedWidgetQueryParams, DashboardTargetType, Series } from '../interfaces';\nimport { CuratedDashboardHelper } from '../utils/DashboardHelper';\n\ninterface WidgetTypeIdPredicateOptions {\n settingsHash: SettingsHash;\n targetType: DashboardTargetType;\n}\n\nexport interface GetCustomParamOptions {\n params?: CuratedWidgetQueryParams;\n}\n\ninterface WidgetTypeIdConfigType {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => CuratedWidgetQueryParams;\n minContent?: number;\n getCollectionAppLink?: (\n appLinks: Partial<WidgetAppLinks>,\n content?: CuratedWidgetContent\n ) => Core.AppLink;\n /**\n * Predicate used to determine if the widget\n * should be displayed based on the target\n * type and settings. Useful for feature flagging widgets.\n */\n predicate?: (options: WidgetTypeIdPredicateOptions) => boolean;\n}\n\nfunction partnerProfileWidgetTypeIdPredicate(options: WidgetTypeIdPredicateOptions): boolean {\n return options.settingsHash?.hasPartnerProfiles ?? false;\n}\n\nexport const WidgetTypeIdConfig: Record<WidgetTypeId, WidgetTypeIdConfigType> = {\n [WidgetTypeId.CuratedMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.PlaylistMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SeriesMedia]: {\n getCustomParams: (widgetTemplate: WidgetTemplate) => {\n switch (widgetTemplate) {\n case WidgetTemplate.ThumbnailFixedListMediaLarge:\n return { limit: 2 };\n case WidgetTemplate.ThumbnailHeroMedia:\n case WidgetTemplate.ThumbnailFeaturedMedia:\n return { limit: 1 };\n default:\n return { limit: 12 };\n }\n },\n getCollectionAppLink: (appLinks, content) => appLinks?.series?.(ArrayHelper.first(content) as Series)\n },\n [WidgetTypeId.ClassificationMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.LatestReleasedVideos]: {\n getCustomParams: () => {\n return CuratedDashboardHelper.getLatestReleasedTimeRange();\n }\n },\n [WidgetTypeId.ContinueWatching]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks?.watchHistory?.()\n },\n [WidgetTypeId.CompanyLatestReleasedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.CompanyVideos]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationLatestReleasedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationLatestReleasedVideosV2]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n [WidgetTypeId.SeasonalClassificationMedia]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n [WidgetTypeId.CompanyClassificationVideos]: {\n getCustomParams: () => ({}),\n minContent: 4\n },\n [WidgetTypeId.TrendingClassificationsMedia]: {\n getCustomParams: () => {\n return {\n limit: 12\n };\n },\n minContent: 4\n },\n\n [WidgetTypeId.CuratedClassifications]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.TrendingClassifications]: {\n getCustomParams: () => {\n return {\n limit: 6\n };\n },\n minContent: 3\n },\n [WidgetTypeId.Classifications]: {\n getCustomParams: (template: WidgetTemplate, targetType: DashboardTargetType) => {\n if (targetType === DashboardTargetType.Discover) {\n if (template === WidgetTemplate.EditableCoverFixedPillListSmall) {\n return {\n canBePreferred: true,\n isFollowing: true\n };\n }\n\n if ([ WidgetTemplate.PosterSlidingListSmall, WidgetTemplate.CoverFixedPillListXSmall ].includes(template)) {\n return {\n canBePreferred: true\n };\n }\n }\n\n return {};\n }\n },\n [WidgetTypeId.ClassificationLatestReleasedVideos]: {\n getCustomParams: () => {\n return CuratedDashboardHelper.getLatestReleasedTimeRange();\n }\n },\n [WidgetTypeId.SpecialEventClassifications]: {\n getCustomParams: () => ({\n from: DateHelper.format(new Date(), 'YYYY-MM-DD')\n })\n },\n [WidgetTypeId.LatestReleasedClassifications]: {\n getCustomParams: () => {\n return {\n limit: 6\n };\n },\n minContent: 3\n },\n\n [WidgetTypeId.CuratedSeries]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.CuratedPlaylists]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.Blurb]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.DynamicBlurb]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.AuthorReviewer]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.Faq]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.CuratedCompanies]: {\n getCustomParams: () => ({}),\n predicate: options => {\n if (options.settingsHash?.hasPartnerProfiles)\n return false;\n return true;\n }\n },\n\n [WidgetTypeId.Ratings]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.Presentations]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.UpcomingLivestreams]: {\n getCustomParams: () => ({\n from: DateHelper.format(new Date(), 'YYYY-MM-DD')\n })\n },\n\n [WidgetTypeId.CuratedMultimedia]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.ClassificationPlaylists]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationSeries]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationFeaturedVideo]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationPinnedVideos]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationDashboardExternalMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationDashboardMedia]: {\n getCustomParams: () => ({})\n },\n\n [WidgetTypeId.SearchRelevantTopics]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchRelevantTopics],\n type: [TypeFilterOptions.Classification]\n })\n },\n [WidgetTypeId.SearchCompanies]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchCompanies],\n type: [TypeFilterOptions.Company]\n }),\n predicate: options => {\n if (options.settingsHash?.hasPartnerProfiles)\n return false;\n return true;\n }\n },\n [WidgetTypeId.SearchSeries]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchSeries],\n type: [TypeFilterOptions.Series]\n })\n },\n [WidgetTypeId.SearchPlaylists]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchPlaylists],\n type: [TypeFilterOptions.Playlist]\n })\n },\n [WidgetTypeId.SearchMyVideosFolder]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMyVideosFolder],\n source: [SourceFilterOptions.MyVideos]\n })\n },\n [WidgetTypeId.SearchMySchoolLibraryFolder]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMySchoolLibraryFolder],\n source: [SourceFilterOptions.School]\n })\n },\n [WidgetTypeId.SearchMyVideos]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMyVideos],\n source: [SourceFilterOptions.MyVideos]\n })\n },\n [WidgetTypeId.SearchMySchoolLibraryVideos]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchMySchoolLibraryVideos],\n source: [SourceFilterOptions.School]\n })\n },\n [WidgetTypeId.SearchExchangeArchive]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchExchangeArchive],\n source: [SourceFilterOptions.ExchangeArchive]\n })\n },\n [WidgetTypeId.SearchRelatedResults]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchTopResults]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.ClassificationCurriculumMedia]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchTags]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchCurriculumCode]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchSuggestions]: {\n getCustomParams: () => ({})\n },\n [WidgetTypeId.SearchContentPartners]: {\n getCustomParams: () => ({}),\n getCollectionAppLink: appLinks => appLinks.searchHome({\n focus: [WidgetTypeId.SearchContentPartners],\n type: [TypeFilterOptions.PartnerProfile]\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.CuratedContentPartners]: {\n getCustomParams: () => ({\n limit: 12\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerLatestReleasedVideos]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerSeries]: {\n getCollectionAppLink: appLinks => {\n return appLinks?.scopedSearchHome?.({\n type: [TypeFilterOptions.Series]\n });\n },\n getCustomParams: () => ({\n limit: 12\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerVideos]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.SpotlightContentPartners]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartners]: {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => ({\n letterPrefix: options?.params?.letterPrefix,\n sort: options?.params?.sort\n }),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnersHub]: {\n getCustomParams: (\n widgetTemplate: WidgetTemplate,\n targetType: DashboardTargetType,\n options?: GetCustomParamOptions\n ) => {\n if (targetType !== DashboardTargetType.PartnerProfileHub)\n return {};\n\n return {\n objectId: options?.params?.objectId\n };\n },\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.TrendingContentPartnersVideo]: {\n getCustomParams: () => ({}),\n predicate: partnerProfileWidgetTypeIdPredicate\n },\n [WidgetTypeId.ContentPartnerAllVideos]: {\n getCustomParams: (widgetTemplate: WidgetTemplate) => {\n if (widgetTemplate === WidgetTemplate.ThumbnailFixedListSearchCta)\n return { limit: 3 };\n\n return {};\n },\n predicate: partnerProfileWidgetTypeIdPredicate\n }\n};\n","import React from 'react';\n\nexport function WarningOutlineSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n 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'\n fill='currentColor'\n />\n </svg>\n );\n}\n","export enum WidgetStatus {\n Draft = 0,\n Published = 1,\n Archived = 2\n}\n\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { AnalyticsOptions, ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { WidgetStatus } from 'libs/shared/enums/WidgetStatus';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { Breakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { BaseWidget, CuratedDashboardAppLink, CuratedWidget, CuratedWidgetContent, Playlist, Presentation, Series, Video, VideoTypes, VideoWidgetTemplateContent, WidgetMetadata, WidgetPreference } from 'libs/shared/interfaces';\n\nimport { AnyWidgetTemplateProps } from '../components/widgets/curated-widgets/WidgetProps';\nimport { WidgetTypeIdConfig } from '../constants/WidgetTypeIdConfig';\nimport { MasterType } from '../enums/MasterType';\n\nimport { MasterTypeHelper } from './MasterTypeHelper';\n\nenum WidgetStatusString {\n Draft = 'Draft',\n Published = 'Published',\n Archived = 'Archived'\n}\n\nexport const WidgetHelper = {\n /**\n * Used by both the FixedWidget and DynamicWidget\n */\n getSliderAnalyticsOptions: (): AnalyticsOptions => ({\n actionType: UserAction.Click,\n location: LocationContext.SlidingList,\n entity: EntityType.Widget,\n descriptor: ClickDescriptor.Slide\n }),\n\n /**\n * Used by both the FixedWidget and DynamicWidget\n */\n getSliderItemAnalyticsOptions: (): AnalyticsOptions => ({\n location: LocationContext.SlidingListItem\n }),\n\n getSliderHeadingAnalyticsOptions: (): AnalyticsOptions => ({\n actionType: UserAction.Click,\n location: LocationContext.SlidingList,\n entity: EntityType.Widget,\n descriptor: ClickDescriptor.Title\n }),\n\n useGetContent(\n content: CuratedWidgetContent,\n widgetTypeId: WidgetTypeId,\n isPreviewing: boolean,\n preferences: WidgetPreference[],\n removedItemIds: string[]\n ): { content: CuratedWidgetContent, unfilteredContent: CuratedWidgetContent } {\n return React.useMemo(() => {\n if (!content)\n return { content: null, unfilteredContent: null };\n\n if (!Array.isArray(content))\n return { content, unfilteredContent: content };\n\n const preferencesHash = preferences?.reduce((acc: HashObject, current) => {\n acc[current.id] = current;\n return acc;\n }, {}) ?? {};\n\n const removedItemIdsHash = removedItemIds.reduce((acc: HashObject, current) => {\n acc[current] = true;\n return acc;\n }, {});\n\n const contentCopy = [...content];\n \n const sortedContent = contentCopy.sort((a, b) => {\n if (!('id' in a) || !('id' in b))\n return 0;\n\n const aIndex = preferencesHash[a.id]?.index ?? contentCopy.findIndex(c => 'id' in c && c.id === a.id);\n const bIndex = preferencesHash[b.id]?.index ?? contentCopy.findIndex(c => 'id' in c && c.id === b.id);\n\n if (aIndex < bIndex)\n return -1;\n\n if (aIndex > bIndex)\n return 1;\n\n return 0;\n });\n\n if (WidgetHelper.isBelowContentMinimum(sortedContent, widgetTypeId) && !isPreviewing) {\n return {\n content: [],\n unfilteredContent: sortedContent\n };\n }\n\n const filteredContent = sortedContent.filter(item => {\n if (preferencesHash['id' in item && item.id]?.hidden)\n return false;\n\n if (removedItemIdsHash['id' in item && item.id])\n return false;\n\n return true;\n });\n\n return {\n content: filteredContent,\n unfilteredContent: sortedContent\n };\n }, [ content, preferences ]);\n },\n\n isBelowContentMinimum(content: CuratedWidgetContent, widgetTypeId: WidgetTypeId): boolean {\n const minContent = WidgetTypeIdConfig[widgetTypeId]?.minContent || 0;\n return content?.length < minContent;\n },\n\n getCustomAppLink(props: AnyWidgetTemplateProps): Core.AppLink | null {\n if (\n !('metadata' in props) ||\n !('appLinks' in props) ||\n !('appLink' in props.metadata)\n ) {\n return null;\n }\n\n if (props.metadata?.appLink === CuratedDashboardAppLink.LatestReleases && 'latestReleases' in props.appLinks)\n return props.appLinks?.latestReleases?.();\n\n if (props.metadata?.appLink === CuratedDashboardAppLink.ExploreAllTopics && 'allTopics' in props.appLinks && 'presentation' in props)\n return props.appLinks?.allTopics?.(props.presentation.id);\n\n return null;\n },\n\n getWidgetStatus(widget: CuratedWidget): WidgetStatus {\n let status = widget.status;\n\n if (typeof (status) === 'string') {\n switch (status) {\n case WidgetStatusString.Archived:\n status = WidgetStatus.Archived;\n break;\n case WidgetStatusString.Published:\n status = WidgetStatus.Published;\n break;\n case WidgetStatusString.Draft:\n status = WidgetStatus.Draft;\n break;\n }\n }\n\n return status;\n },\n\n formatResponseData(widget: CuratedWidget, presentation?: Presentation): CuratedWidget {\n const content = widget.content;\n\n if (!content)\n return widget;\n\n if ('author' in content) {\n widget.content = [content] as CuratedWidgetContent;\n return widget;\n }\n\n if ('data' in content)\n widget.content = content.data as CuratedWidgetContent;\n else if (!Array.isArray(content))\n widget.content = [content]; // Handle `classification_featured_video` widgets, which don't return content as an array\n\n switch (widget.widgetId) {\n case WidgetTypeId.ClassificationSeries:\n widget.content = widget.content.filter((c): c is Series => 'tallPoster' in c && !!c.tallPoster?.id);\n break;\n case WidgetTypeId.ClassificationPlaylists:\n widget.content = widget.content.filter((c): c is Playlist => 'cover' in c && !!c.cover?.id);\n break;\n case WidgetTypeId.ContinueWatching:\n widget.content = widget.content.map(c => 'object' in c && c.object);\n default:\n break;\n case WidgetTypeId.Presentations:\n widget.content = widget.content.filter((c): c is Presentation => 'id' in c && c.id.toString() !== presentation?.id?.toString());\n break;\n }\n\n return widget;\n },\n \n isWidgetInTableOfContents(metadata: Partial<WidgetMetadata>): boolean {\n return !!metadata?.showInTableOfContents;\n },\n\n /**\n * Widget container view won't render a widget with no content typically,\n * but some widgets (such as blurbs) have no content, but should render anyway.\n */\n hasNoContent(widgetTypeId: WidgetTypeId): boolean {\n if (widgetTypeId === WidgetTypeId.Blurb)\n return true;\n\n return false;\n },\n\n /**\n * If any widgets should be hidden on smaller screen sizes, add them here.\n * If this needs to be more flexible at some point, it should be added to\n * the widget settings and metadata object.\n */\n canDisplayOnScreenSize(\n breakpoints: Breakpoints,\n widgetTypeId: WidgetTypeId,\n widgetTemplate: WidgetTemplate\n ): boolean {\n if (widgetTypeId === WidgetTypeId.Blurb && widgetTemplate === WidgetTemplate.HeroBannerSmall)\n return !breakpoints.xs && !breakpoints.sm;\n\n return true;\n },\n\n isCompanyWidget(widgetTypeId: WidgetTypeId): boolean {\n switch (widgetTypeId) {\n case WidgetTypeId.CompanyLatestReleasedVideo:\n case WidgetTypeId.CompanyVideos:\n case WidgetTypeId.UpcomingLivestreams:\n return true;\n default:\n return false;\n }\n },\n\n getVideoContent(content: VideoWidgetTemplateContent): VideoTypes[] {\n const firstItem = ArrayHelper.first<Video | Series>(content);\n\n if (MasterTypeHelper.isType<Series>(firstItem, MasterType.Series))\n return firstItem.videos.data;\n\n return content as VideoTypes[];\n },\n\n showRemoveButton(widgetTypeId: WidgetTypeId): boolean {\n return widgetTypeId === WidgetTypeId.ContinueWatching;\n },\n\n /**\n * Paginated data returns more widgets so if we dont merge the widget content by widget type id,\n * it would add another widget to the page rather than appending content to the relevant\n * search result index\n * \n * For example:\n * Say we receive these widgets for a query:\n * - topics widget\n * - related results widget\n * \n * If a user scrolls down to the end of page we fetch more items from the last widget\n * which in this case is 'related results widget'. \n * Now our overall response looks like this\n * - topics widget\n * - related results widget\n * - related results widget\n * \n * Since this is a new widget item entry it will be rendered as a new widget with seprate headings etc.\n * In this case we want to combine these two widgets data into one so its looks like this again:\n * - topics widget\n * - related results widget (data is combined)\n * \n * But what if widget we get recieve has a different widget template id. This currently happens for\n * the 'series widget' - series widget can have the tall poster template or the thumbnail like template.\n * \n * so to visualize this it can be like:\n * - topics widget\n * - top results widget\n * - series widget (template: tall poster)\n * - series widget (template: thumbnail)\n * \n * Since they technically will look different based on the template id we will not merge the data in this case.\n * It will merge the data to the same widget as long as the combination of widget Id + template Id is the same.\n * \n * Since they are separate widgets they will render duplicate headings - we handle this in css instead which\n * checks for adjacent siblings and if its the same widget - it hides the widget heading so it will look\n * like its a single widget rather than separate widgets.\n * \n * - Nish\n */\n mergeWidgets<T extends BaseWidget>(\n items: T[],\n mergeContent: (target: T, source: T) => void\n ): T[] {\n const widgets = ObjectHelper.deepClone(items);\n const groupedWidgets = ArrayHelper.groupBy(widgets, 'widgetId');\n const mergedWidgets: T[] = [];\n\n for (const widgetGroup of Object.values(groupedWidgets)) {\n let currentMergedWidget: T | null = null;\n const groupMergedWidgets: T[] = [];\n\n for (const widget of widgetGroup) {\n if (!currentMergedWidget) {\n currentMergedWidget = widget;\n continue;\n }\n\n if (widget.templateId !== currentMergedWidget.templateId) {\n groupMergedWidgets.push(currentMergedWidget);\n currentMergedWidget = widget;\n continue;\n }\n\n mergeContent(currentMergedWidget, widget);\n }\n\n if (currentMergedWidget) {\n groupMergedWidgets.push(currentMergedWidget);\n }\n mergedWidgets.push(...groupMergedWidgets);\n }\n\n return mergedWidgets;\n }\n};\n",":local {\n .widgetTextButton {\n margin-top: 0.1rem;\n flex-shrink: 0;\n }\n}","import React from 'react';\nimport { Spinner } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions, ClickDescriptor, LocationContext } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SvgContainer } from 'libs/shared/components/svg-container/SvgContainer';\nimport { WidgetTypeIdConfig } from 'libs/shared/constants/WidgetTypeIdConfig';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { WarningOutlineSvg } from 'libs/shared/images/svg/status/WarningOutlineSvg';\nimport { WidgetHelper } from 'libs/shared/utils/WidgetHelper';\n\nimport styles from './widget-header.module.scss';\n\nconst namespace = 'shared.widgetHeader';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface WidgetHeaderProps {\n name: string;\n description?: string | JSX.Element;\n isPreviewing?: boolean;\n content?: any[];\n widgetTypeId?: WidgetTypeId;\n badgeComponent?: JSX.Element;\n\n appLink?: Core.AppLink;\n onAppLinkClick?: () => void;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n \n showSeeMoreLink?: boolean;\n onClose?: () => void;\n onFollow?: (shouldFollow: boolean) => void;\n isFollowing?: boolean;\n showFollowSpinner?: boolean;\n}\n\nfunction SeeMore(props: WidgetHeaderProps) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton}`}>\n <AppLink\n appLink={props.appLink}\n analyticsData={props.analyticsData }\n analyticsOptions={{\n location: LocationContext.SlidingList,\n ...props.analyticsOptions,\n descriptor: ClickDescriptor.SeeMore\n }}\n className={`text-decoration-none ${props.appLink ? 'curated-widget-link' : ''}`}\n >\n <p className='hover-text-underline text-dark curated-widget-heading'>{getPhrase('seeAll')}</p>\n </AppLink>\n </div>\n );\n}\n\nfunction CloseWidgetButton(props: { onClose: () => void }) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton} text-decoration-none cursor-pointer`} onClick={props.onClose}>\n <p className='hover-text-underline text-dark curated-widget-heading'>{getPhrase('hide')}</p>\n </div>\n );\n}\n\nfunction FollowWidgetButton(props: {\n isFollowing: boolean,\n onFollow: (shouldFollow: boolean) => void,\n showFollowSpinner: boolean\n}) {\n return (\n <div className={`ms-3 ${styles.widgetTextButton} text-decoration-none`}>\n {\n props.showFollowSpinner ?\n <Spinner as='span' animation='border' role='status' size='sm' /> :\n <p className='hover-text-underline text-dark curated-widget-heading cursor-pointer' onClick={() => props.onFollow(!props.isFollowing)}>\n {getPhrase(props.isFollowing ? 'unfollow' : 'follow')}\n </p>\n }\n </div>\n );\n}\n\nexport function WidgetHeader(props: WidgetHeaderProps): JSX.Element {\n const hasDescription = !!props.description;\n\n if (!props.name && !props.description)\n return <></>;\n\n const isBelowMinimum = WidgetHelper.isBelowContentMinimum(props.content, props.widgetTypeId);\n const minContent = WidgetTypeIdConfig[props.widgetTypeId]?.minContent ?? 0;\n\n return (\n <div className='curated-widget-header'>\n <div className='d-flex justify-content-between'>\n {!!props.name && (\n <div className='d-flex align-items-center'>\n <AppLink\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n className={`text-decoration-none ${props.appLink ? 'curated-widget-link text-reset' : ''}`}\n onClick={props.onAppLinkClick}\n >\n <h2 className='h4 curated-widget-heading'>\n {props.isPreviewing && isBelowMinimum && (\n <SvgContainer\n svg={WarningOutlineSvg}\n title={`Widget is below the minimum content threshold of ${minContent} and won't be displayed.`}\n tooltipSpanHack\n tooltipSpanHackClassName='d-inline text-danger me-1'\n />\n )}\n {props.name}\n </h2>\n </AppLink>\n {!!React.isValidElement(props.badgeComponent) && props.badgeComponent}\n </div>\n )}\n <div className='d-flex justify-content-between align-items-center gap-2'>\n {!!props.appLink && !hasDescription && !!props.showSeeMoreLink && <SeeMore {...props}/>}\n {FunctionHelper.isFunction(props.onFollow) &&\n <FollowWidgetButton\n isFollowing={props.isFollowing}\n onFollow={props.onFollow}\n showFollowSpinner={props.showFollowSpinner}\n />\n }\n {FunctionHelper.isFunction(props.onClose) && <CloseWidgetButton onClose={props.onClose}/>}\n </div>\n </div>\n \n {hasDescription && (\n <div className='d-flex justify-content-between align-items-end'>\n <p className='description curated-widget-description'>\n <span>{props.description}</span>\n </p>\n {!!props.appLink && !!props.showSeeMoreLink && <SeeMore {...props}/> }\n </div>\n )}\n </div>\n );\n}\n","export enum TagType {\n Normal = 'normal',\n Pedagogy = 'pedagogy',\n Hidden = 'hidden',\n Skill = 'skill',\n Curation = 'curation'\n}\n\n/**\n * This should **only** be used to create new tags in master (as it only accepts enum values).\n * Use the string enum above for all other cases.\n */\nexport enum TagTypeNumber {\n Normal = 0,\n Pedagogy = 1,\n Hidden = 2,\n Skill = 3,\n Curation = 4\n}\n",":local {\n $badge-base-height: 1.5rem;\n\n .tagList {\n display: flex;\n flex-wrap: wrap;\n }\n\n .badgeBase {\n height: $badge-base-height;\n }\n \n .disabled {\n background-color: $gray-200;\n color: $gray-500;\n\n &:hover {\n background-color: $gray-200;\n color: $gray-500;\n }\n }\n\n .partialTag {\n width: 5rem;\n }\n\n .removeBadge {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .removeBadgeText {\n line-height: $badge-base-height;\n }\n \n .close {\n opacity: 1;\n background-size: 0.625rem;\n\n &:not(:disabled):hover {\n opacity: 1;\n }\n }\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { TagType } from 'libs/shared/enums/TagType';\nimport { Tag, ThemeColours } from 'libs/shared/interfaces';\n\nimport { DivButton } from '../div-button/DivButton';\n\nimport styles from './tags.module.scss';\n\nconst namespace = 'shared.tags';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface TagItemProps {\n tag: Tag;\n themeColours?: ThemeColours;\n appLink?: Core.AppLink;\n onClick?: () => void;\n onRemove?: () => void;\n disabled?: boolean;\n tagClass?: string;\n}\n\nfunction getTagTypeClass(tagType: TagType, hasThemeColour: boolean): string {\n switch (tagType) {\n case TagType.Pedagogy:\n case TagType.Skill:\n return 'pedagogy-tag text-white';\n\n case TagType.Hidden:\n return 'hidden-tag fw-normal';\n\n case TagType.Normal:\n if (!hasThemeColour)\n return 'bg-gray-100 fw-normal';\n return '';\n\n default:\n return '';\n }\n}\n\nexport function TagItem(props: TagItemProps): JSX.Element {\n const { tag, appLink, onClick, disabled, tagClass = 'tag' } = props;\n\n const name = tag.name.toLowerCase();\n const tagType = tag.tagType?.toLowerCase() as TagType;\n\n const hasThemeColour = (tagType === TagType.Normal && props.themeColours) && !!props.themeColours?.secondary;\n let classNames = `${styles.badgeBase} rounded-pill py-1 px-2 my-1 me-1 ${tagClass} ${getTagTypeClass(tagType, hasThemeColour)}`;\n let textContainerClass = `text-truncate text-nowrap`;\n\n if (hasThemeColour)\n classNames += ' text-white';\n\n if ((appLink || onClick) && !disabled)\n classNames += ' cursor-pointer';\n\n if (disabled)\n classNames += ' ' + styles.disabled;\n\n if (props.onRemove) {\n classNames += ' ' + styles.removeBadge;\n textContainerClass += ' ' + `${styles.removeBadgeText} d-inline-flex align-items-center lh-1`;\n }\n if (!appLink)\n classNames += ' d-inline-block';\n\n const style: React.CSSProperties = hasThemeColour ?\n { backgroundColor: props.themeColours.secondary } :\n {};\n\n if (appLink) {\n return (\n <AppLink\n onClick={onClick}\n appLink={appLink}\n className={classNames}\n title={name}\n style={style}\n >\n <span className={textContainerClass}>{name}</span>\n </AppLink>\n );\n }\n\n return (\n <button\n onClick={onClick}\n className={classNames}\n title={name}\n style={style}\n aria-label={`${getPhrase('ariaFilter')} ${name}`}\n >\n <span className={textContainerClass}>\n {name}\n {props.onRemove &&\n <DivButton\n onClick={props.onRemove}\n className={`${styles.close} btn-close font-size-normal`}\n role='button'\n aria-label='Close'\n />\n }\n </span>\n </button>\n );\n}\n"],"mappings":"oaASA,IAAY,EAAL,SAAA,EAAA,OACL,GAAA,eAAA,kBACA,EAAA,iBAAA,qBACA,EAAA,6BAAA,iCACA,EAAA,wBAAA,iCACD,CCwBY,EAA8C,CAAE,QAAS,OAAQ,cAAe,CAChF,EAA4C,CAAE,WAAY,SAAU,OAAQ,iBAAkB,cAAe,QAAS,UAAW,WAAY,kBAAmB,CAChK,EAAiD,CAAC,OAAO,CCjChE,EACJ,kYAmCC,CAMG,EAAuD,CAC3D,KAAM,GACP,CAIY,EAAkB,EAAc,QAAQ,EAAK,KACjD,CACL,GAAG,GACF,GAAO,CAAC,EAAgB,GAC1B,EACA,EAAE,CAA+B,CAkDxB,EAAL,SAAA,EAAA,OACL,GAAA,SAAA,YACA,EAAA,OAAA,SACA,EAAA,gBAAA,mBACA,EAAA,UAAA,YACA,EAAA,YAAA,oBACD,CAEW,EAAL,SAAA,EAAA,OACL,GAAA,MAAA,QACA,EAAA,OAAA,SACA,EAAA,SAAA,WACA,EAAA,eAAA,iBACA,EAAA,KAAA,OACA,EAAA,YAAA,cACA,EAAA,QAAA,UACA,EAAA,SAAA,WACA,EAAA,eAAA,wBACD,CChIW,EAAL,SAAA,EAAA,OAEL,GAAA,mBAAA,uBACA,EAAA,uBAAA,2BACA,EAAA,0BAAA,+BACA,EAAA,4BAAA,kCACA,EAAA,0BAAA,+BACA,EAAA,6BAAA,mCACA,EAAA,6BAAA,mCACA,EAAA,8BAAA,oCACA,EAAA,sBAAA,0BACA,EAAA,gCAAA,sCACA,EAAA,gCAAA,sCACA,EAAA,6BAAA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AAA,EAAA,KAAC,EAAD,CACW,UACA,UACT,UAAW,EACX,MAAO,EACA,kBAEP,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,WAAqB,EAAY,CAAA,CAC1C,CAAA,EAKZ,EAAA,EAAA,KAAC,SAAD,CACW,UACT,UAAW,EACX,MAAO,EACA,QACP,aAAY,GAAG,EAAU,aAAa,CAAC,GAAG,cAE1C,EAAA,EAAA,MAAC,OAAD,CAAM,UAAW,WAAjB,CACG,EACA,EAAM,WACL,EAAA,EAAA,KAAC,EAAD,CACE,QAAS,EAAM,SACf,UAAW,GAAG,EAAO,MAAM,6BAC3B,KAAK,SACL,aAAW,QACX,CAAA,CAAA,GAGC,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./C4W8SQLT.chunk.js";import{et as t}from"./app-
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{t as e}from"./C4W8SQLT.chunk.js";import{et as t}from"./app-CgkYY4K0.js";function n(n,r){let[i,a]=e(`exchange:preview:${n}`,r?t.getPreviousRoute():void 0);return{previewContext:i,clearPreviewContext:()=>a(void 0)}}export{n as t};
|
|
2
|
+
//# sourceMappingURL=BQk9Mhlr.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"BQk9Mhlr.chunk.js","names":[],"sources":["../../src/apps/exchange/hooks/usePreviewContext.ts"],"sourcesContent":["import { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\n\nimport { ContextService } from 'libs/shared/services/ContextService';\n\ninterface ContentViewModel {\n appLink: Core.AppLink;\n}\n\nexport function usePreviewContext(videoId: string, init: boolean) {\n const [ previewContext, setViewModel ] = useViewModel<ContentViewModel>(\n `exchange:preview:${videoId}`,\n init ? ContextService.getPreviousRoute() : undefined\n );\n\n return {\n previewContext,\n clearPreviewContext: () => setViewModel(undefined)\n };\n}\n"],"mappings":"+EASA,SAAgB,EAAkB,EAAiB,EAAe,CAChE,GAAM,CAAE,EAAgB,GAAiB,EACvC,oBAAoB,IACpB,EAAO,EAAe,kBAAkB,CAAG,IAAA,GAC5C,CAED,MAAO,CACL,iBACA,wBAA2B,EAAa,IAAA,GAAA,CACzC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as e}from"./D8clSITt.chunk.js";import{t}from"./GN6vNflP.chunk.js";import{t as n}from"./DXNyYUq4.chunk.js";import{n as r,t as i}from"./Dn3hwC-o.chunk.js";import{$ as a}from"./app-
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{l as e}from"./D8clSITt.chunk.js";import{t}from"./GN6vNflP.chunk.js";import{t as n}from"./DXNyYUq4.chunk.js";import{n as r,t as i}from"./Dn3hwC-o.chunk.js";import{$ as a}from"./app-CgkYY4K0.js";import{t as o}from"./DhtgaF-y2.chunk.js";import"./Jf-R5ehU.chunk.js";function s(t){let{folderId:n,firstItem:r,lastItem:i,getAppLink:a}=t,s=e(n&&o.folderParentTree(n));if(!s.data?.children?.length)return[];let c=s.data.children.map(e=>({node:e,path:[e]})),l=[];for(;c.length;){let{node:e,path:t}=c.pop();e.data.id.toString()===n.toString()&&(l=t.map(e=>({name:e.data.name,appLink:a(e)}))),e.children&&c.push(...e.children.map(e=>({node:e,path:[...t,e]})))}return r&&l.unshift(r),i&&l.push(i),t.setLastActive!==!1&&(l[l.length-1].active=!0),l}var c=t.encloseNamespace(`exchange.exchangeUtils`);function l(e){return{application:r.EXCHANGE,action:i.Exchange.PREVIEW,args:[e.id,n.slugify(e.name)]}}function u(e,t){return e?.id?{application:r.EXCHANGE,action:i.Exchange.SERIES,args:[e.id,n.slugify(e.name)],params:{sort:t??a.Series}}:null}function d(e,t){return e?{application:r.EXCHANGE,action:i.Exchange.FOLDER,args:[e.id,n.slugify(e.name)],params:{sort:t}}:null}function f(e,t){return s({folderId:e,getAppLink:e=>d(e.data,t),firstItem:{name:c(`exchangeArchive`),appLink:{application:r.EXCHANGE,action:i.Exchange.INDEX}}})}export{f as i,u as n,l as r,d as t};
|
|
2
|
+
//# sourceMappingURL=BXIfsdxg.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"BXIfsdxg.chunk.js","names":[],"sources":["../../../../libs/shared/src/hooks/useBuildBreadcrumbs.ts","../../src/apps/exchange/utils/ExchangeUtils.ts"],"sourcesContent":["import { Core } from 'libs/common/core';\nimport { Flight } from 'libs/common/flight';\n\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { LibraryRequests } from 'libs/shared/flight-requests/LibraryRequests';\nimport { Folder, MasterNestedObject } from 'libs/shared/interfaces';\n\ninterface BuildOptions {\n folderId: string;\n firstItem?: Breadcrumb;\n lastItem?: Breadcrumb;\n getAppLink: (folder: MasterNestedObject<Folder>) => Core.AppLink;\n setLastActive?: boolean;\n}\n\nexport function useBuildBreadcrumbs(options: BuildOptions): Breadcrumb[] {\n const { folderId, firstItem, lastItem, getAppLink } = options;\n\n const parentTree = Flight.useBasicFetch<MasterNestedObject<Folder>>(\n folderId && LibraryRequests.folderParentTree(folderId)\n );\n\n if (!parentTree.data?.children?.length)\n return [];\n\n const searchStack: {\n node: MasterNestedObject<Folder>,\n path: MasterNestedObject<Folder>[]\n }[] = parentTree.data.children.map(c => ({ node: c, path: [c]}));\n\n let breadcrumbs: Breadcrumb[] = [];\n\n while (searchStack.length) {\n const { node, path } = searchStack.pop();\n \n if (node.data.id.toString() === folderId.toString())\n breadcrumbs = path.map(object => ({\n name: object.data.name,\n appLink: getAppLink(object)\n }));\n\n if (node.children)\n searchStack.push(...node.children.map(c => ({ node: c, path: [ ...path, c ]})));\n }\n\n if (firstItem) breadcrumbs.unshift(firstItem);\n if (lastItem) breadcrumbs.push(lastItem);\n\n if (options.setLastActive !== false)\n breadcrumbs[breadcrumbs.length - 1].active = true;\n\n return breadcrumbs;\n}\n \n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { BG_COLOUR_CLASS_NAMES } from 'libs/shared/constants/ColourClassNames';\nimport { VideoSortType } from 'libs/shared/enums/VideoSortType';\nimport { useBuildBreadcrumbs } from 'libs/shared/hooks/useBuildBreadcrumbs';\nimport { Folder, Library, Series, Video } from 'libs/shared/interfaces';\n\nimport { Actions } from 'shared/constants/ExchangeActions';\nimport { AppChannels } from 'shared/constants/ExchangeRadioChannels';\n\nconst namespace = 'exchange.exchangeUtils';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport function getVideoAppLink(video: Video): Core.AppLink {\n return {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.PREVIEW,\n args: [ video.id, TextHelper.slugify(video.name) ]\n };\n}\n\nexport function getSeriesAppLink(series: Series, sort?: string): Core.AppLink {\n if (!series?.id)\n return null;\n\n return {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.SERIES,\n args: [ series.id, TextHelper.slugify(series.name) ],\n params: {\n sort: sort ?? VideoSortType.Series\n }\n };\n}\n\nexport function getFolderAppLink(folder: Folder, sort?: string): Core.AppLink {\n if (!folder)\n return null;\n\n return {\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.FOLDER,\n args: [ folder.id, TextHelper.slugify(folder.name) ],\n params: {\n sort\n }\n };\n}\n\nexport function getFolderBgColourClass(folder: Folder | Library): string {\n let charCode = 0;\n\n for (let i = 0; i < (folder.name?.length ?? 0); i++) {\n charCode += folder.name.charCodeAt(i);\n }\n\n return BG_COLOUR_CLASS_NAMES[charCode % BG_COLOUR_CLASS_NAMES.length];\n}\n\nexport function useGetFolderBreadcrumbs(folderId: string, sort: VideoSortType): Breadcrumb[] {\n return useBuildBreadcrumbs({\n folderId,\n getAppLink: object => getFolderAppLink(object.data, sort),\n firstItem: {\n name: getPhrase('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GAAQ,EAAc,OAC7B,CACF,CATQ,KAYX,SAAgB,EAAiB,EAAgB,EAA6B,CAI5E,OAHK,EAGE,CACL,YAAa,EAAY,SACzB,OAAQ,EAAQ,SAAS,OACzB,KAAM,CAAE,EAAO,GAAI,EAAW,QAAQ,EAAO,KAAK,CAAE,CACpD,OAAQ,CACN,OACD,CACF,CATQ,KAsBX,SAAgB,EAAwB,EAAkB,EAAmC,CAC3F,OAAO,EAAoB,CACzB,WACA,WAAY,GAAU,EAAiB,EAAO,KAAM,EAAK,CACzD,UAAW,CACT,KAAM,EAAU,kBAAkB,CAClC,QAAS,CACP,YAAa,EAAY,SACzB,OAAQ,EAAQ,SAAS,MAC1B,CACF,CACF,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as e,D as t,St as n,b as r,d as i,s as a,wt as o}from"./CnnBLBPY.chunk.js";import{g as s,n as c}from"./DW0w8_XN.chunk.js";import{t as l}from"./GN6vNflP.chunk.js";import{n as u,t as d}from"./Dn3hwC-o.chunk.js";import{I as f,S as p}from"./app-
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{C as e,D as t,St as n,b as r,d as i,s as a,wt as o}from"./CnnBLBPY.chunk.js";import{g as s,n as c}from"./DW0w8_XN.chunk.js";import{t as l}from"./GN6vNflP.chunk.js";import{n as u,t as d}from"./Dn3hwC-o.chunk.js";import{I as f,S as p}from"./app-CgkYY4K0.js";import{t as m}from"./CdNTKjPA.chunk.js";import{t as h}from"./BcJCL8cu2.chunk.js";import{n as g}from"./C6jF43q92.chunk.js";t();var _=e(),v=`tv.infoAlert`;function y(e){return(0,_.jsx)(`div`,{className:`mb-3`,children:(0,_.jsx)(`div`,{children:e.dateRange&&(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(s,{appLink:{application:u.TV,action:d.Tv.BROADCAST_CONTENT,args:[e.region?.code]},className:`text-info`,children:(0,_.jsxs)(`p`,{className:`fw-semibold mb-0 me-2`,children:[(0,_.jsx)(f,{namespace:v,phrase:`programsAvailable`}),g.getFormattedDateRange(h(e.dateRange.startDate,e.dateRange.timeZone),h(e.dateRange.endDate,e.dateRange.timeZone))]})})})})})}var b=`tv.tvTabs`,x=l.encloseNamespace(b),S={channels:{application:u.TV,action:d.Tv.CHANNELS},programs:{application:u.TV,action:d.Tv.PROGRAMS}},C={actionType:r.Click,entity:a.Url,location:i.MagicTabs};function w(e){let{active:t,currentRegion:r}=e,i=[{name:x(`channels`),appLink:{...S.channels,args:[r?.code]},active:t===`channels`,analyticsData:{name:x(`channels`),url:n.getHref(S.channels)},analyticsOptions:C},{name:x(`programs`),appLink:{...S.programs,args:[r?.code]},active:t===`programs`,analyticsData:{name:l.getPhrase(b,`programs`),url:n.getHref(S.programs)},analyticsOptions:C}];return e.showTvGuide&&e.config&&i.push({name:x(`tvGuide`),active:!1,analyticsOptions:C,svg:p,svgSize:c.Small,onSelect:()=>o.PageLoad(`${e.config.onlineUrl}/login?returnUrl=/tv/guide`,!0)}),(0,_.jsx)(`div`,{className:`mb-3`,children:(0,_.jsx)(m,{tabs:i})})}export{y as n,w as t};
|
|
2
|
+
//# sourceMappingURL=B_P4D3Hf2.chunk.js.map
|