@clickview/lite 0.104.0-rc.3 → 0.104.0-rc.4

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 (70) hide show
  1. package/dist/.vite/manifest.json +471 -471
  2. package/dist/bundles.json +1 -1
  3. package/dist/en.json +1 -1
  4. package/dist/scripts/{CXN0_XjU.chunk.js → -KvTbeQV.chunk.js} +2 -2
  5. package/dist/scripts/{CXN0_XjU.chunk.js.map → -KvTbeQV.chunk.js.map} +1 -1
  6. package/dist/scripts/{Bu7Sr1dy.chunk.js → 0Fek4oFk.chunk.js} +2 -2
  7. package/dist/scripts/{Bu7Sr1dy.chunk.js.map → 0Fek4oFk.chunk.js.map} +1 -1
  8. package/dist/scripts/{CfRQYWGG.chunk.js → 5PKjjI4Y.chunk.js} +2 -2
  9. package/dist/scripts/{CfRQYWGG.chunk.js.map → 5PKjjI4Y.chunk.js.map} +1 -1
  10. package/dist/scripts/{Ta3cqTAC.chunk.js → AEOAlemi.chunk.js} +2 -2
  11. package/dist/scripts/{Ta3cqTAC.chunk.js.map → AEOAlemi.chunk.js.map} +1 -1
  12. package/dist/scripts/{DBcWjmUy.chunk.js → B1TqilLB.chunk.js} +2 -2
  13. package/dist/scripts/{DBcWjmUy.chunk.js.map → B1TqilLB.chunk.js.map} +1 -1
  14. package/dist/scripts/{2p_6pVn6.chunk.js → B2wDqI1S.chunk.js} +2 -2
  15. package/dist/scripts/{2p_6pVn6.chunk.js.map → B2wDqI1S.chunk.js.map} +1 -1
  16. package/dist/scripts/{DWJiezgB2.chunk.js → BBWnpWNB2.chunk.js} +2 -2
  17. package/dist/scripts/{DWJiezgB2.chunk.js.map → BBWnpWNB2.chunk.js.map} +1 -1
  18. package/dist/scripts/{x2GB1P6E2.chunk.js → BUVko1EF2.chunk.js} +3 -3
  19. package/dist/scripts/{x2GB1P6E2.chunk.js.map → BUVko1EF2.chunk.js.map} +1 -1
  20. package/dist/scripts/{Cl2FZEIX.chunk.js → BYbQI3CA.chunk.js} +2 -2
  21. package/dist/scripts/{Cl2FZEIX.chunk.js.map → BYbQI3CA.chunk.js.map} +1 -1
  22. package/dist/scripts/{BpHA-MkZ.chunk.js → BiWUSyJr.chunk.js} +2 -2
  23. package/dist/scripts/{BpHA-MkZ.chunk.js.map → BiWUSyJr.chunk.js.map} +1 -1
  24. package/dist/scripts/{VJQU9c4G2.chunk.js → BlsbWOzw2.chunk.js} +2 -2
  25. package/dist/scripts/{VJQU9c4G2.chunk.js.map → BlsbWOzw2.chunk.js.map} +1 -1
  26. package/dist/scripts/{C_tdgSWS2.chunk.js → Bzk4AwVx2.chunk.js} +2 -2
  27. package/dist/scripts/{C_tdgSWS2.chunk.js.map → Bzk4AwVx2.chunk.js.map} +1 -1
  28. package/dist/scripts/{ft2cSH-j.chunk.js → C3PXfYEd.chunk.js} +2 -2
  29. package/dist/scripts/{ft2cSH-j.chunk.js.map → C3PXfYEd.chunk.js.map} +1 -1
  30. package/dist/scripts/{9oMRc0cb2.chunk.js → CAs2Sere2.chunk.js} +2 -2
  31. package/dist/scripts/{9oMRc0cb2.chunk.js.map → CAs2Sere2.chunk.js.map} +1 -1
  32. package/dist/scripts/{Bm5qACA52.chunk.js → CNfmLVE82.chunk.js} +2 -2
  33. package/dist/scripts/{Bm5qACA52.chunk.js.map → CNfmLVE82.chunk.js.map} +1 -1
  34. package/dist/scripts/{CNPKh2z72.chunk.js → CX6c7KRp2.chunk.js} +2 -2
  35. package/dist/scripts/{CNPKh2z72.chunk.js.map → CX6c7KRp2.chunk.js.map} +1 -1
  36. package/dist/scripts/{BTm7hIyP2.chunk.js → CaCm4N_d2.chunk.js} +2 -2
  37. package/dist/scripts/{BTm7hIyP2.chunk.js.map → CaCm4N_d2.chunk.js.map} +1 -1
  38. package/dist/scripts/{DW_sm5se2.chunk.js → CfNYFxJl2.chunk.js} +2 -2
  39. package/dist/scripts/{DW_sm5se2.chunk.js.map → CfNYFxJl2.chunk.js.map} +1 -1
  40. package/dist/scripts/{CFduwlo0.chunk.js → Cqq1N9xw.chunk.js} +2 -2
  41. package/dist/scripts/{CFduwlo0.chunk.js.map → Cqq1N9xw.chunk.js.map} +1 -1
  42. package/dist/scripts/{UCiRB6cQ.chunk.js → CwFYdvvA.chunk.js} +2 -2
  43. package/dist/scripts/{UCiRB6cQ.chunk.js.map → CwFYdvvA.chunk.js.map} +1 -1
  44. package/dist/scripts/{DFFq-sgD.chunk.js → CwYg3Mqk.chunk.js} +2 -2
  45. package/dist/scripts/{DFFq-sgD.chunk.js.map → CwYg3Mqk.chunk.js.map} +1 -1
  46. package/dist/scripts/{DLcyKjA7.chunk.js → Cyit3dMk.chunk.js} +2 -2
  47. package/dist/scripts/{DLcyKjA7.chunk.js.map → Cyit3dMk.chunk.js.map} +1 -1
  48. package/dist/scripts/{BxjzTnvL2.chunk.js → D-iyHqNw2.chunk.js} +3 -3
  49. package/dist/scripts/{BxjzTnvL2.chunk.js.map → D-iyHqNw2.chunk.js.map} +1 -1
  50. package/dist/scripts/{BTcLMVw4.chunk.js → DKDWcWxk.chunk.js} +2 -2
  51. package/dist/scripts/{BTcLMVw4.chunk.js.map → DKDWcWxk.chunk.js.map} +1 -1
  52. package/dist/scripts/{B6GfukUn2.chunk.js → DN82USWW2.chunk.js} +2 -2
  53. package/dist/scripts/{B6GfukUn2.chunk.js.map → DN82USWW2.chunk.js.map} +1 -1
  54. package/dist/scripts/{C4OV7pr-.chunk.js → DWo8DfD9.chunk.js} +2 -2
  55. package/dist/scripts/{C4OV7pr-.chunk.js.map → DWo8DfD9.chunk.js.map} +1 -1
  56. package/dist/scripts/{Bh-26cqn.chunk.js → Dnz8CbEu.chunk.js} +3 -3
  57. package/dist/scripts/{Bh-26cqn.chunk.js.map → Dnz8CbEu.chunk.js.map} +1 -1
  58. package/dist/scripts/{CukXgE1z.chunk.js → Dt5731Ay.chunk.js} +2 -2
  59. package/dist/scripts/{CukXgE1z.chunk.js.map → Dt5731Ay.chunk.js.map} +1 -1
  60. package/dist/scripts/{DCPsmD1m.chunk.js → Dtag-27K.chunk.js} +2 -2
  61. package/dist/scripts/{DCPsmD1m.chunk.js.map → Dtag-27K.chunk.js.map} +1 -1
  62. package/dist/scripts/{DOCHl5Sy.chunk.js → DyE6EUDb.chunk.js} +2 -2
  63. package/dist/scripts/{DOCHl5Sy.chunk.js.map → DyE6EUDb.chunk.js.map} +1 -1
  64. package/dist/scripts/{app-LEZ4B6dG.js → app-CfAhMxn1.js} +4 -4
  65. package/dist/scripts/{app-LEZ4B6dG.js.map → app-CfAhMxn1.js.map} +1 -1
  66. package/dist/scripts/{DerPQKk6.chunk.js → cDv6zuhh.chunk.js} +2 -2
  67. package/dist/scripts/{DerPQKk6.chunk.js.map → cDv6zuhh.chunk.js.map} +1 -1
  68. package/dist/scripts/{qT_Twe2q.chunk.js → pKtXmGbN.chunk.js} +2 -2
  69. package/dist/scripts/{qT_Twe2q.chunk.js.map → pKtXmGbN.chunk.js.map} +1 -1
  70. package/package.json +1 -1
