@clickview/lite 0.104.0-rc.7 → 0.104.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/.vite/manifest.json +575 -575
  2. package/dist/bundles.json +1 -1
  3. package/dist/en.json +1 -1
  4. package/dist/scripts/{Dnz8CbEu.chunk.js → -QIG2ZHc.chunk.js} +3 -3
  5. package/dist/scripts/{Dnz8CbEu.chunk.js.map → -QIG2ZHc.chunk.js.map} +1 -1
  6. package/dist/scripts/{CX6c7KRp2.chunk.js → 0mx04bmJ2.chunk.js} +2 -2
  7. package/dist/scripts/{CX6c7KRp2.chunk.js.map → 0mx04bmJ2.chunk.js.map} +1 -1
  8. package/dist/scripts/{CMHxOVI7.chunk.js → 41LJfkjO.chunk.js} +2 -2
  9. package/dist/scripts/{CMHxOVI7.chunk.js.map → 41LJfkjO.chunk.js.map} +1 -1
  10. package/dist/scripts/{BBWnpWNB2.chunk.js → 7uvJMXC12.chunk.js} +2 -2
  11. package/dist/scripts/{BBWnpWNB2.chunk.js.map → 7uvJMXC12.chunk.js.map} +1 -1
  12. package/dist/scripts/{CaCm4N_d2.chunk.js → B-HfRX562.chunk.js} +2 -2
  13. package/dist/scripts/{CaCm4N_d2.chunk.js.map → B-HfRX562.chunk.js.map} +1 -1
  14. package/dist/scripts/{DSPMbDdF.chunk.js → B3_lC6bW.chunk.js} +2 -2
  15. package/dist/scripts/{DSPMbDdF.chunk.js.map → B3_lC6bW.chunk.js.map} +1 -1
  16. package/dist/scripts/{0Fek4oFk.chunk.js → BLE8DLAY.chunk.js} +2 -2
  17. package/dist/scripts/{0Fek4oFk.chunk.js.map → BLE8DLAY.chunk.js.map} +1 -1
  18. package/dist/scripts/{B338pwKt2.chunk.js → BRt-Kdnn2.chunk.js} +2 -2
  19. package/dist/scripts/{B338pwKt2.chunk.js.map → BRt-Kdnn2.chunk.js.map} +1 -1
  20. package/dist/scripts/{D3ncynN72.chunk.js → BVBpDZoT2.chunk.js} +3 -3
  21. package/dist/scripts/{D3ncynN72.chunk.js.map → BVBpDZoT2.chunk.js.map} +1 -1
  22. package/dist/scripts/{5PKjjI4Y.chunk.js → BapoiGsj.chunk.js} +2 -2
  23. package/dist/scripts/{5PKjjI4Y.chunk.js.map → BapoiGsj.chunk.js.map} +1 -1
  24. package/dist/scripts/{CNfmLVE82.chunk.js → Bc1JT5Y-2.chunk.js} +2 -2
  25. package/dist/scripts/{CNfmLVE82.chunk.js.map → Bc1JT5Y-2.chunk.js.map} +1 -1
  26. package/dist/scripts/{cDv6zuhh.chunk.js → BhE5KhcC.chunk.js} +2 -2
  27. package/dist/scripts/{cDv6zuhh.chunk.js.map → BhE5KhcC.chunk.js.map} +1 -1
  28. package/dist/scripts/{Bzk4AwVx2.chunk.js → BncgzKKQ2.chunk.js} +2 -2
  29. package/dist/scripts/{Bzk4AwVx2.chunk.js.map → BncgzKKQ2.chunk.js.map} +1 -1
  30. package/dist/scripts/BwBWuxjr2.chunk.js +2 -0
  31. package/dist/scripts/{B1hsuVfV2.chunk.js.map → BwBWuxjr2.chunk.js.map} +1 -1
  32. package/dist/scripts/{B1TqilLB.chunk.js → C6z8ii6C.chunk.js} +2 -2
  33. package/dist/scripts/{B1TqilLB.chunk.js.map → C6z8ii6C.chunk.js.map} +1 -1
  34. package/dist/scripts/{fMgBORUX.chunk.js → C8x-QH43.chunk.js} +2 -2
  35. package/dist/scripts/{fMgBORUX.chunk.js.map → C8x-QH43.chunk.js.map} +1 -1
  36. package/dist/scripts/{BiWUSyJr.chunk.js → CAkqvKfy.chunk.js} +2 -2
  37. package/dist/scripts/{BiWUSyJr.chunk.js.map → CAkqvKfy.chunk.js.map} +1 -1
  38. package/dist/scripts/{D-iyHqNw2.chunk.js → CLvImDXv2.chunk.js} +3 -3
  39. package/dist/scripts/{D-iyHqNw2.chunk.js.map → CLvImDXv2.chunk.js.map} +1 -1
  40. package/dist/scripts/{Cqq1N9xw.chunk.js → CM8248d7.chunk.js} +2 -2
  41. package/dist/scripts/{Cqq1N9xw.chunk.js.map → CM8248d7.chunk.js.map} +1 -1
  42. package/dist/scripts/{B_TE5XUR2.chunk.js → CvilnM0u2.chunk.js} +2 -2
  43. package/dist/scripts/{B_TE5XUR2.chunk.js.map → CvilnM0u2.chunk.js.map} +1 -1
  44. package/dist/scripts/{AEOAlemi.chunk.js → Cwocc8uV.chunk.js} +2 -2
  45. package/dist/scripts/{AEOAlemi.chunk.js.map → Cwocc8uV.chunk.js.map} +1 -1
  46. package/dist/scripts/{Bld7iWR52.chunk.js → D-pn0sNx2.chunk.js} +2 -2
  47. package/dist/scripts/{Bld7iWR52.chunk.js.map → D-pn0sNx2.chunk.js.map} +1 -1
  48. package/dist/scripts/{Cyit3dMk.chunk.js → D78QEASE.chunk.js} +2 -2
  49. package/dist/scripts/{Cyit3dMk.chunk.js.map → D78QEASE.chunk.js.map} +1 -1
  50. package/dist/scripts/{Dtag-27K.chunk.js → DER8311r.chunk.js} +2 -2
  51. package/dist/scripts/{Dtag-27K.chunk.js.map → DER8311r.chunk.js.map} +1 -1
  52. package/dist/scripts/{CmnbQiBA.chunk.js → DSZaceCq.chunk.js} +2 -2
  53. package/dist/scripts/{CmnbQiBA.chunk.js.map → DSZaceCq.chunk.js.map} +1 -1
  54. package/dist/scripts/{CfNYFxJl2.chunk.js → D_1m0b_a2.chunk.js} +2 -2
  55. package/dist/scripts/{CfNYFxJl2.chunk.js.map → D_1m0b_a2.chunk.js.map} +1 -1
  56. package/dist/scripts/{-KvTbeQV.chunk.js → DhcRnxkp.chunk.js} +2 -2
  57. package/dist/scripts/{-KvTbeQV.chunk.js.map → DhcRnxkp.chunk.js.map} +1 -1
  58. package/dist/scripts/{qRLSbnEr.chunk.js → DhdM2yGm.chunk.js} +2 -2
  59. package/dist/scripts/{qRLSbnEr.chunk.js.map → DhdM2yGm.chunk.js.map} +1 -1
  60. package/dist/scripts/{DKDWcWxk.chunk.js → Dqn0sInF.chunk.js} +2 -2
  61. package/dist/scripts/{DKDWcWxk.chunk.js.map → Dqn0sInF.chunk.js.map} +1 -1
  62. package/dist/scripts/{CAs2Sere2.chunk.js → MW7W80HY2.chunk.js} +2 -2
  63. package/dist/scripts/{CAs2Sere2.chunk.js.map → MW7W80HY2.chunk.js.map} +1 -1
  64. package/dist/scripts/{CwFYdvvA.chunk.js → Okf3Hn0s.chunk.js} +2 -2
  65. package/dist/scripts/{CwFYdvvA.chunk.js.map → Okf3Hn0s.chunk.js.map} +1 -1
  66. package/dist/scripts/{Dt5731Ay.chunk.js → _lqYS5Jx.chunk.js} +2 -2
  67. package/dist/scripts/{Dt5731Ay.chunk.js.map → _lqYS5Jx.chunk.js.map} +1 -1
  68. package/dist/scripts/{app-CyGIKC-k.js → app-H3wSQ-PR.js} +4 -4
  69. package/dist/scripts/{app-CyGIKC-k.js.map → app-H3wSQ-PR.js.map} +1 -1
  70. package/dist/scripts/{B3AhKFfz.chunk.js → ftYw2FVB.chunk.js} +2 -2
  71. package/dist/scripts/{B3AhKFfz.chunk.js.map → ftYw2FVB.chunk.js.map} +1 -1
  72. package/dist/scripts/{DyE6EUDb.chunk.js → kjRiUKIL.chunk.js} +2 -2
  73. package/dist/scripts/{DyE6EUDb.chunk.js.map → kjRiUKIL.chunk.js.map} +1 -1
  74. package/dist/scripts/{B3y60nT5.chunk.js → pDWQ8Uj5.chunk.js} +2 -2
  75. package/dist/scripts/{B3y60nT5.chunk.js.map → pDWQ8Uj5.chunk.js.map} +1 -1
  76. package/package.json +1 -1
  77. package/dist/scripts/B1hsuVfV2.chunk.js +0 -2
