@clickview/streamable-learning 0.7.4 → 0.7.5

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.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_streamable_learning=self.webpackChunk_clickview_streamable_learning||[]).push([[790],{16107:(e,i,t)=>{t.d(i,{w:()=>o});var n=t(32735),r=t(65294);const a="fVSzb";function l(e,i){(null==i||i>e.length)&&(i=e.length);for(var t=0,n=new Array(i);t<i;t++)n[t]=e[t];return n}var o=n.memo((function(e){var i,t,o=e.forceLoad,s=e.extraClasses,u=void 0===s?"":s,c=e.errorFallbackImageSrc,d=e.preventLoad,f=void 0!==d&&d,m=e.src,v=e.alt,_=function(e,i){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&i.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)i.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(t[n[r]]=e[n[r]])}return t}(e,["forceLoad","extraClasses","errorFallbackImageSrc","preventLoad","src","alt"]),g=(0,r.Y)({rootMargin:"500px"}),p=g.ref,b=g.inView,y=(i=n.useState(!1),t=2,function(e){if(Array.isArray(e))return e}(i)||function(e,i){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,a,l,o=[],s=!0,u=!1;try{if(a=(t=t.call(e)).next,0===i){if(Object(t)!==t)return;s=!1}else for(;!(s=(n=a.call(t)).done)&&(o.push(n.value),o.length!==i);s=!0);}catch(e){u=!0,r=e}finally{try{if(!s&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw r}}return o}}(i,t)||function(e,i){if(e){if("string"==typeof e)return l(e,i);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?l(e,i):void 0}}(i,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.")}()),h=y[0],L=y[1];function S(){return h&&c?c:e.src}if(n.useEffect((function(){if((o||b)&&!f){var e=new Image;return e.onerror=function(){L(!0),c&&(e.src=c)},e.src=m,function(){return e.onerror=null}}}),[b,f]),h&&!c)return n.createElement(n.Fragment,null);if(!p)return n.createElement("img",Object.assign({className:"".concat(a," ").concat(u),alt:v,src:S()},_));var A=Object.assign(Object.assign({alt:v},_),!b&&!o||f?{src:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}:{src:S()});return o||(A.ref=p),n.createElement("img",Object.assign({className:"".concat(a," ").concat(u)},A))}))},78417:(e,i,t)=>{var n;t.d(i,{r:()=>n}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(n||(n={}))},25925:(e,i,t)=>{var n;t.d(i,{R:()=>n}),function(e){e.Subject="Subject",e.Curriculum="Curriculum",e.StreamableLearning="StreamableLearning"}(n||(n={}))},78479:(e,i,t)=>{var n;t.d(i,{f:()=>n}),function(e){e.ThumbnailHeroMedia="thumbnail_hero_media",e.ThumbnailFeaturedMedia="thumbnail_featured_media",e.ThumbnailSlidingListSmall="thumbnail_sliding_list_small",e.ThumbnailSlidingListSmallV2="thumbnail_sliding_list_small_v2",e.ThumbnailSlidingListLarge="thumbnail_sliding_list_large",e.CoverSlidingPillListSmall="cover_sliding_pill_list_small",e.CoverFixedPillListLarge="cover_fixed_pill_list_large",e.CoverFixedPillListXSmall="cover_fixed_pill_list_xsmall",e.CoverFixedTileList="cover_fixed_tile_list",e.PosterSlidingListLarge="poster_sliding_list_large",e.PosterSlidingListMedium="poster_sliding_list_medium",e.PosterSlidingListSmall="poster_sliding_list_small",e.FeaturedThumbnailSlidingList="featured_thumbnail_sliding_list",e.HeroBanner="hero_banner",e.HeroBannerSmall="hero_banner_small",e.HeroThumbnailSmall="hero_thumbnail_small",e.ThumbnailFixedListXLarge="thumbnail_fixed_list_xlarge",e.ThumbnailFixedListLarge="thumbnail_fixed_list_large",e.ThumbnailFixedListSmall="thumbnail_fixed_list_small",e.EditableCoverFixedPillListSmall="editable_cover_fixed_pill_list_small",e.Heading="heading",e.AuthorReviewer="author_reviewer",e.Question="question",e.QuestionAccordion="question_accordion",e.ThumbnailFixedListMediaLarge="thumbnail_fixed_list_media_large",e.PopoutThumbnailSlidingListLarge="popout_thumbnail_sliding_list_large",e.PopoutThumbnailSlidingListSmall="popout_thumbnail_sliding_list_small",e.OnboardingSteps="onboarding_steps",e.ThumbnailVerticalList="thumbnail_vertical_list",e.CircleLogoSlidingList="circle_logo_sliding_list",e.FilterSlidingPillListSmall="filter_sliding_pill_list_small",e.EventIconSlidingList="event_icon_sliding_list"}(n||(n={}))},42308:(e,i,t)=>{var n;t.d(i,{z:()=>n}),function(e){e.CuratedMedia="curated_media",e.PlaylistMedia="playlist_media",e.ClassificationMedia="classification_media",e.LatestReleasedVideos="latest_released_videos",e.ContinueWatching="continue_watching_videos",e.CompanyLatestReleasedVideo="company_latest_released_video",e.CompanyVideos="company_videos",e.ClassificationLatestReleasedVideo="classification_latest_released_video",e.CuratedClassifications="curated_classifications",e.Classifications="classifications",e.ClassificationLatestReleasedVideos="classification_latest_released_videos",e.SpecialEventClassifications="special_event_classifications",e.CuratedSeries="curated_series",e.CuratedPlaylists="curated_playlists",e.Blurb="blurb",e.DynamicBlurb="dynamic_blurb",e.AuthorReviewer="author_reviewer",e.Faq="faq",e.CuratedCompanies="curated_companies",e.Ratings="ratings",e.Presentations="presentations",e.UpcomingLivestreams="upcoming_livestreams",e.CuratedMultimedia="curated_multimedia",e.ClassificationPlaylists="classification_playlists",e.ClassificationSeries="classification_series",e.ClassificationFeaturedVideo="classification_featured_video",e.ClassificationPinnedVideos="classification_pinned_videos"}(n||(n={}))},65294:(e,i,t)=>{t.d(i,{Y:()=>a});var n=t(34152);function r(e,i){(null==i||i>e.length)&&(i=e.length);for(var t=0,n=new Array(i);t<i;t++)n[t]=e[t];return n}function a(){var e,i,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=t.prevent,l=t.rootMargin,o=t.triggerOnce,s=void 0===o||o,u=(e=(0,n.YD)({triggerOnce:s,rootMargin:l}),i=3,function(e){if(Array.isArray(e))return e}(e)||function(e,i){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,a,l,o=[],s=!0,u=!1;try{if(a=(t=t.call(e)).next,0===i){if(Object(t)!==t)return;s=!1}else for(;!(s=(n=a.call(t)).done)&&(o.push(n.value),o.length!==i);s=!0);}catch(e){u=!0,r=e}finally{try{if(!s&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw r}}return o}}(e,i)||function(e,i){if(e){if("string"==typeof e)return r(e,i);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,i):void 0}}(e,i)||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.")}()),c=u[0],d=u[1],f=u[2];return!0!==a&&void 0!==window.IntersectionObserver||(d=!0,c=null),{ref:c,inView:d,initialized:!!f}}},26154:(e,i,t)=>{var n,r,a,l;t.d(i,{VH:()=>c,OL:()=>r,GL:()=>v.GL,ku:()=>v.ku,Yv:()=>v.Yv,Z9:()=>n,l9:()=>o}),function(e){e[e.MultipleChoice=1]="MultipleChoice",e[e.ShortAnswer=2]="ShortAnswer",e[e.TrueOrFalse=3]="TrueOrFalse",e[e.Annotation=4]="Annotation",e[e.Image=5]="Image",e[e.MissingWord=6]="MissingWord"}(n||(n={})),function(e){e.LatestReleases="latest-releases",e.ExploreAllTopics="explore-all-topics",e.ClassificationLatestReleases="classification-latest-releases"}(r||(r={})),function(e){e.Video="video",e.Series="series",e.Playlist="playlist",e.Classification="subject",e.Company="company"}(a||(a={})),function(e){e.Pink="colour:0",e.Orange="colour:1",e.Green="colour:2",e.Blue="colour:3",e.Purple="colour:4",e.Indigo="colour:5"}(l||(l={}));var o,s,u,c,d,f,m,v=t(75902);!function(e){e[e.Row=0]="Row",e[e.LargeRow=1]="LargeRow",e[e.Hero=2]="Hero",e[e.ResourcesTile=3]="ResourcesTile"}(o||(o={})),function(e){e[e.None=1]="None",e[e.All=2]="All",e[e.Learner=3]="Learner",e[e.Teacher=4]="Teacher"}(s||(s={})),function(e){e[e.Holiday=0]="Holiday",e[e.SportingEvent=1]="SportingEvent",e[e.Observance=2]="Observance",e[e.NaturalDisaster=3]="NaturalDisaster",e[e.HistoricalEvent=4]="HistoricalEvent",e[e.BreakingNews=5]="BreakingNews",e[e.Informal=6]="Informal",e[e.ReligiousEvent=7]="ReligiousEvent",e[e.Livestream=8]="Livestream",e[e.Other=255]="Other"}(u||(u={})),function(e){e[e.Classification=0]="Classification",e[e.Livestream=1]="Livestream"}(c||(c={})),function(e){e[e.Regular=0]="Regular",e[e.Daily=1]="Daily",e[e.Weekly=2]="Weekly",e[e.Monthly=3]="Monthly",e[e.Yearly=4]="Yearly"}(d||(d={})),function(e){e[e.Owner=1]="Owner",e[e.Teacher=2]="Teacher",e[e.Student=3]="Student"}(f||(f={})),function(e){e[e.Audience=0]="Audience",e[e.Topic=1]="Topic",e[e.Curriculum=2]="Curriculum"}(m||(m={}))},75902:(e,i,t)=>{var n,r,a,l;t.d(i,{GL:()=>a,Yv:()=>r,ku:()=>l}),function(e){e.Any="Any",e.Level_1="Level_1",e.Level_2="Level_2",e.Level_3="Level_3",e.Level_4="Level_4"}(n||(n={})),function(e){e.Any="Any",e.Staff="Staff",e.Learner="Learner"}(r||(r={})),function(e){e.Draft="Draft",e.Published="Published",e.Archived="Archived"}(a||(a={})),function(e){e.Discover="discover",e.Classification="classification",e.MoviesAndTv="movies-and-tv",e.Company="company"}(l||(l={}))},49542:(e,i,t)=>{t.d(i,{d:()=>d});var n,r=t(32735),a=t(65858);!function(e){e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived"}(n||(n={}));var l,o=t(78479),s=t(42308),u=t(26154);function c(e,i){(null==i||i>e.length)&&(i=e.length);for(var t=0,n=new Array(i);t<i;t++)n[t]=e[t];return n}!function(e){e.Draft="Draft",e.Published="Published",e.Archived="Archived"}(l||(l={}));var d={getSliderAnalyticsOptions:function(){return{actionType:a.Vw.Click,location:a.LZ.SlidingList,entity:a.py.Widget,descriptor:a._S.Slide}},getSliderItemAnalyticsOptions:function(){return{location:a.LZ.SlidingListItem}},getSliderHeadingAnalyticsOptions:function(){return{actionType:a.Vw.Click,location:a.LZ.SlidingList,entity:a.py.Widget,descriptor:a._S.Title}},useGetContent:function(e,i){return r.useMemo((function(){var t;if(!e)return{content:null,unfilteredContent:null};if(!Array.isArray(e))return{content:e,unfilteredContent:e};var n,r=null!==(t=null==i?void 0:i.reduce((function(e,i){return e[i.id]=i,e}),{}))&&void 0!==t?t:{},a=function(e){if(Array.isArray(e))return c(e)}(n=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,i){if(e){if("string"==typeof e)return c(e,i);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?c(e,i):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.")}(),l=a.sort((function(e,i){var t,n,l,o,s=null!==(n=null===(t=r[e.id])||void 0===t?void 0:t.index)&&void 0!==n?n:a.findIndex((function(i){return i.id===e.id})),u=null!==(o=null===(l=r[i.id])||void 0===l?void 0:l.index)&&void 0!==o?o:a.findIndex((function(e){return e.id===i.id}));return s<u?-1:s>u?1:0}));return{content:l.filter((function(e){var i;return!(null===(i=r[e.id])||void 0===i?void 0:i.hidden)})),unfilteredContent:l}}),[e,i])},getCustomAppLink:function(e){var i,t,n,r,a,l;return(null===(i=e.metadata)||void 0===i?void 0:i.appLink)===u.OL.LatestReleases?null===(n=null===(t=e.appLinks)||void 0===t?void 0:t.latestReleases)||void 0===n?void 0:n.call(t):(null===(r=e.metadata)||void 0===r?void 0:r.appLink)===u.OL.ExploreAllTopics?null===(l=null===(a=e.appLinks)||void 0===a?void 0:a.allTopics)||void 0===l?void 0:l.call(a,e.presentation.id):null},getWidgetStatus:function(e){var i=e.status;if("string"==typeof i)switch(i){case l.Archived:i=n.Archived;break;case l.Published:i=n.Published;break;case l.Draft:i=n.Draft}return i},formatResponseData:function(e,i){var t=e.content;if(!t)return e;if("author"in t)return e.content=[t],e;switch("data"in t?e.content=t.data:Array.isArray(t)||(e.content=[t]),e.widgetId){case s.z.ClassificationSeries:e.content=e.content.filter((function(e){var i;return!!(null===(i=e.tallPoster)||void 0===i?void 0:i.id)}));break;case s.z.ClassificationPlaylists:e.content=e.content.filter((function(e){var i;return!!(null===(i=e.cover)||void 0===i?void 0:i.id)}));break;case s.z.ContinueWatching:e.content=e.content.map((function(e){return e.object}));default:break;case s.z.Presentations:e.content=e.content.filter((function(e){var t;return e.id.toString()!==(null===(t=null==i?void 0:i.id)||void 0===t?void 0:t.toString())}))}return e},isWidgetInTableOfContents:function(e){return!!(null==e?void 0:e.showInTableOfContents)},hasNoContent:function(e){return e===s.z.Blurb},canDisplayOnScreenSize:function(e,i,t){return i!==s.z.Blurb||t!==o.f.HeroBannerSmall||!e.xs&&!e.sm},isCompanyWidget:function(e){switch(e){case s.z.CompanyLatestReleasedVideo:case s.z.CompanyVideos:case s.z.UpcomingLivestreams:return!0;default:return!1}}}},31700:(e,i,t)=>{t.d(i,{g:()=>a});var n=t(97395),r=t(25925),a={streamablePresentation:function(){return{url:n._.urlBuilder("/api/subjects/presentations/available",{type:r.R.StreamableLearning}),key:"streamable:learning:presentations",bootstrapName:"availablePresentations",formatData:function(e){return e[0]},normalizeOptions:{namespace:"internal:presentation"}}}}}}]);