@@ -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"./BxjzTnvL2.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"./VJQU9c4G2.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=B6GfukUn2.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"./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"./BlsbWOzw2.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=DN82USWW2.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"B6GfukUn2.chunk.js","names":[],"sources":["../../src/shared/views/play-clip/components/clipped-from/ClippedFrom.tsx","../../src/shared/views/play-clip/components/play-clip/play-clip.module.scss","../../src/shared/views/play-clip/components/play-clip/PlayClip.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CurrentUser, PresentationAudience, VideoTypes } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nconst namespace = 'shared.playClip';\n\ninterface ClippedFromProps {\n originalVideo: VideoTypes;\n queryParams: PlayViewQueryParams;\n audiences: PresentationAudience[];\n shareId?: string;\n headingRef: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n currentUser: CurrentUser;\n commonVideoProps: CommonVideoProps;\n}\n\nexport function ClippedFrom(props: ClippedFromProps) {\n const { hasPermissions } = usePermissions();\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem, presentationSlug: null });\n\n return (\n <section\n className='play-page-section'\n id={PlayPageAnchor.ClippedFrom}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.ClippedFrom, el);\n }}\n >\n <h2 className='h4 mb-0'><Text namespace={namespace} phrase='clippedFrom' /></h2>\n <VideoActionsContext.Provider value={videoActions}>\n <VideoList\n videos={[props.originalVideo]}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n hasPermissions={hasPermissions}\n presentationAudiences={props.audiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n commonVideoProps={props.commonVideoProps}\n />\n </VideoActionsContext.Provider>\n </section>\n );\n}\n","@import '~styles/utils/include-media';\n:local {\n .main.expandedToc {\n width: calc(100% - 15rem); //minus sidebar toc width and margin\n }\n\n .main.theatreMode {\n width: 100% !important;\n }\n\n .theatreModeContent {\n display: flex;\n margin: auto !important;\n\n @include media('<=xl') {\n max-width: 100%;\n }\n }\n\n .theatreModePlayPageContainer {\n //override TeacherLayoutComponent container style\n @media (min-width: 1200px) {\n max-width: none !important;\n }\n }\n\n .theatreModeLeftContent {\n width: calc(100% - 15rem);\n @include media('<=lg') {\n width: 100%;\n }\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { VideoDetailsWithScrollbarV2 } from 'libs/shared/components/play-page/details/VideoDetailsV2';\nimport { hasGlanceData } from 'libs/shared/components/play-page/glance/VideoAtAGlanceUtilsV2';\nimport { VideoAtAGlanceV2 } from 'libs/shared/components/play-page/glance/VideoAtAGlanceV2';\nimport { getResources, PlayPageResources } from 'libs/shared/components/play-page/resources-widget/PlayPageResources';\nimport { SeoConstants } from 'libs/shared/constants/SeoConstants';\nimport { GlobalPlayerConsumer } from 'libs/shared/context/player-context/components/GlobalPlayerConsumer';\nimport { usePlayerContext } from 'libs/shared/context/player-context/PlayerContext';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { HasProductFunc } from 'libs/shared/hooks/UseProducts';\nimport { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { Clip, CurrentUser, InteractiveMetadata, Link, PointOfInterest, PresentationAudience, Resource } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { DownloadHelper } from 'libs/shared/utils/DownloadHelper';\nimport { MasterTypeHelper } from 'libs/shared/utils/MasterTypeHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { CitationWidget } from 'shared/components/citations/CitationWidget';\nimport { ArchivedBanner } from 'shared/components/play-page/ArchivedBanner';\nimport { PlayPageClips } from 'shared/components/play-page/components/play-page-clips/PlayPageClips';\nimport { PlayPageInteractives } from 'shared/components/play-page/components/play-page-interactives/PlayPageInteractives';\nimport { TableOfContentsContainer, TOC_IGNORE_BOUNDARY } from 'shared/components/play-page/components/table-of-contents/TableOfContents';\nimport { PlayPageTitleAndActions } from 'shared/components/play-page/components/title-and-actions/PlayPageTitleAndActions';\nimport { getFolderAppLink, getLibraryAppLink } from 'shared/components/play-page/PlayPageUtils';\nimport { RestrictionBanner } from 'shared/components/play-page/RestrictionBanner';\nimport { PlayerPlaceholder } from 'shared/components/player-placeholder/PlayerPlaceholder';\nimport { RelatedVideos } from 'shared/components/related-videos/RelatedVideos';\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { ViewModelKeys } from 'shared/constants/LiteViewModels';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { useResourcePopup } from 'shared/views/play/components/play-page/hooks/useResourcePopup';\nimport { getContentClassName, getIsTheatreMode, getMainClassName } from 'shared/views/play/components/play-page/PlayPageUtils';\nimport { usePlayPageTableOfContent } from 'shared/views/play/hooks/usePlayPageTableOfContent';\nimport { useSectionHeadings } from 'shared/views/play/hooks/useSectionHeadings';\nimport { useTheatreModeStyle } from 'shared/views/play/hooks/useTheatreStyle';\nimport { PlayPageUtils } from 'shared/views/play/PlayPageUtil';\nimport { ClippedFrom } from 'shared/views/play-clip/components/clipped-from/ClippedFrom';\n\nimport styles from './play-clip.module.scss';\n\nconst getResourceAppLink = (videoId: string, shareId: string, canViewResource: boolean) =>\n (resource: Resource | Link) => {\n if (!canViewResource) {\n return {\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n };\n }\n\n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PREVIEW_PDF,\n args: [resource.id],\n params: {\n videoId: videoId,\n shareId: shareId\n }\n };\n };\n\ninterface PlayClipProps {\n clip: Clip;\n clips: Clip[];\n interactives: InteractiveMetadata[];\n currentUser: CurrentUser;\n relatedVideos: RelatedVideosHash;\n queryParams: PlayViewQueryParams;\n hasProduct: HasProductFunc;\n audiences: PresentationAudience[];\n shareId?: string;\n canManageVideoAccess: boolean;\n pointsOfInterest?: PointOfInterest[];\n featureAccess: VideoFeaturesHash;\n tableOfContentsId: string;\n shouldShowSideTableOfContents: boolean;\n hasTopicDirectories: boolean;\n hasTheatreMode: boolean;\n breadcrumbs?: Breadcrumb[];\n commonVideoProps: CommonVideoProps;\n}\n\nexport function PlayClip(props: PlayClipProps): JSX.Element {\n const playerContext = usePlayerContext();\n\n const { hasPermissions } = usePermissions();\n const { canConsume } = VideoHelper.getCanBeConsumed(props.clip);\n \n const theatreMode = getIsTheatreMode(props.hasTheatreMode, playerContext);\n const shouldUseTheareModeStyle = useTheatreModeStyle(\n props.hasTheatreMode,\n playerContext.mode,\n playerContext.defaultDisplayMode\n );\n\n function toggleTheatreMode(value: boolean) {\n playerContext.playerRef?.current?.toggleTheatreMode?.(value);\n }\n\n const {\n tableOfContentsActiveId,\n setTableOfContentsActiveId,\n controlledId,\n setControlledId,\n tableOfContentsExpanded,\n onToggleTableOfContents\n } = usePlayPageTableOfContent(props.tableOfContentsId, props.hasTheatreMode, theatreMode);\n\n const hasGlance = hasGlanceData(props.clip) && props.featureAccess.canViewGlance;\n\n const { headingRef, headingElements } = useSectionHeadings(hasGlance);\n const items = headingElements.map(ele => {\n return {\n id: ele.id as PlayPageAnchor,\n name: PlayPageUtils.getSectionHeading(\n ele.id as PlayPageAnchor,\n {\n clips: props.clips,\n interactives: props.interactives,\n resources: props.clip.resources?.data,\n isPlayClipPage: true\n }\n )\n };\n });\n\n useTableOfContentsActiveHeading({\n setActiveId: setTableOfContentsActiveId,\n headingElements,\n controlledId,\n setControlledId\n });\n\n useTableOfContentsScroll(headingElements, controlledId);\n\n const isArchived = VideoHelper.isVideoTypeArchived(props.clip);\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\n /**\n * Need to use a ref because if we use state, onExitImmersiveReader will have a stale\n * reference of the state. This is because the state is changed in onLaunchImmersiveReader\n * which is passed in at the same time as onExitImmersiveReader\n */\n const shouldPlayOnExitImmersiveReader = React.useRef(false);\n\n const clipResourceAppLink = getResourceAppLink(\n props.clip.id,\n props.shareId,\n props.featureAccess.canViewResourceItems\n );\n\n useResourcePopup({\n resourcePopupId: props.queryParams?.resourceId,\n resources: props.clip.resources?.data,\n getResourceAppLink: clipResourceAppLink\n });\n\n function onLaunchImmersiveReader(): void {\n shouldPlayOnExitImmersiveReader.current = !playerContext?.playerRef?.current?.isPaused();\n playerContext?.playerRef?.current?.pause();\n }\n\n function onExitImmersiveReader(): void {\n if (!shouldPlayOnExitImmersiveReader.current)\n return;\n\n playerContext?.playerRef?.current?.play();\n }\n\n function canAccessOriginal(): boolean {\n if (!props.clip._parentVideo || !props.clip._canBeConsumed?.value)\n return false;\n\n if (!props.currentUser?.isAuthenticated)\n return false;\n\n if (!props.hasProduct(ProductId.Primary))\n return false;\n\n if (hasStudentExperience)\n return false;\n\n return true;\n }\n\n function getOriginalVideoAppLink(): Core.AppLink {\n if (!canAccessOriginal())\n return null;\n \n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [\n null,\n props.clip._parentVideo.id,\n TextHelper.slugify(props.clip._parentVideo.name)\n ]\n };\n }\n\n const showPlayerPlaceholder = playerContext.mode === 'picture-in-picture' || props.featureAccess.canViewPublicLayout;\n\n const otherClips = props.clips?.filter(c => c.id.toString() !== props.clip.id.toString()) ?? [];\n\n const calcClassNameProps = {\n hasTheatreMode: props.hasTheatreMode,\n shouldShowSideTableOfContents: props.shouldShowSideTableOfContents,\n tableOfContentsExpanded,\n theatreMode\n };\n const mainClassName = getMainClassName(calcClassNameProps);\n const contentClassName = getContentClassName(calcClassNameProps);\n\n const [ , setContainerClassName ] = useViewModel(ViewModelKeys.PLAY_PAGE_CONTAINER_CLASS_NAME);\n\n const resources = getResources(props.clip, hasPermissions(PermissionName.StudentExperience));\n const downloadableResources = resources.filter(MasterTypeHelper.isResource);\n\n function onDownloadClick() {\n if (downloadableResources.length === 1) {\n DownloadHelper.downloadResource(\n downloadableResources[0],\n { clipId: props.clip.id, clipName: props.clip.name },\n { location: LocationContext.PlayClip, actionType: UserAction.Download, entity: EntityType.Resource }\n );\n return;\n }\n \n Core.AppLinkHelper.trigger({\n application: AppChannels.VIDEOS,\n action: Actions.Videos.RESOURCE_DOWNLOAD,\n args: [ props.clip?.id, props.shareId ]\n });\n }\n \n React.useEffect(() => {\n if (!theatreMode) {\n setContainerClassName('');\n } else {\n setContainerClassName(styles.theatreModePlayPageContainer);\n }\n }, [theatreMode]);\n\n React.useEffect(() => {\n return () => setContainerClassName('');\n }, []);\n\n return (\n <div className={`px-4 play-page-sections-container ${props.shouldShowSideTableOfContents ? 'row g-0' : ''}`}>\n <main className={`${styles.main} ${mainClassName}`}>\n {!!props.breadcrumbs?.length && (\n <div className='mb-2'>\n <Breadcrumbs breadcrumbs={props.breadcrumbs} />\n </div>\n )}\n\n <RestrictionBanner\n restrictions={props.clip._restrictions}\n yearGroups={props.commonVideoProps.yearGroups}\n objectId={props.clip.id}\n objectTypeId={MasterType.Clip}\n canManageVideoAccess={props.canManageVideoAccess}\n />\n\n {isArchived && (\n <ArchivedBanner\n typeId={props.clip.typeId}\n hasStudentExperience={hasStudentExperience}\n />\n )}\n\n <section\n id={PlayPageAnchor.Video}\n className={`mb-2 ${SeoConstants.GLOBAL_PLAYER_SELECTOR}`}\n ref={el => { (el && headingRef?.current) && headingRef.current.set(PlayPageAnchor.Video, el); }}\n >\n {canConsume && (\n <GlobalPlayerConsumer\n key={props.clip.id}\n objectId={props.clip.id}\n objectTypeId={props.clip.typeId}\n shareId={props.shareId}\n context={props.queryParams?.context}\n contextId={props.queryParams?.contextId}\n moviesAndTv={props.queryParams?.mtv}\n playNext={props.queryParams?.playNext}\n startTime={props.queryParams?.t ?? props.queryParams?.startTime}\n mode='default'\n location='play-page'\n />\n )}\n\n <div className={showPlayerPlaceholder ? '' : 'd-none'}>\n <PlayerPlaceholder\n video={props.clip}\n type='pip'\n />\n </div>\n </section>\n\n <div className={contentClassName}>\n <div className={shouldUseTheareModeStyle ? `${styles.theatreModeLeftContent}` : 'w-100'}>\n <PlayPageTitleAndActions\n presentationSlug={null}\n media={props.clip}\n yearGroups={props.commonVideoProps.yearGroups}\n audiences={props.audiences}\n originalVideoAppLink={getOriginalVideoAppLink()}\n featureAccess={props.featureAccess}\n shareId={props.shareId}\n showTitlePadlock={!props.commonVideoProps.hasStudentExperience\n && !props.commonVideoProps.hasGuestExperience}\n />\n\n {/* if no glance render video details here */}\n {hasGlance ? (\n <VideoAtAGlanceV2\n video={props.clip}\n pointsOfInterest={props.pointsOfInterest}\n setStartTime={(time: number) => playerContext.playerRef.current?.currentTime(time)}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n canViewGlance={hasGlance}\n />\n ) : (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n getLibraryAppLink={getLibraryAppLink}\n getFolderAppLink={getFolderAppLink}\n />\n )}\n\n <PlayPageResources\n video={props.clip}\n canViewResources={props.featureAccess.canViewResourceItems}\n imageCdnUrl={props.commonVideoProps.imageCdnUrl}\n getAppLink={clipResourceAppLink}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n resourceThumbnailFallbackUrl={ImageUrls.Fallbacks.RESOURCE_THUMBNAIL}\n headingRef={headingRef}\n onDownloadClick={onDownloadClick}\n resources={resources}\n downloadableResources={downloadableResources}\n aboutResourcesAppLink={VideoAppLinkHelper.getAboutResourceAppLink()}\n />\n\n <PlayPageInteractives\n presentationSlug={null}\n video={props.clip}\n interactives={props.interactives}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n canViewInteractives={props.featureAccess.canViewInteractives}\n headingRef={headingRef}\n commonVideoProps={props.commonVideoProps}\n />\n\n <PlayPageClips\n presentationSlug={null}\n clips={otherClips || []}\n video={props.clip}\n canViewClips={props.featureAccess.canViewClips}\n audiences={props.audiences}\n headingRef={headingRef}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n commonVideoProps={props.commonVideoProps}\n />\n\n {/* if has glance, render video details here */}\n {hasGlance && (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n showHeading\n getLibraryAppLink={hasPermissions(PermissionName.ViewLibraries) ? getLibraryAppLink : null}\n getFolderAppLink={hasPermissions(PermissionName.ViewLibraries) ? getFolderAppLink : null}\n />\n )}\n \n {!!canAccessOriginal() && (\n <ClippedFrom\n originalVideo={props.clip._parentVideo}\n shareId={props.shareId}\n queryParams={props.queryParams}\n audiences={props.audiences}\n headingRef={headingRef}\n currentUser={props.currentUser}\n commonVideoProps={props.commonVideoProps}\n />\n )}\n\n {!VideoHelper.isUgc(props.clip._parentVideo) && (\n <CitationWidget\n headingRef={headingRef}\n media={props.clip}\n parentVideo={props.clip._parentVideo}\n contentRegion={props.currentUser.contentRegion}\n shareId={props.shareId}\n presentationSlug={null}\n />\n )}\n\n <RelatedVideos\n presentationSlug={null}\n currentVideo={props.clip}\n relatedVideos={props.relatedVideos}\n currentUser={props.currentUser}\n audiences={props.audiences}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n moviesAndTv={props.queryParams.mtv}\n commonVideoProps={props.commonVideoProps}\n />\n </div>\n {theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={ null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={true}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </div>\n </main>\n\n {!theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={props.hasTheatreMode ? toggleTheatreMode : null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={false}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </div>\n );\n}\n"],"mappings":"wiDAeM,EAAY,kBAYlB,SAAgB,GAAY,EAAyB,CACnD,GAAM,CAAE,kBAAmB,EAAe,EACpC,EAAe,EAAgB,CAAE,SAAU,EAAqB,UAAW,iBAAkB,IAAK,CAAC,EAEzG,OACE,EAAA,EAAA,KAAA,CAAC,UAAD,CACE,UAAU,oBACV,GAAI,EAAe,YACnB,IAAK,GAAM,CACT,GAAO,EAAM,YAAY,SAAY,EAAM,WAAW,QAAQ,IAAI,EAAe,YAAa,CAAE,CAClG,WALF,EAOE,EAAA,EAAA,IAAA,CAA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,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":"DN82USWW2.chunk.js","names":[],"sources":["../../src/shared/views/play-clip/components/clipped-from/ClippedFrom.tsx","../../src/shared/views/play-clip/components/play-clip/play-clip.module.scss","../../src/shared/views/play-clip/components/play-clip/PlayClip.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CurrentUser, PresentationAudience, VideoTypes } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nconst namespace = 'shared.playClip';\n\ninterface ClippedFromProps {\n originalVideo: VideoTypes;\n queryParams: PlayViewQueryParams;\n audiences: PresentationAudience[];\n shareId?: string;\n headingRef: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n currentUser: CurrentUser;\n commonVideoProps: CommonVideoProps;\n}\n\nexport function ClippedFrom(props: ClippedFromProps) {\n const { hasPermissions } = usePermissions();\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem, presentationSlug: null });\n\n return (\n <section\n className='play-page-section'\n id={PlayPageAnchor.ClippedFrom}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.ClippedFrom, el);\n }}\n >\n <h2 className='h4 mb-0'><Text namespace={namespace} phrase='clippedFrom' /></h2>\n <VideoActionsContext.Provider value={videoActions}>\n <VideoList\n videos={[props.originalVideo]}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n hasPermissions={hasPermissions}\n presentationAudiences={props.audiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n commonVideoProps={props.commonVideoProps}\n />\n </VideoActionsContext.Provider>\n </section>\n );\n}\n","@import '~styles/utils/include-media';\n:local {\n .main.expandedToc {\n width: calc(100% - 15rem); //minus sidebar toc width and margin\n }\n\n .main.theatreMode {\n width: 100% !important;\n }\n\n .theatreModeContent {\n display: flex;\n margin: auto !important;\n\n @include media('<=xl') {\n max-width: 100%;\n }\n }\n\n .theatreModePlayPageContainer {\n //override TeacherLayoutComponent container style\n @media (min-width: 1200px) {\n max-width: none !important;\n }\n }\n\n .theatreModeLeftContent {\n width: calc(100% - 15rem);\n @include media('<=lg') {\n width: 100%;\n }\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { VideoDetailsWithScrollbarV2 } from 'libs/shared/components/play-page/details/VideoDetailsV2';\nimport { hasGlanceData } from 'libs/shared/components/play-page/glance/VideoAtAGlanceUtilsV2';\nimport { VideoAtAGlanceV2 } from 'libs/shared/components/play-page/glance/VideoAtAGlanceV2';\nimport { getResources, PlayPageResources } from 'libs/shared/components/play-page/resources-widget/PlayPageResources';\nimport { SeoConstants } from 'libs/shared/constants/SeoConstants';\nimport { GlobalPlayerConsumer } from 'libs/shared/context/player-context/components/GlobalPlayerConsumer';\nimport { usePlayerContext } from 'libs/shared/context/player-context/PlayerContext';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { HasProductFunc } from 'libs/shared/hooks/UseProducts';\nimport { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { Clip, CurrentUser, InteractiveMetadata, Link, PointOfInterest, PresentationAudience, Resource } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { DownloadHelper } from 'libs/shared/utils/DownloadHelper';\nimport { MasterTypeHelper } from 'libs/shared/utils/MasterTypeHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { CitationWidget } from 'shared/components/citations/CitationWidget';\nimport { ArchivedBanner } from 'shared/components/play-page/ArchivedBanner';\nimport { PlayPageClips } from 'shared/components/play-page/components/play-page-clips/PlayPageClips';\nimport { PlayPageInteractives } from 'shared/components/play-page/components/play-page-interactives/PlayPageInteractives';\nimport { TableOfContentsContainer, TOC_IGNORE_BOUNDARY } from 'shared/components/play-page/components/table-of-contents/TableOfContents';\nimport { PlayPageTitleAndActions } from 'shared/components/play-page/components/title-and-actions/PlayPageTitleAndActions';\nimport { getFolderAppLink, getLibraryAppLink } from 'shared/components/play-page/PlayPageUtils';\nimport { RestrictionBanner } from 'shared/components/play-page/RestrictionBanner';\nimport { PlayerPlaceholder } from 'shared/components/player-placeholder/PlayerPlaceholder';\nimport { RelatedVideos } from 'shared/components/related-videos/RelatedVideos';\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { ViewModelKeys } from 'shared/constants/LiteViewModels';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { useResourcePopup } from 'shared/views/play/components/play-page/hooks/useResourcePopup';\nimport { getContentClassName, getIsTheatreMode, getMainClassName } from 'shared/views/play/components/play-page/PlayPageUtils';\nimport { usePlayPageTableOfContent } from 'shared/views/play/hooks/usePlayPageTableOfContent';\nimport { useSectionHeadings } from 'shared/views/play/hooks/useSectionHeadings';\nimport { useTheatreModeStyle } from 'shared/views/play/hooks/useTheatreStyle';\nimport { PlayPageUtils } from 'shared/views/play/PlayPageUtil';\nimport { ClippedFrom } from 'shared/views/play-clip/components/clipped-from/ClippedFrom';\n\nimport styles from './play-clip.module.scss';\n\nconst getResourceAppLink = (videoId: string, shareId: string, canViewResource: boolean) =>\n (resource: Resource | Link) => {\n if (!canViewResource) {\n return {\n application: AppChannels.SIGN_UP,\n action: Actions.SignUp.SIGN_UP\n };\n }\n\n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PREVIEW_PDF,\n args: [resource.id],\n params: {\n videoId: videoId,\n shareId: shareId\n }\n };\n };\n\ninterface PlayClipProps {\n clip: Clip;\n clips: Clip[];\n interactives: InteractiveMetadata[];\n currentUser: CurrentUser;\n relatedVideos: RelatedVideosHash;\n queryParams: PlayViewQueryParams;\n hasProduct: HasProductFunc;\n audiences: PresentationAudience[];\n shareId?: string;\n canManageVideoAccess: boolean;\n pointsOfInterest?: PointOfInterest[];\n featureAccess: VideoFeaturesHash;\n tableOfContentsId: string;\n shouldShowSideTableOfContents: boolean;\n hasTopicDirectories: boolean;\n hasTheatreMode: boolean;\n breadcrumbs?: Breadcrumb[];\n commonVideoProps: CommonVideoProps;\n}\n\nexport function PlayClip(props: PlayClipProps): JSX.Element {\n const playerContext = usePlayerContext();\n\n const { hasPermissions } = usePermissions();\n const { canConsume } = VideoHelper.getCanBeConsumed(props.clip);\n \n const theatreMode = getIsTheatreMode(props.hasTheatreMode, playerContext);\n const shouldUseTheareModeStyle = useTheatreModeStyle(\n props.hasTheatreMode,\n playerContext.mode,\n playerContext.defaultDisplayMode\n );\n\n function toggleTheatreMode(value: boolean) {\n playerContext.playerRef?.current?.toggleTheatreMode?.(value);\n }\n\n const {\n tableOfContentsActiveId,\n setTableOfContentsActiveId,\n controlledId,\n setControlledId,\n tableOfContentsExpanded,\n onToggleTableOfContents\n } = usePlayPageTableOfContent(props.tableOfContentsId, props.hasTheatreMode, theatreMode);\n\n const hasGlance = hasGlanceData(props.clip) && props.featureAccess.canViewGlance;\n\n const { headingRef, headingElements } = useSectionHeadings(hasGlance);\n const items = headingElements.map(ele => {\n return {\n id: ele.id as PlayPageAnchor,\n name: PlayPageUtils.getSectionHeading(\n ele.id as PlayPageAnchor,\n {\n clips: props.clips,\n interactives: props.interactives,\n resources: props.clip.resources?.data,\n isPlayClipPage: true\n }\n )\n };\n });\n\n useTableOfContentsActiveHeading({\n setActiveId: setTableOfContentsActiveId,\n headingElements,\n controlledId,\n setControlledId\n });\n\n useTableOfContentsScroll(headingElements, controlledId);\n\n const isArchived = VideoHelper.isVideoTypeArchived(props.clip);\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\n /**\n * Need to use a ref because if we use state, onExitImmersiveReader will have a stale\n * reference of the state. This is because the state is changed in onLaunchImmersiveReader\n * which is passed in at the same time as onExitImmersiveReader\n */\n const shouldPlayOnExitImmersiveReader = React.useRef(false);\n\n const clipResourceAppLink = getResourceAppLink(\n props.clip.id,\n props.shareId,\n props.featureAccess.canViewResourceItems\n );\n\n useResourcePopup({\n resourcePopupId: props.queryParams?.resourceId,\n resources: props.clip.resources?.data,\n getResourceAppLink: clipResourceAppLink\n });\n\n function onLaunchImmersiveReader(): void {\n shouldPlayOnExitImmersiveReader.current = !playerContext?.playerRef?.current?.isPaused();\n playerContext?.playerRef?.current?.pause();\n }\n\n function onExitImmersiveReader(): void {\n if (!shouldPlayOnExitImmersiveReader.current)\n return;\n\n playerContext?.playerRef?.current?.play();\n }\n\n function canAccessOriginal(): boolean {\n if (!props.clip._parentVideo || !props.clip._canBeConsumed?.value)\n return false;\n\n if (!props.currentUser?.isAuthenticated)\n return false;\n\n if (!props.hasProduct(ProductId.Primary))\n return false;\n\n if (hasStudentExperience)\n return false;\n\n return true;\n }\n\n function getOriginalVideoAppLink(): Core.AppLink {\n if (!canAccessOriginal())\n return null;\n \n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [\n null,\n props.clip._parentVideo.id,\n TextHelper.slugify(props.clip._parentVideo.name)\n ]\n };\n }\n\n const showPlayerPlaceholder = playerContext.mode === 'picture-in-picture' || props.featureAccess.canViewPublicLayout;\n\n const otherClips = props.clips?.filter(c => c.id.toString() !== props.clip.id.toString()) ?? [];\n\n const calcClassNameProps = {\n hasTheatreMode: props.hasTheatreMode,\n shouldShowSideTableOfContents: props.shouldShowSideTableOfContents,\n tableOfContentsExpanded,\n theatreMode\n };\n const mainClassName = getMainClassName(calcClassNameProps);\n const contentClassName = getContentClassName(calcClassNameProps);\n\n const [ , setContainerClassName ] = useViewModel(ViewModelKeys.PLAY_PAGE_CONTAINER_CLASS_NAME);\n\n const resources = getResources(props.clip, hasPermissions(PermissionName.StudentExperience));\n const downloadableResources = resources.filter(MasterTypeHelper.isResource);\n\n function onDownloadClick() {\n if (downloadableResources.length === 1) {\n DownloadHelper.downloadResource(\n downloadableResources[0],\n { clipId: props.clip.id, clipName: props.clip.name },\n { location: LocationContext.PlayClip, actionType: UserAction.Download, entity: EntityType.Resource }\n );\n return;\n }\n \n Core.AppLinkHelper.trigger({\n application: AppChannels.VIDEOS,\n action: Actions.Videos.RESOURCE_DOWNLOAD,\n args: [ props.clip?.id, props.shareId ]\n });\n }\n \n React.useEffect(() => {\n if (!theatreMode) {\n setContainerClassName('');\n } else {\n setContainerClassName(styles.theatreModePlayPageContainer);\n }\n }, [theatreMode]);\n\n React.useEffect(() => {\n return () => setContainerClassName('');\n }, []);\n\n return (\n <div className={`px-4 play-page-sections-container ${props.shouldShowSideTableOfContents ? 'row g-0' : ''}`}>\n <main className={`${styles.main} ${mainClassName}`}>\n {!!props.breadcrumbs?.length && (\n <div className='mb-2'>\n <Breadcrumbs breadcrumbs={props.breadcrumbs} />\n </div>\n )}\n\n <RestrictionBanner\n restrictions={props.clip._restrictions}\n yearGroups={props.commonVideoProps.yearGroups}\n objectId={props.clip.id}\n objectTypeId={MasterType.Clip}\n canManageVideoAccess={props.canManageVideoAccess}\n />\n\n {isArchived && (\n <ArchivedBanner\n typeId={props.clip.typeId}\n hasStudentExperience={hasStudentExperience}\n />\n )}\n\n <section\n id={PlayPageAnchor.Video}\n className={`mb-2 ${SeoConstants.GLOBAL_PLAYER_SELECTOR}`}\n ref={el => { (el && headingRef?.current) && headingRef.current.set(PlayPageAnchor.Video, el); }}\n >\n {canConsume && (\n <GlobalPlayerConsumer\n key={props.clip.id}\n objectId={props.clip.id}\n objectTypeId={props.clip.typeId}\n shareId={props.shareId}\n context={props.queryParams?.context}\n contextId={props.queryParams?.contextId}\n moviesAndTv={props.queryParams?.mtv}\n playNext={props.queryParams?.playNext}\n startTime={props.queryParams?.t ?? props.queryParams?.startTime}\n mode='default'\n location='play-page'\n />\n )}\n\n <div className={showPlayerPlaceholder ? '' : 'd-none'}>\n <PlayerPlaceholder\n video={props.clip}\n type='pip'\n />\n </div>\n </section>\n\n <div className={contentClassName}>\n <div className={shouldUseTheareModeStyle ? `${styles.theatreModeLeftContent}` : 'w-100'}>\n <PlayPageTitleAndActions\n presentationSlug={null}\n media={props.clip}\n yearGroups={props.commonVideoProps.yearGroups}\n audiences={props.audiences}\n originalVideoAppLink={getOriginalVideoAppLink()}\n featureAccess={props.featureAccess}\n shareId={props.shareId}\n showTitlePadlock={!props.commonVideoProps.hasStudentExperience\n && !props.commonVideoProps.hasGuestExperience}\n />\n\n {/* if no glance render video details here */}\n {hasGlance ? (\n <VideoAtAGlanceV2\n video={props.clip}\n pointsOfInterest={props.pointsOfInterest}\n setStartTime={(time: number) => playerContext.playerRef.current?.currentTime(time)}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n canViewGlance={hasGlance}\n />\n ) : (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n getLibraryAppLink={getLibraryAppLink}\n getFolderAppLink={getFolderAppLink}\n />\n )}\n\n <PlayPageResources\n video={props.clip}\n canViewResources={props.featureAccess.canViewResourceItems}\n imageCdnUrl={props.commonVideoProps.imageCdnUrl}\n getAppLink={clipResourceAppLink}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n resourceThumbnailFallbackUrl={ImageUrls.Fallbacks.RESOURCE_THUMBNAIL}\n headingRef={headingRef}\n onDownloadClick={onDownloadClick}\n resources={resources}\n downloadableResources={downloadableResources}\n aboutResourcesAppLink={VideoAppLinkHelper.getAboutResourceAppLink()}\n />\n\n <PlayPageInteractives\n presentationSlug={null}\n video={props.clip}\n interactives={props.interactives}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n canViewInteractives={props.featureAccess.canViewInteractives}\n headingRef={headingRef}\n commonVideoProps={props.commonVideoProps}\n />\n\n <PlayPageClips\n presentationSlug={null}\n clips={otherClips || []}\n video={props.clip}\n canViewClips={props.featureAccess.canViewClips}\n audiences={props.audiences}\n headingRef={headingRef}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n commonVideoProps={props.commonVideoProps}\n />\n\n {/* if has glance, render video details here */}\n {hasGlance && (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n showHeading\n getLibraryAppLink={hasPermissions(PermissionName.ViewLibraries) ? getLibraryAppLink : null}\n getFolderAppLink={hasPermissions(PermissionName.ViewLibraries) ? getFolderAppLink : null}\n />\n )}\n \n {!!canAccessOriginal() && (\n <ClippedFrom\n originalVideo={props.clip._parentVideo}\n shareId={props.shareId}\n queryParams={props.queryParams}\n audiences={props.audiences}\n headingRef={headingRef}\n currentUser={props.currentUser}\n commonVideoProps={props.commonVideoProps}\n />\n )}\n\n {!VideoHelper.isUgc(props.clip._parentVideo) && (\n <CitationWidget\n headingRef={headingRef}\n media={props.clip}\n parentVideo={props.clip._parentVideo}\n contentRegion={props.currentUser.contentRegion}\n shareId={props.shareId}\n presentationSlug={null}\n />\n )}\n\n <RelatedVideos\n presentationSlug={null}\n currentVideo={props.clip}\n relatedVideos={props.relatedVideos}\n currentUser={props.currentUser}\n audiences={props.audiences}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv,\n includeContext: props.currentUser?.isAuthenticated\n }, null)}\n moviesAndTv={props.queryParams.mtv}\n commonVideoProps={props.commonVideoProps}\n />\n </div>\n {theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={ null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={true}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </div>\n </main>\n\n {!theatreMode && (\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n toggleTheatreMode={props.hasTheatreMode ? toggleTheatreMode : null}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ videoId: props.clip.id, videoName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n isTheatreMode={false}\n hasTranscription={props.hasTheatreMode}\n shouldShow={items.length >= TOC_IGNORE_BOUNDARY}\n />\n )}\n </div>\n );\n}\n"],"mappings":"wiDAeM,EAAY,kBAYlB,SAAgB,GAAY,EAAyB,CACnD,GAAM,CAAE,kBAAmB,EAAe,EACpC,EAAe,EAAgB,CAAE,SAAU,EAAqB,UAAW,iBAAkB,IAAK,CAAC,EAEzG,OACE,EAAA,EAAA,KAAA,CAAC,UAAD,CACE,UAAU,oBACV,GAAI,EAAe,YACnB,IAAK,GAAM,CACT,GAAO,EAAM,YAAY,SAAY,EAAM,WAAW,QAAQ,IAAI,EAAe,YAAa,CAAE,CAClG,WALF,EAOE,EAAA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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{t as e}from"./DMnm3Ewv.chunk.js";import{n as t}from"./B785hxeE.chunk.js";import{t as n}from"./CQyJ7YGa.chunk.js";import{t as r}from"./C2w0pmFW.chunk.js";import{t as i}from"./wrLrTezN.chunk.js";import{u as a}from"./BX0wDJmp.chunk.js";import{y as o}from"./NlCAcBdo.chunk.js";import{t as s}from"./DGmmTRu72.chunk.js";import{t as c}from"./DbSUQ2A12.chunk.js";import{t as l}from"./DZssmXj6.chunk.js";import{t as u}from"./BC8PeYqm.chunk.js";import{t as d}from"./LoQS6GjP.chunk.js";import{t as f}from"./CqrjHjAN.chunk.js";import{t as p}from"./XIE88U01.chunk.js";import{n as m,t as h}from"./C6-aC3vu.chunk.js";import{t as g}from"./7LGxCHGV.chunk.js";import{t as _}from"./Bbv3vbm7.chunk.js";import{t as v}from"./B3gsVN-_.chunk.js";import{l as y,r as b}from"./BxjzTnvL2.chunk.js";import{t as x}from"./Dfw0sxVt2.chunk.js";import{t as S}from"./C1loT8MD2.chunk.js";import{n as C}from"./ChnNWPOK2.chunk.js";import{t as w}from"./C9XBZFiR.chunk.js";import{t as T}from"./BnuuRu_J2.chunk.js";import{t as E}from"./CC5Dr9aG.chunk.js";import{t as D}from"./BYaCUOEW2.chunk.js";import{t as O}from"./DNuJUXpr2.chunk.js";import{v as k}from"./VJQU9c4G2.chunk.js";import{t as A}from"./B6GfukUn2.chunk.js";r();var j=i(),M=n.encloseNamespace(`shared.playClip`),N={notFound:p,forbidden:{privacy:_}};P.defaultProps={queryParams:{}};function P(n){let{context:r,contextId:i,mtv:p}=n.queryParams,{hasProduct:_}=x(),{commonVideoProps:P,hasCommonVideoPropsCompleted:F}=T({locationContext:o.PlayClip,mtv:p}),{hasPermissions:I}=v(),{hasTopicDirectories:L,hasPlayPageTranscript:R}=s(null),z=a(f.currentUser()),B=a(l.clip(n.id)),V=a(u.videoInteractives(n.id)),H=a(!!B.data?._parentVideo&&d.video(B.data._parentVideo.id));O([H.data]);let U=a(!!B.data?._parentVideo&&l.videoClips(B.data._parentVideo.id)),W=a(B.statusCode===e.Forbidden&&l.clip(n.id,c.StripMetadata)),G=b({video:H.data,context:r,contextId:i,moviesAndTv:p,currentUser:z.data}),K=D(),q=k(),J=y(n.id,!0),Y=S({objectId:B.data?.id,objectTypeId:B.data?.typeId}),X=E({name:B.data?.name});return h(m.getClipMetadata({content:B.data,phraseContext:{phraseHandler:M,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`}})),w(B,N,{forbidden:!0}),O(G.videos??[]),g(W),C({id:n.id,app:`clips`}),B.data&&z.hasCompleted&&J.hasCompleted&&F?(0,j.jsx)(A,{clip:B.data,clips:U.data?.data,interactives:V.data?.data,currentUser:z.data,relatedVideos:r===`playlist`?G:{...G,videos:[]},hasProduct:_,queryParams:n.queryParams,audiences:K.data,canManageVideoAccess:I(t.ManageVideoAccess),pointsOfInterest:J.items,featureAccess:Y,tableOfContentsId:n.queryParams?.tocId,shouldShowSideTableOfContents:q,breadcrumbs:X,commonVideoProps:P,hasTopicDirectories:L,hasTheatreMode:R}):(0,j.jsx)(j.Fragment,{})}export{P as PlayClipView};
2
- //# sourceMappingURL=C4OV7pr-.chunk.js.map
1
+ import"./DAXXjFlN.chunk.js";import{t as e}from"./DMnm3Ewv.chunk.js";import{n as t}from"./B785hxeE.chunk.js";import{t as n}from"./CQyJ7YGa.chunk.js";import{t as r}from"./C2w0pmFW.chunk.js";import{t as i}from"./wrLrTezN.chunk.js";import{u as a}from"./BX0wDJmp.chunk.js";import{y as o}from"./NlCAcBdo.chunk.js";import{t as s}from"./DGmmTRu72.chunk.js";import{t as c}from"./DbSUQ2A12.chunk.js";import{t as l}from"./DZssmXj6.chunk.js";import{t as u}from"./BC8PeYqm.chunk.js";import{t as d}from"./LoQS6GjP.chunk.js";import{t as f}from"./CqrjHjAN.chunk.js";import{t as p}from"./XIE88U01.chunk.js";import{n as m,t as h}from"./C6-aC3vu.chunk.js";import{t as g}from"./7LGxCHGV.chunk.js";import{t as _}from"./Bbv3vbm7.chunk.js";import{t as v}from"./B3gsVN-_.chunk.js";import{l as y,r as b}from"./D-iyHqNw2.chunk.js";import{t as x}from"./Dfw0sxVt2.chunk.js";import{t as S}from"./C1loT8MD2.chunk.js";import{n as C}from"./ChnNWPOK2.chunk.js";import{t as w}from"./C9XBZFiR.chunk.js";import{t as T}from"./BnuuRu_J2.chunk.js";import{t as E}from"./CC5Dr9aG.chunk.js";import{t as D}from"./BYaCUOEW2.chunk.js";import{t as O}from"./DNuJUXpr2.chunk.js";import{v as k}from"./BlsbWOzw2.chunk.js";import{t as A}from"./DN82USWW2.chunk.js";r();var j=i(),M=n.encloseNamespace(`shared.playClip`),N={notFound:p,forbidden:{privacy:_}};P.defaultProps={queryParams:{}};function P(n){let{context:r,contextId:i,mtv:p}=n.queryParams,{hasProduct:_}=x(),{commonVideoProps:P,hasCommonVideoPropsCompleted:F}=T({locationContext:o.PlayClip,mtv:p}),{hasPermissions:I}=v(),{hasTopicDirectories:L,hasPlayPageTranscript:R}=s(null),z=a(f.currentUser()),B=a(l.clip(n.id)),V=a(u.videoInteractives(n.id)),H=a(!!B.data?._parentVideo&&d.video(B.data._parentVideo.id));O([H.data]);let U=a(!!B.data?._parentVideo&&l.videoClips(B.data._parentVideo.id)),W=a(B.statusCode===e.Forbidden&&l.clip(n.id,c.StripMetadata)),G=b({video:H.data,context:r,contextId:i,moviesAndTv:p,currentUser:z.data}),K=D(),q=k(),J=y(n.id,!0),Y=S({objectId:B.data?.id,objectTypeId:B.data?.typeId}),X=E({name:B.data?.name});return h(m.getClipMetadata({content:B.data,phraseContext:{phraseHandler:M,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`}})),w(B,N,{forbidden:!0}),O(G.videos??[]),g(W),C({id:n.id,app:`clips`}),B.data&&z.hasCompleted&&J.hasCompleted&&F?(0,j.jsx)(A,{clip:B.data,clips:U.data?.data,interactives:V.data?.data,currentUser:z.data,relatedVideos:r===`playlist`?G:{...G,videos:[]},hasProduct:_,queryParams:n.queryParams,audiences:K.data,canManageVideoAccess:I(t.ManageVideoAccess),pointsOfInterest:J.items,featureAccess:Y,tableOfContentsId:n.queryParams?.tocId,shouldShowSideTableOfContents:q,breadcrumbs:X,commonVideoProps:P,hasTopicDirectories:L,hasTheatreMode:R}):(0,j.jsx)(j.Fragment,{})}export{P as PlayClipView};
2
+ //# sourceMappingURL=DWo8DfD9.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"C4OV7pr-.chunk.js","names":[],"sources":["../../src/shared/views/play-clip/PlayClipView.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { PermissionFilterOption } from 'libs/shared/enums/PermissionFilterOption';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { VideoPrivateError } from 'libs/shared/errors/videos/video-private/VideoPrivateError';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useBreadcrumbs } from 'libs/shared/hooks/useBreadcrumbs';\nimport { useCannotConsumeError } from 'libs/shared/hooks/useCannotConsumeError';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useProducts } from 'libs/shared/hooks/UseProducts';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Clip, ClipCollection, CurrentUser, InteractiveCollection, Video } from 'libs/shared/interfaces';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\nimport { useDeepLinks } from 'shared/hooks/useDeepLinks';\nimport { useFetchPointsOfInterest } from 'shared/hooks/useFetchPointsOfInterest';\nimport { useGetRelatedVideos } from 'shared/hooks/useGetRelatedVideos';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoFeatureAccess } from 'shared/hooks/useVideoFeatureAccess';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\nimport { useShouldShowSideTableOfContents } from 'shared/views/play/hooks/useShouldShowTableOfContents';\n\nimport { PlayClip } from './components/play-clip/PlayClip';\n\nexport interface PlayViewProps {\n id: string;\n queryParams?: PlayViewQueryParams;\n}\n\nconst namespace = 'shared.playClip';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst clipErrors = {\n notFound: NotFoundError,\n forbidden: {\n privacy: VideoPrivateError\n }\n};\n\nPlayClipView.defaultProps = {\n queryParams: {}\n};\n\nexport function PlayClipView(props: PlayViewProps): JSX.Element {\n const { context, contextId, mtv } = props.queryParams;\n\n const { hasProduct } = useProducts();\n const {\n commonVideoProps,\n hasCommonVideoPropsCompleted\n } = useCommonVideoProps({ locationContext: LocationContext.PlayClip, mtv });\n const { hasPermissions } = usePermissions();\n const { hasTopicDirectories, hasPlayPageTranscript } = useSettings(null);\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const clip = Flight.useBasicFetch<Clip>(ClipRequests.clip(props.id));\n\n const interactives = Flight.useBasicFetch<InteractiveCollection>(InteractiveRequests.videoInteractives(props.id));\n const video = Flight.useBasicFetch<Video>(\n !!clip.data?._parentVideo && VideoRequests.video(clip.data._parentVideo.id)\n );\n useVideoMixin([video.data]);\n\n const childClips = Flight.useBasicFetch<ClipCollection>(\n !!clip.data?._parentVideo && ClipRequests.videoClips(clip.data._parentVideo.id)\n );\n\n const strippedClip = Flight.useBasicFetch<Clip>(clip.statusCode === HttpStatus.Forbidden &&\n ClipRequests.clip(props.id, PermissionFilterOption.StripMetadata));\n const relatedVideos = useGetRelatedVideos({\n video: video.data,\n context,\n contextId,\n moviesAndTv: mtv,\n currentUser: currentUser.data\n });\n const audiences = usePresentationAudiences();\n const shouldShowSideTableOfContents = useShouldShowSideTableOfContents();\n\n const pointsOfInterest = useFetchPointsOfInterest(props.id, true);\n \n const featureAccess = useVideoFeatureAccess({\n objectId: clip.data?.id,\n objectTypeId: clip.data?.typeId\n });\n\n const breadcrumbs = useBreadcrumbs({ name: clip.data?.name });\n\n useSetPageMetadata(PageMetadataHelper.getClipMetadata({\n content: clip.data,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n }\n }));\n\n useHandleObjectError(clip, clipErrors, { forbidden: true });\n useVideoMixin(relatedVideos.videos ?? []);\n useCannotConsumeError(strippedClip);\n useDeepLinks({ id: props.id, app: 'clips' });\n\n const hasLoaded = (\n clip.data &&\n currentUser.hasCompleted &&\n pointsOfInterest.hasCompleted &&\n hasCommonVideoPropsCompleted\n );\n\n if (!hasLoaded)\n return <></>;\n\n return (\n <PlayClip\n clip={clip.data}\n clips={childClips.data?.data}\n interactives={interactives.data?.data}\n currentUser={currentUser.data}\n // we only show up next videos for clips in a playlist\n relatedVideos={context === 'playlist' ? relatedVideos : { ...relatedVideos, videos: []}}\n hasProduct={hasProduct}\n queryParams={props.queryParams}\n audiences={audiences.data}\n canManageVideoAccess={hasPermissions(PermissionName.ManageVideoAccess)}\n pointsOfInterest={pointsOfInterest.items}\n featureAccess={featureAccess}\n tableOfContentsId={props.queryParams?.tocId}\n shouldShowSideTableOfContents={shouldShowSideTableOfContents}\n breadcrumbs={breadcrumbs}\n commonVideoProps={commonVideoProps}\n hasTopicDirectories={hasTopicDirectories}\n hasTheatreMode={hasPlayPageTranscript}\n />\n );\n}\n"],"mappings":"2sCA4CM,EAAY,EAAgB,iBAAiB,iBAAS,EAEtD,EAAa,CACjB,SAAU,EACV,UAAW,CACT,QAAS,CACX,CACF,EAEA,EAAa,aAAe,CAC1B,YAAa,CAAC,CAChB,EAEA,SAAgB,EAAa,EAAmC,CAC9D,GAAM,CAAE,UAAS,YAAW,OAAQ,EAAM,YAEpC,CAAE,cAAe,EAAY,EAC7B,CACJ,mBACA,gCACE,EAAoB,CAAE,gBAAiB,EAAgB,SAAU,KAAI,CAAC,EACpE,CAAE,kBAAmB,EAAe,EACpC,CAAE,sBAAqB,yBAA0B,EAAY,IAAI,EAEjE,EAAc,EAAkC,EAAa,YAAY,CAAC,EAC1E,EAAO,EAA2B,EAAa,KAAK,EAAM,EAAE,CAAC,EAE7D,EAAe,EAA4C,EAAoB,kBAAkB,EAAM,EAAE,CAAC,EAC1G,EAAQ,EACZ,CAAC,CAAC,EAAK,MAAM,cAAgB,EAAc,MAAM,EAAK,KAAK,aAAa,EAAE,CAC5E,EACA,EAAc,CAAC,EAAM,IAAI,CAAC,EAE1B,IAAM,EAAa,EACjB,CAAC,CAAC,EAAK,MAAM,cAAgB,EAAa,WAAW,EAAK,KAAK,aAAa,EAAE,CAChF,EAEM,EAAe,EAA2B,EAAK,aAAe,EAAW,WAC7E,EAAa,KAAK,EAAM,GAAI,EAAuB,aAAa,CAAC,EAC7D,EAAgB,EAAoB,CACxC,MAAO,EAAM,KACb,UACA,YACA,YAAa,EACb,YAAa,EAAY,IAC3B,CAAC,EACK,EAAY,EAAyB,EACrC,EAAgC,EAAiC,EAEjE,EAAmB,EAAyB,EAAM,GAAI,EAAI,EAE1D,EAAgB,EAAsB,CAC1C,SAAU,EAAK,MAAM,GACrB,aAAc,EAAK,MAAM,MAC3B,CAAC,EAEK,EAAc,EAAe,CAAE,KAAM,EAAK,MAAM,IAAK,CAAC,EA0B5D,OAxBA,EAAmB,EAAmB,gBAAgB,CACpD,QAAS,EAAK,KACd,cAAe,CACb,cAAe,EACf,YAAa,YACb,kBAAmB,iBACrB,CACF,CAAC,CAAC,EAEF,EAAqB,EAAM,EAAY,CAAE,UAAW,EAAK,CAAC,EAC1D,EAAc,EAAc,QAAU,CAAC,CAAC,EACxC,EAAsB,CAAY,EAClC,EAAa,CAAE,GAAI,EAAM,GAAI,IAAK,OAAQ,CAAC,EAGzC,EAAK,MACL,EAAY,cACZ,EAAiB,cACjB,GAOA,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,KAAM,EAAK,KACX,MAAO,EAAW,MAAM,KACxB,aAAc,EAAa,MAAM,KACjC,YAAa,EAAY,KAEzB,cAAe,IAAY,WAAa,EAAgB,CAAE,GAAG,EAAe,OAAQ,CAAC,CAAC,EAC1E,aACZ,YAAa,EAAM,YACnB,UAAW,EAAU,KACrB,qBAAsB,EAAe,EAAe,iBAAiB,EACrE,iBAAkB,EAAiB,MACpB,gBACf,kBAAmB,EAAM,aAAa,MACP,gCAClB,cACK,mBACG,sBACrB,eAAgB,CACjB,CAAA,GAtBM,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CAwBf"}
1
+ {"version":3,"file":"DWo8DfD9.chunk.js","names":[],"sources":["../../src/shared/views/play-clip/PlayClipView.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { PermissionFilterOption } from 'libs/shared/enums/PermissionFilterOption';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { VideoPrivateError } from 'libs/shared/errors/videos/video-private/VideoPrivateError';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useBreadcrumbs } from 'libs/shared/hooks/useBreadcrumbs';\nimport { useCannotConsumeError } from 'libs/shared/hooks/useCannotConsumeError';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useProducts } from 'libs/shared/hooks/UseProducts';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Clip, ClipCollection, CurrentUser, InteractiveCollection, Video } from 'libs/shared/interfaces';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\nimport { useDeepLinks } from 'shared/hooks/useDeepLinks';\nimport { useFetchPointsOfInterest } from 'shared/hooks/useFetchPointsOfInterest';\nimport { useGetRelatedVideos } from 'shared/hooks/useGetRelatedVideos';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoFeatureAccess } from 'shared/hooks/useVideoFeatureAccess';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\nimport { useShouldShowSideTableOfContents } from 'shared/views/play/hooks/useShouldShowTableOfContents';\n\nimport { PlayClip } from './components/play-clip/PlayClip';\n\nexport interface PlayViewProps {\n id: string;\n queryParams?: PlayViewQueryParams;\n}\n\nconst namespace = 'shared.playClip';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst clipErrors = {\n notFound: NotFoundError,\n forbidden: {\n privacy: VideoPrivateError\n }\n};\n\nPlayClipView.defaultProps = {\n queryParams: {}\n};\n\nexport function PlayClipView(props: PlayViewProps): JSX.Element {\n const { context, contextId, mtv } = props.queryParams;\n\n const { hasProduct } = useProducts();\n const {\n commonVideoProps,\n hasCommonVideoPropsCompleted\n } = useCommonVideoProps({ locationContext: LocationContext.PlayClip, mtv });\n const { hasPermissions } = usePermissions();\n const { hasTopicDirectories, hasPlayPageTranscript } = useSettings(null);\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const clip = Flight.useBasicFetch<Clip>(ClipRequests.clip(props.id));\n\n const interactives = Flight.useBasicFetch<InteractiveCollection>(InteractiveRequests.videoInteractives(props.id));\n const video = Flight.useBasicFetch<Video>(\n !!clip.data?._parentVideo && VideoRequests.video(clip.data._parentVideo.id)\n );\n useVideoMixin([video.data]);\n\n const childClips = Flight.useBasicFetch<ClipCollection>(\n !!clip.data?._parentVideo && ClipRequests.videoClips(clip.data._parentVideo.id)\n );\n\n const strippedClip = Flight.useBasicFetch<Clip>(clip.statusCode === HttpStatus.Forbidden &&\n ClipRequests.clip(props.id, PermissionFilterOption.StripMetadata));\n const relatedVideos = useGetRelatedVideos({\n video: video.data,\n context,\n contextId,\n moviesAndTv: mtv,\n currentUser: currentUser.data\n });\n const audiences = usePresentationAudiences();\n const shouldShowSideTableOfContents = useShouldShowSideTableOfContents();\n\n const pointsOfInterest = useFetchPointsOfInterest(props.id, true);\n \n const featureAccess = useVideoFeatureAccess({\n objectId: clip.data?.id,\n objectTypeId: clip.data?.typeId\n });\n\n const breadcrumbs = useBreadcrumbs({ name: clip.data?.name });\n\n useSetPageMetadata(PageMetadataHelper.getClipMetadata({\n content: clip.data,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n }\n }));\n\n useHandleObjectError(clip, clipErrors, { forbidden: true });\n useVideoMixin(relatedVideos.videos ?? []);\n useCannotConsumeError(strippedClip);\n useDeepLinks({ id: props.id, app: 'clips' });\n\n const hasLoaded = (\n clip.data &&\n currentUser.hasCompleted &&\n pointsOfInterest.hasCompleted &&\n hasCommonVideoPropsCompleted\n );\n\n if (!hasLoaded)\n return <></>;\n\n return (\n <PlayClip\n clip={clip.data}\n clips={childClips.data?.data}\n interactives={interactives.data?.data}\n currentUser={currentUser.data}\n // we only show up next videos for clips in a playlist\n relatedVideos={context === 'playlist' ? relatedVideos : { ...relatedVideos, videos: []}}\n hasProduct={hasProduct}\n queryParams={props.queryParams}\n audiences={audiences.data}\n canManageVideoAccess={hasPermissions(PermissionName.ManageVideoAccess)}\n pointsOfInterest={pointsOfInterest.items}\n featureAccess={featureAccess}\n tableOfContentsId={props.queryParams?.tocId}\n shouldShowSideTableOfContents={shouldShowSideTableOfContents}\n breadcrumbs={breadcrumbs}\n commonVideoProps={commonVideoProps}\n hasTopicDirectories={hasTopicDirectories}\n hasTheatreMode={hasPlayPageTranscript}\n />\n );\n}\n"],"mappings":"2sCA4CM,EAAY,EAAgB,iBAAiB,iBAAS,EAEtD,EAAa,CACjB,SAAU,EACV,UAAW,CACT,QAAS,CACX,CACF,EAEA,EAAa,aAAe,CAC1B,YAAa,CAAC,CAChB,EAEA,SAAgB,EAAa,EAAmC,CAC9D,GAAM,CAAE,UAAS,YAAW,OAAQ,EAAM,YAEpC,CAAE,cAAe,EAAY,EAC7B,CACJ,mBACA,gCACE,EAAoB,CAAE,gBAAiB,EAAgB,SAAU,KAAI,CAAC,EACpE,CAAE,kBAAmB,EAAe,EACpC,CAAE,sBAAqB,yBAA0B,EAAY,IAAI,EAEjE,EAAc,EAAkC,EAAa,Y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EAAe,OAAQ,CAAC,CAAC,EAC1E,aACZ,YAAa,EAAM,YACnB,UAAW,EAAU,KACrB,qBAAsB,EAAe,EAAe,iBAAiB,EACrE,iBAAkB,EAAiB,MACpB,gBACf,kBAAmB,EAAM,aAAa,MACP,gCAClB,cACK,mBACG,sBACrB,eAAgB,CACjB,CAAA,GAtBM,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CAwBf"}
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["scripts/BpHA-MkZ.chunk.js","scripts/DAXXjFlN.chunk.js","scripts/BftnFbcr.chunk.js","scripts/CMDJWWg3.chunk.js","scripts/DPtsihFR.chunk.js","scripts/DMnm3Ewv.chunk.js","scripts/C2w0pmFW.chunk.js","scripts/wrLrTezN.chunk.js","scripts/NlCAcBdo.chunk.js","scripts/Dyy-PWHO.chunk.js","scripts/snXCXfT6.chunk.js","scripts/e57H3T-k.chunk.js","scripts/BVnMI-dl.chunk.js","scripts/Dr3Lux2e.chunk.js","scripts/wdQVW3s5.chunk.js","scripts/BGGL8m_U.chunk.js","scripts/B_N30_Kb.chunk.js","scripts/rPN1bfU12.chunk.js","scripts/BIzu5ufQ.chunk.js","scripts/CVHQXNzi2.chunk.js","scripts/_GCZ-60i.chunk.js","scripts/DFZS3Ffo.chunk.js","scripts/Bbp2U9GK.chunk.js","scripts/CduNFx13.chunk.js","css/9awfngRG.chunk.css","scripts/B2INd6bh.chunk.js","scripts/5ONJSThP.chunk.js","scripts/C7HU4huj.chunk.js","scripts/BRrNQXpU2.chunk.js","css/DVhPtkT7.chunk.css","scripts/WvK58Ge12.chunk.js","scripts/D3-wtcxf2.chunk.js","scripts/B3fF5gkg.chunk.js","scripts/DEZqrbCm.chunk.js","scripts/CQyJ7YGa.chunk.js","scripts/BDwjs8qz2.chunk.js","scripts/C0exjRXJ.chunk.js","scripts/Chgge8yX2.chunk.js","scripts/BteVhTv7.chunk.js","scripts/De16zmhB.chunk.js","scripts/BBEIIgZ6.chunk.js","css/BgzV9aK4.chunk.css","scripts/BicQH0Al.chunk.js","scripts/YjWbDb2Y.chunk.js","scripts/BRcHS92O2.chunk.js","scripts/Bs2PKr1I2.chunk.js","scripts/DZX1tZ-D2.chunk.js","scripts/BiqmNDlz2.chunk.js","scripts/BlGyXBAH2.chunk.js","scripts/Dc1hYuQ12.chunk.js","css/CuSUr3Gp.chunk.css","css/D5JKYURg.chunk.css","scripts/B1r_1ubU.chunk.js","scripts/C5f0lBCw2.chunk.js","css/DBshtiPC.chunk.css","scripts/BTcLMVw4.chunk.js","scripts/c7DC36s9.chunk.js","scripts/BVm7hIyo.chunk.js","scripts/BYSskNbK.chunk.js","scripts/FAs_d-DP.chunk.js","scripts/Bzihudtn.chunk.js","scripts/BFXddaSP.chunk.js","scripts/B3TDTJSl.chunk.js","scripts/CYSDN6kj.chunk.js","scripts/CVqxBe99.chunk.js","scripts/CNxJMwxC.chunk.js","scripts/CQRza4Ga.chunk.js","scripts/ByIC_M_8.chunk.js","scripts/Epqx0J1v.chunk.js","scripts/BUnh3rN0.chunk.js","css/zFl67mql.chunk.css","scripts/CXnhm0VS2.chunk.js","scripts/iZ7EqNA72.chunk.js","scripts/OL3Z6Yp62.chunk.js","scripts/TTO6HcNP.chunk.js","scripts/BJUbYu222.chunk.js","scripts/BBDxSGT52.chunk.js","scripts/jAbfamoi.chunk.js","scripts/DUXPuDp72.chunk.js","scripts/CdYjo8_g2.chunk.js","scripts/CbOJtYeK.chunk.js","scripts/CvHvrB-t.chunk.js","scripts/B6bB9two.chunk.js","scripts/BbgQJe-T.chunk.js","scripts/C1SLt-ar.chunk.js","scripts/CpFtf-tI2.chunk.js","scripts/CKOWgMyj2.chunk.js","scripts/D5yUWL7p2.chunk.js","scripts/xa4cS6Fq.chunk.js","scripts/DGmmTRu72.chunk.js","scripts/B_BV48Fy.chunk.js","scripts/BX0wDJmp.chunk.js","scripts/BruX4yYB.chunk.js","scripts/CqrjHjAN.chunk.js","scripts/Ky1--4w3.chunk.js","scripts/CZgWQFsJ.chunk.js","scripts/BGswYbRT.chunk.js","scripts/B9VCwo3g2.chunk.js","scripts/DsBWAM3I2.chunk.js","scripts/_42F7SIA2.chunk.js","scripts/Cr6TXzQQ2.chunk.js","scripts/CjA4Q5pm.chunk.js","scripts/CmcCVXi32.chunk.js","scripts/BcibGFe42.chunk.js","scripts/Cy6lZVxk.chunk.js","scripts/DYKH_3un.chunk.js","scripts/CunDpHqX2.chunk.js","css/0ZqRj7up.chunk.css","scripts/B5XaBzZh.chunk.js","scripts/DIENjKhZ.chunk.js","css/D2t3ESms.chunk.css","scripts/B_9JhhOa.chunk.js","scripts/BPavmm8c.chunk.js","css/DnhOr8Y7.chunk.css","scripts/CnnDkGmK.chunk.js","scripts/C3Wa868y.chunk.js","css/DvO5Hl4o.chunk.css","scripts/DerPQKk6.chunk.js","scripts/CFduwlo0.chunk.js","scripts/lhZ5v-iN2.chunk.js","css/BU5l8u5C.chunk.css","scripts/BiKac8UT2.chunk.js","scripts/Bm5qACA52.chunk.js","scripts/CcI-EKxs.chunk.js","scripts/CsF4wDV1.chunk.js","scripts/6ZXIO06e.chunk.js","scripts/DlEtkSBj2.chunk.js","scripts/CnsLb4V9.chunk.js","scripts/Dhx_Wqdc.chunk.js","scripts/DaT2nTfp.chunk.js","scripts/CDeqAwMc.chunk.js","scripts/ss6ZpC3s.chunk.js","scripts/GvIHspQt.chunk.js","scripts/FFbkHQcg.chunk.js","scripts/ClpxGEGl.chunk.js","scripts/CvNHBl0q.chunk.js","scripts/C-k6FY-f.chunk.js","scripts/BLm6PYXX.chunk.js","scripts/BM2EJL9g.chunk.js","scripts/DqXpeRGy.chunk.js","scripts/CCrnRkGN2.chunk.js","scripts/CXVBjdpb.chunk.js","scripts/gl4k7dtw.chunk.js","scripts/CQ0MgG2c.chunk.js","scripts/_jJAx6fU.chunk.js","scripts/CLjADRa42.chunk.js","css/DVdh6HWj.chunk.css"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./DAXXjFlN.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{t as i}from"./CZgWQFsJ.chunk.js";import{t as a}from"./D_gWf2lC.chunk.js";var o=e(t()),s={embeddedPlayer:`_embeddedPlayer_1cqbo_1`,placeholder:`_placeholder_1cqbo_8`},c=n();function l(e){let t=r(a.config()),n=t.hasCompleted,l=o.useMemo(()=>o.lazy(()=>i(()=>import(`./BpHA-MkZ.chunk.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146]))),[]);if(!n)return(0,c.jsx)(c.Fragment,{});let u=l;return(0,c.jsx)(o.Suspense,{fallback:(0,c.jsx)(`div`,{className:s.placeholder}),children:(0,c.jsx)(u,{viewKey:e.viewKey,playerApi:new URL(t.data.playerApiUrl),imageCdnUrl:t.data.imageCdnUrl,autoplay:!0,embed:!0,hotkeyElQuerySelector:`body`,className:s.embeddedPlayer})})}export{l as SmartEmbedView};
3
- //# sourceMappingURL=Bh-26cqn.chunk.js.map
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["scripts/BiWUSyJr.chunk.js","scripts/DAXXjFlN.chunk.js","scripts/BftnFbcr.chunk.js","scripts/CMDJWWg3.chunk.js","scripts/DPtsihFR.chunk.js","scripts/DMnm3Ewv.chunk.js","scripts/C2w0pmFW.chunk.js","scripts/wrLrTezN.chunk.js","scripts/NlCAcBdo.chunk.js","scripts/Dyy-PWHO.chunk.js","scripts/snXCXfT6.chunk.js","scripts/e57H3T-k.chunk.js","scripts/BVnMI-dl.chunk.js","scripts/Dr3Lux2e.chunk.js","scripts/wdQVW3s5.chunk.js","scripts/BGGL8m_U.chunk.js","scripts/B_N30_Kb.chunk.js","scripts/rPN1bfU12.chunk.js","scripts/BIzu5ufQ.chunk.js","scripts/CVHQXNzi2.chunk.js","scripts/_GCZ-60i.chunk.js","scripts/DFZS3Ffo.chunk.js","scripts/Bbp2U9GK.chunk.js","scripts/CduNFx13.chunk.js","css/9awfngRG.chunk.css","scripts/B2INd6bh.chunk.js","scripts/5ONJSThP.chunk.js","scripts/C7HU4huj.chunk.js","scripts/BRrNQXpU2.chunk.js","css/DVhPtkT7.chunk.css","scripts/WvK58Ge12.chunk.js","scripts/D3-wtcxf2.chunk.js","scripts/B3fF5gkg.chunk.js","scripts/DEZqrbCm.chunk.js","scripts/CQyJ7YGa.chunk.js","scripts/BDwjs8qz2.chunk.js","scripts/C0exjRXJ.chunk.js","scripts/Chgge8yX2.chunk.js","scripts/BteVhTv7.chunk.js","scripts/De16zmhB.chunk.js","scripts/BBEIIgZ6.chunk.js","css/BgzV9aK4.chunk.css","scripts/BicQH0Al.chunk.js","scripts/YjWbDb2Y.chunk.js","scripts/BRcHS92O2.chunk.js","scripts/Bs2PKr1I2.chunk.js","scripts/DZX1tZ-D2.chunk.js","scripts/BiqmNDlz2.chunk.js","scripts/BlGyXBAH2.chunk.js","scripts/Dc1hYuQ12.chunk.js","css/CuSUr3Gp.chunk.css","css/D5JKYURg.chunk.css","scripts/B1r_1ubU.chunk.js","scripts/C5f0lBCw2.chunk.js","css/DBshtiPC.chunk.css","scripts/DKDWcWxk.chunk.js","scripts/c7DC36s9.chunk.js","scripts/BVm7hIyo.chunk.js","scripts/BYSskNbK.chunk.js","scripts/FAs_d-DP.chunk.js","scripts/Bzihudtn.chunk.js","scripts/BFXddaSP.chunk.js","scripts/B3TDTJSl.chunk.js","scripts/CYSDN6kj.chunk.js","scripts/CVqxBe99.chunk.js","scripts/CNxJMwxC.chunk.js","scripts/CQRza4Ga.chunk.js","scripts/ByIC_M_8.chunk.js","scripts/Epqx0J1v.chunk.js","scripts/BUnh3rN0.chunk.js","css/zFl67mql.chunk.css","scripts/CXnhm0VS2.chunk.js","scripts/iZ7EqNA72.chunk.js","scripts/OL3Z6Yp62.chunk.js","scripts/TTO6HcNP.chunk.js","scripts/BJUbYu222.chunk.js","scripts/BBDxSGT52.chunk.js","scripts/jAbfamoi.chunk.js","scripts/DUXPuDp72.chunk.js","scripts/CdYjo8_g2.chunk.js","scripts/CbOJtYeK.chunk.js","scripts/CvHvrB-t.chunk.js","scripts/B6bB9two.chunk.js","scripts/BbgQJe-T.chunk.js","scripts/C1SLt-ar.chunk.js","scripts/CpFtf-tI2.chunk.js","scripts/CKOWgMyj2.chunk.js","scripts/D5yUWL7p2.chunk.js","scripts/xa4cS6Fq.chunk.js","scripts/DGmmTRu72.chunk.js","scripts/B_BV48Fy.chunk.js","scripts/BX0wDJmp.chunk.js","scripts/BruX4yYB.chunk.js","scripts/CqrjHjAN.chunk.js","scripts/Ky1--4w3.chunk.js","scripts/CZgWQFsJ.chunk.js","scripts/BGswYbRT.chunk.js","scripts/B9VCwo3g2.chunk.js","scripts/DsBWAM3I2.chunk.js","scripts/_42F7SIA2.chunk.js","scripts/Cr6TXzQQ2.chunk.js","scripts/CjA4Q5pm.chunk.js","scripts/CmcCVXi32.chunk.js","scripts/BcibGFe42.chunk.js","scripts/Cy6lZVxk.chunk.js","scripts/DYKH_3un.chunk.js","scripts/CunDpHqX2.chunk.js","css/0ZqRj7up.chunk.css","scripts/B5XaBzZh.chunk.js","scripts/DIENjKhZ.chunk.js","css/D2t3ESms.chunk.css","scripts/B_9JhhOa.chunk.js","scripts/BPavmm8c.chunk.js","css/DnhOr8Y7.chunk.css","scripts/CnnDkGmK.chunk.js","scripts/C3Wa868y.chunk.js","css/DvO5Hl4o.chunk.css","scripts/cDv6zuhh.chunk.js","scripts/Cqq1N9xw.chunk.js","scripts/lhZ5v-iN2.chunk.js","css/BU5l8u5C.chunk.css","scripts/BiKac8UT2.chunk.js","scripts/CNfmLVE82.chunk.js","scripts/CcI-EKxs.chunk.js","scripts/CsF4wDV1.chunk.js","scripts/6ZXIO06e.chunk.js","scripts/DlEtkSBj2.chunk.js","scripts/CnsLb4V9.chunk.js","scripts/Dhx_Wqdc.chunk.js","scripts/DaT2nTfp.chunk.js","scripts/CDeqAwMc.chunk.js","scripts/ss6ZpC3s.chunk.js","scripts/GvIHspQt.chunk.js","scripts/FFbkHQcg.chunk.js","scripts/ClpxGEGl.chunk.js","scripts/CvNHBl0q.chunk.js","scripts/C-k6FY-f.chunk.js","scripts/BLm6PYXX.chunk.js","scripts/BM2EJL9g.chunk.js","scripts/DqXpeRGy.chunk.js","scripts/CCrnRkGN2.chunk.js","scripts/CXVBjdpb.chunk.js","scripts/gl4k7dtw.chunk.js","scripts/CQ0MgG2c.chunk.js","scripts/_jJAx6fU.chunk.js","scripts/CLjADRa42.chunk.js","css/DVdh6HWj.chunk.css"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./DAXXjFlN.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{t as i}from"./CZgWQFsJ.chunk.js";import{t as a}from"./D_gWf2lC.chunk.js";var o=e(t()),s={embeddedPlayer:`_embeddedPlayer_1cqbo_1`,placeholder:`_placeholder_1cqbo_8`},c=n();function l(e){let t=r(a.config()),n=t.hasCompleted,l=o.useMemo(()=>o.lazy(()=>i(()=>import(`./BiWUSyJr.chunk.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146]))),[]);if(!n)return(0,c.jsx)(c.Fragment,{});let u=l;return(0,c.jsx)(o.Suspense,{fallback:(0,c.jsx)(`div`,{className:s.placeholder}),children:(0,c.jsx)(u,{viewKey:e.viewKey,playerApi:new URL(t.data.playerApiUrl),imageCdnUrl:t.data.imageCdnUrl,autoplay:!0,embed:!0,hotkeyElQuerySelector:`body`,className:s.embeddedPlayer})})}export{l as SmartEmbedView};
3
+ //# sourceMappingURL=Dnz8CbEu.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";8UAgBA,SAAgB,EAAe,EAAyC,CACtE,IAAM,EAAS,EAA6B,EAAe,OAAO,CAAC,EAE7D,EACJ,EAAO,aAGH,IAAmB,cAAoB,eAAW,OAAO,wgBAA+B,EAAG,CAAC,CAAC,EAEnG,GAAI,CAAC,EACH,OAAO,qBAAI,GAEb,IAAM,EAAS,EACf,OACE,WAAO,SAAP,CAAgB,UAAU,SAAC,MAAD,CAAK,UAAW,EAAO,WAAc,aAC7D,SAAC,EAAD,CAEE,QAAS,EAAM,QACf,UAAW,IAAI,IAAI,EAAO,KAAK,YAAY,EAC3C,YAAa,EAAO,KAAK,YAGzB,YACA,SAGA,sBAAsB,OACtB,UAAW,EAAO,cACnB,EACa,EAEpB","names":[],"ignoreList":[],"sources":["../../src/apps/embed/views/smart-embed/SmartEmbedView.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { Config } from 'libs/shared/interfaces';\n\nimport type { ClickViewPlayer } from 'projects/player/react/Player';\n\nimport styles from './smart-embed.module.scss';\n\ninterface SmartEmbedViewProps {\n viewKey: string;\n}\n\n// eslint-disable-next-line rulesdir/require-view-title\nexport function SmartEmbedView(props: SmartEmbedViewProps): JSX.Element {\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const hasLoaded = (\n config.hasCompleted\n );\n\n const LazyPlayer = React.useMemo(() => React.lazy(() => import('projects/player/react/Player')), []);\n\n if (!hasLoaded)\n return <></>;\n\n const Player = LazyPlayer as typeof ClickViewPlayer;\n return (\n <React.Suspense fallback={<div className={styles.placeholder} />}>\n <Player\n // Fetched\n viewKey={props.viewKey}\n playerApi={new URL(config.data.playerApiUrl)}\n imageCdnUrl={config.data.imageCdnUrl}\n\n // Options\n autoplay\n embed\n\n // Static\n hotkeyElQuerySelector='body'\n className={styles.embeddedPlayer}\n />\n </React.Suspense>\n );\n}\n"],"file":"Bh-26cqn.chunk.js"}
1
+ {"version":3,"mappings":";8UAgBA,SAAgB,EAAe,EAAyC,CACtE,IAAM,EAAS,EAA6B,EAAe,OAAO,CAAC,EAE7D,EACJ,EAAO,aAGH,IAAmB,cAAoB,eAAW,OAAO,wgBAA+B,EAAG,CAAC,CAAC,EAEnG,GAAI,CAAC,EACH,OAAO,qBAAI,GAEb,IAAM,EAAS,EACf,OACE,WAAO,SAAP,CAAgB,UAAU,SAAC,MAAD,CAAK,UAAW,EAAO,WAAc,aAC7D,SAAC,EAAD,CAEE,QAAS,EAAM,QACf,UAAW,IAAI,IAAI,EAAO,KAAK,YAAY,EAC3C,YAAa,EAAO,KAAK,YAGzB,YACA,SAGA,sBAAsB,OACtB,UAAW,EAAO,cACnB,EACa,EAEpB","names":[],"ignoreList":[],"sources":["../../src/apps/embed/views/smart-embed/SmartEmbedView.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { Config } from 'libs/shared/interfaces';\n\nimport type { ClickViewPlayer } from 'projects/player/react/Player';\n\nimport styles from './smart-embed.module.scss';\n\ninterface SmartEmbedViewProps {\n viewKey: string;\n}\n\n// eslint-disable-next-line rulesdir/require-view-title\nexport function SmartEmbedView(props: SmartEmbedViewProps): JSX.Element {\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const hasLoaded = (\n config.hasCompleted\n );\n\n const LazyPlayer = React.useMemo(() => React.lazy(() => import('projects/player/react/Player')), []);\n\n if (!hasLoaded)\n return <></>;\n\n const Player = LazyPlayer as typeof ClickViewPlayer;\n return (\n <React.Suspense fallback={<div className={styles.placeholder} />}>\n <Player\n // Fetched\n viewKey={props.viewKey}\n playerApi={new URL(config.data.playerApiUrl)}\n imageCdnUrl={config.data.imageCdnUrl}\n\n // Options\n autoplay\n embed\n\n // Static\n hotkeyElQuerySelector='body'\n className={styles.embeddedPlayer}\n />\n </React.Suspense>\n );\n}\n"],"file":"Dnz8CbEu.chunk.js"}
@@ -1,2 +1,2 @@
1
- import{o as e}from"./DAXXjFlN.chunk.js";import{t}from"./B_BV48Fy.chunk.js";import{t as n}from"./CQyJ7YGa.chunk.js";import{t as r}from"./C2w0pmFW.chunk.js";import{t as i}from"./wrLrTezN.chunk.js";import{u as a}from"./BX0wDJmp.chunk.js";import{I as o,l as s,y as c,z as l}from"./NlCAcBdo.chunk.js";import{t as u}from"./DIqO2TFN.chunk.js";import{t as d}from"./DTGfiG8Y.chunk.js";import{t as f}from"./DGmmTRu72.chunk.js";import{t as p}from"./C9a9PaRW2.chunk.js";import{t as m}from"./LoQS6GjP.chunk.js";import{t as h}from"./CqrjHjAN.chunk.js";import{t as g}from"./D_gWf2lC.chunk.js";import{t as _}from"./_GCZ-60i.chunk.js";import{t as v}from"./DB_BawmH2.chunk.js";import{t as y}from"./C4TNMYS42.chunk.js";import{n as b,t as x}from"./BGhJ8TEx.chunk.js";import{t as S}from"./BxjzTnvL2.chunk.js";import{t as C}from"./CXnhm0VS2.chunk.js";import{t as w}from"./DaT2nTfp.chunk.js";import{t as T}from"./CLJr5CXS.chunk.js";var E=e(r()),D=i(),O=n.encloseNamespace(`signUp.upsellStartTrial`);function k(e){let{upsellPresentationType:t,config:n,currentUser:r}=e;if(!t||!n||!r)return null;let i=t===d.Subject?`welcomeToClickView`:`welcomeToClickViewLive`,a=n?.liteUrl.includes(`staging`)?u.TutorialVideoHighlight[i].staging:u.TutorialVideoHighlight[i].production,o=r?.instanceRegion;return a?.[o]}function A(e){let[n,r]=E.useState(!1),i=C(),u=y(),{updateUserSettingAsync:A}=f(c.UpsellRequestForm),j=a(g.config()),M=a(h.currentUser()),N=a(M.data?.id&&h.user(M.data.id)),P=k({upsellPresentationType:u.upsellPresentationType,config:j.data,currentUser:M.data}),F=a(P&&m.sharedVideo(P.VIDEO,P.SHARE)),I=a(P&&x.createViewKey(P.SHARE,b.Share));async function L(){r(!0);try{let n=u.upsellPresentationType===d.Subject?v.ClickView:v.ClickViewLive;_.logUserAction({id:M.data?.id,jobTitle:N.data?.userProfile?.metadata?.jobTitle,variant:n},{actionType:l.Submit,entity:s.User,descriptor:o.TeacherRequestUpsell,location:c.UpsellRequestForm}),await A({name:t.SignUpVariant,value:v.Bundle,kind:p.Setting}),i.success(O(`successMessage`)),r(!1),e.closePopup()}catch{r(!1),i.error(O(`errorMessage`))}}let R=!!M.data&&!!j.data&&!!F.data&&!!I.data;return(0,D.jsxs)(w,{closePopup:e.closePopup,animation:e.animate,title:O(`title`),size:`lg`,bodyClassName:`d-flex flex-column gap-3`,showLoadingSpinner:!R,children:[(0,D.jsx)(`div`,{children:(0,D.jsx)(S,{config:j.data,currentUser:M.data,video:F.data,viewKey:I.data,presentationSlug:null,autoplay:!0})}),(0,D.jsx)(`p`,{className:`mb-0`,children:O(`description`)}),(0,D.jsx)(T,{onClickSecondary:e.closePopup,onClickPrimary:L,text:{primary:O(`startTrial`),secondary:O(`cancel`)},loading:n})]})}export{A as UpsellStartTrialView};
2
- //# sourceMappingURL=CukXgE1z.chunk.js.map
1
+ import{o as e}from"./DAXXjFlN.chunk.js";import{t}from"./B_BV48Fy.chunk.js";import{t as n}from"./CQyJ7YGa.chunk.js";import{t as r}from"./C2w0pmFW.chunk.js";import{t as i}from"./wrLrTezN.chunk.js";import{u as a}from"./BX0wDJmp.chunk.js";import{I as o,l as s,y as c,z as l}from"./NlCAcBdo.chunk.js";import{t as u}from"./DIqO2TFN.chunk.js";import{t as d}from"./DTGfiG8Y.chunk.js";import{t as f}from"./DGmmTRu72.chunk.js";import{t as p}from"./C9a9PaRW2.chunk.js";import{t as m}from"./LoQS6GjP.chunk.js";import{t as h}from"./CqrjHjAN.chunk.js";import{t as g}from"./D_gWf2lC.chunk.js";import{t as _}from"./_GCZ-60i.chunk.js";import{t as v}from"./DB_BawmH2.chunk.js";import{t as y}from"./C4TNMYS42.chunk.js";import{n as b,t as x}from"./BGhJ8TEx.chunk.js";import{t as S}from"./D-iyHqNw2.chunk.js";import{t as C}from"./CXnhm0VS2.chunk.js";import{t as w}from"./DaT2nTfp.chunk.js";import{t as T}from"./CLJr5CXS.chunk.js";var E=e(r()),D=i(),O=n.encloseNamespace(`signUp.upsellStartTrial`);function k(e){let{upsellPresentationType:t,config:n,currentUser:r}=e;if(!t||!n||!r)return null;let i=t===d.Subject?`welcomeToClickView`:`welcomeToClickViewLive`,a=n?.liteUrl.includes(`staging`)?u.TutorialVideoHighlight[i].staging:u.TutorialVideoHighlight[i].production,o=r?.instanceRegion;return a?.[o]}function A(e){let[n,r]=E.useState(!1),i=C(),u=y(),{updateUserSettingAsync:A}=f(c.UpsellRequestForm),j=a(g.config()),M=a(h.currentUser()),N=a(M.data?.id&&h.user(M.data.id)),P=k({upsellPresentationType:u.upsellPresentationType,config:j.data,currentUser:M.data}),F=a(P&&m.sharedVideo(P.VIDEO,P.SHARE)),I=a(P&&x.createViewKey(P.SHARE,b.Share));async function L(){r(!0);try{let n=u.upsellPresentationType===d.Subject?v.ClickView:v.ClickViewLive;_.logUserAction({id:M.data?.id,jobTitle:N.data?.userProfile?.metadata?.jobTitle,variant:n},{actionType:l.Submit,entity:s.User,descriptor:o.TeacherRequestUpsell,location:c.UpsellRequestForm}),await A({name:t.SignUpVariant,value:v.Bundle,kind:p.Setting}),i.success(O(`successMessage`)),r(!1),e.closePopup()}catch{r(!1),i.error(O(`errorMessage`))}}let R=!!M.data&&!!j.data&&!!F.data&&!!I.data;return(0,D.jsxs)(w,{closePopup:e.closePopup,animation:e.animate,title:O(`title`),size:`lg`,bodyClassName:`d-flex flex-column gap-3`,showLoadingSpinner:!R,children:[(0,D.jsx)(`div`,{children:(0,D.jsx)(S,{config:j.data,currentUser:M.data,video:F.data,viewKey:I.data,presentationSlug:null,autoplay:!0})}),(0,D.jsx)(`p`,{className:`mb-0`,children:O(`description`)}),(0,D.jsx)(T,{onClickSecondary:e.closePopup,onClickPrimary:L,text:{primary:O(`startTrial`),secondary:O(`cancel`)},loading:n})]})}export{A as UpsellStartTrialView};
2
+ //# sourceMappingURL=Dt5731Ay.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CukXgE1z.chunk.js","names":[],"sources":["../../src/apps/sign-up/views/upsell-start-trial/UpsellStartTrialView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/react/index';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, UpgradeBannerDescriptors, UserAction } from 'libs/analytics/interfaces';\n\nimport { MultiStepPopupViewProps } from 'libs/shared/components/multistep-popup/MultiStepPopup';\nimport { Popup } from 'libs/shared/components/popup/Popup';\nimport { HardCoded } from 'libs/shared/constants/HardCoded';\nimport { MediaIdType } from 'libs/shared/enums/MediaIdType';\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\nimport { SettingKind } from 'libs/shared/enums/SettingKind';\nimport { SettingName } from 'libs/shared/enums/SettingName';\nimport { SignUpVariant } from 'libs/shared/enums/SignUpVariant';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { PlayerRequests } from 'libs/shared/flight-requests/PlayerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Config, CurrentUser, PlayerViewKey, User, VideoTypes } from 'libs/shared/interfaces';\n\nimport { useUpsellContext } from 'shared/hooks/useUpsellContext';\nimport { LitePlayerView } from 'shared/views/lite-player/LitePlayerView';\n\nimport { RequestFlowControls } from 'apps/sign-up/components/request-flow-controls/RequestFlowControls';\n\nconst namespace = 'signUp.upsellStartTrial';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface GetTutorialVideoDetailOptions {\n upsellPresentationType: PresentationType;\n config: Config;\n currentUser: CurrentUser;\n}\n\nfunction getTutorialVideoDetail(options: GetTutorialVideoDetailOptions) {\n const { upsellPresentationType, config, currentUser } = options;\n if (!upsellPresentationType || !config || !currentUser)\n return null;\n \n const videoType = upsellPresentationType === PresentationType.Subject ? 'welcomeToClickView' : 'welcomeToClickViewLive';\n const instanceRegionVideoIds = config?.liteUrl.includes('staging') ?\n HardCoded.TutorialVideoHighlight[videoType].staging :\n HardCoded.TutorialVideoHighlight[videoType].production;\n const instanceRegion = currentUser?.instanceRegion;\n return instanceRegionVideoIds?.[instanceRegion as keyof typeof instanceRegionVideoIds];\n}\n\nexport interface UpsellStartTrialViewProps extends MultiStepPopupViewProps {}\n\nexport function UpsellStartTrialView(props: UpsellStartTrialViewProps) {\n const [ submitting, setSubmitting ] = React.useState(false);\n\n const alerts = useAlerts();\n \n const upsellContext = useUpsellContext();\n const { updateUserSettingAsync } = useSettings(LocationContext.UpsellRequestForm);\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const detailCurrentUser = Flight.useBasicFetch<User>(currentUser.data?.id && UserRequests.user(currentUser.data.id));\n\n const tutorialVideoDetail = getTutorialVideoDetail({\n upsellPresentationType: upsellContext.upsellPresentationType,\n config: config.data,\n currentUser: currentUser.data\n });\n\n const tutorialVideo = Flight.useBasicFetch<VideoTypes>(\n tutorialVideoDetail && VideoRequests.sharedVideo(tutorialVideoDetail.VIDEO, tutorialVideoDetail.SHARE)\n );\n \n const viewKey = Flight.useBasicFetch<PlayerViewKey>(\n tutorialVideoDetail && PlayerRequests.createViewKey(tutorialVideoDetail.SHARE, MediaIdType.Share)\n );\n\n async function onStartTrial() {\n setSubmitting(true);\n\n try {\n const variant = upsellContext.upsellPresentationType === PresentationType.Subject ?\n SignUpVariant.ClickView : SignUpVariant.ClickViewLive;\n\n AnalyticsHelper.logUserAction(\n {\n id: currentUser.data?.id,\n jobTitle: detailCurrentUser.data?.userProfile?.metadata?.jobTitle,\n variant\n },\n {\n actionType: UserAction.Submit,\n entity: EntityType.User,\n descriptor: UpgradeBannerDescriptors.TeacherRequestUpsell,\n location: LocationContext.UpsellRequestForm\n }\n );\n \n await updateUserSettingAsync({\n name: SettingName.SignUpVariant,\n value: SignUpVariant.Bundle,\n kind: SettingKind.Setting\n });\n\n alerts.success(getPhrase('successMessage'));\n setSubmitting(false);\n props.closePopup();\n } catch {\n setSubmitting(false);\n alerts.error(getPhrase('errorMessage'));\n }\n }\n\n const loaded = !!currentUser.data && !!config.data && !!tutorialVideo.data && !!viewKey.data;\n \n return (\n <Popup\n closePopup={props.closePopup}\n animation={props.animate}\n title={getPhrase('title')}\n size='lg'\n bodyClassName='d-flex flex-column gap-3'\n showLoadingSpinner={!loaded}\n >\n <div>\n <LitePlayerView\n config={config.data}\n currentUser={currentUser.data}\n video={tutorialVideo.data}\n viewKey={viewKey.data}\n presentationSlug={null}\n autoplay\n />\n </div>\n <p className='mb-0'>{getPhrase('description')}</p>\n <RequestFlowControls\n onClickSecondary={props.closePopup}\n onClickPrimary={onStartTrial}\n text={{\n primary: getPhrase('startTrial'),\n secondary: getPhrase('cancel')\n }}\n loading={submitting}\n />\n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,MAAM,EAAuB,CAC3B,KAAM,EAAY,cAClB,MAAO,EAAc,OACrB,KAAM,EAAY,OACpB,CAAC,EAED,EAAO,QAAQ,EAAU,gBAAgB,CAAC,EAC1C,EAAc,EAAK,EACnB,EAAM,WAAW,CACnB,MAAQ,CACN,EAAc,EAAK,EACnB,EAAO,MAAM,EAAU,cAAc,CAAC,CACxC,CACF,CAEA,IAAM,EAAS,CAAC,CAAC,EAAY,MAAQ,CAAC,CAAC,EAAO,MAAQ,CAAC,CAAC,EAAc,MAAQ,CAAC,CAAC,EAAQ,KAExF,OACE,EAAA,EAAA,KAAA,CAAC,EAAD,CACE,WAAY,EAAM,WAClB,UAAW,EAAM,QACjB,MAAO,EAAU,OAAO,EACxB,KAAK,KACL,cAAc,2BACd,mBAAoB,CAAC,WANvB,EAQE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAA,UACE,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,OAAQ,EAAO,KACf,YAAa,EAAY,KACzB,MAAO,EAAc,KACrB,QAAS,EAAQ,KACjB,iBAAkB,KAClB,SAAA,EACD,CAAA,CACE,CAAA,GACL,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,gBAAQ,EAAU,aAAa,CAAK,CAAA,GACjD,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,iBAAkB,EAAM,WACxB,eAAgB,EAChB,KAAM,CACJ,QAAS,EAAU,YAAY,EAC/B,UAAW,EAAU,QAAQ,CAC/B,EACA,QAAS,CACV,CAAA,CACI,GAEX"}
1
+ {"version":3,"file":"Dt5731Ay.chunk.js","names":[],"sources":["../../src/apps/sign-up/views/upsell-start-trial/UpsellStartTrialView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/react/index';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, UpgradeBannerDescriptors, UserAction } from 'libs/analytics/interfaces';\n\nimport { MultiStepPopupViewProps } from 'libs/shared/components/multistep-popup/MultiStepPopup';\nimport { Popup } from 'libs/shared/components/popup/Popup';\nimport { HardCoded } from 'libs/shared/constants/HardCoded';\nimport { MediaIdType } from 'libs/shared/enums/MediaIdType';\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\nimport { SettingKind } from 'libs/shared/enums/SettingKind';\nimport { SettingName } from 'libs/shared/enums/SettingName';\nimport { SignUpVariant } from 'libs/shared/enums/SignUpVariant';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { PlayerRequests } from 'libs/shared/flight-requests/PlayerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Config, CurrentUser, PlayerViewKey, User, VideoTypes } from 'libs/shared/interfaces';\n\nimport { useUpsellContext } from 'shared/hooks/useUpsellContext';\nimport { LitePlayerView } from 'shared/views/lite-player/LitePlayerView';\n\nimport { RequestFlowControls } from 'apps/sign-up/components/request-flow-controls/RequestFlowControls';\n\nconst namespace = 'signUp.upsellStartTrial';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface GetTutorialVideoDetailOptions {\n upsellPresentationType: PresentationType;\n config: Config;\n currentUser: CurrentUser;\n}\n\nfunction getTutorialVideoDetail(options: GetTutorialVideoDetailOptions) {\n const { upsellPresentationType, config, currentUser } = options;\n if (!upsellPresentationType || !config || !currentUser)\n return null;\n \n const videoType = upsellPresentationType === PresentationType.Subject ? 'welcomeToClickView' : 'welcomeToClickViewLive';\n const instanceRegionVideoIds = config?.liteUrl.includes('staging') ?\n HardCoded.TutorialVideoHighlight[videoType].staging :\n HardCoded.TutorialVideoHighlight[videoType].production;\n const instanceRegion = currentUser?.instanceRegion;\n return instanceRegionVideoIds?.[instanceRegion as keyof typeof instanceRegionVideoIds];\n}\n\nexport interface UpsellStartTrialViewProps extends MultiStepPopupViewProps {}\n\nexport function UpsellStartTrialView(props: UpsellStartTrialViewProps) {\n const [ submitting, setSubmitting ] = React.useState(false);\n\n const alerts = useAlerts();\n \n const upsellContext = useUpsellContext();\n const { updateUserSettingAsync } = useSettings(LocationContext.UpsellRequestForm);\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const detailCurrentUser = Flight.useBasicFetch<User>(currentUser.data?.id && UserRequests.user(currentUser.data.id));\n\n const tutorialVideoDetail = getTutorialVideoDetail({\n upsellPresentationType: upsellContext.upsellPresentationType,\n config: config.data,\n currentUser: currentUser.data\n });\n\n const tutorialVideo = Flight.useBasicFetch<VideoTypes>(\n tutorialVideoDetail && VideoRequests.sharedVideo(tutorialVideoDetail.VIDEO, tutorialVideoDetail.SHARE)\n );\n \n const viewKey = Flight.useBasicFetch<PlayerViewKey>(\n tutorialVideoDetail && PlayerRequests.createViewKey(tutorialVideoDetail.SHARE, MediaIdType.Share)\n );\n\n async function onStartTrial() {\n setSubmitting(true);\n\n try {\n const variant = upsellContext.upsellPresentationType === PresentationType.Subject ?\n SignUpVariant.ClickView : SignUpVariant.ClickViewLive;\n\n AnalyticsHelper.logUserAction(\n {\n id: currentUser.data?.id,\n jobTitle: detailCurrentUser.data?.userProfile?.metadata?.jobTitle,\n variant\n },\n {\n actionType: UserAction.Submit,\n entity: EntityType.User,\n descriptor: UpgradeBannerDescriptors.TeacherRequestUpsell,\n location: LocationContext.UpsellRequestForm\n }\n );\n \n await updateUserSettingAsync({\n name: SettingName.SignUpVariant,\n value: SignUpVariant.Bundle,\n kind: SettingKind.Setting\n });\n\n alerts.success(getPhrase('successMessage'));\n setSubmitting(false);\n props.closePopup();\n } catch {\n setSubmitting(false);\n alerts.error(getPhrase('errorMessage'));\n }\n }\n\n const loaded = !!currentUser.data && !!config.data && !!tutorialVideo.data && !!viewKey.data;\n \n return (\n <Popup\n closePopup={props.closePopup}\n animation={props.animate}\n title={getPhrase('title')}\n size='lg'\n bodyClassName='d-flex flex-column gap-3'\n showLoadingSpinner={!loaded}\n >\n <div>\n <LitePlayerView\n config={config.data}\n currentUser={currentUser.data}\n video={tutorialVideo.data}\n viewKey={viewKey.data}\n presentationSlug={null}\n autoplay\n />\n </div>\n <p className='mb-0'>{getPhrase('description')}</p>\n <RequestFlowControls\n onClickSecondary={props.closePopup}\n onClickPrimary={onStartTrial}\n text={{\n primary: getPhrase('startTrial'),\n secondary: getPhrase('cancel')\n }}\n loading={submitting}\n />\n </Popup>\n );\n}\n"],"mappings":"g6BA8BM,EAAY,EAAgB,iBAAiB,yBAAS,EAQ5D,SAAS,EAAuB,EAAwC,CACtE,GAAM,CAAE,yBAAwB,SAAQ,eAAgB,EACxD,GAAI,CAAC,GAA0B,CAAC,GAAU,CAAC,EACzC,OAAO,KAET,IAAM,EAAY,IAA2B,EAAiB,QAAU,qBAAuB,yBACzF,EAAyB,GAAQ,QAAQ,SAAS,SAAS,EAC/D,EAAU,uBAAuB,EAAU,CAAC,QAC5C,EAAU,uBAAuB,EAAU,CAAC,WACxC,EAAiB,GAAa,eACpC,OAAO,IAAyB,EAClC,CAIA,SAAgB,EAAqB,EAAkC,CACrE,GAAM,CAAE,EAAY,GAAA,EAAwB,SAAS,EAAK,EAEpD,EAAS,EAAU,EAEnB,EAAgB,EAAiB,EACjC,CAAE,0BAA2B,EAAY,EAAgB,iBAAiB,EAC1E,EAAS,EAA6B,EAAe,OAAO,CAAC,EAC7D,EAAc,EAAkC,EAAa,YAAY,CAAC,EAC1E,EAAoB,EAA2B,EAAY,MAAM,IAAM,EAAa,KAAK,EAAY,KAAK,EAAE,CAAC,EAE7G,EAAsB,EAAuB,CACjD,uBAAwB,EAAc,uBACtC,OAAQ,EAAO,KACf,YAAa,EAAY,IAC3B,CAAC,EAEK,EAAgB,EACpB,GAAuB,EAAc,YAAY,EAAoB,MAAO,EAAoB,KAAK,CACvG,EAEM,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U,YAAY,EAC/B,UAAW,EAAU,QAAQ,CAC/B,EACA,QAAS,CACV,CAAA,CACI,GAEX"}
@@ -1,2 +1,2 @@
1
- import"./DAXXjFlN.chunk.js";import{n as e,t}from"./snXCXfT6.chunk.js";import{t as n}from"./CQyJ7YGa.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{u as s}from"./BX0wDJmp.chunk.js";import{t as c}from"./CjA4Q5pm.chunk.js";import{U as l,a as u,l as d,y as f,z as p}from"./NlCAcBdo.chunk.js";import{t as m}from"./C5j5LRut2.chunk.js";import{t as h}from"./CVHQXNzi2.chunk.js";import{t as g}from"./BrbeV-Gn2.chunk.js";import{t as _}from"./DZssmXj6.chunk.js";import{t as v}from"./BC8PeYqm.chunk.js";import{t as y}from"./LoQS6GjP.chunk.js";import{t as b}from"./CqrjHjAN.chunk.js";import{t as x}from"./eoAypzU3.chunk.js";import{t as S}from"./D_gWf2lC.chunk.js";import{t as C}from"./Bbp2U9GK.chunk.js";import{t as w}from"./C6-aC3vu.chunk.js";import{n as T,t as E}from"./BGhJ8TEx.chunk.js";import{t as D}from"./BxjzTnvL2.chunk.js";import{n as O,t as k}from"./CpFtf-tI2.chunk.js";import{t as A}from"./BxYKQEUG2.chunk.js";import{t as j}from"./jAbfamoi.chunk.js";import{t as M}from"./Z4RlHaVG.chunk.js";import{t as N}from"./tnBD84bg2.chunk.js";import{t as P}from"./D1aO6GEr.chunk.js";import{t as F}from"./C9XBZFiR.chunk.js";import{t as I}from"./IqGr9V7u2.chunk.js";import{n as L,r as R,t as z}from"./DusJhHeW2.chunk.js";i();var B=j(),V={closeButton:`_closeButton_1bg8h_1`,descriptionBorder:`_descriptionBorder_1bg8h_7`},H=a(),U=`shared.videoDetails`,W=n.encloseNamespace(U);function G(e){let{label:t,items:n,className:r}=e;return n&&n.data&&n.data.length?(0,H.jsxs)(`div`,{className:r,children:[t,`: `,n.data.map(e=>e.name).join(`, `)]}):(0,H.jsx)(H.Fragment,{})}function K(e){let{video:t}=e;if(!g.isVideo(t)&&!g.isClip(t))return(0,H.jsx)(H.Fragment,{});let n=g.getParentVideo(t);return(0,H.jsxs)(`div`,{className:t.description?`col-md-5 ps-md-3 pt-3 pt-md-0`:`col-12`,children:[(0,H.jsx)(`h2`,{className:`h6 mb-1`,children:(0,H.jsx)(O,{phrase:`details`})}),!!n.productionYear&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`productionYear`,options:{year:n.productionYear}})}),(0,H.jsx)(G,{label:W(`productionCompanies`,{smartCount:n.productionCompanies?.data?.length}),items:n.productionCompanies,className:`mb-1`}),(0,H.jsx)(G,{label:W(`distributors`,{smartCount:n.distributors?.data?.length}),items:n.distributors,className:`mb-1`}),(0,H.jsx)(G,{label:W(`producers`,{smartCount:n.producers?.data?.length}),items:n.producers,className:`mb-1`}),(0,H.jsx)(G,{label:W(`directors`,{smartCount:n.directors?.data?.length}),items:n.directors,className:`mb-1`}),!!n.dateBroadcast&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`dateBroadcast`,options:{date:c.format(n.dateBroadcast,`DD/MM/YYYY`)}})}),!!n.channel&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`channel`,options:{channel:n.channel.name}})}),g.canViewUploadDate(e.video)&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`dateUploaded`,options:{date:c.format(t.dateCreated,`DD/MM/YYYY`)}})})]})}function q(e){let{video:t,maxHeight:n=368}=e,i=g.getParentVideo(t),a=!!e.video.description,o=z(e.video)||!!i.productionYear||!!i.dateBroadcast||!!i.channel||g.canViewUploadDate(e.video),s=typeof e.onClickClose==`function`,c=typeof e.onClickShowCurriculumLinks==`function`;function l(){return e.hideTags||g.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags.data}return!a&&!o?(0,H.jsx)(H.Fragment,{}):(0,H.jsx)(k.Provider,{value:U,children:(0,H.jsxs)(`div`,{className:`rounded border p-3 mb-3 position-relative`,children:[(0,H.jsx)(B.Scrollbars,{autoHeight:!0,autoHeightMax:n,children:(0,H.jsxs)(`div`,{className:`row g-0`,children:[a&&(0,H.jsxs)(`div`,{className:o?`${V.descriptionBorder} pe-3 col-md-7`:`col-12`,children:[(0,H.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,H.jsx)(`h2`,{className:`h6 mb-1`,children:(0,H.jsx)(O,{phrase:`description`})}),(0,H.jsx)(I,{text:t.description,title:t.name,className:`ps-2`,onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:f.PlayPage,entity:d.Video,actionType:p.Click,descriptor:u.LaunchImmersiveReader},analyticsData:{id:t.id,type:`description`}})]}),(0,H.jsx)(`p`,{className:`mb-0`,dangerouslySetInnerHTML:{__html:r.sanitize(N.linkifyText(e.video.description,{nl2br:!0}))}}),(0,H.jsx)(L,{tags:l(),...R.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity),className:`mt-1`}),c&&(0,H.jsx)(C,{onClick:e.onClickShowCurriculumLinks,className:`cursor-pointer d-inline-block fw-semibold text-info mt-2 mb-1`,children:(0,H.jsx)(O,{namespace:U,phrase:`seeCurriculumLinks`})})]}),o&&(0,H.jsx)(K,{...e})]})}),s&&(0,H.jsx)(`button`,{type:`button`,className:`btn-close ${V.closeButton}`,"aria-label":`Close`,onClick:e.onClickClose})]})})}var J=`userManager.studentsVideo`,Y=n.encloseNamespace(J);function X(e,t){return t.toString()===h.Clip.toString()?_.clip(e):t.toString()===h.Interactive.toString()?v.interactiveMetadata(e):y.video(e)}function Z(e){return e.toString()===h.Clip.toString()?`messageClip`:e.toString()===h.Interactive.toString()?`messageInteractive`:`messageVideo`}function Q(r){let i=s(P.getUser(r.userId)),a=s(X(r.id,r.typeId)),c=s(E.createViewKey(r.id,T.MasterObject)),u=s(S.config()),d=s(b.currentUser());F([i,a]),w({title:i.data?n.getPhrase(J,`pageTitle`,{name:m.getFullName(i.data)}):``});function h(){let e={entity:g.getAnalyticsEntity(a.data),location:f.ViewStudentVideos},t={id:a.data.id},n=[];return g.isVideo(a.data)&&n.push({order:1,label:Y(`download`),appLink:{application:o.VIDEOS,action:x.Videos.DOWNLOAD_VIDEO,args:[a.data.id]},analyticsOptions:{...e,actionType:p.Download,workflowPhase:l.Start},analyticsData:t}),n.push({order:2,label:Y(`delete`),appLink:{application:o.USER_MANAGER,action:x.UserManager.DELETE_STUDENTS_VIDEO,args:[r.id,a.data.id],params:{typeId:a.data.typeId}},className:`text-danger`,analyticsOptions:{...e,actionType:p.Delete,workflowPhase:l.Start},analyticsData:t}),n}return i.hasCompleted&&a.hasCompleted&&c.hasCompleted&&u.hasCompleted&&d.hasCompleted?(0,H.jsxs)(`div`,{className:`px-3`,children:[(0,H.jsx)(`div`,{className:`alert text-dark bg-light-blue px-2 rounded d-flex flex-column flex-lg-row justify-content-between mb-3 align-items-center`,role:`alert`,children:(0,H.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,H.jsx)(t,{svg:A,size:e.Standard,className:`me-2 svg-container`}),(0,H.jsx)(`div`,{className:`w-100`,children:(0,H.jsx)(`p`,{className:`fw-semibold mb-0`,children:Y(Z(r.typeId),{name:m.getFullName(i.data),yearGroup:i.data.masterYearGroup?.name})})})]})}),(0,H.jsx)(`div`,{className:`mb-3`,children:(0,H.jsx)(D,{config:u.data,video:a.data,currentUser:d.data,viewKey:c.data,presentationSlug:null})}),(0,H.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center mb-2`,children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(`h1`,{className:`h3 d-inline-flex m-0 mb-2`,children:a.data.name})}),(0,H.jsx)(M,{actions:h(),actionsDropdownClassName:`btn btn-outline-dark`})]}),(0,H.jsx)(q,{video:a.data})]}):(0,H.jsx)(H.Fragment,{})}export{Q as StudentsVideoView};
2
- //# sourceMappingURL=DCPsmD1m.chunk.js.map
1
+ import"./DAXXjFlN.chunk.js";import{n as e,t}from"./snXCXfT6.chunk.js";import{t as n}from"./CQyJ7YGa.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{u as s}from"./BX0wDJmp.chunk.js";import{t as c}from"./CjA4Q5pm.chunk.js";import{U as l,a as u,l as d,y as f,z as p}from"./NlCAcBdo.chunk.js";import{t as m}from"./C5j5LRut2.chunk.js";import{t as h}from"./CVHQXNzi2.chunk.js";import{t as g}from"./BrbeV-Gn2.chunk.js";import{t as _}from"./DZssmXj6.chunk.js";import{t as v}from"./BC8PeYqm.chunk.js";import{t as y}from"./LoQS6GjP.chunk.js";import{t as b}from"./CqrjHjAN.chunk.js";import{t as x}from"./eoAypzU3.chunk.js";import{t as S}from"./D_gWf2lC.chunk.js";import{t as C}from"./Bbp2U9GK.chunk.js";import{t as w}from"./C6-aC3vu.chunk.js";import{n as T,t as E}from"./BGhJ8TEx.chunk.js";import{t as D}from"./D-iyHqNw2.chunk.js";import{n as O,t as k}from"./CpFtf-tI2.chunk.js";import{t as A}from"./BxYKQEUG2.chunk.js";import{t as j}from"./jAbfamoi.chunk.js";import{t as M}from"./Z4RlHaVG.chunk.js";import{t as N}from"./tnBD84bg2.chunk.js";import{t as P}from"./D1aO6GEr.chunk.js";import{t as F}from"./C9XBZFiR.chunk.js";import{t as I}from"./IqGr9V7u2.chunk.js";import{n as L,r as R,t as z}from"./DusJhHeW2.chunk.js";i();var B=j(),V={closeButton:`_closeButton_1bg8h_1`,descriptionBorder:`_descriptionBorder_1bg8h_7`},H=a(),U=`shared.videoDetails`,W=n.encloseNamespace(U);function G(e){let{label:t,items:n,className:r}=e;return n&&n.data&&n.data.length?(0,H.jsxs)(`div`,{className:r,children:[t,`: `,n.data.map(e=>e.name).join(`, `)]}):(0,H.jsx)(H.Fragment,{})}function K(e){let{video:t}=e;if(!g.isVideo(t)&&!g.isClip(t))return(0,H.jsx)(H.Fragment,{});let n=g.getParentVideo(t);return(0,H.jsxs)(`div`,{className:t.description?`col-md-5 ps-md-3 pt-3 pt-md-0`:`col-12`,children:[(0,H.jsx)(`h2`,{className:`h6 mb-1`,children:(0,H.jsx)(O,{phrase:`details`})}),!!n.productionYear&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`productionYear`,options:{year:n.productionYear}})}),(0,H.jsx)(G,{label:W(`productionCompanies`,{smartCount:n.productionCompanies?.data?.length}),items:n.productionCompanies,className:`mb-1`}),(0,H.jsx)(G,{label:W(`distributors`,{smartCount:n.distributors?.data?.length}),items:n.distributors,className:`mb-1`}),(0,H.jsx)(G,{label:W(`producers`,{smartCount:n.producers?.data?.length}),items:n.producers,className:`mb-1`}),(0,H.jsx)(G,{label:W(`directors`,{smartCount:n.directors?.data?.length}),items:n.directors,className:`mb-1`}),!!n.dateBroadcast&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`dateBroadcast`,options:{date:c.format(n.dateBroadcast,`DD/MM/YYYY`)}})}),!!n.channel&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`channel`,options:{channel:n.channel.name}})}),g.canViewUploadDate(e.video)&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`dateUploaded`,options:{date:c.format(t.dateCreated,`DD/MM/YYYY`)}})})]})}function q(e){let{video:t,maxHeight:n=368}=e,i=g.getParentVideo(t),a=!!e.video.description,o=z(e.video)||!!i.productionYear||!!i.dateBroadcast||!!i.channel||g.canViewUploadDate(e.video),s=typeof e.onClickClose==`function`,c=typeof e.onClickShowCurriculumLinks==`function`;function l(){return e.hideTags||g.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags.data}return!a&&!o?(0,H.jsx)(H.Fragment,{}):(0,H.jsx)(k.Provider,{value:U,children:(0,H.jsxs)(`div`,{className:`rounded border p-3 mb-3 position-relative`,children:[(0,H.jsx)(B.Scrollbars,{autoHeight:!0,autoHeightMax:n,children:(0,H.jsxs)(`div`,{className:`row g-0`,children:[a&&(0,H.jsxs)(`div`,{className:o?`${V.descriptionBorder} pe-3 col-md-7`:`col-12`,children:[(0,H.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,H.jsx)(`h2`,{className:`h6 mb-1`,children:(0,H.jsx)(O,{phrase:`description`})}),(0,H.jsx)(I,{text:t.description,title:t.name,className:`ps-2`,onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:f.PlayPage,entity:d.Video,actionType:p.Click,descriptor:u.LaunchImmersiveReader},analyticsData:{id:t.id,type:`description`}})]}),(0,H.jsx)(`p`,{className:`mb-0`,dangerouslySetInnerHTML:{__html:r.sanitize(N.linkifyText(e.video.description,{nl2br:!0}))}}),(0,H.jsx)(L,{tags:l(),...R.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity),className:`mt-1`}),c&&(0,H.jsx)(C,{onClick:e.onClickShowCurriculumLinks,className:`cursor-pointer d-inline-block fw-semibold text-info mt-2 mb-1`,children:(0,H.jsx)(O,{namespace:U,phrase:`seeCurriculumLinks`})})]}),o&&(0,H.jsx)(K,{...e})]})}),s&&(0,H.jsx)(`button`,{type:`button`,className:`btn-close ${V.closeButton}`,"aria-label":`Close`,onClick:e.onClickClose})]})})}var J=`userManager.studentsVideo`,Y=n.encloseNamespace(J);function X(e,t){return t.toString()===h.Clip.toString()?_.clip(e):t.toString()===h.Interactive.toString()?v.interactiveMetadata(e):y.video(e)}function Z(e){return e.toString()===h.Clip.toString()?`messageClip`:e.toString()===h.Interactive.toString()?`messageInteractive`:`messageVideo`}function Q(r){let i=s(P.getUser(r.userId)),a=s(X(r.id,r.typeId)),c=s(E.createViewKey(r.id,T.MasterObject)),u=s(S.config()),d=s(b.currentUser());F([i,a]),w({title:i.data?n.getPhrase(J,`pageTitle`,{name:m.getFullName(i.data)}):``});function h(){let e={entity:g.getAnalyticsEntity(a.data),location:f.ViewStudentVideos},t={id:a.data.id},n=[];return g.isVideo(a.data)&&n.push({order:1,label:Y(`download`),appLink:{application:o.VIDEOS,action:x.Videos.DOWNLOAD_VIDEO,args:[a.data.id]},analyticsOptions:{...e,actionType:p.Download,workflowPhase:l.Start},analyticsData:t}),n.push({order:2,label:Y(`delete`),appLink:{application:o.USER_MANAGER,action:x.UserManager.DELETE_STUDENTS_VIDEO,args:[r.id,a.data.id],params:{typeId:a.data.typeId}},className:`text-danger`,analyticsOptions:{...e,actionType:p.Delete,workflowPhase:l.Start},analyticsData:t}),n}return i.hasCompleted&&a.hasCompleted&&c.hasCompleted&&u.hasCompleted&&d.hasCompleted?(0,H.jsxs)(`div`,{className:`px-3`,children:[(0,H.jsx)(`div`,{className:`alert text-dark bg-light-blue px-2 rounded d-flex flex-column flex-lg-row justify-content-between mb-3 align-items-center`,role:`alert`,children:(0,H.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,H.jsx)(t,{svg:A,size:e.Standard,className:`me-2 svg-container`}),(0,H.jsx)(`div`,{className:`w-100`,children:(0,H.jsx)(`p`,{className:`fw-semibold mb-0`,children:Y(Z(r.typeId),{name:m.getFullName(i.data),yearGroup:i.data.masterYearGroup?.name})})})]})}),(0,H.jsx)(`div`,{className:`mb-3`,children:(0,H.jsx)(D,{config:u.data,video:a.data,currentUser:d.data,viewKey:c.data,presentationSlug:null})}),(0,H.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center mb-2`,children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(`h1`,{className:`h3 d-inline-flex m-0 mb-2`,children:a.data.name})}),(0,H.jsx)(M,{actions:h(),actionsDropdownClassName:`btn btn-outline-dark`})]}),(0,H.jsx)(q,{video:a.data})]}):(0,H.jsx)(H.Fragment,{})}export{Q as StudentsVideoView};
2
+ //# sourceMappingURL=Dtag-27K.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DCPsmD1m.chunk.js","names":[],"sources":["../../../../libs/shared/src/components/video-details/video-details.module.scss","../../../../libs/shared/src/components/video-details/VideoDetails.tsx","../../src/apps/user-manager/views/students-video/StudentsVideoView.tsx"],"sourcesContent":[":local {\n .closeButton {\n position: absolute;\n top: 1rem;\n right: map-get($spacers, 3);\n }\n \n @media (min-width: #{map-get($grid-breakpoints, md)}) {\n .descriptionBorder {\n border-right: 1px solid $gray-300;\n }\n }\n}","import * as React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\nimport { LinkifyHelper } from 'libs/common/react/utils/LinkifyHelper';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\nimport { ImmersiveReader } from 'libs/shared/components/immersive-reader/ImmersiveReader';\nimport { TagHelper } from 'libs/shared/components/tags/TagHelper';\nimport { TagList } from 'libs/shared/components/tags/TagList';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { MINIMUM_GLANCE_HEIGHT } from 'libs/shared/constants/MinimumGlanceHeight';\nimport { BaseObject, BasePaginatedCollection, CurrentUser, Tag, VideoTypes } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { hasPPDD } from './VideoDetailsUtils';\n\nimport styles from './video-details.module.scss';\n\nconst namespace = 'shared.videoDetails';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CommaListProps {\n label: string;\n items: BasePaginatedCollection<BaseObject>;\n className?: string;\n}\n\nfunction CommaList(props: CommaListProps): React.ReactElement {\n const { label, items, className } = props;\n\n const hasItems = items && items.data && items.data.length;\n\n if (!hasItems)\n return <></>;\n\n const commaSeperated = items.data.map(i => i.name).join(', ');\n\n return (\n <div className={className}>{label}: {commaSeperated}</div>\n );\n}\n\nfunction DetailsSection(props: VideoDetailsWithScrollbarProps): React.ReactElement {\n const { video } = props;\n\n if (!VideoHelper.isVideo(video) && !VideoHelper.isClip(video))\n return <></>;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n\n return (\n <div className={video.description ? 'col-md-5 ps-md-3 pt-3 pt-md-0' : 'col-12'}>\n <h2 className='h6 mb-1'><Text phrase='details' /></h2>\n {!!parentVideo.productionYear && (\n <div className='mb-1'>\n <Text phrase='productionYear' options={{ year: parentVideo.productionYear }} />\n </div>\n )}\n <CommaList\n label={getPhrase('productionCompanies', { smartCount: parentVideo.productionCompanies?.data?.length })}\n items={parentVideo.productionCompanies}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('distributors', { smartCount: parentVideo.distributors?.data?.length })}\n items={parentVideo.distributors}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('producers', { smartCount: parentVideo.producers?.data?.length })}\n items={parentVideo.producers}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('directors', { smartCount: parentVideo.directors?.data?.length })}\n items={parentVideo.directors}\n className='mb-1'\n />\n {!!parentVideo.dateBroadcast && (\n <div className='mb-1'>\n <Text phrase='dateBroadcast' options={{ date: DateHelper.format(parentVideo.dateBroadcast, 'DD/MM/YYYY') }} />\n </div>\n )}\n {!!parentVideo.channel && (\n <div className='mb-1'>\n <Text phrase='channel' options={{ channel: parentVideo.channel.name }} />\n </div>\n )}\n {VideoHelper.canViewUploadDate(props.video) && (\n <div className='mb-1'>\n <Text phrase='dateUploaded' options={{ date: DateHelper.format(video.dateCreated, 'DD/MM/YYYY') }} />\n </div>\n )}\n </div>\n );\n}\n\ninterface VideoDetailsWithScrollbarProps {\n video: VideoTypes;\n currentUser?: CurrentUser;\n getTagAppLink?: (tag: Tag) => Core.AppLink;\n onLaunchImmersiveReader?: () => void;\n onExitImmersiveReader?: () => void;\n onClickClose?: () => void;\n onClickShowCurriculumLinks?: () => void;\n maxHeight?: number;\n suppressInteractivity?: boolean;\n hideTags?: boolean;\n}\n\nexport function VideoDetailsWithScrollbar(props: VideoDetailsWithScrollbarProps): React.ReactElement {\n const { video, maxHeight = MINIMUM_GLANCE_HEIGHT } = props;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n\n const showDescription = !!props.video.description;\n\n const showDetails = (\n hasPPDD(props.video) ||\n !!parentVideo.productionYear ||\n !!parentVideo.dateBroadcast ||\n !!parentVideo.channel ||\n VideoHelper.canViewUploadDate(props.video)\n );\n\n const canClose = typeof props.onClickClose === 'function';\n const showCurriculumLinks = typeof props.onClickShowCurriculumLinks === 'function';\n\n function getTags(): Tag[] {\n if (props.hideTags || VideoHelper.isInteractive(props.video) || !props.video.tags?.data?.length)\n return null;\n\n return props.video.tags.data;\n }\n\n if (!showDescription && !showDetails)\n return <></>;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <div className='rounded border p-3 mb-3 position-relative'>\n <Scrollbars autoHeight autoHeightMax={maxHeight}>\n <div className='row g-0'>\n {showDescription && (\n <div className={showDetails ? `${styles.descriptionBorder} pe-3 col-md-7` : 'col-12'}>\n <div className='d-flex align-items-center'>\n <h2 className='h6 mb-1'>\n <Text phrase='description' />\n </h2>\n <ImmersiveReader\n text={video.description}\n title={video.name}\n className='ps-2'\n onLaunch={props.onLaunchImmersiveReader}\n onExit={props.onExitImmersiveReader}\n analyticsOptions={{\n location: LocationContext.PlayPage,\n entity: EntityType.Video,\n actionType: UserAction.Click,\n descriptor: ClickDescriptor.LaunchImmersiveReader\n }}\n analyticsData={{ id: video.id, type: 'description' }}\n />\n </div>\n <p className='mb-0' dangerouslySetInnerHTML={{ __html: TextHelper.sanitize(LinkifyHelper.linkifyText(props.video.description, { nl2br: true })) }} />\n <TagList\n tags={getTags()}\n {...TagHelper.getTagActionProps(props.getTagAppLink, null, props.suppressInteractivity)}\n className='mt-1'\n />\n {showCurriculumLinks && (\n <DivButton\n onClick={props.onClickShowCurriculumLinks}\n className='cursor-pointer d-inline-block fw-semibold text-info mt-2 mb-1'\n >\n <Text namespace={namespace} phrase='seeCurriculumLinks' />\n </DivButton>\n )}\n </div>\n )}\n\n {showDetails && (\n <DetailsSection {...props} />\n )}\n </div>\n </Scrollbars>\n\n {canClose && (\n <button\n type='button'\n className={`btn-close ${styles.closeButton}`}\n aria-label='Close'\n onClick={props.onClickClose}\n />\n )}\n </div>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/react/index';\n\nimport { AnalyticsOptions, LocationContext, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { Actions as ActionsButtons } from 'libs/shared/components/actions/Actions';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { VideoDetailsWithScrollbar } from 'libs/shared/components/video-details/VideoDetails';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { MediaIdType } from 'libs/shared/enums/MediaIdType';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\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 { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { InfoSvg } from 'libs/shared/images/svg/status/InfoSvg';\nimport { Config, CurrentUser, PlayerViewKey, User, VideoTypes } from 'libs/shared/interfaces';\nimport { UserHelper } from 'libs/shared/utils/UserHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { LitePlayerView } from 'shared/views/lite-player/LitePlayerView';\n\nimport { UserManagerRequests } from 'apps/user-manager/flight-requests/UserManagerRequests';\n\nconst namespace = 'userManager.studentsVideo';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nfunction getRequest(id: string, typeId: string): Flight.Request {\n if (typeId.toString() === MasterType.Clip.toString())\n return ClipRequests.clip(id);\n\n if (typeId.toString() === MasterType.Interactive.toString())\n return InteractiveRequests.interactiveMetadata(id);\n\n return VideoRequests.video(id);\n}\n\nfunction getMessagePhrase(typeId: string): string {\n if (typeId.toString() === MasterType.Clip.toString())\n return 'messageClip';\n\n if (typeId.toString() === MasterType.Interactive.toString())\n return 'messageInteractive';\n\n return 'messageVideo';\n}\n\ninterface StudentsVideoProps {\n userId: string;\n id: string;\n typeId: string;\n}\n\nexport function StudentsVideoView(props: StudentsVideoProps): JSX.Element {\n const user = Flight.useBasicFetch<User>(UserManagerRequests.getUser(props.userId));\n\n const video = Flight.useBasicFetch<VideoTypes>(getRequest(props.id, props.typeId));\n\n const viewKey = Flight.useBasicFetch<PlayerViewKey>(PlayerRequests.createViewKey(props.id, MediaIdType.MasterObject));\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n useHandleObjectError([ user, video ]);\n useSetPageMetadata({\n title: user.data ?\n LanguageService.getPhrase(\n namespace,\n 'pageTitle',\n { name: UserHelper.getFullName(user.data) }\n ) :\n ''\n });\n\n function getVideoActions(): ActionOptions[] {\n const analyticsOptions: AnalyticsOptions = {\n entity: VideoHelper.getAnalyticsEntity(video.data),\n location: LocationContext.ViewStudentVideos\n };\n \n const analyticsData = {\n id: video.data.id\n };\n \n const actions: ActionOptions[] = [];\n \n if (VideoHelper.isVideo(video.data)) {\n actions.push({\n order: 1,\n label: getPhrase('download'),\n appLink: { application: AppChannels.VIDEOS, action: Actions.Videos.DOWNLOAD_VIDEO, args: [video.data.id]},\n analyticsOptions: {\n ...analyticsOptions,\n actionType: UserAction.Download,\n workflowPhase: WorkflowPhase.Start\n },\n analyticsData\n });\n }\n \n actions.push({\n order: 2,\n label: getPhrase('delete'),\n appLink: {\n application: AppChannels.USER_MANAGER,\n action: Actions.UserManager.DELETE_STUDENTS_VIDEO,\n args: [ props.id, video.data.id ],\n params: { typeId: video.data.typeId }\n },\n className: 'text-danger',\n analyticsOptions: {\n ...analyticsOptions,\n actionType: UserAction.Delete,\n workflowPhase: WorkflowPhase.Start\n },\n analyticsData\n });\n \n return actions;\n }\n\n const dataLoaded = (\n user.hasCompleted &&\n video.hasCompleted &&\n viewKey.hasCompleted &&\n config.hasCompleted &&\n currentUser.hasCompleted\n );\n\n if (!dataLoaded)\n return <></>;\n\n return (\n <div className='px-3'>\n <div className='alert text-dark bg-light-blue px-2 rounded d-flex flex-column flex-lg-row justify-content-between mb-3 align-items-center' role='alert'>\n <div className='d-flex align-items-center'>\n <SvgContainer\n svg={InfoSvg}\n size={SvgContainerSize.Standard}\n className='me-2 svg-container'\n />\n \n <div className='w-100'>\n <p className='fw-semibold mb-0'>\n {getPhrase(\n getMessagePhrase(props.typeId),\n { name: UserHelper.getFullName(user.data), yearGroup: user.data.masterYearGroup?.name }\n )}\n </p>\n </div>\n </div>\n </div>\n <div className='mb-3'>\n <LitePlayerView\n config={config.data}\n video={video.data}\n currentUser={currentUser.data}\n viewKey={viewKey.data}\n presentationSlug={null}\n />\n </div>\n <div className='d-flex justify-content-between align-items-center mb-2'>\n <div>\n <h1 className='h3 d-inline-flex m-0 mb-2'>\n {video.data.name}\n </h1>\n </div>\n <ActionsButtons\n actions={getVideoActions()}\n actionsDropdownClassName='btn btn-outline-dark'\n />\n </div>\n <VideoDetailsWithScrollbar video={video.data} />\n </div>\n );\n}\n"],"mappings":"i6CCwBM,EAAY,sBACZ,EAAY,EAAgB,iBAAiB,CAAS,EAQ5D,S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AG,UAAU,4BACV,EACC,EAAiB,EAAM,MAAM,EAC7B,CAAE,KAAM,EAAW,YAAY,EAAK,IAAI,EAAG,UAAW,EAAK,KAAK,iBAAiB,IAAK,CACxF,CACC,CAAA,CACA,CAAA,CACF,GACF,CAAA,GACL,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,iBACb,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,OAAQ,EAAO,KACf,MAAO,EAAM,KACb,YAAa,EAAY,KACzB,QAAS,EAAQ,KACjB,iBAAkB,IACnB,CAAA,CACE,CAAA,GACL,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,kEAAf,EACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAA,UACE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCACX,EAAM,KAAK,IACV,CAAA,CACD,CAAA,GACL,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,QAAS,EAAgB,EACzB,yBAAyB,sBAC1B,CAAA,CACE,KACL,EAAA,EAAA,IAAA,CAAC,EAAD,CAA2B,MAAO,EAAM,IAAO,CAAA,CAC5C,KA3CE,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CA6Cf"}
1
+ {"version":3,"file":"Dtag-27K.chunk.js","names":[],"sources":["../../../../libs/shared/src/components/video-details/video-details.module.scss","../../../../libs/shared/src/components/video-details/VideoDetails.tsx","../../src/apps/user-manager/views/students-video/StudentsVideoView.tsx"],"sourcesContent":[":local {\n .closeButton {\n position: absolute;\n top: 1rem;\n right: map-get($spacers, 3);\n }\n \n @media (min-width: #{map-get($grid-breakpoints, md)}) {\n .descriptionBorder {\n border-right: 1px solid $gray-300;\n }\n }\n}","import * as React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\nimport { LinkifyHelper } from 'libs/common/react/utils/LinkifyHelper';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\nimport { ImmersiveReader } from 'libs/shared/components/immersive-reader/ImmersiveReader';\nimport { TagHelper } from 'libs/shared/components/tags/TagHelper';\nimport { TagList } from 'libs/shared/components/tags/TagList';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { MINIMUM_GLANCE_HEIGHT } from 'libs/shared/constants/MinimumGlanceHeight';\nimport { BaseObject, BasePaginatedCollection, CurrentUser, Tag, VideoTypes } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { hasPPDD } from './VideoDetailsUtils';\n\nimport styles from './video-details.module.scss';\n\nconst namespace = 'shared.videoDetails';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CommaListProps {\n label: string;\n items: BasePaginatedCollection<BaseObject>;\n className?: string;\n}\n\nfunction CommaList(props: CommaListProps): React.ReactElement {\n const { label, items, className } = props;\n\n const hasItems = items && items.data && items.data.length;\n\n if (!hasItems)\n return <></>;\n\n const commaSeperated = items.data.map(i => i.name).join(', ');\n\n return (\n <div className={className}>{label}: {commaSeperated}</div>\n );\n}\n\nfunction DetailsSection(props: VideoDetailsWithScrollbarProps): React.ReactElement {\n const { video } = props;\n\n if (!VideoHelper.isVideo(video) && !VideoHelper.isClip(video))\n return <></>;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n\n return (\n <div className={video.description ? 'col-md-5 ps-md-3 pt-3 pt-md-0' : 'col-12'}>\n <h2 className='h6 mb-1'><Text phrase='details' /></h2>\n {!!parentVideo.productionYear && (\n <div className='mb-1'>\n <Text phrase='productionYear' options={{ year: parentVideo.productionYear }} />\n </div>\n )}\n <CommaList\n label={getPhrase('productionCompanies', { smartCount: parentVideo.productionCompanies?.data?.length })}\n items={parentVideo.productionCompanies}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('distributors', { smartCount: parentVideo.distributors?.data?.length })}\n items={parentVideo.distributors}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('producers', { smartCount: parentVideo.producers?.data?.length })}\n items={parentVideo.producers}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('directors', { smartCount: parentVideo.directors?.data?.length })}\n items={parentVideo.directors}\n className='mb-1'\n />\n {!!parentVideo.dateBroadcast && (\n <div className='mb-1'>\n <Text phrase='dateBroadcast' options={{ date: DateHelper.format(parentVideo.dateBroadcast, 'DD/MM/YYYY') }} />\n </div>\n )}\n {!!parentVideo.channel && (\n <div className='mb-1'>\n <Text phrase='channel' options={{ channel: parentVideo.channel.name }} />\n </div>\n )}\n {VideoHelper.canViewUploadDate(props.video) && (\n <div className='mb-1'>\n <Text phrase='dateUploaded' options={{ date: DateHelper.format(video.dateCreated, 'DD/MM/YYYY') }} />\n </div>\n )}\n </div>\n );\n}\n\ninterface VideoDetailsWithScrollbarProps {\n video: VideoTypes;\n currentUser?: CurrentUser;\n getTagAppLink?: (tag: Tag) => Core.AppLink;\n onLaunchImmersiveReader?: () => void;\n onExitImmersiveReader?: () => void;\n onClickClose?: () => void;\n onClickShowCurriculumLinks?: () => void;\n maxHeight?: number;\n suppressInteractivity?: boolean;\n hideTags?: boolean;\n}\n\nexport function VideoDetailsWithScrollbar(props: VideoDetailsWithScrollbarProps): React.ReactElement {\n const { video, maxHeight = MINIMUM_GLANCE_HEIGHT } = props;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n\n const showDescription = !!props.video.description;\n\n const showDetails = (\n hasPPDD(props.video) ||\n !!parentVideo.productionYear ||\n !!parentVideo.dateBroadcast ||\n !!parentVideo.channel ||\n VideoHelper.canViewUploadDate(props.video)\n );\n\n const canClose = typeof props.onClickClose === 'function';\n const showCurriculumLinks = typeof props.onClickShowCurriculumLinks === 'function';\n\n function getTags(): Tag[] {\n if (props.hideTags || VideoHelper.isInteractive(props.video) || !props.video.tags?.data?.length)\n return null;\n\n return props.video.tags.data;\n }\n\n if (!showDescription && !showDetails)\n return <></>;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <div className='rounded border p-3 mb-3 position-relative'>\n <Scrollbars autoHeight autoHeightMax={maxHeight}>\n <div className='row g-0'>\n {showDescription && (\n <div className={showDetails ? `${styles.descriptionBorder} pe-3 col-md-7` : 'col-12'}>\n <div className='d-flex align-items-center'>\n <h2 className='h6 mb-1'>\n <Text phrase='description' />\n </h2>\n <ImmersiveReader\n text={video.description}\n title={video.name}\n className='ps-2'\n onLaunch={props.onLaunchImmersiveReader}\n onExit={props.onExitImmersiveReader}\n analyticsOptions={{\n location: LocationContext.PlayPage,\n entity: EntityType.Video,\n actionType: UserAction.Click,\n descriptor: ClickDescriptor.LaunchImmersiveReader\n }}\n analyticsData={{ id: video.id, type: 'description' }}\n />\n </div>\n <p className='mb-0' dangerouslySetInnerHTML={{ __html: TextHelper.sanitize(LinkifyHelper.linkifyText(props.video.description, { nl2br: true })) }} />\n <TagList\n tags={getTags()}\n {...TagHelper.getTagActionProps(props.getTagAppLink, null, props.suppressInteractivity)}\n className='mt-1'\n />\n {showCurriculumLinks && (\n <DivButton\n onClick={props.onClickShowCurriculumLinks}\n className='cursor-pointer d-inline-block fw-semibold text-info mt-2 mb-1'\n >\n <Text namespace={namespace} phrase='seeCurriculumLinks' />\n </DivButton>\n )}\n </div>\n )}\n\n {showDetails && (\n <DetailsSection {...props} />\n )}\n </div>\n </Scrollbars>\n\n {canClose && (\n <button\n type='button'\n className={`btn-close ${styles.closeButton}`}\n aria-label='Close'\n onClick={props.onClickClose}\n />\n )}\n </div>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/react/index';\n\nimport { AnalyticsOptions, LocationContext, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { Actions as ActionsButtons } from 'libs/shared/components/actions/Actions';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { VideoDetailsWithScrollbar } from 'libs/shared/components/video-details/VideoDetails';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { MediaIdType } from 'libs/shared/enums/MediaIdType';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\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 { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { InfoSvg } from 'libs/shared/images/svg/status/InfoSvg';\nimport { Config, CurrentUser, PlayerViewKey, User, VideoTypes } from 'libs/shared/interfaces';\nimport { UserHelper } from 'libs/shared/utils/UserHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { LitePlayerView } from 'shared/views/lite-player/LitePlayerView';\n\nimport { UserManagerRequests } from 'apps/user-manager/flight-requests/UserManagerRequests';\n\nconst namespace = 'userManager.studentsVideo';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nfunction getRequest(id: string, typeId: string): Flight.Request {\n if (typeId.toString() === MasterType.Clip.toString())\n return ClipRequests.clip(id);\n\n if (typeId.toString() === MasterType.Interactive.toString())\n return InteractiveRequests.interactiveMetadata(id);\n\n return VideoRequests.video(id);\n}\n\nfunction getMessagePhrase(typeId: string): string {\n if (typeId.toString() === MasterType.Clip.toString())\n return 'messageClip';\n\n if (typeId.toString() === MasterType.Interactive.toString())\n return 'messageInteractive';\n\n return 'messageVideo';\n}\n\ninterface StudentsVideoProps {\n userId: string;\n id: string;\n typeId: string;\n}\n\nexport function StudentsVideoView(props: StudentsVideoProps): JSX.Element {\n const user = Flight.useBasicFetch<User>(UserManagerRequests.getUser(props.userId));\n\n const video = Flight.useBasicFetch<VideoTypes>(getRequest(props.id, props.typeId));\n\n const viewKey = Flight.useBasicFetch<PlayerViewKey>(PlayerRequests.createViewKey(props.id, MediaIdType.MasterObject));\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n useHandleObjectError([ user, video ]);\n useSetPageMetadata({\n title: user.data ?\n LanguageService.getPhrase(\n namespace,\n 'pageTitle',\n { name: UserHelper.getFullName(user.data) }\n ) :\n ''\n });\n\n function getVideoActions(): ActionOptions[] {\n const analyticsOptions: AnalyticsOptions = {\n entity: VideoHelper.getAnalyticsEntity(video.data),\n location: LocationContext.ViewStudentVideos\n };\n \n const analyticsData = {\n id: video.data.id\n };\n \n const actions: ActionOptions[] = [];\n \n if (VideoHelper.isVideo(video.data)) {\n actions.push({\n order: 1,\n label: getPhrase('download'),\n appLink: { application: AppChannels.VIDEOS, action: Actions.Videos.DOWNLOAD_VIDEO, args: [video.data.id]},\n analyticsOptions: {\n ...analyticsOptions,\n actionType: UserAction.Download,\n workflowPhase: WorkflowPhase.Start\n },\n analyticsData\n });\n }\n \n actions.push({\n order: 2,\n label: getPhrase('delete'),\n appLink: {\n application: AppChannels.USER_MANAGER,\n action: Actions.UserManager.DELETE_STUDENTS_VIDEO,\n args: [ props.id, video.data.id ],\n params: { typeId: video.data.typeId }\n },\n className: 'text-danger',\n analyticsOptions: {\n ...analyticsOptions,\n actionType: UserAction.Delete,\n workflowPhase: WorkflowPhase.Start\n },\n analyticsData\n });\n \n return actions;\n }\n\n const dataLoaded = (\n user.hasCompleted &&\n video.hasCompleted &&\n viewKey.hasCompleted &&\n config.hasCompleted &&\n currentUser.hasCompleted\n );\n\n if (!dataLoaded)\n return <></>;\n\n return (\n <div className='px-3'>\n <div className='alert text-dark bg-light-blue px-2 rounded d-flex flex-column flex-lg-row justify-content-between mb-3 align-items-center' role='alert'>\n <div className='d-flex align-items-center'>\n <SvgContainer\n svg={InfoSvg}\n size={SvgContainerSize.Standard}\n className='me-2 svg-container'\n />\n \n <div className='w-100'>\n <p className='fw-semibold mb-0'>\n {getPhrase(\n getMessagePhrase(props.typeId),\n { name: UserHelper.getFullName(user.data), yearGroup: user.data.masterYearGroup?.name }\n )}\n </p>\n </div>\n </div>\n </div>\n <div className='mb-3'>\n <LitePlayerView\n config={config.data}\n video={video.data}\n currentUser={currentUser.data}\n viewKey={viewKey.data}\n presentationSlug={null}\n />\n </div>\n <div className='d-flex justify-content-between align-items-center mb-2'>\n <div>\n <h1 className='h3 d-inline-flex m-0 mb-2'>\n {video.data.name}\n </h1>\n </div>\n <ActionsButtons\n actions={getVideoActions()}\n actionsDropdownClassName='btn btn-outline-dark'\n />\n </div>\n <VideoDetailsWithScrollbar video={video.data} />\n </div>\n );\n}\n"],"mappings":"i6CCwBM,EAAY,sBACZ,EAAY,EAAgB,iBAAiB,CAAS,EAQ5D,SAAS,EAAU,EAA2C,CAC5D,GAAM,CAAE,QAAO,QAAO,aAAc,EASpC,OAPiB,GAAS,EAAM,MAAQ,EAAM,KAAK,QAQjD,EAAA,EAAA,KAAA,CAAC,MAAD,CAAgB,qBAAhB,CAA4B,EAAM,KAHb,EAAM,KAAK,IAAI,GAAK,EAAE,IAAI,CAAC,CAAC,KAAK,IAGjB,CAAoB,KALlD,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CAOf,CAEA,SAAS,EAAe,EAA2D,CACjF,GAAM,CAAE,SAAU,EAElB,GAAI,CAAC,EAAY,QAAQ,CAAK,GAAK,CAAC,EAAY,OAAO,CAAK,EAC1D,OAAO,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,EAEb,I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CAAI,UAAU,qCACX,EAAM,KAAK,IACV,CAAA,CACD,CAAA,GACL,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,QAAS,EAAgB,EACzB,yBAAyB,sBAC1B,CAAA,CACE,KACL,EAAA,EAAA,IAAA,CAAC,EAAD,CAA2B,MAAO,EAAM,IAAO,CAAA,CAC5C,KA3CE,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CA6Cf"}
@@ -1,2 +1,2 @@
1
- import"./DAXXjFlN.chunk.js";import{y as e}from"./BftnFbcr.chunk.js";import"./DFZS3Ffo.chunk.js";import{t}from"./CQyJ7YGa.chunk.js";import{t as n}from"./C2w0pmFW.chunk.js";import{t as r}from"./wrLrTezN.chunk.js";import{u as i}from"./BX0wDJmp.chunk.js";import{t as a}from"./DIqO2TFN.chunk.js";import{t as o}from"./DTGfiG8Y.chunk.js";import{t as s}from"./LoQS6GjP.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{t as d}from"./C4TNMYS42.chunk.js";import{n as f,t as p}from"./BGhJ8TEx.chunk.js";import{t as m}from"./BxjzTnvL2.chunk.js";import{t as h}from"./CpoRsMKu.chunk.js";import{t as g}from"./DaT2nTfp.chunk.js";import{t as _}from"./C-k6FY-f.chunk.js";n();var v=r(),y=t.encloseNamespace(`views.upsellProductInfoView`);function b(t){let n=i(c.currentUser()),r=n.data?.instanceRegion,b=i(l.config()),x=d(),{applink:S}=h(),C=x.upsellPresentationType===o.Subject?`welcomeToClickView`:`welcomeToClickViewLive`,w=(b.data?.liteUrl.includes(`staging`)?a.TutorialVideoHighlight[C].staging:a.TutorialVideoHighlight[C].production)?.[r],T=i(w&&s.sharedVideo(w.VIDEO,w.SHARE)),E=i(w&&p.createViewKey(w.SHARE,f.Share)),D=i(w.SHARE&&u.getShareObject(w.SHARE)),O=()=>{t.closePopup(),e.trigger(S)},k=n.hasCompleted&&b.hasCompleted,A=!w||T.hasCompleted&&E.hasCompleted,j=k&&A,M=!!T.data&&!!E.data,N=y(x.upsellPresentationType===o.Subject?`cv`:`cvlive`);return(0,v.jsxs)(g,{size:`lg`,closePopup:t.closePopup,showLoadingSpinner:!j,title:y(`header`,{productName:N}),children:[j&&M&&(0,v.jsx)(m,{config:b.data,currentUser:n.data,video:T?.data,viewKey:E.data,presentationSlug:null,shareLink:D.data,autoplay:!0}),(0,v.jsx)(`p`,{className:`mt-3`,children:y(`infoText`,{productName:N})}),(0,v.jsxs)(_,{children:[(0,v.jsx)(_.Cancel,{onClick:t.closePopup}),(0,v.jsx)(_.Submit,{onClick:O,text:y(`submitText`),variant:`dark`})]})]})}export{b as UpsellProductInfoView};
2
- //# sourceMappingURL=DOCHl5Sy.chunk.js.map
1
+ import"./DAXXjFlN.chunk.js";import{y as e}from"./BftnFbcr.chunk.js";import"./DFZS3Ffo.chunk.js";import{t}from"./CQyJ7YGa.chunk.js";import{t as n}from"./C2w0pmFW.chunk.js";import{t as r}from"./wrLrTezN.chunk.js";import{u as i}from"./BX0wDJmp.chunk.js";import{t as a}from"./DIqO2TFN.chunk.js";import{t as o}from"./DTGfiG8Y.chunk.js";import{t as s}from"./LoQS6GjP.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{t as d}from"./C4TNMYS42.chunk.js";import{n as f,t as p}from"./BGhJ8TEx.chunk.js";import{t as m}from"./D-iyHqNw2.chunk.js";import{t as h}from"./CpoRsMKu.chunk.js";import{t as g}from"./DaT2nTfp.chunk.js";import{t as _}from"./C-k6FY-f.chunk.js";n();var v=r(),y=t.encloseNamespace(`views.upsellProductInfoView`);function b(t){let n=i(c.currentUser()),r=n.data?.instanceRegion,b=i(l.config()),x=d(),{applink:S}=h(),C=x.upsellPresentationType===o.Subject?`welcomeToClickView`:`welcomeToClickViewLive`,w=(b.data?.liteUrl.includes(`staging`)?a.TutorialVideoHighlight[C].staging:a.TutorialVideoHighlight[C].production)?.[r],T=i(w&&s.sharedVideo(w.VIDEO,w.SHARE)),E=i(w&&p.createViewKey(w.SHARE,f.Share)),D=i(w.SHARE&&u.getShareObject(w.SHARE)),O=()=>{t.closePopup(),e.trigger(S)},k=n.hasCompleted&&b.hasCompleted,A=!w||T.hasCompleted&&E.hasCompleted,j=k&&A,M=!!T.data&&!!E.data,N=y(x.upsellPresentationType===o.Subject?`cv`:`cvlive`);return(0,v.jsxs)(g,{size:`lg`,closePopup:t.closePopup,showLoadingSpinner:!j,title:y(`header`,{productName:N}),children:[j&&M&&(0,v.jsx)(m,{config:b.data,currentUser:n.data,video:T?.data,viewKey:E.data,presentationSlug:null,shareLink:D.data,autoplay:!0}),(0,v.jsx)(`p`,{className:`mt-3`,children:y(`infoText`,{productName:N})}),(0,v.jsxs)(_,{children:[(0,v.jsx)(_.Cancel,{onClick:t.closePopup}),(0,v.jsx)(_.Submit,{onClick:O,text:y(`submitText`),variant:`dark`})]})]})}export{b as UpsellProductInfoView};
2
+ //# sourceMappingURL=DyE6EUDb.chunk.js.map