@@ -1,2 +1,2 @@
1
- import{o as e}from"./DAXXjFlN.chunk.js";import{y as t}from"./BftnFbcr.chunk.js";import"./DFZS3Ffo.chunk.js";import{n}from"./B785hxeE.chunk.js";import{t as r}from"./e57H3T-k.chunk.js";import{t as i}from"./C2w0pmFW.chunk.js";import{t as a}from"./wrLrTezN.chunk.js";import{t as o}from"./BXTI9cmX.chunk.js";import{l as ee,y as te,z as ne}from"./NlCAcBdo.chunk.js";import{t as re}from"./CVHQXNzi2.chunk.js";import{t as s}from"./BrbeV-Gn2.chunk.js";import{t as c}from"./eoAypzU3.chunk.js";import{t as ie}from"./CgCqPbjJ.chunk.js";import{t as l}from"./7-GJWRH82.chunk.js";import{t as ae}from"./dLd5d3X22.chunk.js";import{t as oe}from"./QCFxJYkI2.chunk.js";import{t as se}from"./B2INd6bh.chunk.js";import{t as u}from"./B3gsVN-_.chunk.js";import{a as d,o as f}from"./D-iyHqNw2.chunk.js";import{n as p}from"./CpFtf-tI2.chunk.js";import{t as m}from"./DBkEQkKm2.chunk.js";import{t as h}from"./CzuHD4Ht.chunk.js";import{n as ce}from"./xa4cS6Fq.chunk.js";import{t as le}from"./WvK58Ge12.chunk.js";import{t as ue}from"./CvHvrB-t.chunk.js";import{l as de}from"./BOJK8LI1.chunk.js";import{t as fe}from"./DzgAvoez.chunk.js";import{o as g,r as _}from"./CpgHBpMp.chunk.js";import{n as v,t as y}from"./CvtZ8ZFA2.chunk.js";import{t as b}from"./BPavmm8c.chunk.js";import{a as pe,i as me,n as he,t as ge}from"./Bf9r1ZoF2.chunk.js";import{_ as x,a as _e,d as ve,f as S,g as ye,h as be,i as xe,l as C,m as w,n as T,o as E,p as D,r as O,s as k,t as A,u as j}from"./Bld7iWR52.chunk.js";import{n as M,t as Se}from"./B3p3SaM12.chunk.js";import{n as Ce,r as we}from"./BgOLbASl2.chunk.js";var N=e(i()),P=a(),F=`shared.playClip`;function Te(e){let{hasPermissions:t}=u(),n=v({location:y.VideoItem,presentationSlug:null});return(0,P.jsxs)(`section`,{className:`play-page-section`,id:b.ClippedFrom,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(b.ClippedFrom,t)},children:[(0,P.jsx)(`h2`,{className:`h4 mb-0`,children:(0,P.jsx)(p,{namespace:F,phrase:`clippedFrom`})}),(0,P.jsx)(g.Provider,{value:n,children:(0,P.jsx)(_,{videos:[e.originalVideo],getVideoAppLink:(t,n)=>m.getAppLink(t,{...n,context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId,moviesAndTv:e.queryParams.mtv,includeContext:e.currentUser?.isAuthenticated},null),hasPermissions:t,presentationAudiences:e.audiences,getPreviewQuestionsAppLink:e=>h.getPreviewQuestionsAppLink(e),commonVideoProps:e.commonVideoProps})})]})}var I={main:`_main_1ujkn_1`,expandedToc:`_expandedToc_1ujkn_1`,theatreMode:`_theatreMode_1ujkn_4`,theatreModeContent:`_theatreModeContent_1ujkn_7`,theatreModePlayPageContainer:`_theatreModePlayPageContainer_1ujkn_17`,theatreModeLeftContent:`_theatreModeLeftContent_1ujkn_21`},Ee=(e,t,n)=>r=>n?{application:o.VIDEOS,action:c.Videos.PREVIEW_PDF,args:[r.id],params:{videoId:e,shareId:t}}:{application:o.SIGN_UP,action:c.SignUp.SIGN_UP};function L(e){let i=ce(),{hasPermissions:a}=u(),{canConsume:p}=s.getCanBeConsumed(e.clip),h=E(e.hasTheatreMode,i),g=T(e.hasTheatreMode,i.mode,i.defaultDisplayMode);function _(e){i.playerRef?.current?.toggleTheatreMode?.(e)}let{tableOfContentsActiveId:v,setTableOfContentsActiveId:y,controlledId:F,setControlledId:L,tableOfContentsExpanded:R,onToggleTableOfContents:z}=xe(e.tableOfContentsId,e.hasTheatreMode,h),B=ye(e.clip)&&e.featureAccess.canViewGlance,{headingRef:V,headingElements:H}=O(B),U=H.map(t=>({id:t.id,name:A.getSectionHeading(t.id,{clips:e.clips,interactives:e.interactives,resources:e.clip.resources?.data,isPlayClipPage:!0})}));we({setActiveId:y,headingElements:H,controlledId:F,setControlledId:L}),Ce(H,F);let De=s.isVideoTypeArchived(e.clip),W=a(n.StudentExperience),G=N.useRef(!1),K=Ee(e.clip.id,e.shareId,e.featureAccess.canViewResourceItems);C({resourcePopupId:e.queryParams?.resourceId,resources:e.clip.resources?.data,getResourceAppLink:K});function q(){G.current=!i?.playerRef?.current?.isPaused(),i?.playerRef?.current?.pause()}function J(){G.current&&i?.playerRef?.current?.play()}function Y(){return!(!e.clip._parentVideo||!e.clip._canBeConsumed?.value||!e.currentUser?.isAuthenticated||!e.hasProduct(oe.Primary)||W)}function Oe(){return Y()?{application:o.VIDEOS,action:c.Videos.PLAY_VIDEO,args:[null,e.clip._parentVideo.id,r.slugify(e.clip._parentVideo.name)]}:null}let ke=i.mode===`picture-in-picture`||e.featureAccess.canViewPublicLayout,Ae=e.clips?.filter(t=>t.id.toString()!==e.clip.id.toString())??[],X={hasTheatreMode:e.hasTheatreMode,shouldShowSideTableOfContents:e.shouldShowSideTableOfContents,tableOfContentsExpanded:R,theatreMode:h},je=k(X),Me=_e(X),[,Z]=ae(ie.PLAY_PAGE_CONTAINER_CLASS_NAME),Q=M(e.clip,a(n.StudentExperience)),$=Q.filter(le.isResource);function Ne(){if($.length===1){ue.downloadResource($[0],{clipId:e.clip.id,clipName:e.clip.name},{location:te.PlayClip,actionType:ne.Download,entity:ee.Resource});return}t.trigger({application:o.VIDEOS,action:c.Videos.RESOURCE_DOWNLOAD,args:[e.clip?.id,e.shareId]})}return N.useEffect(()=>{Z(h?I.theatreModePlayPageContainer:``)},[h]),N.useEffect(()=>()=>Z(``),[]),(0,P.jsxs)(`div`,{className:`px-4 play-page-sections-container ${e.shouldShowSideTableOfContents?`row g-0`:``}`,children:[(0,P.jsxs)(`main`,{className:`${I.main} ${je}`,children:[!!e.breadcrumbs?.length&&(0,P.jsx)(`div`,{className:`mb-2`,children:(0,P.jsx)(fe,{breadcrumbs:e.breadcrumbs})}),(0,P.jsx)(ge,{restrictions:e.clip._restrictions,yearGroups:e.commonVideoProps.yearGroups,objectId:e.clip.id,objectTypeId:re.Clip,canManageVideoAccess:e.canManageVideoAccess}),De&&(0,P.jsx)(pe,{typeId:e.clip.typeId,hasStudentExperience:W}),(0,P.jsxs)(`section`,{id:b.Video,className:`mb-2 ${se.GLOBAL_PLAYER_SELECTOR}`,ref:e=>{e&&V?.current&&V.current.set(b.Video,e)},children:[p&&(0,P.jsx)(de,{objectId:e.clip.id,objectTypeId:e.clip.typeId,shareId:e.shareId,context:e.queryParams?.context,contextId:e.queryParams?.contextId,moviesAndTv:e.queryParams?.mtv,playNext:e.queryParams?.playNext,startTime:e.queryParams?.t??e.queryParams?.startTime,mode:`default`,location:`play-page`},e.clip.id),(0,P.jsx)(`div`,{className:ke?``:`d-none`,children:(0,P.jsx)(j,{video:e.clip,type:`pip`})})]}),(0,P.jsxs)(`div`,{className:Me,children:[(0,P.jsxs)(`div`,{className:g?`${I.theatreModeLeftContent}`:`w-100`,children:[(0,P.jsx)(ve,{presentationSlug:null,media:e.clip,yearGroups:e.commonVideoProps.yearGroups,audiences:e.audiences,originalVideoAppLink:Oe(),featureAccess:e.featureAccess,shareId:e.shareId,showTitlePadlock:!e.commonVideoProps.hasStudentExperience&&!e.commonVideoProps.hasGuestExperience}),B?(0,P.jsx)(be,{video:e.clip,pointsOfInterest:e.pointsOfInterest,setStartTime:e=>i.playerRef.current?.currentTime(e),getTagAppLink:e=>({application:o.SEARCH,action:c.Search.HOME,params:{tagOrClassification:e.name}}),suppressInteractivity:e.featureAccess.canViewPublicLayout,canViewGlance:B}):(0,P.jsx)(x,{video:e.clip,currentUser:e.currentUser,onLaunchImmersiveReader:q,onExitImmersiveReader:J,getTagAppLink:e=>({application:o.SEARCH,action:c.Search.HOME,params:{tagOrClassification:e.name}}),headingRef:V,suppressInteractivity:e.featureAccess.canViewPublicLayout,getLibraryAppLink:f,getFolderAppLink:d}),(0,P.jsx)(Se,{video:e.clip,canViewResources:e.featureAccess.canViewResourceItems,imageCdnUrl:e.commonVideoProps.imageCdnUrl,getAppLink:K,analyticsData:{clipId:e.clip.id,clipName:e.clip.name},resourceThumbnailFallbackUrl:l.Fallbacks.RESOURCE_THUMBNAIL,headingRef:V,onDownloadClick:Ne,resources:Q,downloadableResources:$,aboutResourcesAppLink:m.getAboutResourceAppLink()}),(0,P.jsx)(D,{presentationSlug:null,video:e.clip,interactives:e.interactives,analyticsData:{clipId:e.clip.id,clipName:e.clip.name},canViewInteractives:e.featureAccess.canViewInteractives,headingRef:V,commonVideoProps:e.commonVideoProps}),(0,P.jsx)(w,{presentationSlug:null,clips:Ae||[],video:e.clip,canViewClips:e.featureAccess.canViewClips,audiences:e.audiences,headingRef:V,analyticsData:{clipId:e.clip.id,clipName:e.clip.name},commonVideoProps:e.commonVideoProps}),B&&(0,P.jsx)(x,{video:e.clip,currentUser:e.currentUser,onLaunchImmersiveReader:q,onExitImmersiveReader:J,getTagAppLink:e=>({application:o.SEARCH,action:c.Search.HOME,params:{tagOrClassification:e.name}}),headingRef:V,suppressInteractivity:e.featureAccess.canViewPublicLayout,showHeading:!0,getLibraryAppLink:a(n.ViewLibraries)?f:null,getFolderAppLink:a(n.ViewLibraries)?d:null}),!!Y()&&(0,P.jsx)(Te,{originalVideo:e.clip._parentVideo,shareId:e.shareId,queryParams:e.queryParams,audiences:e.audiences,headingRef:V,currentUser:e.currentUser,commonVideoProps:e.commonVideoProps}),!s.isUgc(e.clip._parentVideo)&&(0,P.jsx)(he,{headingRef:V,media:e.clip,parentVideo:e.clip._parentVideo,contentRegion:e.currentUser.contentRegion,shareId:e.shareId,presentationSlug:null}),(0,P.jsx)(me,{presentationSlug:null,currentVideo:e.clip,relatedVideos:e.relatedVideos,currentUser:e.currentUser,audiences:e.audiences,getVideoAppLink:(t,n)=>m.getAppLink(t,{...n,context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId,moviesAndTv:e.queryParams.mtv,includeContext:e.currentUser?.isAuthenticated},null),moviesAndTv:e.queryParams.mtv,commonVideoProps:e.commonVideoProps})]}),h&&(0,P.jsx)(S,{isExpanded:R,setIsExpanded:z,toggleTheatreMode:null,items:U,activeId:v,setControlledId:L,analyticsData:{videoId:e.clip.id,videoName:e.clip.name},showInSide:e.shouldShowSideTableOfContents,isTheatreMode:!0,hasTranscription:e.hasTheatreMode,shouldShow:U.length>=3})]})]}),!h&&(0,P.jsx)(S,{isExpanded:R,setIsExpanded:z,toggleTheatreMode:e.hasTheatreMode?_:null,items:U,activeId:v,setControlledId:L,analyticsData:{videoId:e.clip.id,videoName:e.clip.name},showInSide:e.shouldShowSideTableOfContents,isTheatreMode:!1,hasTranscription:e.hasTheatreMode,shouldShow:U.length>=3})]})}export{L as t};
2
- //# sourceMappingURL=B_TE5XUR2.chunk.js.map
1
+ import{o as e}from"./DAXXjFlN.chunk.js";import{y as t}from"./BftnFbcr.chunk.js";import"./DFZS3Ffo.chunk.js";import{n}from"./B785hxeE.chunk.js";import{t as r}from"./e57H3T-k.chunk.js";import{t as i}from"./C2w0pmFW.chunk.js";import{t as a}from"./wrLrTezN.chunk.js";import{t as o}from"./BXTI9cmX.chunk.js";import{l as ee,y as te,z as ne}from"./NlCAcBdo.chunk.js";import{t as re}from"./CVHQXNzi2.chunk.js";import{t as s}from"./BrbeV-Gn2.chunk.js";import{t as c}from"./eoAypzU3.chunk.js";import{t as ie}from"./CgCqPbjJ.chunk.js";import{t as l}from"./7-GJWRH82.chunk.js";import{t as ae}from"./dLd5d3X22.chunk.js";import{t as oe}from"./QCFxJYkI2.chunk.js";import{t as se}from"./B2INd6bh.chunk.js";import{t as u}from"./B3gsVN-_.chunk.js";import{a as d,o as f}from"./CLvImDXv2.chunk.js";import{n as p}from"./CpFtf-tI2.chunk.js";import{t as m}from"./DBkEQkKm2.chunk.js";import{t as h}from"./CzuHD4Ht.chunk.js";import{n as ce}from"./xa4cS6Fq.chunk.js";import{t as le}from"./WvK58Ge12.chunk.js";import{t as ue}from"./CvHvrB-t.chunk.js";import{l as de}from"./BOJK8LI1.chunk.js";import{t as fe}from"./DzgAvoez.chunk.js";import{o as g,r as _}from"./CpgHBpMp.chunk.js";import{n as v,t as y}from"./CvtZ8ZFA2.chunk.js";import{t as b}from"./BPavmm8c.chunk.js";import{a as pe,i as me,n as he,t as ge}from"./Bf9r1ZoF2.chunk.js";import{_ as x,a as _e,d as ve,f as S,g as ye,h as be,i as xe,l as C,m as w,n as T,o as E,p as D,r as O,s as k,t as A,u as j}from"./D-pn0sNx2.chunk.js";import{n as M,t as Se}from"./B3p3SaM12.chunk.js";import{n as Ce,r as we}from"./BgOLbASl2.chunk.js";var N=e(i()),P=a(),F=`shared.playClip`;function Te(e){let{hasPermissions:t}=u(),n=v({location:y.VideoItem,presentationSlug:null});return(0,P.jsxs)(`section`,{className:`play-page-section`,id:b.ClippedFrom,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(b.ClippedFrom,t)},children:[(0,P.jsx)(`h2`,{className:`h4 mb-0`,children:(0,P.jsx)(p,{namespace:F,phrase:`clippedFrom`})}),(0,P.jsx)(g.Provider,{value:n,children:(0,P.jsx)(_,{videos:[e.originalVideo],getVideoAppLink:(t,n)=>m.getAppLink(t,{...n,context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId,moviesAndTv:e.queryParams.mtv,includeContext:e.currentUser?.isAuthenticated},null),hasPermissions:t,presentationAudiences:e.audiences,getPreviewQuestionsAppLink:e=>h.getPreviewQuestionsAppLink(e),commonVideoProps:e.commonVideoProps})})]})}var I={main:`_main_1ujkn_1`,expandedToc:`_expandedToc_1ujkn_1`,theatreMode:`_theatreMode_1ujkn_4`,theatreModeContent:`_theatreModeContent_1ujkn_7`,theatreModePlayPageContainer:`_theatreModePlayPageContainer_1ujkn_17`,theatreModeLeftContent:`_theatreModeLeftContent_1ujkn_21`},Ee=(e,t,n)=>r=>n?{application:o.VIDEOS,action:c.Videos.PREVIEW_PDF,args:[r.id],params:{videoId:e,shareId:t}}:{application:o.SIGN_UP,action:c.SignUp.SIGN_UP};function L(e){let i=ce(),{hasPermissions:a}=u(),{canConsume:p}=s.getCanBeConsumed(e.clip),h=E(e.hasTheatreMode,i),g=T(e.hasTheatreMode,i.mode,i.defaultDisplayMode);function _(e){i.playerRef?.current?.toggleTheatreMode?.(e)}let{tableOfContentsActiveId:v,setTableOfContentsActiveId:y,controlledId:F,setControlledId:L,tableOfContentsExpanded:R,onToggleTableOfContents:z}=xe(e.tableOfContentsId,e.hasTheatreMode,h),B=ye(e.clip)&&e.featureAccess.canViewGlance,{headingRef:V,headingElements:H}=O(B),U=H.map(t=>({id:t.id,name:A.getSectionHeading(t.id,{clips:e.clips,interactives:e.interactives,resources:e.clip.resources?.data,isPlayClipPage:!0})}));we({setActiveId:y,headingElements:H,controlledId:F,setControlledId:L}),Ce(H,F);let De=s.isVideoTypeArchived(e.clip),W=a(n.StudentExperience),G=N.useRef(!1),K=Ee(e.clip.id,e.shareId,e.featureAccess.canViewResourceItems);C({resourcePopupId:e.queryParams?.resourceId,resources:e.clip.resources?.data,getResourceAppLink:K});function q(){G.current=!i?.playerRef?.current?.isPaused(),i?.playerRef?.current?.pause()}function J(){G.current&&i?.playerRef?.current?.play()}function Y(){return!(!e.clip._parentVideo||!e.clip._canBeConsumed?.value||!e.currentUser?.isAuthenticated||!e.hasProduct(oe.Primary)||W)}function Oe(){return Y()?{application:o.VIDEOS,action:c.Videos.PLAY_VIDEO,args:[null,e.clip._parentVideo.id,r.slugify(e.clip._parentVideo.name)]}:null}let ke=i.mode===`picture-in-picture`||e.featureAccess.canViewPublicLayout,Ae=e.clips?.filter(t=>t.id.toString()!==e.clip.id.toString())??[],X={hasTheatreMode:e.hasTheatreMode,shouldShowSideTableOfContents:e.shouldShowSideTableOfContents,tableOfContentsExpanded:R,theatreMode:h},je=k(X),Me=_e(X),[,Z]=ae(ie.PLAY_PAGE_CONTAINER_CLASS_NAME),Q=M(e.clip,a(n.StudentExperience)),$=Q.filter(le.isResource);function Ne(){if($.length===1){ue.downloadResource($[0],{clipId:e.clip.id,clipName:e.clip.name},{location:te.PlayClip,actionType:ne.Download,entity:ee.Resource});return}t.trigger({application:o.VIDEOS,action:c.Videos.RESOURCE_DOWNLOAD,args:[e.clip?.id,e.shareId]})}return N.useEffect(()=>{Z(h?I.theatreModePlayPageContainer:``)},[h]),N.useEffect(()=>()=>Z(``),[]),(0,P.jsxs)(`div`,{className:`px-4 play-page-sections-container ${e.shouldShowSideTableOfContents?`row g-0`:``}`,children:[(0,P.jsxs)(`main`,{className:`${I.main} ${je}`,children:[!!e.breadcrumbs?.length&&(0,P.jsx)(`div`,{className:`mb-2`,children:(0,P.jsx)(fe,{breadcrumbs:e.breadcrumbs})}),(0,P.jsx)(ge,{restrictions:e.clip._restrictions,yearGroups:e.commonVideoProps.yearGroups,objectId:e.clip.id,objectTypeId:re.Clip,canManageVideoAccess:e.canManageVideoAccess}),De&&(0,P.jsx)(pe,{typeId:e.clip.typeId,hasStudentExperience:W}),(0,P.jsxs)(`section`,{id:b.Video,className:`mb-2 ${se.GLOBAL_PLAYER_SELECTOR}`,ref:e=>{e&&V?.current&&V.current.set(b.Video,e)},children:[p&&(0,P.jsx)(de,{objectId:e.clip.id,objectTypeId:e.clip.typeId,shareId:e.shareId,context:e.queryParams?.context,contextId:e.queryParams?.contextId,moviesAndTv:e.queryParams?.mtv,playNext:e.queryParams?.playNext,startTime:e.queryParams?.t??e.queryParams?.startTime,mode:`default`,location:`play-page`},e.clip.id),(0,P.jsx)(`div`,{className:ke?``:`d-none`,children:(0,P.jsx)(j,{video:e.clip,type:`pip`})})]}),(0,P.jsxs)(`div`,{className:Me,children:[(0,P.jsxs)(`div`,{className:g?`${I.theatreModeLeftContent}`:`w-100`,children:[(0,P.jsx)(ve,{presentationSlug:null,media:e.clip,yearGroups:e.commonVideoProps.yearGroups,audiences:e.audiences,originalVideoAppLink:Oe(),featureAccess:e.featureAccess,shareId:e.shareId,showTitlePadlock:!e.commonVideoProps.hasStudentExperience&&!e.commonVideoProps.hasGuestExperience}),B?(0,P.jsx)(be,{video:e.clip,pointsOfInterest:e.pointsOfInterest,setStartTime:e=>i.playerRef.current?.currentTime(e),getTagAppLink:e=>({application:o.SEARCH,action:c.Search.HOME,params:{tagOrClassification:e.name}}),suppressInteractivity:e.featureAccess.canViewPublicLayout,canViewGlance:B}):(0,P.jsx)(x,{video:e.clip,currentUser:e.currentUser,onLaunchImmersiveReader:q,onExitImmersiveReader:J,getTagAppLink:e=>({application:o.SEARCH,action:c.Search.HOME,params:{tagOrClassification:e.name}}),headingRef:V,suppressInteractivity:e.featureAccess.canViewPublicLayout,getLibraryAppLink:f,getFolderAppLink:d}),(0,P.jsx)(Se,{video:e.clip,canViewResources:e.featureAccess.canViewResourceItems,imageCdnUrl:e.commonVideoProps.imageCdnUrl,getAppLink:K,analyticsData:{clipId:e.clip.id,clipName:e.clip.name},resourceThumbnailFallbackUrl:l.Fallbacks.RESOURCE_THUMBNAIL,headingRef:V,onDownloadClick:Ne,resources:Q,downloadableResources:$,aboutResourcesAppLink:m.getAboutResourceAppLink()}),(0,P.jsx)(D,{presentationSlug:null,video:e.clip,interactives:e.interactives,analyticsData:{clipId:e.clip.id,clipName:e.clip.name},canViewInteractives:e.featureAccess.canViewInteractives,headingRef:V,commonVideoProps:e.commonVideoProps}),(0,P.jsx)(w,{presentationSlug:null,clips:Ae||[],video:e.clip,canViewClips:e.featureAccess.canViewClips,audiences:e.audiences,headingRef:V,analyticsData:{clipId:e.clip.id,clipName:e.clip.name},commonVideoProps:e.commonVideoProps}),B&&(0,P.jsx)(x,{video:e.clip,currentUser:e.currentUser,onLaunchImmersiveReader:q,onExitImmersiveReader:J,getTagAppLink:e=>({application:o.SEARCH,action:c.Search.HOME,params:{tagOrClassification:e.name}}),headingRef:V,suppressInteractivity:e.featureAccess.canViewPublicLayout,showHeading:!0,getLibraryAppLink:a(n.ViewLibraries)?f:null,getFolderAppLink:a(n.ViewLibraries)?d:null}),!!Y()&&(0,P.jsx)(Te,{originalVideo:e.clip._parentVideo,shareId:e.shareId,queryParams:e.queryParams,audiences:e.audiences,headingRef:V,currentUser:e.currentUser,commonVideoProps:e.commonVideoProps}),!s.isUgc(e.clip._parentVideo)&&(0,P.jsx)(he,{headingRef:V,media:e.clip,parentVideo:e.clip._parentVideo,contentRegion:e.currentUser.contentRegion,shareId:e.shareId,presentationSlug:null}),(0,P.jsx)(me,{presentationSlug:null,currentVideo:e.clip,relatedVideos:e.relatedVideos,currentUser:e.currentUser,audiences:e.audiences,getVideoAppLink:(t,n)=>m.getAppLink(t,{...n,context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId,moviesAndTv:e.queryParams.mtv,includeContext:e.currentUser?.isAuthenticated},null),moviesAndTv:e.queryParams.mtv,commonVideoProps:e.commonVideoProps})]}),h&&(0,P.jsx)(S,{isExpanded:R,setIsExpanded:z,toggleTheatreMode:null,items:U,activeId:v,setControlledId:L,analyticsData:{videoId:e.clip.id,videoName:e.clip.name},showInSide:e.shouldShowSideTableOfContents,isTheatreMode:!0,hasTranscription:e.hasTheatreMode,shouldShow:U.length>=3})]})]}),!h&&(0,P.jsx)(S,{isExpanded:R,setIsExpanded:z,toggleTheatreMode:e.hasTheatreMode?_:null,items:U,activeId:v,setControlledId:L,analyticsData:{videoId:e.clip.id,videoName:e.clip.name},showInSide:e.shouldShowSideTableOfContents,isTheatreMode:!1,hasTranscription:e.hasTheatreMode,shouldShow:U.length>=3})]})}export{L as t};
2
+ //# sourceMappingURL=CvilnM0u2.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"B_TE5XUR2.chunk.js","names":[],"sources":["../../src/shared/views/play-clip/components/clipped-from/ClippedFrom.tsx","../../src/shared/views/play-clip/components/play-clip/play-clip.module.scss","../../src/shared/views/play-clip/components/play-clip/PlayClip.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CurrentUser, PresentationAudience, VideoTypes } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nconst namespace = 'shared.playClip';\n\ninterface ClippedFromProps {\n originalVideo: VideoTypes;\n queryParams: PlayViewQueryParams;\n audiences: PresentationAudience[];\n shareId?: string;\n headingRef: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n currentUser: CurrentUser;\n commonVideoProps: CommonVideoProps;\n}\n\nexport function ClippedFrom(props: ClippedFromProps) {\n const { hasPermissions } = usePermissions();\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem, presentationSlug: null });\n\n return (\n <section\n className='play-page-section'\n id={PlayPageAnchor.ClippedFrom}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.ClippedFrom, el);\n }}\n >\n <h2 className='h4 mb-0'><Text namespace={namespace} phrase='clippedFrom' /></h2>\n <VideoActionsContext.Provider value={videoActions}>\n <VideoList\n videos={[props.originalVideo]}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n hasPermissions={hasPermissions}\n presentationAudiences={props.audiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n commonVideoProps={props.commonVideoProps}\n />\n </VideoActionsContext.Provider>\n </section>\n );\n}\n","@import '~styles/utils/include-media';\n:local {\n .main.expandedToc {\n width: calc(100% - 15rem); //minus sidebar toc width and margin\n }\n\n .main.theatreMode {\n width: 100% !important;\n }\n\n .theatreModeContent {\n display: flex;\n margin: auto !important;\n\n @include media('<=xl') {\n max-width: 100%;\n }\n }\n\n .theatreModePlayPageContainer {\n //override TeacherLayoutComponent container style\n @media (min-width: 1200px) {\n max-width: none !important;\n }\n }\n\n .theatreModeLeftContent {\n width: calc(100% - 15rem);\n @include media('<=lg') {\n width: 100%;\n }\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { VideoDetailsWithScrollbarV2 } from 'libs/shared/components/play-page/details/VideoDetailsV2';\nimport { hasGlanceData } from 'libs/shared/components/play-page/glance/VideoAtAGlanceUtilsV2';\nimport { VideoAtAGlanceV2 } from 'libs/shared/components/play-page/glance/VideoAtAGlanceV2';\nimport { getResources, PlayPageResources } from 'libs/shared/components/play-page/resources-widget/PlayPageResources';\nimport { SeoConstants } from 'libs/shared/constants/SeoConstants';\nimport { GlobalPlayerConsumer } from 'libs/shared/context/player-context/components/GlobalPlayerConsumer';\nimport { usePlayerContext } from 'libs/shared/context/player-context/PlayerContext';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { HasProductFunc } from 'libs/shared/hooks/UseProducts';\nimport { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { Clip, CurrentUser, InteractiveMetadata, Link, PointOfInterest, PresentationAudience, Resource } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { DownloadHelper } from 'libs/shared/utils/DownloadHelper';\nimport { MasterTypeHelper } from 'libs/shared/utils/MasterTypeHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { CitationWidget } from 'shared/components/citations/CitationWidget';\nimport { ArchivedBanner } from 'shared/components/play-page/ArchivedBanner';\nimport { PlayPageClips } from 'shared/components/play-page/components/play-page-clips/PlayPageClips';\nimport { PlayPageInteractives } from 'shared/components/play-page/components/play-page-interactives/PlayPageInteractives';\nimport { TableOfContentsContainer, TOC_IGNORE_BOUNDARY } from 'shared/components/play-page/components/table-of-contents/TableOfContents';\nimport { PlayPageTitleAndActions } from 'shared/components/play-page/components/title-and-actions/PlayPageTitleAndActions';\nimport { getFolderAppLink, getLibraryAppLink } from 'shared/components/play-page/PlayPageUtils';\nimport { RestrictionBanner } from 'shared/components/play-page/RestrictionBanner';\nimport { PlayerPlaceholder } from 'shared/components/player-placeholder/PlayerPlaceholder';\nimport { RelatedVideos } from 'shared/components/related-videos/RelatedVideos';\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { ViewModelKeys } from 'shared/constants/LiteViewModels';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { useResourcePopup } from 'shared/views/play/components/play-page/hooks/useResourcePopup';\nimport { getContentClassName, getIsTheatreMode, getMainClassName } from 'shared/views/play/components/play-page/PlayPageUtils';\nimport { usePlayPageTableOfContent } from 'shared/views/play/hooks/usePlayPageTableOfContent';\nimport { useSectionHeadings } from 'shared/views/play/hooks/useSectionHeadings';\nimport { useTheatreModeStyle } from 'shared/views/play/hooks/useTheatreStyle';\nimport { PlayPageUtils } from 'shared/views/play/PlayPageUtil';\nimport { ClippedFrom } from 'shared/views/play-clip/components/clipped-from/ClippedFrom';\n\nimport styles from './play-clip.module.scss';\n\nconst getResourceAppLink = (videoId: string, shareId: string, canViewResource: boolean) =>\n (resource: Resource | Link) => {\n if (!canViewResource) {\n return {\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n };\n }\n\n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PREVIEW_PDF,\n args: [resource.id],\n params: {\n videoId: videoId,\n shareId: shareId\n }\n };\n };\n\ninterface PlayClipProps {\n clip: Clip;\n clips: Clip[];\n interactives: InteractiveMetadata[];\n currentUser: CurrentUser;\n relatedVideos: RelatedVideosHash;\n queryParams: PlayViewQueryParams;\n hasProduct: HasProductFunc;\n audiences: PresentationAudience[];\n shareId?: string;\n canManageVideoAccess: boolean;\n pointsOfInterest?: PointOfInterest[];\n featureAccess: VideoFeaturesHash;\n tableOfContentsId: string;\n shouldShowSideTableOfContents: boolean;\n hasTopicDirectories: boolean;\n hasTheatreMode: boolean;\n breadcrumbs?: Breadcrumb[];\n commonVideoProps: CommonVideoProps;\n}\n\nexport function PlayClip(props: PlayClipProps): JSX.Element {\n const playerContext = usePlayerContext();\n\n const { hasPermissions } = usePermissions();\n const { canConsume } = VideoHelper.getCanBeConsumed(props.clip);\n \n const theatreMode = getIsTheatreMode(props.hasTheatreMode, playerContext);\n const shouldUseTheareModeStyle = useTheatreModeStyle(\n props.hasTheatreMode,\n playerContext.mode,\n playerContext.defaultDisplayMode\n );\n\n function toggleTheatreMode(value: boolean) {\n playerContext.playerRef?.current?.toggleTheatreMode?.(value);\n }\n\n const {\n tableOfContentsActiveId,\n setTableOfContentsActiveId,\n controlledId,\n setControlledId,\n tableOfContentsExpanded,\n onToggleTableOfContents\n } = usePlayPageTableOfContent(props.tableOfContentsId, props.hasTheatreMode, theatreMode);\n\n const hasGlance = hasGlanceData(props.clip) && props.featureAccess.canViewGlance;\n\n const { headingRef, headingElements } = useSectionHeadings(hasGlance);\n const items = headingElements.map(ele => {\n return {\n id: ele.id as PlayPageAnchor,\n name: PlayPageUtils.getSectionHeading(\n ele.id as PlayPageAnchor,\n {\n clips: props.clips,\n interactives: props.interactives,\n resources: props.clip.resources?.data,\n isPlayClipPage: true\n }\n )\n };\n });\n\n useTableOfContentsActiveHeading({\n setActiveId: setTableOfContentsActiveId,\n headingElements,\n controlledId,\n setControlledId\n });\n\n useTableOfContentsScroll(headingElements, controlledId);\n\n const isArchived = VideoHelper.isVideoTypeArchived(props.clip);\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\n /**\n * Need to use a ref because if we use state, onExitImmersiveReader will have a stale\n * reference of the state. This is because the state is changed in onLaunchImmersiveReader\n * which is passed in at the same time as onExitImmersiveReader\n */\n const shouldPlayOnExitImmersiveReader = React.useRef(false);\n\n const clipResourceAppLink = getResourceAppLink(\n props.clip.id,\n props.shareId,\n props.featureAccess.canViewResourceItems\n );\n\n useResourcePopup({\n resourcePopupId: props.queryParams?.resourceId,\n resources: props.clip.resources?.data,\n getResourceAppLink: clipResourceAppLink\n });\n\n function onLaunchImmersiveReader(): void {\n shouldPlayOnExitImmersiveReader.current = !playerContext?.playerRef?.current?.isPaused();\n playerContext?.playerRef?.current?.pause();\n }\n\n function onExitImmersiveReader(): void {\n if (!shouldPlayOnExitImmersiveReader.current)\n return;\n\n playerContext?.playerRef?.current?.play();\n }\n\n function canAccessOriginal(): boolean {\n if (!props.clip._parentVideo || !props.clip._canBeConsumed?.value)\n return false;\n\n if (!props.currentUser?.isAuthenticated)\n return false;\n\n if (!props.hasProduct(ProductId.Primary))\n return false;\n\n if (hasStudentExperience)\n return false;\n\n return true;\n }\n\n function getOriginalVideoAppLink(): Core.AppLink {\n if (!canAccessOriginal())\n return null;\n \n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [\n null,\n props.clip._parentVideo.id,\n TextHelper.slugify(props.clip._parentVideo.name)\n ]\n };\n }\n\n const showPlayerPlaceholder = playerContext.mode === 'picture-in-picture' || props.featureAccess.canViewPublicLayout;\n\n const otherClips = props.clips?.filter(c => c.id.toString() !== props.clip.id.toString()) ?? [];\n\n const calcClassNameProps = {\n hasTheatreMode: props.hasTheatreMode,\n shouldShowSideTableOfContents: props.shouldShowSideTableOfContents,\n tableOfContentsExpanded,\n theatreMode\n };\n const mainClassName = getMainClassName(calcClassNameProps);\n const contentClassName = getContentClassName(calcClassNameProps);\n\n const [ , setContainerClassName ] = useViewModel(ViewModelKeys.PLAY_PAGE_CONTAINER_CLASS_NAME);\n\n const resources = getResources(props.clip, hasPermissions(PermissionName.StudentExperience));\n const downloadableResources = resources.filter(MasterTypeHelper.isResource);\n\n function onDownloadClick() {\n if (downloadableResources.length === 1) {\n DownloadHelper.downloadResource(\n downloadableResources[0],\n { clipId: props.clip.id, clipName: props.clip.name },\n { location: LocationContext.PlayClip, actionType: UserAction.Download, entity: EntityType.Resource }\n );\n return;\n }\n \n Core.AppLinkHelper.trigger({\n application: AppChannels.VIDEOS,\n action: Actions.Videos.RESOURCE_DOWNLOAD,\n args: [ props.clip?.id, props.shareId ]\n });\n }\n \n React.useEffect(() => {\n if (!theatreMode) {\n setContainerClassName('');\n } else {\n setContainerClassName(styles.theatreModePlayPageContainer);\n }\n }, [theatreMode]);\n\n React.useEffect(() => {\n return () => setContainerClassName('');\n }, []);\n\n return (\n <div className={`px-4 play-page-sections-container ${props.shouldShowSideTableOfContents ? 'row g-0' : ''}`}>\n <main className={`${styles.main} ${mainClassName}`}>\n {!!props.breadcrumbs?.length && (\n <div className='mb-2'>\n <Breadcrumbs breadcrumbs={props.breadcrumbs} />\n </div>\n )}\n\n <RestrictionBanner\n restrictions={props.clip._restrictions}\n yearGroups={props.commonVideoProps.yearGroups}\n objectId={props.clip.id}\n objectTypeId={MasterType.Clip}\n canManageVideoAccess={props.canManageVideoAccess}\n />\n\n {isArchived && (\n <ArchivedBanner\n typeId={props.clip.typeId}\n hasStudentExperience={hasStudentExperience}\n />\n )}\n\n <section\n id={PlayPageAnchor.Video}\n className={`mb-2 ${SeoConstants.GLOBAL_PLAYER_SELECTOR}`}\n ref={el => { (el && headingRef?.current) && headingRef.current.set(PlayPageAnchor.Video, el); }}\n >\n {canConsume && (\n <GlobalPlayerConsumer\n key={props.clip.id}\n objectId={props.clip.id}\n objectTypeId={props.clip.typeId}\n shareId={props.shareId}\n context={props.queryParams?.context}\n contextId={props.queryParams?.contextId}\n moviesAndTv={props.queryParams?.mtv}\n playNext={props.queryParams?.playNext}\n startTime={props.queryParams?.t ?? props.queryParams?.startTime}\n mode='default'\n location='play-page'\n />\n )}\n\n <div className={showPlayerPlaceholder ? '' : 'd-none'}>\n <PlayerPlaceholder\n video={props.clip}\n type='pip'\n />\n </div>\n </section>\n\n <div className={contentClassName}>\n <div className={shouldUseTheareModeStyle ? `${styles.theatreModeLeftContent}` : 'w-100'}>\n <PlayPageTitleAndActions\n presentationSlug={null}\n media={props.clip}\n yearGroups={props.commonVideoProps.yearGroups}\n audiences={props.audiences}\n originalVideoAppLink={getOriginalVideoAppLink()}\n featureAccess={props.featureAccess}\n shareId={props.shareId}\n showTitlePadlock={!props.commonVideoProps.hasStudentExperience\n && !props.commonVideoProps.hasGuestExperience}\n />\n\n {/* if no glance render video details here */}\n {hasGlance ? (\n <VideoAtAGlanceV2\n video={props.clip}\n pointsOfInterest={props.pointsOfInterest}\n setStartTime={(time: number) => playerContext.playerRef.current?.currentTime(time)}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n canViewGlance={hasGlance}\n />\n ) : (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n getLibraryAppLink={getLibraryAppLink}\n getFolderAppLink={getFolderAppLink}\n />\n )}\n\n <PlayPageResources\n video={props.clip}\n canViewResources={props.featureAccess.canViewResourceItems}\n imageCdnUrl={props.commonVideoProps.imageCdnUrl}\n getAppLink={clipResourceAppLink}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n resourceThumbnailFallbackUrl={ImageUrls.Fallbacks.RESOURCE_THUMBNAIL}\n headingRef={headingRef}\n onDownloadClick={onDownloadClick}\n resources={resources}\n downloadableResources={downloadableResources}\n aboutResourcesAppLink={VideoAppLinkHelper.getAboutResourceAppLink()}\n />\n\n <PlayPageInteractives\n presentationSlug={null}\n video={props.clip}\n interactives={props.interactives}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n canViewInteractives={props.featureAccess.canViewInteractives}\n headingRef={headingRef}\n commonVideoProps={props.commonVideoProps}\n />\n\n <PlayPageClips\n presentationSlug={null}\n clips={otherClips || []}\n video={props.clip}\n canViewClips={props.featureAccess.canViewClips}\n audiences={props.audiences}\n headingRef={headingRef}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n commonVideoProps={props.commonVideoProps}\n />\n\n {/* if has glance, render video details here */}\n {hasGlance && (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n showHeading\n getLibraryAppLink={hasPermissions(PermissionName.ViewLibraries) ? getLibraryAppLink : null}\n getFolderAppLink={hasPermissions(PermissionName.ViewLibraries) ? getFolderAppLink : null}\n />\n )}\n \n {!!canAccessOriginal() && (\n <ClippedFrom\n originalVideo={props.clip._parentVideo}\n shareId={props.shareId}\n queryParams={props.queryParams}\n audiences={props.audiences}\n headingRef={headingRef}\n currentUser={props.currentUser}\n commonVideoProps={props.commonVideoProps}\n />\n )}\n\n {!VideoHelper.isUgc(props.clip._parentVideo) && (\n <CitationWidget\n headingRef={headingRef}\n media={props.clip}\n parentVideo={props.clip._parentVideo}\n contentRegion={props.currentUser.contentRegion}\n shareId={props.shareId}\n presentationSlug={null}\n />\n )}\n\n <RelatedVideos\n presentationSlug={null}\n currentVideo={props.clip}\n relatedVideos={props.relatedVideos}\n currentUser={props.currentUser}\n audiences={props.audiences}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n moviesAndTv={props.queryParams.mtv}\n commonVideoProps={props.commonVideoProps}\n />\n </div>\n {theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={ null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={true}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </div>\n </main>\n\n {!theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={props.hasTheatreMode ? toggleTheatreMode : null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={false}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </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AAY,QAC3B,UAAW,EAAM,YAAY,UAC7B,SAAU,EAAM,YAAY,SAC5B,QAAS,EAAM,QACf,YAAa,EAAM,YAAY,IAC/B,eAAgB,EAAM,aAAa,eACrC,EAAG,IAAI,EACP,YAAa,EAAM,YAAY,IAC/B,iBAAkB,EAAM,gBACzB,CAAA,CACE,IACJ,IACC,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,WAAY,EACZ,cAAe,EACf,kBAAoB,KACb,QACP,SAAU,EACO,kBACjB,cAAe,CAAE,QAAS,EAAM,KAAK,GAAI,UAAW,EAAM,KAAK,IAAK,EACpE,WAAY,EAAM,8BAClB,cAAe,GACf,iBAAkB,EAAM,eACxB,WAAY,EAAM,QAAA,CACnB,CAAA,CAEA,GACD,IAEL,CAAC,IACA,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,WAAY,EACZ,cAAe,EACf,kBAAmB,EAAM,eAAiB,EAAoB,KACvD,QACP,SAAU,EACO,kBACjB,cAAe,CAAE,QAAS,EAAM,KAAK,GAAI,UAAW,EAAM,KAAK,IAAK,EACpE,WAAY,EAAM,8BAClB,cAAe,GACf,iBAAkB,EAAM,eACxB,WAAY,EAAM,QAAA,CACnB,CAAA,CAEA,GAET"}
1
+ {"version":3,"file":"CvilnM0u2.chunk.js","names":[],"sources":["../../src/shared/views/play-clip/components/clipped-from/ClippedFrom.tsx","../../src/shared/views/play-clip/components/play-clip/play-clip.module.scss","../../src/shared/views/play-clip/components/play-clip/PlayClip.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CurrentUser, PresentationAudience, VideoTypes } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nconst namespace = 'shared.playClip';\n\ninterface ClippedFromProps {\n originalVideo: VideoTypes;\n queryParams: PlayViewQueryParams;\n audiences: PresentationAudience[];\n shareId?: string;\n headingRef: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n currentUser: CurrentUser;\n commonVideoProps: CommonVideoProps;\n}\n\nexport function ClippedFrom(props: ClippedFromProps) {\n const { hasPermissions } = usePermissions();\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem, presentationSlug: null });\n\n return (\n <section\n className='play-page-section'\n id={PlayPageAnchor.ClippedFrom}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.ClippedFrom, el);\n }}\n >\n <h2 className='h4 mb-0'><Text namespace={namespace} phrase='clippedFrom' /></h2>\n <VideoActionsContext.Provider value={videoActions}>\n <VideoList\n videos={[props.originalVideo]}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n hasPermissions={hasPermissions}\n presentationAudiences={props.audiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n commonVideoProps={props.commonVideoProps}\n />\n </VideoActionsContext.Provider>\n </section>\n );\n}\n","@import '~styles/utils/include-media';\n:local {\n .main.expandedToc {\n width: calc(100% - 15rem); //minus sidebar toc width and margin\n }\n\n .main.theatreMode {\n width: 100% !important;\n }\n\n .theatreModeContent {\n display: flex;\n margin: auto !important;\n\n @include media('<=xl') {\n max-width: 100%;\n }\n }\n\n .theatreModePlayPageContainer {\n //override TeacherLayoutComponent container style\n @media (min-width: 1200px) {\n max-width: none !important;\n }\n }\n\n .theatreModeLeftContent {\n width: calc(100% - 15rem);\n @include media('<=lg') {\n width: 100%;\n }\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { VideoDetailsWithScrollbarV2 } from 'libs/shared/components/play-page/details/VideoDetailsV2';\nimport { hasGlanceData } from 'libs/shared/components/play-page/glance/VideoAtAGlanceUtilsV2';\nimport { VideoAtAGlanceV2 } from 'libs/shared/components/play-page/glance/VideoAtAGlanceV2';\nimport { getResources, PlayPageResources } from 'libs/shared/components/play-page/resources-widget/PlayPageResources';\nimport { SeoConstants } from 'libs/shared/constants/SeoConstants';\nimport { GlobalPlayerConsumer } from 'libs/shared/context/player-context/components/GlobalPlayerConsumer';\nimport { usePlayerContext } from 'libs/shared/context/player-context/PlayerContext';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { HasProductFunc } from 'libs/shared/hooks/UseProducts';\nimport { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { Clip, CurrentUser, InteractiveMetadata, Link, PointOfInterest, PresentationAudience, Resource } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { DownloadHelper } from 'libs/shared/utils/DownloadHelper';\nimport { MasterTypeHelper } from 'libs/shared/utils/MasterTypeHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { CitationWidget } from 'shared/components/citations/CitationWidget';\nimport { ArchivedBanner } from 'shared/components/play-page/ArchivedBanner';\nimport { PlayPageClips } from 'shared/components/play-page/components/play-page-clips/PlayPageClips';\nimport { PlayPageInteractives } from 'shared/components/play-page/components/play-page-interactives/PlayPageInteractives';\nimport { TableOfContentsContainer, TOC_IGNORE_BOUNDARY } from 'shared/components/play-page/components/table-of-contents/TableOfContents';\nimport { PlayPageTitleAndActions } from 'shared/components/play-page/components/title-and-actions/PlayPageTitleAndActions';\nimport { getFolderAppLink, getLibraryAppLink } from 'shared/components/play-page/PlayPageUtils';\nimport { RestrictionBanner } from 'shared/components/play-page/RestrictionBanner';\nimport { PlayerPlaceholder } from 'shared/components/player-placeholder/PlayerPlaceholder';\nimport { RelatedVideos } from 'shared/components/related-videos/RelatedVideos';\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { ViewModelKeys } from 'shared/constants/LiteViewModels';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { useResourcePopup } from 'shared/views/play/components/play-page/hooks/useResourcePopup';\nimport { getContentClassName, getIsTheatreMode, getMainClassName } from 'shared/views/play/components/play-page/PlayPageUtils';\nimport { usePlayPageTableOfContent } from 'shared/views/play/hooks/usePlayPageTableOfContent';\nimport { useSectionHeadings } from 'shared/views/play/hooks/useSectionHeadings';\nimport { useTheatreModeStyle } from 'shared/views/play/hooks/useTheatreStyle';\nimport { PlayPageUtils } from 'shared/views/play/PlayPageUtil';\nimport { ClippedFrom } from 'shared/views/play-clip/components/clipped-from/ClippedFrom';\n\nimport styles from './play-clip.module.scss';\n\nconst getResourceAppLink = (videoId: string, shareId: string, canViewResource: boolean) =>\n (resource: Resource | Link) => {\n if (!canViewResource) {\n return {\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n };\n }\n\n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PREVIEW_PDF,\n args: [resource.id],\n params: {\n videoId: videoId,\n shareId: shareId\n }\n };\n };\n\ninterface PlayClipProps {\n clip: Clip;\n clips: Clip[];\n interactives: InteractiveMetadata[];\n currentUser: CurrentUser;\n relatedVideos: RelatedVideosHash;\n queryParams: PlayViewQueryParams;\n hasProduct: HasProductFunc;\n audiences: PresentationAudience[];\n shareId?: string;\n canManageVideoAccess: boolean;\n pointsOfInterest?: PointOfInterest[];\n featureAccess: VideoFeaturesHash;\n tableOfContentsId: string;\n shouldShowSideTableOfContents: boolean;\n hasTopicDirectories: boolean;\n hasTheatreMode: boolean;\n breadcrumbs?: Breadcrumb[];\n commonVideoProps: CommonVideoProps;\n}\n\nexport function PlayClip(props: PlayClipProps): JSX.Element {\n const playerContext = usePlayerContext();\n\n const { hasPermissions } = usePermissions();\n const { canConsume } = VideoHelper.getCanBeConsumed(props.clip);\n \n const theatreMode = getIsTheatreMode(props.hasTheatreMode, playerContext);\n const shouldUseTheareModeStyle = useTheatreModeStyle(\n props.hasTheatreMode,\n playerContext.mode,\n playerContext.defaultDisplayMode\n );\n\n function toggleTheatreMode(value: boolean) {\n playerContext.playerRef?.current?.toggleTheatreMode?.(value);\n }\n\n const {\n tableOfContentsActiveId,\n setTableOfContentsActiveId,\n controlledId,\n setControlledId,\n tableOfContentsExpanded,\n onToggleTableOfContents\n } = usePlayPageTableOfContent(props.tableOfContentsId, props.hasTheatreMode, theatreMode);\n\n const hasGlance = hasGlanceData(props.clip) && props.featureAccess.canViewGlance;\n\n const { headingRef, headingElements } = useSectionHeadings(hasGlance);\n const items = headingElements.map(ele => {\n return {\n id: ele.id as PlayPageAnchor,\n name: PlayPageUtils.getSectionHeading(\n ele.id as PlayPageAnchor,\n {\n clips: props.clips,\n interactives: props.interactives,\n resources: props.clip.resources?.data,\n isPlayClipPage: true\n }\n )\n };\n });\n\n useTableOfContentsActiveHeading({\n setActiveId: setTableOfContentsActiveId,\n headingElements,\n controlledId,\n setControlledId\n });\n\n useTableOfContentsScroll(headingElements, controlledId);\n\n const isArchived = VideoHelper.isVideoTypeArchived(props.clip);\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\n /**\n * Need to use a ref because if we use state, onExitImmersiveReader will have a stale\n * reference of the state. This is because the state is changed in onLaunchImmersiveReader\n * which is passed in at the same time as onExitImmersiveReader\n */\n const shouldPlayOnExitImmersiveReader = React.useRef(false);\n\n const clipResourceAppLink = getResourceAppLink(\n props.clip.id,\n props.shareId,\n props.featureAccess.canViewResourceItems\n );\n\n useResourcePopup({\n resourcePopupId: props.queryParams?.resourceId,\n resources: props.clip.resources?.data,\n getResourceAppLink: clipResourceAppLink\n });\n\n function onLaunchImmersiveReader(): void {\n shouldPlayOnExitImmersiveReader.current = !playerContext?.playerRef?.current?.isPaused();\n playerContext?.playerRef?.current?.pause();\n }\n\n function onExitImmersiveReader(): void {\n if (!shouldPlayOnExitImmersiveReader.current)\n return;\n\n playerContext?.playerRef?.current?.play();\n }\n\n function canAccessOriginal(): boolean {\n if (!props.clip._parentVideo || !props.clip._canBeConsumed?.value)\n return false;\n\n if (!props.currentUser?.isAuthenticated)\n return false;\n\n if (!props.hasProduct(ProductId.Primary))\n return false;\n\n if (hasStudentExperience)\n return false;\n\n return true;\n }\n\n function getOriginalVideoAppLink(): Core.AppLink {\n if (!canAccessOriginal())\n return null;\n \n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [\n null,\n props.clip._parentVideo.id,\n TextHelper.slugify(props.clip._parentVideo.name)\n ]\n };\n }\n\n const showPlayerPlaceholder = playerContext.mode === 'picture-in-picture' || props.featureAccess.canViewPublicLayout;\n\n const otherClips = props.clips?.filter(c => c.id.toString() !== props.clip.id.toString()) ?? [];\n\n const calcClassNameProps = {\n hasTheatreMode: props.hasTheatreMode,\n shouldShowSideTableOfContents: props.shouldShowSideTableOfContents,\n tableOfContentsExpanded,\n theatreMode\n };\n const mainClassName = getMainClassName(calcClassNameProps);\n const contentClassName = getContentClassName(calcClassNameProps);\n\n const [ , setContainerClassName ] = useViewModel(ViewModelKeys.PLAY_PAGE_CONTAINER_CLASS_NAME);\n\n const resources = getResources(props.clip, hasPermissions(PermissionName.StudentExperience));\n const downloadableResources = resources.filter(MasterTypeHelper.isResource);\n\n function onDownloadClick() {\n if (downloadableResources.length === 1) {\n DownloadHelper.downloadResource(\n downloadableResources[0],\n { clipId: props.clip.id, clipName: props.clip.name },\n { location: LocationContext.PlayClip, actionType: UserAction.Download, entity: EntityType.Resource }\n );\n return;\n }\n \n Core.AppLinkHelper.trigger({\n application: AppChannels.VIDEOS,\n action: Actions.Videos.RESOURCE_DOWNLOAD,\n args: [ props.clip?.id, props.shareId ]\n });\n }\n \n React.useEffect(() => {\n if (!theatreMode) {\n setContainerClassName('');\n } else {\n setContainerClassName(styles.theatreModePlayPageContainer);\n }\n }, [theatreMode]);\n\n React.useEffect(() => {\n return () => setContainerClassName('');\n }, []);\n\n return (\n <div className={`px-4 play-page-sections-container ${props.shouldShowSideTableOfContents ? 'row g-0' : ''}`}>\n <main className={`${styles.main} ${mainClassName}`}>\n {!!props.breadcrumbs?.length && (\n <div className='mb-2'>\n <Breadcrumbs breadcrumbs={props.breadcrumbs} />\n </div>\n )}\n\n <RestrictionBanner\n restrictions={props.clip._restrictions}\n yearGroups={props.commonVideoProps.yearGroups}\n objectId={props.clip.id}\n objectTypeId={MasterType.Clip}\n canManageVideoAccess={props.canManageVideoAccess}\n />\n\n {isArchived && (\n <ArchivedBanner\n typeId={props.clip.typeId}\n hasStudentExperience={hasStudentExperience}\n />\n )}\n\n <section\n id={PlayPageAnchor.Video}\n className={`mb-2 ${SeoConstants.GLOBAL_PLAYER_SELECTOR}`}\n ref={el => { (el && headingRef?.current) && headingRef.current.set(PlayPageAnchor.Video, el); }}\n >\n {canConsume && (\n <GlobalPlayerConsumer\n key={props.clip.id}\n objectId={props.clip.id}\n objectTypeId={props.clip.typeId}\n shareId={props.shareId}\n context={props.queryParams?.context}\n contextId={props.queryParams?.contextId}\n moviesAndTv={props.queryParams?.mtv}\n playNext={props.queryParams?.playNext}\n startTime={props.queryParams?.t ?? props.queryParams?.startTime}\n mode='default'\n location='play-page'\n />\n )}\n\n <div className={showPlayerPlaceholder ? '' : 'd-none'}>\n <PlayerPlaceholder\n video={props.clip}\n type='pip'\n />\n </div>\n </section>\n\n <div className={contentClassName}>\n <div className={shouldUseTheareModeStyle ? `${styles.theatreModeLeftContent}` : 'w-100'}>\n <PlayPageTitleAndActions\n presentationSlug={null}\n media={props.clip}\n yearGroups={props.commonVideoProps.yearGroups}\n audiences={props.audiences}\n originalVideoAppLink={getOriginalVideoAppLink()}\n featureAccess={props.featureAccess}\n shareId={props.shareId}\n showTitlePadlock={!props.commonVideoProps.hasStudentExperience\n && !props.commonVideoProps.hasGuestExperience}\n />\n\n {/* if no glance render video details here */}\n {hasGlance ? (\n <VideoAtAGlanceV2\n video={props.clip}\n pointsOfInterest={props.pointsOfInterest}\n setStartTime={(time: number) => playerContext.playerRef.current?.currentTime(time)}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n canViewGlance={hasGlance}\n />\n ) : (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n getLibraryAppLink={getLibraryAppLink}\n getFolderAppLink={getFolderAppLink}\n />\n )}\n\n <PlayPageResources\n video={props.clip}\n canViewResources={props.featureAccess.canViewResourceItems}\n imageCdnUrl={props.commonVideoProps.imageCdnUrl}\n getAppLink={clipResourceAppLink}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n resourceThumbnailFallbackUrl={ImageUrls.Fallbacks.RESOURCE_THUMBNAIL}\n headingRef={headingRef}\n onDownloadClick={onDownloadClick}\n resources={resources}\n downloadableResources={downloadableResources}\n aboutResourcesAppLink={VideoAppLinkHelper.getAboutResourceAppLink()}\n />\n\n <PlayPageInteractives\n presentationSlug={null}\n video={props.clip}\n interactives={props.interactives}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n canViewInteractives={props.featureAccess.canViewInteractives}\n headingRef={headingRef}\n commonVideoProps={props.commonVideoProps}\n />\n\n <PlayPageClips\n presentationSlug={null}\n clips={otherClips || []}\n video={props.clip}\n canViewClips={props.featureAccess.canViewClips}\n audiences={props.audiences}\n headingRef={headingRef}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n commonVideoProps={props.commonVideoProps}\n />\n\n {/* if has glance, render video details here */}\n {hasGlance && (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n showHeading\n getLibraryAppLink={hasPermissions(PermissionName.ViewLibraries) ? getLibraryAppLink : null}\n getFolderAppLink={hasPermissions(PermissionName.ViewLibraries) ? getFolderAppLink : null}\n />\n )}\n \n {!!canAccessOriginal() && (\n <ClippedFrom\n originalVideo={props.clip._parentVideo}\n shareId={props.shareId}\n queryParams={props.queryParams}\n audiences={props.audiences}\n headingRef={headingRef}\n currentUser={props.currentUser}\n commonVideoProps={props.commonVideoProps}\n />\n )}\n\n {!VideoHelper.isUgc(props.clip._parentVideo) && (\n <CitationWidget\n headingRef={headingRef}\n media={props.clip}\n parentVideo={props.clip._parentVideo}\n contentRegion={props.currentUser.contentRegion}\n shareId={props.shareId}\n presentationSlug={null}\n />\n )}\n\n <RelatedVideos\n presentationSlug={null}\n currentVideo={props.clip}\n relatedVideos={props.relatedVideos}\n currentUser={props.currentUser}\n audiences={props.audiences}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n moviesAndTv={props.queryParams.mtv}\n commonVideoProps={props.commonVideoProps}\n />\n </div>\n {theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={ null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={true}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </div>\n </main>\n\n {!theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={props.hasTheatreMode ? toggleTheatreMode : null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={false}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOU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EACH,QAAS,EAAM,YAAY,QAC3B,UAAW,EAAM,YAAY,UAC7B,SAAU,EAAM,YAAY,SAC5B,QAAS,EAAM,QACf,YAAa,EAAM,YAAY,IAC/B,eAAgB,EAAM,aAAa,eACrC,EAAG,IAAI,EACP,YAAa,EAAM,YAAY,IAC/B,iBAAkB,EAAM,gBACzB,CAAA,CACE,IACJ,IACC,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,WAAY,EACZ,cAAe,EACf,kBAAoB,KACb,QACP,SAAU,EACO,kBACjB,cAAe,CAAE,QAAS,EAAM,KAAK,GAAI,UAAW,EAAM,KAAK,IAAK,EACpE,WAAY,EAAM,8BAClB,cAAe,GACf,iBAAkB,EAAM,eACxB,WAAY,EAAM,QAAA,CACnB,CAAA,CAEA,GACD,IAEL,CAAC,IACA,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,WAAY,EACZ,cAAe,EACf,kBAAmB,EAAM,eAAiB,EAAoB,KACvD,QACP,SAAU,EACO,kBACjB,cAAe,CAAE,QAAS,EAAM,KAAK,GAAI,UAAW,EAAM,KAAK,IAAK,EACpE,WAAY,EAAM,8BAClB,cAAe,GACf,iBAAkB,EAAM,eACxB,WAAY,EAAM,QAAA,CACnB,CAAA,CAEA,GAET"}
@@ -1,2 +1,2 @@
1
- import"./DAXXjFlN.chunk.js";import{n as e}from"./B785hxeE.chunk.js";import{t}from"./C2w0pmFW.chunk.js";import{t as n}from"./wrLrTezN.chunk.js";import{u as r}from"./BX0wDJmp.chunk.js";import{y as i}from"./NlCAcBdo.chunk.js";import{t as a}from"./xwiwWcv12.chunk.js";import{t as o}from"./CVHQXNzi2.chunk.js";import{t as s}from"./BC8PeYqm.chunk.js";import{t as c}from"./CqrjHjAN.chunk.js";import{t as l}from"./D_gWf2lC.chunk.js";import{t as u}from"./DruDe9vI.chunk.js";import{n as d,t as f}from"./C6-aC3vu.chunk.js";import{n as p,t as m}from"./BGhJ8TEx.chunk.js";import{t as h}from"./7LGxCHGV.chunk.js";import{t as g}from"./B3gsVN-_.chunk.js";import{r as _}from"./D-iyHqNw2.chunk.js";import{n as v,t as y}from"./CdI1ZlaQ.chunk.js";import{t as b}from"./CpKc1O_Y.chunk.js";import{n as x}from"./ChnNWPOK2.chunk.js";import{t as S}from"./C9XBZFiR.chunk.js";import{t as C}from"./BnuuRu_J2.chunk.js";import{t as w}from"./BYaCUOEW2.chunk.js";import{t as T}from"./DNuJUXpr2.chunk.js";import{t as E}from"./DJXt6rKd2.chunk.js";import{n as D,r as O,t as k}from"./CX6c7KRp2.chunk.js";t();var A=n(),j={notFound:v,forbidden:{privacy:b}};function M(e){return e?._parentClip||e?._parentVideo}function N(t){let{hasPermissions:n}=g(),v=r(l.config()),N=r(c.token()),P=r(c.currentUser()),F=r(s.sharedInteractiveMetadata(t.objectId,t.shareId)),I=r(u.getShareObject(t.shareId)),L=r(I.data&&(I.data.objectTypeId===o.Interactive?m.createViewKey(t.shareId,p.Share):m.createViewKey(t.objectId,p.MasterObject,t.shareId))),R=w(),z=r(P.data?.isAuthenticated&&a.yearGroups(P.data.customerId)),B=O(I.data),V=r(B&&F.data&&s.interactive(F.data.interactiveId)),H=r(B&&F.data&&s.videoInteractives(M(F.data).id)),{commonVideoProps:U,hasCommonVideoPropsCompleted:W}=C({locationContext:B?i.PreviewSharedInteractive:i.PlaySharedInteractive}),G=_({video:F.data,context:t.queryParams.context,contextId:t.queryParams.contextId,moviesAndTv:t.queryParams.mtv,currentUser:P.data});S(F,j),h(F,{private:b}),x({id:t.objectId,app:`interactives`,shareId:t.shareId}),T(G.videos??[]),f(d.getInteractiveMetadata({content:F.data}));let K=F.data&&v.hasCompleted&&P.hasCompleted&&(!B||V.hasCompleted)&&I.hasCompleted&&L.hasCompleted&&N.hasCompleted&&W;return B?K?(0,A.jsx)(k,{currentUser:P.data,queryParams:t.queryParams,interactive:F.data,interactives:H.data?.data,isPreviewPreventScrubbingEnabled:V.data.preventScrubbing,audiences:R.data,relatedVideos:G,canManageVideoAccess:n(e.ManageVideoAccess),commonVideoProps:U}):(0,A.jsx)(E,{}):K?(0,A.jsx)(D,{interactive:F.data,currentUser:P.data,config:v.data,audiences:R.data,yearGroups:z.data,queryParams:t.queryParams,viewKey:L.data,relatedVideos:G,shareLink:I.data,startTime:t.queryParams?.t,token:N.data,collectAnonResults:!P.data?.isAuthenticated&&!!y.getAnonUser(t.shareId),commonVideoProps:U}):(0,A.jsx)(A.Fragment,{})}export{N as SharedInteractiveView};
2
- //# sourceMappingURL=AEOAlemi.chunk.js.map
1
+ import"./DAXXjFlN.chunk.js";import{n as e}from"./B785hxeE.chunk.js";import{t}from"./C2w0pmFW.chunk.js";import{t as n}from"./wrLrTezN.chunk.js";import{u as r}from"./BX0wDJmp.chunk.js";import{y as i}from"./NlCAcBdo.chunk.js";import{t as a}from"./xwiwWcv12.chunk.js";import{t as o}from"./CVHQXNzi2.chunk.js";import{t as s}from"./BC8PeYqm.chunk.js";import{t as c}from"./CqrjHjAN.chunk.js";import{t as l}from"./D_gWf2lC.chunk.js";import{t as u}from"./DruDe9vI.chunk.js";import{n as d,t as f}from"./C6-aC3vu.chunk.js";import{n as p,t as m}from"./BGhJ8TEx.chunk.js";import{t as h}from"./7LGxCHGV.chunk.js";import{t as g}from"./B3gsVN-_.chunk.js";import{r as _}from"./CLvImDXv2.chunk.js";import{n as v,t as y}from"./CdI1ZlaQ.chunk.js";import{t as b}from"./CpKc1O_Y.chunk.js";import{n as x}from"./ChnNWPOK2.chunk.js";import{t as S}from"./C9XBZFiR.chunk.js";import{t as C}from"./BnuuRu_J2.chunk.js";import{t as w}from"./BYaCUOEW2.chunk.js";import{t as T}from"./DNuJUXpr2.chunk.js";import{t as E}from"./DJXt6rKd2.chunk.js";import{n as D,r as O,t as k}from"./0mx04bmJ2.chunk.js";t();var A=n(),j={notFound:v,forbidden:{privacy:b}};function M(e){return e?._parentClip||e?._parentVideo}function N(t){let{hasPermissions:n}=g(),v=r(l.config()),N=r(c.token()),P=r(c.currentUser()),F=r(s.sharedInteractiveMetadata(t.objectId,t.shareId)),I=r(u.getShareObject(t.shareId)),L=r(I.data&&(I.data.objectTypeId===o.Interactive?m.createViewKey(t.shareId,p.Share):m.createViewKey(t.objectId,p.MasterObject,t.shareId))),R=w(),z=r(P.data?.isAuthenticated&&a.yearGroups(P.data.customerId)),B=O(I.data),V=r(B&&F.data&&s.interactive(F.data.interactiveId)),H=r(B&&F.data&&s.videoInteractives(M(F.data).id)),{commonVideoProps:U,hasCommonVideoPropsCompleted:W}=C({locationContext:B?i.PreviewSharedInteractive:i.PlaySharedInteractive}),G=_({video:F.data,context:t.queryParams.context,contextId:t.queryParams.contextId,moviesAndTv:t.queryParams.mtv,currentUser:P.data});S(F,j),h(F,{private:b}),x({id:t.objectId,app:`interactives`,shareId:t.shareId}),T(G.videos??[]),f(d.getInteractiveMetadata({content:F.data}));let K=F.data&&v.hasCompleted&&P.hasCompleted&&(!B||V.hasCompleted)&&I.hasCompleted&&L.hasCompleted&&N.hasCompleted&&W;return B?K?(0,A.jsx)(k,{currentUser:P.data,queryParams:t.queryParams,interactive:F.data,interactives:H.data?.data,isPreviewPreventScrubbingEnabled:V.data.preventScrubbing,audiences:R.data,relatedVideos:G,canManageVideoAccess:n(e.ManageVideoAccess),commonVideoProps:U}):(0,A.jsx)(E,{}):K?(0,A.jsx)(D,{interactive:F.data,currentUser:P.data,config:v.data,audiences:R.data,yearGroups:z.data,queryParams:t.queryParams,viewKey:L.data,relatedVideos:G,shareLink:I.data,startTime:t.queryParams?.t,token:N.data,collectAnonResults:!P.data?.isAuthenticated&&!!y.getAnonUser(t.shareId),commonVideoProps:U}):(0,A.jsx)(A.Fragment,{})}export{N as SharedInteractiveView};
2
+ //# sourceMappingURL=Cwocc8uV.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AEOAlemi.chunk.js","names":[],"sources":["../../src/apps/share/views/shared-interactive/SharedInteractiveView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { ShareRequests } from 'libs/shared/apps/share/flight-requests/ShareRequests';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { MediaIdType } from 'libs/shared/enums/MediaIdType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { PlayerRequests } from 'libs/shared/flight-requests/PlayerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useCannotConsumeError } from 'libs/shared/hooks/useCannotConsumeError';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Clip, Config, CurrentUser, Interactive, InteractiveCollection, InteractiveMetadata, PlayerViewKey, UnionShareObject, Video, YearGroup } from 'libs/shared/interfaces';\nimport { AuthToken } from 'libs/shared/interfaces/models/AuthToken';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\nimport { useDeepLinks } from 'shared/hooks/useDeepLinks';\nimport { useGetRelatedVideos } from 'shared/hooks/useGetRelatedVideos';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useShouldPreviewInteractive } from 'shared/hooks/useShouldPreviewInteractive';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\n\nimport { InteractivePartialLoading } from 'apps/interactives/components/interactive-partial-loading/InteractivePartialLoading';\nimport { PlayInteractive } from 'apps/interactives/components/play-interactive/PlayInteractive';\nimport { PreviewInteractive } from 'apps/interactives/components/preview-interactive/PreviewInteractive';\nimport { ShareLinkNotFoundError } from 'apps/share/errors/share-link-not-found/ShareLinkNotFoundError';\nimport { ShareLinkPrivateError } from 'apps/share/errors/share-link-private/ShareLinkPrivateError';\nimport { ShareLinkFilterHelpers } from 'apps/share/filters/share-link-filter/ShareLinkFilterHelpers';\nimport { ShareLinkViewProps } from 'apps/share/interfaces/ShareLinkViewProps';\n\nconst videoErrors = {\n notFound: ShareLinkNotFoundError,\n forbidden: {\n privacy: ShareLinkPrivateError\n }\n};\n\nfunction getSourceVideo(interactive: InteractiveMetadata): Clip | Video {\n return interactive?._parentClip || interactive?._parentVideo;\n}\n\nexport function SharedInteractiveView(props: ShareLinkViewProps): JSX.Element {\n const { hasPermissions } = usePermissions();\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const token = Flight.useBasicFetch<AuthToken>(UserRequests.token());\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const interactiveMetadata = Flight.useBasicFetch<InteractiveMetadata>(\n InteractiveRequests.sharedInteractiveMetadata(props.objectId, props.shareId)\n );\n\n const shareLink = Flight.useBasicFetch<UnionShareObject>(\n ShareRequests.getShareObject(props.shareId)\n );\n\n /**\n * If the shareLink type isn't an interactive, then it's a playlist and needs to be\n * used as context for fetching\n */\n const viewKeyRequest = shareLink.data && (shareLink.data.objectTypeId === MasterType.Interactive ?\n PlayerRequests.createViewKey(props.shareId, MediaIdType.Share) :\n PlayerRequests.createViewKey(props.objectId, MediaIdType.MasterObject, props.shareId));\n const viewKey = Flight.useBasicFetch<PlayerViewKey>(viewKeyRequest);\n const audiences = usePresentationAudiences();\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n\n /**\n * Authenticated staff with Lite product access get the interactive \"Preview\" view instead\n * of the usual play view.\n */\n const shouldPreviewInteractive = useShouldPreviewInteractive(shareLink.data);\n const interactive = Flight.useBasicFetch<Interactive>(\n shouldPreviewInteractive && interactiveMetadata.data &&\n InteractiveRequests.interactive(interactiveMetadata.data.interactiveId)\n );\n const interactives = Flight.useBasicFetch<InteractiveCollection>(\n shouldPreviewInteractive && interactiveMetadata.data &&\n InteractiveRequests.videoInteractives(getSourceVideo(interactiveMetadata.data).id)\n );\n\n const locationContext = shouldPreviewInteractive ?\n LocationContext.PreviewSharedInteractive :\n LocationContext.PlaySharedInteractive;\n const {\n commonVideoProps,\n hasCommonVideoPropsCompleted\n } = useCommonVideoProps({ locationContext });\n\n const relatedVideos = useGetRelatedVideos({\n video: interactiveMetadata.data,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n moviesAndTv: props.queryParams.mtv,\n currentUser: currentUser.data\n });\n\n useHandleObjectError(interactiveMetadata, videoErrors);\n useCannotConsumeError(interactiveMetadata, { private: ShareLinkPrivateError });\n useDeepLinks({ id: props.objectId, app: 'interactives', shareId: props.shareId });\n useVideoMixin(relatedVideos.videos ?? []);\n useSetPageMetadata(PageMetadataHelper.getInteractiveMetadata({ content: interactiveMetadata.data }));\n\n const hasLoaded = (\n interactiveMetadata.data &&\n config.hasCompleted &&\n currentUser.hasCompleted &&\n (!shouldPreviewInteractive || interactive.hasCompleted) &&\n shareLink.hasCompleted &&\n viewKey.hasCompleted &&\n token.hasCompleted &&\n hasCommonVideoPropsCompleted\n );\n\n if (shouldPreviewInteractive) {\n // For staff, the interactive is previewed\n if (!hasLoaded)\n return <InteractivePartialLoading />;\n\n return (\n <PreviewInteractive\n currentUser={currentUser.data}\n queryParams={props.queryParams}\n interactive={interactiveMetadata.data}\n interactives={interactives.data?.data}\n isPreviewPreventScrubbingEnabled={interactive.data.preventScrubbing}\n audiences={audiences.data}\n relatedVideos={relatedVideos}\n canManageVideoAccess={hasPermissions(PermissionName.ManageVideoAccess)}\n commonVideoProps={commonVideoProps}\n />\n );\n }\n\n if (!hasLoaded)\n return <></>;\n\n return (\n <PlayInteractive\n interactive={interactiveMetadata.data}\n currentUser={currentUser.data}\n config={config.data}\n audiences={audiences.data}\n yearGroups={yearGroups.data}\n queryParams={props.queryParams}\n viewKey={viewKey.data}\n relatedVideos={relatedVideos}\n shareLink={shareLink.data}\n startTime={props.queryParams?.t}\n token={token.data}\n collectAnonResults={!currentUser.data?.isAuthenticated && !!ShareLinkFilterHelpers.getAnonUser(props.shareId)}\n commonVideoProps={commonVideoProps}\n />\n );\n}\n"],"mappings":"yjCAsCM,EAAc,CAClB,SAAU,EACV,UAAW,CACT,QAAS,CACX,CACF,EAEA,SAAS,EAAe,EAAgD,CACtE,OAAO,GAAa,aAAe,GAAa,YAClD,CAEA,SAAgB,EAAsB,EAAwC,CAC5E,GAAM,CAAE,kBAAmB,EAAe,EAEpC,EAAS,EAA6B,EAAe,OAAO,CAAC,EAC7D,EAAQ,EAAgC,EAAa,MAAM,CAAC,EAE5D,EAAc,EAAkC,EAAa,YAAY,CAAC,EAC1E,EAAsB,EAC1B,EAAoB,0BAA0B,EAAM,SAAU,EAAM,OAAO,CAC7E,EAEM,EAAY,EAChB,EAAc,eAAe,EAAM,OAAO,CAC5C,EASM,EAAU,EAHO,EAAU,OAAS,EAAU,KAAK,eAAiB,EAAW,YACnF,EAAe,cAAc,EAAM,QAAS,EAAY,KAAK,EAC7D,EAAe,cAAc,EAAM,SAAU,EAAY,aAAc,EAAM,OAAO,EACpB,EAC5D,EAAY,EAAyB,EACrC,EAAa,EACjB,EAAY,MAAM,iBAAmB,EAAiB,WAAW,EAAY,KAAK,UAAU,CAC9F,EAMM,EAA2B,EAA4B,EAAU,IAAI,EACrE,EAAc,EAClB,GAA4B,EAAoB,MAChD,EAAoB,YAAY,EAAoB,KAAK,aAAa,CACxE,EACM,EAAe,EACnB,GAA4B,EAAoB,MAChD,EAAoB,kBAAkB,EAAe,EAAoB,IAAI,CAAC,CAAC,EAAE,CACnF,EAKM,CACJ,mBACA,gCACE,EAAoB,CAAE,gBANF,EACtB,EAAgB,yBAChB,EAAgB,qBAIwB,CAAC,EAErC,EAAgB,EAAoB,CACxC,MAAO,EAAoB,KAC3B,QAAS,EAAM,YAAY,QAC3B,UAAW,EAAM,YAAY,UAC7B,YAAa,EAAM,YAAY,IAC/B,YAAa,EAAY,IAC3B,CAAC,EAED,EAAqB,EAAqB,CAAW,EACrD,EAAsB,EAAqB,CAAE,QAAS,CAAsB,CAAC,EAC7E,EAAa,CAAE,GAAI,EAAM,SAAU,IAAK,eAAgB,QAAS,EAAM,OAAQ,CAAC,EAChF,EAAc,EAAc,QAAU,CAAC,CAAC,EACxC,EAAmB,EAAmB,uBAAuB,CAAE,QAAS,EAAoB,IAAK,CAAC,CAAC,EAEnG,IAAM,EACJ,EAAoB,MACpB,EAAO,cACP,EAAY,eACX,CAAC,GAA4B,EAAY,eAC1C,EAAU,cACV,EAAQ,cACR,EAAM,cACN,EA0BF,OAvBI,EAEG,GAIH,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,YAAa,EAAY,KACzB,YAAa,EAAM,YACnB,YAAa,EAAoB,KACjC,aAAc,EAAa,MAAM,KACjC,iCAAkC,EAAY,KAAK,iBACnD,UAAW,EAAU,KACN,gBACf,qBAAsB,EAAe,EAAe,iBAAiB,EACnD,kBACnB,CAAA,GAbM,EAAA,EAAA,IAAA,CAAC,EAAD,CAA4B,CAAA,EAiBlC,GAIH,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,YAAa,EAAoB,KACjC,YAAa,EAAY,KACzB,OAAQ,EAAO,KACf,UAAW,EAAU,KACrB,WAAY,EAAW,KACvB,YAAa,EAAM,YACnB,QAAS,EAAQ,KACF,gBACf,UAAW,EAAU,KACrB,UAAW,EAAM,aAAa,EAC9B,MAAO,EAAM,KACb,mBAAoB,CAAC,EAAY,MAAM,iBAAmB,CAAC,CAAC,EAAuB,YAAY,EAAM,OAAO,EAC1F,kBACnB,CAAA,GAjBM,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CAmBf"}
1
+ {"version":3,"file":"Cwocc8uV.chunk.js","names":[],"sources":["../../src/apps/share/views/shared-interactive/SharedInteractiveView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { ShareRequests } from 'libs/shared/apps/share/flight-requests/ShareRequests';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { MediaIdType } from 'libs/shared/enums/MediaIdType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { PlayerRequests } from 'libs/shared/flight-requests/PlayerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useCannotConsumeError } from 'libs/shared/hooks/useCannotConsumeError';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Clip, Config, CurrentUser, Interactive, InteractiveCollection, InteractiveMetadata, PlayerViewKey, UnionShareObject, Video, YearGroup } from 'libs/shared/interfaces';\nimport { AuthToken } from 'libs/shared/interfaces/models/AuthToken';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\nimport { useDeepLinks } from 'shared/hooks/useDeepLinks';\nimport { useGetRelatedVideos } from 'shared/hooks/useGetRelatedVideos';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useShouldPreviewInteractive } from 'shared/hooks/useShouldPreviewInteractive';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\n\nimport { InteractivePartialLoading } from 'apps/interactives/components/interactive-partial-loading/InteractivePartialLoading';\nimport { PlayInteractive } from 'apps/interactives/components/play-interactive/PlayInteractive';\nimport { PreviewInteractive } from 'apps/interactives/components/preview-interactive/PreviewInteractive';\nimport { ShareLinkNotFoundError } from 'apps/share/errors/share-link-not-found/ShareLinkNotFoundError';\nimport { ShareLinkPrivateError } from 'apps/share/errors/share-link-private/ShareLinkPrivateError';\nimport { ShareLinkFilterHelpers } from 'apps/share/filters/share-link-filter/ShareLinkFilterHelpers';\nimport { ShareLinkViewProps } from 'apps/share/interfaces/ShareLinkViewProps';\n\nconst videoErrors = {\n notFound: ShareLinkNotFoundError,\n forbidden: {\n privacy: ShareLinkPrivateError\n }\n};\n\nfunction getSourceVideo(interactive: InteractiveMetadata): Clip | Video {\n return interactive?._parentClip || interactive?._parentVideo;\n}\n\nexport function SharedInteractiveView(props: ShareLinkViewProps): JSX.Element {\n const { hasPermissions } = usePermissions();\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const token = Flight.useBasicFetch<AuthToken>(UserRequests.token());\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const interactiveMetadata = Flight.useBasicFetch<InteractiveMetadata>(\n InteractiveRequests.sharedInteractiveMetadata(props.objectId, props.shareId)\n );\n\n const shareLink = Flight.useBasicFetch<UnionShareObject>(\n ShareRequests.getShareObject(props.shareId)\n );\n\n /**\n * If the shareLink type isn't an interactive, then it's a playlist and needs to be\n * used as context for fetching\n */\n const viewKeyRequest = shareLink.data && (shareLink.data.objectTypeId === MasterType.Interactive ?\n PlayerRequests.createViewKey(props.shareId, MediaIdType.Share) :\n PlayerRequests.createViewKey(props.objectId, MediaIdType.MasterObject, props.shareId));\n const viewKey = Flight.useBasicFetch<PlayerViewKey>(viewKeyRequest);\n const audiences = usePresentationAudiences();\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n\n /**\n * Authenticated staff with Lite product access get the interactive \"Preview\" view instead\n * of the usual play view.\n */\n const shouldPreviewInteractive = useShouldPreviewInteractive(shareLink.data);\n const interactive = Flight.useBasicFetch<Interactive>(\n shouldPreviewInteractive && interactiveMetadata.data &&\n InteractiveRequests.interactive(interactiveMetadata.data.interactiveId)\n );\n const interactives = Flight.useBasicFetch<InteractiveCollection>(\n shouldPreviewInteractive && interactiveMetadata.data &&\n InteractiveRequests.videoInteractives(getSourceVideo(interactiveMetadata.data).id)\n );\n\n const locationContext = shouldPreviewInteractive ?\n LocationContext.PreviewSharedInteractive :\n LocationContext.PlaySharedInteractive;\n const {\n commonVideoProps,\n hasCommonVideoPropsCompleted\n } = useCommonVideoProps({ locationContext });\n\n const relatedVideos = useGetRelatedVideos({\n video: interactiveMetadata.data,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n moviesAndTv: props.queryParams.mtv,\n currentUser: currentUser.data\n });\n\n useHandleObjectError(interactiveMetadata, videoErrors);\n useCannotConsumeError(interactiveMetadata, { private: ShareLinkPrivateError });\n useDeepLinks({ id: props.objectId, app: 'interactives', shareId: props.shareId });\n useVideoMixin(relatedVideos.videos ?? []);\n useSetPageMetadata(PageMetadataHelper.getInteractiveMetadata({ content: interactiveMetadata.data }));\n\n const hasLoaded = (\n interactiveMetadata.data &&\n config.hasCompleted &&\n currentUser.hasCompleted &&\n (!shouldPreviewInteractive || interactive.hasCompleted) &&\n shareLink.hasCompleted &&\n viewKey.hasCompleted &&\n token.hasCompleted &&\n hasCommonVideoPropsCompleted\n );\n\n if (shouldPreviewInteractive) {\n // For staff, the interactive is previewed\n if (!hasLoaded)\n return <InteractivePartialLoading />;\n\n return (\n <PreviewInteractive\n currentUser={currentUser.data}\n queryParams={props.queryParams}\n interactive={interactiveMetadata.data}\n interactives={interactives.data?.data}\n isPreviewPreventScrubbingEnabled={interactive.data.preventScrubbing}\n audiences={audiences.data}\n relatedVideos={relatedVideos}\n canManageVideoAccess={hasPermissions(PermissionName.ManageVideoAccess)}\n commonVideoProps={commonVideoProps}\n />\n );\n }\n\n if (!hasLoaded)\n return <></>;\n\n return (\n <PlayInteractive\n interactive={interactiveMetadata.data}\n currentUser={currentUser.data}\n config={config.data}\n audiences={audiences.data}\n yearGroups={yearGroups.data}\n queryParams={props.queryParams}\n viewKey={viewKey.data}\n relatedVideos={relatedVideos}\n shareLink={shareLink.data}\n startTime={props.queryParams?.t}\n token={token.data}\n collectAnonResults={!currentUser.data?.isAuthenticated && !!ShareLinkFilterHelpers.getAnonUser(props.shareId)}\n commonVideoProps={commonVideoProps}\n />\n );\n}\n"],"mappings":"yjCAsCM,EAAc,CAClB,SAAU,EACV,UAAW,CACT,QAAS,CACX,CACF,EAEA,SAAS,EAAe,EAAgD,CACtE,OAAO,GAAa,aAAe,GAAa,YAClD,CAEA,SAAgB,EAAsB,EAAwC,CAC5E,GAAM,CAAE,kBAAmB,EAAe,EAEpC,EAAS,EAA6B,EAAe,OAAO,CAAC,EAC7D,EAAQ,EAAgC,EAAa,MAAM,CAAC,EAE5D,EAAc,EAAkC,EAAa,YAAY,CAAC,EAC1E,EAAsB,EAC1B,EAAoB,0BAA0B,EAAM,SAAU,EAAM,OAAO,CAC7E,EAEM,EAAY,EAChB,EAAc,eAAe,EAAM,OAAO,CAC5C,EASM,EAAU,EAHO,EAAU,OAAS,EAAU,KAAK,eAAiB,EAAW,YACnF,EAAe,cAAc,EAAM,QAAS,EAAY,KAAK,EAC7D,EAAe,cAAc,EAAM,SAAU,EAAY,aAAc,EAAM,OAAO,EACpB,EAC5D,EAAY,EAAyB,EACrC,EAAa,EACjB,EAAY,MAAM,iBAAmB,EAAiB,WAAW,EAAY,KAAK,UAAU,CAC9F,EAMM,EAA2B,EAA4B,EAAU,IAAI,EACrE,EAAc,EAClB,GAA4B,EAAoB,MAChD,EAAoB,YAAY,EAAoB,KAAK,aAAa,CACxE,EACM,EAAe,EACnB,GAA4B,EAAoB,MAChD,EAAoB,kBAAkB,EAAe,EAAoB,IAAI,CAAC,CAAC,EAAE,CACnF,EAKM,CACJ,mBACA,gCACE,EAAoB,CAAE,gBANF,EACtB,EAAgB,yBAChB,EAAgB,qBAIwB,CAAC,EAErC,EAAgB,EAAoB,CACxC,MAAO,EAAoB,KAC3B,QAAS,EAAM,YAAY,QAC3B,UAAW,EAA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"./DFZS3Ffo.chunk.js";import{t as i}from"./CQyJ7YGa.chunk.js";import{t as a}from"./e57H3T-k.chunk.js";import{t as o}from"./C2w0pmFW.chunk.js";import{t as s}from"./wrLrTezN.chunk.js";import{t as c}from"./BXTI9cmX.chunk.js";import{t as l}from"./CjA4Q5pm.chunk.js";import{N as u,U as d,a as f,l as p,y as m,z as h}from"./NlCAcBdo.chunk.js";import{t as g}from"./BxbRBSiP.chunk.js";import{i as _,t as v}from"./BMKh-xhT2.chunk.js";import{t as y}from"./BrbeV-Gn2.chunk.js";import{t as b}from"./eoAypzU3.chunk.js";import{t as x}from"./_GCZ-60i.chunk.js";import{n as ee}from"./BRcHS92O2.chunk.js";import{t as te}from"./Bs2PKr1I2.chunk.js";import{t as ne}from"./DpCWroEe2.chunk.js";import{t as re}from"./Bbp2U9GK.chunk.js";import{t as S}from"./CduNFx13.chunk.js";import{t as C}from"./CMHxOVI7.chunk.js";import{t as w}from"./BUnh3rN0.chunk.js";import{i as ie}from"./C6-aC3vu.chunk.js";import{t as ae}from"./rVRhgtHY2.chunk.js";import{n as T,t as oe}from"./CpFtf-tI2.chunk.js";import{n as se}from"./BJUbYu222.chunk.js";import{t as ce}from"./DW24qN_e2.chunk.js";import{t as le}from"./5ONJSThP.chunk.js";import{t as ue}from"./jAbfamoi.chunk.js";import{t as de}from"./BzbZUZa-2.chunk.js";import{n as E,t as D}from"./D2-L8f1x2.chunk.js";import{t as O}from"./DsBWAM3I2.chunk.js";import{t as fe}from"./Z4RlHaVG.chunk.js";import{t as pe}from"./9kh0Xx2n2.chunk.js";import{c as me,i as he,n as ge,o as _e,s as ve,t as ye}from"./BOJK8LI1.chunk.js";import{t as be}from"./tnBD84bg2.chunk.js";import{t as xe}from"./DELN_PAD2.chunk.js";import{t as Se}from"./_42F7SIA2.chunk.js";import{t as Ce}from"./DzgAvoez.chunk.js";import{t as k}from"./OtQaFdir.chunk.js";import{t as A}from"./Dopg0SXC.chunk.js";import{n as we,t as Te}from"./CvtZ8ZFA2.chunk.js";import{n as j,t as Ee}from"./B5XaBzZh.chunk.js";import{t as M}from"./BPavmm8c.chunk.js";import{t as De}from"./IqGr9V7u2.chunk.js";import{r as Oe}from"./Bf9r1ZoF2.chunk.js";import{t as ke}from"./7I0L5W4N2.chunk.js";import{n as N,r as P,t as Ae}from"./DusJhHeW2.chunk.js";import{t as F}from"./CLjADRa42.chunk.js";import{t as je}from"./BgOLbASl2.chunk.js";var I=e(o()),L=s(),R=ue();function z(){let e=le();return e.lg||e.xl||e.xxl}var B={copyrightDisclaimer:`_copyrightDisclaimer_yyjul_1`,overlayContainer:`_overlayContainer_yyjul_4`},V=`shared.copyrightDisclaimer`,Me=150;function Ne(e){let[n,r]=se({});function i(){return document.documentElement.clientHeight-n.current?.getBoundingClientRect().bottom<Me}return(0,L.jsxs)(`div`,{ref:n,className:e.className,children:[(0,L.jsx)(`p`,{className:`${B.copyrightDisclaimer} ${e.phraseClassName??`mb-1`}`,children:(0,L.jsx)(T,{namespace:V,phrase:`copyrightDisclaimer`})}),(0,L.jsx)(t,{target:n.current,show:r,placement:e.overflowPlacement&&i()?e.overflowPlacement:e.placement,children:(0,L.jsxs)(`div`,{className:`${B.overlayContainer} mw-100 bg-white border rounded-3 p-2`,children:[(0,L.jsx)(`p`,{children:(0,L.jsx)(T,{namespace:V,phrase:`warning`})}),(0,L.jsx)(`p`,{className:`fw-semibold mb-0`,children:(0,L.jsx)(T,{namespace:V,phrase:`sharing`})})]})})]})}function Pe(e){return(0,L.jsx)(ke,{lines:12,children:()=>(0,L.jsx)(`p`,{className:`mb-0`,dangerouslySetInnerHTML:{__html:a.sanitize(be.linkifyText(e.video.description,{nl2br:!0}))}})})}var Fe={descriptionBorder:`_descriptionBorder_any0w_2`},H=`shared.videoDetailsV2`,U=i.encloseNamespace(H);function W(e){let{label:t,items:n,className:r}=e;return n&&n.data&&n.data.length?typeof e.getItemAppLink==`function`?(0,L.jsxs)(`div`,{className:r,children:[(0,L.jsxs)(`span`,{children:[t,`: `]}),n.data.map((t,r)=>(0,L.jsxs)(I.Fragment,{children:[(0,L.jsx)(S,{appLink:e.getItemAppLink(t),children:t.name?.trim()},t.id),r<n.data.length-1&&(0,L.jsx)(`span`,{children:`, `})]},t.id))]}):(0,L.jsxs)(`div`,{className:r,children:[t,`: `,n.data.map(e=>e.name?.trim()).join(`, `)]}):(0,L.jsx)(L.Fragment,{})}function Ie(e){let t=e.categories?.data;return t?.length?t.filter(e=>e.libraries?.data?.[0]?.type===ce.CustomLibrary).map(e=>({library:e.libraries?.data?.[0],category:e})):[]}function Le(e){return[{name:e.pair.library.name,appLink:e.getLibraryAppLink?.(e.pair.library)},{name:`...`},{name:e.pair.category.name,appLink:e.getFolderAppLink?.(e.pair.library,e.pair.category)}]}function Re(e){let{video:t}=e;if(!y.isVideo(t)&&!y.isClip(t))return(0,L.jsx)(L.Fragment,{});let n=y.getParentVideo(t),r=Ie(t);function i(t){if(!(!t.partnerProfiles||!t.partnerProfiles?.data?.length)){if(t.partnerProfiles?.count>1&&typeof e.getPartnerDashboardHubAppLink==`function`)return e.getPartnerDashboardHubAppLink(t);if(typeof e.getPartnerProfileAppLink==`function`)return e.getPartnerProfileAppLink(t.partnerProfiles?.data?.[0])}}return(0,L.jsxs)(`div`,{className:t.description?`col-md-5 ps-md-3 pt-3 pt-md-0`:`col-12`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`details`})}),!!n.productionYear&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`productionYear`,options:{year:n.productionYear}})}),(0,L.jsx)(W,{label:U(`productionCompanies`,{smartCount:n.productionCompanies?.data?.length}),items:n.productionCompanies,getItemAppLink:i,className:`mb-1`}),(0,L.jsx)(W,{label:U(`distributors`,{smartCount:n.distributors?.data?.length}),items:n.distributors,getItemAppLink:i,className:`mb-1`}),(0,L.jsx)(W,{label:U(`producers`,{smartCount:n.producers?.data?.length}),items:n.producers,className:`mb-1`}),(0,L.jsx)(W,{label:U(`directors`,{smartCount:n.directors?.data?.length}),items:n.directors,className:`mb-1`}),!!n.dateBroadcast&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`dateBroadcast`,options:{date:l.format(n.dateBroadcast,`DD/MM/YYYY`)}})}),!!n.channel&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`channel`,options:{channel:n.channel.name}})}),y.canViewUploadDate(e.video)&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`dateUploaded`,options:{date:l.format(t.dateCreated,`DD/MM/YYYY`)}})}),!!(r.length&&e.getLibraryAppLink&&e.getFolderAppLink)&&(0,L.jsxs)(`div`,{className:`mb-1`,children:[(0,L.jsxs)(`div`,{children:[U(`libraries`,{smartCount:r.length}),`:`]}),r.map((t,n)=>(0,L.jsx)(`div`,{children:(0,L.jsx)(Ce,{breadcrumbs:Le({pair:t,getLibraryAppLink:e.getLibraryAppLink,getFolderAppLink:e.getFolderAppLink}),linkClassName:`text-info`})},n))]})]})}function ze(e){let{video:t,maxHeight:n=368}=e,r=y.getParentVideo(t),i=!!e.video.description,a=Ae(e.video)||!!r.productionYear||!!r.dateBroadcast||!!r.channel||y.canViewUploadDate(e.video);if(!i&&!a)return(0,L.jsx)(L.Fragment,{});function o(){return e.hideTags||y.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags?.data?.filter(e=>e.tagType===g.Normal)}let s=o();return(0,L.jsx)(oe.Provider,{value:H,children:(0,L.jsxs)(`section`,{id:M.VideoDetails,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.VideoDetails,t)},className:`play-page-section`,children:[e.showHeading&&(0,L.jsx)(Se,{name:U(`heading`)}),(0,L.jsx)(`div`,{className:`rounded border p-3 position-relative`,children:(0,L.jsxs)(R.Scrollbars,{autoHeight:!0,autoHeightMax:n,hideTracksWhenNotNeeded:!0,children:[(0,L.jsxs)(`div`,{className:`row g-0`,children:[i&&(0,L.jsxs)(`div`,{className:a?`${Fe.descriptionBorder} pe-3 col-md-7`:`col-12`,children:[(0,L.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`description`})}),(0,L.jsx)(De,{text:t.description,title:t.name,className:`ps-2`,onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:m.PlayPage,entity:p.Video,actionType:h.Click,descriptor:f.LaunchImmersiveReader},analyticsData:{id:t.id,type:`description`}})]}),(0,L.jsx)(Pe,{video:e.video})]}),a&&(0,L.jsx)(Re,{...e})]}),!!s?.length&&(0,L.jsxs)(`div`,{className:`mt-3`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`normalTags`})}),(0,L.jsx)(N,{tags:s,...P.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity),className:`mt-1`})]}),y.isBroadcast(e.video)&&(0,L.jsx)(Ne,{placement:`bottom-start`,className:`d-flex justify-content-start mt-2`,phraseClassName:`mb-0`,overflowPlacement:`top-start`})]})})]})})}function G(e,t,n,r){let i=()=>{F.unsubscribe(e,t)};return(0,I.useEffect)(()=>{if(r)return n?F.subscribeOnce(e,t):F.subscribe(e,t),()=>{i()}},[]),i}var K={learningIntention:`_learningIntention_lm8nf_1`,highlightPoi:`_highlightPoi_lm8nf_7`,icon:`_icon_lm8nf_10`},Be=/\[\]\(cv:\/\/poi\?id=\d+\)\n*/g;function Ve(e){return e.replace(Be,``)}function He(e){return ie(Ve(e.content),{async:!1})}function Ue(e,t){let[n,r]=(0,I.useState)(``);return(0,I.useEffect)(()=>{if(!t||!e.glance?.content)return;let n=He(e.glance);r(n)},[e.glance?.content,t]),n}function We(e){return e.glance?.content&&e.glance?.format===`text/markdown`}function Ge(e,t){let n=(0,I.useRef)(null);G(`player:poi:mouseover`,r,null,t),G(`player:poi:mouseleave`,i,null,t),(0,I.useEffect)(()=>{if(!(!n.current||!t))return n.current?.addEventListener(`mouseover`,a),n.current?.addEventListener(`mouseleave`,o),()=>{n.current?.removeEventListener(`mouseover`,a),n.current?.removeEventListener(`mouseleave`,o)}},[n.current]);function r(t){!t?.id||e?.id?.toString()!==t?.id?.toString()||n.current?.classList.add(K.highlightPoi)}function i(){n.current?.classList.remove(K.highlightPoi)}function a(){e&&F.trigger(`glance:poi:mouseover`,e)}function o(){F.trigger(`glance:poi:mouseleave`)}return n}var q={poiEntry:`_poiEntry_1bne8_1`,poiText:`_poiText_1bne8_5`,public:`_public_1bne8_5`,poiTimeStamp:`_poiTimeStamp_1bne8_14`,wideBadge:`_wideBadge_1bne8_18`};function Ke(e){let t=O.ToDisplayDuration(e.poi.startTime*1e3),n=Ge(e.poi,!e.suppressInteractivity);return e.suppressInteractivity?(0,L.jsxs)(`div`,{className:`d-flex ${q.poiEntry} mb-2`,children:[(0,L.jsx)(`span`,{className:`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${q.poiTimeStamp} ${e.wideBadge?q.wideBadge:``}`,children:t}),(0,L.jsx)(`div`,{className:`${q.public} ms-2`,children:e.poi.description})]}):(0,L.jsxs)(re,{className:`d-flex ${q.poiEntry} mb-2 cursor-pointer`,onClick:()=>e.onClickPoiItem(e.poi.startTime),ref:n,children:[(0,L.jsx)(`div`,{className:`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${q.poiTimeStamp} ${e.wideBadge?q.wideBadge:``}`,children:t}),(0,L.jsx)(`div`,{className:`ms-2 ${q.poiText}`,children:e.poi.description})]},e.poi.startTime)}var qe=`shared.pointsOfInterestList`;function Je(e){let t=e.pointsOfInterest.sort((e,t)=>e.startTime-t.startTime),n=t.some(e=>e.startTime>=3600);return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`h6 my-2`,children:(0,L.jsx)(T,{namespace:qe,phrase:`heading`})}),(0,L.jsx)(`div`,{children:t.map(t=>(0,L.jsx)(Ke,{poi:t,suppressInteractivity:e.suppressInteractivity,onClickPoiItem:e.onClickPoiItem,wideBadge:n},t.startTime))})]})}var Ye=`shared.videoAtAGlanceV2`,Xe=365;function Ze(e){return e.hideScrollbar?(0,L.jsx)(L.Fragment,{children:e.children}):(0,L.jsx)(`div`,{className:`rounded border mb-4 bg-white`,children:(0,L.jsx)(R.Scrollbars,{autoHeight:!0,autoHeightMax:Xe,children:(0,L.jsx)(`div`,{className:`px-3 pt-3 pb-2`,children:e.children})})})}function Qe(e){let t=Ue(e.video,e.canViewGlance),[n,r]=I.useState(``);function i(){let t={id:e.video.glance.id,name:e.video.glance.name,videoId:e.video.id,videoName:e.video.name,learningIntention:n},r={actionType:h.Copy,entity:p.Glance,location:m.PlayPage};x.logUserAction(t,r)}function o(){return y.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags?.data?.filter(e=>e.tagType===g.Pedagogy||e.tagType===g.Skill)}let s=o(),c=I.useRef(null);if(I.useEffect(()=>{c.current?.innerText&&r(c.current.innerText)},[c.current?.innerText]),!e.canViewGlance)return(0,L.jsx)(L.Fragment,{});function l(t){e.setStartTime(t)}return(0,L.jsx)(`section`,{className:`play-page-section`,children:(0,L.jsxs)(Ze,{hideScrollbar:e.hideScrollbar,children:[(0,L.jsx)(`h2`,{className:`h6 mb-2`,children:(0,L.jsx)(T,{namespace:Ye,phrase:`learningIntention`})}),(0,L.jsxs)(`div`,{className:`mb-3 ${K.learningIntention}`,children:[(0,L.jsx)(Ee,{copyableContent:n,tooltipClassName:K.icon,onClick:i,visible:!0}),(0,L.jsx)(`div`,{dangerouslySetInnerHTML:{__html:a.sanitize(t)},className:`d-inline`,ref:c})]}),!!s?.length&&(0,L.jsx)(`div`,{children:(0,L.jsx)(N,{tags:s,...P.getTagActionProps(e.getTagAppLink,e.onClickTag,e.suppressInteractivity),className:`mt-2`})}),!!e.pointsOfInterest?.length&&(0,L.jsx)(`div`,{className:`mt-3`,children:(0,L.jsx)(Je,{pointsOfInterest:e.pointsOfInterest,suppressInteractivity:e.suppressInteractivity,onClickPoiItem:l})})]})})}var $e=I.memo(function(e){let{data:t,thumbnailSize:n,preloadImage:r,getAppLink:i}=e,a=A(t.subjectPresentationAudiences?.data,e.audiences);return(0,L.jsxs)(`div`,{className:`flex-shrink-0 px-1 col-6 col-sm-4`,children:[(0,L.jsx)(ye,{type:`static`,textPosition:ge.Independent,video:t,appLink:i(t),imageOptions:{size:n},preload:r,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,audience:a,hideDuration:!1,commonVideoProps:e.commonVideoProps}),(0,L.jsx)(`div`,{className:`mt-2`,children:(0,L.jsx)(he,{...e,video:t,appLink:e.getAppLink(t)})})]})}),et=`shared.playPageClips`;function tt(e){if(!e.canViewClips||!e.clips?.length)return(0,L.jsx)(L.Fragment,{});let t=y.isVideo(e.video);function n(){return y.isVideo(e.video)?{action:b.Videos.VIDEO_CLIPS,application:c.VIDEOS,args:[e.presentationSlug,e.video.id,a.slugify(e.video.name)]}:{action:b.Clips.CLIP_CLIPS,application:c.CLIPS,args:[e.video.id,a.slugify(e.video.name)]}}let r=i.getPhrase(et,t?`clips`:`otherClips`,{count:e.clips.length});return(0,L.jsx)(`section`,{className:`play-page-section`,id:M.Clips,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.Clips,t)},children:(0,L.jsx)(v,{name:r,contents:_.ClipsV2,collection:e.clips,prefetched:!0,getChildAppLink:e=>({application:c.CLIPS,action:b.Clips.PLAY_CLIP,args:[e.id,a.slugify(e.name)]}),appLink:n(),childComponent:$e,extraChildComponentProps:{audiences:e.audiences,showOwner:!0,commonVideoProps:e.commonVideoProps},analyticsData:e.analyticsData})})}var nt=`shared.playPageInteractives`;function rt(e){if(!e.canViewInteractives||!e.interactives?.length)return(0,L.jsx)(L.Fragment,{});function t(){return y.isVideo(e.video)?{action:b.Videos.VIDEO_INTERACTIVES,application:c.VIDEOS,args:[e.presentationSlug,e.video.id,a.slugify(e.video.name)]}:{action:b.Clips.CLIP_INTERACTIVES,application:c.CLIPS,args:[e.video.id,a.slugify(e.video.name)]}}let n=i.getPhrase(nt,`interactives`,{count:e.interactives.length});return(0,L.jsx)(`section`,{className:`play-page-section`,id:M.Interactives,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.Interactives,t)},children:(0,L.jsx)(v,{name:n,contents:_.InteractivesV2,collection:e.interactives,prefetched:!0,getChildAppLink:e=>({application:c.INTERACTIVES,action:b.Interactives.VIEW_INTERACTIVE,args:[e.id,a.slugify(e.name)]}),appLink:t(),childComponent:Oe,extraChildComponentProps:{questionsAppLink:{application:c.INTERACTIVES,action:b.Interactives.PREVIEW_QUESTIONS},showOwner:!0,commonVideoProps:e.commonVideoProps},analyticsData:e.analyticsData})})}function J(e){return(0,L.jsx)(`svg`,{...e,children:(0,L.jsx)(`path`,{d:`M5.455 12c0 .401.325.727.727.727h9.88l-3.849 3.85a.728.728 0 0 0 1.029 1.028l5.09-5.091a.73.73 0 0 0 .213-.514v7.272a.727.727 0 0 0 1.455 0V4.727a.727.727 0 0 0-1.455 0V12a.73.73 0 0 0-.213-.515l-5.09-5.09a.727.727 0 1 0-1.029 1.028l3.85 3.85H6.181a.727.727 0 0 0-.727.727`,fill:`currentColor`})})}function it(e){return(0,L.jsx)(`svg`,{...e,children:(0,L.jsx)(`path`,{d:`M20 12a.727.727 0 0 0-.727-.728h-9.88l3.848-3.849a.727.727 0 1 0-1.028-1.029l-5.091 5.091a.73.73 0 0 0-.213.514V4.727a.727.727 0 0 0-1.454 0v14.545a.727.727 0 0 0 1.454 0V12c0 .186.071.373.213.515l5.091 5.09a.727.727 0 0 0 1.029-1.028l-3.85-3.85h9.88A.727.727 0 0 0 20 12`,fill:`currentColor`})})}var Y={showInSide:`_showInSide_1n1am_1`,container:`_container_1n1am_7`,aside:`_aside_1n1am_11`,collapse:`_collapse_1n1am_14`,iconContainer:`_iconContainer_1n1am_22`,arrowIcon:`_arrowIcon_1n1am_22`,listIcon:`_listIcon_1n1am_25`},at=`shared.playPage`;function ot(e){function t(){let t={actionType:e.isExpanded?h.Hide:h.Open,entity:p.TableOfContents,location:m.PlayPage};x.logUserAction(e.analyticsData,t)}function n(){let n=!e.isExpanded;e.setIsExpanded(n),n?(e.toggleTheatreMode?.(!1),e.toggleTheatreMode||e.setIsExpanded(!1)):(e.toggleTheatreMode?.(!0),e.toggleTheatreMode||e.setIsExpanded(!0)),t()}return(0,L.jsx)(`div`,{className:`d-flex justify-content-end`,children:(0,L.jsx)(`div`,{className:Y.container,children:(0,L.jsxs)(`div`,{className:`${Y.iconContainer}`,children:[(0,L.jsx)(w,{className:`btn btn-outline-dark ${Y.listIcon}`,svg:xe,onClick:n}),(0,L.jsx)(w,{className:`btn btn-outline-dark ${Y.arrowIcon}`,svg:e.isExpanded?J:it,onClick:n})]})})})}function st(e){function t(){let t={actionType:h.Hide,entity:p.TableOfContents,location:m.PlayPage};x.logUserAction(e.analyticsData,t)}function n(e){let t=ne.getCurrentRoute().appLink,n=t.params?{...t.params}:{};return n.tocId=e.id,{...t,params:n}}function r(){e.showInSide||e.setIsExpanded(!1)}return(0,L.jsxs)(`div`,{className:e.showInSide?`col ms-2 ps-4 ${Y.showInSide}`:`d-inline-flex gap-1`,children:[(0,L.jsx)(`aside`,{className:`${Y.aside} position-relative ${e.showInSide?`pe-1 pt-1 `:`px-3 pt-3 pb-2 border border-dark rounded-1 bg-white`}`,children:(0,L.jsxs)(`div`,{className:`${Y.container}`,children:[e.showInSide&&!e.hasTranscription&&(0,L.jsx)(w,{className:`btn position-absolute ${Y.collapse}`,svg:J,onClick:()=>{e.setIsExpanded(!1),e.toggleTheatreMode?.(!0),t()}}),(0,L.jsx)(`h2`,{className:`h5`,children:(0,L.jsx)(T,{namespace:at,phrase:`tocHeading`})}),(0,L.jsx)(je,{items:e.items,activeId:e.activeId,getAppLink:n,setControlledId:e.setControlledId,analyticsData:e.analyticsData,onItemClick:()=>r()})]})}),!e.showInSide&&(0,L.jsx)(ot,{...e})]})}function ct(e){return e.shouldShow?(0,L.jsxs)(L.Fragment,{children:[e.isExpanded&&e.showInSide&&(0,L.jsx)(st,{...e}),k.renderInPortalIfExists(!e.isExpanded&&(0,L.jsx)(ot,{...e}),document.getElementById(C)),k.renderInPortalIfExists(!e.showInSide&&e.isExpanded&&(0,L.jsx)(st,{...e}),document.getElementById(C))]}):(0,L.jsx)(L.Fragment,{})}var X={series:`_series_15j6m_1`,badgeListContainer:`_badgeListContainer_15j6m_5`,clipOriginInfo:`_clipOriginInfo_15j6m_10`},lt=`shared.playPage`;function ut(e){let t=A(e.media.subjectPresentationAudiences?.data,e.audiences),n=I.useRef(null),r=I.useRef(null),i=y.isVideo(e.media)&&!!y.getRating(e.media)?.value||y.isVideo(e.media)&&!!e.media.productionYear||!!e.media.subjectPresentationAudiences?.data?.length,a=we({location:Te.PlayPage,shareId:e.shareId,presentationSlug:e.presentationSlug}),o=!!e.originalVideoAppLink&&y.isClip(e.media)&&y.canViewOriginalVideo(e.media);return(0,L.jsx)(`section`,{className:`mb-3 position-relative`,ref:n,children:(0,L.jsxs)(`div`,{className:`d-inline-block w-100`,ref:r,children:[e.featureAccess.canNavigate&&(0,L.jsx)(`div`,{className:`ms-2 float-end`,children:(0,L.jsx)(fe,{actions:a.getVideoActions(e.media),actionsDropdownClassName:`btn btn-outline-dark`,fetchMore:()=>a.fetchMoreActions(e.media)})}),!!y.isVideo(e.media)&&(0,L.jsx)(de,{type:e.subTextType,video:e.media,appLink:e.subtextAppLink,className:`${X.series} text-truncate mw-100`,analyticsOptions:{location:m.PlayPage}}),(0,L.jsxs)(`h1`,{className:`h4 mb-2 mw-100`,children:[(0,L.jsx)(`span`,{className:`align-self-center`,children:e.media.name}),e.showTitlePadlock&&(0,L.jsx)(_e,{tooltipPlacement:`right`,className:`d-inline-block ps-1`,video:e.media,yearGroups:e.yearGroups})]}),y.isClip(e.media)&&o&&(0,L.jsxs)(`p`,{className:`clamp-1 ${X.clipOriginInfo}`,children:[(0,L.jsx)(T,{namespace:lt,phrase:`viewOriginal`}),`\xA0`,(0,L.jsx)(S,{className:`info-link`,appLink:e.originalVideoAppLink,children:e.media._parentVideo?.name}),`\xA0`,(0,L.jsx)(T,{namespace:lt,phrase:`timestamp`,options:{timeRange:`${O.ToDisplayTimeRange(e.media.startTime*1e3,e.media.endTime*1e3)}`}})]}),i&&(0,L.jsxs)(pe,{className:X.badgeListContainer,children:[(0,L.jsx)(ve,{audience:t,className:`bg-white text-dark`,border:`dark`}),y.isVideo(e.media)&&(0,L.jsx)(D,{type:E.Rating,data:y.getRating(e.media)}),y.isVideo(e.media)&&(0,L.jsx)(D,{type:E.ProductionYear,data:e.media.productionYear})]})]})})}var Z={mask:`_mask_vq9tb_1`,centeredIcon:`_centeredIcon_vq9tb_10`,bgImage:`_bgImage_vq9tb_21`,centeredOverlay:`_centeredOverlay_vq9tb_24`},dt=i.encloseNamespace(`shared.playerPlaceholder`);function ft(e){switch(e.type){case`pip`:return(0,L.jsx)(pt,{...e});case`public`:return(0,L.jsx)(mt,{...e});default:return(0,L.jsx)(L.Fragment,{})}}var pt=e=>(0,L.jsxs)(`div`,{className:`position-relative responsive-img ${Z.bgImage}`,style:{backgroundImage:`url('${y.getThumbnail(e.video)?.url??``}')`},children:[(0,L.jsx)(`p`,{className:`m-0 text-white h3 ${Z.centeredOverlay}`,children:dt(`playingPiP`)}),(0,L.jsx)(`div`,{className:Z.mask})]}),mt=e=>{let t=te.createUrl(y.getThumbnail(e.video)?.url??``,{size:ee.Large});return(0,L.jsx)(`div`,{className:`position-relative responsive-img ${Z.bgImage}`,style:{backgroundImage:`url('${t}')`},children:(0,L.jsxs)(S,{appLink:e.appLink,analyticsOptions:{actionType:h.Click,location:m.PlayPage,entity:p.AppLink,workflowPhase:d.Start,descriptor:u.SignUp},analyticsData:{},children:[(0,L.jsx)(n,{svg:me,className:Z.centeredIcon}),(0,L.jsx)(`div`,{className:Z.mask})]})})};function ht({resourcePopupId:e,resources:t,getResourceAppLink:n}){I.useEffect(()=>{if(!e)return;let i=t?.find(t=>t.id.toString()===e.toString());i&&r.trigger(n(i))},[e])}var Q={main:`_main_1ujkn_1`,expandedToc:`_expandedToc_1ujkn_1`,theatreMode:`_theatreMode_1ujkn_4`,theatreModeContent:`_theatreModeContent_1ujkn_7`,theatreModePlayPageContainer:`_theatreModePlayPageContainer_1ujkn_17`,theatreModeLeftContent:`_theatreModeLeftContent_1ujkn_21`};function gt(e){return e.shouldShowSideTableOfContents?e.hasTheatreMode&&e.theatreMode?Q.theatreMode:e.tableOfContentsExpanded?`${Q.expandedToc} col-9`:`pe-4`:``}function _t(e){return e.hasTheatreMode&&(e.theatreMode||!e.shouldShowSideTableOfContents)?`container ${Q.theatreModeContent}`:``}function vt(e,t){return e&&t.defaultDisplayMode===`theatre`&&t.mode==="default"}var yt=`play-page-toc-expanded`;function bt(e,t,n){let r=z(),i=j.get(yt)!==`false`,a=t?n||r:i,[o,s]=I.useState(e||``),[c,l]=I.useState(``),[u,d]=I.useState(a);I.useEffect(()=>{if(!r){d(!1);return}if(t){d(!0);return}d(a)},[r,n]);function f(){t&&r||(d(!u),j.set(yt,(!u).toString()))}return{controlledId:o,setControlledId:s,tableOfContentsExpanded:u,tableOfContentsActiveId:c,setTableOfContentsActiveId:l,onToggleTableOfContents:f}}var xt={map(e){let t=new Proxy(new Map,{get(n,r){if(r===`set`)return(r,i)=>(n.get(r)!==i&&(n.set(r,i),e()),t);let i=Reflect.get(n,r);return typeof i==`function`?i.bind(n):i}});return t}},St=[M.Video,M.CurriculumLinks,M.Resources,M.Interactives,M.Clips,M.VideoDetails,M.ClippedFrom,M.Transcript,M.ReferenceVideo,M.RelatedVideos],Ct=[M.Video,M.VideoDetails,M.CurriculumLinks,M.Resources,M.Interactives,M.Clips,M.ClippedFrom,M.Transcript,M.ReferenceVideo,M.RelatedVideos];function wt(e){let t=ae(),n=I.useRef(xt.map(t));return{headingRef:n,headingElements:(e?St:Ct).map(e=>n.current.get(e)).filter(Boolean)}}function Tt(e,t,n){let r=le();if(t!=="default")return!1;let i=n===`theatre`;return!(r.sm||r.md)&&e&&i}var $=i.encloseNamespace(`shared.play`),Et={getSectionHeading(e,t){switch(e){case M.Resources:return $(`resourcesHeading`,{count:t.resources?.length});case M.Clips:return t.isPlayClipPage?$(`otherClipsHeading`,{count:t.clips?.length-1}):$(`clipsHeading`,{count:t.clips?.length});case M.Interactives:return $(`interactivesHeading`,{count:t.interactives?.length});case M.Video:return $(`videoHeading`);case M.VideoDetails:return $(`videoDetailsHeading`);case M.RelatedVideos:return $(`upNextHeading`);case M.CurriculumLinks:return $(`curriculumLinksHeading`);case M.ClippedFrom:return $(`clippedFromHeading`);case M.ReferenceVideo:return $(`referenceVideoHeading`);case M.Transcript:return $(`transcriptHeading`);default:return``}}};export{ze as _,_t as a,Q as c,ut as d,ct as f,We as g,Qe as h,bt as i,ht as l,tt as m,Tt as n,vt as o,rt as p,wt as r,gt as s,Et as t,ft as u,z as v};
2
- //# sourceMappingURL=Bld7iWR52.chunk.js.map
1
+ import{o as e}from"./DAXXjFlN.chunk.js";import{o as t,t as n}from"./snXCXfT6.chunk.js";import{y as r}from"./BftnFbcr.chunk.js";import"./DFZS3Ffo.chunk.js";import{t as i}from"./CQyJ7YGa.chunk.js";import{t as a}from"./e57H3T-k.chunk.js";import{t as o}from"./C2w0pmFW.chunk.js";import{t as s}from"./wrLrTezN.chunk.js";import{t as c}from"./BXTI9cmX.chunk.js";import{t as l}from"./CjA4Q5pm.chunk.js";import{N as u,U as d,a as f,l as p,y as m,z as h}from"./NlCAcBdo.chunk.js";import{t as g}from"./BxbRBSiP.chunk.js";import{i as _,t as v}from"./BMKh-xhT2.chunk.js";import{t as y}from"./BrbeV-Gn2.chunk.js";import{t as b}from"./eoAypzU3.chunk.js";import{t as x}from"./_GCZ-60i.chunk.js";import{n as ee}from"./BRcHS92O2.chunk.js";import{t as te}from"./Bs2PKr1I2.chunk.js";import{t as ne}from"./DpCWroEe2.chunk.js";import{t as re}from"./Bbp2U9GK.chunk.js";import{t as S}from"./CduNFx13.chunk.js";import{t as C}from"./41LJfkjO.chunk.js";import{t as w}from"./BUnh3rN0.chunk.js";import{i as ie}from"./C6-aC3vu.chunk.js";import{t as ae}from"./rVRhgtHY2.chunk.js";import{n as T,t as oe}from"./CpFtf-tI2.chunk.js";import{n as se}from"./BJUbYu222.chunk.js";import{t as ce}from"./DW24qN_e2.chunk.js";import{t as le}from"./5ONJSThP.chunk.js";import{t as ue}from"./jAbfamoi.chunk.js";import{t as de}from"./BzbZUZa-2.chunk.js";import{n as E,t as D}from"./D2-L8f1x2.chunk.js";import{t as O}from"./DsBWAM3I2.chunk.js";import{t as fe}from"./Z4RlHaVG.chunk.js";import{t as pe}from"./9kh0Xx2n2.chunk.js";import{c as me,i as he,n as ge,o as _e,s as ve,t as ye}from"./BOJK8LI1.chunk.js";import{t as be}from"./tnBD84bg2.chunk.js";import{t as xe}from"./DELN_PAD2.chunk.js";import{t as Se}from"./_42F7SIA2.chunk.js";import{t as Ce}from"./DzgAvoez.chunk.js";import{t as k}from"./OtQaFdir.chunk.js";import{t as A}from"./Dopg0SXC.chunk.js";import{n as we,t as Te}from"./CvtZ8ZFA2.chunk.js";import{n as j,t as Ee}from"./B5XaBzZh.chunk.js";import{t as M}from"./BPavmm8c.chunk.js";import{t as De}from"./IqGr9V7u2.chunk.js";import{r as Oe}from"./Bf9r1ZoF2.chunk.js";import{t as ke}from"./7I0L5W4N2.chunk.js";import{n as N,r as P,t as Ae}from"./DusJhHeW2.chunk.js";import{t as F}from"./CLjADRa42.chunk.js";import{t as je}from"./BgOLbASl2.chunk.js";var I=e(o()),L=s(),R=ue();function z(){let e=le();return e.lg||e.xl||e.xxl}var B={copyrightDisclaimer:`_copyrightDisclaimer_yyjul_1`,overlayContainer:`_overlayContainer_yyjul_4`},V=`shared.copyrightDisclaimer`,Me=150;function Ne(e){let[n,r]=se({});function i(){return document.documentElement.clientHeight-n.current?.getBoundingClientRect().bottom<Me}return(0,L.jsxs)(`div`,{ref:n,className:e.className,children:[(0,L.jsx)(`p`,{className:`${B.copyrightDisclaimer} ${e.phraseClassName??`mb-1`}`,children:(0,L.jsx)(T,{namespace:V,phrase:`copyrightDisclaimer`})}),(0,L.jsx)(t,{target:n.current,show:r,placement:e.overflowPlacement&&i()?e.overflowPlacement:e.placement,children:(0,L.jsxs)(`div`,{className:`${B.overlayContainer} mw-100 bg-white border rounded-3 p-2`,children:[(0,L.jsx)(`p`,{children:(0,L.jsx)(T,{namespace:V,phrase:`warning`})}),(0,L.jsx)(`p`,{className:`fw-semibold mb-0`,children:(0,L.jsx)(T,{namespace:V,phrase:`sharing`})})]})})]})}function Pe(e){return(0,L.jsx)(ke,{lines:12,children:()=>(0,L.jsx)(`p`,{className:`mb-0`,dangerouslySetInnerHTML:{__html:a.sanitize(be.linkifyText(e.video.description,{nl2br:!0}))}})})}var Fe={descriptionBorder:`_descriptionBorder_any0w_2`},H=`shared.videoDetailsV2`,U=i.encloseNamespace(H);function W(e){let{label:t,items:n,className:r}=e;return n&&n.data&&n.data.length?typeof e.getItemAppLink==`function`?(0,L.jsxs)(`div`,{className:r,children:[(0,L.jsxs)(`span`,{children:[t,`: `]}),n.data.map((t,r)=>(0,L.jsxs)(I.Fragment,{children:[(0,L.jsx)(S,{appLink:e.getItemAppLink(t),children:t.name?.trim()},t.id),r<n.data.length-1&&(0,L.jsx)(`span`,{children:`, `})]},t.id))]}):(0,L.jsxs)(`div`,{className:r,children:[t,`: `,n.data.map(e=>e.name?.trim()).join(`, `)]}):(0,L.jsx)(L.Fragment,{})}function Ie(e){let t=e.categories?.data;return t?.length?t.filter(e=>e.libraries?.data?.[0]?.type===ce.CustomLibrary).map(e=>({library:e.libraries?.data?.[0],category:e})):[]}function Le(e){return[{name:e.pair.library.name,appLink:e.getLibraryAppLink?.(e.pair.library)},{name:`...`},{name:e.pair.category.name,appLink:e.getFolderAppLink?.(e.pair.library,e.pair.category)}]}function Re(e){let{video:t}=e;if(!y.isVideo(t)&&!y.isClip(t))return(0,L.jsx)(L.Fragment,{});let n=y.getParentVideo(t),r=Ie(t);function i(t){if(!(!t.partnerProfiles||!t.partnerProfiles?.data?.length)){if(t.partnerProfiles?.count>1&&typeof e.getPartnerDashboardHubAppLink==`function`)return e.getPartnerDashboardHubAppLink(t);if(typeof e.getPartnerProfileAppLink==`function`)return e.getPartnerProfileAppLink(t.partnerProfiles?.data?.[0])}}return(0,L.jsxs)(`div`,{className:t.description?`col-md-5 ps-md-3 pt-3 pt-md-0`:`col-12`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`details`})}),!!n.productionYear&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`productionYear`,options:{year:n.productionYear}})}),(0,L.jsx)(W,{label:U(`productionCompanies`,{smartCount:n.productionCompanies?.data?.length}),items:n.productionCompanies,getItemAppLink:i,className:`mb-1`}),(0,L.jsx)(W,{label:U(`distributors`,{smartCount:n.distributors?.data?.length}),items:n.distributors,getItemAppLink:i,className:`mb-1`}),(0,L.jsx)(W,{label:U(`producers`,{smartCount:n.producers?.data?.length}),items:n.producers,className:`mb-1`}),(0,L.jsx)(W,{label:U(`directors`,{smartCount:n.directors?.data?.length}),items:n.directors,className:`mb-1`}),!!n.dateBroadcast&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`dateBroadcast`,options:{date:l.format(n.dateBroadcast,`DD/MM/YYYY`)}})}),!!n.channel&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`channel`,options:{channel:n.channel.name}})}),y.canViewUploadDate(e.video)&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`dateUploaded`,options:{date:l.format(t.dateCreated,`DD/MM/YYYY`)}})}),!!(r.length&&e.getLibraryAppLink&&e.getFolderAppLink)&&(0,L.jsxs)(`div`,{className:`mb-1`,children:[(0,L.jsxs)(`div`,{children:[U(`libraries`,{smartCount:r.length}),`:`]}),r.map((t,n)=>(0,L.jsx)(`div`,{children:(0,L.jsx)(Ce,{breadcrumbs:Le({pair:t,getLibraryAppLink:e.getLibraryAppLink,getFolderAppLink:e.getFolderAppLink}),linkClassName:`text-info`})},n))]})]})}function ze(e){let{video:t,maxHeight:n=368}=e,r=y.getParentVideo(t),i=!!e.video.description,a=Ae(e.video)||!!r.productionYear||!!r.dateBroadcast||!!r.channel||y.canViewUploadDate(e.video);if(!i&&!a)return(0,L.jsx)(L.Fragment,{});function o(){return e.hideTags||y.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags?.data?.filter(e=>e.tagType===g.Normal)}let s=o();return(0,L.jsx)(oe.Provider,{value:H,children:(0,L.jsxs)(`section`,{id:M.VideoDetails,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.VideoDetails,t)},className:`play-page-section`,children:[e.showHeading&&(0,L.jsx)(Se,{name:U(`heading`)}),(0,L.jsx)(`div`,{className:`rounded border p-3 position-relative`,children:(0,L.jsxs)(R.Scrollbars,{autoHeight:!0,autoHeightMax:n,hideTracksWhenNotNeeded:!0,children:[(0,L.jsxs)(`div`,{className:`row g-0`,children:[i&&(0,L.jsxs)(`div`,{className:a?`${Fe.descriptionBorder} pe-3 col-md-7`:`col-12`,children:[(0,L.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`description`})}),(0,L.jsx)(De,{text:t.description,title:t.name,className:`ps-2`,onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:m.PlayPage,entity:p.Video,actionType:h.Click,descriptor:f.LaunchImmersiveReader},analyticsData:{id:t.id,type:`description`}})]}),(0,L.jsx)(Pe,{video:e.video})]}),a&&(0,L.jsx)(Re,{...e})]}),!!s?.length&&(0,L.jsxs)(`div`,{className:`mt-3`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`normalTags`})}),(0,L.jsx)(N,{tags:s,...P.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity),className:`mt-1`})]}),y.isBroadcast(e.video)&&(0,L.jsx)(Ne,{placement:`bottom-start`,className:`d-flex justify-content-start mt-2`,phraseClassName:`mb-0`,overflowPlacement:`top-start`})]})})]})})}function G(e,t,n,r){let i=()=>{F.unsubscribe(e,t)};return(0,I.useEffect)(()=>{if(r)return n?F.subscribeOnce(e,t):F.subscribe(e,t),()=>{i()}},[]),i}var K={learningIntention:`_learningIntention_lm8nf_1`,highlightPoi:`_highlightPoi_lm8nf_7`,icon:`_icon_lm8nf_10`},Be=/\[\]\(cv:\/\/poi\?id=\d+\)\n*/g;function Ve(e){return e.replace(Be,``)}function He(e){return ie(Ve(e.content),{async:!1})}function Ue(e,t){let[n,r]=(0,I.useState)(``);return(0,I.useEffect)(()=>{if(!t||!e.glance?.content)return;let n=He(e.glance);r(n)},[e.glance?.content,t]),n}function We(e){return e.glance?.content&&e.glance?.format===`text/markdown`}function Ge(e,t){let n=(0,I.useRef)(null);G(`player:poi:mouseover`,r,null,t),G(`player:poi:mouseleave`,i,null,t),(0,I.useEffect)(()=>{if(!(!n.current||!t))return n.current?.addEventListener(`mouseover`,a),n.current?.addEventListener(`mouseleave`,o),()=>{n.current?.removeEventListener(`mouseover`,a),n.current?.removeEventListener(`mouseleave`,o)}},[n.current]);function r(t){!t?.id||e?.id?.toString()!==t?.id?.toString()||n.current?.classList.add(K.highlightPoi)}function i(){n.current?.classList.remove(K.highlightPoi)}function a(){e&&F.trigger(`glance:poi:mouseover`,e)}function o(){F.trigger(`glance:poi:mouseleave`)}return n}var q={poiEntry:`_poiEntry_1bne8_1`,poiText:`_poiText_1bne8_5`,public:`_public_1bne8_5`,poiTimeStamp:`_poiTimeStamp_1bne8_14`,wideBadge:`_wideBadge_1bne8_18`};function Ke(e){let t=O.ToDisplayDuration(e.poi.startTime*1e3),n=Ge(e.poi,!e.suppressInteractivity);return e.suppressInteractivity?(0,L.jsxs)(`div`,{className:`d-flex ${q.poiEntry} mb-2`,children:[(0,L.jsx)(`span`,{className:`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${q.poiTimeStamp} ${e.wideBadge?q.wideBadge:``}`,children:t}),(0,L.jsx)(`div`,{className:`${q.public} ms-2`,children:e.poi.description})]}):(0,L.jsxs)(re,{className:`d-flex ${q.poiEntry} mb-2 cursor-pointer`,onClick:()=>e.onClickPoiItem(e.poi.startTime),ref:n,children:[(0,L.jsx)(`div`,{className:`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${q.poiTimeStamp} ${e.wideBadge?q.wideBadge:``}`,children:t}),(0,L.jsx)(`div`,{className:`ms-2 ${q.poiText}`,children:e.poi.description})]},e.poi.startTime)}var qe=`shared.pointsOfInterestList`;function Je(e){let t=e.pointsOfInterest.sort((e,t)=>e.startTime-t.startTime),n=t.some(e=>e.startTime>=3600);return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`h6 my-2`,children:(0,L.jsx)(T,{namespace:qe,phrase:`heading`})}),(0,L.jsx)(`div`,{children:t.map(t=>(0,L.jsx)(Ke,{poi:t,suppressInteractivity:e.suppressInteractivity,onClickPoiItem:e.onClickPoiItem,wideBadge:n},t.startTime))})]})}var Ye=`shared.videoAtAGlanceV2`,Xe=365;function Ze(e){return e.hideScrollbar?(0,L.jsx)(L.Fragment,{children:e.children}):(0,L.jsx)(`div`,{className:`rounded border mb-4 bg-white`,children:(0,L.jsx)(R.Scrollbars,{autoHeight:!0,autoHeightMax:Xe,children:(0,L.jsx)(`div`,{className:`px-3 pt-3 pb-2`,children:e.children})})})}function Qe(e){let t=Ue(e.video,e.canViewGlance),[n,r]=I.useState(``);function i(){let t={id:e.video.glance.id,name:e.video.glance.name,videoId:e.video.id,videoName:e.video.name,learningIntention:n},r={actionType:h.Copy,entity:p.Glance,location:m.PlayPage};x.logUserAction(t,r)}function o(){return y.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags?.data?.filter(e=>e.tagType===g.Pedagogy||e.tagType===g.Skill)}let s=o(),c=I.useRef(null);if(I.useEffect(()=>{c.current?.innerText&&r(c.current.innerText)},[c.current?.innerText]),!e.canViewGlance)return(0,L.jsx)(L.Fragment,{});function l(t){e.setStartTime(t)}return(0,L.jsx)(`section`,{className:`play-page-section`,children:(0,L.jsxs)(Ze,{hideScrollbar:e.hideScrollbar,children:[(0,L.jsx)(`h2`,{className:`h6 mb-2`,children:(0,L.jsx)(T,{namespace:Ye,phrase:`learningIntention`})}),(0,L.jsxs)(`div`,{className:`mb-3 ${K.learningIntention}`,children:[(0,L.jsx)(Ee,{copyableContent:n,tooltipClassName:K.icon,onClick:i,visible:!0}),(0,L.jsx)(`div`,{dangerouslySetInnerHTML:{__html:a.sanitize(t)},className:`d-inline`,ref:c})]}),!!s?.length&&(0,L.jsx)(`div`,{children:(0,L.jsx)(N,{tags:s,...P.getTagActionProps(e.getTagAppLink,e.onClickTag,e.suppressInteractivity),className:`mt-2`})}),!!e.pointsOfInterest?.length&&(0,L.jsx)(`div`,{className:`mt-3`,children:(0,L.jsx)(Je,{pointsOfInterest:e.pointsOfInterest,suppressInteractivity:e.suppressInteractivity,onClickPoiItem:l})})]})})}var $e=I.memo(function(e){let{data:t,thumbnailSize:n,preloadImage:r,getAppLink:i}=e,a=A(t.subjectPresentationAudiences?.data,e.audiences);return(0,L.jsxs)(`div`,{className:`flex-shrink-0 px-1 col-6 col-sm-4`,children:[(0,L.jsx)(ye,{type:`static`,textPosition:ge.Independent,video:t,appLink:i(t),imageOptions:{size:n},preload:r,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,audience:a,hideDuration:!1,commonVideoProps:e.commonVideoProps}),(0,L.jsx)(`div`,{className:`mt-2`,children:(0,L.jsx)(he,{...e,video:t,appLink:e.getAppLink(t)})})]})}),et=`shared.playPageClips`;function tt(e){if(!e.canViewClips||!e.clips?.length)return(0,L.jsx)(L.Fragment,{});let t=y.isVideo(e.video);function n(){return y.isVideo(e.video)?{action:b.Videos.VIDEO_CLIPS,application:c.VIDEOS,args:[e.presentationSlug,e.video.id,a.slugify(e.video.name)]}:{action:b.Clips.CLIP_CLIPS,application:c.CLIPS,args:[e.video.id,a.slugify(e.video.name)]}}let r=i.getPhrase(et,t?`clips`:`otherClips`,{count:e.clips.length});return(0,L.jsx)(`section`,{className:`play-page-section`,id:M.Clips,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.Clips,t)},children:(0,L.jsx)(v,{name:r,contents:_.ClipsV2,collection:e.clips,prefetched:!0,getChildAppLink:e=>({application:c.CLIPS,action:b.Clips.PLAY_CLIP,args:[e.id,a.slugify(e.name)]}),appLink:n(),childComponent:$e,extraChildComponentProps:{audiences:e.audiences,showOwner:!0,commonVideoProps:e.commonVideoProps},analyticsData:e.analyticsData})})}var nt=`shared.playPageInteractives`;function rt(e){if(!e.canViewInteractives||!e.interactives?.length)return(0,L.jsx)(L.Fragment,{});function t(){return y.isVideo(e.video)?{action:b.Videos.VIDEO_INTERACTIVES,application:c.VIDEOS,args:[e.presentationSlug,e.video.id,a.slugify(e.video.name)]}:{action:b.Clips.CLIP_INTERACTIVES,application:c.CLIPS,args:[e.video.id,a.slugify(e.video.name)]}}let n=i.getPhrase(nt,`interactives`,{count:e.interactives.length});return(0,L.jsx)(`section`,{className:`play-page-section`,id:M.Interactives,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.Interactives,t)},children:(0,L.jsx)(v,{name:n,contents:_.InteractivesV2,collection:e.interactives,prefetched:!0,getChildAppLink:e=>({application:c.INTERACTIVES,action:b.Interactives.VIEW_INTERACTIVE,args:[e.id,a.slugify(e.name)]}),appLink:t(),childComponent:Oe,extraChildComponentProps:{questionsAppLink:{application:c.INTERACTIVES,action:b.Interactives.PREVIEW_QUESTIONS},showOwner:!0,commonVideoProps:e.commonVideoProps},analyticsData:e.analyticsData})})}function J(e){return(0,L.jsx)(`svg`,{...e,children:(0,L.jsx)(`path`,{d:`M5.455 12c0 .401.325.727.727.727h9.88l-3.849 3.85a.728.728 0 0 0 1.029 1.028l5.09-5.091a.73.73 0 0 0 .213-.514v7.272a.727.727 0 0 0 1.455 0V4.727a.727.727 0 0 0-1.455 0V12a.73.73 0 0 0-.213-.515l-5.09-5.09a.727.727 0 1 0-1.029 1.028l3.85 3.85H6.181a.727.727 0 0 0-.727.727`,fill:`currentColor`})})}function it(e){return(0,L.jsx)(`svg`,{...e,children:(0,L.jsx)(`path`,{d:`M20 12a.727.727 0 0 0-.727-.728h-9.88l3.848-3.849a.727.727 0 1 0-1.028-1.029l-5.091 5.091a.73.73 0 0 0-.213.514V4.727a.727.727 0 0 0-1.454 0v14.545a.727.727 0 0 0 1.454 0V12c0 .186.071.373.213.515l5.091 5.09a.727.727 0 0 0 1.029-1.028l-3.85-3.85h9.88A.727.727 0 0 0 20 12`,fill:`currentColor`})})}var Y={showInSide:`_showInSide_1n1am_1`,container:`_container_1n1am_7`,aside:`_aside_1n1am_11`,collapse:`_collapse_1n1am_14`,iconContainer:`_iconContainer_1n1am_22`,arrowIcon:`_arrowIcon_1n1am_22`,listIcon:`_listIcon_1n1am_25`},at=`shared.playPage`;function ot(e){function t(){let t={actionType:e.isExpanded?h.Hide:h.Open,entity:p.TableOfContents,location:m.PlayPage};x.logUserAction(e.analyticsData,t)}function n(){let n=!e.isExpanded;e.setIsExpanded(n),n?(e.toggleTheatreMode?.(!1),e.toggleTheatreMode||e.setIsExpanded(!1)):(e.toggleTheatreMode?.(!0),e.toggleTheatreMode||e.setIsExpanded(!0)),t()}return(0,L.jsx)(`div`,{className:`d-flex justify-content-end`,children:(0,L.jsx)(`div`,{className:Y.container,children:(0,L.jsxs)(`div`,{className:`${Y.iconContainer}`,children:[(0,L.jsx)(w,{className:`btn btn-outline-dark ${Y.listIcon}`,svg:xe,onClick:n}),(0,L.jsx)(w,{className:`btn btn-outline-dark ${Y.arrowIcon}`,svg:e.isExpanded?J:it,onClick:n})]})})})}function st(e){function t(){let t={actionType:h.Hide,entity:p.TableOfContents,location:m.PlayPage};x.logUserAction(e.analyticsData,t)}function n(e){let t=ne.getCurrentRoute().appLink,n=t.params?{...t.params}:{};return n.tocId=e.id,{...t,params:n}}function r(){e.showInSide||e.setIsExpanded(!1)}return(0,L.jsxs)(`div`,{className:e.showInSide?`col ms-2 ps-4 ${Y.showInSide}`:`d-inline-flex gap-1`,children:[(0,L.jsx)(`aside`,{className:`${Y.aside} position-relative ${e.showInSide?`pe-1 pt-1 `:`px-3 pt-3 pb-2 border border-dark rounded-1 bg-white`}`,children:(0,L.jsxs)(`div`,{className:`${Y.container}`,children:[e.showInSide&&!e.hasTranscription&&(0,L.jsx)(w,{className:`btn position-absolute ${Y.collapse}`,svg:J,onClick:()=>{e.setIsExpanded(!1),e.toggleTheatreMode?.(!0),t()}}),(0,L.jsx)(`h2`,{className:`h5`,children:(0,L.jsx)(T,{namespace:at,phrase:`tocHeading`})}),(0,L.jsx)(je,{items:e.items,activeId:e.activeId,getAppLink:n,setControlledId:e.setControlledId,analyticsData:e.analyticsData,onItemClick:()=>r()})]})}),!e.showInSide&&(0,L.jsx)(ot,{...e})]})}function ct(e){return e.shouldShow?(0,L.jsxs)(L.Fragment,{children:[e.isExpanded&&e.showInSide&&(0,L.jsx)(st,{...e}),k.renderInPortalIfExists(!e.isExpanded&&(0,L.jsx)(ot,{...e}),document.getElementById(C)),k.renderInPortalIfExists(!e.showInSide&&e.isExpanded&&(0,L.jsx)(st,{...e}),document.getElementById(C))]}):(0,L.jsx)(L.Fragment,{})}var X={series:`_series_15j6m_1`,badgeListContainer:`_badgeListContainer_15j6m_5`,clipOriginInfo:`_clipOriginInfo_15j6m_10`},lt=`shared.playPage`;function ut(e){let t=A(e.media.subjectPresentationAudiences?.data,e.audiences),n=I.useRef(null),r=I.useRef(null),i=y.isVideo(e.media)&&!!y.getRating(e.media)?.value||y.isVideo(e.media)&&!!e.media.productionYear||!!e.media.subjectPresentationAudiences?.data?.length,a=we({location:Te.PlayPage,shareId:e.shareId,presentationSlug:e.presentationSlug}),o=!!e.originalVideoAppLink&&y.isClip(e.media)&&y.canViewOriginalVideo(e.media);return(0,L.jsx)(`section`,{className:`mb-3 position-relative`,ref:n,children:(0,L.jsxs)(`div`,{className:`d-inline-block w-100`,ref:r,children:[e.featureAccess.canNavigate&&(0,L.jsx)(`div`,{className:`ms-2 float-end`,children:(0,L.jsx)(fe,{actions:a.getVideoActions(e.media),actionsDropdownClassName:`btn btn-outline-dark`,fetchMore:()=>a.fetchMoreActions(e.media)})}),!!y.isVideo(e.media)&&(0,L.jsx)(de,{type:e.subTextType,video:e.media,appLink:e.subtextAppLink,className:`${X.series} text-truncate mw-100`,analyticsOptions:{location:m.PlayPage}}),(0,L.jsxs)(`h1`,{className:`h4 mb-2 mw-100`,children:[(0,L.jsx)(`span`,{className:`align-self-center`,children:e.media.name}),e.showTitlePadlock&&(0,L.jsx)(_e,{tooltipPlacement:`right`,className:`d-inline-block ps-1`,video:e.media,yearGroups:e.yearGroups})]}),y.isClip(e.media)&&o&&(0,L.jsxs)(`p`,{className:`clamp-1 ${X.clipOriginInfo}`,children:[(0,L.jsx)(T,{namespace:lt,phrase:`viewOriginal`}),`\xA0`,(0,L.jsx)(S,{className:`info-link`,appLink:e.originalVideoAppLink,children:e.media._parentVideo?.name}),`\xA0`,(0,L.jsx)(T,{namespace:lt,phrase:`timestamp`,options:{timeRange:`${O.ToDisplayTimeRange(e.media.startTime*1e3,e.media.endTime*1e3)}`}})]}),i&&(0,L.jsxs)(pe,{className:X.badgeListContainer,children:[(0,L.jsx)(ve,{audience:t,className:`bg-white text-dark`,border:`dark`}),y.isVideo(e.media)&&(0,L.jsx)(D,{type:E.Rating,data:y.getRating(e.media)}),y.isVideo(e.media)&&(0,L.jsx)(D,{type:E.ProductionYear,data:e.media.productionYear})]})]})})}var Z={mask:`_mask_vq9tb_1`,centeredIcon:`_centeredIcon_vq9tb_10`,bgImage:`_bgImage_vq9tb_21`,centeredOverlay:`_centeredOverlay_vq9tb_24`},dt=i.encloseNamespace(`shared.playerPlaceholder`);function ft(e){switch(e.type){case`pip`:return(0,L.jsx)(pt,{...e});case`public`:return(0,L.jsx)(mt,{...e});default:return(0,L.jsx)(L.Fragment,{})}}var pt=e=>(0,L.jsxs)(`div`,{className:`position-relative responsive-img ${Z.bgImage}`,style:{backgroundImage:`url('${y.getThumbnail(e.video)?.url??``}')`},children:[(0,L.jsx)(`p`,{className:`m-0 text-white h3 ${Z.centeredOverlay}`,children:dt(`playingPiP`)}),(0,L.jsx)(`div`,{className:Z.mask})]}),mt=e=>{let t=te.createUrl(y.getThumbnail(e.video)?.url??``,{size:ee.Large});return(0,L.jsx)(`div`,{className:`position-relative responsive-img ${Z.bgImage}`,style:{backgroundImage:`url('${t}')`},children:(0,L.jsxs)(S,{appLink:e.appLink,analyticsOptions:{actionType:h.Click,location:m.PlayPage,entity:p.AppLink,workflowPhase:d.Start,descriptor:u.SignUp},analyticsData:{},children:[(0,L.jsx)(n,{svg:me,className:Z.centeredIcon}),(0,L.jsx)(`div`,{className:Z.mask})]})})};function ht({resourcePopupId:e,resources:t,getResourceAppLink:n}){I.useEffect(()=>{if(!e)return;let i=t?.find(t=>t.id.toString()===e.toString());i&&r.trigger(n(i))},[e])}var Q={main:`_main_1ujkn_1`,expandedToc:`_expandedToc_1ujkn_1`,theatreMode:`_theatreMode_1ujkn_4`,theatreModeContent:`_theatreModeContent_1ujkn_7`,theatreModePlayPageContainer:`_theatreModePlayPageContainer_1ujkn_17`,theatreModeLeftContent:`_theatreModeLeftContent_1ujkn_21`};function gt(e){return e.shouldShowSideTableOfContents?e.hasTheatreMode&&e.theatreMode?Q.theatreMode:e.tableOfContentsExpanded?`${Q.expandedToc} col-9`:`pe-4`:``}function _t(e){return e.hasTheatreMode&&(e.theatreMode||!e.shouldShowSideTableOfContents)?`container ${Q.theatreModeContent}`:``}function vt(e,t){return e&&t.defaultDisplayMode===`theatre`&&t.mode==="default"}var yt=`play-page-toc-expanded`;function bt(e,t,n){let r=z(),i=j.get(yt)!==`false`,a=t?n||r:i,[o,s]=I.useState(e||``),[c,l]=I.useState(``),[u,d]=I.useState(a);I.useEffect(()=>{if(!r){d(!1);return}if(t){d(!0);return}d(a)},[r,n]);function f(){t&&r||(d(!u),j.set(yt,(!u).toString()))}return{controlledId:o,setControlledId:s,tableOfContentsExpanded:u,tableOfContentsActiveId:c,setTableOfContentsActiveId:l,onToggleTableOfContents:f}}var xt={map(e){let t=new Proxy(new Map,{get(n,r){if(r===`set`)return(r,i)=>(n.get(r)!==i&&(n.set(r,i),e()),t);let i=Reflect.get(n,r);return typeof i==`function`?i.bind(n):i}});return t}},St=[M.Video,M.CurriculumLinks,M.Resources,M.Interactives,M.Clips,M.VideoDetails,M.ClippedFrom,M.Transcript,M.ReferenceVideo,M.RelatedVideos],Ct=[M.Video,M.VideoDetails,M.CurriculumLinks,M.Resources,M.Interactives,M.Clips,M.ClippedFrom,M.Transcript,M.ReferenceVideo,M.RelatedVideos];function wt(e){let t=ae(),n=I.useRef(xt.map(t));return{headingRef:n,headingElements:(e?St:Ct).map(e=>n.current.get(e)).filter(Boolean)}}function Tt(e,t,n){let r=le();if(t!=="default")return!1;let i=n===`theatre`;return!(r.sm||r.md)&&e&&i}var $=i.encloseNamespace(`shared.play`),Et={getSectionHeading(e,t){switch(e){case M.Resources:return $(`resourcesHeading`,{count:t.resources?.length});case M.Clips:return t.isPlayClipPage?$(`otherClipsHeading`,{count:t.clips?.length-1}):$(`clipsHeading`,{count:t.clips?.length});case M.Interactives:return $(`interactivesHeading`,{count:t.interactives?.length});case M.Video:return $(`videoHeading`);case M.VideoDetails:return $(`videoDetailsHeading`);case M.RelatedVideos:return $(`upNextHeading`);case M.CurriculumLinks:return $(`curriculumLinksHeading`);case M.ClippedFrom:return $(`clippedFromHeading`);case M.ReferenceVideo:return $(`referenceVideoHeading`);case M.Transcript:return $(`transcriptHeading`);default:return``}}};export{ze as _,_t as a,Q as c,ut as d,ct as f,We as g,Qe as h,bt as i,ht as l,tt as m,Tt as n,vt as o,rt as p,wt as r,gt as s,Et as t,ft as u,z as v};
2
+ //# sourceMappingURL=D-pn0sNx2.chunk.js.map