@clickview/lite 0.103.1 → 0.103.2
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/.vite/manifest.json +271 -271
- package/dist/bundles.json +1 -1
- package/dist/en.json +1 -1
- package/dist/scripts/{igSDXA6g.chunk.js → 1WHinyQW.chunk.js} +2 -2
- package/dist/scripts/{igSDXA6g.chunk.js.map → 1WHinyQW.chunk.js.map} +1 -1
- package/dist/scripts/{kMWvzbRv2.chunk.js → B1ag1ah72.chunk.js} +2 -2
- package/dist/scripts/{kMWvzbRv2.chunk.js.map → B1ag1ah72.chunk.js.map} +1 -1
- package/dist/scripts/{D2_GYzlb.chunk.js → B6Pc3q-u.chunk.js} +2 -2
- package/dist/scripts/{D2_GYzlb.chunk.js.map → B6Pc3q-u.chunk.js.map} +1 -1
- package/dist/scripts/{sCuSDiER2.chunk.js → BPbjSFkC2.chunk.js} +2 -2
- package/dist/scripts/{sCuSDiER2.chunk.js.map → BPbjSFkC2.chunk.js.map} +1 -1
- package/dist/scripts/{CNm_4jj62.chunk.js → BZFomoIH2.chunk.js} +2 -2
- package/dist/scripts/BZFomoIH2.chunk.js.map +1 -0
- package/dist/scripts/{CW_rYB-i2.chunk.js → BazdM9Ah2.chunk.js} +2 -2
- package/dist/scripts/{CW_rYB-i2.chunk.js.map → BazdM9Ah2.chunk.js.map} +1 -1
- package/dist/scripts/{BcPrUEuC2.chunk.js → CNPnPJMp2.chunk.js} +2 -2
- package/dist/scripts/{BcPrUEuC2.chunk.js.map → CNPnPJMp2.chunk.js.map} +1 -1
- package/dist/scripts/{Dd23z1_x2.chunk.js → CUp7_5gE2.chunk.js} +2 -2
- package/dist/scripts/{Dd23z1_x2.chunk.js.map → CUp7_5gE2.chunk.js.map} +1 -1
- package/dist/scripts/{C-zUHAyD.chunk.js → CajcIz6S.chunk.js} +2 -2
- package/dist/scripts/{C-zUHAyD.chunk.js.map → CajcIz6S.chunk.js.map} +1 -1
- package/dist/scripts/{Drx3PvJj.chunk.js → Cc9f2ux0.chunk.js} +2 -2
- package/dist/scripts/{Drx3PvJj.chunk.js.map → Cc9f2ux0.chunk.js.map} +1 -1
- package/dist/scripts/Cj_F4Lv92.chunk.js +2 -0
- package/dist/scripts/{C8l37H7t2.chunk.js.map → Cj_F4Lv92.chunk.js.map} +1 -1
- package/dist/scripts/{DFrz_upP2.chunk.js → CtBGtgb32.chunk.js} +2 -2
- package/dist/scripts/{DFrz_upP2.chunk.js.map → CtBGtgb32.chunk.js.map} +1 -1
- package/dist/scripts/{BpiZZWnJ2.chunk.js → CtWAorP42.chunk.js} +2 -2
- package/dist/scripts/{BpiZZWnJ2.chunk.js.map → CtWAorP42.chunk.js.map} +1 -1
- package/dist/scripts/{C3Qd_bbV2.chunk.js → D8mi6CVp2.chunk.js} +2 -2
- package/dist/scripts/{C3Qd_bbV2.chunk.js.map → D8mi6CVp2.chunk.js.map} +1 -1
- package/dist/scripts/{3K2h5K5-.chunk.js → DJfIirut.chunk.js} +2 -2
- package/dist/scripts/{3K2h5K5-.chunk.js.map → DJfIirut.chunk.js.map} +1 -1
- package/dist/scripts/{Cc63s6rS2.chunk.js → DaaQ5htA2.chunk.js} +2 -2
- package/dist/scripts/{Cc63s6rS2.chunk.js.map → DaaQ5htA2.chunk.js.map} +1 -1
- package/dist/scripts/{CHwPLUZK.chunk.js → DkFP4cXM.chunk.js} +2 -2
- package/dist/scripts/{CHwPLUZK.chunk.js.map → DkFP4cXM.chunk.js.map} +1 -1
- package/dist/scripts/{izXlxhJf.chunk.js → Dzy1nQk7.chunk.js} +2 -2
- package/dist/scripts/{izXlxhJf.chunk.js.map → Dzy1nQk7.chunk.js.map} +1 -1
- package/dist/scripts/{DGy8Ldlr.chunk.js → FIUOppmy.chunk.js} +2 -2
- package/dist/scripts/{DGy8Ldlr.chunk.js.map → FIUOppmy.chunk.js.map} +1 -1
- package/dist/scripts/{CPBvCqVK.chunk.js → H511PXuG.chunk.js} +2 -2
- package/dist/scripts/{CPBvCqVK.chunk.js.map → H511PXuG.chunk.js.map} +1 -1
- package/dist/scripts/{D8Op6EUa2.chunk.js → IYIY9hIU2.chunk.js} +2 -2
- package/dist/scripts/{D8Op6EUa2.chunk.js.map → IYIY9hIU2.chunk.js.map} +1 -1
- package/dist/scripts/{app-BHlllGhO.js → app-DvYKGw_S.js} +3 -3
- package/dist/scripts/{app-BHlllGhO.js.map → app-DvYKGw_S.js.map} +1 -1
- package/dist/scripts/{2HZlmQRs2.chunk.js → lJ6ZVpyv2.chunk.js} +2 -2
- package/dist/scripts/{2HZlmQRs2.chunk.js.map → lJ6ZVpyv2.chunk.js.map} +1 -1
- package/package.json +1 -1
- package/dist/scripts/C8l37H7t2.chunk.js +0 -2
- package/dist/scripts/CNm_4jj62.chunk.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./DAXXjFlN.chunk.js";import{n as e}from"./B785hxeE.chunk.js";import{t}from"./CQyJ7YGa.chunk.js";import{t as n}from"./C2w0pmFW.chunk.js";import{t as r}from"./wrLrTezN.chunk.js";import{u as i}from"./BX0wDJmp.chunk.js";import{t as a}from"./CjA4Q5pm.chunk.js";import{t as o}from"./DTGfiG8Y.chunk.js";import{t as s}from"./ZwDDc8Zd.chunk.js";import{n as c}from"./BRcHS92O2.chunk.js";import{t as l}from"./Tr5-kahg2.chunk.js";import{t as u}from"./BQKcAczf.chunk.js";import{t as d}from"./Delmxf6C.chunk.js";import{t as f}from"./dEqScqMh2.chunk.js";import{t as p}from"./D1EthTiX.chunk.js";import{t as m}from"./DOnmTMfX.chunk.js";import{t as h}from"./DqM363Cd.chunk.js";import{t as g}from"./D7UO1XFN2.chunk.js";import{t as _}from"./nNE51iyg2.chunk.js";import{t as v}from"./
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import"./DAXXjFlN.chunk.js";import{n as e}from"./B785hxeE.chunk.js";import{t}from"./CQyJ7YGa.chunk.js";import{t as n}from"./C2w0pmFW.chunk.js";import{t as r}from"./wrLrTezN.chunk.js";import{u as i}from"./BX0wDJmp.chunk.js";import{t as a}from"./CjA4Q5pm.chunk.js";import{t as o}from"./DTGfiG8Y.chunk.js";import{t as s}from"./ZwDDc8Zd.chunk.js";import{n as c}from"./BRcHS92O2.chunk.js";import{t as l}from"./Tr5-kahg2.chunk.js";import{t as u}from"./BQKcAczf.chunk.js";import{t as d}from"./Delmxf6C.chunk.js";import{t as f}from"./dEqScqMh2.chunk.js";import{t as p}from"./D1EthTiX.chunk.js";import{t as m}from"./DOnmTMfX.chunk.js";import{t as h}from"./DqM363Cd.chunk.js";import{t as g}from"./D7UO1XFN2.chunk.js";import{t as _}from"./nNE51iyg2.chunk.js";import{t as v}from"./CtBGtgb32.chunk.js";import{a as y,n as b,s as x,t as S}from"./CNPnPJMp2.chunk.js";import{t as C}from"./AEt1phMH2.chunk.js";n();var w=h(),T={modalWidth:`_modalWidth_t2uj7_1`,buttons:`_buttons_t2uj7_6`},E=r(),D=`liveSpecialEventList.specialEventListView`,O=t.encloseNamespace(D),k=400,A=300;function j(n){let{activePresentation:r}=s(),{hasPermissions:o}=u(),d=o(e.StudentExperience),p=new Date(n.from),m=new Date(n.to),h=i(r?.id&&v.calendarLivestreams({from:a.format(p,`YYYY-MM-DD`),to:a.format(m,`YYYY-MM-DD`)})),g=h.data?.filter(e=>e.startDate===a.format(new Date(n.date),`YYYY-MM-DD`))||[];function C(e){return d||S.isPastEvent(e)?`pastActionLabel`:`actionLabel`}function j(e){return l.createUrl(e.company.banner?.url,{size:c.Large})}function M(e){return l.createUrl(e.company.logo?.url,{size:c.Small})}return r?.id?(0,E.jsxs)(f,{title:`Events on ${_.getOrdinalDate(n.date)}`,closePopup:n.closePopup,dialogClassName:T.modalWidth,bodyClassName:`p-0`,showLoadingSpinner:!h.data,children:[(0,E.jsx)(w.Scrollbars,{autoHeight:!0,autoHeightMin:A,autoHeightMax:k,children:(0,E.jsx)(`div`,{className:`px-3 pt-2`,children:g.map((e,t)=>(0,E.jsx)(x,{getAppLink:y(n.presentationSlug).event,event:e,onClick:n.closePopup,inPopup:!0,presentationId:r.id,getActionLabel:()=>O(C(e.content)),getBackgroundColor:e=>e.company.metadata?.colour,getBannerUrl:j,getIconUrl:M,getStartTime:S.isSameTime(g,t)?null:S.getStartTime,isPastEvent:S.isPastEvent},e.content.id))})}),(0,E.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center p-3 border-top`,children:[(0,E.jsx)(b,{}),(0,E.jsx)(`button`,{onClick:n.closePopup,className:`btn btn-outline-dark`,children:t.getPhrase(D,`close`)})]})]}):(0,E.jsx)(E.Fragment,{})}var M={modalWidth:`_modalWidth_t2uj7_1`,buttons:`_buttons_t2uj7_6`},N=`specialEventCalendar.eventListPopup`,P=t.encloseNamespace(N),F=400,I=300;function L(e){let{activePresentation:n}=s(),{availablePresentations:r}=m(),o=new Date(e.from),c=new Date(e.to),l=i(n?.id&&C.calendarEvents(a.format(o,`YYYY-MM-DD`),a.format(c,`YYYY-MM-DD`),n.id)),u=new Date(e.date),h=_.getAllEventsForDate(u,l.data||[],o);return n?.id?(0,E.jsxs)(f,{title:`Events on ${_.getOrdinalDate(e.date)}`,closePopup:e.closePopup,dialogClassName:M.modalWidth,bodyClassName:`p-0`,showLoadingSpinner:!l.data,children:[(0,E.jsx)(w.Scrollbars,{autoHeight:!0,autoHeightMin:I,autoHeightMax:F,children:(0,E.jsx)(`div`,{className:`px-3 pt-2`,children:h.map(t=>(0,E.jsx)(x,{getAppLink:(e,t)=>d.getAppLink({...e,name:t},void 0,r),event:t,onClick:e.closePopup,inPopup:!0,presentationId:n.id,getActionLabel:()=>P(`buttonLabel`),getBannerUrl:e=>e.banner?.url},t.content.id))})}),(0,E.jsx)(`div`,{className:`ms-3`,children:(0,E.jsx)(p,{className:M.buttons,children:(0,E.jsx)(p.Cancel,{variant:`outline-dark`,className:`mb-3`,onClick:e.closePopup,text:t.getPhrase(N,`close`)})})})]}):(0,E.jsx)(E.Fragment,{})}var R=g({[o.Subject]:e=>(0,E.jsx)(L,{from:e.from,to:e.to,date:e.date,presentationSlug:e.presentationSlug,closePopup:e.closePopup}),[o.StreamableLearning]:e=>(0,E.jsx)(j,{from:e.from,to:e.to,date:e.date,presentationSlug:e.presentationSlug,closePopup:e.closePopup})});R.displayName=`BaseSpecialEventListView`;export{R as BaseSpecialEventListView};
|
|
2
|
+
//# sourceMappingURL=DJfIirut.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"3K2h5K5-.chunk.js","names":[],"sources":["../../src/apps/calendar/views/special-event-list-view/live-special-event-list/special-event-list-view.module.scss","../../src/apps/calendar/views/special-event-list-view/live-special-event-list/LiveSpecialEventListView.tsx","../../src/apps/calendar/views/special-event-list-view/special-event-list/special-event-list-view.module.scss","../../src/apps/calendar/views/special-event-list-view/special-event-list/SpecialEventListView.tsx","../../src/apps/calendar/views/special-event-list-view/BaseSpecialEventListView.tsx"],"sourcesContent":[":local {\n .modalWidth {\n width: 40rem;\n max-width: 40rem;\n overflow: hidden;\n }\n .buttons {\n width: 40rem;\n }\n}\n","import React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SpecialEventListItem } from 'libs/shared/apps/calendar/components/special-event-list-item/SpecialEventListItem';\nimport { SpecialEventHelper } from 'libs/shared/apps/calendar/utils/SpecialEventHelper';\nimport { TimezoneIndicator } from 'libs/shared/apps/streamable-learning/components/timezone-indicator/TimezoneIndicator';\nimport { Popup } from 'libs/shared/components/popup/Popup';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CalendarEvent, Livestream } from 'libs/shared/interfaces';\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\n\nimport { LivestreamRequests } from 'shared/flight-requests/LivestreamRequests';\nimport { useActivePresentation } from 'shared/hooks/presentations/useActivePresentation';\n\nimport { LiveCalendarUtils } from 'apps/calendar/utils/LiveCalendarUtils';\nimport { getLiveCalendarAppLinks } from 'apps/calendar/views/calendar-view/CalendarViewUtils';\nimport { SpecialEventsViewQueryParams } from 'apps/calendar/views/special-event-list-view/special-event-list/SpecialEventListView';\n\nimport styles from './special-event-list-view.module.scss';\n\nconst namespace = 'liveSpecialEventList.specialEventListView';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst SCROLL_HEIGHT_MAX = 400;\nconst SCROLL_HEIGHT_MIN = 300;\n\nexport function LiveSpecialEventListView(props: SpecialEventsViewQueryParams): JSX.Element {\n const { activePresentation } = useActivePresentation();\n const { hasPermissions } = usePermissions();\n const isStudent = hasPermissions(PermissionName.StudentExperience);\n\n const fromDate = new Date(props.from);\n const toDate = new Date(props.to);\n\n const events = Flight.useBasicFetch<CalendarEvent<Livestream>[]>(activePresentation?.id\n && LivestreamRequests.calendarLivestreams({\n from: DateHelper.format(fromDate, 'YYYY-MM-DD'),\n to: DateHelper.format(toDate, 'YYYY-MM-DD')\n }));\n\n const eventsOnDay = events.data?.filter(\n e => e.startDate === DateHelper.format(new Date(props.date), 'YYYY-MM-DD')\n ) || [];\n\n function getActionLabel(livestream: Livestream): string {\n return isStudent || LiveCalendarUtils.isPastEvent(livestream) ? 'pastActionLabel' : 'actionLabel';\n }\n\n function getBannerUrl(content: Livestream) {\n return ImageHelper.createUrl(content.company.banner?.url, { size: ImageSize.Large });\n }\n\n function getIconUrl(content: Livestream) {\n return ImageHelper.createUrl(content.company.logo?.url, { size: ImageSize.Small });\n }\n\n if (!activePresentation?.id)\n return <></>;\n\n return (\n <Popup\n title={`Events on ${SpecialEventHelper.getOrdinalDate(props.date)}`}\n closePopup={props.closePopup}\n dialogClassName={styles.modalWidth}\n bodyClassName='p-0'\n showLoadingSpinner={!events.data}\n >\n <Scrollbars\n autoHeight\n autoHeightMin={SCROLL_HEIGHT_MIN}\n autoHeightMax={SCROLL_HEIGHT_MAX}\n >\n <div className='px-3 pt-2'>\n {eventsOnDay.map((e, i) => (\n <SpecialEventListItem\n key={e.content.id}\n getAppLink={getLiveCalendarAppLinks(props.presentationSlug).event}\n event={e}\n onClick={props.closePopup}\n inPopup\n presentationId={activePresentation.id}\n getActionLabel={() => getPhrase(getActionLabel(e.content))}\n getBackgroundColor={(content: Livestream) => content.company.metadata?.colour}\n getBannerUrl={getBannerUrl}\n getIconUrl={getIconUrl}\n getStartTime={\n !LiveCalendarUtils.isSameTime(eventsOnDay, i) ?\n LiveCalendarUtils.getStartTime :\n null\n }\n isPastEvent={LiveCalendarUtils.isPastEvent}\n />\n ))}\n </div>\n </Scrollbars>\n <div className='d-flex justify-content-between align-items-center p-3 border-top'>\n <TimezoneIndicator />\n <button\n onClick={props.closePopup}\n className='btn btn-outline-dark'\n >\n {LanguageService.getPhrase(namespace, 'close')}\n </button>\n </div>\n </Popup>\n );\n}\n",":local {\n .modalWidth {\n width: 40rem;\n max-width: 40rem;\n overflow: hidden;\n }\n .buttons {\n width: 40rem;\n }\n}","import React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SpecialEventListItem } from 'libs/shared/apps/calendar/components/special-event-list-item/SpecialEventListItem';\nimport { CalendarRequests } from 'libs/shared/apps/calendar/flight-request/CalendarRequests';\nimport { SpecialEventHelper } from 'libs/shared/apps/calendar/utils/SpecialEventHelper';\nimport { Popup } from 'libs/shared/components/popup/Popup';\nimport { PopupButtons } from 'libs/shared/components/popup/PopupButtons';\nimport { Classification, PopupViewProps } from 'libs/shared/interfaces';\nimport { CalendarEvent } from 'libs/shared/interfaces';\n\nimport { useActivePresentation } from 'shared/hooks/presentations/useActivePresentation';\nimport { useAvailablePresentations } from 'shared/hooks/presentations/useAvailablePresentations';\nimport { ClassificationAppLinkHelper } from 'shared/utils/ClassificationAppLinkHelper';\n\nimport styles from './special-event-list-view.module.scss';\n\nconst namespace = 'specialEventCalendar.eventListPopup';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst SCROLL_HEIGHT_MAX = 400;// in px\nconst SCROLL_HEIGHT_MIN = 300;// in px\n\nexport interface SpecialEventsViewQueryParams extends PopupViewProps {\n from: string;\n to: string;\n date: string;\n presentationSlug: string;\n}\n\nexport function SpecialEventListView(props: SpecialEventsViewQueryParams): JSX.Element {\n const { activePresentation } = useActivePresentation();\n const { availablePresentations } = useAvailablePresentations();\n\n const fromDate = new Date(props.from);\n const toDate = new Date(props.to);\n\n const events = Flight.useBasicFetch<CalendarEvent[]>(activePresentation?.id\n && CalendarRequests.calendarEvents(DateHelper.format(fromDate, 'YYYY-MM-DD'), DateHelper.format(toDate, 'YYYY-MM-DD'), activePresentation.id));\n\n const currentDate = new Date(props.date);\n const eventsOnDay = SpecialEventHelper.getAllEventsForDate(\n currentDate,\n events.data || [],\n fromDate\n );\n\n if (!activePresentation?.id)\n return <></>;\n\n return (\n <Popup\n title={`Events on ${SpecialEventHelper.getOrdinalDate(props.date)}`}\n closePopup={props.closePopup}\n dialogClassName={styles.modalWidth}\n bodyClassName='p-0'\n showLoadingSpinner={!events.data}\n >\n <Scrollbars\n autoHeight\n autoHeightMin={SCROLL_HEIGHT_MIN}\n autoHeightMax={SCROLL_HEIGHT_MAX}\n >\n <div className='px-3 pt-2'>\n {eventsOnDay.map(e => (\n <SpecialEventListItem\n key={e.content.id}\n getAppLink={(content, name) => ClassificationAppLinkHelper.getAppLink(\n { ...content as Classification, name },\n undefined,\n availablePresentations\n )}\n event={e}\n onClick={props.closePopup}\n inPopup\n presentationId={activePresentation.id}\n getActionLabel={() => getPhrase('buttonLabel')}\n getBannerUrl={(classification: Classification) => classification.banner?.url}\n />\n ))}\n </div>\n </Scrollbars>\n <div className='ms-3'>\n <PopupButtons className={styles.buttons}>\n <PopupButtons.Cancel\n variant='outline-dark'\n className='mb-3'\n onClick={props.closePopup}\n text={LanguageService.getPhrase(namespace, 'close')}\n />\n </PopupButtons>\n </div>\n </Popup>\n\n );\n}\n","import React from 'react';\n\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\n\nimport { createPresentationDispatcherView } from 'shared/utils/createPresentationDispatcherView';\n\nimport {\n LiveSpecialEventListView\n} from 'apps/calendar/views/special-event-list-view/live-special-event-list/LiveSpecialEventListView';\nimport {\n SpecialEventListView,\n SpecialEventsViewQueryParams\n} from 'apps/calendar/views/special-event-list-view/special-event-list/SpecialEventListView';\n\nexport const BaseSpecialEventListView = createPresentationDispatcherView<SpecialEventsViewQueryParams>({\n [PresentationType.Subject]: ctx => (\n <SpecialEventListView\n from={ctx.from}\n to={ctx.to}\n date={ctx.date}\n presentationSlug={ctx.presentationSlug}\n closePopup={ctx.closePopup}\n />\n ),\n [PresentationType.StreamableLearning]: ctx => (\n <LiveSpecialEventListView\n from={ctx.from}\n to={ctx.to}\n date={ctx.date}\n presentationSlug={ctx.presentationSlug}\n closePopup={ctx.closePopup}\n />\n )\n});\n\nBaseSpecialEventListView.displayName = 'BaseSpecialEventListView';\n"],"mappings":"g9BC0BM,EAAY,4CACZ,EAAY,EAAgB,iBAAiB,CAAS,EAEtD,EAAoB,IACpB,EAAoB,IAE1B,SAAgB,EAAyB,EAAkD,CACzF,GAAM,CAAE,sBAAuB,EAAsB,EAC/C,CAAE,kBAAmB,EAAe,EACpC,EAAY,EAAe,EAAe,iBAAiB,EAE3D,EAAW,IAAI,KAAK,EAAM,IAAI,EAC9B,EAAS,IAAI,KAAK,EAAM,EAAE,EAE1B,EAAS,EAAkD,GAAoB,IAChF,EAAmB,oBAAoB,CACxC,KAAM,EAAW,OAAO,EAAU,YAAY,EAC9C,GAAI,EAAW,OAAO,EAAQ,YAAY,CAC5C,CAAC,CAAC,EAEE,EAAc,EAAO,MAAM,OAC/B,GAAK,EAAE,YAAc,EAAW,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A,IAAA,CAAC,MAAD,CAAK,UAAU,iBACb,EAAA,EAAA,IAAA,CAAC,EAAD,CAAc,UAAW,EAAO,kBAC9B,EAAA,EAAA,IAAA,CAAC,EAAa,OAAd,CACE,QAAQ,eACR,UAAU,OACV,QAAS,EAAM,WACf,KAAM,EAAgB,UAAU,EAAW,OAAO,CACnD,CAAA,CACW,CAAA,CACX,CAAA,CACA,KA5CA,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CA+Cf,CCrFA,IAAa,EAA2B,EAA+D,EACpG,EAAiB,SAAU,IAC1B,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,KAAM,EAAI,KACV,GAAI,EAAI,GACR,KAAM,EAAI,KACV,iBAAkB,EAAI,iBACtB,WAAY,EAAI,UACjB,CAAA,GAEF,EAAiB,oBAAqB,IACrC,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,KAAM,EAAI,KACV,GAAI,EAAI,GACR,KAAM,EAAI,KACV,iBAAkB,EAAI,iBACtB,WAAY,EAAI,UACjB,CAAA,CAEL,CAAC,EAED,EAAyB,YAAc"}
|
|
1
|
+
{"version":3,"file":"DJfIirut.chunk.js","names":[],"sources":["../../src/apps/calendar/views/special-event-list-view/live-special-event-list/special-event-list-view.module.scss","../../src/apps/calendar/views/special-event-list-view/live-special-event-list/LiveSpecialEventListView.tsx","../../src/apps/calendar/views/special-event-list-view/special-event-list/special-event-list-view.module.scss","../../src/apps/calendar/views/special-event-list-view/special-event-list/SpecialEventListView.tsx","../../src/apps/calendar/views/special-event-list-view/BaseSpecialEventListView.tsx"],"sourcesContent":[":local {\n .modalWidth {\n width: 40rem;\n max-width: 40rem;\n overflow: hidden;\n }\n .buttons {\n width: 40rem;\n }\n}\n","import React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SpecialEventListItem } from 'libs/shared/apps/calendar/components/special-event-list-item/SpecialEventListItem';\nimport { SpecialEventHelper } from 'libs/shared/apps/calendar/utils/SpecialEventHelper';\nimport { TimezoneIndicator } from 'libs/shared/apps/streamable-learning/components/timezone-indicator/TimezoneIndicator';\nimport { Popup } from 'libs/shared/components/popup/Popup';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CalendarEvent, Livestream } from 'libs/shared/interfaces';\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\n\nimport { LivestreamRequests } from 'shared/flight-requests/LivestreamRequests';\nimport { useActivePresentation } from 'shared/hooks/presentations/useActivePresentation';\n\nimport { LiveCalendarUtils } from 'apps/calendar/utils/LiveCalendarUtils';\nimport { getLiveCalendarAppLinks } from 'apps/calendar/views/calendar-view/CalendarViewUtils';\nimport { SpecialEventsViewQueryParams } from 'apps/calendar/views/special-event-list-view/special-event-list/SpecialEventListView';\n\nimport styles from './special-event-list-view.module.scss';\n\nconst namespace = 'liveSpecialEventList.specialEventListView';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst SCROLL_HEIGHT_MAX = 400;\nconst SCROLL_HEIGHT_MIN = 300;\n\nexport function LiveSpecialEventListView(props: SpecialEventsViewQueryParams): JSX.Element {\n const { activePresentation } = useActivePresentation();\n const { hasPermissions } = usePermissions();\n const isStudent = hasPermissions(PermissionName.StudentExperience);\n\n const fromDate = new Date(props.from);\n const toDate = new Date(props.to);\n\n const events = Flight.useBasicFetch<CalendarEvent<Livestream>[]>(activePresentation?.id\n && LivestreamRequests.calendarLivestreams({\n from: DateHelper.format(fromDate, 'YYYY-MM-DD'),\n to: DateHelper.format(toDate, 'YYYY-MM-DD')\n }));\n\n const eventsOnDay = events.data?.filter(\n e => e.startDate === DateHelper.format(new Date(props.date), 'YYYY-MM-DD')\n ) || [];\n\n function getActionLabel(livestream: Livestream): string {\n return isStudent || LiveCalendarUtils.isPastEvent(livestream) ? 'pastActionLabel' : 'actionLabel';\n }\n\n function getBannerUrl(content: Livestream) {\n return ImageHelper.createUrl(content.company.banner?.url, { size: ImageSize.Large });\n }\n\n function getIconUrl(content: Livestream) {\n return ImageHelper.createUrl(content.company.logo?.url, { size: ImageSize.Small });\n }\n\n if (!activePresentation?.id)\n return <></>;\n\n return (\n <Popup\n title={`Events on ${SpecialEventHelper.getOrdinalDate(props.date)}`}\n closePopup={props.closePopup}\n dialogClassName={styles.modalWidth}\n bodyClassName='p-0'\n showLoadingSpinner={!events.data}\n >\n <Scrollbars\n autoHeight\n autoHeightMin={SCROLL_HEIGHT_MIN}\n autoHeightMax={SCROLL_HEIGHT_MAX}\n >\n <div className='px-3 pt-2'>\n {eventsOnDay.map((e, i) => (\n <SpecialEventListItem\n key={e.content.id}\n getAppLink={getLiveCalendarAppLinks(props.presentationSlug).event}\n event={e}\n onClick={props.closePopup}\n inPopup\n presentationId={activePresentation.id}\n getActionLabel={() => getPhrase(getActionLabel(e.content))}\n getBackgroundColor={(content: Livestream) => content.company.metadata?.colour}\n getBannerUrl={getBannerUrl}\n getIconUrl={getIconUrl}\n getStartTime={\n !LiveCalendarUtils.isSameTime(eventsOnDay, i) ?\n LiveCalendarUtils.getStartTime :\n null\n }\n isPastEvent={LiveCalendarUtils.isPastEvent}\n />\n ))}\n </div>\n </Scrollbars>\n <div className='d-flex justify-content-between align-items-center p-3 border-top'>\n <TimezoneIndicator />\n <button\n onClick={props.closePopup}\n className='btn btn-outline-dark'\n >\n {LanguageService.getPhrase(namespace, 'close')}\n </button>\n </div>\n </Popup>\n );\n}\n",":local {\n .modalWidth {\n width: 40rem;\n max-width: 40rem;\n overflow: hidden;\n }\n .buttons {\n width: 40rem;\n }\n}","import React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { SpecialEventListItem } from 'libs/shared/apps/calendar/components/special-event-list-item/SpecialEventListItem';\nimport { CalendarRequests } from 'libs/shared/apps/calendar/flight-request/CalendarRequests';\nimport { SpecialEventHelper } from 'libs/shared/apps/calendar/utils/SpecialEventHelper';\nimport { Popup } from 'libs/shared/components/popup/Popup';\nimport { PopupButtons } from 'libs/shared/components/popup/PopupButtons';\nimport { Classification, PopupViewProps } from 'libs/shared/interfaces';\nimport { CalendarEvent } from 'libs/shared/interfaces';\n\nimport { useActivePresentation } from 'shared/hooks/presentations/useActivePresentation';\nimport { useAvailablePresentations } from 'shared/hooks/presentations/useAvailablePresentations';\nimport { ClassificationAppLinkHelper } from 'shared/utils/ClassificationAppLinkHelper';\n\nimport styles from './special-event-list-view.module.scss';\n\nconst namespace = 'specialEventCalendar.eventListPopup';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst SCROLL_HEIGHT_MAX = 400;// in px\nconst SCROLL_HEIGHT_MIN = 300;// in px\n\nexport interface SpecialEventsViewQueryParams extends PopupViewProps {\n from: string;\n to: string;\n date: string;\n presentationSlug: string;\n}\n\nexport function SpecialEventListView(props: SpecialEventsViewQueryParams): JSX.Element {\n const { activePresentation } = useActivePresentation();\n const { availablePresentations } = useAvailablePresentations();\n\n const fromDate = new Date(props.from);\n const toDate = new Date(props.to);\n\n const events = Flight.useBasicFetch<CalendarEvent[]>(activePresentation?.id\n && CalendarRequests.calendarEvents(DateHelper.format(fromDate, 'YYYY-MM-DD'), DateHelper.format(toDate, 'YYYY-MM-DD'), activePresentation.id));\n\n const currentDate = new Date(props.date);\n const eventsOnDay = SpecialEventHelper.getAllEventsForDate(\n currentDate,\n events.data || [],\n fromDate\n );\n\n if (!activePresentation?.id)\n return <></>;\n\n return (\n <Popup\n title={`Events on ${SpecialEventHelper.getOrdinalDate(props.date)}`}\n closePopup={props.closePopup}\n dialogClassName={styles.modalWidth}\n bodyClassName='p-0'\n showLoadingSpinner={!events.data}\n >\n <Scrollbars\n autoHeight\n autoHeightMin={SCROLL_HEIGHT_MIN}\n autoHeightMax={SCROLL_HEIGHT_MAX}\n >\n <div className='px-3 pt-2'>\n {eventsOnDay.map(e => (\n <SpecialEventListItem\n key={e.content.id}\n getAppLink={(content, name) => ClassificationAppLinkHelper.getAppLink(\n { ...content as Classification, name },\n undefined,\n availablePresentations\n )}\n event={e}\n onClick={props.closePopup}\n inPopup\n presentationId={activePresentation.id}\n getActionLabel={() => getPhrase('buttonLabel')}\n getBannerUrl={(classification: Classification) => classification.banner?.url}\n />\n ))}\n </div>\n </Scrollbars>\n <div className='ms-3'>\n <PopupButtons className={styles.buttons}>\n <PopupButtons.Cancel\n variant='outline-dark'\n className='mb-3'\n onClick={props.closePopup}\n text={LanguageService.getPhrase(namespace, 'close')}\n />\n </PopupButtons>\n </div>\n </Popup>\n\n );\n}\n","import React from 'react';\n\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\n\nimport { createPresentationDispatcherView } from 'shared/utils/createPresentationDispatcherView';\n\nimport {\n LiveSpecialEventListView\n} from 'apps/calendar/views/special-event-list-view/live-special-event-list/LiveSpecialEventListView';\nimport {\n SpecialEventListView,\n SpecialEventsViewQueryParams\n} from 'apps/calendar/views/special-event-list-view/special-event-list/SpecialEventListView';\n\nexport const BaseSpecialEventListView = createPresentationDispatcherView<SpecialEventsViewQueryParams>({\n [PresentationType.Subject]: ctx => (\n <SpecialEventListView\n from={ctx.from}\n to={ctx.to}\n date={ctx.date}\n presentationSlug={ctx.presentationSlug}\n closePopup={ctx.closePopup}\n />\n ),\n [PresentationType.StreamableLearning]: ctx => (\n <LiveSpecialEventListView\n from={ctx.from}\n to={ctx.to}\n date={ctx.date}\n presentationSlug={ctx.presentationSlug}\n closePopup={ctx.closePopup}\n />\n )\n});\n\nBaseSpecialEventListView.displayName = 'BaseSpecialEventListView';\n"],"mappings":"g9BC0BM,EAAY,4CACZ,EAAY,EAAgB,iBAAiB,CAAS,EAEtD,EAAoB,IACpB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hxeE.chunk.js";import{t as a}from"./CQyJ7YGa.chunk.js";import{t as o}from"./C2w0pmFW.chunk.js";import{t as s}from"./wrLrTezN.chunk.js";import{i as c}from"./BYSskNbK.chunk.js";import{p as l,u}from"./BX0wDJmp.chunk.js";import{t as d}from"./C1SLt-ar.chunk.js";import{L as f,U as ee,V as p,l as m,y as h,z as g}from"./NlCAcBdo.chunk.js";import{r as _}from"./CAs8k4pN.chunk.js";import{t as v}from"./DIqO2TFN.chunk.js";import{t as te}from"./RjGIOTdP.chunk.js";import{t as y}from"./DTGfiG8Y.chunk.js";import{a as b,i as x,r as S}from"./Cr6TXzQQ2.chunk.js";import{t as C}from"./oPIkfKWW2.chunk.js";import{n as w,t as T}from"./CmcCVXi32.chunk.js";import{i as ne,t as re}from"./CFPlcqbe2.chunk.js";import{t as E}from"./Dat7ugzw2.chunk.js";import{t as ie}from"./CcDvlSWl2.chunk.js";import{t as D}from"./BQmAa5a22.chunk.js";import{t as ae}from"./xwiwWcv12.chunk.js";import{t as oe}from"./DiDefbcf.chunk.js";import{t as se}from"./Kx-r9MXT.chunk.js";import{t as O}from"./ZwDDc8Zd.chunk.js";import{t as ce}from"./CYEpX3hx.chunk.js";import{t as k}from"./PgzMrOyM.chunk.js";import{t as le}from"./C5rBgkQH.chunk.js";import{n as A,t as j}from"./FbPIRcRM2.chunk.js";import{t as ue}from"./QCFxJYkI2.chunk.js";import{n as M}from"./C0exjRXJ2.chunk.js";import{t as N}from"./Ci5E3nqm2.chunk.js";import{t as P}from"./Vp01-r6R.chunk.js";import{n as de,t as fe}from"./A8xLZrSw.chunk.js";import{t as pe}from"./BQKcAczf.chunk.js";import{t as me}from"./D3WOV5RE.chunk.js";import{t as F}from"./DR9DEoQL.chunk.js";import{n as I}from"./CpFtf-tI2.chunk.js";import{t as L}from"./CXnhm0VS2.chunk.js";import{i as R}from"./C13eKcAl.chunk.js";import{t as z}from"./Delmxf6C.chunk.js";import{t as B}from"./C3q_xvci.chunk.js";import{t as V}from"./CuVGnzB82.chunk.js";import{t as H}from"./DOnmTMfX.chunk.js";import{t as U}from"./DDJBf9pK.chunk.js";import{t as he}from"./QOx-iXyN2.chunk.js";import{t as ge}from"./DMZ_X3HL.chunk.js";import{t as W}from"./DewCxv4i.chunk.js";import{n as _e,t as ve}from"./D0dR5PgK.chunk.js";import{t as ye}from"./DMaQV7L2.chunk.js";import{t as be}from"./NVkf8UeY.chunk.js";import{t as xe}from"./CS5EZKt22.chunk.js";import{t as Se}from"./DmKYYMW8.chunk.js";import{n as Ce,r as we,t as Te}from"./f5U4vAvn2.chunk.js";import{t as Ee}from"./D7UO1XFN2.chunk.js";import{t as De}from"./JPQU1BEu2.chunk.js";import{i as Oe,n as ke,r as Ae,t as je}from"./CQIkxqO12.chunk.js";import{t as Me}from"./BmR4qY-v2.chunk.js";import{i as Ne,t as Pe}from"./C-zUHAyD.chunk.js";import{t as Fe}from"./BwHKYjcz.chunk.js";import{t as Ie}from"./D3GWaNXF2.chunk.js";import{t as Le}from"./jRYY20Im2.chunk.js";import{t as Re}from"./BWZbiv9x2.chunk.js";var G=e(o()),K=s(),q=a.encloseNamespace(`discover.tutorials`);function ze(e){let t=u(C.currentUser()),n=u(t.data?.id&&D.getIsFollowingPlaylist(e.context.playlistId,t.data?.id)),[r,i]=G.useState(null),[a,o]=G.useState(!1),s=L(),c=l();return G.useEffect(()=>{n.hasCompleted&&i(n.data?.isFollowing)},[n.data?.isFollowing]),(0,K.jsx)(re,{name:q(`heading`),contents:ne.Videos,appLink:e.context.appLink,getChildAppLink:e.context.getVideoAppLink,collection:e.context.videos,childComponent:Fe,extraChildComponentProps:{commonVideoProps:e.commonVideoProps,presentationAudiences:e.audiences},showSeeMoreLink:!1,onClose:e.context.dismissPanel,onFollow:async n=>{o(!0);let r=n?D.followPlaylist:D.unfollowPlaylist;await c(r(e.context.playlistId,t.data?.id,()=>{s.success(q(n?`followSuccess`:`unfollowSuccess`)),i(n),o(!1)},()=>{s.error(q(n?`followError`:`unfollowError`)),o(!1)}))},isFollowing:r,showFollowSpinner:a,prefetched:!0})}var J={container:`_container_srwuo_1`,eventLogo:`_eventLogo_srwuo_4`,cvLogoContainer:`_cvLogoContainer_srwuo_8`,cvLogo:`_cvLogo_srwuo_8`,countdownGrid:`_countdownGrid_srwuo_18`,timeBox:`_timeBox_srwuo_28`,timeLabel:`_timeLabel_srwuo_33`},Y=`shared.countdown`;function Be(e){return e.toString().padStart(2,`0`)}function Ve(e){return(0,K.jsxs)(`div`,{className:`bg-white d-flex rounded-3 flex-column align-items-center justify-content-center p-1 ${J.timeBox}`,children:[(0,K.jsx)(`div`,{className:`fs-5 h6 mb-0 flex-grow-1 align-content-center`,children:e.shouldFormat?Be(e.value):e.value}),(0,K.jsx)(`div`,{className:J.timeLabel,children:e.label})]})}function He(e){let[t,n]=G.useState({days:0,hours:0,minutes:0,seconds:0}),[r,i]=G.useState(!1),o=e.imageUrls.logo;if(G.useEffect(()=>{let t=0,r=()=>{let r=new Date().getTime(),a=e.targetDate.getTime();if(r>=e.endDate.getTime()){i(!0),clearInterval(t);return}let o=a-r;o>0?n({days:Math.floor(o/(1e3*60*60*24)),hours:Math.floor(o/(1e3*60*60)%24),minutes:Math.floor(o/1e3/60%60),seconds:Math.floor(o/1e3%60)}):(n({days:0,hours:0,minutes:0,seconds:0}),clearInterval(t))};return r(),t=window.setInterval(r,1e3),()=>clearInterval(t)},[e.targetDate,e.endDate]),r&&!e.hasEnded)return null;let s=[{value:t.days,label:a.getPhrase(Y,`days`),format:!1},{value:t.hours,label:a.getPhrase(Y,`hours`),format:!0},{value:t.minutes,label:a.getPhrase(Y,`minutes`),format:!0},{value:t.seconds,label:a.getPhrase(Y,`seconds`),format:!0}],c=t.days===0&&t.hours===0&&t.minutes===0&&t.seconds===0;return(0,K.jsxs)(`div`,{className:`${J.container} position-relative d-flex flex-md-row justify-content-md-between flex-column justify-content-center align-items-center p-3 mb-4 rounded`,style:{backgroundImage:`url('${e.imageUrls.background}')`},children:[(0,K.jsxs)(`div`,{className:`d-flex flex-column gap-2 align-items-md-start align-items-center w-md-auto w-100`,children:[(0,K.jsxs)(`div`,{className:`d-flex flex-md-row align-items-center flex-column gap-2`,children:[o&&(0,K.jsxs)(`ul`,{className:`list-unstyled d-flex mb-0`,children:[(0,K.jsx)(`li`,{className:`bg-white rounded-circle z-1 ${J.eventLogo} border`,children:(0,K.jsx)(`img`,{src:e.imageUrls.logo,className:`rounded-circle img-fluid`})}),(0,K.jsx)(`li`,{className:`bg-white rounded-circle position-relative ms-n1 ${J.cvLogoContainer} border`,children:(0,K.jsx)(`div`,{className:`position-absolute d-flex align-items-center justify-content-center ${J.cvLogo}`,children:(0,K.jsx)(R,{})})})]}),(0,K.jsx)(`h2`,{className:`h4 text-white text-shadow mb-0 lh-1 my-3 my-md-0`,children:e.hasEnded?a.getPhrase(e.langNamespace,`titleAfter`):c?a.getPhrase(e.langNamespace,`titleStarted`):a.getPhrase(e.langNamespace,`title`)})]}),e.appLink&&(0,K.jsx)(N,{appLink:e.appLink,className:`btn btn-outline-dark w-fit d-none d-md-flex`,onClick:e.onCtaClick,children:a.getPhrase(e.langNamespace,`cta`)})]}),!c&&(0,K.jsx)(`div`,{className:J.countdownGrid,children:s.map(e=>(0,K.jsx)(Ve,{...e,shouldFormat:e.format},e.label))}),e.appLink&&(0,K.jsx)(N,{appLink:e.appLink,className:`btn btn-outline-dark w-fit mt-3 d-md-none d-flex`,onClick:e.onCtaClick,children:a.getPhrase(e.langNamespace,`ctaMobile`)})]})}function Ue(e,t){let n=new Date().getTime();return e.find(e=>{if(!e.allowedPresentationIds.includes(t))return!1;let r=e.showDaysAfter===void 0?e.endDate.getTime():e.endDate.getTime()+e.showDaysAfter*24*60*60*1e3;if(n>=r)return!1;if(e.showDaysBefore!==void 0){let t=new Date(e.targetDate.getTime()-e.showDaysBefore*24*60*60*1e3);if(n<t.getTime())return!1}return!0})}function We(e){let t=Ue(e.events,e.presentationId);if(!t)return null;let n=t.getEventConfig(e.presentationId,e.context);if(!n.imageUrls)return null;let r=new Date().getTime()>=t.endDate.getTime();return(0,K.jsx)(He,{targetDate:t.targetDate,endDate:t.endDate,imageUrls:n.imageUrls,langNamespace:t.langNamespace,appLink:n.appLink,hasEnded:r},t.key)}var Ge=new Date(`2026-07-23T00:00:00Z`),Ke=new Date(`2026-08-02T23:59:59Z`),qe=[v.PresentationIds.SCT_PRIMARY,v.PresentationIds.SCT_SECONDARY,v.PresentationIds.ENG_PRIMARY,v.PresentationIds.ENG_SECONDARY,v.PresentationIds.AU_PRIMARY,v.PresentationIds.AU_SECONDARY].map(e=>e.toString()),Je={[v.PresentationIds.SCT_PRIMARY]:`SCT_PRIMARY`,[v.PresentationIds.SCT_SECONDARY]:`SCT_SECONDARY`,[v.PresentationIds.ENG_PRIMARY]:`ENG_PRIMARY`,[v.PresentationIds.ENG_SECONDARY]:`ENG_SECONDARY`,[v.PresentationIds.AU_PRIMARY]:`AU_PRIMARY`,[v.PresentationIds.AU_SECONDARY]:`AU_SECONDARY`},Ye={key:`commonwealth-games-2026`,targetDate:Ge,endDate:Ke,langNamespace:`shared.commonwealthGameCountdown`,allowedPresentationIds:qe,eventTopicKey:`CommonwealthGameTopics`,showDaysBefore:30,showDaysAfter:7,getEventConfig:(e,t)=>{let n=t.imageUrls.CommonwealthGamesCountdown;if(!n)return{imageUrls:null};let r=Je[e],i=r?n[r]:null;if(!i)return{imageUrls:null};let a=t.getAppLink(e,`CommonwealthGameTopics`);return{imageUrls:{background:i},appLink:a}}},X=`subjects.discoverDashboardEmptyState`,Xe=a.encloseNamespace(X);function Ze(e){let n=e.dashboard?.status===T.Archived;return(0,K.jsxs)(P,{children:[(0,K.jsx)(P.Image,{src:e.imageUrl,altText:Xe(`info`)}),(0,K.jsx)(P.Heading,{children:(0,K.jsx)(I,{namespace:X,phrase:`heading`})}),(0,K.jsx)(P.Info,{children:(0,K.jsx)(I,{namespace:X,phrase:`info`})}),(0,K.jsx)(t,{title:n?a.getPhrase(X,`archivedCtaTooltip`):``,spanHack:!0,children:(0,K.jsx)(P.Cta,{text:a.getPhrase(X,`add`),appLink:e.addWidgetApplink?.(),className:`btn btn-dark`,icon:U,disabled:n})})]})}function Qe(e){let t=d.sortBy(e.dashboard?.widgets,`index`);function n(t,n,r){let i=S.getWidgetParams(n,r,S.getDashboardTargetType(e.dashboard));return e.getWidgetContentRequest(t,i,r,e.presentation)}let i=e.isReadonly&&!t?.length;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ie,{type:e.dashboard?.userType,appLinks:e.headerAppLinks,hasStudentExperience:e.hasPermissions(r.StudentExperience),showCalendar:e.showCalendar,active:`forYou`,isUpselling:e.isUpselling}),e.tutorialVideosContext?.shouldShowPanel&&(0,K.jsx)(`div`,{className:`curated-widget rounded-3 mb-3 mx-n4 px-4 py-3 overflow-hidden`,children:e.tutorialVideosContext.readyToShowPanel?(0,K.jsx)(ze,{commonVideoProps:e.commonVideoProps,audiences:e.audiences,context:e.tutorialVideosContext}):(0,K.jsx)(Ne,{hideDescription:!0})}),e.countdownContext&&e.presentation?.id&&(0,K.jsx)(We,{presentationId:e.presentation.id.toString(),events:[Ye],context:e.countdownContext}),t.map((t,r)=>(0,K.jsx)(Pe,{widgetCollection:w.Discover,id:t.id,getContentRequest:n,audiences:e.audiences,name:t.name,description:t.description,templateId:t.templateId,metadata:t.metadata,presentation:e.presentation,preferences:t.preferences,appLinks:e.widgetAppLinks,isScrollToTargetWidget:e?.scrollToWidgetId===t.id,widgetTypeId:t.widgetId,hasPermissions:e.hasPermissions,hasLocalPermissions:e.hasLocalPermissions,onSubmitFeedback:e.onSubmitFeedback,updatePreferences:e.updatePreferences,lazyLoad:e.lazyLoad,dashboardTarget:w.Discover,widgetIndex:r,isPreviewing:e.isReadonly,settings:{hasTopicDirectories:e.settings?.hasTopicDirectories},availablePresentations:e.availablePresentations,imageCdnUrl:e.commonVideoProps.imageCdnUrl,commonVideoProps:e.commonVideoProps,settingsHash:e.settings,contentType:e.contentType,isUpselling:e.isUpselling,classification:void 0,hasTableOfContents:!1,limitTotalItems:!1,isTertiaryCustomerWithoutExchange:e.isTertiaryCustomerWithoutExchange,seeMoreLink:void 0,onClickRemoveItem:e.removeFromVideoHistory,badgeComponent:null,reminderComponent:e.reminderComponent},t.id)),i&&(0,K.jsx)(Ze,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.widgetAppLinks.widgetWizard})]})}var $e={image:`_image_zjwj4_1`,successSvg:`_successSvg_zjwj4_5`},et=`shared.upsellFooterBanner`,Z=a.encloseNamespace(et),tt={[A.StartCvTrial]:{backgroundClass:`bg-light-orange border border-orange`,imageUrl:k.Upsell.CLICKVIEW_FOOTER_BANNER,headingPhrase:`headingClickView`,descriptionPhrase:`descriptionTrialClickView`,ctaPhrase:`startTrial`},[A.StartLiveTrial]:{backgroundClass:`bg-light-green border border-green`,imageUrl:k.Upsell.CLICKVIEW_LIVE_FOOTER_BANNER,headingPhrase:`headingClickViewLive`,descriptionPhrase:`descriptionTrialClickViewLive`,ctaPhrase:`startTrial`},[A.RequestCvPilot]:{backgroundClass:`bg-light-orange border border-orange`,imageUrl:k.Upsell.CLICKVIEW_FOOTER_BANNER,headingPhrase:`headingClickView`,descriptionPhrase:`descriptionPilot`,ctaPhrase:`requestAccess`},[A.RequestLivePilot]:{backgroundClass:`bg-light-green border border-green`,imageUrl:k.Upsell.CLICKVIEW_LIVE_FOOTER_BANNER,headingPhrase:`headingClickViewLive`,descriptionPhrase:`descriptionPilot`,ctaPhrase:`requestAccess`}};function nt(e){let[t,n]=G.useState(`idle`),r=L(),i=tt[e.upsellKind];async function a(){await e.onClickRequestAccessButton({setRequestState:e=>{e===`error`&&r.error(Z(`errorRequestingAccess`)),n(e)}})}function o(){return Z(t===`loading`?`loading`:t===`success`?`requestSent`:i.ctaPhrase)}let s=o(),c=t===`success`?B:void 0,l=M(`btn btn-dark`,!!c&&$e.successSvg);return(0,K.jsxs)(`div`,{className:M(`d-flex align-items-center justify-content-between overflow-hidden rounded-3 mb-4`,i.backgroundClass),children:[(0,K.jsxs)(`div`,{className:`p-4`,children:[(0,K.jsx)(`h3`,{className:`mb-3`,children:Z(i.headingPhrase)}),(0,K.jsx)(`p`,{className:`mb-4`,children:(0,K.jsx)(I,{namespace:et,phrase:i.descriptionPhrase})}),(0,K.jsx)(V,{analyticsData:{upsellKind:e.upsellKind},analyticsOptions:{actionType:g.Click,entity:m.AppLink,location:h.UpsellBanner,descriptor:f.StartTrial},svg:c,className:l,onClick:a,disabled:[`success`,`loading`].includes(t),children:s})]}),(0,K.jsx)(`img`,{className:M(`d-none d-md-block align-self-end`,$e.image),src:i.imageUrl,alt:`Envelope`})]})}var rt=`all`,it=3,at={[x.ClassificationLatestReleasedVideosV2]:[b.PopoutThumbnailSlidingListLarge],[x.LatestReleasedClassifications]:[b.ThumbnailFixedListSmall],[x.UpcomingLivestreams]:[b.EventIconSlidingList],[x.SpecialEventClassifications]:[b.EventIconSlidingList],[x.CuratedMedia]:[b.PopoutThumbnailSlidingListLarge,b.PopoutThumbnailSlidingListSmall],[x.CuratedCompanies]:[b.CircleLogoSlidingList],[x.Classifications]:[b.CoverFixedPillListXSmall]};function ot(e){let t=at[e.widgetId];return t?t===rt||t.includes(e.templateId):!1}function st(e,t){if(!e||!t)return e;let n=new Set,r=d.sortBy(e.widgets??[],`index`).filter(e=>!ot(e)||n.has(e.widgetId)?!1:(n.add(e.widgetId),!0));return r.length<it?e:{...e,widgets:r}}var Q=`dashboard.dashboard`,ct=a.encloseNamespace(Q);function lt(e){return+_[e?.learningLevel]===_.Level_1?`VariantOne`:`VariantTwo`}var ut={imageUrls:k,getAppLink:(e,t)=>{let n=v[t];if(!n)return null;let r=n[e];return r?z.getAppLink({id:r.id,name:r.name},void 0,null):null}};function dt(e){let t=u(C.currentUser()),{hasLocalPermissions:o,hasPermissions:s}=pe(),d=L(),f=u(o(i.ManageDiscoverPreferences)&&t.data?.isAuthenticated&&ae.customer(t.data.customerId)),_=u(t.data?.isAuthenticated&&ge.libraries()),{activePresentation:v}=O(),{availablePresentations:y}=H(),b=_e();function S(){return b.showBanner?b.teachingLevelPresentation?`switch-level`:`set-level`:null}let{upsellKind:T}=j(),ne=he(),re=me(),E=xe(),{dashboard:D,presentation:k,audiences:A}=be({targetType:w.Discover,queryParams:e.queryParams}),M=l(),N=ie(null),[P]=le(se.AUDIENCE_FILTER,void 0,{storage:c.SessionStorage}),{applinks:I,requestAccessApplink:R,isUpselling:z,onClickRequestAccessButton:B}=De({applinks:ke(te.getAudienceParams(P),t.data,e.presentationSlug,y)}),{commonVideoProps:V}=Me({locationContext:h.Dashboard,hoverToPlay:!z(v),subTextAppLink:z(v)?R:null}),U=lt(k);fe(de.getDiscoverMetadata({content:k,phraseContext:{phraseHandler:ct,titlePhrase:`pageTitle${U}`,descriptionPhrase:`pageDescription${U}`},canonicalLink:F.getCanonicalLink(),allowIndexing:F.allowIndexing(),hrefLang:F.getStaticRouteHrefLang(k?.learningLevel,I.discover)}));async function ye(e){let i=await M(Ce.submitFeedback({type:we.Footer,user:Te.getUserInfo(t.data,f.data),tags:Te.getTags(t.data,ue.Primary,s(r.StudentExperience),[`discover`,`in product feedback`])},{reaction:e.type,feedback:e.content,location:`Discover Footer`,presentationName:k.description,presentationId:k.id,dashboardName:D.data.name,dashboardId:D.data.id,currentPageUrl:n.GetCurrentUrl()}));return ce.logUserAction({feedbackType:e.type,content:e.content,presentationId:k.id,dashboardId:D.data.id},{actionType:g.Submit,location:h.DiscoverFooter,entity:m.Feedback,workflowPhase:ee.Complete}),i}async function Ee(e,t,n,r){if(r===x.ContinueWatching)try{await M(Le.removeFromHistory(e,[`widget:${n}`])),d.success(a.getPhrase(Q,`removeFromHistorySuccess`)),ce.logUserAction({id:e,name:t,widgetId:n},{entity:m.Video,actionType:g.Click,descriptor:p.RemoveFromWatchHistory,location:h.SlidingListItem})}catch{d.error(a.getPhrase(Q,`removeFromHistoryError`,{name:t}))}}async function Oe(e,n,r,i){let a=i.filter(e=>!e.hidden&&r.find(t=>t.id===e.id).hidden),o=i.filter(e=>e.hidden?!r.find(t=>t.id===e.id).hidden:!1);return a?.length&&await M(oe.followSubjects(a.map(e=>e.id))),o?.length&&await M(oe.unfollowSubjects(o.map(e=>e.id))),M(W.updateWidgetPreferences(e,i.map(e=>({id:e.id,index:e.index})),t.data))}return(0,K.jsxs)(`div`,{className:`bg-white px-4`,children:[(0,K.jsx)(Qe,{dashboard:st(D.data,z(v)),widgetAppLinks:I,headerAppLinks:je(k?.vanitySlug??null),presentation:k,getWidgetContentRequest:(e,n,r,i)=>{let{hasTwig:a,hasTigtag:o}=Se.hasTwigOrTigtag(_.data,t.data);return W.dashboardWidgetContent(e,n,r,i,{hideTigTag:!o,hideTwig:!a})},audiences:A.data,updatePreferences:Oe,hasPermissions:s,hasLocalPermissions:o,onSubmitFeedback:s(r.CanSubmitFeedback)&&ye,removeFromVideoHistory:Ee,lazyLoad:!F.isBot(),showCalendar:!1,settings:N,availablePresentations:y,isTertiaryCustomerWithoutExchange:ne&&!re?.hasProduct(ue.Exchange),commonVideoProps:V,countdownContext:ut,tutorialVideosContext:z(v)?null:E,isUpselling:z(v),reminderComponent:(0,K.jsx)(ve,{type:S(),className:`mb-2`,setLevel:b.teachingLevelPresentation?.name,currLevel:v?.name})}),z(v)&&(0,K.jsx)(nt,{upsellKind:T,onClickRequestAccessButton:B})]})}var $=`streamable.dashboardEmptyState`,ft=a.encloseNamespace($);function pt(e){let n=e.dashboard?.status===T.Archived;return(0,K.jsxs)(P,{children:[(0,K.jsx)(P.Image,{src:e.imageUrl,altText:ft(`info`)}),(0,K.jsx)(P.Heading,{children:(0,K.jsx)(I,{namespace:$,phrase:`heading`})}),(0,K.jsx)(P.Info,{children:(0,K.jsx)(I,{namespace:$,phrase:`info`})}),(0,K.jsx)(t,{title:n?a.getPhrase($,`archivedCtaTooltip`):``,spanHack:!0,children:(0,K.jsx)(P.Cta,{text:a.getPhrase($,`add`),appLink:e.addWidgetApplink?.(),className:`btn btn-dark`,icon:U,disabled:n})})]})}function mt(e){let t=d.sortBy(e.dashboard?.widgets,`index`),{hasPermissions:n,hasLocalPermissions:r}=pe();function i(t,n,r){let i=S.getWidgetParams(n,r,S.getDashboardTargetType(e.dashboard));return e.getWidgetContentRequest(t,i,r)}let a=e.isReadonly&&!t?.length;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Re,{active:`discover`,appLinks:e.headerAppLinks,isUpselling:e.isUpselling}),e.tutorialVideosContext?.shouldShowPanel&&(0,K.jsx)(`div`,{className:`curated-widget rounded-3 mb-3 mx-n4 px-4 py-3 overflow-hidden`,children:e.tutorialVideosContext.readyToShowPanel?(0,K.jsx)(ze,{commonVideoProps:e.commonVideoProps,audiences:e.audiences,context:e.tutorialVideosContext}):(0,K.jsx)(Ne,{hideDescription:!0})}),t.map((t,a)=>(0,K.jsx)(Pe,{widgetCollection:w.Discover,id:t.id,getContentRequest:i,audiences:e.audiences,name:t.name,description:t.description,templateId:t.templateId,metadata:t.metadata,presentation:e.presentation,appLinks:e.widgetAppLinks,isScrollToTargetWidget:e?.scrollToWidgetId===t.id,widgetTypeId:t.widgetId,lazyLoad:e.lazyLoad,dashboardTarget:w.Discover,widgetIndex:a,isPreviewing:e.isReadonly,contentType:E.Livestream,preferences:t.preferences,hasPermissions:n,hasLocalPermissions:r,isTertiaryCustomerWithoutExchange:!1,preventPopout:!0,imageCdnUrl:e.commonVideoProps.imageCdnUrl,commonVideoProps:e.commonVideoProps,isUpselling:e.isUpselling,availablePresentations:void 0,classification:void 0,hasTableOfContents:void 0,onSubmitFeedback:void 0,settings:void 0,updatePreferences:void 0,seeMoreLink:void 0,onClickRemoveItem:void 0,badgeComponent:void 0},t.id)),a&&(0,K.jsx)(pt,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.widgetAppLinks.widgetWizard})]})}var ht=a.encloseNamespace(`liveDiscover.discover`);function gt(e){let t=u(C.currentUser()),{availablePresentations:n}=H(),{activePresentation:r}=O(),[i]=le(se.AUDIENCE_FILTER,void 0,{storage:c.SessionStorage}),{upsellKind:a}=j(),{applinks:o,requestAccessApplink:s,isUpselling:l,onClickRequestAccessButton:d}=De({applinks:Ae(te.getAudienceParams(i),t.data,e.presentationSlug,n)}),{commonVideoProps:f}=Me({locationContext:h.Dashboard,hoverToPlay:!l(r),subTextAppLink:l(r)?s:null}),ee=xe(`live`),{dashboard:p,presentation:m}=be({targetType:w.Discover,queryParams:e.queryParams}),g=u(m&&ye.presentationAudiences(y.StreamableLearning,m.id));return fe(de.getDiscoverMetadata({content:m,phraseContext:{phraseHandler:ht,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`},canonicalLink:F.getCanonicalLink(),allowIndexing:!0})),p.hasCompleted&&m&&g.hasCompleted?(0,K.jsxs)(`div`,{className:`bg-white px-4`,children:[(0,K.jsx)(mt,{dashboard:st(p.data,l(r)),widgetAppLinks:o,headerAppLinks:Oe(e.presentationSlug),presentation:m,getWidgetContentRequest:W.dashboardWidgetContent,audiences:g.data,lazyLoad:!F.isBot(),commonVideoProps:f,tutorialVideosContext:l(r)?null:ee,isUpselling:l(r)}),l(r)&&(0,K.jsx)(nt,{upsellKind:a,onClickRequestAccessButton:d})]}):(0,K.jsx)(K.Fragment,{})}var _t=Ee({[y.Subject]:e=>(0,K.jsx)(dt,{presentationSlug:e.presentationSlug,queryParams:e.queryParams}),[y.StreamableLearning]:e=>(0,K.jsx)(gt,{presentationSlug:e.presentationSlug,queryParams:e.queryParams})});_t.displayName=`BaseDiscoverView`;export{_t as BaseDiscoverView};
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{o as e}from"./DAXXjFlN.chunk.js";import{r as t}from"./D8uRDrkd.chunk.js";import{x as n}from"./BftnFbcr.chunk.js";import{n as r,t as i}from"./B785hxeE.chunk.js";import{t as a}from"./CQyJ7YGa.chunk.js";import{t as o}from"./C2w0pmFW.chunk.js";import{t as s}from"./wrLrTezN.chunk.js";import{i as c}from"./BYSskNbK.chunk.js";import{p as l,u}from"./BX0wDJmp.chunk.js";import{t as d}from"./C1SLt-ar.chunk.js";import{L as f,U as ee,V as p,l as m,y as h,z as g}from"./NlCAcBdo.chunk.js";import{r as _}from"./CAs8k4pN.chunk.js";import{t as v}from"./DIqO2TFN.chunk.js";import{t as te}from"./RjGIOTdP.chunk.js";import{t as y}from"./DTGfiG8Y.chunk.js";import{a as b,i as x,r as S}from"./Cr6TXzQQ2.chunk.js";import{t as C}from"./oPIkfKWW2.chunk.js";import{n as w,t as T}from"./CmcCVXi32.chunk.js";import{i as ne,t as re}from"./CFPlcqbe2.chunk.js";import{t as E}from"./Dat7ugzw2.chunk.js";import{t as ie}from"./CcDvlSWl2.chunk.js";import{t as D}from"./BQmAa5a22.chunk.js";import{t as ae}from"./xwiwWcv12.chunk.js";import{t as oe}from"./DiDefbcf.chunk.js";import{t as se}from"./Kx-r9MXT.chunk.js";import{t as O}from"./ZwDDc8Zd.chunk.js";import{t as ce}from"./CYEpX3hx.chunk.js";import{t as k}from"./PgzMrOyM.chunk.js";import{t as le}from"./C5rBgkQH.chunk.js";import{n as A,t as j}from"./FbPIRcRM2.chunk.js";import{t as ue}from"./QCFxJYkI2.chunk.js";import{n as M}from"./C0exjRXJ2.chunk.js";import{t as N}from"./Ci5E3nqm2.chunk.js";import{t as P}from"./Vp01-r6R.chunk.js";import{n as de,t as fe}from"./A8xLZrSw.chunk.js";import{t as pe}from"./BQKcAczf.chunk.js";import{t as me}from"./D3WOV5RE.chunk.js";import{t as F}from"./DR9DEoQL.chunk.js";import{n as I}from"./CpFtf-tI2.chunk.js";import{t as L}from"./CXnhm0VS2.chunk.js";import{i as R}from"./C13eKcAl.chunk.js";import{t as z}from"./Delmxf6C.chunk.js";import{t as B}from"./C3q_xvci.chunk.js";import{t as V}from"./CuVGnzB82.chunk.js";import{t as H}from"./DOnmTMfX.chunk.js";import{t as U}from"./DDJBf9pK.chunk.js";import{t as he}from"./QOx-iXyN2.chunk.js";import{t as ge}from"./DMZ_X3HL.chunk.js";import{t as W}from"./DewCxv4i.chunk.js";import{n as _e,t as ve}from"./D0dR5PgK.chunk.js";import{t as ye}from"./DMaQV7L2.chunk.js";import{t as be}from"./NVkf8UeY.chunk.js";import{t as xe}from"./CS5EZKt22.chunk.js";import{t as Se}from"./DmKYYMW8.chunk.js";import{n as Ce,r as we,t as Te}from"./f5U4vAvn2.chunk.js";import{t as Ee}from"./D7UO1XFN2.chunk.js";import{t as De}from"./JPQU1BEu2.chunk.js";import{i as Oe,n as ke,r as Ae,t as je}from"./CQIkxqO12.chunk.js";import{t as Me}from"./BmR4qY-v2.chunk.js";import{i as Ne,t as Pe}from"./CajcIz6S.chunk.js";import{t as Fe}from"./BwHKYjcz.chunk.js";import{t as Ie}from"./D3GWaNXF2.chunk.js";import{t as Le}from"./jRYY20Im2.chunk.js";import{t as Re}from"./BWZbiv9x2.chunk.js";var G=e(o()),K=s(),q=a.encloseNamespace(`discover.tutorials`);function ze(e){let t=u(C.currentUser()),n=u(t.data?.id&&D.getIsFollowingPlaylist(e.context.playlistId,t.data?.id)),[r,i]=G.useState(null),[a,o]=G.useState(!1),s=L(),c=l();return G.useEffect(()=>{n.hasCompleted&&i(n.data?.isFollowing)},[n.data?.isFollowing]),(0,K.jsx)(re,{name:q(`heading`),contents:ne.Videos,appLink:e.context.appLink,getChildAppLink:e.context.getVideoAppLink,collection:e.context.videos,childComponent:Fe,extraChildComponentProps:{commonVideoProps:e.commonVideoProps,presentationAudiences:e.audiences},showSeeMoreLink:!1,onClose:e.context.dismissPanel,onFollow:async n=>{o(!0);let r=n?D.followPlaylist:D.unfollowPlaylist;await c(r(e.context.playlistId,t.data?.id,()=>{s.success(q(n?`followSuccess`:`unfollowSuccess`)),i(n),o(!1)},()=>{s.error(q(n?`followError`:`unfollowError`)),o(!1)}))},isFollowing:r,showFollowSpinner:a,prefetched:!0})}var J={container:`_container_srwuo_1`,eventLogo:`_eventLogo_srwuo_4`,cvLogoContainer:`_cvLogoContainer_srwuo_8`,cvLogo:`_cvLogo_srwuo_8`,countdownGrid:`_countdownGrid_srwuo_18`,timeBox:`_timeBox_srwuo_28`,timeLabel:`_timeLabel_srwuo_33`},Y=`shared.countdown`;function Be(e){return e.toString().padStart(2,`0`)}function Ve(e){return(0,K.jsxs)(`div`,{className:`bg-white d-flex rounded-3 flex-column align-items-center justify-content-center p-1 ${J.timeBox}`,children:[(0,K.jsx)(`div`,{className:`fs-5 h6 mb-0 flex-grow-1 align-content-center`,children:e.shouldFormat?Be(e.value):e.value}),(0,K.jsx)(`div`,{className:J.timeLabel,children:e.label})]})}function He(e){let[t,n]=G.useState({days:0,hours:0,minutes:0,seconds:0}),[r,i]=G.useState(!1),o=e.imageUrls.logo;if(G.useEffect(()=>{let t=0,r=()=>{let r=new Date().getTime(),a=e.targetDate.getTime();if(r>=e.endDate.getTime()){i(!0),clearInterval(t);return}let o=a-r;o>0?n({days:Math.floor(o/(1e3*60*60*24)),hours:Math.floor(o/(1e3*60*60)%24),minutes:Math.floor(o/1e3/60%60),seconds:Math.floor(o/1e3%60)}):(n({days:0,hours:0,minutes:0,seconds:0}),clearInterval(t))};return r(),t=window.setInterval(r,1e3),()=>clearInterval(t)},[e.targetDate,e.endDate]),r&&!e.hasEnded)return null;let s=[{value:t.days,label:a.getPhrase(Y,`days`),format:!1},{value:t.hours,label:a.getPhrase(Y,`hours`),format:!0},{value:t.minutes,label:a.getPhrase(Y,`minutes`),format:!0},{value:t.seconds,label:a.getPhrase(Y,`seconds`),format:!0}],c=t.days===0&&t.hours===0&&t.minutes===0&&t.seconds===0;return(0,K.jsxs)(`div`,{className:`${J.container} position-relative d-flex flex-md-row justify-content-md-between flex-column justify-content-center align-items-center p-3 mb-4 rounded`,style:{backgroundImage:`url('${e.imageUrls.background}')`},children:[(0,K.jsxs)(`div`,{className:`d-flex flex-column gap-2 align-items-md-start align-items-center w-md-auto w-100`,children:[(0,K.jsxs)(`div`,{className:`d-flex flex-md-row align-items-center flex-column gap-2`,children:[o&&(0,K.jsxs)(`ul`,{className:`list-unstyled d-flex mb-0`,children:[(0,K.jsx)(`li`,{className:`bg-white rounded-circle z-1 ${J.eventLogo} border`,children:(0,K.jsx)(`img`,{src:e.imageUrls.logo,className:`rounded-circle img-fluid`})}),(0,K.jsx)(`li`,{className:`bg-white rounded-circle position-relative ms-n1 ${J.cvLogoContainer} border`,children:(0,K.jsx)(`div`,{className:`position-absolute d-flex align-items-center justify-content-center ${J.cvLogo}`,children:(0,K.jsx)(R,{})})})]}),(0,K.jsx)(`h2`,{className:`h4 text-white text-shadow mb-0 lh-1 my-3 my-md-0`,children:e.hasEnded?a.getPhrase(e.langNamespace,`titleAfter`):c?a.getPhrase(e.langNamespace,`titleStarted`):a.getPhrase(e.langNamespace,`title`)})]}),e.appLink&&(0,K.jsx)(N,{appLink:e.appLink,className:`btn btn-outline-dark w-fit d-none d-md-flex`,onClick:e.onCtaClick,children:a.getPhrase(e.langNamespace,`cta`)})]}),!c&&(0,K.jsx)(`div`,{className:J.countdownGrid,children:s.map(e=>(0,K.jsx)(Ve,{...e,shouldFormat:e.format},e.label))}),e.appLink&&(0,K.jsx)(N,{appLink:e.appLink,className:`btn btn-outline-dark w-fit mt-3 d-md-none d-flex`,onClick:e.onCtaClick,children:a.getPhrase(e.langNamespace,`ctaMobile`)})]})}function Ue(e,t){let n=new Date().getTime();return e.find(e=>{if(!e.allowedPresentationIds.includes(t))return!1;let r=e.showDaysAfter===void 0?e.endDate.getTime():e.endDate.getTime()+e.showDaysAfter*24*60*60*1e3;if(n>=r)return!1;if(e.showDaysBefore!==void 0){let t=new Date(e.targetDate.getTime()-e.showDaysBefore*24*60*60*1e3);if(n<t.getTime())return!1}return!0})}function We(e){let t=Ue(e.events,e.presentationId);if(!t)return null;let n=t.getEventConfig(e.presentationId,e.context);if(!n.imageUrls)return null;let r=new Date().getTime()>=t.endDate.getTime();return(0,K.jsx)(He,{targetDate:t.targetDate,endDate:t.endDate,imageUrls:n.imageUrls,langNamespace:t.langNamespace,appLink:n.appLink,hasEnded:r},t.key)}var Ge=new Date(`2026-07-23T00:00:00Z`),Ke=new Date(`2026-08-02T23:59:59Z`),qe=[v.PresentationIds.SCT_PRIMARY,v.PresentationIds.SCT_SECONDARY,v.PresentationIds.ENG_PRIMARY,v.PresentationIds.ENG_SECONDARY,v.PresentationIds.AU_PRIMARY,v.PresentationIds.AU_SECONDARY].map(e=>e.toString()),Je={[v.PresentationIds.SCT_PRIMARY]:`SCT_PRIMARY`,[v.PresentationIds.SCT_SECONDARY]:`SCT_SECONDARY`,[v.PresentationIds.ENG_PRIMARY]:`ENG_PRIMARY`,[v.PresentationIds.ENG_SECONDARY]:`ENG_SECONDARY`,[v.PresentationIds.AU_PRIMARY]:`AU_PRIMARY`,[v.PresentationIds.AU_SECONDARY]:`AU_SECONDARY`},Ye={key:`commonwealth-games-2026`,targetDate:Ge,endDate:Ke,langNamespace:`shared.commonwealthGameCountdown`,allowedPresentationIds:qe,eventTopicKey:`CommonwealthGameTopics`,showDaysBefore:30,showDaysAfter:7,getEventConfig:(e,t)=>{let n=t.imageUrls.CommonwealthGamesCountdown;if(!n)return{imageUrls:null};let r=Je[e],i=r?n[r]:null;if(!i)return{imageUrls:null};let a=t.getAppLink(e,`CommonwealthGameTopics`);return{imageUrls:{background:i},appLink:a}}},X=`subjects.discoverDashboardEmptyState`,Xe=a.encloseNamespace(X);function Ze(e){let n=e.dashboard?.status===T.Archived;return(0,K.jsxs)(P,{children:[(0,K.jsx)(P.Image,{src:e.imageUrl,altText:Xe(`info`)}),(0,K.jsx)(P.Heading,{children:(0,K.jsx)(I,{namespace:X,phrase:`heading`})}),(0,K.jsx)(P.Info,{children:(0,K.jsx)(I,{namespace:X,phrase:`info`})}),(0,K.jsx)(t,{title:n?a.getPhrase(X,`archivedCtaTooltip`):``,spanHack:!0,children:(0,K.jsx)(P.Cta,{text:a.getPhrase(X,`add`),appLink:e.addWidgetApplink?.(),className:`btn btn-dark`,icon:U,disabled:n})})]})}function Qe(e){let t=d.sortBy(e.dashboard?.widgets,`index`);function n(t,n,r){let i=S.getWidgetParams(n,r,S.getDashboardTargetType(e.dashboard));return e.getWidgetContentRequest(t,i,r,e.presentation)}let i=e.isReadonly&&!t?.length;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ie,{type:e.dashboard?.userType,appLinks:e.headerAppLinks,hasStudentExperience:e.hasPermissions(r.StudentExperience),showCalendar:e.showCalendar,active:`forYou`,isUpselling:e.isUpselling}),e.tutorialVideosContext?.shouldShowPanel&&(0,K.jsx)(`div`,{className:`curated-widget rounded-3 mb-3 mx-n4 px-4 py-3 overflow-hidden`,children:e.tutorialVideosContext.readyToShowPanel?(0,K.jsx)(ze,{commonVideoProps:e.commonVideoProps,audiences:e.audiences,context:e.tutorialVideosContext}):(0,K.jsx)(Ne,{hideDescription:!0})}),e.countdownContext&&e.presentation?.id&&(0,K.jsx)(We,{presentationId:e.presentation.id.toString(),events:[Ye],context:e.countdownContext}),t.map((t,r)=>(0,K.jsx)(Pe,{widgetCollection:w.Discover,id:t.id,getContentRequest:n,audiences:e.audiences,name:t.name,description:t.description,templateId:t.templateId,metadata:t.metadata,presentation:e.presentation,preferences:t.preferences,appLinks:e.widgetAppLinks,isScrollToTargetWidget:e?.scrollToWidgetId===t.id,widgetTypeId:t.widgetId,hasPermissions:e.hasPermissions,hasLocalPermissions:e.hasLocalPermissions,onSubmitFeedback:e.onSubmitFeedback,updatePreferences:e.updatePreferences,lazyLoad:e.lazyLoad,dashboardTarget:w.Discover,widgetIndex:r,isPreviewing:e.isReadonly,settings:{hasTopicDirectories:e.settings?.hasTopicDirectories},availablePresentations:e.availablePresentations,imageCdnUrl:e.commonVideoProps.imageCdnUrl,commonVideoProps:e.commonVideoProps,settingsHash:e.settings,contentType:e.contentType,isUpselling:e.isUpselling,classification:void 0,hasTableOfContents:!1,limitTotalItems:!1,isTertiaryCustomerWithoutExchange:e.isTertiaryCustomerWithoutExchange,seeMoreLink:void 0,onClickRemoveItem:e.removeFromVideoHistory,badgeComponent:null,reminderComponent:e.reminderComponent},t.id)),i&&(0,K.jsx)(Ze,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.widgetAppLinks.widgetWizard})]})}var $e={image:`_image_zjwj4_1`,successSvg:`_successSvg_zjwj4_5`},et=`shared.upsellFooterBanner`,Z=a.encloseNamespace(et),tt={[A.StartCvTrial]:{backgroundClass:`bg-light-orange border border-orange`,imageUrl:k.Upsell.CLICKVIEW_FOOTER_BANNER,headingPhrase:`headingClickView`,descriptionPhrase:`descriptionTrialClickView`,ctaPhrase:`startTrial`},[A.StartLiveTrial]:{backgroundClass:`bg-light-green border border-green`,imageUrl:k.Upsell.CLICKVIEW_LIVE_FOOTER_BANNER,headingPhrase:`headingClickViewLive`,descriptionPhrase:`descriptionTrialClickViewLive`,ctaPhrase:`startTrial`},[A.RequestCvPilot]:{backgroundClass:`bg-light-orange border border-orange`,imageUrl:k.Upsell.CLICKVIEW_FOOTER_BANNER,headingPhrase:`headingClickView`,descriptionPhrase:`descriptionPilot`,ctaPhrase:`requestAccess`},[A.RequestLivePilot]:{backgroundClass:`bg-light-green border border-green`,imageUrl:k.Upsell.CLICKVIEW_LIVE_FOOTER_BANNER,headingPhrase:`headingClickViewLive`,descriptionPhrase:`descriptionPilot`,ctaPhrase:`requestAccess`}};function nt(e){let[t,n]=G.useState(`idle`),r=L(),i=tt[e.upsellKind];async function a(){await e.onClickRequestAccessButton({setRequestState:e=>{e===`error`&&r.error(Z(`errorRequestingAccess`)),n(e)}})}function o(){return Z(t===`loading`?`loading`:t===`success`?`requestSent`:i.ctaPhrase)}let s=o(),c=t===`success`?B:void 0,l=M(`btn btn-dark`,!!c&&$e.successSvg);return(0,K.jsxs)(`div`,{className:M(`d-flex align-items-center justify-content-between overflow-hidden rounded-3 mb-4`,i.backgroundClass),children:[(0,K.jsxs)(`div`,{className:`p-4`,children:[(0,K.jsx)(`h3`,{className:`mb-3`,children:Z(i.headingPhrase)}),(0,K.jsx)(`p`,{className:`mb-4`,children:(0,K.jsx)(I,{namespace:et,phrase:i.descriptionPhrase})}),(0,K.jsx)(V,{analyticsData:{upsellKind:e.upsellKind},analyticsOptions:{actionType:g.Click,entity:m.AppLink,location:h.UpsellBanner,descriptor:f.StartTrial},svg:c,className:l,onClick:a,disabled:[`success`,`loading`].includes(t),children:s})]}),(0,K.jsx)(`img`,{className:M(`d-none d-md-block align-self-end`,$e.image),src:i.imageUrl,alt:`Envelope`})]})}var rt=`all`,it=3,at={[x.ClassificationLatestReleasedVideosV2]:[b.PopoutThumbnailSlidingListLarge],[x.LatestReleasedClassifications]:[b.ThumbnailFixedListSmall],[x.UpcomingLivestreams]:[b.EventIconSlidingList],[x.SpecialEventClassifications]:[b.EventIconSlidingList],[x.CuratedMedia]:[b.PopoutThumbnailSlidingListLarge,b.PopoutThumbnailSlidingListSmall],[x.CuratedCompanies]:[b.CircleLogoSlidingList],[x.Classifications]:[b.CoverFixedPillListXSmall]};function ot(e){let t=at[e.widgetId];return t?t===rt||t.includes(e.templateId):!1}function st(e,t){if(!e||!t)return e;let n=new Set,r=d.sortBy(e.widgets??[],`index`).filter(e=>!ot(e)||n.has(e.widgetId)?!1:(n.add(e.widgetId),!0));return r.length<it?e:{...e,widgets:r}}var Q=`dashboard.dashboard`,ct=a.encloseNamespace(Q);function lt(e){return+_[e?.learningLevel]===_.Level_1?`VariantOne`:`VariantTwo`}var ut={imageUrls:k,getAppLink:(e,t)=>{let n=v[t];if(!n)return null;let r=n[e];return r?z.getAppLink({id:r.id,name:r.name},void 0,null):null}};function dt(e){let t=u(C.currentUser()),{hasLocalPermissions:o,hasPermissions:s}=pe(),d=L(),f=u(o(i.ManageDiscoverPreferences)&&t.data?.isAuthenticated&&ae.customer(t.data.customerId)),_=u(t.data?.isAuthenticated&&ge.libraries()),{activePresentation:v}=O(),{availablePresentations:y}=H(),b=_e();function S(){return b.showBanner?b.teachingLevelPresentation?`switch-level`:`set-level`:null}let{upsellKind:T}=j(),ne=he(),re=me(),E=xe(),{dashboard:D,presentation:k,audiences:A}=be({targetType:w.Discover,queryParams:e.queryParams}),M=l(),N=ie(null),[P]=le(se.AUDIENCE_FILTER,void 0,{storage:c.SessionStorage}),{applinks:I,requestAccessApplink:R,isUpselling:z,onClickRequestAccessButton:B}=De({applinks:ke(te.getAudienceParams(P),t.data,e.presentationSlug,y)}),{commonVideoProps:V}=Me({locationContext:h.Dashboard,hoverToPlay:!z(v),subTextAppLink:z(v)?R:null}),U=lt(k);fe(de.getDiscoverMetadata({content:k,phraseContext:{phraseHandler:ct,titlePhrase:`pageTitle${U}`,descriptionPhrase:`pageDescription${U}`},canonicalLink:F.getCanonicalLink(),allowIndexing:F.allowIndexing(),hrefLang:F.getStaticRouteHrefLang(k?.learningLevel,I.discover)}));async function ye(e){let i=await M(Ce.submitFeedback({type:we.Footer,user:Te.getUserInfo(t.data,f.data),tags:Te.getTags(t.data,ue.Primary,s(r.StudentExperience),[`discover`,`in product feedback`])},{reaction:e.type,feedback:e.content,location:`Discover Footer`,presentationName:k.description,presentationId:k.id,dashboardName:D.data.name,dashboardId:D.data.id,currentPageUrl:n.GetCurrentUrl()}));return ce.logUserAction({feedbackType:e.type,content:e.content,presentationId:k.id,dashboardId:D.data.id},{actionType:g.Submit,location:h.DiscoverFooter,entity:m.Feedback,workflowPhase:ee.Complete}),i}async function Ee(e,t,n,r){if(r===x.ContinueWatching)try{await M(Le.removeFromHistory(e,[`widget:${n}`])),d.success(a.getPhrase(Q,`removeFromHistorySuccess`)),ce.logUserAction({id:e,name:t,widgetId:n},{entity:m.Video,actionType:g.Click,descriptor:p.RemoveFromWatchHistory,location:h.SlidingListItem})}catch{d.error(a.getPhrase(Q,`removeFromHistoryError`,{name:t}))}}async function Oe(e,n,r,i){let a=i.filter(e=>!e.hidden&&r.find(t=>t.id===e.id).hidden),o=i.filter(e=>e.hidden?!r.find(t=>t.id===e.id).hidden:!1);return a?.length&&await M(oe.followSubjects(a.map(e=>e.id))),o?.length&&await M(oe.unfollowSubjects(o.map(e=>e.id))),M(W.updateWidgetPreferences(e,i.map(e=>({id:e.id,index:e.index})),t.data))}return(0,K.jsxs)(`div`,{className:`bg-white px-4`,children:[(0,K.jsx)(Qe,{dashboard:st(D.data,z(v)),widgetAppLinks:I,headerAppLinks:je(k?.vanitySlug??null),presentation:k,getWidgetContentRequest:(e,n,r,i)=>{let{hasTwig:a,hasTigtag:o}=Se.hasTwigOrTigtag(_.data,t.data);return W.dashboardWidgetContent(e,n,r,i,{hideTigTag:!o,hideTwig:!a})},audiences:A.data,updatePreferences:Oe,hasPermissions:s,hasLocalPermissions:o,onSubmitFeedback:s(r.CanSubmitFeedback)&&ye,removeFromVideoHistory:Ee,lazyLoad:!F.isBot(),showCalendar:!1,settings:N,availablePresentations:y,isTertiaryCustomerWithoutExchange:ne&&!re?.hasProduct(ue.Exchange),commonVideoProps:V,countdownContext:ut,tutorialVideosContext:z(v)?null:E,isUpselling:z(v),reminderComponent:(0,K.jsx)(ve,{type:S(),className:`mb-2`,setLevel:b.teachingLevelPresentation?.name,currLevel:v?.name})}),z(v)&&(0,K.jsx)(nt,{upsellKind:T,onClickRequestAccessButton:B})]})}var $=`streamable.dashboardEmptyState`,ft=a.encloseNamespace($);function pt(e){let n=e.dashboard?.status===T.Archived;return(0,K.jsxs)(P,{children:[(0,K.jsx)(P.Image,{src:e.imageUrl,altText:ft(`info`)}),(0,K.jsx)(P.Heading,{children:(0,K.jsx)(I,{namespace:$,phrase:`heading`})}),(0,K.jsx)(P.Info,{children:(0,K.jsx)(I,{namespace:$,phrase:`info`})}),(0,K.jsx)(t,{title:n?a.getPhrase($,`archivedCtaTooltip`):``,spanHack:!0,children:(0,K.jsx)(P.Cta,{text:a.getPhrase($,`add`),appLink:e.addWidgetApplink?.(),className:`btn btn-dark`,icon:U,disabled:n})})]})}function mt(e){let t=d.sortBy(e.dashboard?.widgets,`index`),{hasPermissions:n,hasLocalPermissions:r}=pe();function i(t,n,r){let i=S.getWidgetParams(n,r,S.getDashboardTargetType(e.dashboard));return e.getWidgetContentRequest(t,i,r)}let a=e.isReadonly&&!t?.length;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Re,{active:`discover`,appLinks:e.headerAppLinks,isUpselling:e.isUpselling}),e.tutorialVideosContext?.shouldShowPanel&&(0,K.jsx)(`div`,{className:`curated-widget rounded-3 mb-3 mx-n4 px-4 py-3 overflow-hidden`,children:e.tutorialVideosContext.readyToShowPanel?(0,K.jsx)(ze,{commonVideoProps:e.commonVideoProps,audiences:e.audiences,context:e.tutorialVideosContext}):(0,K.jsx)(Ne,{hideDescription:!0})}),t.map((t,a)=>(0,K.jsx)(Pe,{widgetCollection:w.Discover,id:t.id,getContentRequest:i,audiences:e.audiences,name:t.name,description:t.description,templateId:t.templateId,metadata:t.metadata,presentation:e.presentation,appLinks:e.widgetAppLinks,isScrollToTargetWidget:e?.scrollToWidgetId===t.id,widgetTypeId:t.widgetId,lazyLoad:e.lazyLoad,dashboardTarget:w.Discover,widgetIndex:a,isPreviewing:e.isReadonly,contentType:E.Livestream,preferences:t.preferences,hasPermissions:n,hasLocalPermissions:r,isTertiaryCustomerWithoutExchange:!1,preventPopout:!0,imageCdnUrl:e.commonVideoProps.imageCdnUrl,commonVideoProps:e.commonVideoProps,isUpselling:e.isUpselling,availablePresentations:void 0,classification:void 0,hasTableOfContents:void 0,onSubmitFeedback:void 0,settings:void 0,updatePreferences:void 0,seeMoreLink:void 0,onClickRemoveItem:void 0,badgeComponent:void 0},t.id)),a&&(0,K.jsx)(pt,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.widgetAppLinks.widgetWizard})]})}var ht=a.encloseNamespace(`liveDiscover.discover`);function gt(e){let t=u(C.currentUser()),{availablePresentations:n}=H(),{activePresentation:r}=O(),[i]=le(se.AUDIENCE_FILTER,void 0,{storage:c.SessionStorage}),{upsellKind:a}=j(),{applinks:o,requestAccessApplink:s,isUpselling:l,onClickRequestAccessButton:d}=De({applinks:Ae(te.getAudienceParams(i),t.data,e.presentationSlug,n)}),{commonVideoProps:f}=Me({locationContext:h.Dashboard,hoverToPlay:!l(r),subTextAppLink:l(r)?s:null}),ee=xe(`live`),{dashboard:p,presentation:m}=be({targetType:w.Discover,queryParams:e.queryParams}),g=u(m&&ye.presentationAudiences(y.StreamableLearning,m.id));return fe(de.getDiscoverMetadata({content:m,phraseContext:{phraseHandler:ht,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`},canonicalLink:F.getCanonicalLink(),allowIndexing:!0})),p.hasCompleted&&m&&g.hasCompleted?(0,K.jsxs)(`div`,{className:`bg-white px-4`,children:[(0,K.jsx)(mt,{dashboard:st(p.data,l(r)),widgetAppLinks:o,headerAppLinks:Oe(e.presentationSlug),presentation:m,getWidgetContentRequest:W.dashboardWidgetContent,audiences:g.data,lazyLoad:!F.isBot(),commonVideoProps:f,tutorialVideosContext:l(r)?null:ee,isUpselling:l(r)}),l(r)&&(0,K.jsx)(nt,{upsellKind:a,onClickRequestAccessButton:d})]}):(0,K.jsx)(K.Fragment,{})}var _t=Ee({[y.Subject]:e=>(0,K.jsx)(dt,{presentationSlug:e.presentationSlug,queryParams:e.queryParams}),[y.StreamableLearning]:e=>(0,K.jsx)(gt,{presentationSlug:e.presentationSlug,queryParams:e.queryParams})});_t.displayName=`BaseDiscoverView`;export{_t as BaseDiscoverView};
|
|
2
|
+
//# sourceMappingURL=DaaQ5htA2.chunk.js.map
|