@clickview/lite 0.32.6-rc.6 → 0.32.6-rc.7

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "appBundle": "bundle-7c4b5dcdfe.min.js",
2
+ "appBundle": "bundle-af382cfd37.min.js",
3
3
  "cssBundle": "lite-app-e76444acab.css",
4
4
  "polyfillBundle": "polyfills-02090a38a6.min.js"
5
5
  }
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[1316],{29711:(e,t,n)=>{n.d(t,{X:()=>Y});var a=n(32735),r=n(110),o=n(23481),i=n(49439);const c={cellDate:"qcD_n",label:"sp6Gw",isHovering:"_6xWx",numberWrapper:"KZfe0"};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 s=o.T.encloseNamespace("specialEventCalendar.calendarCellDate");function u(e){var t=r.O.isToday(e.date),n="".concat(c.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 o,u,d=(o=(0,i.L)({delay:250}),u=2,function(e){if(Array.isArray(e))return e}(o)||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}}(o,u)||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}}(o,u)||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.")}()),m=d[0],v=d[1];return a.createElement("div",{className:"".concat(n," ").concat(v?c.isHovering:""),ref:m},a.createElement("div",{className:"".concat(c.numberWrapper," ").concat("d-flex text-center justify-content-center align-items-center flex-shrink-0")},r.O.format(e.date,"D")),t&&a.createElement("div",{className:"".concat(c.label," justify-content-start align-items-center")},s("today")))}var d=n(49985),m=n(65858),v=n(84963),f=n(12324),p=n(36848),y=n(11607),h=n(44435),g=n(83914),b=n(55171),E=n(2284),O=n(54610),D=n(67453),M=n(35223);const w={hardcodedCover:"ByD0q",tag:"ZHW8B",date:"AKOWh",backgroundImage:"RDtch",eventCard:"YtMiS",wrapper:"ylxwf",left:"iTqxB",right:"bUUXX",noAnimation:"oZacR",cover:"kpH3Y",tagWrap:"KvlZ8",appear:"xlSdc",displayDate:"rkBJb",title:"c4_Kj",titleText:"nRMvg",circle:"wu4hg",active:"tbdFj",arrow:"omZKz",bottomBar:"hxKUP",bottomPlaceholder:"dzeZ7",multiEventFilter:"dSxjc"};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 k(e){var t,n,o,i,c=e.sliderStep,l=e.setSliderStep,s=e.eventsOnDay.length>1,k=e.eventsOnDay.find((function(e,t){return t===c})),N=!!k.endDate,Y=k.content.metadata.backgroundColor,S=b.e.SpecialEvents[k.content.id],A=S?D.j.createUrl(S.iconUrl,{size:O.h2.Medium}):D.j.createUrl(null===(t=k.content.icon)||void 0===t?void 0:t.url,{size:O.h2.Small}),L=D.j.createUrl(null===(n=k.content.cover)||void 0===n?void 0:n.url,{size:O.h2.Small}),I=k.content.status===E.W.ComingSoon,x=(o=a.useState(e.hasInitialized?w.appear:""),i=2,function(e){if(Array.isArray(e))return e}(o)||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}}(o,i)||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}}(o,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.")}()),T=x[0],j=x[1];a.useEffect((function(){if(!e.hasInitialized){var t=Math.floor(600*Math.random()+400);window.setTimeout((function(){j(w.appear),window.setTimeout((function(){e.setHasInitialized(!0)}),400)}),t)}}),[e.hasInitialized]),a.useEffect((function(){e.isHovering&&e.setHoveredEvent(k)}),[e.isHovering,k]),a.useEffect((function(){return function(){var t;e.isHovering&&(null===(t=e.hoveredEvent)||void 0===t?void 0:t.specialEventId)===k.specialEventId&&e.setHoveredEvent(null)}}),[e.isHovering,e.hoveredEvent,k]);var P=function(){var t={date:r.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=k.specialEventId,t.topicId=k.content.id,t.eventStatus=k.content.status),t}(),H={actionType:m.Vw.Click,entity:m.py.SpecialEvent,location:m.LZ.CalendarDay};function U(e){return r.O.format(e,"YYYY-MM-DD")}return a.createElement("div",{onClick:function(){I&&d.k.logUserAction(P,H)}},a.createElement(p.F,{appLink:function(){var t,n;return s?null===(t=e.getEventsListAppLink)||void 0===t?void 0:t.call(e):I?null:null===(n=e.getTopicAppLink)||void 0===n?void 0:n.call(e,k.content.id,k.name)}(),className:"d-flex justify-content-end",analyticsOptions:H,analyticsData:P},a.createElement("div",{className:"".concat(w.tagWrap," p-1")},I&&a.createElement(v.r,{className:"justify-content-center p-0 rounded-circle ".concat(w.tag," ").concat(T),onlyIcon:!0})),!e.hideDay&&a.createElement(u,{date:e.date,notCurrentMonth:e.notCurrentMonth,className:"".concat(w.date," ").concat(T),isHovering:e.isHovering,hasEvent:!0}),a.createElement("div",{className:"postion-relative ".concat(w.wrapper)},a.createElement("div",{style:{backgroundColor:Y},className:"position-absolute d-flex flex-column justify-content-end align-items-center text-white px-1 pt-2 pb-1 ".concat(w.eventCard," ").concat(T," ").concat(e.isHovering?"rounded-3":""," ").concat(e.isMultiEventDate?w.multiEventFilter:""," ").concat(e.className)},a.createElement("div",{style:{backgroundImage:"url('".concat(A||L,"')")},className:"".concat(S?"".concat(w.hardcodedCover," position-absolute"):w.backgroundImage," ").concat(A?"":w.cover," ").concat(I?w.comingSoon:""," ").concat(T," ").concat(e.hasInitialized?w.noAnimation:""," ").concat(e.isHovering?"rounded-3":""," ").concat(e.isMultiEventDate?w.multiEventFilter:""," ").concat(e.className)}),N&&a.createElement("div",{className:"".concat(w.displayDate)},f.T.getDisplayDate(k.startDate,k.endDate)),a.createElement("div",{className:"text-center ".concat(w.title," ").concat(s?"mb-1":"mb-2")},a.createElement("div",{className:"".concat(w.titleText," ").concat(e.isHovering?"":"clamp-2"," ").concat(e.isHovering?"mb-0":""," h6"),title:k.name},k.name)),s&&0!==c&&a.createElement("div",{className:"position-absolute bg-white rounded-circle ".concat(w.left)},a.createElement(y.L,{onClick:function(t){t.stopPropagation(),t.preventDefault(),l((function(e){return e-1})),d.k.logUserAction({date:U(e.date),action:"previous",eventCount:e.eventsOnDay.length},H)}},a.createElement(g.x,{svgName:M.vn.ChevronLeft,className:"d-inline-block svg-container text-dark ".concat(w.arrow)}))),s&&c!==e.eventsOnDay.length-1&&a.createElement("div",{className:"position-absolute bg-white rounded-circle ".concat(w.right)},a.createElement(y.L,{onClick:function(t){t.stopPropagation(),t.preventDefault(),l((function(e){return e+1})),d.k.logUserAction({date:U(e.date),action:"next",eventCount:e.eventsOnDay.length},H)}},a.createElement(g.x,{svgName:M.vn.ChevronRight,className:"d-inline-block svg-container text-dark ".concat(w.arrow)}))),s&&a.createElement("div",{className:"d-flex ".concat(w.bottomBar," ").concat(s?"":w.bottomPlaceholder)},a.createElement(h.e,{sliderStep:c,sliderLength:e.eventsOnDay.length,size:"sm",className:"".concat(e.isHovering?"mb-2":"mb-1"),onSliderDotClick:function(t){l(t),d.k.logUserAction({date:U(e.date),action:"jump",eventCount:e.eventsOnDay.length},H)}}))))))}const N={cell:"nsEjO",multiEventCell:"vvFYj",fadeIn:"BX0cX"};function Y(e){var t,n,o=a.useMemo((function(){var t,n,a,o;return(null===(t=e.hoveredEvent)||void 0===t?void 0:t.endDate)&&!r.O.isSame(e.date,null===(n=e.hoveredEvent)||void 0===n?void 0:n.startDate)&&r.O.isBetween(r.O.format(e.date,"YYYY-MM-DD"),null===(a=e.hoveredEvent)||void 0===a?void 0:a.startDate,null===(o=e.hoveredEvent)||void 0===o?void 0:o.endDate)}),[e.hoveredEvent]),i=null===(t=e.hoveredEvent)||void 0===t?void 0:t.content.metadata.backgroundColor;return a.createElement("div",{className:"".concat(N.cell," fw-semibold")},!e.hideDay&&a.createElement(u,{date:e.date,notCurrentMonth:e.notCurrentMonth}),o&&a.createElement("div",{style:{backgroundColor:i},className:N.multiEventCell}),(null===(n=e.eventsOnDay)||void 0===n?void 0:n.length)>0&&a.createElement(k,Object.assign({},e,{isMultiEventDate:o})))}},84963:(e,t,n)=>{n.d(t,{r:()=>u});var a=n(32735),r=n(23481),o=n(83914),i=n(76177),c=n(35223);const l={tag:"XRj8d",tooltip:"X6mLk"};var s="specialEventCalendar.comingSoonTag";function u(e){return a.createElement(i.u,{title:r.T.getPhrase(s,"tooltip"),spanHackClassName:"d-block ".concat(l.tooltip),spanHack:!0},a.createElement("div",{className:"d-flex text-dark align-items-center ".concat(l.tag," ").concat(e.className)},a.createElement(o.x,{svgName:c.vn.Timer}),!e.onlyIcon&&r.T.getPhrase(s,"comingSoon")))}},12324:(e,t,n)=>{n.d(t,{T:()=>r});var a=n(110),r={getDisplayDate:function(e,t){return t?e.slice(5,7)!==t.slice(5,7)?"".concat(a.O.format(e,"D MMM")," - ").concat(a.O.format(t,"D MMM")):"".concat(a.O.format(e,"D")," - ").concat(a.O.format(t,"D")," ").concat(a.O.format(e,"MMM")):a.O.format(e,"D MMM")},getEventsInMonth:function(e,t){return e.filter((function(e){return a.O.format(e.startDate,"YYYY-MM")===a.O.format(t,"YYYY-MM")}))},getOrdinalDate:function(e){return"".concat(a.O.localeData().ordinal(a.O.get(e,"date"))," ").concat(a.O.format(e,"MMMM"))}}},3278:(e,t,n)=>{n.d(t,{z:()=>m});var a=n(32735),r=n(39202),o=n(23481),i=n(65858),c=n(38502),l=n(83345),s=n(98758);const u={pillTab:"bMJM0"};var d="discover.header";function m(e){var t,n,m,v,f,p;if(!e.type)return a.createElement(a.Fragment,null);if(e.type===s.Yv.Learner||e.hasStudentExperience)return a.createElement("div",{className:"py-3"},a.createElement("h1",{className:"h2 mb-0"},a.createElement(l.x,{namespace:d,phrase:"heading"})));var y=[{name:o.T.getPhrase(d,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:o.T.getPhrase(d,"forYou"),url:r.C$.getHref(null===(n=e.appLinks)||void 0===n?void 0:n.forYou)},analyticsOptions:{actionType:i.Vw.Click,entity:i.py.Url,location:i.LZ.MagicTabs}},{name:o.T.getPhrase(d,"whatsNew"),appLink:null===(m=e.appLinks)||void 0===m?void 0:m.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:o.T.getPhrase(d,"whatsNew"),url:r.C$.getHref(null===(v=e.appLinks)||void 0===v?void 0:v.whatsNew)},analyticsOptions:{actionType:i.Vw.Click,entity:i.py.Url,location:i.LZ.MagicTabs}}];return e.showCalendar&&y.push({name:o.T.getPhrase(d,"calendar"),appLink:null===(f=e.appLinks)||void 0===f?void 0:f.calendar,active:"calendar"===e.active,analyticsData:{name:o.T.getPhrase(d,"calendar"),url:r.C$.getHref(null===(p=e.appLinks)||void 0===p?void 0:p.calendar)},analyticsOptions:{actionType:i.Vw.Click,entity:i.py.Url,location:i.LZ.MagicTabs}}),a.createElement("div",{className:"py-3 text-center"},a.createElement(c.r,{tabs:y,className:u.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>s});var a=n(32735),r=n(49985),o=n(36848),i=n(76246),c=n(11607),l=n(87432);function s(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(l.Z.pillTabSelector)},e.tabs.map((function(e){return a.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a.createElement(o.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&&a.createElement("div",{className:"ps-2"},a.createElement(i.C,{type:i.g.Count,data:e.count}))):a.createElement(c.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&&r.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(i.C,{type:i.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={}))},13037:(e,t,n)=>{n.d(t,{b:()=>g});var a=n(32735),r=n(23481),o=n(110),i=n(49985),c=n(65858),l=n(84963),s=n(12324),u=n(42735),d=n(36848),m=n(2284),v=n(54610),f=n(79967),p=n(67453);const y={modalWidth:"v5TkI",banner:"LlPSp",bannerContent:"upY3A",pill:"B7ypp"};var h="specialEventCalendar.eventsListItem";function g(e){var t,n=(0,f.k)(),g=e.getAppLink(e.event.content.id,e.event.name),b=e.event.content.metadata.backgroundColor,E=p.j.createUrl(null===(t=e.event.content.banner)||void 0===t?void 0:t.url,{size:v.h2.Large}),O=!!e.event.endDate,D=e.event.content.status===m.W.ComingSoon,M={actionType:c.Vw.Click,entity:c.py.SpecialEvent,location:e.inPopup?c.LZ.CalendarPopup:c.LZ.CalendarDay},w={topicId:e.event.content.id,eventId:e.event.specialEventId,presentationId:e.presentationId,date:o.O.format(new Date(e.event.startDate),"YYYY-MM-DD"),status:e.event.content.status};return a.createElement("div",{onClick:function(){D&&i.k.logUserAction(w,M)}},a.createElement(d.F,{appLink:!D&&g,className:"".concat(D?"":"cursor-pointer"," text-decoration-none"),onClick:e.onClick,analyticsOptions:M,analyticsData:w},a.createElement("div",{className:"banner rounded-3 position-relative ".concat(y.banner),style:{backgroundColor:b,backgroundImage:"url('".concat(E,"')")}},a.createElement("div",{className:"".concat(y.bannerContent," px-3")},a.createElement("div",{className:"text-white"},D&&a.createElement(l.r,{className:"pe-2 fw-semibold mb-1 rounded-pill justify-content-start ".concat(y.pill)}),O&&a.createElement("div",{className:"mb-1"},s.T.getDisplayDate(e.event.startDate,e.event.endDate)),a.createElement("h2",{className:"h4 clamp-1 text-white text-shadow",title:e.event.name},e.event.name)),a.createElement("div",{className:"flex-shrink-0"},!D&&a.createElement(u.K,{className:"btn btn-outline-dark fw-semibold"},r.T.getPhrase(h,n.xs?"mobileButtonLabel":"buttonLabel")))))),a.createElement("div",{className:"mt-2 mb-3"},e.event.description||e.event.content.description))}},39780:(e,t,n)=>{n.d(t,{N:()=>c});var a=n(97395),r=n(75896),o=n(110),i=n(4594),c={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)}},nextTopicSpecialEvent:function(e,t){var n={presentationId:t,limit:1,from:o.O.format(new Date,"YYYY-MM-DD"),objectType:i.E.Subject};return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/object/".concat(e,"/next-events"),n),publicUrl:a._.urlBuilder("/api/discover/special-events/object/".concat(e,"/next-events"),n),key:"presentation:".concat(t,":events:classification:").concat(e),formatData:function(e){return r.m.first(e)}}}}},74590:(e,t,n)=>{n.d(t,{N:()=>g});var a,r=n(32735),o=n(35242),i=n(20354),c=n(27022),l=n(72639),s=n(31949),u=n(37802),d=n(10144),m=n(86698);function v(e){return v="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},v(e)}function f(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 p(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)?p(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 p(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 y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==v(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===v(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=(y(a={},c.t.AU,[l.p.Level_1]),y(a,c.t.US,[l.p.Level_1]),y(a,c.t.UK,[l.p.Level_1]),y(a,c.t.SCOT,[l.p.Level_1]),y(a,c.t.NZ,[]),y(a,c.t.GLOBAL,[]),a);function g(){var e,t=(0,u.r)(null),n=t.hasSpecialEventCalendar,a=t.isLoadingSettings,c=(0,m.y)({redirectOnError:!0}).activePresentation,l=i.a.useBasicFetch(s.N.currentUser()),v=h[null===(e=l.data)||void 0===e?void 0:e.contentRegion],p=d.i.getMappedPresentationLevel(null==c?void 0:c.learningLevel),y=null==v?void 0:v.includes(p),g=!a&&!n,b=f(r.useState(!g&&!y),2),E=b[0],O=b[1],D=f(r.useState(a||!(null==c?void 0:c.id)),2),M=D[0],w=D[1];return r.useEffect((function(){g||y?O(!1):M||O(!0),w(a||!(null==c?void 0:c.id))}),[n,null==c?void 0:c.id,M]),o.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:E,isLoading:M}}},81316:(e,t,n)=>{n.r(t),n.d(t,{CalendarView:()=>Oe});var a=n(32735),r=n(23481),o=n(81886),i=n(110),c=n(3278),l=n(79612),s=n(98758),u=n(14070),d=n(97291),m=n(86698),v=n(30241),f=n(56017),p=n(33192),y=n(80247),h=n(28400),g=n(12324),b=n(79967),E=n(29711),O=n(27867);const D={wrapper:"ID5BX",notCurrentMonth:"KThJz",weekend:"Le3vK"};function M(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 w(e){var t,n,r,o=e.date,c=e.notCurrentMonth,l=(n=a.useState(0),r=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,r)||function(e,t){if(e){if("string"==typeof e)return M(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)?M(e,t):void 0}}(n,r)||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(D.wrapper);(function(e){return 0===i.O.getWeekday(e)||6===i.O.getWeekday(e)})(o)&&(d+=" ".concat(D.weekend)),c&&(d+=" ".concat(D.notCurrentMonth));var m=(null===(t=e.events)||void 0===t?void 0:t.filter((function(t){return i.O.isSame(e.date,t.startDate)})))||[],v=Object.assign(Object.assign({},e),{eventsOnDay:m,sliderStep:s,setSliderStep:u});return a.createElement("td",{className:d},(null==m?void 0:m.length)>0?a.createElement(O.K,{hoverableComponent:E.X,componentProps:v,hoverScale:1.35}):a.createElement(E.X,Object.assign({},v,{isHovering:!1})))}var C=n(36848),k=n(23232),N=n(83345),Y=n(99742),S="specialEvent.eventsEmptyState",A=r.T.encloseNamespace(S);function L(e){return a.createElement(N.D.Provider,{value:S},a.createElement(k.u,null,a.createElement(k.u.Image,{src:Y.W.EmptyStates.CALENDAR.NO_EVENTS,altText:A("info")}),a.createElement(k.u.Heading,null,a.createElement(N.x,{phrase:"heading"})),a.createElement(k.u.Info,null,a.createElement(N.x,{namespace:S,phrase:"info"}),a.createElement(C.F,{appLink:e.appLink},a.createElement("span",{className:"text-blue"},A("link"))))))}var I=n(13037);const x={date:"dn7Hd",first:"axdj4"};function T(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 i.O.isBefore(e,t)?-1:0})),a.createElement("div",{className:"py-1"},n.map((function(n,r){return a.createElement("div",{key:n},a.createElement("div",{className:"h4 mt-4 ".concat(x.date," ").concat(0===r?x.first:"")},g.T.getOrdinalDate(n)),t[n].map((function(t){return a.createElement(I.b,{key:t.content.id,getAppLink:function(e,t){return{application:d.O.SUBJECT,action:u.e.Subjects.CLASSIFICATION,args:[e,h.m.slugify(t)]}},event:t,presentationId:e.presentationId})})))})))}const j={header:"xLOrx",thead:"ef_XJ"};function P(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 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}}(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 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 U(e){var t=(0,b.k)(),n=g.T.getEventsInMonth(e.events||[],e.viewingMonth),r=P(a.useState(!1),2),o=r[0],i=r[1],c=P(a.useState(null),2),l=c[0],s=c[1];return t.xs||t.sm||t.md?e.eventsLoaded?(null==n?void 0:n.length)?a.createElement(T,{events:n,presentationId:e.presentationId}):a.createElement(L,{appLink:{application:d.O.CONTENT_UPDATES,action:u.e.ContentUpdates.CONTENT_UPDATES}}):a.createElement("div",{className:"d-flex justify-content-center align-items-center"},a.createElement(y.Z,{as:"div",animation:"border",role:"status"})):a.createElement("table",{className:"user-select-none w-100 mt-3 overflow-hidden rounded-top-lg"},a.createElement("thead",{className:"border border-light-blue ".concat(j.thead)},a.createElement("tr",{className:"fw-semibold bg-light-blue ".concat(j.header)},e.weekDaysHeader.map((function(e){return a.createElement("th",{key:e,className:"px-2 h4"},e)})))),a.createElement("tbody",null,e.weekDays.map((function(t){return a.createElement("tr",{key:t[0].toString()},t.map((function(t){return a.createElement(w,{key:t.toString(),date:t,notCurrentMonth:!!t.notCurrentMonth,events:e.events,monthQuery:e.monthQuery,hasInitialized:o,setHasInitialized:i,presentationId:e.presentationId,hoveredEvent:l,setHoveredEvent:s,getEventsListAppLink:function(){return{application:d.O.CALENDAR,action:u.e.Calendar.SPECIAL_EVENT_LIST,params:Object.assign(Object.assign({},e.monthQuery),{date:t.toString()})}},getTopicAppLink:function(e,t){return{application:d.O.SUBJECT,action:u.e.Subjects.CLASSIFICATION,args:[e,h.m.slugify(t)]}}})})))}))))}var _=n(65858),B=n(11607),F=n(83914),R=n(35223),W=n(53806),z=n.n(W),Z=n(75896),V=new Date("2023-01-01"),$=12;function K(e,t){for(var n=i.O.startOf(e,"month"),a=i.O.getWeekday(n),r=[],o=t?0===a?6:a-1:a,c=t?1:0;c<=o;c++){var l=n,s=i.O.weekday(l,a-c);r.push(Object.assign(s,{notCurrentMonth:!0}))}return r.reverse()}function X(e,t){for(var n=i.O.endOf(e,"month"),a=i.O.getWeekday(n),r=[],o=t?7-(0===a?7:a):7-a,c=1;c<=o;c+=1){var l=i.O.add(n,c,"days");r.push(Object.assign(l,{notCurrentMonth:!0}))}return r}function J(e){var t=i.O.startOf(e,"month");return 1===i.O.getWeekday(t)?t:Z.m.first(K(e,!0))}function Q(e){var t=i.O.endOf(e,"month");return 0===i.O.getWeekday(t)?t:Z.m.last(X(e,!0))}function q(e){return[J(e),Q(e)]}var G=new Date;const ee={actions:"DpKMU",chevron:"IE4Ui",left:"AFmnx",right:"N1Rz_"};var te="specialEventCalendar.calendarNav";function ne(e){var t="previous"===e.action?R.vn.ChevronLeft:R.vn.ChevronRight,n="previous"===e.action?ee.left:ee.right;return a.createElement(B.L,{className:"".concat(ee.chevron," ").concat(n," border border-dark rounded-circle bg-white d-flex align-items-center justify-content-center"),onClick:e.onClick},a.createElement(F.x,{svgName:t,size:F.S.Medium,className:"svg-container d-inline-block ".concat(ee.svg)}))}var ae=new Date;function re(e){var t=(0,b.k)();function n(e){var t=i.O.format(e,"MMMM").toLocaleLowerCase(),n=(new Date).getFullYear(),a=e.getFullYear(),r={application:d.O.CALENDAR,action:u.e.Calendar.CALENDAR_MONTH,args:[t]};return n!==a&&(r.params={year:a}),r}var o,c,l=(o=e.monthDate,c=i.O.diffBetween(i.O.startOf(o,"month"),i.O.startOf(G,"month"),"months"),{showPrev:i.O.isAfter(o,V,"month"),showNext:c<$}),s=l.showPrev,m=l.showNext,v={actionType:_.Vw.Click,entity:_.py.SpecialEvent,location:_.LZ.CalendarNav};function f(e){return i.O.format(e,"YYYY-MM-DD")}return a.createElement("div",{className:"d-flex justify-content-between align-items-center"},a.createElement("h1",{className:"mb-0 h2"},i.O.format(e.monthDate,t.xs?"MMM YYYY":"MMMM YYYY")),a.createElement("div",{className:"d-flex ".concat(ee.actions)},s&&a.createElement(C.F,{appLink:n(i.O.startOf(i.O.subtract(e.monthDate,1,"month"),"month")),className:"d-flex",analyticsOptions:v,analyticsData:{action:"previous",date:f(i.O.startOf(i.O.add(e.monthDate,1,"month"),"month"))}},a.createElement(ne,{action:"previous",onClick:function(){var t=i.O.subtract(e.monthDate,1,"month");e.setViewingMonthDate(t)}})),a.createElement(C.F,{appLink:{application:d.O.CALENDAR,action:u.e.Calendar.CALENDAR},className:"d-flex",analyticsOptions:v,analyticsData:{action:"today",date:f(i.O.startOf(ae,"month"))}},a.createElement(B.L,{className:"".concat(ee.todayWrapper," btn btn-outline-dark fw-semibold"),onClick:function(){i.O.format(ae,"YYYY-MM-DD")!==i.O.format(e.monthDate,"YYYY-MM-DD")&&e.setViewingMonthDate()}},r.T.getPhrase(te,"today"))),m&&a.createElement(C.F,{appLink:n(i.O.startOf(i.O.add(e.monthDate,1,"month"),"month")),className:"d-flex",analyticsOptions:v,analyticsData:{action:"next",date:f(i.O.startOf(i.O.add(e.monthDate,1,"month"),"month"))}},a.createElement(ne,{action:"next",onClick:function(){var t=i.O.add(e.monthDate,1,"month");e.setViewingMonthDate(t)}}))))}var oe="specialEvent.eventsErrorState",ie=r.T.encloseNamespace(oe);function ce(e){return a.createElement(N.D.Provider,{value:oe},a.createElement(k.u,null,a.createElement(k.u.Image,{src:Y.W.EmptyStates.CALENDAR.INVALID_DATE}),a.createElement(k.u.Heading,null,a.createElement(N.x,{phrase:"heading"})),a.createElement(k.u.Info,null,a.createElement(N.x,{namespace:oe,phrase:"info"}),a.createElement("br",null),a.createElement(C.F,{appLink:e.appLink},a.createElement("span",{className:"text-blue"},ie("link"))))))}var le=n(20354),se=n(39780);function ue(e){return function(e){if(Array.isArray(e))return ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||me(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 de(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)||me(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 me(e,t){if(e){if("string"==typeof e)return ve(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)?ve(e,t):void 0}}function ve(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 fe(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 pe=new Date;function ye(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],c=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 i.O.format(i.O.weekday(n,e),"ddd")}))}(r),l=a.useRef({}),s=(e=a.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 fe(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)?fe(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.")}()),m=s[0],v=s[1],f=i.O.format(n,"YYYY-MM");a.useEffect((function(){var e=l.current[f];if(e)v(e.weeksTable);else{var t=function(e,t){for(var n=[],a={},r=K(e,t).concat(function(e){for(var t=i.O.daysInMonth(e),n=[],a=1;a<=t;a++){var r=i.O.set(e,"date",a);n.push(Object.assign(r,{notCurrentMonth:!1}))}return n}(e)).concat(X(e,t)),o=function(e){var t=r.slice(c,c+7);t.forEach((function(t,n){a[i.O.format(t,"YYYY-MM-DD")]={row:e,col:n}})),n.push(t),e++,l=e},c=0,l=0;c<r.length;c+=7)o(l);return{datePositionMap:a,weeksTable:n}}(n,r),a=t.weeksTable,o=t.datePositionMap;l.current[f]={weeksTable:a,datePositionMap:o},v(a)}}),[i.O.format(n,"YYYY-MM")]);var p=Z.m.first(Z.m.first(m)),y=Z.m.last(Z.m.last(m));return{weekDaysHeader:c,weekDays:m,monthDate:n,setMonthDate:function(e){if(e){if(f!==i.O.format(e,"YYYY-MM")){var t=i.O.format(e,"MMMM").toLocaleLowerCase(),a=(new Date).getFullYear(),r=n.getFullYear(),c={application:d.O.CALENDAR,action:u.e.Calendar.CALENDAR_MONTH,args:[t]};a!==r&&(c.params={year:r}),o.Q.C$.trigger(c)}}else o.Q.C$.trigger({application:d.O.CALENDAR,action:u.e.Calendar.CALENDAR})},startDate:p,endDate:y}}var he=n(74590),ge=r.T.encloseNamespace("specialEventCalendar.calendarView"),be={whatsNew:{application:d.O.CONTENT_UPDATES,action:u.e.ContentUpdates.CONTENT_UPDATES},forYou:{application:d.O.DASHBOARD,action:u.e.Dashboard.HOME},calendar:{application:d.O.CALENDAR,action:u.e.Calendar.CALENDAR}},Ee=i.O.format(new Date,"MMMM-YYYY").toLocaleLowerCase();function Oe(e){var t=(0,m.y)({redirectOnError:!0}).activePresentation,n=(0,he.N)(),r=n.showCalendar,u=n.isLoading,d=function(e){if(!e)return!0;if(!i.O.formatIsValid(e,"MMMM-YYYY",!0))return!1;var t=z()(e,"MMMM-YYYY").toDate();return i.O.isSame(t,V,"month")||i.O.isAfter(t,V,"month")}(e.month);a.useEffect((function(){u||r||o.Q.C$.trigger(be.forYou,{replace:!0})}),[r,u]);var y,h=(y=e.month)?z()(y,"MMMM-YYYY").toDate():i.O.parseDateString(),g=ye(h),b=g.monthDate,E=g.setMonthDate,O=g.weekDays,D=g.weekDaysHeader,M=g.startDate,w=g.endDate,C=function(e){var t=(0,m.y)({redirectOnError:!0}).activePresentation,n=null==t?void 0:t.id,a=de(q(e),2),r=a[0],o=a[1],c=de(q(i.O.add(e,1,"month")),2),l=c[0],s=c[1],u=de(q(i.O.subtract(e,1,"month")),2),d=u[0],v=u[1],f=le.a.useBasicFetch(r&&o&&n&&se.N.calendarEvents(i.O.format(r,"YYYY-MM-DD"),i.O.format(o,"YYYY-MM-DD"),n)),p=le.a.useBasicFetch(l&&s&&n&&se.N.calendarEvents(i.O.format(l,"YYYY-MM-DD"),i.O.format(s,"YYYY-MM-DD"),n)),y=le.a.useBasicFetch(d&&v&&n&&se.N.calendarEvents(i.O.format(d,"YYYY-MM-DD"),i.O.format(v,"YYYY-MM-DD"),n));return{events:Z.m.uniq([].concat(ue(y.data||[]),ue(f.data||[]),ue(p.data||[])),(function(e){return e.specialEventId})),loaded:f.hasCompleted}}(h),k=C.events,N=C.loaded,Y=i.O.format(b,"MMMM YYYY");return(0,l.M)(f.C.getDefaultMetadata({title:Y,phraseContext:{phraseHandler:ge,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:p.f.getCanonicalLink({allowedParams:["year"]}),allowIndexing:p.f.allowIndexing(),hrefLang:p.f.getStaticRouteHrefLang(null==t?void 0:t.learningLevel,(function(){return be.calendar}),v.Bg)})),null===e.month||d?u||!(null==t?void 0:t.id)?a.createElement(a.Fragment,null):a.createElement("div",{className:"bg-white px-3"},a.createElement(c.z,{type:s.Yv.Staff,appLinks:be,showCalendar:r,active:"calendar"}),a.createElement(re,{monthDate:b,setViewingMonthDate:E}),a.createElement(U,{weekDays:O,weekDaysHeader:D,events:k,monthQuery:{from:null==M?void 0:M.toString(),to:null==w?void 0:w.toString()},viewingMonth:h,eventsLoaded:N,presentationId:t.id})):a.createElement(ce,{appLink:Object.assign(Object.assign({},be.calendar),{args:[Ee]})})}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[1316],{29711:(e,t,n)=>{n.d(t,{X:()=>S});var a=n(32735),r=n(110),o=n(23481),i=n(49439);const c={cellDate:"qcD_n",label:"sp6Gw",isHovering:"_6xWx",numberWrapper:"KZfe0"};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 s=o.T.encloseNamespace("specialEventCalendar.calendarCellDate");function u(e){var t=r.O.isToday(e.date),n="".concat(c.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 o,u,d=(o=(0,i.L)({delay:250}),u=2,function(e){if(Array.isArray(e))return e}(o)||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}}(o,u)||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}}(o,u)||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.")}()),m=d[0],v=d[1];return a.createElement("div",{className:"".concat(n," ").concat(v?c.isHovering:""),ref:m},a.createElement("div",{className:"".concat(c.numberWrapper," ").concat("d-flex text-center justify-content-center align-items-center flex-shrink-0")},r.O.format(e.date,"D")),t&&a.createElement("div",{className:"".concat(c.label," justify-content-start align-items-center")},s("today")))}var d=n(49985),m=n(65858),v=n(84963),f=n(12324),p=n(36848),y=n(11607),h=n(44435),g=n(83914),b=n(55171),E=n(2284),O=n(54610),D=n(67453),M=n(35223);const w={hardcodedCover:"ByD0q",tag:"ZHW8B",date:"AKOWh",backgroundImage:"RDtch",eventCard:"YtMiS",wrapper:"ylxwf",left:"iTqxB",right:"bUUXX",noAnimation:"oZacR",cover:"kpH3Y",tagWrap:"KvlZ8",appear:"xlSdc",displayDate:"rkBJb",title:"c4_Kj",titleText:"nRMvg",circle:"wu4hg",active:"tbdFj",arrow:"omZKz",bottomBar:"hxKUP",bottomPlaceholder:"dzeZ7",multiEventFilter:"dSxjc"};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 k(e){var t,n,o,i,c=e.sliderStep,l=e.setSliderStep,s=e.eventsOnDay.length>1,k=e.eventsOnDay.find((function(e,t){return t===c})),N=!!k.endDate,S=k.content.metadata.backgroundColor,Y=b.e.SpecialEvents[k.content.id],A=Y?D.j.createUrl(Y.iconUrl,{size:O.h2.Medium}):D.j.createUrl(null===(t=k.content.icon)||void 0===t?void 0:t.url,{size:O.h2.Small}),L=D.j.createUrl(null===(n=k.content.cover)||void 0===n?void 0:n.url,{size:O.h2.Small}),I=k.content.status===E.W.ComingSoon,x=(o=a.useState(e.hasInitialized?w.appear:""),i=2,function(e){if(Array.isArray(e))return e}(o)||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}}(o,i)||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}}(o,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.")}()),T=x[0],j=x[1];a.useEffect((function(){if(!e.hasInitialized){var t=Math.floor(600*Math.random()+400);window.setTimeout((function(){j(w.appear),window.setTimeout((function(){e.setHasInitialized(!0)}),400)}),t)}}),[e.hasInitialized]),a.useEffect((function(){e.isHovering&&e.setHoveredEvent(k)}),[e.isHovering,k]),a.useEffect((function(){return function(){var t;e.isHovering&&(null===(t=e.hoveredEvent)||void 0===t?void 0:t.specialEventId)===k.specialEventId&&e.setHoveredEvent(null)}}),[e.isHovering,e.hoveredEvent,k]);var P=function(){var t={date:r.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=k.specialEventId,t.topicId=k.content.id,t.eventStatus=k.content.status),t}(),H={actionType:m.Vw.Click,entity:m.py.SpecialEvent,location:m.LZ.CalendarDay};function U(e){return r.O.format(e,"YYYY-MM-DD")}return a.createElement("div",{onClick:function(){I&&d.k.logUserAction(P,H)}},a.createElement(p.F,{appLink:function(){var t,n;return s?null===(t=e.getEventsListAppLink)||void 0===t?void 0:t.call(e):I?null:null===(n=e.getTopicAppLink)||void 0===n?void 0:n.call(e,k.content.id,k.name)}(),className:"d-flex justify-content-end",analyticsOptions:H,analyticsData:P},a.createElement("div",{className:"".concat(w.tagWrap," p-1")},I&&a.createElement(v.r,{className:"justify-content-center p-0 rounded-circle ".concat(w.tag," ").concat(T),onlyIcon:!0})),!e.hideDay&&a.createElement(u,{date:e.date,notCurrentMonth:e.notCurrentMonth,className:"".concat(w.date," ").concat(T),isHovering:e.isHovering,hasEvent:!0}),a.createElement("div",{className:"postion-relative ".concat(w.wrapper)},a.createElement("div",{style:{backgroundColor:S},className:"position-absolute d-flex flex-column justify-content-end align-items-center text-white px-1 pt-2 pb-1 ".concat(w.eventCard," ").concat(T," ").concat(e.isHovering?"rounded-3":""," ").concat(e.isMultiEventDate?w.multiEventFilter:""," ").concat(e.className)},a.createElement("div",{style:{backgroundImage:"url('".concat(A||L,"')")},className:"".concat(Y?"".concat(w.hardcodedCover," position-absolute"):w.backgroundImage," ").concat(A?"":w.cover," ").concat(I?w.comingSoon:""," ").concat(T," ").concat(e.hasInitialized?w.noAnimation:""," ").concat(e.isHovering?"rounded-3":""," ").concat(e.isMultiEventDate?w.multiEventFilter:""," ").concat(e.className)}),N&&a.createElement("div",{className:"".concat(w.displayDate)},f.T.getDisplayDate(k.startDate,k.endDate)),a.createElement("div",{className:"text-center ".concat(w.title," ").concat(s?"mb-1":"mb-2")},a.createElement("div",{className:"".concat(w.titleText," ").concat(e.isHovering?"":"clamp-2"," ").concat(e.isHovering?"mb-0":""," h6"),title:k.name},k.name)),s&&0!==c&&a.createElement("div",{className:"position-absolute bg-white rounded-circle ".concat(w.left)},a.createElement(y.L,{onClick:function(t){t.stopPropagation(),t.preventDefault(),l((function(e){return e-1})),d.k.logUserAction({date:U(e.date),action:"previous",eventCount:e.eventsOnDay.length},H)}},a.createElement(g.x,{svgName:M.vn.ChevronLeft,className:"d-inline-block svg-container text-dark ".concat(w.arrow)}))),s&&c!==e.eventsOnDay.length-1&&a.createElement("div",{className:"position-absolute bg-white rounded-circle ".concat(w.right)},a.createElement(y.L,{onClick:function(t){t.stopPropagation(),t.preventDefault(),l((function(e){return e+1})),d.k.logUserAction({date:U(e.date),action:"next",eventCount:e.eventsOnDay.length},H)}},a.createElement(g.x,{svgName:M.vn.ChevronRight,className:"d-inline-block svg-container text-dark ".concat(w.arrow)}))),s&&a.createElement("div",{className:"d-flex ".concat(w.bottomBar," ").concat(s?"":w.bottomPlaceholder)},a.createElement(h.e,{sliderStep:c,sliderLength:e.eventsOnDay.length,size:"sm",className:"".concat(e.isHovering?"mb-2":"mb-1"),onSliderDotClick:function(t){l(t),d.k.logUserAction({date:U(e.date),action:"jump",eventCount:e.eventsOnDay.length},H)}}))))))}const N={cell:"nsEjO",multiEventCell:"vvFYj",fadeIn:"BX0cX"};function S(e){var t,n,o=a.useMemo((function(){var t,n,a,o;return(null===(t=e.hoveredEvent)||void 0===t?void 0:t.endDate)&&!r.O.isSame(e.date,null===(n=e.hoveredEvent)||void 0===n?void 0:n.startDate)&&r.O.isBetween(r.O.format(e.date,"YYYY-MM-DD"),null===(a=e.hoveredEvent)||void 0===a?void 0:a.startDate,null===(o=e.hoveredEvent)||void 0===o?void 0:o.endDate)}),[e.hoveredEvent]),i=null===(t=e.hoveredEvent)||void 0===t?void 0:t.content.metadata.backgroundColor;return a.createElement("div",{className:"".concat(N.cell," fw-semibold")},!e.hideDay&&a.createElement(u,{date:e.date,notCurrentMonth:e.notCurrentMonth}),o&&a.createElement("div",{style:{backgroundColor:i},className:N.multiEventCell}),(null===(n=e.eventsOnDay)||void 0===n?void 0:n.length)>0&&a.createElement(k,Object.assign({},e,{isMultiEventDate:o})))}},84963:(e,t,n)=>{n.d(t,{r:()=>u});var a=n(32735),r=n(23481),o=n(83914),i=n(76177),c=n(35223);const l={tag:"XRj8d",tooltip:"X6mLk"};var s="specialEventCalendar.comingSoonTag";function u(e){return a.createElement(i.u,{title:r.T.getPhrase(s,"tooltip"),spanHackClassName:"d-block ".concat(l.tooltip),spanHack:!0},a.createElement("div",{className:"d-flex text-dark align-items-center ".concat(l.tag," ").concat(e.className)},a.createElement(o.x,{svgName:c.vn.Timer}),!e.onlyIcon&&r.T.getPhrase(s,"comingSoon")))}},12324:(e,t,n)=>{n.d(t,{T:()=>r});var a=n(110),r={getDisplayDate:function(e,t){return t?e.slice(5,7)!==t.slice(5,7)?"".concat(a.O.format(e,"D MMM")," - ").concat(a.O.format(t,"D MMM")):"".concat(a.O.format(e,"D")," - ").concat(a.O.format(t,"D")," ").concat(a.O.format(e,"MMM")):a.O.format(e,"D MMM")},getEventsInMonth:function(e,t){return e.filter((function(e){return a.O.format(e.startDate,"YYYY-MM")===a.O.format(t,"YYYY-MM")}))},getOrdinalDate:function(e){return"".concat(a.O.localeData().ordinal(a.O.get(e,"date"))," ").concat(a.O.format(e,"MMMM"))}}},3278:(e,t,n)=>{n.d(t,{z:()=>m});var a=n(32735),r=n(39202),o=n(23481),i=n(65858),c=n(38502),l=n(83345),s=n(98758);const u={pillTab:"bMJM0"};var d="discover.header";function m(e){var t,n,m,v,f,p;if(!e.type)return a.createElement(a.Fragment,null);if(e.type===s.Yv.Learner||e.hasStudentExperience)return a.createElement("div",{className:"py-3"},a.createElement("h1",{className:"h2 mb-0"},a.createElement(l.x,{namespace:d,phrase:"heading"})));var y=[{name:o.T.getPhrase(d,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:o.T.getPhrase(d,"forYou"),url:r.C$.getHref(null===(n=e.appLinks)||void 0===n?void 0:n.forYou)},analyticsOptions:{actionType:i.Vw.Click,entity:i.py.Url,location:i.LZ.MagicTabs}},{name:o.T.getPhrase(d,"whatsNew"),appLink:null===(m=e.appLinks)||void 0===m?void 0:m.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:o.T.getPhrase(d,"whatsNew"),url:r.C$.getHref(null===(v=e.appLinks)||void 0===v?void 0:v.whatsNew)},analyticsOptions:{actionType:i.Vw.Click,entity:i.py.Url,location:i.LZ.MagicTabs}}];return e.showCalendar&&y.push({name:o.T.getPhrase(d,"calendar"),appLink:null===(f=e.appLinks)||void 0===f?void 0:f.calendar,active:"calendar"===e.active,analyticsData:{name:o.T.getPhrase(d,"calendar"),url:r.C$.getHref(null===(p=e.appLinks)||void 0===p?void 0:p.calendar)},analyticsOptions:{actionType:i.Vw.Click,entity:i.py.Url,location:i.LZ.MagicTabs}}),a.createElement("div",{className:"py-3 text-center"},a.createElement(c.r,{tabs:y,className:u.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>s});var a=n(32735),r=n(49985),o=n(36848),i=n(76246),c=n(11607),l=n(87432);function s(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(l.Z.pillTabSelector)},e.tabs.map((function(e){return a.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a.createElement(o.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&&a.createElement("div",{className:"ps-2"},a.createElement(i.C,{type:i.g.Count,data:e.count}))):a.createElement(c.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&&r.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(i.C,{type:i.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={}))},13037:(e,t,n)=>{n.d(t,{b:()=>g});var a=n(32735),r=n(23481),o=n(110),i=n(49985),c=n(65858),l=n(84963),s=n(12324),u=n(42735),d=n(36848),m=n(2284),v=n(54610),f=n(79967),p=n(67453);const y={modalWidth:"v5TkI",banner:"LlPSp",bannerContent:"upY3A",pill:"B7ypp"};var h="specialEventCalendar.eventsListItem";function g(e){var t,n=(0,f.k)(),g=e.getAppLink(e.event.content.id,e.event.name),b=e.event.content.metadata.backgroundColor,E=p.j.createUrl(null===(t=e.event.content.banner)||void 0===t?void 0:t.url,{size:v.h2.Large}),O=!!e.event.endDate,D=e.event.content.status===m.W.ComingSoon,M={actionType:c.Vw.Click,entity:c.py.SpecialEvent,location:e.inPopup?c.LZ.CalendarPopup:c.LZ.CalendarDay},w={topicId:e.event.content.id,eventId:e.event.specialEventId,presentationId:e.presentationId,date:o.O.format(new Date(e.event.startDate),"YYYY-MM-DD"),status:e.event.content.status};return a.createElement("div",{onClick:function(){D&&i.k.logUserAction(w,M)}},a.createElement(d.F,{appLink:!D&&g,className:"".concat(D?"":"cursor-pointer"," text-decoration-none"),onClick:e.onClick,analyticsOptions:M,analyticsData:w},a.createElement("div",{className:"banner rounded-3 position-relative ".concat(y.banner),style:{backgroundColor:b,backgroundImage:"url('".concat(E,"')")}},a.createElement("div",{className:"".concat(y.bannerContent," px-3")},a.createElement("div",{className:"text-white"},D&&a.createElement(l.r,{className:"pe-2 fw-semibold mb-1 rounded-pill justify-content-start ".concat(y.pill)}),O&&a.createElement("div",{className:"mb-1"},s.T.getDisplayDate(e.event.startDate,e.event.endDate)),a.createElement("h2",{className:"h4 clamp-1 text-white text-shadow",title:e.event.name},e.event.name)),a.createElement("div",{className:"flex-shrink-0"},!D&&a.createElement(u.K,{className:"btn btn-outline-dark fw-semibold"},r.T.getPhrase(h,n.xs?"mobileButtonLabel":"buttonLabel")))))),a.createElement("div",{className:"mt-2 mb-3"},e.event.description||e.event.content.description))}},39780:(e,t,n)=>{n.d(t,{N:()=>c});var a=n(97395),r=n(75896),o=n(110),i=n(4594),c={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)}},nextTopicSpecialEvent:function(e,t){var n={presentationId:t,limit:1,from:o.O.format(new Date,"YYYY-MM-DD"),objectType:i.E.Subject};return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/object/".concat(e,"/next-events"),n),publicUrl:a._.urlBuilder("/api/discover/special-events/object/".concat(e,"/next-events"),n),key:"presentation:".concat(t,":events:classification:").concat(e),formatData:function(e){return r.m.first(e)}}}}},74590:(e,t,n)=>{n.d(t,{N:()=>g});var a,r=n(32735),o=n(35242),i=n(20354),c=n(27022),l=n(72639),s=n(31949),u=n(37802),d=n(10144),m=n(86698);function v(e){return v="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},v(e)}function f(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 p(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)?p(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 p(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 y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==v(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===v(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var h=(y(a={},c.t.AU,[l.p.Level_1]),y(a,c.t.US,[l.p.Level_1]),y(a,c.t.UK,[l.p.Level_1]),y(a,c.t.SCOT,[l.p.Level_1]),y(a,c.t.NZ,[]),y(a,c.t.GLOBAL,[]),a);function g(){var e,t=(0,u.r)(null),n=t.hasSpecialEventCalendar,a=t.isLoadingSettings,c=(0,m.y)({redirectOnError:!0}).activePresentation,l=i.a.useBasicFetch(s.N.currentUser()),v=h[null===(e=l.data)||void 0===e?void 0:e.contentRegion],p=d.i.getMappedPresentationLevel(null==c?void 0:c.learningLevel),y=!(null==v?void 0:v.find((function(e){return e.toString()===p.toString()}))),g=!a&&!n,b=f(r.useState(!g&&!y),2),E=b[0],O=b[1],D=f(r.useState(a||!(null==c?void 0:c.id)),2),M=D[0],w=D[1];return r.useEffect((function(){g||y?O(!1):M||O(!0),w(a||!(null==c?void 0:c.id))}),[n,null==c?void 0:c.id,M]),o.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:E,isLoading:M}}},81316:(e,t,n)=>{n.r(t),n.d(t,{CalendarView:()=>Oe});var a=n(32735),r=n(23481),o=n(81886),i=n(110),c=n(3278),l=n(79612),s=n(98758),u=n(14070),d=n(97291),m=n(86698),v=n(30241),f=n(56017),p=n(33192),y=n(80247),h=n(28400),g=n(12324),b=n(79967),E=n(29711),O=n(27867);const D={wrapper:"ID5BX",notCurrentMonth:"KThJz",weekend:"Le3vK"};function M(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 w(e){var t,n,r,o=e.date,c=e.notCurrentMonth,l=(n=a.useState(0),r=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,r)||function(e,t){if(e){if("string"==typeof e)return M(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)?M(e,t):void 0}}(n,r)||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(D.wrapper);(function(e){return 0===i.O.getWeekday(e)||6===i.O.getWeekday(e)})(o)&&(d+=" ".concat(D.weekend)),c&&(d+=" ".concat(D.notCurrentMonth));var m=(null===(t=e.events)||void 0===t?void 0:t.filter((function(t){return i.O.isSame(e.date,t.startDate)})))||[],v=Object.assign(Object.assign({},e),{eventsOnDay:m,sliderStep:s,setSliderStep:u});return a.createElement("td",{className:d},(null==m?void 0:m.length)>0?a.createElement(O.K,{hoverableComponent:E.X,componentProps:v,hoverScale:1.35}):a.createElement(E.X,Object.assign({},v,{isHovering:!1})))}var C=n(36848),k=n(23232),N=n(83345),S=n(99742),Y="specialEvent.eventsEmptyState",A=r.T.encloseNamespace(Y);function L(e){return a.createElement(N.D.Provider,{value:Y},a.createElement(k.u,null,a.createElement(k.u.Image,{src:S.W.EmptyStates.CALENDAR.NO_EVENTS,altText:A("info")}),a.createElement(k.u.Heading,null,a.createElement(N.x,{phrase:"heading"})),a.createElement(k.u.Info,null,a.createElement(N.x,{namespace:Y,phrase:"info"}),a.createElement(C.F,{appLink:e.appLink},a.createElement("span",{className:"text-blue"},A("link"))))))}var I=n(13037);const x={date:"dn7Hd",first:"axdj4"};function T(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 i.O.isBefore(e,t)?-1:0})),a.createElement("div",{className:"py-1"},n.map((function(n,r){return a.createElement("div",{key:n},a.createElement("div",{className:"h4 mt-4 ".concat(x.date," ").concat(0===r?x.first:"")},g.T.getOrdinalDate(n)),t[n].map((function(t){return a.createElement(I.b,{key:t.content.id,getAppLink:function(e,t){return{application:d.O.SUBJECT,action:u.e.Subjects.CLASSIFICATION,args:[e,h.m.slugify(t)]}},event:t,presentationId:e.presentationId})})))})))}const j={header:"xLOrx",thead:"ef_XJ"};function P(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 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}}(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 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 U(e){var t=(0,b.k)(),n=g.T.getEventsInMonth(e.events||[],e.viewingMonth),r=P(a.useState(!1),2),o=r[0],i=r[1],c=P(a.useState(null),2),l=c[0],s=c[1];return t.xs||t.sm||t.md?e.eventsLoaded?(null==n?void 0:n.length)?a.createElement(T,{events:n,presentationId:e.presentationId}):a.createElement(L,{appLink:{application:d.O.CONTENT_UPDATES,action:u.e.ContentUpdates.CONTENT_UPDATES}}):a.createElement("div",{className:"d-flex justify-content-center align-items-center"},a.createElement(y.Z,{as:"div",animation:"border",role:"status"})):a.createElement("table",{className:"user-select-none w-100 mt-3 overflow-hidden rounded-top-lg"},a.createElement("thead",{className:"border border-light-blue ".concat(j.thead)},a.createElement("tr",{className:"fw-semibold bg-light-blue ".concat(j.header)},e.weekDaysHeader.map((function(e){return a.createElement("th",{key:e,className:"px-2 h4"},e)})))),a.createElement("tbody",null,e.weekDays.map((function(t){return a.createElement("tr",{key:t[0].toString()},t.map((function(t){return a.createElement(w,{key:t.toString(),date:t,notCurrentMonth:!!t.notCurrentMonth,events:e.events,monthQuery:e.monthQuery,hasInitialized:o,setHasInitialized:i,presentationId:e.presentationId,hoveredEvent:l,setHoveredEvent:s,getEventsListAppLink:function(){return{application:d.O.CALENDAR,action:u.e.Calendar.SPECIAL_EVENT_LIST,params:Object.assign(Object.assign({},e.monthQuery),{date:t.toString()})}},getTopicAppLink:function(e,t){return{application:d.O.SUBJECT,action:u.e.Subjects.CLASSIFICATION,args:[e,h.m.slugify(t)]}}})})))}))))}var _=n(65858),B=n(11607),F=n(83914),R=n(35223),W=n(53806),z=n.n(W),Z=n(75896),V=new Date("2023-01-01"),$=12;function K(e,t){for(var n=i.O.startOf(e,"month"),a=i.O.getWeekday(n),r=[],o=t?0===a?6:a-1:a,c=t?1:0;c<=o;c++){var l=n,s=i.O.weekday(l,a-c);r.push(Object.assign(s,{notCurrentMonth:!0}))}return r.reverse()}function X(e,t){for(var n=i.O.endOf(e,"month"),a=i.O.getWeekday(n),r=[],o=t?7-(0===a?7:a):7-a,c=1;c<=o;c+=1){var l=i.O.add(n,c,"days");r.push(Object.assign(l,{notCurrentMonth:!0}))}return r}function J(e){var t=i.O.startOf(e,"month");return 1===i.O.getWeekday(t)?t:Z.m.first(K(e,!0))}function Q(e){var t=i.O.endOf(e,"month");return 0===i.O.getWeekday(t)?t:Z.m.last(X(e,!0))}function q(e){return[J(e),Q(e)]}var G=new Date;const ee={actions:"DpKMU",chevron:"IE4Ui",left:"AFmnx",right:"N1Rz_"};var te="specialEventCalendar.calendarNav";function ne(e){var t="previous"===e.action?R.vn.ChevronLeft:R.vn.ChevronRight,n="previous"===e.action?ee.left:ee.right;return a.createElement(B.L,{className:"".concat(ee.chevron," ").concat(n," border border-dark rounded-circle bg-white d-flex align-items-center justify-content-center"),onClick:e.onClick},a.createElement(F.x,{svgName:t,size:F.S.Medium,className:"svg-container d-inline-block ".concat(ee.svg)}))}var ae=new Date;function re(e){var t=(0,b.k)();function n(e){var t=i.O.format(e,"MMMM").toLocaleLowerCase(),n=(new Date).getFullYear(),a=e.getFullYear(),r={application:d.O.CALENDAR,action:u.e.Calendar.CALENDAR_MONTH,args:[t]};return n!==a&&(r.params={year:a}),r}var o,c,l=(o=e.monthDate,c=i.O.diffBetween(i.O.startOf(o,"month"),i.O.startOf(G,"month"),"months"),{showPrev:i.O.isAfter(o,V,"month"),showNext:c<$}),s=l.showPrev,m=l.showNext,v={actionType:_.Vw.Click,entity:_.py.SpecialEvent,location:_.LZ.CalendarNav};function f(e){return i.O.format(e,"YYYY-MM-DD")}return a.createElement("div",{className:"d-flex justify-content-between align-items-center"},a.createElement("h1",{className:"mb-0 h2"},i.O.format(e.monthDate,t.xs?"MMM YYYY":"MMMM YYYY")),a.createElement("div",{className:"d-flex ".concat(ee.actions)},s&&a.createElement(C.F,{appLink:n(i.O.startOf(i.O.subtract(e.monthDate,1,"month"),"month")),className:"d-flex",analyticsOptions:v,analyticsData:{action:"previous",date:f(i.O.startOf(i.O.add(e.monthDate,1,"month"),"month"))}},a.createElement(ne,{action:"previous",onClick:function(){var t=i.O.subtract(e.monthDate,1,"month");e.setViewingMonthDate(t)}})),a.createElement(C.F,{appLink:{application:d.O.CALENDAR,action:u.e.Calendar.CALENDAR},className:"d-flex",analyticsOptions:v,analyticsData:{action:"today",date:f(i.O.startOf(ae,"month"))}},a.createElement(B.L,{className:"".concat(ee.todayWrapper," btn btn-outline-dark fw-semibold"),onClick:function(){i.O.format(ae,"YYYY-MM-DD")!==i.O.format(e.monthDate,"YYYY-MM-DD")&&e.setViewingMonthDate()}},r.T.getPhrase(te,"today"))),m&&a.createElement(C.F,{appLink:n(i.O.startOf(i.O.add(e.monthDate,1,"month"),"month")),className:"d-flex",analyticsOptions:v,analyticsData:{action:"next",date:f(i.O.startOf(i.O.add(e.monthDate,1,"month"),"month"))}},a.createElement(ne,{action:"next",onClick:function(){var t=i.O.add(e.monthDate,1,"month");e.setViewingMonthDate(t)}}))))}var oe="specialEvent.eventsErrorState",ie=r.T.encloseNamespace(oe);function ce(e){return a.createElement(N.D.Provider,{value:oe},a.createElement(k.u,null,a.createElement(k.u.Image,{src:S.W.EmptyStates.CALENDAR.INVALID_DATE}),a.createElement(k.u.Heading,null,a.createElement(N.x,{phrase:"heading"})),a.createElement(k.u.Info,null,a.createElement(N.x,{namespace:oe,phrase:"info"}),a.createElement("br",null),a.createElement(C.F,{appLink:e.appLink},a.createElement("span",{className:"text-blue"},ie("link"))))))}var le=n(20354),se=n(39780);function ue(e){return function(e){if(Array.isArray(e))return ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||me(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 de(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)||me(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 me(e,t){if(e){if("string"==typeof e)return ve(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)?ve(e,t):void 0}}function ve(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 fe(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 pe=new Date;function ye(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],c=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 i.O.format(i.O.weekday(n,e),"ddd")}))}(r),l=a.useRef({}),s=(e=a.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 fe(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)?fe(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.")}()),m=s[0],v=s[1],f=i.O.format(n,"YYYY-MM");a.useEffect((function(){var e=l.current[f];if(e)v(e.weeksTable);else{var t=function(e,t){for(var n=[],a={},r=K(e,t).concat(function(e){for(var t=i.O.daysInMonth(e),n=[],a=1;a<=t;a++){var r=i.O.set(e,"date",a);n.push(Object.assign(r,{notCurrentMonth:!1}))}return n}(e)).concat(X(e,t)),o=function(e){var t=r.slice(c,c+7);t.forEach((function(t,n){a[i.O.format(t,"YYYY-MM-DD")]={row:e,col:n}})),n.push(t),e++,l=e},c=0,l=0;c<r.length;c+=7)o(l);return{datePositionMap:a,weeksTable:n}}(n,r),a=t.weeksTable,o=t.datePositionMap;l.current[f]={weeksTable:a,datePositionMap:o},v(a)}}),[i.O.format(n,"YYYY-MM")]);var p=Z.m.first(Z.m.first(m)),y=Z.m.last(Z.m.last(m));return{weekDaysHeader:c,weekDays:m,monthDate:n,setMonthDate:function(e){if(e){if(f!==i.O.format(e,"YYYY-MM")){var t=i.O.format(e,"MMMM").toLocaleLowerCase(),a=(new Date).getFullYear(),r=n.getFullYear(),c={application:d.O.CALENDAR,action:u.e.Calendar.CALENDAR_MONTH,args:[t]};a!==r&&(c.params={year:r}),o.Q.C$.trigger(c)}}else o.Q.C$.trigger({application:d.O.CALENDAR,action:u.e.Calendar.CALENDAR})},startDate:p,endDate:y}}var he=n(74590),ge=r.T.encloseNamespace("specialEventCalendar.calendarView"),be={whatsNew:{application:d.O.CONTENT_UPDATES,action:u.e.ContentUpdates.CONTENT_UPDATES},forYou:{application:d.O.DASHBOARD,action:u.e.Dashboard.HOME},calendar:{application:d.O.CALENDAR,action:u.e.Calendar.CALENDAR}},Ee=i.O.format(new Date,"MMMM-YYYY").toLocaleLowerCase();function Oe(e){var t=(0,m.y)({redirectOnError:!0}).activePresentation,n=(0,he.N)(),r=n.showCalendar,u=n.isLoading,d=function(e){if(!e)return!0;if(!i.O.formatIsValid(e,"MMMM-YYYY",!0))return!1;var t=z()(e,"MMMM-YYYY").toDate();return i.O.isSame(t,V,"month")||i.O.isAfter(t,V,"month")}(e.month);a.useEffect((function(){u||r||o.Q.C$.trigger(be.forYou,{replace:!0})}),[r,u]);var y,h=(y=e.month)?z()(y,"MMMM-YYYY").toDate():i.O.parseDateString(),g=ye(h),b=g.monthDate,E=g.setMonthDate,O=g.weekDays,D=g.weekDaysHeader,M=g.startDate,w=g.endDate,C=function(e){var t=(0,m.y)({redirectOnError:!0}).activePresentation,n=null==t?void 0:t.id,a=de(q(e),2),r=a[0],o=a[1],c=de(q(i.O.add(e,1,"month")),2),l=c[0],s=c[1],u=de(q(i.O.subtract(e,1,"month")),2),d=u[0],v=u[1],f=le.a.useBasicFetch(r&&o&&n&&se.N.calendarEvents(i.O.format(r,"YYYY-MM-DD"),i.O.format(o,"YYYY-MM-DD"),n)),p=le.a.useBasicFetch(l&&s&&n&&se.N.calendarEvents(i.O.format(l,"YYYY-MM-DD"),i.O.format(s,"YYYY-MM-DD"),n)),y=le.a.useBasicFetch(d&&v&&n&&se.N.calendarEvents(i.O.format(d,"YYYY-MM-DD"),i.O.format(v,"YYYY-MM-DD"),n));return{events:Z.m.uniq([].concat(ue(y.data||[]),ue(f.data||[]),ue(p.data||[])),(function(e){return e.specialEventId})),loaded:f.hasCompleted}}(h),k=C.events,N=C.loaded,S=i.O.format(b,"MMMM YYYY");return(0,l.M)(f.C.getDefaultMetadata({title:S,phraseContext:{phraseHandler:ge,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:p.f.getCanonicalLink({allowedParams:["year"]}),allowIndexing:p.f.allowIndexing(),hrefLang:p.f.getStaticRouteHrefLang(null==t?void 0:t.learningLevel,(function(){return be.calendar}),v.Bg)})),null===e.month||d?u||!(null==t?void 0:t.id)?a.createElement(a.Fragment,null):a.createElement("div",{className:"bg-white px-3"},a.createElement(c.z,{type:s.Yv.Staff,appLinks:be,showCalendar:r,active:"calendar"}),a.createElement(re,{monthDate:b,setViewingMonthDate:E}),a.createElement(U,{weekDays:O,weekDaysHeader:D,events:k,monthQuery:{from:null==M?void 0:M.toString(),to:null==w?void 0:w.toString()},viewingMonth:h,eventsLoaded:N,presentationId:t.id})):a.createElement(ce,{appLink:Object.assign(Object.assign({},be.calendar),{args:[Ee]})})}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4145],{54644:(e,t,n)=>{n.d(t,{v:()=>r});var a=n(97395),r={getContentUpdates:function(e,t,n){return{url:a._.urlBuilder("/api/domain/v1/subjects/content-updates",{from:t,to:n,limit:6,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/presentations/".concat(e,"/content-updates"),{from:t,to:n,limit:6,query:"(videoCollection)"}),key:"content:updates",normalizeOptions:{namespace:"contentupdates"},formatData:function(e){return e.map((function(e){return{id:e.classificationId,videos:e.videos}}))}}},getClassifications:function(e){return{url:a._.urlBuilder("/api/domain/v1/subjects",{id:e,query:"banner"}),publicUrl:a._.urlBuilder("/api/subjects/classifications",{id:e,query:"banner"}),key:"classifications:".concat(e.join(","))}},getClassification:function(e){return{url:"/api/domain/v1/subjects/".concat(e,"?query=banner"),publicUrl:"/api/subjects/classifications/".concat(e,"?query=banner"),key:"classification:".concat(e)}},getClassificationUpdates:function(e,t,n){return{url:a._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/content-updates"),{from:t,to:n,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/classifications/".concat(e,"/content-updates"),{from:t,to:n,query:"(videoCollection)"}),key:"classification:update:".concat(e,":").concat(t,":").concat(n)}},getContentUpdateVideos:function(e,t){return{url:a._.urlBuilder("/api/domain/v1/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),key:"content:update:videos:".concat(e,":").concat(t)}},videos:function(e,t){return{url:"/api/domain/v1/videos?ids=".concat(e.join(","),"&with=(videoCollection)"),key:"videos:by:id:".concat(e.join(",")),success:t}}}},3278:(e,t,n)=>{n.d(t,{z:()=>f});var a=n(32735),r=n(39202),i=n(23481),o=n(65858),l=n(38502),c=n(83345),s=n(98758);const u={pillTab:"bMJM0"};var d="discover.header";function f(e){var t,n,f,p,m,v;if(!e.type)return a.createElement(a.Fragment,null);if(e.type===s.Yv.Learner||e.hasStudentExperience)return a.createElement("div",{className:"py-3"},a.createElement("h1",{className:"h2 mb-0"},a.createElement(c.x,{namespace:d,phrase:"heading"})));var y=[{name:i.T.getPhrase(d,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:i.T.getPhrase(d,"forYou"),url:r.C$.getHref(null===(n=e.appLinks)||void 0===n?void 0:n.forYou)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}},{name:i.T.getPhrase(d,"whatsNew"),appLink:null===(f=e.appLinks)||void 0===f?void 0:f.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:i.T.getPhrase(d,"whatsNew"),url:r.C$.getHref(null===(p=e.appLinks)||void 0===p?void 0:p.whatsNew)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}}];return e.showCalendar&&y.push({name:i.T.getPhrase(d,"calendar"),appLink:null===(m=e.appLinks)||void 0===m?void 0:m.calendar,active:"calendar"===e.active,analyticsData:{name:i.T.getPhrase(d,"calendar"),url:r.C$.getHref(null===(v=e.appLinks)||void 0===v?void 0:v.calendar)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}}),a.createElement("div",{className:"py-3 text-center"},a.createElement(l.r,{tabs:y,className:u.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>s});var a=n(32735),r=n(49985),i=n(36848),o=n(76246),l=n(11607),c=n(87432);function s(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a.createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(c.Z.pillTabSelector)},e.tabs.map((function(e){return a.createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a.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(c.Z.pillItem)},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(o.C,{type:o.g.Count,data:e.count}))):a.createElement(l.L,{className:"".concat(c.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&r.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&a.createElement("div",{className:"ps-2"},a.createElement(o.C,{type:o.g.Count,data:e.count}))))}))))}},74696:(e,t,n)=>{n.d(t,{S:()=>s});var a=n(32735),r=n(68050),i=n(69111),o=n(9977),l=n(79967);const c={partialName:"SicQQ",partialDescription:"dPGMq",partialThumbnail:"vZrnb",partialDragHandle:"iq73R"};function s(e){return a.createElement(a.Fragment,null,Array(e.numVideos).fill(null).map((function(t,n){return a.createElement(u,Object.assign({key:n},e))})))}function u(e){var t=(0,l.k)(),n="sm"===o.O.getSize(t,"md"),s=e.withReordering&&!t.xs;return a.createElement(r.Z,{className:"".concat(n?"":"py-2")},a.createElement(i.Z,Object.assign({},o.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(n?"pb-2 pe-2":"mb-1 px-2")}),a.createElement(r.Z,null,!!s&&a.createElement("div",{className:"d-flex align-items-center justify-content-center col-2"},a.createElement("div",{className:"partial-loading-background ".concat(c.partialDragHandle)})),a.createElement(i.Z,{xs:o.O.getThumbnailColSize(s)},a.createElement("div",{className:"partial-loading-background ".concat(n?"rounded":"rounded-3"," ").concat(c.partialThumbnail)})))),a.createElement(i.Z,Object.assign({},o.O.getDetailsColumns(),{className:n?"pb-2":"px-2"}),a.createElement("div",{className:"partial-loading-background mb-1 ".concat(c.partialName)}),a.createElement("div",{className:"partial-loading-background ".concat(c.partialDescription)})))}s.defaultProps={numVideos:15}},39902:(e,t,n)=>{n.d(t,{f:()=>c});var a=n(32735),r=n(70680),i=n(20354);function o(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}}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}function c(e,t){var n,c,s=(n=a.useState([]),c=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,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(n,c)||o(n,c)||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];a.useEffect((function(){if(null==e?void 0:e.length){var t=function(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(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.")}()}(u);t.push([]),e.forEach((function(e){t.find((function(t){return t.find((function(t){return t===e}))}))||t[t.length-1].push(e)})),d(t.filter((function(e){return e.length})))}}),[e?e.join(","):null]);var f=(0,r.I0)(),p=(0,r.v9)((function(e){return e}));if(a.useEffect((function(){u.forEach((function(e){var n=t(e);i.a.getResponse(p,n.key).shouldFetch&&i.a.fetch(f,n)}))}),[null==u?void 0:u.length]),!(null==u?void 0:u.length))return{items:null,isFetching:!1};var m={},v={};return u.forEach((function(e,n){var a=t(e),r=i.a.getResponse(p,a.key);v[n]=r,r.data&&r.data.forEach((function(e){return m[e.id]=e}))})),{items:Object.keys(v).some((function(e){return!!v[e].data}))?m:null,isFetching:!!Object.keys(v).some((function(e){return v[e].isFetching}))}}},74590:(e,t,n)=>{n.d(t,{N:()=>h});var a,r=n(32735),i=n(35242),o=n(20354),l=n(27022),c=n(72639),s=n(31949),u=n(37802),d=n(10144),f=n(86698);function p(e){return p="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},p(e)}function m(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,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v(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)?v(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 v(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 y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==p(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===p(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=(y(a={},l.t.AU,[c.p.Level_1]),y(a,l.t.US,[c.p.Level_1]),y(a,l.t.UK,[c.p.Level_1]),y(a,l.t.SCOT,[c.p.Level_1]),y(a,l.t.NZ,[]),y(a,l.t.GLOBAL,[]),a);function h(){var e,t=(0,u.r)(null),n=t.hasSpecialEventCalendar,a=t.isLoadingSettings,l=(0,f.y)({redirectOnError:!0}).activePresentation,c=o.a.useBasicFetch(s.N.currentUser()),p=b[null===(e=c.data)||void 0===e?void 0:e.contentRegion],v=d.i.getMappedPresentationLevel(null==l?void 0:l.learningLevel),y=!(null==p?void 0:p.find((function(e){return e.toString()===v.toString()}))),h=!a&&!n,g=m(r.useState(!h&&!y),2),w=g[0],E=g[1],k=m(r.useState(a||!(null==l?void 0:l.id)),2),S=k[0],C=k[1];return r.useEffect((function(){h||y?E(!1):S||E(!0),C(a||!(null==l?void 0:l.id))}),[n,null==l?void 0:l.id,S]),i.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:w,isLoading:S}}},37808:(e,t,n)=>{n.d(t,{aq:()=>v,YW:()=>b});var a=n(32735),r=n(36848),i=n(83345),o=n(80247),l=n(57900),c=n(2948),s=n(10874),u=n(38143),d=n(35223);const f={banner:"B7jhq"};function p(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="contentUpdates.classificationBanner";function v(e){var t,n,v=e.classification,y=e.backgroundUrl,b=e.followed,h=e.follow,g=e.showFollowSpinner,w=(t=(0,c.D)(u.g.AUDIENCE_FILTER,void 0,{storage:l.Z1.SessionStorage}),n=1,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,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return p(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)?p(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.")}())[0];return a.createElement("div",{className:"banner mb-2 d-flex justify-content-between align-items-center rounded ".concat(f.banner),style:{backgroundImage:"url('".concat(y,"')")}},a.createElement(r.F,{className:"text-white text-shadow",appLink:e.getClassificationAppLink(v,w)},a.createElement("h2",{className:"h3 mb-0"},v.name)),e.canFollow&&a.createElement(s.h,{className:"btn follow-btn ".concat(b?"btn-outline-dark":"btn-dark"),svgName:b?d.vn.Check:d.vn.Bell,onClick:function(){return h(v.id,v.name,!b)}},g?a.createElement(o.Z,{as:"span",animation:"border",role:"status",size:"sm"}):a.createElement(i.x,{namespace:m,phrase:b?"unfollow":"follow"})))}var y="playlists.liteClassificationUpdateBreadcrumbs";function b(e){var t=e.classification;return a.createElement(a.Fragment,null,a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb p-0 mb-0"},a.createElement("li",{className:"breadcrumb-item"},a.createElement(r.F,{appLink:e.dashboardAppLink},a.createElement(i.x,{namespace:y,phrase:"dashboard"}))),a.createElement("li",{className:"breadcrumb-item"},a.createElement(r.F,{appLink:e.contentUpdatesAppLink},a.createElement(i.x,{namespace:y,phrase:"whatsNew"}))),a.createElement("li",{className:"breadcrumb-item active","aria-current":"page"},t.name))))}},80004:(e,t,n)=>{n.r(t),n.d(t,{ContentUpdatesView:()=>Q});var a=n(32735),r=n(70680),i=n(53806),o=n(23481),l=n(20354),c=n(49985),s=n(65858),u=n(54644),d=n(3278),f=n(36848),p=n(83345),m=n(51365),v=n(16714),y=n(39151),b=n(1666),h=n(61699),g=n(31949),w=n(69883),E=n(39902),k=n(97037),S=n(22902),C=n(79612),N=n(98758),L=n(14070),j=n(97291),O=n(65986),A=n(41063),T=n(86698),F=n(44110),U=n(97816),x=n(56017),I=n(33192),P=n(74590),D=n(4632),B=n(54610),M=n(67453),_=n(37808),Y="contentUpdates.contentUpdatesView";function V(e){var t=e.classification,n=e.videos,r=e.imageCdnUrl,i=e.showMore,o=e.followed;if(!t)return a.createElement(a.Fragment,null);var l=M.j.createBannerUrl(t.banner,{fallbackBaseUrl:r,fallbackCategoryName:t.name,type:B.__.Banners},{size:B.h2.Medium,resizeType:B.Nq.Cover});return a.createElement("div",{className:"mb-3"},a.createElement(_.aq,{classification:t,backgroundUrl:l,getClassificationAppLink:e.appLinks.getClassificationAppLink,followed:o,follow:e.follow,canFollow:e.canFollow,showFollowSpinner:e.showFollowSpinner}),a.createElement(D.E4,{videos:n,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink,setFavourite:e.setFavourite,canFavourite:e.canFavourite,presentationAudiences:e.audiences}),i&&a.createElement("div",{className:"show-more"},a.createElement(f.F,{className:"info-link",appLink:e.appLinks.getClassificationUpdateAppLink(t)},a.createElement(p.x,{namespace:Y,phrase:"showMore",options:{classificationName:t.name}}))))}var Z=n(74696);const q={partialBanner:"bxaA6"};function R(){return a.createElement(a.Fragment,null,Array(4).fill(null).map((function(e,t){return a.createElement("div",{key:t,className:"mb-3"},a.createElement("div",{className:"partial-loading-background mb-2 ".concat(q.partialBanner)}),a.createElement(Z.S,null),";")})))}function H(e){return H="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},H(e)}function z(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==H(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==H(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===H(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(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 $=5,W="contentUpdates.contentUpdatesView",J=o.T.encloseNamespace(W);function Q(e){var t,n,o,D,B,M,_,Y=(M=a.useState({}),_=2,function(e){if(Array.isArray(e))return e}(M)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(M,_)||function(e,t){if(e){if("string"==typeof e)return G(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)?G(e,t):void 0}}(M,_)||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.")}()),Z=Y[0],q=Y[1],H=(0,r.I0)(),Q=(0,w.Z)(),K=(0,S.T)().hasPermissions,X=K(v.C.FollowSubjects),ee=i().subtract(1,"year").endOf("day").format("YYYY-MM-DD"),te=i().endOf("day").format("YYYY-MM-DD"),ne=l.a.useBasicFetch(y.L.config()),ae=l.a.useBasicFetch(g.N.currentUser()),re=l.a.useBasicFetch((null===(t=ae.data)||void 0===t?void 0:t.isAuthenticated)&&b.h.yearGroups(ae.data.customerId)),ie=(0,T.y)({redirectOnError:!0}).activePresentation;(0,C.M)(x.C.getDefaultMetadata({title:null==ie?void 0:ie.name,phraseContext:{phraseHandler:J,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:I.f.getCanonicalLink(),allowIndexing:I.f.allowIndexing(),hrefLang:I.f.getStaticRouteHrefLang(null==ie?void 0:ie.learningLevel,(function(){return{application:j.O.CONTENT_UPDATES,action:L.e.ContentUpdates.CONTENT_UPDATES}}))}));var oe=u.v.getContentUpdates(null==ie?void 0:ie.id,ee,te),le=l.a.useBasicFetch(ie&&oe),ce=l.a.useBasicFetch(X&&h.o.mySubjectPreferences()),se=(0,F.i)(),ue=[],de=[];le.data&&le.data.forEach((function(e){ue.push(e.id),de=de.concat(e.videos)}));var fe=(0,E.f)(ue,(function(e){return u.v.getClassifications(e)})).items,pe=(0,O._)(O.i.VideoItem);(0,U.V)(de,{hasCurriculumLinks:!0,flightNamespace:null===(n=oe.normalizeOptions)||void 0===n?void 0:n.namespace});var me=(0,k.c)(s.LZ.VideoThumbnail,null===(o=oe.normalizeOptions)||void 0===o?void 0:o.namespace),ve=me.setFavourite,ye=me.canFavourite;function be(e,t,n){q((function(t){return Object.assign(Object.assign({},t),z({},e,!0))}));var a=function(){var a;q((function(t){return Object.assign(Object.assign({},t),z({},e,!1))})),c.k.logUserAction({id:e,name:t},{location:s.LZ.ContentUpdatesClassificationBanner,workflowPhase:s.eu.Complete,descriptor:n?s.DL.On:s.DL.Off,actionType:s.Vw.Follow,entity:s.py.Classification}),Q.success(J(n?"followed":"unfollowed",{classification:null===(a=fe[e])||void 0===a?void 0:a.name,escapeText:!0}))},r=function(){q((function(t){return Object.assign(Object.assign({},t),z({},e,!1))})),Q.error(J("error"))},i=n?h.o.followSubjects([e],a,r):h.o.unfollowSubjects([e],a,r);l.a.fetch(H,i)}var he=(0,P.N)(),ge=he.showCalendar,we=he.isLoading,Ee=!(!(le.hasCompleted&&ne.hasCompleted&&se.hasCompleted)||X&&!ce.hasCompleted||!fe||we),ke=function(e,t){return e&&t?e.map((function(e){return{showMore:e.videos.length>$,classification:t[e.id],videos:e.videos.slice(0,$).map((function(e){return e.classification=t[e.id],e})).filter((function(e){return e}))}})).filter((function(e){return e.classification})):null}(le.data,fe),Se=null!==(B=null===(D=ce.data)||void 0===D?void 0:D.map((function(e){return e.id})))&&void 0!==B?B:[],Ce=K(v.C.ManageSubjectPreferences),Ne=(0,A.b)();return a.createElement(m.M.Provider,{value:pe},a.createElement("div",{className:"bg-white px-3"},!we&&a.createElement(d.z,{type:N.Yv.Staff,appLinks:{forYou:e.appLinks.dashboardAppLink,whatsNew:e.appLinks.whatsNewAppLink,calendar:e.appLinks.calendarAppLink},showCalendar:ge,active:"whatsNew"}),a.createElement("h1",null,a.createElement(p.x,{namespace:W,phrase:"heading"})),(Ce||Ne)&&a.createElement("p",null,Ce&&a.createElement(a.Fragment,null,a.createElement(p.x,{namespace:W,phrase:"onlyRelevant"})," ",a.createElement(f.F,{className:"info-link",appLink:{application:j.O.SETTINGS,action:L.e.Settings.TOPIC_PREFERENCES}},a.createElement(p.x,{namespace:W,phrase:"updatePreferences"}))),Ne&&a.createElement("span",{className:"d-block"},a.createElement(f.F,{className:"info-link",appLink:{application:j.O.SETTINGS,action:L.e.Settings.CONTENT_REVIEW}},a.createElement(p.x,{namespace:W,phrase:"contentReview"})))),Ee?a.createElement(a.Fragment,null,ke.map((function(t,n){var r,i;return a.createElement(V,{key:n,classification:t.classification,videos:t.videos,yearGroups:re.data,imageCdnUrl:ne.data.imageCdnUrl,showMore:t.showMore,appLinks:e.appLinks,followed:Se.includes(null===(r=t.classification)||void 0===r?void 0:r.id),follow:be,showFollowSpinner:Z[null===(i=t.classification)||void 0===i?void 0:i.id],canFollow:X,setFavourite:ve,canFavourite:ye,audiences:se.data})}))):a.createElement(R,null)))}},87821:(e,t,n)=>{n.d(t,{p:()=>r});var a=n(53806),r={userVideoHistory:function(e,t,n,r){var i="video:history",o="{gateway}/v1/users/me/watch-history";return e&&(i+=":".concat(e),o+="?cursor=".concat(e)),{key:i,url:o,formatData:function(e){return{data:e.data.map((function(e){var t=a.utc(e.lastTimeWatched).local().format(),n=a(t).format("YYYY-MM-DD");return Object.assign(Object.assign({},e),{lastTimeWatched:t,lastDateWatched:n})})),pagination:e.pagination}},success:t,error:n,always:r}},videoHistory:function(e,t,n,a,r){var i=e.sort().map((function(e){return"videoId=".concat(e)}));return{key:"video:history:videos:".concat(i.join("&")),url:"{gateway}/v1/videos/history?".concat(i.join("&")),normalizeOptions:{namespace:t},formatData:function(e){return(null==e?void 0:e.length)?e.map((function(e){return{id:e.videoId,lastProgressPoint:e.lastProgressPoint}})):e},success:n,error:a,always:r}}}},41063:(e,t,n)=>{n.d(t,{b:()=>o});var a=n(16714),r=n(22902),i=n(37802);function o(){var e=(0,r.T)().hasPermissions;return(0,i.r)(null).manageVideoAccess&&e(a.C.ManageVideoAccess)}},44110:(e,t,n)=>{n.d(t,{i:()=>o});var a=n(20354),r=n(89454),i=n(86698),o=function(){var e=(0,i.y)({redirectOnError:!0}).activePresentation;return a.a.useBasicFetch(!!e&&r.O.presentationAudiences(e.id))}},97816:(e,t,n)=>{n.d(t,{V:()=>p});var a=n(32735),r=n(20354),i=n(21750),o=n(63419),l=n(31949),c=n(1575),s=n(87821);function u(e){return function(e){if(Array.isArray(e))return d(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 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)||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 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 f={ratings:!1,favourites:!1,watchHistory:!1,hasCurriculumLinks:!1};function p(e){var t,n,d,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=Object.assign(Object.assign({},f),p),v=m.ratings,y=m.favourites,b=m.watchHistory,h=m.hasCurriculumLinks,g=r.a.useBasicFetch(l.N.currentUser()),w=e&&(Array.isArray(e)?e.filter(Boolean).map((function(e){return e.id})):e.data.filter(Boolean).map((function(e){return e.id}))),E=g.data;t=a.useMemo((function(){if(!(null==E?void 0:E.isAuthenticated))return[];var e=[];return v&&(e=[].concat(u(e),[!!(null==w?void 0:w.length)&&c.R.videoRatings(w,p.flightNamespace)])),y&&(e=[].concat(u(e),[!!(null==w?void 0:w.length)&&E&&o.P.isFavourited(E.id,w,p.flightNamespace)])),b&&(e=[].concat(u(e),[!!(null==w?void 0:w.length)&&E&&s.p.videoHistory(w,p.flightNamespace)])),h&&(e=[].concat(u(e),[!!(null==w?void 0:w.length)&&i.x.hasCurriculumLinks(w,null,p.flightNamespace)])),e.filter(Boolean)}),[null==w?void 0:w.length]),n=!!e,d=r.a.useGetFetch(),a.useEffect((function(){n&&t.length&&t.forEach((function(e){d(e)}))}),[t.length])}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);