@clickview/lite 0.29.0-rc.3 → 0.29.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.
- package/dist/bundles.json +1 -1
- package/dist/css/1766-lite-7241403fdd.chunk.css +7 -0
- package/dist/css/1818-lite-580340c188.chunk.css +3 -0
- package/dist/css/3514-lite-a288188c68.chunk.css +1 -0
- package/dist/css/5776-lite-ab01f5dc3b.chunk.css +3 -0
- package/dist/css/{4486-lite-b2f716b1cc.chunk.css → 9125-lite-60a19846a7.chunk.css} +6 -4
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{1518-5d8dca26a7-lite.chunk.js → 1518-335f52175d-lite.chunk.js} +1 -1
- package/dist/scripts/{1766-45a1e3b551-lite.chunk.js → 1766-9ba9953e17-lite.chunk.js} +1 -1
- package/dist/scripts/{1818-9e44750e03-lite.chunk.js → 1818-6ec1e56560-lite.chunk.js} +1 -1
- package/dist/scripts/{4486-9c0a7cb5f9-lite.chunk.js → 3514-c7fc19b3e8-lite.chunk.js} +1 -1
- package/dist/scripts/4898-b400ca7c59-lite.chunk.js +1 -0
- package/dist/scripts/5776-fc2dd7327c-lite.chunk.js +1 -0
- package/dist/scripts/6113-db51f2ac32-lite.chunk.js +1 -0
- package/dist/scripts/{6204-ae4ee6f3e9-lite.chunk.js → 6204-f7d4175f0c-lite.chunk.js} +1 -1
- package/dist/scripts/9125-4b6a5fb7ad-lite.chunk.js +2 -0
- package/dist/scripts/9961-c0d30894fb-lite.chunk.js +1 -0
- package/dist/scripts/bundle-841ad3c170.min.js +2 -0
- package/package.json +2 -2
- package/dist/css/1766-lite-8fdba74ba4.chunk.css +0 -4
- package/dist/css/632-lite-03e4024d48.chunk.css +0 -56
- package/dist/css/7833-lite-c2342dfa6b.chunk.css +0 -56
- package/dist/scripts/3381-0788390c5c-lite.chunk.js +0 -2
- package/dist/scripts/4898-33a394a162-lite.chunk.js +0 -1
- package/dist/scripts/6113-35deb7c3ae-lite.chunk.js +0 -1
- package/dist/scripts/7833-99f462757b-lite.chunk.js +0 -1
- package/dist/scripts/9961-408604b24b-lite.chunk.js +0 -1
- package/dist/scripts/bundle-53d68b4a3a.min.js +0 -2
- /package/dist/scripts/{3381-0788390c5c-lite.chunk.js.LICENSE.txt → 9125-4b6a5fb7ad-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-53d68b4a3a.min.js.LICENSE.txt → bundle-841ad3c170.min.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[6204],{71020:(e,t,n)=>{n.d(t,{_:()=>u});var a=n(1024),i=n(99910),r=n(64038),s=n(83914),o=n(58130);const l={container:"VwD1b",spinner:"eJ85e"};function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function u(e){var t,n,u=(t=r.useInView(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,s,o=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=u[0],p=u[1];return a.useEffect((function(){var t;e.fetchOnScroll&&p&&!e.isFetching&&(null===(t=e.fetchNext)||void 0===t||t.call(e,e.nextCursor))}),[p,e.isFetching]),a.createElement("div",{className:"p-3 text-center ".concat(l.container),ref:d},e.isFetching?a.createElement(i.Spinner,{as:"span",animation:"border",role:"status",className:l.spinner}):a.createElement(s.x,{svgName:o.vn.ChevronDown,className:"svg-container cursor-pointer",size:s.S.Large,onClick:function(){var t;return null===(t=e.fetchNext)||void 0===t?void 0:t.call(e,e.nextCursor)}}))}u.defaultProps={fetchOnScroll:!1}},8843:(e,t,n)=>{n.d(t,{M:()=>s});var a=n(1024),i=n(79014),r=400;function s(e){var t=function(){if(!e.isFetching){if(e.scrollContainer){var t=e.scrollContainer;if(t.getBoundingClientRect().height+t.scrollTop<t.scrollHeight-r)return}else if(window.innerHeight+document.documentElement.scrollTop<document.documentElement.scrollHeight-r)return;e.fetchNextPage()}};(0,a.useEffect)((function(){var n=i.q.throttle(t,200),a=e.scrollContainer||window;return e.hasMore&&a.addEventListener("scroll",n),function(){return a.removeEventListener("scroll",n)}}),[e.hasMore,e.fetchNextPage,e.scrollContainer])}},38413:(e,t,n)=>{n.r(t),n.d(t,{SearchResultsView:()=>Be});var a=n(1024),i=n.n(a),r=n(58566),s=n(20354),o=n(2948),l=n(65858),c=n(53957),u=n(31949),d=n(71020),p=n(8843),m=n(21750),v=n(39151),g=n(83818),y=n(22608),f=n(94644),h=n(1666),b=n(25925),k=n(68677),A=n(97395),E=n(27898),L={search:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,s="search:".concat(e,":").concat(t,":").concat(a);s+=Object.keys(n).map((function(e){return n[e]})).join(";");var o=Object.assign({},Object.assign({index:t,cursor:null!=a?a:void 0,query:e},n));return{url:A._.urlBuilder("{gateway}/v1/search",o),publicUrl:A._.urlBuilder("/api/search",o),key:s,formatData:function(e){var t,n,a,i=e.totalResults,r=null!==(n=null===(t=null==e?void 0:e.results)||void 0===t?void 0:t.filter((function(e){var t,n,a,r,s,o,l,c;if("series"!==e._index&&"playlist"!==e._index)return!0;if("playlist"===e._index){var u=e;return!!((null===(n=null===(t=u.clips)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)||(null===(r=null===(a=u.interactives)||void 0===a?void 0:a.data)||void 0===r?void 0:r.length)||(null===(o=null===(s=u.videos)||void 0===s?void 0:s.data)||void 0===o?void 0:o.length))||(i--,!1)}return 0!==(null===(c=null===(l=e.videos)||void 0===l?void 0:l.data)||void 0===c?void 0:c.length)||(i--,!1)})))&&void 0!==n?n:[];e.results=r,e.totalResults=i;var s=null===(a=r[0])||void 0===a?void 0:a._score;return Object.assign(Object.assign({},e),{results:E.Q.mapMaxScoreToSearchResults(r,s)})},normalize:!1,success:i,error:r}},tagsAndClassifications:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,s=Object.assign({},Object.assign({index:t,cursor:a,query:e},n));return{url:A._.urlBuilder("{gateway}/v1/search/tags-and-classifications",s),publicUrl:A._.urlBuilder("/api/search/tags-and-classifications",s),key:"filter:options:".concat(e,":").concat(t.join(":"),":").concat(a),success:i,error:r,normalize:!1}}},x=n(83345),C=n(36848),O="search.searchSubstitute";function S(e){return e.substitute?i().createElement("p",{className:"mb-3"},i().createElement(x.x,{namespace:O,phrase:"showingFor"})," ",i().createElement(C.F,{className:"info-link",appLink:e.getAppLink(e.substitute,e.queryParams),appLinkOptions:{replace:!0}},e.substitute)):i().createElement(i().Fragment,null)}var j="search.searchSuggestions";function T(e){return e.suggestions.length?i().createElement("div",{className:"d-flex align-items-center mb-3"},i().createElement(x.x,{namespace:j,phrase:"didYouMean"})," ",e.suggestions.map((function(t,n){return i().createElement(i().Fragment,{key:"".concat(t,":").concat(n)},0!==n&&i().createElement("span",{className:"mx-1"},"•"),i().createElement(C.F,{className:"info-link",appLink:e.getAppLink(t,e.queryParams),appLinkOptions:{replace:!0}},t))}))):i().createElement(i().Fragment,null)}T.defaultProps={suggestions:[],queryParams:{}};var F=n(99910),N=n(75896),P=n(51365),_=n(3626),w=n(11025),I=n(50333),D=n(17585),q=n(55577),V=n(24900),R=n(5465),M=n(79967),B=n(98981),U=n(7733);function $(e){var t,n=(t=(0,M.k)()).xl||t.xxl?3:2,a=e.playlist.videos.data.slice(0,n),r={actionType:l.UserAction.Click,entity:l.EntityType.Playlist,location:l.LocationContext.PlaylistWithVideos},s=Object.assign(Object.assign({},e.analyticsData),{id:e.playlist.id,name:e.playlist.name});return i().createElement("div",{className:"pl-2 py-2"},i().createElement(F.Row,{className:"no-gutters border border-light rounded-lg"},i().createElement(F.Col,{xs:4,lg:3,className:"pr-3"},i().createElement(B.tN,{appLink:e.playlistAppLink,analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({},r),{descriptor:l.ClickDescriptor.Cover}),data:e.playlist,presentationAudiences:e.presentationAudiences,bgColourClassNames:U.o,itemStyle:"round-left",imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,showCount:!1,showOwner:!0})),i().createElement(F.Col,{xs:8,lg:9},i().createElement("div",{className:"d-flex justify-content-between"},i().createElement("div",{className:"pt-3 ".concat("eEZEe")},null==a?void 0:a.map((function(t){var n=Object.assign(Object.assign({},s),{videoId:t.id,videoName:t.name});return i().createElement(q.m,{key:t.id,video:t,getSeriesAppLink:e.getSeriesAppLink,canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:e.getVideoAppLink,analyticsData:n,analyticsOptions:{entity:l.EntityType.Video,location:l.LocationContext.PlaylistWithVideos},size:"sm",yearGroups:e.yearGroups})}))),i().createElement("div",{className:"text-right pt-3 pr-3"},i().createElement(C.F,{className:"info-link font-weight-500",appLink:e.playlistAppLink,analyticsData:s,analyticsOptions:Object.assign(Object.assign({},r),{descriptor:l.ClickDescriptor.Link})},i().createElement(x.x,{namespace:"search.playlistWithVideos",phrase:"seeAllVideos"})))))))}var G=n(17464),H=n(76246),W=n(78276),Q=n(54610),z=n(83657),Z=n(9977),J=n(96022),Y="search.collectionVideoList";function K(e){var t,n=(t=(0,M.k)()).xs?2:t.sm?1:3,a={analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions};return i().createElement(i().Fragment,null,i().createElement("ul",{className:"list-unstyled my-1"},e.videos.slice(0,n).map((function(t){var n,r=!!t.episodeNumber&&!!(null===(n=t.season)||void 0===n?void 0:n.id);return i().createElement("li",{key:"".concat(e.collectionId,":").concat(t.id),className:"d-flex align-items-center"},i().createElement(C.F,Object.assign({},a,{className:"clamp-1",appLink:e.getVideoAppLink(t)}),r&&i().createElement(i().Fragment,null,i().createElement(J.Q,{video:t})," "),t.name))}))),i().createElement(C.F,Object.assign({},a,{className:"info-link",appLink:e.appLink}),i().createElement(x.x,{namespace:Y,phrase:"seeAll"})))}function X(e){var t,n,a,r,s=(0,M.k)(),o="sm"===Z.O.getSize(s,"md"),c=!!(null===(n=null===(t=e.collection.videos)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),u=c&&e.collection.videos.data.find((function(e){var t;return!!(null===(t=e.thumbnail)||void 0===t?void 0:t.url)})),d=(r=Object.assign(Object.assign({},e.analyticsData),{id:e.collection.id,name:e.collection.name}),u&&(r.videoId=u.id,r.videoName=u.name),r),p="series"===e.collectionType;return i().createElement("div",{className:"row no-gutters ".concat(o?"":"py-2")},i().createElement(F.Col,Object.assign({},Z.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(o?"pb-2 pr-2":"mb-1 px-2")}),i().createElement("div",{className:"position-relative overflow-hidden ".concat(o?"rounded":"rounded-lg")},i().createElement(W.Z,{data:null==u?void 0:u.thumbnail,appLink:e.appLink,imageType:Q.__.Thumbnails,analyticsData:d,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:l.ClickDescriptor.Thumbnail})},i().createElement(V.z,{type:e.maskType}),i().createElement(R.oy,{type:e.imageFallbackType}),i().createElement("div",{className:"d-flex flex-column align-items-center justify-content-center text-white h-100 ".concat("AZSmh")},i().createElement(x.x,{namespace:"search.collectionThumbnail",phrase:"seeAll"}))))),i().createElement(F.Col,Object.assign({},Z.O.getDetailsColumns(),{className:o?"pb-2":"px-2"}),!e.isPlugin&&i().createElement(z.e,{actions:e.getCollectionActions(e.collection,e.showActions,e.collectionType,e.analyticsOptions),className:"float-right mt-n1",actionsDropdownClassName:"btn btn-link ml-1"}),i().createElement(C.F,{appLink:e.appLink,analyticsData:d,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:l.ClickDescriptor.Title})},i().createElement("h5",{className:"m-0 mb-1"},i().createElement("span",{className:"clamp-1"},e.collection.name))),p&&!e.hideBadges&&i().createElement(G.c,null,i().createElement(H.C,{type:H.g.Rating,data:e.collection.rating}),i().createElement(H.C,{type:H.g.ProductionYear,data:null===(a=e.collection.metadata)||void 0===a?void 0:a.year})),c&&i().createElement(K,{collectionId:e.collection.id,videos:e.collection.videos.data,appLink:e.appLink,analyticsData:d,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:l.ClickDescriptor.Link}),getVideoAppLink:e.getVideoAppLink})))}var ee=n(34004);function te(e){var t,n=(t=(0,M.k)()).xl||t.xxl?5:t.lg||t.md?4:3,a=e.series.videos.data.slice(0,n),r={actionType:l.UserAction.Click,entity:l.EntityType.Series,location:l.LocationContext.SeriesWithVideos},s=Object.assign(Object.assign({},e.analyticsData),{id:e.series.id,name:e.series.name});return i().createElement("div",{className:"pl-2 py-2"},i().createElement(F.Row,{className:"no-gutters border border-light rounded-lg"},i().createElement(F.Col,{xs:4,lg:3,className:"pr-3"},i().createElement(C.F,{appLink:e.seriesAppLink,className:"position-relative",analyticsData:s,analyticsOptions:Object.assign(Object.assign({},r),{descriptor:l.ClickDescriptor.TallPoster})},i().createElement(ee.r,{series:e.series,presentationAudiences:e.presentationAudiences,preloadImage:e.preloadImage,imageClass:"rounded-left-lg"}))),i().createElement(F.Col,{xs:8,lg:9},i().createElement("div",{className:"d-flex justify-content-between"},i().createElement("div",{className:"pt-3 ".concat("UT8bc")},null==a?void 0:a.map((function(t){var n=Object.assign(Object.assign({},s),{videoId:t.id,videoName:t.name});return t=Object.assign(Object.assign({},t),{series:e.series}),i().createElement(q.m,{key:t.id,video:t,getSeriesAppLink:function(){return e.seriesAppLink},canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:function(t){return e.getVideoAppLink(t)},analyticsData:n,analyticsOptions:{entity:l.EntityType.Video,location:l.LocationContext.SeriesWithVideos},size:"sm",yearGroups:e.yearGroups})}))),i().createElement("div",{className:"text-right pt-3 pr-3"},i().createElement(C.F,{className:"info-link font-weight-500",appLink:e.seriesAppLink,analyticsData:s,analyticsOptions:Object.assign(Object.assign({},r),{descriptor:l.ClickDescriptor.Link})},i().createElement(x.x,{namespace:"search.seriesWithVideos",phrase:"seeAllVideos"})))))))}var ne=n(2192);function ae(e){var t,n,i,r=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.data)||void 0===t?void 0:t.id,name:null===(n=e.data)||void 0===n?void 0:n.name}),s=Object.assign(Object.assign({location:l.LocationContext.ClassificationListItem},e.analyticsOptions),{actionType:l.UserAction.Click,entity:l.EntityType.Company,descriptor:l.ClickDescriptor.Cover});return a.createElement(ne.Q,Object.assign({},e,{analyticsData:r,analyticsOptions:s,coverUrl:null===(i=e.data.logo)||void 0===i?void 0:i.url}))}var ie=n(9513);const re="ZhLPS";var se=i().memo((function(e){var t,n,a,r=(0,M.k)();if(!(null===(t=e.results)||void 0===t?void 0:t.totalResults)&&!(null===(n=e.topics)||void 0===n?void 0:n.totalResults)&&!(null===(a=e.companies)||void 0===a?void 0:a.totalResults))return i().createElement(i().Fragment,null);var s=e.featuredResult,o=void 0===s?{}:s,c=E.Q.groupResults(e.results.results,e.topics,e.companies,o,r),u=e.availablePresentations;return i().createElement("div",{className:"position-relative"},c.map((function(t,n){switch(t.type){case"featured-result":if(!o||"video"!==o._index)return i().createElement(i().Fragment,{key:"featured-result"});var a=o;return i().createElement("div",{key:"featured-result",className:"pb-3"},i().createElement(P.M.Provider,{value:e.getVideoItemActions},i().createElement(_.J,{key:"featured-result",video:a,presentationAudiences:e.audiences,videoAppLink:e.appLinks.getVideoAppLink(a),seriesAppLink:e.appLinks.getSeriesAppLink(a.series),setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.query,score:a._score,maxScore:a._maxScore,featured:a._featured},pagePositionIndex:n},hideInteractiveBadge:!0,yearGroups:e.yearGroups})));case"companies-and-topics":var r=t.items.length<4;return i().createElement(i().Fragment,{key:"".concat(t.type,":").concat(n)},i().createElement(F.Row,{className:"no-gutters pb-3 mx-n1"},t.items.map((function(t,a){switch(t.type){case"company":return i().createElement(F.Col,{key:t.id,sm:6,md:r?6:4,lg:r?4:3},i().createElement("div",{className:"position-relative px-1 mb-2"},i().createElement(ae,{data:t,getChildAppLink:e.appLinks.getCompanyAppLink,getChildAppLinkOptions:e.appLinks.getCompanyAppLinkOptions,analyticsData:{itemIndex:a,search:{query:e.query,score:t._score,maxScore:t._maxScore,featured:t._featured},pagePositionIndex:n},isLarge:r})));case"Subject":return i().createElement(F.Col,{key:t.id,sm:6,md:r?6:4,lg:r?4:3},i().createElement("div",{className:"position-relative px-1 mb-2"},i().createElement(ie.Vz,{data:t,getChildAppLink:e.appLinks.getClassificationAppLink,getChildAppLinkOptions:function(){return e.appLinks.getClassificationAppLinkOptions(t)},availablePresentations:u,analyticsData:{itemIndex:a,search:{query:e.query,score:t._score,maxScore:t._maxScore,featured:t._featured},pagePositionIndex:n},isLarge:r})))}}))));case"video-item":var s=N.m.first(t.items),c=function(e){return w.M.isClip(e)?I.I:w.M.isInteractive(e)?D.H:q.m}(s);return i().createElement("div",{key:"".concat(t.type,":").concat(n),className:"position-relative ".concat(re)},i().createElement(P.M.Provider,{value:e.getVideoItemActions},i().createElement(c,{video:s,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink,presentationAudiences:e.audiences,setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.query,score:s._score,maxScore:s._maxScore,featured:s._featured},pagePositionIndex:n}})));case"playlist-with-videos":var d=N.m.first(t.items);return i().createElement("div",{key:"".concat(t.type,":").concat(n),className:"mx-n2"},i().createElement($,{playlist:d,yearGroups:e.yearGroups,playlistAppLink:e.appLinks.getPlaylistAppLink(d),presentationAudiences:e.audiences,analyticsData:{search:{query:e.query,score:d._score,maxScore:d._maxScore,featured:d._featured},pagePositionIndex:n},imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,preloadImage:!0,getSeriesAppLink:e.appLinks.getSeriesAppLink,getVideoAppLink:e.appLinks.getVideoAppLink}));case"playlist-thumbnail":var p=N.m.first(t.items);return i().createElement("div",{className:"position-relative ".concat(re),key:"".concat(t.type,":").concat(n)},i().createElement(X,{analyticsData:{search:{query:e.query,score:p._score,maxScore:p._maxScore,featured:p._featured},pagePositionIndex:n},analyticsOptions:{entity:l.EntityType.Playlist,actionType:l.UserAction.Click,location:l.LocationContext.PlaylistListItem},appLink:e.appLinks.getPlaylistAppLink(p),showActions:e.showActions,collection:p,collectionType:"playlist",maskType:V.O.Playlist,imageFallbackType:R.mS.PlaylistThumbnail,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}));case"series-with-videos":var m=N.m.first(t.items);return i().createElement("div",{key:"".concat(t.type,":").concat(n),className:"mx-n2"},i().createElement(te,{yearGroups:e.yearGroups,presentationAudiences:e.audiences,series:m,seriesAppLink:e.appLinks.getSeriesAppLink(m),getVideoAppLink:e.appLinks.getVideoAppLink,analyticsData:{search:{query:e.query,score:m._score,maxScore:m._maxScore,featured:m._featured},pagePositionIndex:n},preloadImage:!0}));case"series-thumbnail":var v=N.m.first(t.items);return i().createElement("div",{className:"position-relative ".concat(re),key:"".concat(t.type,":").concat(n)},i().createElement(X,{analyticsData:{search:{query:e.query,score:v._score,maxScore:v._maxScore,featured:v._featured},pagePositionIndex:n},analyticsOptions:{entity:l.EntityType.Series,actionType:l.UserAction.Click,location:l.LocationContext.SeriesListItem},appLink:e.appLinks.getSeriesAppLink(v),collectionType:"series",collection:v,showActions:e.showActions,maskType:V.O.Series,imageFallbackType:R.mS.SeriesThumbnail,hideBadges:!0,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}))}})))})),oe=n(1575),le=n(17475),ce=n(37802),ue=n(97037),de=n(22902),pe=n(16714),me=n(97291),ve=n(14070),ge=n(65986),ye=n(86702),fe=n(24965),he=n(86698),be=n(82817),ke=n(62756),Ae=n(44110),Ee=n(99742),Le=n(23737),xe=n(44909),Ce=n(1048),Oe=n(85594),Se=n(2284),je=n(24598);function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Fe=["filters.classification","filters.presentation"],Ne=["filters.classification","filters.presentation","isLearner"];function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var _e=n(61699),we=n(1211),Ie=n(23232),De="search.searchResultsEmptyState";function qe(e){var t,n,a=e.scotland&&"nessie"===(null===(n=null===(t=e.query)||void 0===t?void 0:t.trim())||void 0===n?void 0:n.toLowerCase())?Ee.W.EmptyStates.Search.RESULTS_SCOTLAND:Ee.W.EmptyStates.Search.RESULTS;return i().createElement(x.D.Provider,{value:De},i().createElement(Ie.u,null,i().createElement(Ie.u.Image,{src:a}),i().createElement(Ie.u.Heading,null,e.query?i().createElement(x.x,{phrase:"headingWithQuery",options:{query:e.query}}):i().createElement(x.x,{phrase:"headingWithoutQuery"})),i().createElement(Ie.u.Info,null,i().createElement(x.x,{phrase:"info"}),i().createElement(C.F,{className:"info-link",appLink:{application:me.O.SUBJECT,action:ve.e.Subjects.CLASSIFICATION_ALL}},i().createElement(x.x,{phrase:"topicsAppLink"})))))}function Ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,s,o=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(e,t)||Re(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Re(e,t){if(e){if("string"==typeof e)return Me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(e,t):void 0}}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Be(e){var t,n,i,A,x,C,O,j,F,N,P,_,w,I,D,q,V,R,M,B=e.queryParams,U=B.query,$=Ve((0,o.D)(ye.y.SHOW_SEARCH_MASK,!0),2),G=$[0],H=$[1],W=Ve(a.useState(null),2),Q=W[0],z=W[1],Z=Ve(a.useState(!1),2),J=Z[0],Y=Z[1],K=Ve(a.useState(),2),X=K[0],ee=K[1],te=Ve(a.useState(null),2),ne=te[0],ae=te[1],ie=Ve(a.useState(!1),2),re=ie[0],Ie=ie[1],De=!!(null===(n=null===(t=null==Q?void 0:Q.pagination)||void 0===t?void 0:t.cursors)||void 0===n?void 0:n.next),Be=(0,ke.G)().isPlugin,Ue=s.a.useBasicFetch(u.N.currentUser()),$e=s.a.useBasicFetch((null===(i=Ue.data)||void 0===i?void 0:i.id)&&u.N.user(Ue.data.id)),Ge=s.a.useBasicFetch(v.L.config()),He=s.a.useBasicFetch((null===(A=Ue.data)||void 0===A?void 0:A.isAuthenticated)&&h.h.yearGroups(Ue.data.customerId)),We=(0,he.y)(b.R.Subject),Qe=We.presentation,ze=We.availablePresentations,Ze=We.hasLoaded,Je=(0,be.M)().availableCurriculums,Ye=(0,Ae.i)(),Ke=!!B.moviesAndTv,Xe=function(e){var t,n=s.a.useBasicFetch(_e.o.availablePresentations(b.R.Subject)),a=(0,(0,de.T)().hasPermissions)(pe.C.StudentExperience)?e?[null==e?void 0:e.id]:null:null===(t=n.data)||void 0===t?void 0:t.map((function(e){return e.id}));return s.a.useBasicFetch(n.hasCompleted&&a&&we.J.schoolLevels(a))}(Qe),et=null===(C=null===(x=Xe.data)||void 0===x?void 0:x.schoolLevels)||void 0===C?void 0:C.map((function(e){return e.id})),tt=s.a.useBasicFetch((null==Xe?void 0:Xe.data)&&m.x.topicsFromAllAvailablePresentations(et)),nt=s.a.useBasicFetch(fe.Z.ratings(null===(O=Ue.data)||void 0===O?void 0:O.countryCode)),at=(0,de.T)(),it=at.hasPermissions,rt=at.hasLocalPermissions,st=(0,ce.r)(l.LocationContext.SearchFilters).hasNewMoviesAndTv,ot=it(pe.C.StudentExperience),lt=it(pe.C.ViewCurriculums),ct=rt(pe.E.UseSeriesActions),ut=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o=(null==n?void 0:n.length)&&y.qr.buildBackendFilterParams(e,n,a,r),l=Ce.t.pick(o,r?Ne:Fe);l["filters.classificationType"]=Oe.A.Subject,l["filters.status"]=Se.W.Published,(null==e?void 0:e.moviesAndTv)&&(l["filters.curationTag"]=je.b.MOVIES_AND_TV);var c=null!==(t=null==i?void 0:i.reduce((function(e,t){return e[t.id]=t,e}),{}))&&void 0!==t?t:{},u=!y.qr.getAppliedIndices(e).includes("classification"),d=L.search(e.query,["classification"],l),p=s.a.useBasicFetch(!u&&d);if(!p.data)return p;if(!i||(null==i?void 0:i.length)<2)return p;var m,v=(m=p.data.results,function(e){if(Array.isArray(e))return Te(e)}(m)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(m)||function(e,t){if(e){if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(e,t):void 0}}(m)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort((function(e,t){if(e._score!==t._score)return 0;var n=c[e.presentationId],a=c[t.presentationId];return n?a?n.value-a.value:-1:1}));return Object.assign(Object.assign({},p),{data:Object.assign(Object.assign({},p.data),{results:v})})}(B,nt.data,null==Qe?void 0:Qe.id,ze,ot),dt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,i=(null==t?void 0:t.length)&&y.qr.buildBackendFilterParams(e,t,n,!1)||{};i["filters.curationTag"]=je.b.CLICKVIEW_CURATED,n&&(i["filters.presentation"]=n);var r,o=!y.qr.getAppliedIndices(e).includes("company"),l=L.search(e.query,["company"],i),c=s.a.useBasicFetch(!o&&a&&l);return c.data?Object.assign(Object.assign({},c),{data:Object.assign(Object.assign({},c.data),{results:(r=c.data.results,function(e){if(Array.isArray(e))return Pe(e)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})}):c}(B,nt.data,null==Qe?void 0:Qe.id,st),pt=function(e,t){var n,a=E.Q.flattenResults(e),i=null===(n=null==a?void 0:a.results)||void 0===n?void 0:n.find((function(e){return!!e._featured&&"video"===e._index})),r=s.a.useBasicFetch(i&&"video"===i._index?oe.R.video(i.id):null);if(r.data){var o=i._index,l=i._score,c=i._featured;return Object.assign(Object.assign({},r.data),{_index:o,_score:l,_featured:c,_maxScore:t})}}(Q,X),mt=(0,Le.y)({targetType:c.DashboardTargetType.MoviesAndTv,queryParams:B}).dashboard;(0,k.M)({title:null!=U?U:""}),(0,p.M)({fetchNextPage:function(){var e,t;return At(null===(t=null===(e=Q.pagination)||void 0===e?void 0:e.cursors)||void 0===t?void 0:t.next)},hasMore:De,isFetching:J}),xe.y.useOnFilterChange(At,B);var vt=(0,ge._)(ge.i.VideoItem),gt=(0,r.useDispatch)(),yt=(0,ue.c)(l.LocationContext.VideoThumbnail),ft=yt.setFavourite,ht=yt.canFavourite,bt=Ye.hasCompleted&&Ze&&Ue.hasCompleted&&(!(null===(j=Ue.data)||void 0===j?void 0:j.isAuthenticated)||$e.hasCompleted)&&nt.hasCompleted&&Ge.hasCompleted;function kt(){var e=[];return(it(pe.C.StudentExperience)||B.moviesAndTv)&&(e.push("clip"),e.push("interactive")),st||e.push("company"),e}function At(e){if(bt){Y(!0),e||Ie(!0);var t=y.qr.buildBackendFilterParams(B,nt.data,null==Qe?void 0:Qe.id,ot),n=y.qr.getAppliedIndices(B).filter((function(e){return"classification"!==e&&"company"!==e})),a=kt();if(!(n=n.filter((function(e){return!a.find((function(t){return t===e}))}))).length)return z({results:[],totalResults:0,pagination:null}),Y(!1),void Ie(!1);s.a.fetch(gt,L.search(U,n,t,e,(function(t){var n,a;if(e)z(Object.assign(Object.assign({},Q),{results:[].concat((a=Q.results,function(e){if(Array.isArray(e))return Me(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||Re(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[E.Q.mapMaxScoreToSearchResults(t.results,X)]),pagination:t.pagination}));else{var i=null===(n=null==t?void 0:t.results[0])||void 0===n?void 0:n._score;ee(i),z(Object.assign(Object.assign({},t),{results:[E.Q.mapMaxScoreToSearchResults(t.results,i)]}))}Y(!1)}),(function(e){(0,f.r)(e.status),Y(!1)}))),e||s.a.fetch(gt,L.tagsAndClassifications(U,n,t,e,(function(e){ae(e),Ie(!1)}),(function(){Ie(!1)})))}}a.useEffect((function(){At()}),[U,bt]),a.useEffect((function(){G&&H(!1)}),[]),xe.y.useMixinCurriculumLinks(Q,z,gt,Je,lt);var Et=[y.x$.ObjectTypes(kt()),st&&mt.data?y.x$.MoviesAndTv(Ee.W.MoviesAndTv.POPCORN_BOX,Ee.W.MoviesAndTv.POPCORN_BITS):null,y.x$.Rating(nt.data,He.data&&$e.data&&le.S.getStudentMaxRating(He.data,$e.data)),y.x$.HasResources(),y.x$.HasSubtitles(),y.x$.TagOrClassification(ne)].filter(Boolean),Lt=y.x$.Presentation(null===(F=Xe.data)||void 0===F?void 0:F.schoolLevels);y.qr.showPresentationFilter(Lt)&&Et.unshift(Lt);var xt=y.x$.Topics(null===(N=tt.data)||void 0===N?void 0:N.topics.map((function(e){return{name:e.name,id:e.topicIds.join(":")}})));xt.options&&xt.options.length>1&&Et.unshift(xt);var Ct=y.qr.getMoreFilters([y.x$.ProductionYear(),y.x$.IsHD(),y.x$.IsClickViewContent(),y.x$.Duration()]),Ot=function(e,t){return{application:me.O.SEARCH,action:ve.e.Search.HOME,params:Object.assign(Object.assign({},t),{query:e})}};if(!Q||!bt)return a.createElement(a.Fragment,null);var St=(Q.totalResults||(null===(P=ut.data)||void 0===P?void 0:P.totalResults)||(null===(_=dt.data)||void 0===_?void 0:_.totalResults))&&ze;return a.createElement("div",{className:"px-4"},a.createElement(S,{substitute:Q.substituteQuery,queryParams:B,getAppLink:Ot}),!Q.substituteQuery&&a.createElement(T,{suggestions:null==Q?void 0:Q.suggestions,queryParams:B,getAppLink:Ot}),!!Ye.data&&!!nt.data&&!!tt.data&&a.createElement(g.J,{queryParams:B,mainFilters:Et,moreFilters:Ct,analyticsOptions:{entity:l.EntityType.SearchResults,location:l.LocationContext.SearchFilters},appLink:{application:me.O.SEARCH,action:ve.e.Search.HOME},isFetchingOptions:re}),a.createElement("section",null,St?a.createElement(se,{query:U,results:Q,topics:ut.data,companies:dt.data,featuredResult:pt,getVideoItemActions:vt,setFavourite:function(e,t,n,a,i){ft(e,t,(function(){var n=Q.results.map((function(n){return n.map((function(n){if(n.id!==e.id)return n;var a=Ue.data;return Object.assign(Object.assign({},n),{favouritedBy:{data:t?[a]:[],pagination:{limit:25,cursors:{next:"",previous:""}}}})}))}));z(Object.assign(Object.assign({},Q),{results:n}))}),a,i)},canFavourite:ht,audiences:!Ke&&Ye.data,currentUser:Ue.data,imageCdnUrl:Ge.data.imageCdnUrl,availablePresentations:ze,showActions:!ot&&ct,yearGroups:He.data,isPlugin:Be,appLinks:xe.y.getAppLinks(Qe,ze,B.moviesAndTv)}):a.createElement(qe,{query:U,scotland:null!==(V=!!(null===(q=null===(I=null===(w=null==Qe?void 0:Qe.description)||void 0===w?void 0:w.toLowerCase)||void 0===I?void 0:(D=I.call(w)).includes)||void 0===q?void 0:q.call(D,"scotland")))&&void 0!==V&&V}),De&&a.createElement(d._,{isFetching:J,fetchNext:At,nextCursor:null===(M=null===(R=Q.pagination)||void 0===R?void 0:R.cursors)||void 0===M?void 0:M.next})))}Be.defaultProps={queryParams:{}}},24965:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(97395),i={ratings:function(e){return{url:"/api/domain/v2/me/ratings",publicUrl:a._.urlBuilder("/api/domain/v2/me/ratings",{countryCode:e}),key:"ratings",formatData:function(e){return e.sort((function(e,t){return e.value-t.value}))}}}}},41063:(e,t,n)=>{n.d(t,{b:()=>s});var a=n(22902),i=n(37802),r=n(16714);function s(){var e=(0,a.T)().hasPermissions;return(0,i.r)(null).manageVideoAccess&&e(r.C.ManageVideoAccess)}},82817:(e,t,n)=>{n.d(t,{M:()=>u});var a=n(20354),i=n(75896),r=n(21750),s=n(22902),o=n(16714),l=n(25925),c=n(86698),u=function(e){var t,n=(0,(0,s.T)().hasPermissions)(o.C.ViewCurriculums),u=(0,c.y)(l.R.Curriculum),d=u.hasLoaded,p=u.availablePresentations,m=u.presentation,v=u.persistPresentation,g=a.a.useBasicFetch((null==m?void 0:m.id)&&e&&r.x.curriculumLinks(e,null==m?void 0:m.id)),y=null==p?void 0:p.map((function(e){return e.id})),f=a.a.useBasicFetch(e&&(null==y?void 0:y.length)&&r.x.hasCurriculumLinks([e],y)),h=null===(t=i.m.first(f.data))||void 0===t?void 0:t._hasCurriculumLinks;return{hasLoaded:!n||!!(d&&g.hasCompleted&&f.hasCompleted),currentCurriculum:m,curriculumLinks:g.data,availableCurriculums:p,updateCurriculum:function(e,t,n){return v(t,n,e)},customerHasCurriculumLinks:h}}},44110:(e,t,n)=>{n.d(t,{i:()=>o});var a=n(20354),i=n(25925),r=n(89454),s=n(86698),o=function(e){var t=(0,s.y)(i.R.Subject,null,e,!!e).presentation;return a.a.useBasicFetch(!!t&&r.O.presentationAudiences(t.id))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[6204],{71020:(e,t,n)=>{n.d(t,{_:()=>u});var a=n(1024),i=n(99910),r=n(64038),s=n(83914),o=n(58130);const l={container:"VwD1b",spinner:"eJ85e"};function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function u(e){var t,n,u=(t=r.useInView(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,s,o=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=u[0],p=u[1];return a.useEffect((function(){var t;e.fetchOnScroll&&p&&!e.isFetching&&(null===(t=e.fetchNext)||void 0===t||t.call(e,e.nextCursor))}),[p,e.isFetching]),a.createElement("div",{className:"p-3 text-center ".concat(l.container),ref:d},e.isFetching?a.createElement(i.Spinner,{as:"span",animation:"border",role:"status",className:l.spinner}):a.createElement(s.x,{svgName:o.vn.ChevronDown,className:"svg-container cursor-pointer",size:s.S.Large,onClick:function(){var t;return null===(t=e.fetchNext)||void 0===t?void 0:t.call(e,e.nextCursor)}}))}u.defaultProps={fetchOnScroll:!1}},8843:(e,t,n)=>{n.d(t,{M:()=>s});var a=n(1024),i=n(79014),r=400;function s(e){var t=function(){if(!e.isFetching){if(e.scrollContainer){var t=e.scrollContainer;if(t.getBoundingClientRect().height+t.scrollTop<t.scrollHeight-r)return}else if(window.innerHeight+document.documentElement.scrollTop<document.documentElement.scrollHeight-r)return;e.fetchNextPage()}};(0,a.useEffect)((function(){var n=i.q.throttle(t,200),a=e.scrollContainer||window;return e.hasMore&&a.addEventListener("scroll",n),function(){return a.removeEventListener("scroll",n)}}),[e.hasMore,e.fetchNextPage,e.scrollContainer])}},38413:(e,t,n)=>{n.r(t),n.d(t,{SearchResultsView:()=>Be});var a=n(1024),i=n.n(a),r=n(58566),s=n(20354),o=n(2948),l=n(65858),c=n(53957),u=n(31949),d=n(71020),p=n(8843),m=n(21750),v=n(39151),g=n(83818),y=n(22608),f=n(94644),h=n(1666),b=n(25925),k=n(68677),A=n(97395),E=n(27898),L={search:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,s="search:".concat(e,":").concat(t,":").concat(a);s+=Object.keys(n).map((function(e){return n[e]})).join(";");var o=Object.assign({},Object.assign({index:t,cursor:null!=a?a:void 0,query:e},n));return{url:A._.urlBuilder("{gateway}/v1/search",o),publicUrl:A._.urlBuilder("/api/search",o),key:s,formatData:function(e){var t,n,a,i=e.totalResults,r=null!==(n=null===(t=null==e?void 0:e.results)||void 0===t?void 0:t.filter((function(e){var t,n,a,r,s,o,l,c;if("series"!==e._index&&"playlist"!==e._index)return!0;if("playlist"===e._index){var u=e;return!!((null===(n=null===(t=u.clips)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)||(null===(r=null===(a=u.interactives)||void 0===a?void 0:a.data)||void 0===r?void 0:r.length)||(null===(o=null===(s=u.videos)||void 0===s?void 0:s.data)||void 0===o?void 0:o.length))||(i--,!1)}return 0!==(null===(c=null===(l=e.videos)||void 0===l?void 0:l.data)||void 0===c?void 0:c.length)||(i--,!1)})))&&void 0!==n?n:[];e.results=r,e.totalResults=i;var s=null===(a=r[0])||void 0===a?void 0:a._score;return Object.assign(Object.assign({},e),{results:E.Q.mapMaxScoreToSearchResults(r,s)})},normalize:!1,success:i,error:r}},tagsAndClassifications:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,s=Object.assign({},Object.assign({index:t,cursor:a,query:e},n));return{url:A._.urlBuilder("{gateway}/v1/search/tags-and-classifications",s),publicUrl:A._.urlBuilder("/api/search/tags-and-classifications",s),key:"filter:options:".concat(e,":").concat(t.join(":"),":").concat(a),success:i,error:r,normalize:!1}}},x=n(83345),C=n(36848),O="search.searchSubstitute";function S(e){return e.substitute?i().createElement("p",{className:"mb-3"},i().createElement(x.x,{namespace:O,phrase:"showingFor"})," ",i().createElement(C.F,{className:"info-link",appLink:e.getAppLink(e.substitute,e.queryParams),appLinkOptions:{replace:!0}},e.substitute)):i().createElement(i().Fragment,null)}var j="search.searchSuggestions";function T(e){return e.suggestions.length?i().createElement("div",{className:"d-flex align-items-center mb-3"},i().createElement(x.x,{namespace:j,phrase:"didYouMean"})," ",e.suggestions.map((function(t,n){return i().createElement(i().Fragment,{key:"".concat(t,":").concat(n)},0!==n&&i().createElement("span",{className:"mx-1"},"•"),i().createElement(C.F,{className:"info-link",appLink:e.getAppLink(t,e.queryParams),appLinkOptions:{replace:!0}},t))}))):i().createElement(i().Fragment,null)}T.defaultProps={suggestions:[],queryParams:{}};var F=n(99910),N=n(75896),P=n(51365),_=n(3626),w=n(11025),I=n(50333),D=n(17585),q=n(55577),V=n(24900),R=n(5465),M=n(79967),B=n(98981),U=n(7733);function $(e){var t,n=(t=(0,M.k)()).xl||t.xxl?3:2,a=e.playlist.videos.data.slice(0,n),r={actionType:l.UserAction.Click,entity:l.EntityType.Playlist,location:l.LocationContext.PlaylistWithVideos},s=Object.assign(Object.assign({},e.analyticsData),{id:e.playlist.id,name:e.playlist.name});return i().createElement("div",{className:"pl-2 py-2"},i().createElement(F.Row,{className:"no-gutters border border-light rounded-lg"},i().createElement(F.Col,{xs:4,lg:3,className:"pr-3"},i().createElement(B.tN,{appLink:e.playlistAppLink,analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({},r),{descriptor:l.ClickDescriptor.Cover}),data:e.playlist,presentationAudiences:e.presentationAudiences,bgColourClassNames:U.o,itemStyle:"round-left",imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,showCount:!1,showOwner:!0})),i().createElement(F.Col,{xs:8,lg:9},i().createElement("div",{className:"d-flex justify-content-between"},i().createElement("div",{className:"pt-3 ".concat("eEZEe")},null==a?void 0:a.map((function(t){var n=Object.assign(Object.assign({},s),{videoId:t.id,videoName:t.name});return i().createElement(q.m,{key:t.id,video:t,getSeriesAppLink:e.getSeriesAppLink,canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:e.getVideoAppLink,analyticsData:n,analyticsOptions:{entity:l.EntityType.Video,location:l.LocationContext.PlaylistWithVideos},size:"sm",yearGroups:e.yearGroups})}))),i().createElement("div",{className:"text-right pt-3 pr-3"},i().createElement(C.F,{className:"info-link font-weight-500",appLink:e.playlistAppLink,analyticsData:s,analyticsOptions:Object.assign(Object.assign({},r),{descriptor:l.ClickDescriptor.Link})},i().createElement(x.x,{namespace:"search.playlistWithVideos",phrase:"seeAllVideos"})))))))}var G=n(17464),H=n(76246),W=n(78276),Q=n(54610),z=n(83657),Z=n(9977),J=n(96022),Y="search.collectionVideoList";function K(e){var t,n=(t=(0,M.k)()).xs?2:t.sm?1:3,a={analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions};return i().createElement(i().Fragment,null,i().createElement("ul",{className:"list-unstyled my-1"},e.videos.slice(0,n).map((function(t){var n,r=!!t.episodeNumber&&!!(null===(n=t.season)||void 0===n?void 0:n.id);return i().createElement("li",{key:"".concat(e.collectionId,":").concat(t.id),className:"d-flex align-items-center"},i().createElement(C.F,Object.assign({},a,{className:"clamp-1",appLink:e.getVideoAppLink(t)}),r&&i().createElement(i().Fragment,null,i().createElement(J.Q,{video:t})," "),t.name))}))),i().createElement(C.F,Object.assign({},a,{className:"info-link",appLink:e.appLink}),i().createElement(x.x,{namespace:Y,phrase:"seeAll"})))}function X(e){var t,n,a,r,s=(0,M.k)(),o="sm"===Z.O.getSize(s,"md"),c=!!(null===(n=null===(t=e.collection.videos)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),u=c&&e.collection.videos.data.find((function(e){var t;return!!(null===(t=e.thumbnail)||void 0===t?void 0:t.url)})),d=(r=Object.assign(Object.assign({},e.analyticsData),{id:e.collection.id,name:e.collection.name}),u&&(r.videoId=u.id,r.videoName=u.name),r),p="series"===e.collectionType;return i().createElement("div",{className:"row no-gutters ".concat(o?"":"py-2")},i().createElement(F.Col,Object.assign({},Z.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(o?"pb-2 pr-2":"mb-1 px-2")}),i().createElement("div",{className:"position-relative overflow-hidden ".concat(o?"rounded":"rounded-lg")},i().createElement(W.Z,{data:null==u?void 0:u.thumbnail,appLink:e.appLink,imageType:Q.__.Thumbnails,analyticsData:d,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:l.ClickDescriptor.Thumbnail})},i().createElement(V.z,{type:e.maskType}),i().createElement(R.oy,{type:e.imageFallbackType}),i().createElement("div",{className:"d-flex flex-column align-items-center justify-content-center text-white h-100 ".concat("AZSmh")},i().createElement(x.x,{namespace:"search.collectionThumbnail",phrase:"seeAll"}))))),i().createElement(F.Col,Object.assign({},Z.O.getDetailsColumns(),{className:o?"pb-2":"px-2"}),!e.isPlugin&&i().createElement(z.e,{actions:e.getCollectionActions(e.collection,e.showActions,e.collectionType,e.analyticsOptions),className:"float-right mt-n1",actionsDropdownClassName:"btn btn-link ml-1"}),i().createElement(C.F,{appLink:e.appLink,analyticsData:d,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:l.ClickDescriptor.Title})},i().createElement("h5",{className:"m-0 mb-1"},i().createElement("span",{className:"clamp-1"},e.collection.name))),p&&!e.hideBadges&&i().createElement(G.c,null,i().createElement(H.C,{type:H.g.Rating,data:e.collection.rating}),i().createElement(H.C,{type:H.g.ProductionYear,data:null===(a=e.collection.metadata)||void 0===a?void 0:a.year})),c&&i().createElement(K,{collectionId:e.collection.id,videos:e.collection.videos.data,appLink:e.appLink,analyticsData:d,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:l.ClickDescriptor.Link}),getVideoAppLink:e.getVideoAppLink})))}var ee=n(34004);function te(e){var t,n=(t=(0,M.k)()).xl||t.xxl?5:t.lg||t.md?4:3,a=e.series.videos.data.slice(0,n),r={actionType:l.UserAction.Click,entity:l.EntityType.Series,location:l.LocationContext.SeriesWithVideos},s=Object.assign(Object.assign({},e.analyticsData),{id:e.series.id,name:e.series.name});return i().createElement("div",{className:"pl-2 py-2"},i().createElement(F.Row,{className:"no-gutters border border-light rounded-lg"},i().createElement(F.Col,{xs:4,lg:3,className:"pr-3"},i().createElement(C.F,{appLink:e.seriesAppLink,className:"position-relative",analyticsData:s,analyticsOptions:Object.assign(Object.assign({},r),{descriptor:l.ClickDescriptor.TallPoster})},i().createElement(ee.r,{series:e.series,presentationAudiences:e.presentationAudiences,preloadImage:e.preloadImage,imageClass:"rounded-left-lg"}))),i().createElement(F.Col,{xs:8,lg:9},i().createElement("div",{className:"d-flex justify-content-between"},i().createElement("div",{className:"pt-3 ".concat("UT8bc")},null==a?void 0:a.map((function(t){var n=Object.assign(Object.assign({},s),{videoId:t.id,videoName:t.name});return t=Object.assign(Object.assign({},t),{series:e.series}),i().createElement(q.m,{key:t.id,video:t,getSeriesAppLink:function(){return e.seriesAppLink},canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:function(t){return e.getVideoAppLink(t)},analyticsData:n,analyticsOptions:{entity:l.EntityType.Video,location:l.LocationContext.SeriesWithVideos},size:"sm",yearGroups:e.yearGroups})}))),i().createElement("div",{className:"text-right pt-3 pr-3"},i().createElement(C.F,{className:"info-link font-weight-500",appLink:e.seriesAppLink,analyticsData:s,analyticsOptions:Object.assign(Object.assign({},r),{descriptor:l.ClickDescriptor.Link})},i().createElement(x.x,{namespace:"search.seriesWithVideos",phrase:"seeAllVideos"})))))))}var ne=n(2192);function ae(e){var t,n,i,r=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.data)||void 0===t?void 0:t.id,name:null===(n=e.data)||void 0===n?void 0:n.name}),s=Object.assign(Object.assign({location:l.LocationContext.ClassificationListItem},e.analyticsOptions),{actionType:l.UserAction.Click,entity:l.EntityType.Company,descriptor:l.ClickDescriptor.Cover});return a.createElement(ne.Q,Object.assign({},e,{analyticsData:r,analyticsOptions:s,coverUrl:null===(i=e.data.logo)||void 0===i?void 0:i.url}))}var ie=n(9513);const re="ZhLPS";var se=i().memo((function(e){var t,n,a,r=(0,M.k)();if(!(null===(t=e.results)||void 0===t?void 0:t.totalResults)&&!(null===(n=e.topics)||void 0===n?void 0:n.totalResults)&&!(null===(a=e.companies)||void 0===a?void 0:a.totalResults))return i().createElement(i().Fragment,null);var s=e.featuredResult,o=void 0===s?{}:s,c=E.Q.groupResults(e.results.results,e.topics,e.companies,o,r),u=e.availablePresentations;return i().createElement("div",{className:"position-relative"},c.map((function(t,n){switch(t.type){case"featured-result":if(!o||"video"!==o._index)return i().createElement(i().Fragment,{key:"featured-result"});var a=o;return i().createElement("div",{key:"featured-result",className:"pb-3"},i().createElement(P.M.Provider,{value:e.getVideoItemActions},i().createElement(_.J,{key:"featured-result",video:a,presentationAudiences:e.audiences,videoAppLink:e.appLinks.getVideoAppLink(a),seriesAppLink:e.appLinks.getSeriesAppLink(a.series),setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.query,score:a._score,maxScore:a._maxScore,featured:a._featured},pagePositionIndex:n},hideInteractiveBadge:!0,yearGroups:e.yearGroups})));case"companies-and-topics":var r=t.items.length<4;return i().createElement(i().Fragment,{key:"".concat(t.type,":").concat(n)},i().createElement(F.Row,{className:"no-gutters pb-3 mx-n1"},t.items.map((function(t,a){switch(t.type){case"company":return i().createElement(F.Col,{key:t.id,sm:6,md:r?6:4,lg:r?4:3},i().createElement("div",{className:"position-relative px-1 mb-2"},i().createElement(ae,{data:t,getChildAppLink:e.appLinks.getCompanyAppLink,getChildAppLinkOptions:e.appLinks.getCompanyAppLinkOptions,analyticsData:{itemIndex:a,search:{query:e.query,score:t._score,maxScore:t._maxScore,featured:t._featured},pagePositionIndex:n},isLarge:r})));case"Subject":return i().createElement(F.Col,{key:t.id,sm:6,md:r?6:4,lg:r?4:3},i().createElement("div",{className:"position-relative px-1 mb-2"},i().createElement(ie.Vz,{data:t,getChildAppLink:e.appLinks.getClassificationAppLink,getChildAppLinkOptions:function(){return e.appLinks.getClassificationAppLinkOptions(t)},availablePresentations:u,analyticsData:{itemIndex:a,search:{query:e.query,score:t._score,maxScore:t._maxScore,featured:t._featured},pagePositionIndex:n},isLarge:r})))}}))));case"video-item":var s=N.m.first(t.items),c=function(e){return w.M.isClip(e)?I.I:w.M.isInteractive(e)?D.H:q.m}(s);return i().createElement("div",{key:"".concat(t.type,":").concat(n),className:"position-relative ".concat(re)},i().createElement(P.M.Provider,{value:e.getVideoItemActions},i().createElement(c,{video:s,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink,presentationAudiences:e.audiences,setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.query,score:s._score,maxScore:s._maxScore,featured:s._featured},pagePositionIndex:n}})));case"playlist-with-videos":var d=N.m.first(t.items);return i().createElement("div",{key:"".concat(t.type,":").concat(n),className:"mx-n2"},i().createElement($,{playlist:d,yearGroups:e.yearGroups,playlistAppLink:e.appLinks.getPlaylistAppLink(d),presentationAudiences:e.audiences,analyticsData:{search:{query:e.query,score:d._score,maxScore:d._maxScore,featured:d._featured},pagePositionIndex:n},imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,preloadImage:!0,getSeriesAppLink:e.appLinks.getSeriesAppLink,getVideoAppLink:e.appLinks.getVideoAppLink}));case"playlist-thumbnail":var p=N.m.first(t.items);return i().createElement("div",{className:"position-relative ".concat(re),key:"".concat(t.type,":").concat(n)},i().createElement(X,{analyticsData:{search:{query:e.query,score:p._score,maxScore:p._maxScore,featured:p._featured},pagePositionIndex:n},analyticsOptions:{entity:l.EntityType.Playlist,actionType:l.UserAction.Click,location:l.LocationContext.PlaylistListItem},appLink:e.appLinks.getPlaylistAppLink(p),showActions:e.showActions,collection:p,collectionType:"playlist",maskType:V.O.Playlist,imageFallbackType:R.mS.PlaylistThumbnail,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}));case"series-with-videos":var m=N.m.first(t.items);return i().createElement("div",{key:"".concat(t.type,":").concat(n),className:"mx-n2"},i().createElement(te,{yearGroups:e.yearGroups,presentationAudiences:e.audiences,series:m,seriesAppLink:e.appLinks.getSeriesAppLink(m),getVideoAppLink:e.appLinks.getVideoAppLink,analyticsData:{search:{query:e.query,score:m._score,maxScore:m._maxScore,featured:m._featured},pagePositionIndex:n},preloadImage:!0}));case"series-thumbnail":var v=N.m.first(t.items);return i().createElement("div",{className:"position-relative ".concat(re),key:"".concat(t.type,":").concat(n)},i().createElement(X,{analyticsData:{search:{query:e.query,score:v._score,maxScore:v._maxScore,featured:v._featured},pagePositionIndex:n},analyticsOptions:{entity:l.EntityType.Series,actionType:l.UserAction.Click,location:l.LocationContext.SeriesListItem},appLink:e.appLinks.getSeriesAppLink(v),collectionType:"series",collection:v,showActions:e.showActions,maskType:V.O.Series,imageFallbackType:R.mS.SeriesThumbnail,hideBadges:!0,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}))}})))})),oe=n(1575),le=n(17475),ce=n(37802),ue=n(97037),de=n(22902),pe=n(16714),me=n(97291),ve=n(14070),ge=n(65986),ye=n(86702),fe=n(24965),he=n(86698),be=n(82817),ke=n(62756),Ae=n(44110),Ee=n(99742),Le=n(23737),xe=n(44909),Ce=n(1048),Oe=n(85594),Se=n(2284),je=n(24598);function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Fe=["filters.classification","filters.presentation"],Ne=["filters.classification","filters.presentation","isLearner"];function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var _e=n(61699),we=n(1211),Ie=n(23232),De="search.searchResultsEmptyState";function qe(e){var t,n,a=e.scotland&&"nessie"===(null===(n=null===(t=e.query)||void 0===t?void 0:t.trim())||void 0===n?void 0:n.toLowerCase())?Ee.W.EmptyStates.Search.RESULTS_SCOTLAND:Ee.W.EmptyStates.Search.RESULTS;return i().createElement(x.D.Provider,{value:De},i().createElement(Ie.u,null,i().createElement(Ie.u.Image,{src:a}),i().createElement(Ie.u.Heading,null,e.query?i().createElement(x.x,{phrase:"headingWithQuery",options:{query:e.query}}):i().createElement(x.x,{phrase:"headingWithoutQuery"})),i().createElement(Ie.u.Info,null,i().createElement(x.x,{phrase:"info"}),i().createElement(C.F,{className:"info-link",appLink:{application:me.O.SUBJECT,action:ve.e.Subjects.CLASSIFICATION_ALL}},i().createElement(x.x,{phrase:"topicsAppLink"})))))}function Ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,s,o=[],l=!0,c=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=r.call(n)).done)&&(o.push(a.value),o.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return o}}(e,t)||Re(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Re(e,t){if(e){if("string"==typeof e)return Me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(e,t):void 0}}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Be(e){var t,n,i,A,x,C,O,j,F,N,P,_,w,I,D,q,V,R,M,B=e.queryParams,U=B.query,$=Ve((0,o.D)(ye.y.SHOW_SEARCH_MASK,!0),2),G=$[0],H=$[1],W=Ve(a.useState(null),2),Q=W[0],z=W[1],Z=Ve(a.useState(!1),2),J=Z[0],Y=Z[1],K=Ve(a.useState(),2),X=K[0],ee=K[1],te=Ve(a.useState(null),2),ne=te[0],ae=te[1],ie=Ve(a.useState(!1),2),re=ie[0],Ie=ie[1],De=!!(null===(n=null===(t=null==Q?void 0:Q.pagination)||void 0===t?void 0:t.cursors)||void 0===n?void 0:n.next),Be=(0,ke.G)().isPlugin,Ue=s.a.useBasicFetch(u.N.currentUser()),$e=s.a.useBasicFetch((null===(i=Ue.data)||void 0===i?void 0:i.id)&&u.N.user(Ue.data.id)),Ge=s.a.useBasicFetch(v.L.config()),He=s.a.useBasicFetch((null===(A=Ue.data)||void 0===A?void 0:A.isAuthenticated)&&h.h.yearGroups(Ue.data.customerId)),We=(0,he.y)(b.R.Subject),Qe=We.presentation,ze=We.availablePresentations,Ze=We.hasLoaded,Je=(0,be.M)().availableCurriculums,Ye=(0,Ae.i)(),Ke=!!B.moviesAndTv,Xe=function(e){var t,n=s.a.useBasicFetch(_e.o.availablePresentations(b.R.Subject)),a=(0,(0,de.T)().hasPermissions)(pe.C.StudentExperience)?e?[null==e?void 0:e.id]:null:null===(t=n.data)||void 0===t?void 0:t.map((function(e){return e.id}));return s.a.useBasicFetch(n.hasCompleted&&a&&we.J.schoolLevels(a))}(Qe),et=null===(C=null===(x=Xe.data)||void 0===x?void 0:x.schoolLevels)||void 0===C?void 0:C.map((function(e){return e.id})),tt=s.a.useBasicFetch((null==Xe?void 0:Xe.data)&&m.x.topicsFromAllAvailablePresentations(et)),nt=s.a.useBasicFetch(fe.Z.ratings(null===(O=Ue.data)||void 0===O?void 0:O.countryCode)),at=(0,de.T)(),it=at.hasPermissions,rt=at.hasLocalPermissions,st=(0,ce.r)(l.LocationContext.SearchFilters).hasNewMoviesAndTv,ot=it(pe.C.StudentExperience),lt=it(pe.C.ViewCurriculums),ct=rt(pe.E.UseSeriesActions),ut=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o=(null==n?void 0:n.length)&&y.qr.buildBackendFilterParams(e,n,a,r),l=Ce.t.pick(o,r?Ne:Fe);l["filters.classificationType"]=Oe.A.Subject,l["filters.status"]=Se.W.Published,(null==e?void 0:e.moviesAndTv)&&(l["filters.curationTag"]=je.b.MOVIES_AND_TV);var c=null!==(t=null==i?void 0:i.reduce((function(e,t){return e[t.id]=t,e}),{}))&&void 0!==t?t:{},u=!y.qr.getAppliedIndices(e).includes("classification"),d=L.search(e.query,["classification"],l),p=s.a.useBasicFetch(!u&&d);if(!p.data)return p;if(!i||(null==i?void 0:i.length)<2)return p;var m,v=(m=p.data.results,function(e){if(Array.isArray(e))return Te(e)}(m)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(m)||function(e,t){if(e){if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(e,t):void 0}}(m)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).sort((function(e,t){if(e._score!==t._score)return 0;var n=c[e.presentationId],a=c[t.presentationId];return n?a?n.value-a.value:-1:1}));return Object.assign(Object.assign({},p),{data:Object.assign(Object.assign({},p.data),{results:v})})}(B,nt.data,null==Qe?void 0:Qe.id,ze,ot),dt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,i=(null==t?void 0:t.length)&&y.qr.buildBackendFilterParams(e,t,n,!1)||{};i["filters.curationTag"]=je.b.CLICKVIEW_CURATED,n&&(i["filters.presentation"]=n);var r,o=!y.qr.getAppliedIndices(e).includes("company"),l=L.search(e.query,["company"],i),c=s.a.useBasicFetch(!o&&a&&l);return c.data?Object.assign(Object.assign({},c),{data:Object.assign(Object.assign({},c.data),{results:(r=c.data.results,function(e){if(Array.isArray(e))return Pe(e)}(r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})}):c}(B,nt.data,null==Qe?void 0:Qe.id,st),pt=function(e,t){var n,a=E.Q.flattenResults(e),i=null===(n=null==a?void 0:a.results)||void 0===n?void 0:n.find((function(e){return!!e._featured&&"video"===e._index})),r=s.a.useBasicFetch(i&&"video"===i._index?oe.R.video(i.id):null);if(r.data){var o=i._index,l=i._score,c=i._featured;return Object.assign(Object.assign({},r.data),{_index:o,_score:l,_featured:c,_maxScore:t})}}(Q,X),mt=(0,Le.y)({targetType:c.DashboardTargetType.MoviesAndTv,queryParams:B}).dashboard;(0,k.M)({title:null!=U?U:""}),(0,p.M)({fetchNextPage:function(){var e,t;return At(null===(t=null===(e=Q.pagination)||void 0===e?void 0:e.cursors)||void 0===t?void 0:t.next)},hasMore:De,isFetching:J}),xe.y.useOnFilterChange(At,B);var vt=(0,ge._)(ge.i.VideoItem),gt=(0,r.useDispatch)(),yt=(0,ue.c)(l.LocationContext.VideoThumbnail),ft=yt.setFavourite,ht=yt.canFavourite,bt=Ye.hasCompleted&&Ze&&Ue.hasCompleted&&(!(null===(j=Ue.data)||void 0===j?void 0:j.isAuthenticated)||$e.hasCompleted)&&nt.hasCompleted&&Ge.hasCompleted;function kt(){var e=[];return(it(pe.C.StudentExperience)||B.moviesAndTv)&&(e.push("clip"),e.push("interactive")),st||e.push("company"),e}function At(e){if(bt){Y(!0),e||Ie(!0);var t=y.qr.buildBackendFilterParams(B,nt.data,null==Qe?void 0:Qe.id,ot),n=y.qr.getAppliedIndices(B).filter((function(e){return"classification"!==e&&"company"!==e})),a=kt();if(!(n=n.filter((function(e){return!a.find((function(t){return t===e}))}))).length)return z({results:[],totalResults:0,pagination:null}),Y(!1),void Ie(!1);s.a.fetch(gt,L.search(U,n,t,e,(function(t){var n,a;if(e)z(Object.assign(Object.assign({},Q),{results:[].concat((a=Q.results,function(e){if(Array.isArray(e))return Me(e)}(a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||Re(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[E.Q.mapMaxScoreToSearchResults(t.results,X)]),pagination:t.pagination}));else{var i=null===(n=null==t?void 0:t.results[0])||void 0===n?void 0:n._score;ee(i),z(Object.assign(Object.assign({},t),{results:[E.Q.mapMaxScoreToSearchResults(t.results,i)]}))}Y(!1)}),(function(e){(0,f.r)(e.status),Y(!1)}))),e||s.a.fetch(gt,L.tagsAndClassifications(U,n,t,e,(function(e){ae(e),Ie(!1)}),(function(){Ie(!1)})))}}a.useEffect((function(){At()}),[U,bt]),a.useEffect((function(){G&&H(!1)}),[]),xe.y.useMixinCurriculumLinks(Q,z,gt,Je,lt);var Et=[st&&mt.data?y.x$.MoviesAndTv(Ee.W.MoviesAndTv.POPCORN_BOX,Ee.W.MoviesAndTv.POPCORN_BITS):null,y.x$.Rating(nt.data,He.data&&$e.data&&le.S.getStudentMaxRating(He.data,$e.data)),y.x$.HasResources(),y.x$.ObjectTypes(kt()),y.x$.TagOrClassification(ne)].filter(Boolean),Lt=y.x$.Presentation(null===(F=Xe.data)||void 0===F?void 0:F.schoolLevels);y.qr.showPresentationFilter(Lt)&&Et.unshift(Lt);var xt=y.x$.Topics(null===(N=tt.data)||void 0===N?void 0:N.topics.map((function(e){return{name:e.name,id:e.topicIds.join(":")}})));xt.options&&xt.options.length>1&&Et.unshift(xt);var Ct=y.qr.getMoreFilters([y.x$.ProductionYear(),y.x$.HasSubtitles(),y.x$.IsHD(),y.x$.IsClickViewContent(),y.x$.Duration()]),Ot=function(e,t){return{application:me.O.SEARCH,action:ve.e.Search.HOME,params:Object.assign(Object.assign({},t),{query:e})}};if(!Q||!bt)return a.createElement(a.Fragment,null);var St=(Q.totalResults||(null===(P=ut.data)||void 0===P?void 0:P.totalResults)||(null===(_=dt.data)||void 0===_?void 0:_.totalResults))&&ze;return a.createElement("div",{className:"px-4"},a.createElement(S,{substitute:Q.substituteQuery,queryParams:B,getAppLink:Ot}),!Q.substituteQuery&&a.createElement(T,{suggestions:null==Q?void 0:Q.suggestions,queryParams:B,getAppLink:Ot}),!!Ye.data&&!!nt.data&&!!tt.data&&a.createElement(g.J,{queryParams:B,mainFilters:Et,moreFilters:Ct,analyticsOptions:{entity:l.EntityType.SearchResults,location:l.LocationContext.SearchFilters},appLink:{application:me.O.SEARCH,action:ve.e.Search.HOME},isFetchingOptions:re}),a.createElement("section",null,St?a.createElement(se,{query:U,results:Q,topics:ut.data,companies:dt.data,featuredResult:pt,getVideoItemActions:vt,setFavourite:function(e,t,n,a,i){ft(e,t,(function(){var n=Q.results.map((function(n){return n.map((function(n){if(n.id!==e.id)return n;var a=Ue.data;return Object.assign(Object.assign({},n),{favouritedBy:{data:t?[a]:[],pagination:{limit:25,cursors:{next:"",previous:""}}}})}))}));z(Object.assign(Object.assign({},Q),{results:n}))}),a,i)},canFavourite:ht,audiences:!Ke&&Ye.data,currentUser:Ue.data,imageCdnUrl:Ge.data.imageCdnUrl,availablePresentations:ze,showActions:!ot&&ct,yearGroups:He.data,isPlugin:Be,appLinks:xe.y.getAppLinks(Qe,ze,B.moviesAndTv)}):a.createElement(qe,{query:U,scotland:null!==(V=!!(null===(q=null===(I=null===(w=null==Qe?void 0:Qe.description)||void 0===w?void 0:w.toLowerCase)||void 0===I?void 0:(D=I.call(w)).includes)||void 0===q?void 0:q.call(D,"scotland")))&&void 0!==V&&V}),De&&a.createElement(d._,{isFetching:J,fetchNext:At,nextCursor:null===(M=null===(R=Q.pagination)||void 0===R?void 0:R.cursors)||void 0===M?void 0:M.next})))}Be.defaultProps={queryParams:{}}},24965:(e,t,n)=>{n.d(t,{Z:()=>i});var a=n(97395),i={ratings:function(e){return{url:"/api/domain/v2/me/ratings",publicUrl:a._.urlBuilder("/api/domain/v2/me/ratings",{countryCode:e}),key:"ratings",formatData:function(e){return e.sort((function(e,t){return e.value-t.value}))}}}}},41063:(e,t,n)=>{n.d(t,{b:()=>s});var a=n(22902),i=n(37802),r=n(16714);function s(){var e=(0,a.T)().hasPermissions;return(0,i.r)(null).manageVideoAccess&&e(r.C.ManageVideoAccess)}},82817:(e,t,n)=>{n.d(t,{M:()=>u});var a=n(20354),i=n(75896),r=n(21750),s=n(22902),o=n(16714),l=n(25925),c=n(86698),u=function(e){var t,n=(0,(0,s.T)().hasPermissions)(o.C.ViewCurriculums),u=(0,c.y)(l.R.Curriculum),d=u.hasLoaded,p=u.availablePresentations,m=u.presentation,v=u.persistPresentation,g=a.a.useBasicFetch((null==m?void 0:m.id)&&e&&r.x.curriculumLinks(e,null==m?void 0:m.id)),y=null==p?void 0:p.map((function(e){return e.id})),f=a.a.useBasicFetch(e&&(null==y?void 0:y.length)&&r.x.hasCurriculumLinks([e],y)),h=null===(t=i.m.first(f.data))||void 0===t?void 0:t._hasCurriculumLinks;return{hasLoaded:!n||!!(d&&g.hasCompleted&&f.hasCompleted),currentCurriculum:m,curriculumLinks:g.data,availableCurriculums:p,updateCurriculum:function(e,t,n){return v(t,n,e)},customerHasCurriculumLinks:h}}},44110:(e,t,n)=>{n.d(t,{i:()=>o});var a=n(20354),i=n(25925),r=n(89454),s=n(86698),o=function(e){var t=(0,s.y)(i.R.Subject,null,e,!!e).presentation;return a.a.useBasicFetch(!!t&&r.O.presentationAudiences(t.id))}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 9125-4b6a5fb7ad-lite.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9125],{98364:(e,t,n)=>{n.d(t,{V:()=>o});var a=n(1024),i=n.n(a);const r={emoji:"d86p2"};function o(e){return i().createElement(i().Fragment,null,i().createElement("span",{className:r.emoji},e.emoji),e.children)}},23201:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(1024),i=n(92802),r=n(33936),o=n(83345),l=n(2102),c="shared.formButtons";function s(e){var t=(0,i.u6)(),n=(0,r.l)(t);return a.createElement(l.m,{variant:e.variant||"primary",type:"submit",disabled:!n,size:e.size,className:e.className?e.className:"",showSpinner:t.isSubmitting},e.submitText?a.createElement(a.Fragment,null,e.submitText):a.createElement(o.x,{namespace:c,phrase:e.isNew?"create":"save"}))}},38365:(e,t,n)=>{n.d(t,{n:()=>E,W:()=>T});var a=n(1024),i=n(92802),r=n(99910),o=n(1048),l=n(79014),c=n(73814),s=n(36848),d=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]])}return n};function u(e){var t=e.label,n=e.checkboxLabelClassName,i=e.checkboxLabelFontWeight,o=e.className,l=d(e,["label","checkboxLabelClassName","checkboxLabelFontWeight","className"]);return a.createElement(r.Form.Group,null,a.createElement("div",{className:"custom-control custom-checkbox ".concat(o)},a.createElement(E,Object.assign({className:"custom-control-input"},l)),a.createElement(r.Form.Label,{className:"custom-control-label cursor-pointer ".concat("normal"===i?"font-weight-normal":""," \n ").concat(n),htmlFor:l.id},t),e.checkboxAppLink&&e.checkboxAppLinkText&&a.createElement(a.Fragment,null,a.createElement("span",null," "),a.createElement(s.F,{appLink:e.checkboxAppLink,className:"info-link"},e.checkboxAppLinkText))))}var m=n(83914),p=n(58130),g=n(83345);function v(e){var t=(0,i.u6)().values[e.fieldName];return"string"!=typeof t?a.createElement(a.Fragment,null):a.createElement("div",{className:"float-right text-muted font-weight-normal"},t.length,"/",e.limit," characters")}const f={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG"};function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var y=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]])}return n},b="shared.formField";function E(e){var t,n,r=e.children,c=y(e,["children"]),s=(t=a.useState(e.type),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,o,l=[],c=!0,s=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=r.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=s[0],u=s[1],g=l.q.isFunction(r)?function(e){return r(e)}:a.Children.count(r)?r:null;if("password"!==c.type)return a.createElement(i.gN,Object.assign({},o.t.omit(c,["formSize"])),g);var v="position-relative ".concat(f.passwordContainer);return c.className&&(v+=" ".concat(c.className)),c.disabled&&(v+=" ".concat(f.passwordContainerDisabled)),a.createElement("div",{className:v},a.createElement(i.gN,Object.assign({},o.t.omit(c,["formSize","type","className"]),{type:d,className:"".concat(f.passwordInput," border-0 w-100 h-100 outline-none rounded")}),g),"password"===c.type&&a.createElement(m.x,{svgName:"password"===d?p.vn.VisibleOn:p.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(f.revealPassword),onClick:function(){u("password"===d?"text":"password")}}))}function T(e){var t=e.label,n=e.className,l=e.showCharacterCounter,s=e.showRequiredStar,d=e.infoTooltip,h=e.infoTooltipPlacement,T=e.infoText,w=e.formSize,L=e.showOptionalLabel,C=y(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel"]),k=(0,i.u6)(),x=k.errors,N=k.touched,S=function(){};if("checkbox"===C.type){var O=o.t.omit(e,["formSize","infoTooltipPlacement"]);return e.disabled&&(O.onChange=S),a.createElement(u,Object.assign({},O))}var j=Object.assign(Object.assign({},C),{className:c.w.getCustomFormControlClassName(x,N,C.name,w,n)});return e.disabled&&(j.onChange=S),a.createElement(r.Form.Group,null,!!t&&a.createElement(r.Form.Label,{htmlFor:C.id,className:"d-flex align-items-center"},t,s&&a.createElement("span",{className:"text-danger"},"*"),d&&a.createElement(m.x,{className:"svg-container text-muted ".concat(f.infoTooltip),svgName:p.vn.Info,title:d,tooltipPlacement:h,tooltipSpanHack:!0}),L&&a.createElement("span",{className:"text-muted"}," ",a.createElement(g.x,{namespace:b,phrase:"optional"})),!!l&&!!C.maxLength&&a.createElement("div",{className:"ml-auto"},a.createElement(v,{fieldName:C.name,limit:C.maxLength}))),a.createElement(E,Object.assign({},j)),!!T&&a.createElement(r.Form.Text,{className:"text-muted"},T),a.createElement(i.Bc,{name:C.name},(function(e){return a.createElement(r.Form.Control.Feedback,{type:"invalid"},e)})))}E.defaultProps={autoComplete:"off"},T.defaultProps={autoComplete:"off",infoTooltipPlacement:"top"}},82644:(e,t,n)=>{n.d(t,{b:()=>d,n:()=>s});var a=n(1024),i=n(92802),r=n(79014),o=n(1048);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var c=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(n[a[i]]=e[a[i]])}return n};function s(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,s=e.initialValues,d=e.onSubmit,u=c(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),m=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=o.t.deepClone(e);return function e(n){Object.keys(t).forEach((function(a){t.hasOwnProperty(a)&&(o.t.isObject(n[a])?e(n[a]):null===t[a]&&delete t[a])}))}(t),t}(s)):s,p={allowInitialSubmit:e.allowInitialSubmit};return a.createElement(i.J9,Object.assign({enableReinitialize:!0},u,{initialValues:m,onSubmit:function(t,a){var i=a.setSubmitting,r=a.resetForm,o=a.setFieldError,c=n&&e.validationSchema?e.validationSchema.cast(t):t;d(c,(function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.reset&&r(),n.errors)for(var a=0,c=Object.entries(n.errors);a<c.length;a++){var s=(e=c[a],t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,o,l=[],c=!0,s=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=r.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=s[0],u=s[1];o(d,u)}i(!1)}))},initialStatus:p}),r.q.isFunction(e.children)?function(t){return e.children(t)}:a.Children.count(e.children)?e.children:null)}function d(){return(0,i.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},97531:(e,t,n)=>{n.d(t,{L:()=>cn});var a=n(1024),i=n.n(a),r=n(20354),o=n(79014),l=n(65294),c=n(53957),s=n(58130),d=n(78479),u=n(42308),m=n(11518),p=n(58704),g=n(5281),v=n(58564),f=n(49439);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var y=i().memo((function(e){var t,n,a=e.data,r=e.seriesAppLink,o=e.context,l=e.thumbnailSize,s=e.preloadImage,d=(t=(0,f.L)({className:"lZsTl",style:{transform:"scale(".concat((null==o?void 0:o.type)===c.WidgetType.LargeRow?1.1:1.15,")")}}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,o,l=[],c=!0,s=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=r.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=d[0],m=d[1];i().useEffect((function(){e.onHover(m)}),[m]);var p="lcmBu";return o.type===c.WidgetType.LargeRow&&(p="iVL1A"),i().createElement("div",{ref:u,className:"px-1 flex-shrink-0 position-relative ".concat(p," ").concat("CmXOx")},i().createElement(v.u,{video:a,type:"expandable",appLink:e.getAppLink(a),seriesAppLink:r,imageOptions:{size:l},preload:s,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,setFavourite:e.setFavourite,canFavourite:e.canFavourite,hovering:m}))}));function b(e){var t,n,a;return i().createElement(g.k,{name:e.name,description:e.description,type:c.WidgetType.Row,contents:p.z.Videos,collection:e.content,childComponent:y,extraChildComponentProps:{setFavourite:e.setFavourite,canFavourite:e.canFavourite},getChildAppLink:null===(t=e.appLinks)||void 0===t?void 0:t.videoType,prefetched:!0,hideBleedingContent:e.showHighlight,hideButtons:e.showHighlight,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLink:null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.widgetVideoList)||void 0===a?void 0:a.call(n,e.id,e.name)})}function E(e){var t,n,a;return i().createElement(g.k,{name:e.name,description:e.description,type:c.WidgetType.LargeRow,contents:p.z.Videos,collection:e.content,childComponent:y,extraChildComponentProps:{setFavourite:e.setFavourite,canFavourite:e.canFavourite},getChildAppLink:null===(t=e.appLinks)||void 0===t?void 0:t.videoType,prefetched:!0,hideBleedingContent:e.showHighlight,hideButtons:e.showHighlight,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLink:null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.widgetVideoList)||void 0===a?void 0:a.call(n,e.id,e.name)})}var T=n(36848),w=n(34004),L=n(65858);const C={largeSeriesItem:"HZ00X",smallSeriesItem:"PQ2sv",partialLoading:"hMoHO"};function k(e){var t=e.data,n=Object.assign(Object.assign({},e.analyticsData),{id:null==t?void 0:t.id,name:null==t?void 0:t.name}),i=Object.assign(Object.assign({},e.analyticsOptions),{actionType:L.UserAction.Click,entity:L.EntityType.Series,descriptor:L.ClickDescriptor.TallPoster});return a.createElement(T.F,{key:t.id,appLink:e.getAppLink(t),className:"position-relative px-1 flex-shrink-0 ".concat(e.isSmall?C.smallSeriesItem:C.largeSeriesItem," "),analyticsData:n,analyticsOptions:i},a.createElement(w.r,{series:t,presentationAudiences:e.audiences,preloadImage:e.preloadImage,isSmall:e.isSmall}))}var x=n(79967),N=n(55827);function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function O(e){return i().createElement(g.k,{name:e.name,description:e.description,type:c.WidgetType.Row,contents:p.z.Series,collection:e.content,childComponent:k,extraChildComponentProps:{audiences:e.audiences},getChildAppLink:function(t){var n,a;return null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.series)||void 0===a?void 0:a.call(n,t)},prefetched:!0,hideBleedingContent:e.showHighlight,hideButtons:e.showHighlight,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions})}var j=n(3626),D=n(94495);function A(e){var t,n,a,r,o=e.content[0];return i().createElement(i().Fragment,null,i().createElement(D.B,{name:e.name,description:e.description}),i().createElement(j.J,{video:o,presentationAudiences:e.audiences,videoAppLink:null===(n=null===(t=e.appLinks)||void 0===t?void 0:t.videoType)||void 0===n?void 0:n.call(t,o),seriesAppLink:null===(r=null===(a=e.appLinks)||void 0===a?void 0:a.series)||void 0===r?void 0:r.call(a,o.series),setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,imageCdnUrl:e.imageCdnUrl,hideInteractiveBadge:!0,showVideoGuidance:e.showVideoGuidance,yearGroups:e.yearGroups}))}var F=n(99910);function I(){return i().createElement("div",{className:"partial-loading-background badge-pill mr-2",style:{height:"2.5rem",width:"9.375rem"}})}function P(){return i().createElement("div",{className:"d-flex align-items-center mw-100"},i().createElement(I,null),i().createElement(I,null))}var W=n(9513),M=n(65163),U=n(47770),V=n(16450),R=n(43741),B=n(67453),z=n(54610);function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function _(e){return e.reduce((function(e,t){return e+((null==t?void 0:t.totalVideos)||0)}),0)}function G(e){return e.totalVideos?"".concat(e.totalVideos," new video").concat(e.totalVideos>1?"s":""):""}function Z(e){var t,n,a=function(e,t){var n;if((null===(n=e.metadata)||void 0===n?void 0:n.appLink)===c.CuratedDashboardAppLink.ClassificationLatestReleases)return{id:"classification-latest-releases",name:"All new releases",cover:{url:B.j.getUrlById(e.imageCdnUrl,z.__.Covers,e.metadata.imageId,z.h2.Medium)},totalVideos:_(t)}}(e,e.content),r=(null===(t=e.metadata)||void 0===t?void 0:t.appLink)===c.CuratedDashboardAppLink.ClassificationLatestReleases;return i().createElement(V.e,{collection:a?[a].concat((n=e.content,function(e){if(Array.isArray(e))return H(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return H(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())):e.content,getChildAppLink:r?function(t){var n,a;return null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.classificationLatestReleases)||void 0===a?void 0:a.call(n,t)}:function(t){var n,a;return null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.classification)||void 0===a?void 0:a.call(n,t)},childComponent:W.Vz,partialLoadingComponent:R.Q,heading:e.name,getSubtitle:r?G:void 0,description:e.description,hideButtons:e.showHighlight,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions})}var Y=n(98981),X={actionType:L.UserAction.Click,entity:L.EntityType.Playlist,location:L.LocationContext.PlaylistListItem,descriptor:L.ClickDescriptor.Cover};function $(e){return a.createElement("div",null,a.createElement(D.B,{name:e.name,description:e.description}),a.createElement(F.Row,{noGutters:!0,className:"mx-n1 mb-n2"},e.content.map((function(t){var n,i;return a.createElement(F.Col,{key:t.id,xs:6,sm:4,lg:3,className:"px-1 pb-2 columns-of-five"},a.createElement(Y.tN,{data:t,presentationAudiences:e.audiences,appLink:null===(i=null===(n=e.appLinks)||void 0===n?void 0:n.playlist)||void 0===i?void 0:i.call(n,t),itemStyle:"round",analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),X)}))}))))}var q=n(49542),J=n(78276),Q=n(5465);const K={slidingSubjectSmall:"fgIje",slidingSubjectLarge:"CJwKL",heading:"P16Yg",posterContainer:"VtrLt",partialLoading:"IgCcl",labelContainer:"ujwlj"};function ee(e){var t,n=e.data,i=e.preloadImage,r=Object.assign(Object.assign({},e.analyticsOptions),{entity:L.EntityType.Classification,actionType:L.UserAction.Click,descriptor:L.ClickDescriptor.TallPoster});return a.createElement("div",{className:(t=K.posterContainer,e.context.type===c.WidgetType.Row?t+=" ".concat(K.slidingSubjectSmall):t+=" ".concat(K.slidingSubjectLarge),t)},a.createElement(J.Z,{data:n.tallPoster,alt:n.name,appLink:e.getAppLink(n),imageType:z.__.TallPosters,preload:i,imageOptions:{size:z.h2.Medium},imageClassName:"rounded-lg",analyticsData:e.analyticsData,analyticsOptions:r},a.createElement(Q.oy,{type:Q.mS.TallSubject}),a.createElement("h3",{className:"px-2 ".concat(K.heading)},n.name)))}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var ne="explore-all-topics";function ae(e){var t,n=function(e){var t,n,a,i,r;if((null===(t=e.metadata)||void 0===t?void 0:t.text)||(null===(n=e.metadata)||void 0===n?void 0:n.imageId))return{id:(null===(a=e.metadata)||void 0===a?void 0:a.appLink)===c.CuratedDashboardAppLink.ExploreAllTopics?ne:"",name:null===(i=e.metadata)||void 0===i?void 0:i.text,tallPoster:{url:(null===(r=e.metadata)||void 0===r?void 0:r.imageId)?B.j.getUrlById(e.imageCdnUrl,z.__.TallPosters,e.metadata.imageId,z.h2.Medium):""}}}(e),a=q.d.getCustomAppLink(e);return i().createElement("div",null,i().createElement(g.k,{name:e.name,appLink:a,description:e.description,type:c.WidgetType.Row,contents:p.z.Subjects,collection:n?[n].concat((t=e.content,function(e){if(Array.isArray(e))return te(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())):e.content,childComponent:ee,extraChildComponentProps:{audiences:e.audiences},getChildAppLink:function(t){var n,a,i,r;return t.id?t.id===ne?null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.allTopics)||void 0===a?void 0:a.call(n):null===(r=null===(i=e.appLinks)||void 0===i?void 0:i.classification)||void 0===r?void 0:r.call(i,t):null},analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,prefetched:!0,hideBleedingContent:e.showHighlight,hideButtons:e.showHighlight}))}function ie(e){var t;return i().createElement("div",null,i().createElement(g.k,{name:e.name,description:e.description,type:c.WidgetType.Row,contents:p.z.SmallSeries,collection:e.content,childComponent:k,extraChildComponentProps:{audiences:e.audiences,isSmall:!0},getChildAppLink:null===(t=e.appLinks)||void 0===t?void 0:t.series,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,prefetched:!0,hideBleedingContent:e.showHighlight,hideButtons:e.showHighlight}))}var re=function(e){return i().createElement("div",{className:"".concat(e.type===c.WidgetType.Row?K.slidingSubjectSmall:K.slidingSubjectLarge," px-1")},i().createElement("div",{className:"".concat(K.partialLoading," partial-loading-background rounded-lg")}))};function oe(e){for(var t,n,a=(t=e.type,(n=(0,x.k)()).xs?2:n.sm?3:n.md?4:n.lg||t===c.WidgetType.LargeRow?5:6),r=[],o=0;o<a;o++)r.push(i().createElement(re,{key:o,type:e.type}));return i().createElement("div",{className:"pb-3"},i().createElement(N.l,null),i().createElement("div",{className:"row no-gutters mx-n1"},r))}var le=n(55460);const ce="eSMIx",se="layDP";function de(e){var t,n,a=q.d.getCustomAppLink(e),r=(null==e?void 0:e.imageCdnUrl)&&(null===(t=e.metadata)||void 0===t?void 0:t.imageId)?B.j.getUrlById(e.imageCdnUrl,z.__.Banners,e.metadata.imageId,z.h2.Medium):"";return i().createElement("div",null,i().createElement(T.F,{appLink:a,style:r?{backgroundImage:"url(".concat(r,")")}:{},className:"".concat(ce," mb-2 d-flex justify-content-between no-decoration ").concat(e.name?"":se),analyticsData:{url:le.AppLinkHelper.getHref(a)},analyticsOptions:{actionType:L.UserAction.Click,entity:L.EntityType.Url,location:L.LocationContext.ContentUpdatesBanner}},i().createElement("h2",{className:"h4 text-white mb-0"},e.name)),i().createElement(g.k,{type:c.WidgetType.Row,contents:p.z.Videos,getChildAppLink:function(t){var n,a;return null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.videoType)||void 0===a?void 0:a.call(n,t)},collection:e.content,childComponent:y,extraChildComponentProps:{setFavourite:e.setFavourite,canFavourite:e.canFavourite,seriesAppLink:null===(n=e.appLinks)||void 0===n?void 0:n.series},hideBleedingContent:e.showHighlight,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,limitTotalItems:e.limitTotalItems,prefetched:!0,hideName:!0}))}var ue=n(75896);const me={banner:"iCyo4",bannerContent:"cgv_6",cta:"BXwH2"};function pe(e){var t,n,a,r,o,l,c=(0,x.k)(),s=Object.assign(Object.assign({},e.analyticsOptions),{location:L.LocationContext.Classification,actionType:L.UserAction.Click,entity:L.EntityType.Classification,descriptor:L.ClickDescriptor.Banner});return i().createElement(T.F,{appLink:function(){var t,n,a=ue.m.first(e.content);return null===(n=null===(t=e.appLinks)||void 0===t?void 0:t.classification)||void 0===n?void 0:n.call(t,a)}(),analyticsData:e.analyticsData,analyticsOptions:s},i().createElement("div",{className:"banner rounded-lg position-relative ".concat(me.banner),style:{backgroundImage:"url('".concat((l=ue.m.first(e.content),B.j.createBannerUrl(l.banner,{fallbackBaseUrl:"",fallbackCategoryName:l.name,type:z.__.Banners},{size:z.h2.Large})),"')")}},e.name&&i().createElement("div",{className:me.bannerContent},i().createElement("h2",{className:(o="text-white clamp-2",c.xs||c.sm?o+=" h4":c.md?o+=" h3":o+=" h2",o+=" text-white")},e.name)),!!(null===(n=null===(t=e.metadata)||void 0===t?void 0:t.cta)||void 0===n?void 0:n.text)&&i().createElement("div",{className:me.cta},i().createElement("div",{className:"btn btn-outline-dark text-nowrap"},null===(r=null===(a=e.metadata)||void 0===a?void 0:a.cta)||void 0===r?void 0:r.text))))}function ge(){return i().createElement("div",{className:"banner rounded-lg position-relative ".concat(me.banner)},i().createElement("div",{className:"".concat(me.bannerContent)}))}var ve=n(92802),fe=n(23481),he=n(83345),ye=n(98364),be=n(10874),Ee=n(82644),Te=n(38365),we=n(23201),Le=n(69883),Ce=n(5173),ke=Ce.Ry().shape({feedbackInput:Ce.Z_().max(5e3,(function(){return fe.T.getPhrase("shared.feedbackForm","tooLong")}))});const xe={promptContainer:"A_kCD",text:"UFm9h",form:"na9Vb"};function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Se(){Se=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function s(e,t,n,i){var r=t&&t.prototype instanceof m?t:m,o=Object.create(r.prototype),l=new k(i||[]);return a(o,"_invoke",{value:T(e,n,l)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var u={};function m(){}function p(){}function g(){}var v={};c(v,r,(function(){return this}));var f=Object.getPrototypeOf,h=f&&f(f(x([])));h&&h!==t&&n.call(h,r)&&(v=h);var y=g.prototype=m.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function i(a,r,o,l){var c=d(e[a],e,r);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==Ne(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){i("next",e,o,l)}),(function(e){i("throw",e,o,l)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return i("throw",e,o,l)}))}l(c.arg)}var r;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){i(e,n,t,a)}))}return r=r?r.then(a,a):a()}})}function T(e,t,n){var a="suspendedStart";return function(i,r){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===i)throw r;return{value:void 0,done:!0}}for(n.method=i,n.arg=r;;){var o=n.delegate;if(o){var l=w(o,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===a)throw a="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a="executing";var c=d(e,t,n);if("normal"===c.type){if(a=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a="completed",n.method="throw",n.arg=c.arg)}}}function w(e,t){var n=t.method,a=e.iterator[n];if(void 0===a)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),u;var i=d(a,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,u;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function x(e){if(e||""===e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function t(){for(;++a<e.length;)if(n.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}throw new TypeError(Ne(e)+" is not iterable")}return p.prototype=g,a(y,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:p,configurable:!0}),p.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(E.prototype),c(E.prototype,o,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,a,i,r){void 0===r&&(r=Promise);var o=new E(s(t,n,a,i),r);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(y),c(y,l,"Generator"),c(y,r,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var a in t)n.push(a);return n.reverse(),function e(){for(;n.length;){var a=n.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=x,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(n,a){return o.type="throw",o.arg=e,t.next=n,a&&(t.method="next",t.arg=void 0),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i],o=r.completion;if("root"===r.tryLoc)return a("end");if(r.tryLoc<=this.prev){var l=n.call(r,"catchLoc"),c=n.call(r,"finallyLoc");if(l&&c){if(this.prev<r.catchLoc)return a(r.catchLoc,!0);if(this.prev<r.finallyLoc)return a(r.finallyLoc)}else if(l){if(this.prev<r.catchLoc)return a(r.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return a(r.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,u):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if("throw"===a.type){var i=a.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var je=function(e,t,n,a){return new(n||(n=Promise))((function(i,r){function o(e){try{c(a.next(e))}catch(e){r(e)}}function l(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}c((a=a.apply(e,t||[])).next())}))},De="shared.feedbackForm";function Ae(e){var t,n,a=(t=i().useState("prompt"),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,o,l=[],c=!0,s=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=r.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oe(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=a[0],l=a[1],c=(0,Le.Z)();function d(t,n){return je(this,void 0,void 0,Se().mark((function a(){return Se().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,e.onSubmit({content:t.feedbackInput,type:"yes"===r?"positive":"negative"});case 3:l("done"),a.next=10;break;case 6:a.prev=6,a.t0=a.catch(0),l("prompt"),c.error(fe.T.getPhrase(De,"error"));case 10:return a.prev=10,n({reset:!0}),a.finish(10);case 13:case"end":return a.stop()}}),a,null,[[0,6,10,13]])})))}return o.q.isFunction(e.onSubmit)?"prompt"===r?i().createElement("div",{className:xe.promptContainer},i().createElement("p",{className:"font-weight-500 mr-2 ".concat(xe.text)},i().createElement(ye.V,{emoji:"🔎"},i().createElement(he.x,{namespace:De,phrase:"feedbackQuestion"}))),i().createElement("div",{className:"d-flex align-items-center"},i().createElement(be.h,{className:"btn btn-outline-dark mr-2",onClick:function(){l("yes")},svgName:s.vn.ThumbsUp},i().createElement(he.x,{namespace:De,phrase:"yes"})),i().createElement(be.h,{className:"btn btn-outline-dark",onClick:function(){l("no")},svgName:s.vn.ThumbsDown},i().createElement(he.x,{namespace:De,phrase:"no"})))):"yes"===r?i().createElement(Ee.n,{onSubmit:d,initialValues:{feedbackInput:""},validationSchema:ke},i().createElement(ve.l0,{className:xe.form},i().createElement("p",{className:"font-weight-500 ".concat(xe.text)},i().createElement(ye.V,{emoji:"👏"},i().createElement(he.x,{namespace:De,phrase:"happyFeedback"}))),i().createElement(Te.W,{name:"feedbackInput",as:"textarea",autoComplete:"off",autoFocus:!0,rows:4,placeholder:fe.T.getPhrase(De,"feedbackPlaceholder"),spellCheck:!1}),i().createElement("div",{className:"d-flex justify-content-end w-100"},i().createElement("button",{className:"btn btn-link",onClick:function(){return l("prompt")}},i().createElement(he.x,{namespace:De,phrase:"back"})),i().createElement(we.A,{variant:"dark",submitText:fe.T.getPhrase(De,"sendFeedback")})))):"no"===r?i().createElement(Ee.n,{onSubmit:d,initialValues:{feedbackInput:""},validationSchema:ke},i().createElement(ve.l0,{className:xe.form},i().createElement("p",{className:"font-weight-500 ".concat(xe.text)},i().createElement(ye.V,{emoji:"😢"},i().createElement(he.x,{namespace:De,phrase:"unhappyFeedback"}))),i().createElement(Te.W,{name:"feedbackInput",as:"textarea",autoComplete:"off",autoFocus:!0,rows:4,placeholder:fe.T.getPhrase(De,"feedbackPlaceholder"),spellCheck:!1}),i().createElement("div",{className:"d-flex justify-content-end w-100"},i().createElement("button",{className:"btn btn-link",onClick:function(){return l("prompt")}},i().createElement(he.x,{namespace:De,phrase:"back"})),i().createElement(we.A,{variant:"dark",submitText:fe.T.getPhrase(De,"sendFeedback")})))):"done"===r?i().createElement("p",{className:"font-weight-500 text-center"},i().createElement(ye.V,{emoji:"🙌"},i().createElement(he.x,{namespace:De,phrase:"thankYou"}))):i().createElement(i().Fragment,null):i().createElement(i().Fragment,null)}const Fe="MtcB3",Ie="Geg0V";function Pe(e){return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(Fe," px-4 py-3 rounded-lg mb-3")},i().createElement("h2",{className:"h5"},e.name),i().createElement(F.Row,{className:"mb-2 ".concat(Ie)},e.content.map((function(t){var n,a,r,o=B.j.createUrl(null===(n=t.cover)||void 0===n?void 0:n.url,{size:z.h2.Small});return i().createElement(F.Col,{key:t.id,xs:12,sm:6,lg:4},i().createElement(T.F,{appLink:null===(r=null===(a=e.appLinks)||void 0===a?void 0:a.classification)||void 0===r?void 0:r.call(a,t),className:"d-flex align-items-center mb-2"},i().createElement("div",{className:"".concat("ZMjnx"," mr-2")},i().createElement("div",{className:"".concat("SsxEf"," rounded"),style:{backgroundImage:"url('".concat(o,"')")}})),i().createElement("div",null,t.name)))})))),i().createElement(Ae,{onSubmit:e.onSubmitFeedback}))}var We=n(2284);const Me="OZATG",Ue="hcAU2",Ve="Tbieu",Re="mGGrd",Be="VtzxT",ze="jrY7R",He="yAgR6",_e="RjJ7O",Ge="TJ7Sl",Ze="yzmvY",Ye="hGi43";function Xe(e){var t,n,a,r=B.j.createUrl(null===(t=e.data.cover)||void 0===t?void 0:t.url,{size:z.h2.Small}),o=B.j.createUrl(null===(n=e.data.thumbnail)||void 0===n?void 0:n.url,{size:z.h2.Medium}),l={backgroundColor:null===(a=e.data.metadata)||void 0===a?void 0:a.backgroundColor};return o&&(l.backgroundImage="url('".concat(o,"')")),i().createElement("div",{className:"d-flex position-relative rounded-lg h-100 ".concat(Ue," ").concat(e.isLarge?Ve:Re),style:l},i().createElement("div",{className:"".concat(Be)},i().createElement("div",{className:"".concat(ze)},i().createElement("h3",{className:"".concat(He," h4 ").concat(e.isLarge?"text-nowrap text-truncate":"text-wrap clamp-3")},e.data.name),e.isLarge&&i().createElement("div",{className:"text-left ".concat(_e)},i().createElement("p",{className:Ze},e.data.description))),e.isLarge&&i().createElement("div",{className:Ye},i().createElement("div",{className:"".concat(!e.appLink&&"cursor-default"," btn btn-outline-dark")},fe.T.getPhrase("shared.subjectThumbnailWidgetItem","buttonLabel")))),!o&&!!r&&i().createElement("div",{className:"".concat(Ge),style:{backgroundImage:"url('".concat(r,"')")}}))}var $e=i().memo((function(e){var t,n,a,r,o=(null===(t=e.data)||void 0===t?void 0:t.status)===We.W.ComingSoon,l=Object.assign(Object.assign({},e.analyticsData),{id:null===(n=e.data)||void 0===n?void 0:n.id,name:null===(a=e.data)||void 0===a?void 0:a.name,presentationId:null===(r=e.data)||void 0===r?void 0:r.presentationId,comingSoon:!!o}),c=Object.assign(Object.assign({location:L.LocationContext.ClassificationListItem},e.analyticsOptions),{actionType:L.UserAction.Click,entity:L.EntityType.Classification,descriptor:L.ClickDescriptor.Thumbnail});return e.appLink?i().createElement(T.F,{className:Me,appLink:e.appLink,analyticsData:l,analyticsOptions:c},i().createElement(Xe,Object.assign({},e))):i().createElement(Xe,Object.assign({},e))}));function qe(e){return i().createElement(i().Fragment,null,i().createElement(D.B,{name:e.name,description:e.description}),i().createElement(F.Row,{noGutters:!0,className:"mx-n1 mb-n2"},e.content.map((function(t){var n,a;return i().createElement(F.Col,{key:t.id,sm:12,md:6,className:"px-1 pb-2"},i().createElement($e,{data:t,appLink:null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.classification)||void 0===a?void 0:a.call(n,t),isLarge:!0,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions}))}))))}function Je(e){return i().createElement(i().Fragment,null,i().createElement(D.B,{name:e.name,description:e.description}),i().createElement(F.Row,{noGutters:!0,className:"mx-n1 mb-n2"},e.content.map((function(t){var n,a;return i().createElement(F.Col,{key:t.id,lg:4,md:6,sm:6,xs:12,className:"px-1 pb-2"},i().createElement($e,{data:t,appLink:null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.classification)||void 0===a?void 0:a.call(n,t),analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions}))}))))}function Qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var et=n(1048),tt=n(91028),nt=n(83914),at=n(11607),it=n(83523),rt=n(92038),ot="shared.subjectWidgetItem",lt=i().forwardRef((function(e,t){var n;return"hidden"===(null===(n=e.style)||void 0===n?void 0:n.visibility)?i().createElement("div",{ref:t,className:"d-flex align-items-center position-relative clamp-2 ".concat(rt.Z.widgetItem," ").concat(rt.Z.draggingItem),style:et.t.omit(e.style,["visibility"])}):i().createElement("div",{ref:t,className:"border d-flex align-items-center position-relative ".concat(rt.Z.widgetItem),style:et.t.omit(e.style,["visibility"])},i().createElement("div",Object.assign({className:"\n ".concat(rt.Z.dragHandle," ml-3 d-flex justify-content-center align-items-center \n ").concat(e.isDragging?"cursor-grabbing":"cursor-grab"," ").concat(e.isVisible?"":"text-muted","\n ")},e.dragAttributes,e.dragListeners),i().createElement(nt.x,{svgName:s.vn.Hamburger})),i().createElement("div",{className:"px-3 text-center d-flex flex-column justify-content-center text-nowrap text-truncate"},i().createElement("h3",{className:"".concat(rt.Z.name," h6 text-truncate mb-0 mt-1 pb-1 ").concat(e.isVisible?"":"text-muted")},e.data.name)),i().createElement("div",{className:"ml-auto mr-3"},i().createElement(it.Z,{on:e.isVisible,onClick:function(){return e.onToggleVisibility(e.data)},tooltipText:e.canToggle?fe.T.getPhrase(ot,e.isVisible?"hideFromDashboard":"showOnDashboard"):fe.T.getPhrase(ot,"cantToggle"),disabled:!e.canToggle,showStateWhenDisabled:!0})))})),ct=n(13112),st=n(1287),dt=n(2102),ut=n(54569),mt=n(49985);function pt(e){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pt(e)}function gt(){gt=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function s(e,t,n,i){var r=t&&t.prototype instanceof m?t:m,o=Object.create(r.prototype),l=new k(i||[]);return a(o,"_invoke",{value:T(e,n,l)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var u={};function m(){}function p(){}function g(){}var v={};c(v,r,(function(){return this}));var f=Object.getPrototypeOf,h=f&&f(f(x([])));h&&h!==t&&n.call(h,r)&&(v=h);var y=g.prototype=m.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function i(a,r,o,l){var c=d(e[a],e,r);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==pt(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){i("next",e,o,l)}),(function(e){i("throw",e,o,l)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return i("throw",e,o,l)}))}l(c.arg)}var r;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){i(e,n,t,a)}))}return r=r?r.then(a,a):a()}})}function T(e,t,n){var a="suspendedStart";return function(i,r){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===i)throw r;return{value:void 0,done:!0}}for(n.method=i,n.arg=r;;){var o=n.delegate;if(o){var l=w(o,n);if(l){if(l===u)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===a)throw a="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a="executing";var c=d(e,t,n);if("normal"===c.type){if(a=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a="completed",n.method="throw",n.arg=c.arg)}}}function w(e,t){var n=t.method,a=e.iterator[n];if(void 0===a)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),u;var i=d(a,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,u;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function x(e){if(e||""===e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,i=function t(){for(;++a<e.length;)if(n.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}throw new TypeError(pt(e)+" is not iterable")}return p.prototype=g,a(y,"constructor",{value:g,configurable:!0}),a(g,"constructor",{value:p,configurable:!0}),p.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(E.prototype),c(E.prototype,o,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,a,i,r){void 0===r&&(r=Promise);var o=new E(s(t,n,a,i),r);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(y),c(y,l,"Generator"),c(y,r,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var a in t)n.push(a);return n.reverse(),function e(){for(;n.length;){var a=n.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=x,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(n,a){return o.type="throw",o.arg=e,t.next=n,a&&(t.method="next",t.arg=void 0),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i],o=r.completion;if("root"===r.tryLoc)return a("end");if(r.tryLoc<=this.prev){var l=n.call(r,"catchLoc"),c=n.call(r,"finallyLoc");if(l&&c){if(this.prev<r.catchLoc)return a(r.catchLoc,!0);if(this.prev<r.finallyLoc)return a(r.finallyLoc)}else if(l){if(this.prev<r.catchLoc)return a(r.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return a(r.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,u):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if("throw"===a.type){var i=a.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}function vt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r,o,l=[],c=!0,s=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=r.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ft(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var ht="shared.editableCoverFixedPillListSmall";function yt(e){var t,n,a=vt(i().useState(!1),2),r=a[0],o=a[1],l=vt(i().useState(!1),2),c=l[0],d=l[1],u=i().useMemo((function(){var t,n;return null!==(n=null===(t=e.preferences)||void 0===t?void 0:t.reduce((function(e,t){return e[t.id]=t,e}),{}))&&void 0!==n?n:{}}),[e.preferences]),m=vt(i().useState(u),2),p=m[0],g=m[1],v=vt(i().useState(u),2),f=v[0],h=v[1],y=q.d.useGetContent(e.unfilteredContent,Object.values(f)),b=y.content,E=y.unfilteredContent,T=r?E:b,w=(0,Le.Z)();i().useEffect((function(){o(!1)}),[null===(t=e.presentation)||void 0===t?void 0:t.id]);var C=i().useMemo((function(){return!(r||!T.length)&&Object.values(f).some((function(e){return e.hidden}))}),[r,f]);function k(e){return f[e.id]?f[e.id].index:T.findIndex((function(t){return t.id===e.id}))}function x(e){var t;return!(null===(t=f[e.id])||void 0===t?void 0:t.hidden)}function N(e){var t=Object.assign({},f),n=x(e);t[e.id]={id:e.id,hidden:n,index:k(e)},mt.k.logUserAction({id:e.id,name:e.name},{location:L.LocationContext.EditableSubjectPreferencesWidget,entity:L.EntityType.Classification,actionType:L.UserAction.Hide,descriptor:n?L.ToggleDescriptor.On:L.ToggleDescriptor.Off}),h(t)}var S=i().useMemo((function(){return!et.t.isEqual(u,f)}),[u,f]),O={id:e.presentation.id,name:fe.T.getPhrase(ht,"exploreAll"),cover:e.presentation.cover};return T.length?i().createElement("div",null,i().createElement("div",{className:"d-flex flex-wrap align-items-center justify-content-between ".concat(e.description||r?"":"mb-1")},i().createElement("div",null,i().createElement("div",{className:"d-flex no-wrap flex-row"},i().createElement("h2",{className:"h4 mb-2 align-self-end flex-shrink-0"},r?fe.T.getPhrase(ht,"updating"):e.name),!r&&e.canManageDiscoverPreferences&&i().createElement(at.L,{className:"ml-1 align-self-end mb-2",onClick:function(){return o(!0)}},i().createElement(nt.x,{svgName:s.vn.Edit}))),!!e.description&&!r&&i().createElement("p",{className:"text-truncate description mb-2"},e.description),r&&i().createElement("p",{className:"description mb-2"},i().createElement(he.x,{namespace:ht,phrase:"editingDescription"}))),r&&e.canManageDiscoverPreferences&&i().createElement("div",{className:"mb-2 d-flex align-items-start"},i().createElement(F.Button,{variant:"link",className:"mr-2",onClick:function(){h(p),o(!1)}},i().createElement(he.x,{namespace:ht,phrase:"cancel"})),i().createElement(dt.m,{variant:"dark",onClick:function(){return t=this,n=void 0,a=void 0,i=gt().mark((function t(){return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:d(!0),e.updatePreferences(e.id,Object.values(f)).then((function(){g(f),d(!1),o(!1)})).catch((function(){d(!1),w.error(fe.T.getPhrase(ht,"error"))}));case 2:case"end":return t.stop()}}),t)})),new(a||(a=Promise))((function(e,r){function o(e){try{c(i.next(e))}catch(e){r(e)}}function l(e){try{c(i.throw(e))}catch(e){r(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof a?n:new a((function(e){e(n)}))).then(o,l)}c((i=i.apply(t,n||[])).next())}));var t,n,a,i},showSpinner:c,disabled:!S},i().createElement(he.x,{namespace:ht,phrase:"update"})))),i().createElement(F.Row,{noGutters:!0,className:"mx-n1 mb-n2"},C&&i().createElement(F.Col,{className:"position-relative pb-2 px-1",key:e.presentation.id,sm:6,lg:4},i().createElement(tt.V,{data:O,getChildAppLink:null===(n=e.appLinks)||void 0===n?void 0:n.allTopics,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,multiline:!0})),i().createElement(ct.Q,{ids:T.map((function(e){return e.id})),getDragOverlay:function(e){var t=T.find((function(t){return t.id===e}));return i().createElement("div",{className:"bg-white rounded-lg ".concat("K1Ce4")},i().createElement(lt,{data:t,onToggleVisibility:N,isVisible:x(t),isDragging:!0,canToggle:!0}))},onSortStart:function(e){var t=T.find((function(t){return t.id.toString()===e.active.id.toString()})),n=T.findIndex((function(t){return t.id.toString()===e.active.id.toString()}));mt.k.logUserAction({id:t.id,name:t.name,index:n},{location:L.LocationContext.EditableSubjectPreferencesWidget,entity:L.EntityType.Classification,actionType:L.UserAction.Move,workflowPhase:L.WorkflowPhase.Start})},onSortEnd:function(e){var t=e.active,n=e.over,a=k({id:t.id}),i=T.findIndex((function(e){return e.id.toString()===n.id.toString()}));if(a!==i){var r=T[a];if(r){var o=Object.assign({},f);ut.l.reorder(T,a,i).reorderedItems.forEach((function(e,t){o[e.id]={id:e.id,index:t,hidden:!x(e)}})),h(o),mt.k.logUserAction({id:r.id,name:r.name,oldIndex:a,newIndex:i},{location:L.LocationContext.EditableSubjectPreferencesWidget,entity:L.EntityType.Classification,actionType:L.UserAction.Move,workflowPhase:L.WorkflowPhase.Complete})}}},vertical:!1},T.map((function(t){return i().createElement(F.Col,{className:"position-relative pb-2 px-1",key:t.id,sm:6,lg:4},i().createElement(i().Fragment,null,r?i().createElement(st.W,{id:t.id,childComponent:lt,childProps:{data:t,onToggleVisibility:N,isVisible:x(t),isDragging:!1,canToggle:!x(t)||e.content.length>1}}):i().createElement(tt.V,{data:t,getChildAppLink:function(t){var n,a;return null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.classification)||void 0===a?void 0:a.call(n,t)},analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,multiline:!0})))}))))):i().createElement(i().Fragment,null)}var bt=n(11025),Et=n(80143),Tt=n(68626),wt=n(90927),Lt=n(47325),Ct=n(96022),kt=n(38647);function xt(e){var t,n,a,r,o,l,c,s,u,m=e.content[0],p=i().useRef(),g=(0,Et.n)(null===(t=m.subjectPresentationAudiences)||void 0===t?void 0:t.data,e.audiences),f=bt.M.hasSeries(m),h=mt.k.mergeOptions(e.analyticsOptions,{actionType:L.UserAction.Click,entity:bt.M.getAnalyticsEntity(m),location:L.LocationContext.ThumbnailHeroMediaWidget}),y=bt.M.getCanBeConsumed(m).canNavigate;return m?i().createElement("div",null,i().createElement(D.B,{name:e.name,description:e.description}),i().createElement("div",{ref:p},i().createElement(v.u,{video:m,imageOptions:{size:z.h2.Large},type:"static",textPosition:Tt.z.Independent,analyticsOptions:h,audience:g,hideRating:!!g,appLink:null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.videoType)||void 0===a?void 0:a.call(n,m),seriesAppLink:null===(o=null===(r=e.appLinks)||void 0===r?void 0:r.series)||void 0===o?void 0:o.call(r,function(e){if(bt.M.isVideo(e))return e.series}(m)),setFavourite:e.setFavourite,canFavourite:e.canFavourite})),i().createElement("div",{className:"RmYET"},i().createElement("div",null,bt.M.isVideo(m)&&f&&i().createElement(Ct.M,{video:m,appLink:null===(c=null===(l=e.appLinks)||void 0===l?void 0:l.series)||void 0===c?void 0:c.call(l,m.series),analyticsOptions:h,className:"mt-2 ".concat("zmtsM")}),i().createElement("div",{className:f?"":"mt-2"},i().createElement(T.F,{appLink:null===(u=null===(s=e.appLinks)||void 0===s?void 0:s.videoType)||void 0===u?void 0:u.call(s,m),analyticsData:{id:m.id,name:m.name},analyticsOptions:Object.assign(Object.assign({},h),{descriptor:L.ClickDescriptor.Title}),className:"d-inline-block ".concat(y?"":"cursor-default text-decoration-none disabled"),disabled:!y},i().createElement("h3",{className:"h4 mb-0"},m.name,i().createElement(kt.m,{video:m,yearGroups:e.yearGroups}))))),!!e.showVideoGuidance&&i().createElement("div",{className:"d-flex mt-2 ".concat("EQXKD")},i().createElement(wt.N,{containerRef:p,widgetTemplate:d.f.ThumbnailHeroMedia,video:m}),i().createElement(Lt.I,{containerRef:p,widgetTemplate:d.f.ThumbnailHeroMedia,video:m,imageCdnUrl:e.imageCdnUrl})))):i().createElement(i().Fragment,null)}function Nt(e){return i().createElement("div",null,i().createElement("h2",{className:"curated-widget-heading"},e.name),!!e.description&&i().createElement("p",{className:"description curated-widget-description"},e.description))}var St=i().memo((function(e){var t,n=e.data,a=e.getSeriesAppLink,r=e.context,o=e.thumbnailSize,l=e.preloadImage,s=e.presentationAudiences,d=null===(t=null==n?void 0:n.subjectPresentationAudiences)||void 0===t?void 0:t.data,u=(0,Et.n)(d,s),m=(0,x.k)(),p="JSM4l";return r.type===c.WidgetType.LargeRow&&(p="YYpNz"),i().createElement("div",{className:"px-1 flex-shrink-0 position-relative ".concat(p)},i().createElement(v.u,{type:m.xs?"static":"popout",textPosition:Tt.z.Below,video:n,appLink:e.getAppLink(n),seriesAppLink:bt.M.isVideo(n)&&bt.M.hasSeries(n)?null==a?void 0:a(n.series):void 0,imageOptions:{size:o},preload:l,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,canFavourite:e.canFavourite,setFavourite:e.setFavourite,imageCdnUrl:e.imageCdnUrl,audience:u,hideRating:!!u,hideDuration:!1,yearGroups:e.yearGroups,hideTitle:e.hideTitle,hideSeries:e.hideSeries,showVideoGuidance:e.showVideoGuidance}))}));function Ot(e){var t,n,a,r,o,l,s,d;return i().createElement(g.k,{name:!(null===(t=e.metadata)||void 0===t?void 0:t.hideWidgetHeading)&&e.name,description:!(null===(n=e.metadata)||void 0===n?void 0:n.hideWidgetDescription)&&e.description,type:c.WidgetType.LargeRow,contents:p.z.Videos,collection:e.content,childComponent:St,extraChildComponentProps:{setFavourite:e.setFavourite,canFavourite:e.canFavourite,presentationAudiences:e.audiences,getSeriesAppLink:null===(a=e.appLinks)||void 0===a?void 0:a.series,imageCdnUrl:e.imageCdnUrl,yearGroups:e.yearGroups,hideTitle:null===(r=e.metadata)||void 0===r?void 0:r.hideObjectTitle,hideSeries:null===(o=e.metadata)||void 0===o?void 0:o.hideObjectSeries,showVideoGuidance:e.showVideoGuidance},getChildAppLink:null===(l=e.appLinks)||void 0===l?void 0:l.videoType,prefetched:!0,hideBleedingContent:e.showHighlight,hideButtons:e.showHighlight,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLink:null===(d=null===(s=e.appLinks)||void 0===s?void 0:s.widgetVideoList)||void 0===d?void 0:d.call(s,e.id,e.name)})}function jt(e){return i().createElement("div",{className:"col-".concat(e.colSize," px-1")},i().createElement("div",{className:"d-inline-block w-100 partial-loading-background rounded-lg",style:{paddingBottom:"56.25%"}}),i().createElement("div",{className:"mt-2"},i().createElement("div",{style:{height:"1.4rem"}},i().createElement("div",{className:"partial-loading-background",style:{height:"1.1rem",width:"70%"}})),i().createElement("div",{className:"partial-loading-background",style:{height:"1.33875rem",width:"80%"}})))}function Dt(e){var t,n,a,r,o,l,s,d,m,v,f,h=null===(n=null===(t=e.appLinks)||void 0===t?void 0:t.widgetVideoList)||void 0===n?void 0:n.call(t,e.id,e.name);return e.widgetTypeId===u.z.ContinueWatching&&(null===(a=e.appLinks)||void 0===a?void 0:a.watchHistory)&&(h=null===(o=null===(r=e.appLinks)||void 0===r?void 0:r.watchHistory)||void 0===o?void 0:o.call(r)),i().createElement(g.k,{name:!(null===(l=e.metadata)||void 0===l?void 0:l.hideWidgetHeading)&&e.name,description:!(null===(s=e.metadata)||void 0===s?void 0:s.hideWidgetDescription)&&e.description,type:c.WidgetType.Row,contents:p.z.Videos,collection:e.content,childComponent:St,extraChildComponentProps:{setFavourite:e.setFavourite,canFavourite:e.canFavourite,presentationAudiences:e.audiences,getSeriesAppLink:null===(d=e.appLinks)||void 0===d?void 0:d.series,imageCdnUrl:e.imageCdnUrl,hideTitle:null===(m=e.metadata)||void 0===m?void 0:m.hideObjectTitle,hideSeries:null===(v=e.metadata)||void 0===v?void 0:v.hideObjectSeries,showVideoGuidance:e.showVideoGuidance},getChildAppLink:null===(f=e.appLinks)||void 0===f?void 0:f.videoType,prefetched:!0,hideBleedingContent:e.showHighlight,hideButtons:e.showHighlight,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLink:h})}function At(e){return i().createElement("div",{className:"col-".concat(e.colSize," px-1")},i().createElement("div",{className:"d-inline-block w-100 partial-loading-background rounded-lg",style:{paddingBottom:"56.25%"}}),i().createElement("div",{className:"mt-2"},i().createElement("div",{style:{height:"1.4rem"}},i().createElement("div",{className:"partial-loading-background",style:{height:"1.1rem",width:"70%"}})),i().createElement("div",{className:"partial-loading-background",style:{height:"1.33875rem",width:"80%"}})))}var Ft=n(22843);const It={guidance:"uCRU1"};function Pt(e){var t,n,a,r,o,l=bt.M.isVideo(e.video)&&bt.M.hasSeries(e.video),c=null===(n=null===(t=e.appLinks)||void 0===t?void 0:t.videoType)||void 0===n?void 0:n.call(t,e.video),s=l?null===(r=null===(a=e.appLinks)||void 0===a?void 0:a.series)||void 0===r?void 0:r.call(a,e.video.series):null,u=i().useRef(null),m={actionType:L.UserAction.Click,entity:bt.M.getAnalyticsEntity(e.video),location:L.LocationContext.ThumbnailFixedListMediaLargeWidget,descriptor:L.ClickDescriptor.Thumbnail},p=(0,Et.n)(null===(o=e.video.subjectPresentationAudiences)||void 0===o?void 0:o.data,e.audiences);return i().createElement("div",{className:"col-md-6"},i().createElement("div",{ref:u},i().createElement(v.u,{analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),m),video:e.video,appLink:c,seriesAppLink:s,imageOptions:{size:z.h2.Medium},textPosition:Tt.z.Independent,type:"static",setFavourite:e.setFavourite,canFavourite:e.canFavourite,audience:p,hideRating:!!p})),i().createElement(Ft.h,{video:e.video,appLink:c,seriesAppLink:s,yearGroups:e.yearGroups}),!!e.showVideoGuidance&&i().createElement("div",{className:"d-flex justify-content-start align-items-center pt-1 ".concat(It.guidance)},i().createElement(wt.N,{video:e.video,containerRef:u,widgetTemplate:d.f.ThumbnailFixedListMediaLarge}),i().createElement(Lt.I,{video:e.video,containerRef:u,widgetTemplate:d.f.ThumbnailFixedListMediaLarge,imageCdnUrl:e.imageCdnUrl})))}function Wt(e){return i().createElement(i().Fragment,null,i().createElement(D.B,{name:e.name,description:e.description}),i().createElement("div",{className:"row ".concat("KItVW")},e.content.map((function(t){return i().createElement(Pt,Object.assign({key:t.id,video:t},e))}))))}const Mt="HwejH";var Ut=function(){return i().createElement("div",{className:"mt-2"},i().createElement("div",{style:{height:"1.4rem"}},i().createElement("div",{className:"partial-loading-background",style:{height:"1.1rem",width:"12rem"}})),i().createElement("div",{className:"partial-loading-background",style:{height:"1.33875rem",width:"15rem"}}))},Vt=n(81993);const Rt={rowWidth:"TzZuL"};function Bt(e){return i().createElement(T.F,{appLink:e.getAppLink(e.data),className:"".concat(Rt.rowWidth," ").concat(e.ratingsLength>4?"":4===e.ratingsLength?"col-4 col-md-3":"col"," position-relative flex-shrink-0 px-1 mt-1 text-decoration-none"),analyticsData:Object.assign(Object.assign({},e.analyticsData),{code:e.data.code,id:e.data.id}),analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{entity:L.EntityType.Rating,actionType:L.UserAction.Click,location:L.LocationContext.FilterSlidingPillListSmallWidget})},i().createElement("div",{className:"".concat(Vt.u.mapRatingToClass(e.data.value)," py-3 rounded-lg ")},i().createElement("div",{className:"d-flex justify-content-center align-items-center text-white"},i().createElement(nt.x,{svgName:s.vn.Search,size:nt.S.Medium}),i().createElement("h4",{className:"mb-0"},e.data.code))))}function zt(e){var t=e.content.filter((function(e){return e.code&&e.value<128}));return i().createElement(i().Fragment,null,i().createElement(g.k,{name:e.name,description:e.description,type:c.WidgetType.Row,contents:p.z.Ratings,getChildAppLink:function(n){var a,i;return null===(i=null===(a=e.appLinks)||void 0===a?void 0:a.rating)||void 0===i?void 0:i.call(a,n,t)},collection:t,childComponent:Bt,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,extraChildComponentProps:{ratingsLength:t.length},prefetched:!0}))}function Ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var _t=n(9085),Gt=n(7733);var Zt=function(e){var t,n,a,r=B.j.createUrl(null===(t=e.data.logo)||void 0===t?void 0:t.url,{size:z.h2.Medium}),o=(0,_t.x)(e.data.name,Gt.o),l=Object.assign(Object.assign({},e.analyticsData),{id:null===(n=e.data)||void 0===n?void 0:n.id,name:null===(a=e.data)||void 0===a?void 0:a.name}),c=Object.assign(Object.assign({},e.analyticsOptions),{location:L.LocationContext.CircleLogoSlidingListWidget,actionType:L.UserAction.Click,entity:L.EntityType.Company});return i().createElement(T.F,{appLink:e.getAppLink(e.data),className:"position-relative px-1 flex-shrink-0 ".concat("z6iYz"),analyticsData:l,analyticsOptions:c},i().createElement("div",{className:"rounded-circle w-100 h-100 ".concat("vt0gx"," ").concat(o),style:{backgroundImage:"url(".concat(r,")")}}))};function Yt(e){var t;return i().createElement(g.k,{name:e.name,description:e.description,type:c.WidgetType.Row,contents:p.z.Companies,collection:e.content,childComponent:Zt,extraChildComponentProps:{imageCdnUrl:e.imageCdnUrl},prefetched:!0,hideBleedingContent:e.showHighlight,hideButtons:e.showHighlight,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,getChildAppLink:null===(t=e.appLinks)||void 0===t?void 0:t.company})}const Xt={bannerContent:"lkPfM",cta:"nA9th",banner:"b5ljD",bannerImage:"dj_1H",blurb:"UBcVE"};function $t(e){return i().createElement("div",{className:"banner rounded-lg position-relative ".concat(Xt.banner)},i().createElement("div",{className:"".concat(Xt.bannerImage," ").concat(Xt.blurb),style:{backgroundImage:"url('".concat(B.j.getUrlById(e.imageCdnUrl,z.__.Banners,e.metadata.imageId,z.h2.Large),"')")}},e.name&&i().createElement("div",{className:"".concat(Xt.bannerContent," ").concat(e.widgetTypeId===u.z.Blurb?Xt.blurb:"")},i().createElement("h2",{className:"h6 mb-0"},e.name))))}function qt(e){var t,n,a,r,o,l,c=ue.m.first(e.content),s=Object.assign(Object.assign({},e.analyticsOptions),{location:L.LocationContext.Classification,actionType:L.UserAction.Click,entity:L.EntityType.Classification,descriptor:L.ClickDescriptor.Banner});return i().createElement(T.F,{appLink:null===(n=null===(t=e.appLinks)||void 0===t?void 0:t.classification)||void 0===n?void 0:n.call(t,c),analyticsData:e.analyticsData,analyticsOptions:s},i().createElement("div",{className:"banner rounded-lg position-relative ".concat(Xt.banner)},i().createElement("div",{className:Xt.bannerImage,style:{backgroundImage:"url('".concat(B.j.createBannerUrl(c.banner,{fallbackBaseUrl:"",fallbackCategoryName:c.name,type:z.__.Banners},{size:z.h2.Large}),"')")}},e.name&&i().createElement("div",{className:Xt.bannerContent},i().createElement("h2",{className:"text-white h4 clamp-1"},e.name)),!!(null===(r=null===(a=e.metadata)||void 0===a?void 0:a.cta)||void 0===r?void 0:r.text)&&i().createElement("div",{className:Xt.cta},i().createElement("div",{className:"btn btn-outline-dark text-nowrap"},null===(l=null===(o=e.metadata)||void 0===o?void 0:o.cta)||void 0===l?void 0:l.text)))))}function Jt(e){return e.widgetTypeId===u.z.Blurb?i().createElement($t,Object.assign({},e)):i().createElement(qt,Object.assign({},e))}function Qt(){return i().createElement("div",{className:"banner rounded-lg position-relative ".concat(Xt.banner)},i().createElement("div",{className:"".concat(Xt.bannerContent)}))}function Kt(e){return i().createElement(g.k,{name:e.name,description:e.description,type:c.WidgetType.LargeRow,contents:p.z.Subjects,collection:e.content,childComponent:ee,getChildAppLink:function(t){var n,a;return null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.classification)||void 0===a?void 0:a.call(n,t)},prefetched:!0,hideBleedingContent:e.showHighlight,hideButtons:e.showHighlight,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions})}function en(e){var t,n,a,r,o,l,c=ue.m.first(e.content),s=B.j.createUrl(null===(t=c.thumbnail)||void 0===t?void 0:t.url,{size:z.h2.Medium}),d=null===(n=c.metadata)||void 0===n?void 0:n.backgroundColor,u={backgroundColor:d};s&&(u.backgroundImage="url('".concat(s,"')"));var m=Object.assign(Object.assign({},e.analyticsData),{id:c.id,name:c.name,presentationId:c.presentationId}),p=Object.assign(Object.assign({},e.analyticsOptions),{location:L.LocationContext.ClassificationListItem,actionType:L.UserAction.Click,entity:L.EntityType.Classification,descriptor:L.ClickDescriptor.Thumbnail});return s&&d?i().createElement(i().Fragment,null,i().createElement(T.F,{appLink:null===(r=null===(a=e.appLinks)||void 0===a?void 0:a.classification)||void 0===r?void 0:r.call(a,c),className:"text-decoration-none",analyticsData:m,analyticsOptions:p},i().createElement("div",{className:"d-flex position-relative rounded-lg h-100 ".concat("EkoYD"),style:u},i().createElement("div",{className:"".concat("SSmWX")},i().createElement("div",{className:"".concat("vEXH2")},i().createElement("h2",{className:"".concat("bMbF2"," text-decoration-none h4 text-nowrap text-truncate")},e.name),i().createElement("div",{className:"text-left ".concat("gDFxm")},i().createElement("p",{className:"clamp-3"},c.description))),i().createElement("div",null,i().createElement("div",{className:"btn btn-outline-dark text-nowrap"},(null===(l=null===(o=e.metadata)||void 0===o?void 0:o.cta)||void 0===l?void 0:l.text)||fe.T.getPhrase("shared.thumbnailFixedListXLarge","buttonLabel"))))))):i().createElement(pe,Object.assign({},e))}var tn;function nn(e){var t,n,a,r,o,l,c=ue.m.first(e.content),s=B.j.createUrl(null===(t=c.thumbnail)||void 0===t?void 0:t.url,{size:z.h2.Medium}),d=null===(n=c.metadata)||void 0===n?void 0:n.backgroundColor,u={backgroundColor:d};s&&(u.backgroundImage="url('".concat(s,"')"));var m=Object.assign(Object.assign({},e.analyticsData),{id:c.id,name:c.name,presentationId:c.presentationId}),p=Object.assign(Object.assign({},e.analyticsOptions),{location:L.LocationContext.ClassificationListItem,actionType:L.UserAction.Click,entity:L.EntityType.Classification,descriptor:L.ClickDescriptor.Thumbnail});return s&&d?i().createElement(T.F,{appLink:null===(r=null===(a=e.appLinks)||void 0===a?void 0:a.classification)||void 0===r?void 0:r.call(a,c),className:"text-decoration-none",analyticsData:m,analyticsOptions:p},i().createElement("div",{className:"banner rounded-lg position-relative ".concat("LPw_x")},i().createElement("div",{className:"".concat("UJ8IR"," d-flex justify-content-between align-items-center"),style:u},e.name&&i().createElement("div",{className:"d-flex align-items-center pl-3 h-100"},i().createElement("h2",{className:"text-white h4 clamp-1"},e.name)),i().createElement("div",{className:"btn btn-outline-dark mr-3"},(null===(l=null===(o=e.metadata)||void 0===o?void 0:o.cta)||void 0===l?void 0:l.text)||fe.T.getPhrase("shared.heroThumbnailSmall","buttonLabel"))))):i().createElement(Jt,Object.assign({},e))}function an(e){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},an(e)}function rn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==an(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==an(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===an(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var on=(rn(tn={},d.f.ThumbnailHeroMedia,{getComponent:function(){return xt},partialLoading:function(){return i().createElement("div",null,i().createElement("div",{className:"w-100 partial-loading-background rounded-lg",style:{paddingBottom:"56.25%"}}),i().createElement("div",{className:"KjaI4"},i().createElement("div",null,i().createElement("div",{style:{height:"1.5rem"}},i().createElement("div",{className:"partial-loading-background",style:{height:"1.2rem",width:"12rem"}})),i().createElement("div",{className:"partial-loading-background",style:{height:"1.5625rem",width:"15rem"}})),i().createElement("div",{className:"pt-2 mw-100"},i().createElement(P,null))))},icon:s.vn.WidgetTemplateThumbnailHeroMedia,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.PosterSlidingListLarge,{getComponent:function(){return O},partialLoading:function(){var e,t,n=(e=(0,x.k)()).xs?2:e.sm?3:4;return a.createElement(a.Fragment,null,a.createElement(N.l,null),a.createElement("div",{className:"row mb-n2"},(t=Array(n),function(e){if(Array.isArray(e))return S(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e,t){return a.createElement("div",{key:t,className:"col-6 col-sm-4 col-md-3 col-lg-3 pb-2"},a.createElement("div",{className:"".concat(C.partialLoading," partial-loading-background rounded-lg")}))}))))},icon:s.vn.WidgetTemplatePosterSlidingListLarge,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover,c.DashboardTargetType.MoviesAndTv,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.PosterSlidingListMedium,{getComponent:function(){return Kt},partialLoading:function(){return i().createElement(oe,{type:c.WidgetType.LargeRow})},icon:s.vn.WidgetTemplatePosterSlidingListMedium,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover,c.DashboardTargetType.MoviesAndTv,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.PosterSlidingListSmall,{getComponent:function(e){switch(e){case u.z.CuratedClassifications:return ae;case u.z.CuratedSeries:return ie;default:return ae}},partialLoading:function(){return i().createElement(oe,{type:c.WidgetType.Row})},icon:s.vn.WidgetTemplatePosterSlidingListSmall,getTargets:function(e){switch(e){case u.z.CuratedClassifications:return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover,c.DashboardTargetType.MoviesAndTv];case u.z.CuratedSeries:return[c.DashboardTargetType.MoviesAndTv,c.DashboardTargetType.Company];default:return[]}},className:""}),rn(tn,d.f.ThumbnailFeaturedMedia,{getComponent:function(){return A},partialLoading:function(){return i().createElement(i().Fragment,null,i().createElement(F.Row,null,i().createElement(F.Col,{xs:12,md:6},i().createElement("div",{className:"".concat("P3cF6"," partial-loading-background rounded-lg")})),i().createElement(F.Col,{xs:12,md:6},i().createElement("div",{className:"J5CAD"},i().createElement("div",null,i().createElement("div",{style:{height:"1.5rem"}},i().createElement("div",{className:"partial-loading-background",style:{height:"1.2rem",width:"12rem"}})),i().createElement("div",{className:"partial-loading-background",style:{height:"1.5625rem",width:"15rem"}})),i().createElement("div",{className:"pt-2 mw-100"},i().createElement(P,null))))))},icon:s.vn.WidgetTemplateThumbnailFeaturedMedia,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.CoverFixedPillListLarge,{getComponent:function(){return U.K},partialLoading:function(){return i().createElement("div",{className:"py-2"},i().createElement(N.l,null),i().createElement(F.Row,{className:"no-gutters"},Array(5).fill(null).map((function(e,t){return i().createElement(F.Col,{key:t,xs:12,sm:6,lg:4},i().createElement("div",{className:"position-relative mb-2"},i().createElement(W.Ml,null)))}))))},icon:s.vn.WidgetTemplateCoverFixedPillListLarge,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover]},className:""}),rn(tn,d.f.CoverFixedPillListXSmall,{getComponent:function(){return Pe},partialLoading:function(){return i().createElement("div",{className:"".concat(Fe," px-4 py-3 rounded-lg mb-3")},i().createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.35rem",width:"8rem"}}),i().createElement(F.Row,{className:"mb-2 ".concat(Ie)},Array(8).fill(null).map((function(e,t){return i().createElement(F.Col,{key:t,xs:12,sm:6,lg:4},i().createElement("div",{className:"d-flex align-items-center mb-2"},i().createElement("div",{className:"partial-loading-background mr-2 rounded",style:{width:"2rem",height:"2rem"}}),i().createElement("div",{className:"partial-loading-background",style:{width:"5rem",height:"1.3125rem"}})))}))))},icon:s.vn.WidgetTemplateCoverFixedPillListXSmall,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover]},className:""}),rn(tn,d.f.CoverSlidingPillListSmall,{getComponent:function(){return Z},partialLoading:function(){return i().createElement("div",{className:"py-2"},i().createElement(N.l,null),i().createElement(M.QL,{partialLoadingComponent:W.Qh}))},icon:s.vn.WidgetTemplateCoverSlidingPillListSmall,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover,c.DashboardTargetType.MoviesAndTv,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.CoverFixedTileList,{getComponent:function(){return $},partialLoading:function(){return i().createElement(i().Fragment,null,i().createElement(N.l,null),i().createElement(Y.YA,{itemClassName:"columns-of-five"}))},icon:s.vn.WidgetTemplateCoverFixedTileList,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.FeaturedThumbnailSlidingList,{getComponent:function(){return de},partialLoading:function(){return i().createElement("div",null,i().createElement("div",{className:"banner rounded-lg position-relative partial-loading-background ".concat(ce," ").concat(se," mb-1 ")}),i().createElement(m.j7,{hideDescription:!0,hideHeading:!0}))},icon:s.vn.WidgetTemplateFeaturedThumbnailSlidingList,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover]},className:""}),rn(tn,d.f.HeroBanner,{getComponent:function(){return pe},partialLoading:ge,icon:s.vn.WidgetTemplateHeroBanner,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover]},className:""}),rn(tn,d.f.HeroBannerSmall,{getComponent:function(){return Jt},partialLoading:Qt,icon:s.vn.WidgetTemplateHeroBannerSmall,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover]},className:""}),rn(tn,d.f.HeroThumbnailSmall,{getComponent:function(){return nn},partialLoading:function(){return i().createElement(Qt,null)},icon:s.vn.WidgetTemplateHeroThumbnailSmall,getTargets:function(){return[c.DashboardTargetType.Discover,c.DashboardTargetType.Classification,c.DashboardTargetType.MoviesAndTv,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.ThumbnailFixedListXLarge,{getComponent:function(){return en},partialLoading:function(){return i().createElement(ge,null)},icon:s.vn.WidgetTemplateThumbnailFixedListXLarge,getTargets:function(){return[c.DashboardTargetType.Discover,c.DashboardTargetType.Classification,c.DashboardTargetType.MoviesAndTv,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.ThumbnailFixedListLarge,{getComponent:function(){return qe},partialLoading:function(){var e,t=function(e){if(Array.isArray(e))return Qe(e)}(e=Array(2))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qe(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return i().createElement("div",null,i().createElement(N.l,null),i().createElement(F.Row,{noGutters:!0,className:"mx-n1"},t.map((function(e,t){return i().createElement(F.Col,{key:t,sm:12,md:6,className:"p-1"},i().createElement("div",{className:"".concat("pRXSM"," partial-loading-background rounded-lg")}))}))))},icon:s.vn.WidgetTemplateThumbnailFixedListLarge,getTargets:function(){return[c.DashboardTargetType.Discover,c.DashboardTargetType.Classification,c.DashboardTargetType.MoviesAndTv,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.ThumbnailFixedListSmall,{getComponent:function(){return Je},partialLoading:function(){var e,t=function(e){if(Array.isArray(e))return Ke(e)}(e=Array(3))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ke(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return i().createElement(i().Fragment,null,i().createElement(N.l,null),i().createElement(F.Row,{noGutters:!0,className:"mx-n1 "},t.map((function(e,t){return i().createElement(F.Col,{key:t,lg:4,md:6,sm:6,xs:12,className:"p-1"},i().createElement("div",{className:"".concat("SNBRD"," partial-loading-background rounded-lg")}))}))))},icon:s.vn.WidgetTemplateThumbnailFixedListSmall,getTargets:function(){return[c.DashboardTargetType.Discover,c.DashboardTargetType.Classification,c.DashboardTargetType.MoviesAndTv,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.EditableCoverFixedPillListSmall,{getComponent:function(){return yt},partialLoading:function(){return i().createElement("div",{className:"py-2"},i().createElement("div",{className:"partial-loading-background mb-2 ".concat("hjdMb")}),i().createElement(F.Row,{className:"no-gutters"},Array(7).fill(null).map((function(e,t){return i().createElement(F.Col,{key:t,sm:6,lg:4},i().createElement("div",{className:"position-relative mb-2"},i().createElement(W.Qh,null)))}))))},icon:s.vn.WidgetTemplateEditableCoverFixedPillListSmall,getTargets:function(){return[c.DashboardTargetType.Discover]},className:""}),rn(tn,d.f.Heading,{getComponent:function(){return Nt},partialLoading:function(){return i().createElement("div",null,i().createElement("div",{className:"partial-loading-background curated-widget-heading",style:{height:"2.099625rem",width:"16.5rem",maxWidth:"80%"}}," "),i().createElement("div",{className:"partial-loading-background description curated-widget-description",style:{width:"21rem",height:"1.3125rem",maxWidth:"90%"}}," "))},icon:s.vn.WidgetTemplateHeading,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover]},className:"heading-widget-template"}),rn(tn,d.f.ThumbnailFixedListMediaLarge,{getComponent:function(){return Wt},partialLoading:function(){return i().createElement(i().Fragment,null,i().createElement(N.l,null),i().createElement("div",{className:"row ".concat("hk2Ed")},i().createElement("div",{className:"col-sm-12 col-md-6"},i().createElement("div",{className:"".concat(Mt," partial-loading-background rounded-lg")}),i().createElement(Ut,null),i().createElement("div",{className:"pt-1 mw-100"},i().createElement(P,null))),i().createElement("div",{className:"col-sm-12 col-md-6"},i().createElement("div",{className:"".concat(Mt," partial-loading-background rounded-lg")}),i().createElement(Ut,null),i().createElement("div",{className:"pt-1 mw-100"},i().createElement(P,null)))))},icon:s.vn.WidgetTemplateThumbnailFixedListMediaLarge,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.PopoutThumbnailSlidingListLarge,{getComponent:function(){return Ot},partialLoading:function(){return i().createElement(m.j7,{size:"lg",childComponent:jt})},icon:s.vn.WidgetTemplatePopoutThumbnailSlidingListLarge,getTargets:function(){return[c.DashboardTargetType.Classification,c.DashboardTargetType.Discover,c.DashboardTargetType.MoviesAndTv,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.PopoutThumbnailSlidingListSmall,{getComponent:function(){return Dt},partialLoading:function(){return i().createElement(m.j7,{size:"sm",childComponent:At})},icon:s.vn.WidgetTemplatePopoutThumbnailSlidingListSmall,getTargets:function(){return[c.DashboardTargetType.Discover,c.DashboardTargetType.MoviesAndTv,c.DashboardTargetType.Company]},className:""}),rn(tn,d.f.FilterSlidingPillListSmall,{getComponent:function(){return zt},partialLoading:function(){var e,t=(0,x.k)();return i().createElement(i().Fragment,null,i().createElement(N.l,{hideDescription:!0}),i().createElement("div",{className:"row mx-n1"},(e=Array(t.xs||t.sm?3:t.md||t.lg?4:5),function(e){if(Array.isArray(e))return Ht(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ht(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ht(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e,t){return i().createElement("div",{key:t,className:"col px-1"},i().createElement("div",{className:"d-inline-block w-100 partial-loading-background rounded-lg pb-5"}))}))))},icon:s.vn.WidgetTemplateFilterSlidingPillListSmall,getTargets:function(){return[c.DashboardTargetType.MoviesAndTv]},className:""}),rn(tn,d.f.CircleLogoSlidingList,{getComponent:function(){return Yt},partialLoading:function(){var e=8,t=(0,x.k)();return(t.sm||t.xs)&&(e=4),t.md&&(e=6),i().createElement(i().Fragment,null,i().createElement(N.l,null),i().createElement("div",{className:"d-flex flex-no-wrap"},Array(e).fill(null).map((function(e,t){return i().createElement("div",{key:t,className:"uVZyX"},i().createElement("div",{className:"".concat("KbaRB"," h-100 d-inline-block partial-loading-background rounded-circle")}))}))))},icon:s.vn.WidgetTemplateCircleLogoSlidingList,getTargets:function(){return[c.DashboardTargetType.MoviesAndTv]},className:""}),rn(tn,d.f.ThumbnailSlidingListSmall,{getComponent:function(){return b},partialLoading:m.j7,icon:s.vn.WidgetTemplateThumbnailSlidingListSmall,getTargets:function(){return[]},className:""}),rn(tn,d.f.ThumbnailSlidingListLarge,{getComponent:function(){return E},partialLoading:function(){return i().createElement(m.j7,{size:"lg"})},icon:s.vn.WidgetTemplateThumbnailSlidingListLarge,getTargets:function(){return[]},className:""}),tn);const ln={anchor:"FRyJT",widgetHighlight:"e4uXN",blinker:"e7d4o"};function cn(e){var t,n,a,c,s=i().createRef(),d=null===(t=e.lazyLoad)||void 0===t||t,m=(0,l.Y)({prevent:!d}),p=m.ref,g=m.inView,v=o.q.isFunction(e.getContentRequest),f=r.a.useBasicFetch(!(!g||!e.getContentRequest)&&e.getContentRequest(e.id,e.widgetTypeId,e.templateId)),h=q.d.useGetContent(e.content||(null===(n=f.data)||void 0===n?void 0:n.content),null===(a=f.data)||void 0===a?void 0:a.preferences),y=h.content,b=h.unfilteredContent,E=(0,x.k)(),T=function(e,t){return!(q.d.hasNoContent(e)||t&&(!Array.isArray(t)||t.length))}(e.widgetTypeId,y),w=!q.d.canDisplayOnScreenSize(E,e.widgetTypeId,e.templateId);i().useEffect((function(){var t;v&&!f.hasCompleted||null===(t=e.setIsEmpty)||void 0===t||t.call(e,e.id,T||w)}),[f.hasCompleted,T,w,v,e.setIsEmpty]),i().useEffect((function(){e.isScrollToTargetWidget&&s.current&&s.current.scrollIntoView({behavior:"smooth",block:"start"})}),[e.isScrollToTargetWidget,s.current]);var L=e.appLinks?Object.assign({},e.appLinks):null;(null==L?void 0:L.videoType)&&(L.videoType=function(t){var n;return null===(n=e.appLinks)||void 0===n?void 0:n.videoType(t,e.id)});var C=Object.assign(Object.assign({},e.analyticsData),{widgetId:e.widgetTypeId,templateId:e.templateId,dashboardTarget:null==e?void 0:e.dashboardTarget,widgetIndex:null==e?void 0:e.widgetIndex,widgetName:e.name}),k=v&&!f.hasCompleted||e.isEditing&&T,N=on[e.templateId].partialLoading,S=on[e.templateId].getComponent(e.widgetTypeId),O=on[e.templateId].className;return k||!T&&!w?i().createElement("div",{id:e.widgetTypeId===u.z.ContinueWatching?"continue-watching-videos-widget":null,ref:s,className:"curated-widget ".concat(O," ").concat(e.name?"has-heading":""," ").concat(e.isScrollToTargetWidget?"my-n2 mx-n3":"")},i().createElement("div",{className:e.isScrollToTargetWidget?"".concat(ln.widgetHighlight," py-2 px-3 rounded-lg"):""},q.d.isWidgetInTableOfContents(e.metadata)&&i().createElement("a",{href:"#".concat(e.id),id:"".concat(e.id),className:"".concat(ln.anchor),ref:function(t){var n;t&&(null===(n=e.headingElementRef)||void 0===n?void 0:n.current)&&e.headingElementRef.current.add(t)}}),k?i().createElement("div",{ref:p},i().createElement(N,null)):i().createElement(S,Object.assign({},e,{appLinks:L,content:y,unfilteredContent:b,preferences:null===(c=f.data)||void 0===c?void 0:c.preferences,analyticsData:C,showHighlight:e.isScrollToTargetWidget})))):i().createElement(i().Fragment,null)}},47770:(e,t,n)=>{n.d(t,{K:()=>c});var a=n(1024),i=n.n(a),r=n(99910),o=n(91028),l=n(94495);function c(e){return i().createElement(i().Fragment,null,i().createElement(l.B,{name:e.name,description:e.description}),i().createElement(r.Row,{className:"mb-n2"},e.content.map((function(t){return i().createElement(r.Col,{className:"position-relative pb-2",key:t.id,xs:12,sm:6,lg:e.hasTableOfContents?6:4,xl:4},i().createElement(o.V,{data:t,getChildAppLink:function(t){var n,a;return null===(a=null===(n=e.appLinks)||void 0===n?void 0:n.classification)||void 0===a?void 0:a.call(n,t)},analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,isLarge:!0}))}))))}},65163:(e,t,n)=>{n.d(t,{QL:()=>a.Q});var a=n(16450);n(14244)},73814:(e,t,n)=>{n.d(t,{w:()=>i});var a=n(92802),i={getCustomFormControlClassName:function(e,t,n,i,r){var o="form-control";return"sm"===i&&(o+=" form-control-sm"),"lg"===i&&(o+=" form-control-lg"),(0,a.u9)(t,n)&&(0,a.u9)(e,n)&&(o+=" is-invalid"),r&&(o+=" ".concat(r)),o}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9961],{3278:(e,t,n)=>{n.d(t,{z:()=>v});var a=n(1024),r=n.n(a),o=n(23481),i=n(83345),c=n(53957),l=n(38502),s=n(65858),u=n(55460);const d={pillTab:"bMJM0"};var m="discover.header";function v(e){var t,n,a,v,p,f;if(!e.type)return r().createElement(r().Fragment,null);if(e.type===c.DashboardUserType.Learner||e.hasStudentExperience)return r().createElement("div",{className:"py-3"},r().createElement("h1",{className:"h2 mb-0"},r().createElement(i.x,{namespace:m,phrase:"heading"})));var h=[{name:o.T.getPhrase(m,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:o.T.getPhrase(m,"forYou"),url:u.AppLinkHelper.getHref(null===(n=e.appLinks)||void 0===n?void 0:n.forYou)},analyticsOptions:{actionType:s.UserAction.Click,entity:s.EntityType.Url,location:s.LocationContext.MagicTabs}},{name:o.T.getPhrase(m,"whatsNew"),appLink:null===(a=e.appLinks)||void 0===a?void 0:a.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:o.T.getPhrase(m,"whatsNew"),url:u.AppLinkHelper.getHref(null===(v=e.appLinks)||void 0===v?void 0:v.whatsNew)},analyticsOptions:{actionType:s.UserAction.Click,entity:s.EntityType.Url,location:s.LocationContext.MagicTabs}}];return e.showCalendar&&h.push({name:o.T.getPhrase(m,"calendar"),appLink:null===(p=e.appLinks)||void 0===p?void 0:p.calendar,active:"calendar"===e.active,analyticsData:{name:o.T.getPhrase(m,"calendar"),url:u.AppLinkHelper.getHref(null===(f=e.appLinks)||void 0===f?void 0:f.calendar)},analyticsOptions:{actionType:s.UserAction.Click,entity:s.EntityType.Url,location:s.LocationContext.MagicTabs}}),r().createElement("div",{className:"py-3 text-center"},r().createElement(l.r,{tabs:h,className:d.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>u});var a=n(1024),r=n.n(a),o=n(11607),i=n(36848),c=n(49985),l=n(87432),s=n(76246);function u(e){var t;return r().createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},r().createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(l.Z.pillTabSelector)},e.tabs.map((function(e){return r().createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?r().createElement(i.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(l.Z.pillItem)},e.name,"number"==typeof e.count&&r().createElement("div",{className:"pl-2"},r().createElement(s.C,{type:s.g.Count,data:e.count}))):r().createElement(o.L,{className:"".concat(l.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&c.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&r().createElement("div",{className:"pl-2"},r().createElement(s.C,{type:s.g.Count,data:e.count}))))}))))}},2284:(e,t,n)=>{var a;n.d(t,{W:()=>a}),function(e){e.Draft="Draft",e.ComingSoon="ComingSoon",e.Published="Published"}(a||(a={}))},29917:(e,t,n)=>{n.d(t,{r:()=>d});var a=n(1024),r=n.n(a),o=n(23481),i=n(58130),c=n(83914),l=n(36532);const s={tag:"k1Yjy",tooltip:"Cgeav"};var u="specialEventCalendar.comingSoonTag";function d(e){return r().createElement(l.u,{title:o.T.getPhrase(u,"tooltip"),spanHackClassName:"d-block ".concat(s.tooltip),spanHack:!0},r().createElement("div",{className:"d-flex text-dark align-items-center ".concat(s.tag," ").concat(e.className)},r().createElement(c.x,{svgName:i.vn.Timer}),!e.onlyIcon&&o.T.getPhrase(u,"comingSoon")))}},13037:(e,t,n)=>{n.d(t,{b:()=>E});var a=n(1024),r=n.n(a),o=n(23481),i=n(110),c=n(49985),l=n(65858),s=n(36848),u=n(42735),d=n(54610),m=n(67453),v=n(79967),p=n(2284),f=n(61557),h=n(29917);const y={modalWidth:"v5TkI",banner:"LlPSp",bannerContent:"upY3A",pill:"B7ypp"};var g="specialEventCalendar.eventsListItem";function E(e){var t,n=(0,v.k)(),a=e.getAppLink(e.event.content.id,e.event.name),E=e.event.content.metadata.backgroundColor,b=m.j.createUrl(null===(t=e.event.content.banner)||void 0===t?void 0:t.url,{size:d.h2.Large}),O=!!e.event.endDate,D=e.event.content.status===p.W.ComingSoon,M={actionType:l.UserAction.Click,entity:l.EntityType.SpecialEvent,location:e.inPopup?l.LocationContext.CalendarPopup:l.LocationContext.CalendarDay},C={topicId:e.event.content.id,eventId:e.event.specialEventId,presentationId:e.presentationId,date:i.O.format(new Date(e.event.startDate),"YYYY-MM-DD"),status:e.event.content.status};return r().createElement("div",{onClick:function(){D&&c.k.logUserAction(C,M)}},r().createElement(s.F,{appLink:!D&&a,className:"".concat(D?"":"cursor-pointer"," text-decoration-none"),onClick:e.onClick,analyticsOptions:M,analyticsData:C},r().createElement("div",{className:"banner rounded-lg position-relative ".concat(y.banner),style:{backgroundColor:E,backgroundImage:"url('".concat(b,"')")}},r().createElement("div",{className:"".concat(y.bannerContent," px-3")},r().createElement("div",{className:"text-white"},D&&r().createElement(h.r,{className:"pr-2 font-weight-500 mb-1 rounded-pill justify-content-start ".concat(y.pill)}),O&&r().createElement("div",{className:"mb-1"},f.T.getDisplayDate(e.event.startDate,e.event.endDate)),r().createElement("h2",{className:"h4 clamp-1 text-white text-shadow",title:e.event.name},e.event.name)),r().createElement("div",{className:"flex-shrink-0"},!D&&r().createElement(u.K,{className:"btn btn-outline-dark font-weight-500"},o.T.getPhrase(g,n.xs?"mobileButtonLabel":"buttonLabel")))))),r().createElement("div",{className:"mt-2 mb-3"},e.event.description||e.event.content.description))}},39780:(e,t,n)=>{n.d(t,{N:()=>r});var a=n(97395),r={calendarEvents:function(e,t,n){return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/content",{from:e,to:t,presentationId:n}),publicUrl:a._.urlBuilder("/api/discover/special-events/content",{from:e,to:t,presentationId:n}),key:"presentation:".concat(n,":events:from:").concat(e,":to").concat(t)}}}},74590:(e,t,n)=>{n.d(t,{N:()=>v});var a=n(1024),r=n.n(a),o=n(35242),i=n(55171),c=n(25925),l=n(37802),s=n(86698);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var m=[i.e.PresentationIds.US_ELEMENTARY,i.e.PresentationIds.SCOTLAND_PRIMARY,i.e.PresentationIds.ENGLAND_PRIMARY];function v(e){var t=(0,l.r)(null),n=t.hasSpecialEventCalendar,a=t.isLoadingSettings,i=(0,s.y)(c.R.Subject,null,e,!0).presentation,d=!a&&!n,v=(null==i?void 0:i.id)&&!m.includes(+i.id),p=u(r().useState(!d&&!v),2),f=p[0],h=p[1],y=u(r().useState(a||!(null==i?void 0:i.id)),2),g=y[0],E=y[1];return r().useEffect((function(){d||v?h(!1):g||h(!0),E(a||!(null==i?void 0:i.id))}),[n,null==i?void 0:i.id,g]),o.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:f,isLoading:g}}},61557:(e,t,n)=>{n.d(t,{T:()=>c});var a=n(28400),r=n(110),o=n(97291),i=n(14070),c={getTopicAppLink:function(e,t){return{application:o.O.SUBJECT,action:i.e.Subjects.CLASSIFICATION,args:[e,a.m.slugify(t)]}},getDisplayDate:function(e,t){return t?e.slice(5,7)!==t.slice(5,7)?"".concat(r.O.format(e,"D MMM")," - ").concat(r.O.format(t,"D MMM")):"".concat(r.O.format(e,"D")," - ").concat(r.O.format(t,"D")," ").concat(r.O.format(e,"MMM")):r.O.format(e,"D MMM")},getEventsInMonth:function(e,t){return e.filter((function(e){return r.O.format(e.startDate,"YYYY-MM")===r.O.format(t,"YYYY-MM")}))},getOrdinalDate:function(e){return"".concat(r.O.localeData().ordinal(r.O.get(e,"date"))," ").concat(r.O.format(e,"MMMM"))}}},19961:(e,t,n)=>{n.r(t),n.d(t,{CalendarView:()=>xe});var a=n(1024),r=n.n(a),o=n(81886),i=n(23481),c=n(110),l=n(25925),s=n(53957),u=n(3278),d=n(68677),m=n(97291),v=n(14070),p=n(86698),f=n(79967),h=n(36848),y=n(65858),g=n(83914),E=n(58130),b=n(11607),O=n(33192),D=n.n(O),M=n(75896),C=new Date("2023-01-01"),k=12;function w(e,t){for(var n=c.O.startOf(e,"month"),a=c.O.getWeekday(n),r=[],o=t?0===a?6:a-1:a,i=t?1:0;i<=o;i++){var l=n,s=c.O.weekday(l,a-i);r.push(Object.assign(s,{notCurrentMonth:!0}))}return r.reverse()}function N(e,t){for(var n=c.O.endOf(e,"month"),a=c.O.getWeekday(n),r=[],o=t?7-(0===a?7:a):7-a,i=1;i<=o;i+=1){var l=c.O.add(n,i,"days");r.push(Object.assign(l,{notCurrentMonth:!0}))}return r}function Y(e){var t=c.O.startOf(e,"month");return 1===c.O.getWeekday(t)?t:M.m.first(w(e,!0))}function A(e){var t=c.O.endOf(e,"month");return 0===c.O.getWeekday(t)?t:M.m.last(N(e,!0))}function S(e){return[Y(e),A(e)]}var I=new Date;const L={actions:"DpKMU",chevron:"IE4Ui",left:"AFmnx",right:"N1Rz_"};var T="specialEventCalendar.calendarNav";function x(e){var t="previous"===e.action?E.vn.ChevronLeft:E.vn.ChevronRight,n="previous"===e.action?L.left:L.right;return r().createElement(b.L,{className:"".concat(L.chevron," ").concat(n," border border-dark rounded-circle bg-white d-flex align-items-center justify-content-center"),onClick:e.onClick},r().createElement(g.x,{svgName:t,size:g.S.Medium,className:"svg-container d-inline-block ".concat(L.svg)}))}var j=new Date;function H(e){var t=(0,f.k)();function n(e){var t=c.O.format(e,"MMMM").toLocaleLowerCase(),n=(new Date).getFullYear(),a=e.getFullYear(),r={application:m.O.CALENDAR,action:v.e.Calendar.CALENDAR_MONTH,args:[t]};return n!==a&&(r.params={year:a}),r}var a,o,l=(a=e.monthDate,o=c.O.diffBetween(c.O.startOf(a,"month"),c.O.startOf(I,"month"),"months"),{showPrev:c.O.isAfter(a,C,"month"),showNext:o<k}),s=l.showPrev,u=l.showNext,d={actionType:y.UserAction.Click,entity:y.EntityType.SpecialEvent,location:y.LocationContext.CalendarNav};function p(e){return c.O.format(e,"YYYY-MM-DD")}return r().createElement("div",{className:"d-flex justify-content-between align-items-center"},r().createElement("h1",{className:"mb-0 h2"},c.O.format(e.monthDate,t.xs?"MMM YYYY":"MMMM YYYY")),r().createElement("div",{className:"d-flex ".concat(L.actions)},s&&r().createElement(h.F,{appLink:n(c.O.startOf(c.O.subtract(e.monthDate,1,"month"),"month")),className:"d-flex",analyticsOptions:d,analyticsData:{action:"previous",date:p(c.O.startOf(c.O.add(e.monthDate,1,"month"),"month"))}},r().createElement(x,{action:"previous",onClick:function(){var t=c.O.subtract(e.monthDate,1,"month");e.setViewingMonthDate(t)}})),r().createElement(h.F,{appLink:{application:m.O.CALENDAR,action:v.e.Calendar.CALENDAR},className:"d-flex",analyticsOptions:d,analyticsData:{action:"today",date:p(c.O.startOf(j,"month"))}},r().createElement(b.L,{className:"".concat(L.todayWrapper," btn btn-outline-dark font-weight-500"),onClick:function(){c.O.format(j,"YYYY-MM-DD")!==c.O.format(e.monthDate,"YYYY-MM-DD")&&e.setViewingMonthDate()}},i.T.getPhrase(T,"today"))),u&&r().createElement(h.F,{appLink:n(c.O.startOf(c.O.add(e.monthDate,1,"month"),"month")),className:"d-flex",analyticsOptions:d,analyticsData:{action:"next",date:p(c.O.startOf(c.O.add(e.monthDate,1,"month"),"month"))}},r().createElement(x,{action:"next",onClick:function(){var t=c.O.add(e.monthDate,1,"month");e.setViewingMonthDate(t)}}))))}var U=n(99910),P=n(27867),R=n(49985),F=n(54610),_=n(67453),W=n(2284),B=n(55171),V=n(44435),z=n(61557),J=n(49439);const K={cellDate:"MvrIK",label:"UFPJm",isHovering:"d4VLP",numberWrapper:"PyWl_"};function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var $=i.T.encloseNamespace("specialEventCalendar.calendarCellDate");function Z(e){var t=c.O.isToday(e.date),n="".concat(K.cellDate," d-flex flex-nowrap");t&&(n+=" bg-dark text-white"),e.notCurrentMonth&&!e.isHovering&&(n+=" text-secondary"),e.hasEvent&&(n+=" text-white"),e.className&&(n+=" ".concat(e.className));var a,o,i=(a=(0,J.L)({delay:250}),o=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(a,o)||function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}(a,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=i[0],s=i[1];return r().createElement("div",{className:"".concat(n," ").concat(s?K.isHovering:""),ref:l},r().createElement("div",{className:"".concat(K.numberWrapper," ").concat("d-flex text-center justify-content-center align-items-center flex-shrink-0")},c.O.format(e.date,"D")),t&&r().createElement("div",{className:"".concat(K.label," justify-content-start align-items-center")},$("today")))}var X=n(29917);const G={hardcodedCover:"o0bws",tag:"UIeoi",date:"p1FoI",backgroundImage:"_33D7",eventCard:"MPgib",wrapper:"yvPrI",left:"KBv2n",right:"dowd6",noAnimation:"HWvit",cover:"hoJcZ",tagWrap:"VKCBZ",appear:"zh9Ja",displayDate:"i5dV5",title:"od2i9",titleText:"oNtXC",circle:"Y9ovs",active:"DSUJW",arrow:"RjkfI",bottomBar:"RlRw7",bottomPlaceholder:"Hs06S",multiEventFilter:"O2Dl3"};function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function ee(e){var t,n,a,o,i=e.sliderStep,l=e.setSliderStep,s=e.eventsOnDay.length>1,u=e.eventsOnDay.find((function(e,t){return t===i})),d=!!u.endDate,p=u.content.metadata.backgroundColor,f=B.e.SpecialEvents[u.content.id],O=f?_.j.createUrl(f.iconUrl,{size:F.h2.Medium}):_.j.createUrl(null===(t=u.content.icon)||void 0===t?void 0:t.url,{size:F.h2.Small}),D=_.j.createUrl(null===(n=u.content.cover)||void 0===n?void 0:n.url,{size:F.h2.Small}),M=z.T.getTopicAppLink(u.content.id,u.name),C=u.content.status===W.W.ComingSoon,k={application:m.O.CALENDAR,action:v.e.Calendar.SPECIAL_EVENT_LIST,params:Object.assign(Object.assign({},e.monthQuery),{date:e.date.toString()})},w=(a=r().useState(e.hasInited?G.appear:""),o=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(a,o)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(a,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),N=w[0],Y=w[1];r().useEffect((function(){if(!e.hasInited){var t=Math.floor(600*Math.random()+400);window.setTimeout((function(){Y(G.appear),window.setTimeout((function(){e.setHasInited(!0)}),400)}),t)}}),[e.hasInited]),r().useEffect((function(){e.isHovering&&e.setHoveredEvent(u)}),[e.isHovering,u]),r().useEffect((function(){return function(){var t;e.isHovering&&(null===(t=e.hoveredEvent)||void 0===t?void 0:t.specialEventId)===u.specialEventId&&e.setHoveredEvent(null)}}),[e.isHovering,e.hoveredEvent,u]);var A=null;s?A=k:C||(A=M);var S=function(){var t={date:c.O.format(e.date,"YYYY-MM-DD"),presentationId:e.presentationId,eventCount:e.eventsOnDay.length};return s?(t.eventId=e.eventsOnDay.map((function(e){return e.specialEventId})).join(","),t.topicId=e.eventsOnDay.map((function(e){return e.content.id})).join(",")):(t.eventId=u.specialEventId,t.topicId=u.content.id,t.eventStatus=u.content.status),t}(),I={actionType:y.UserAction.Click,entity:y.EntityType.SpecialEvent,location:y.LocationContext.CalendarDay};function L(e){return c.O.format(e,"YYYY-MM-DD")}return r().createElement("div",{onClick:function(){C&&R.k.logUserAction(S,I)}},r().createElement(h.F,{appLink:A,className:"d-flex justify-content-end",analyticsOptions:I,analyticsData:S},r().createElement("div",{className:"".concat(G.tagWrap," p-1")},C&&r().createElement(X.r,{className:"justify-content-center p-0 rounded-circle ".concat(G.tag," ").concat(N),onlyIcon:!0})),r().createElement(Z,{date:e.date,notCurrentMonth:e.notCurrentMonth,className:"".concat(G.date," ").concat(N),hasEvent:!0,isHovering:e.isHovering}),r().createElement("div",{className:"postion-relative ".concat(G.wrapper)},r().createElement("div",{style:{backgroundColor:p},className:"position-absolute d-flex flex-column justify-content-end align-items-center text-white px-1 pt-2 pb-1 ".concat(G.eventCard," ").concat(N," ").concat(e.isHovering?"rounded-lg":""," ").concat(e.isMultiEventDate?G.multiEventFilter:"")},r().createElement("div",{style:{backgroundImage:"url('".concat(O||D,"')")},className:"".concat(f?"".concat(G.hardcodedCover," position-absolute"):G.backgroundImage," ").concat(O?"":G.cover," ").concat(C?G.comingSoon:""," ").concat(N," ").concat(e.hasInited?G.noAnimation:""," ").concat(e.isHovering?"rounded-lg":""," ").concat(e.isMultiEventDate?G.multiEventFilter:"")}),d&&r().createElement("div",{className:"".concat(G.displayDate)},z.T.getDisplayDate(u.startDate,u.endDate)),r().createElement("div",{className:"text-center ".concat(G.title," ").concat(s?"mb-1":"mb-2")},r().createElement("div",{className:"".concat(G.titleText," ").concat(e.isHovering?"":"clamp-2"," ").concat(e.isHovering?"mb-0":""," h6"),title:u.name},u.name)),s&&0!==i&&r().createElement("div",{className:"position-absolute bg-white rounded-circle ".concat(G.left)},r().createElement(b.L,{onClick:function(t){t.stopPropagation(),t.preventDefault(),l((function(e){return e-1})),R.k.logUserAction({date:L(e.date),action:"previous",eventCount:e.eventsOnDay.length},I)}},r().createElement(g.x,{svgName:E.vn.ChevronLeft,className:"d-inline-block svg-container text-dark ".concat(G.arrow)}))),s&&i!==e.eventsOnDay.length-1&&r().createElement("div",{className:"position-absolute bg-white rounded-circle ".concat(G.right)},r().createElement(b.L,{onClick:function(t){t.stopPropagation(),t.preventDefault(),l((function(e){return e+1})),R.k.logUserAction({date:L(e.date),action:"next",eventCount:e.eventsOnDay.length},I)}},r().createElement(g.x,{svgName:E.vn.ChevronRight,className:"d-inline-block svg-container text-dark ".concat(G.arrow)}))),s&&r().createElement("div",{className:"d-flex ".concat(G.bottomBar," ").concat(s?"":G.bottomPlaceholder)},r().createElement(V.e,{sliderStep:i,sliderLength:e.eventsOnDay.length,size:"sm",className:"".concat(e.isHovering?"mb-2":"mb-1"),onSliderDotClick:function(t){l(t),R.k.logUserAction({date:L(e.date),action:"jump",eventCount:e.eventsOnDay.length},I)}}))))))}const te={wrapper:"ID5BX",notCurrentMonth:"KThJz",weekend:"Le3vK",cell:"GY1K5",multiEventCell:"OhwMa",fadeIn:"hDM5I"};function ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function ae(e){var t,n,a=r().useMemo((function(){var t,n,a,r;return(null===(t=e.hoveredEvent)||void 0===t?void 0:t.endDate)&&!c.O.isSame(e.date,null===(n=e.hoveredEvent)||void 0===n?void 0:n.startDate)&&c.O.isBetween(c.O.format(e.date,"YYYY-MM-DD"),null===(a=e.hoveredEvent)||void 0===a?void 0:a.startDate,null===(r=e.hoveredEvent)||void 0===r?void 0:r.endDate)}),[e.hoveredEvent]),o=null===(t=e.hoveredEvent)||void 0===t?void 0:t.content.metadata.backgroundColor;return r().createElement("div",{className:"".concat(te.cell," font-weight-500")},r().createElement(Z,{date:e.date,notCurrentMonth:e.notCurrentMonth}),a&&r().createElement("div",{style:{backgroundColor:o},className:te.multiEventCell}),(null===(n=e.eventsOnDay)||void 0===n?void 0:n.length)>0&&r().createElement(ee,Object.assign({},e,{isMultiEventDate:a})))}function re(e){var t,n,a,o=e.date,i=e.notCurrentMonth,l=(n=r().useState(0),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(n,a)||function(e,t){if(e){if("string"==typeof e)return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ne(e,t):void 0}}(n,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=l[0],u=l[1],d="position-relative border border-light-blue ".concat(te.wrapper);(function(e){return 0===c.O.getWeekday(e)||6===c.O.getWeekday(e)})(o)&&(d+=" ".concat(te.weekend)),i&&(d+=" ".concat(te.notCurrentMonth));var m=(null===(t=e.events)||void 0===t?void 0:t.filter((function(t){return c.O.isSame(e.date,t.startDate)})))||[],v=Object.assign(Object.assign({},e),{eventsOnDay:m,sliderStep:s,setSliderStep:u});return r().createElement("td",{className:d},(null==m?void 0:m.length)>0?r().createElement(P.K,{hoverableComponent:ae,componentProps:v,hoverScale:1.35}):r().createElement(ae,Object.assign({},v,{isHovering:!1})))}var oe=n(83345),ie=n(23232),ce=n(99742),le="specialEvent.eventsEmptyState",se=i.T.encloseNamespace(le);function ue(e){return r().createElement(oe.D.Provider,{value:le},r().createElement(ie.u,null,r().createElement(ie.u.Image,{src:ce.W.EmptyStates.CALENDAR.NO_EVENTS}),r().createElement(ie.u.Heading,null,r().createElement(oe.x,{phrase:"heading"})),r().createElement(ie.u.Info,null,r().createElement(oe.x,{namespace:le,phrase:"info"}),r().createElement(h.F,{appLink:e.appLink},r().createElement("span",{className:"text-blue"},se("link"))))))}var de=n(13037);const me={date:"dn7Hd",first:"axdj4"};function ve(e){var t={};e.events.forEach((function(e){var n=e.startDate;t[n]?t[n].push(e):t[n]=[e]}));var n=Object.keys(t);return n.sort((function(e,t){return c.O.isBefore(e,t)?-1:0})),r().createElement("div",{className:"py-1"},n.map((function(n,a){return r().createElement("div",{key:n},r().createElement("div",{className:"h4 mt-4 ".concat(me.date," ").concat(0===a?me.first:"")},z.T.getOrdinalDate(n)),t[n].map((function(t){return r().createElement(de.b,{key:t.content.id,getAppLink:z.T.getTopicAppLink,event:t,presentationId:e.presentationId})})))})))}const pe={header:"xLOrx",thead:"ef_XJ"};function fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function ye(e){var t=(0,f.k)(),n=z.T.getEventsInMonth(e.events||[],e.viewingMonth),a=fe(r().useState(!1),2),o=a[0],i=a[1],c=fe(r().useState(null),2),l=c[0],s=c[1];return t.xs||t.sm||t.md?e.eventsLoaded?(null==n?void 0:n.length)?r().createElement(ve,{events:n,presentationId:e.presentationId}):r().createElement(ue,{appLink:{application:m.O.CONTENT_UPDATES,action:v.e.ContentUpdates.CONTENT_UPDATES}}):r().createElement("div",{className:"d-flex justify-content-center align-items-center"},r().createElement(U.Spinner,{as:"div",animation:"border",role:"status"})):r().createElement("table",{className:"user-select-none w-100 mt-3 overflow-hidden rounded-top-lg"},r().createElement("thead",{className:"border border-light-blue ".concat(pe.thead)},r().createElement("tr",{className:"font-weight-500 bg-light-blue ".concat(pe.header)},e.weekDaysHeader.map((function(e){return r().createElement("th",{key:e,className:"px-2 h4"},e)})))),r().createElement("tbody",null,e.weekDays.map((function(t){return r().createElement("tr",{key:t[0].toString()},t.map((function(t){return r().createElement(re,{key:t.toString(),date:t,notCurrentMonth:!!t.notCurrentMonth,events:e.events,monthQuery:e.monthQuery,hasInited:o,setHasInited:i,presentationId:e.presentationId,hoveredEvent:l,setHoveredEvent:s})})))}))))}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Ee=new Date;function be(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ee,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=function(e){var t=e?[1,2,3,4,5,6,0]:[0,1,2,3,4,5,6],n=new Date;return t.map((function(e){return c.O.format(c.O.weekday(n,e),"ddd")}))}(a),l=r().useRef({}),s=(e=r().useState([]),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ge(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],d=s[1],p=c.O.format(n,"YYYY-MM");r().useEffect((function(){var e=l.current[p];if(e)d(e.weeksTable);else{var t=function(e,t){for(var n=[],a={},r=w(e,t).concat(function(e){for(var t=c.O.daysInMonth(e),n=[],a=1;a<=t;a++){var r=c.O.set(e,"date",a);n.push(Object.assign(r,{notCurrentMonth:!1}))}return n}(e)).concat(N(e,t)),o=function(e){var t=r.slice(i,i+7);t.forEach((function(t,n){a[c.O.format(t,"YYYY-MM-DD")]={row:e,col:n}})),n.push(t),e++,l=e},i=0,l=0;i<r.length;i+=7)o(l);return{datePositionMap:a,weeksTable:n}}(n,a),r=t.weeksTable,o=t.datePositionMap;l.current[p]={weeksTable:r,datePositionMap:o},d(r)}}),[c.O.format(n,"YYYY-MM")]);var f=M.m.first(M.m.first(u)),h=M.m.last(M.m.last(u));return{weekDaysHeader:i,weekDays:u,monthDate:n,setMonthDate:function(e){if(e){if(p!==c.O.format(e,"YYYY-MM")){var t=c.O.format(e,"MMMM").toLocaleLowerCase(),a=(new Date).getFullYear(),r=n.getFullYear(),i={application:m.O.CALENDAR,action:v.e.Calendar.CALENDAR_MONTH,args:[t]};a!==r&&(i.params={year:r}),o.Q.AppLinkHelper.trigger(i)}}else o.Q.AppLinkHelper.trigger({application:m.O.CALENDAR,action:v.e.Calendar.CALENDAR})},startDate:f,endDate:h}}var Oe=n(20354),De=n(39780);function Me(e){return function(e){if(Array.isArray(e))return we(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ke(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||ke(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ke(e,t){if(e){if("string"==typeof e)return we(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?we(e,t):void 0}}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Ne=n(74590),Ye="specialEvent.eventsErrorState",Ae=i.T.encloseNamespace(Ye);function Se(e){return r().createElement(oe.D.Provider,{value:Ye},r().createElement(ie.u,null,r().createElement(ie.u.Image,{src:ce.W.EmptyStates.CALENDAR.INVALID_DATE}),r().createElement(ie.u.Heading,null,r().createElement(oe.x,{phrase:"heading"})),r().createElement(ie.u.Info,null,r().createElement(oe.x,{namespace:Ye,phrase:"info"}),r().createElement("br",null),r().createElement(h.F,{appLink:e.appLink},r().createElement("span",{className:"text-blue"},Ae("link"))))))}var Ie={whatsNew:{application:m.O.CONTENT_UPDATES,action:v.e.ContentUpdates.CONTENT_UPDATES},forYou:{application:m.O.DASHBOARD,action:v.e.Dashboard.HOME},calendar:{application:m.O.CALENDAR,action:v.e.Calendar.CALENDAR}},Le=i.T.encloseNamespace("specialEventCalendar.calendarView"),Te=c.O.format(new Date,"MMMM-YYYY").toLocaleLowerCase();function xe(e){var t=(0,p.y)(l.R.Subject,null,e.presentationSlug,!0).presentation,n=(0,Ne.N)(e.presentationSlug),a=n.showCalendar,i=n.isLoading,m=function(e){if(!e)return!0;if(!c.O.formatIsValid(e,"MMMM-YYYY",!0))return!1;var t=D()(e,"MMMM-YYYY").toDate();return c.O.isSame(t,C,"month")||c.O.isAfter(t,C,"month")}(e.month);(0,d.M)({title:Le("pageTitle")}),r().useEffect((function(){i||a||o.Q.AppLinkHelper.trigger(Ie.forYou,{replace:!0})}),[a,i]);var v,f=(v=e.month)?D()(v,"MMMM-YYYY").toDate():c.O.parseDateString(),h=be(f),y=h.monthDate,g=h.setMonthDate,E=h.weekDays,b=h.weekDaysHeader,O=h.startDate,k=h.endDate,w=function(e,t){var n=(0,p.y)(l.R.Subject,null,t,!0).presentation,a=null==n?void 0:n.id,r=Ce(S(e),2),o=r[0],i=r[1],s=Ce(S(c.O.add(e,1,"month")),2),u=s[0],d=s[1],m=Ce(S(c.O.subtract(e,1,"month")),2),v=m[0],f=m[1],h=Oe.a.useBasicFetch(o&&i&&a&&De.N.calendarEvents(c.O.format(o,"YYYY-MM-DD"),c.O.format(i,"YYYY-MM-DD"),a)),y=Oe.a.useBasicFetch(u&&d&&a&&De.N.calendarEvents(c.O.format(u,"YYYY-MM-DD"),c.O.format(d,"YYYY-MM-DD"),a)),g=Oe.a.useBasicFetch(v&&f&&a&&De.N.calendarEvents(c.O.format(v,"YYYY-MM-DD"),c.O.format(f,"YYYY-MM-DD"),a));return{events:M.m.uniq([].concat(Me(g.data||[]),Me(h.data||[]),Me(y.data||[])),(function(e){return e.specialEventId})),loaded:h.hasCompleted}}(f,e.presentationSlug),N=w.events,Y=w.loaded;return null===e.month||m?i||!(null==t?void 0:t.id)?r().createElement(r().Fragment,null):r().createElement("div",{className:"bg-white px-3"},r().createElement(u.z,{type:s.DashboardUserType.Staff,appLinks:Ie,showCalendar:a,active:"calendar"}),r().createElement(H,{monthDate:y,setViewingMonthDate:g}),r().createElement(ye,{weekDays:E,weekDaysHeader:b,events:N,monthQuery:{from:null==O?void 0:O.toString(),to:null==k?void 0:k.toString()},viewingMonth:f,eventsLoaded:Y,presentationId:t.id})):r().createElement(Se,{appLink:Object.assign(Object.assign({},Ie.calendar),{args:[Te]})})}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
|