@clickview/lite 0.38.1-dev.0 → 0.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/languages/en.json +1 -1
  3. package/dist/scripts/1437-3dd3f436b4-lite.chunk.js +1 -0
  4. package/dist/scripts/{1544-8370fd073c-lite.chunk.js → 1544-119f5b1f8a-lite.chunk.js} +1 -1
  5. package/dist/scripts/1786-458f227c92-lite.chunk.js +1 -0
  6. package/dist/scripts/{2199-33b32aa4cb-lite.chunk.js → 2199-702074efad-lite.chunk.js} +1 -1
  7. package/dist/scripts/{2258-c834e3d409-lite.chunk.js → 2258-52d031c9ab-lite.chunk.js} +1 -1
  8. package/dist/scripts/{2261-b108bd8a66-lite.chunk.js → 2261-8286c361a4-lite.chunk.js} +1 -1
  9. package/dist/scripts/274-d5752bca21-lite.chunk.js +1 -0
  10. package/dist/scripts/{2809-09c76b8619-lite.chunk.js → 2809-b8dc594723-lite.chunk.js} +1 -1
  11. package/dist/scripts/2857-0a9c7ef438-lite.chunk.js +1 -0
  12. package/dist/scripts/2902-9ba47555e9-lite.chunk.js +2 -0
  13. package/dist/scripts/{2977-9981711628-lite.chunk.js → 2977-f3b6f64b66-lite.chunk.js} +1 -1
  14. package/dist/scripts/{3067-1a0a7132fb-lite.chunk.js → 3067-29c874cdfb-lite.chunk.js} +1 -1
  15. package/dist/scripts/{3189-5def6446ae-lite.chunk.js → 3189-445815a541-lite.chunk.js} +1 -1
  16. package/dist/scripts/{3389-b843418d0a-lite.chunk.js → 3389-887f04d2a7-lite.chunk.js} +1 -1
  17. package/dist/scripts/3530-f0954afbaa-lite.chunk.js +1 -0
  18. package/dist/scripts/3545-0aa848282b-lite.chunk.js +1 -0
  19. package/dist/scripts/{3715-d5986120e4-lite.chunk.js → 3715-c040c861db-lite.chunk.js} +1 -1
  20. package/dist/scripts/{5582-01f87b2feb-lite.chunk.js → 5582-674b7f4844-lite.chunk.js} +1 -1
  21. package/dist/scripts/{5729-ee6c77d7a9-lite.chunk.js → 5729-538592d697-lite.chunk.js} +1 -1
  22. package/dist/scripts/{578-e3d49a6bfb-lite.chunk.js → 578-d75d1aa83f-lite.chunk.js} +1 -1
  23. package/dist/scripts/{5986-ccd5d04f16-lite.chunk.js → 5986-353ceba4fa-lite.chunk.js} +1 -1
  24. package/dist/scripts/6057-3c43af21b1-lite.chunk.js +1 -0
  25. package/dist/scripts/6086-ab856f75f4-lite.chunk.js +2 -0
  26. package/dist/scripts/{613-359622c66c-lite.chunk.js → 613-09cc35983c-lite.chunk.js} +1 -1
  27. package/dist/scripts/{689-cec4e69142-lite.chunk.js → 689-7508786cdb-lite.chunk.js} +1 -1
  28. package/dist/scripts/{6891-40cc556513-lite.chunk.js → 6891-d4b2c9546b-lite.chunk.js} +1 -1
  29. package/dist/scripts/{7018-3a16d0a287-lite.chunk.js → 7018-2308f5533a-lite.chunk.js} +1 -1
  30. package/dist/scripts/7117-823b47ea37-lite.chunk.js +1 -0
  31. package/dist/scripts/717-94af4ef519-lite.chunk.js +1 -0
  32. package/dist/scripts/{7178-3cc2fe9a90-lite.chunk.js → 7178-c0fe72577c-lite.chunk.js} +1 -1
  33. package/dist/scripts/{7351-b4cf67fff1-lite.chunk.js → 7351-5421b6e5c1-lite.chunk.js} +1 -1
  34. package/dist/scripts/{7432-fe8426171e-lite.chunk.js → 7432-e84ce758c3-lite.chunk.js} +1 -1
  35. package/dist/scripts/{7703-ec001c697f-lite.chunk.js → 7703-317893bc5c-lite.chunk.js} +1 -1
  36. package/dist/scripts/{7734-1f323dbabf-lite.chunk.js → 7734-db37269bb7-lite.chunk.js} +1 -1
  37. package/dist/scripts/{778-4db3b3269f-lite.chunk.js → 778-fdade2c78d-lite.chunk.js} +1 -1
  38. package/dist/scripts/{9220-4fa5492b21-lite.chunk.js → 9220-f6806c7c46-lite.chunk.js} +1 -1
  39. package/dist/scripts/9371-bb4cc49518-lite.chunk.js +2 -0
  40. package/dist/scripts/9433-049851ed26-lite.chunk.js +1 -0
  41. package/dist/scripts/{9523-b618fa319a-lite.chunk.js → 9523-d1769fc0b7-lite.chunk.js} +1 -1
  42. package/dist/scripts/{9657-df6f1f1ffb-lite.chunk.js → 9657-631eda8030-lite.chunk.js} +1 -1
  43. package/dist/scripts/bundle-9c47ed920a.min.js +2 -0
  44. package/dist/scripts/{bundle-66f0bee920.min.js.LICENSE.txt → bundle-9c47ed920a.min.js.LICENSE.txt} +0 -10
  45. package/package.json +1 -1
  46. package/dist/scripts/1437-8eb631c35d-lite.chunk.js +0 -1
  47. package/dist/scripts/1786-36fe320c35-lite.chunk.js +0 -1
  48. package/dist/scripts/274-1c32814b79-lite.chunk.js +0 -1
  49. package/dist/scripts/2857-da11ac17a4-lite.chunk.js +0 -1
  50. package/dist/scripts/2902-6b845dc7f4-lite.chunk.js +0 -2
  51. package/dist/scripts/3530-2a371416f0-lite.chunk.js +0 -1
  52. package/dist/scripts/3545-ba87db78d2-lite.chunk.js +0 -1
  53. package/dist/scripts/6057-2a4be814f5-lite.chunk.js +0 -1
  54. package/dist/scripts/6086-addbf8db6d-lite.chunk.js +0 -2
  55. package/dist/scripts/7117-a32215aec1-lite.chunk.js +0 -1
  56. package/dist/scripts/717-c94f2f9fa5-lite.chunk.js +0 -1
  57. package/dist/scripts/9371-6bfa8408ba-lite.chunk.js +0 -2
  58. package/dist/scripts/9433-3f0c1223e1-lite.chunk.js +0 -1
  59. package/dist/scripts/bundle-66f0bee920.min.js +0 -2
  60. /package/dist/scripts/{2902-6b845dc7f4-lite.chunk.js.LICENSE.txt → 2902-9ba47555e9-lite.chunk.js.LICENSE.txt} +0 -0
  61. /package/dist/scripts/{6086-addbf8db6d-lite.chunk.js.LICENSE.txt → 6086-ab856f75f4-lite.chunk.js.LICENSE.txt} +0 -0
  62. /package/dist/scripts/{9371-6bfa8408ba-lite.chunk.js.LICENSE.txt → 9371-bb4cc49518-lite.chunk.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[6057],{30357:(e,t,r)=>{r.d(t,{V:()=>c});var n=r(32735),a=r(48548),i=r(89965),l=r(83345),o="share.embedSize";function c(e){var t=e.autoplay,r=e.setAutoplay,c=e.videoSize,s=e.setVideoSize,u=e.videoSizes;return n.createElement("div",{className:"d-flex align-items-center"},!!u.length&&n.createElement(n.Fragment,null,n.createElement("div",{className:"me-1"},n.createElement(l.x,{namespace:o,phrase:"videoSize"})),n.createElement("div",{className:"pe-3"},n.createElement(a.Z,null,n.createElement(a.Z.Toggle,{id:"embed-resolution",variant:"outline-dark"},c.label),n.createElement(a.Z.Menu,null,u.map((function(e){return n.createElement(a.Z.Item,{key:"".concat(e.width,"x").concat(e.height),onClick:function(){return s(e)}},e.label)})))))),n.createElement("div",{className:"me-2"},n.createElement(l.x,{namespace:o,phrase:"autoplay"})),n.createElement(i.X,{id:"autoplay-checkbox",checked:t,onChange:function(){return r(!t)}}))}},62124:(e,t,r)=>{r.d(t,{a:()=>m});var n=r(32735),a=r(92802),i=r(23481),l=r(9673),o=r(83345),c=r(83523),s=r(76177),u="shared.linkExpiry",d=i.T.encloseNamespace(u);function m(e){var t=(0,a.u6)();return n.createElement("div",{className:"d-flex justify-content-between align-items-center pb-3"},n.createElement("div",null,n.createElement("label",{className:"m-0",htmlFor:""},n.createElement(o.x,{namespace:u,phrase:"linkExpirationHeading"})),n.createElement("p",{className:"m-0"},n.createElement(o.x,{namespace:u,phrase:"linkExpirationInfo"}))),n.createElement(s.u,{title:d("passwordProtected"),disable:!e.passwordProtectLink,spanHack:!0,trigger:"hover"},n.createElement(c.Z,{onClick:function(){e.passwordProtectLink||t.setFieldValue("linkExpireDate",(0,l.o)(!t.values.linkExpireDate))},on:!!t.values.linkExpireDate,disabled:e.passwordProtectLink,showStateWhenDisabled:!0})))}},20847:(e,t,r)=>{r.d(t,{z:()=>g});var n=r(32735),a=r(92802),i=r(80130),l=r(23481),o=r(11607),c=r(83914),s=r(35223);const u={passwordButton:"W9Jl8"};function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var m=l.T.encloseNamespace("share.setPasswordInput");function p(e){var t,r,l,p=(r=n.useState(!1),l=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(r,l)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(r,l)||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.")}()),f=p[0],v=p[1],y=null===(t=(0,a.u6)().errors)||void 0===t?void 0:t.password;return n.createElement(n.Fragment,null,n.createElement("input",{className:"form-control ".concat(y?"is-invalid":""),value:e.value,onChange:function(t){e.canEdit&&e.onChange(t.target.value)},type:f?"text":"password",placeholder:e.placeholder||m("passwordPlaceholder"),readOnly:!e.canEdit}),!!y&&n.createElement(i.Z.Control.Feedback,{type:"invalid"},y),!!e.canEdit&&n.createElement(o.L,{className:u.passwordButton,onClick:function(){return v(!f)}},n.createElement(c.x,{svgName:f?s.vn.VisibleOn:s.vn.VisibleOff,title:m(f?"hidePassword":"revealPassword"),tooltipPlacement:"top"})),!e.canEdit&&!!e.canReset&&!!e.onReset&&n.createElement(o.L,{className:u.passwordButton,onClick:e.onReset},n.createElement(c.x,{svgName:s.vn.Close,title:m("resetPassword"),tooltipPlacement:"top"})))}var f=r(9673),v=r(83345),y=r(83523);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b="shared.linkPassword",E="********";function g(e){var t,r,i,l=e.passwordProtectLink,o=e.setPasswordProtectLink,c=(0,a.u6)(),s=(r=n.useState(!!(null===(t=e.shareLink)||void 0===t?void 0:t.isPasswordProtected)),i=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(r,i)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(r,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.")}()),u=s[0],d=s[1];return n.createElement("div",{className:"pb-3"},n.createElement("div",{className:"d-flex justify-content-between align-items-center"},n.createElement("div",null,n.createElement("label",{className:"m-0",htmlFor:""},n.createElement(v.x,{namespace:b,phrase:"passwordProtectHeading"})),n.createElement("p",{className:"m-0"},n.createElement(v.x,{namespace:b,phrase:"passwordProtectInfo"}))),n.createElement(y.Z,{onClick:function(){var t;(null===(t=e.shareLink)||void 0===t?void 0:t.isPasswordProtected)&&c.setFieldValue("removePassword",l),c.setFieldValue("password",""),o(!l),c.setFieldValue("linkExpireDate",(0,f.o)(!l))},on:l})),l&&n.createElement("div",{className:"position-relative mt-2"},n.createElement(p,{value:u?E:c.values.password,onChange:function(e){c.setFieldValue("password",e)},onReset:function(){c.setFieldValue("password",""),c.setFieldValue("removePassword",!0),d(!1)},canEdit:!u,canReset:!0})))}},97330:(e,t,r)=>{r.d(t,{s:()=>v});var n=r(32735),a=r(23481),i=r(110),l=r(11607),o=r(83914),c=r(4594),s=r(49080),u=r(35223);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(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 m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var p=a.T.encloseNamespace("share.shareLinkInfo"),f=function(e){var t=e.linkExpireDate,r=e.isPasswordProtected,n=e.status;if(!t&&!r)return function(e){var t=e.entityTypeId,r=e.privacy,n=e.hasPrivatePlaylistVideos,a=e.hasStudentExp;if(t===c.E.Playlist)return n?{icon:u.vn.Warning,text:p("hasPrivateVideos")}:{icon:u.vn.VisibleOn,text:p(a?"justMySchoolTeachers":"public")};if(t===c.E.Topic||t===c.E.Series)return{icon:u.vn.VisibleOn,text:p(a?"justMySchoolTeachers":"justMySchool")};if(!Array.isArray(r))switch(r.privacy){case"public":return{icon:u.vn.VisibleOn,text:p("public")};case"protected":return{icon:u.vn.VisibleOn,text:p("clickViewOnly")};case"just_my_customer":return{icon:u.vn.Lock,text:p(a?"justMySchoolTeachers":"justMySchool")};case"restricted":case"private":return{icon:u.vn.Lock,text:p("private")};default:return{}}}(e);if(!t)return{icon:u.vn.Lock,text:p("password")};var a=i.O.isToday(t),l=i.O.diffBetween(t,new Date,"day");if(!r){var o=a?p("expiryToday"):p("expiry",{days:l});return n===s.F.Expired&&(o=p("expired")),{icon:u.vn.Timer,text:o}}var d=a?p("passwordExpiryToday"):p("passwordExpiry",{days:l});return n===s.F.Expired&&(d=p("passwordExpired")),{icon:u.vn.Lock,text:d}};function v(e){var t=d(n.useState(!1),2),r=t[0],a=t[1],i=d(n.useState(!1),2),s=i[0],u=i[1],m=f(Object.assign(Object.assign({},e),{hasPrivatePlaylistVideos:s})),p=m.icon,v=m.text;return n.useEffect((function(){if(Array.isArray(e.privacy)){if(e.privacy.length&&e.entityTypeId===c.E.Playlist){var t=e.privacy.some((function(e){return!!e.canManageAccess&&("private"===e.privacy||"restricted"===e.privacy)}));a(t),u(t)}}else a(e.privacy.canManageAccess)}),[e.privacy]),n.createElement("div",{className:"d-flex align-items-center"},n.createElement(o.x,{svgName:p,className:"svg-container me-1"}),r&&e.onClickShowPrivacies?n.createElement(l.L,{className:"info-link",onClick:e.onClickShowPrivacies},v):n.createElement("span",null,v))}},9673:(e,t,r)=>{r.d(t,{o:()=>a});var n=30;function a(e){if(!e)return null;var t=new Date;return t.setDate(t.getDate()+n),t.toISOString()}},61193:(e,t,r)=>{r.d(t,{d:()=>i});var n=r(5173),a=r(23481),i=(0,n.Ry)().shape({removePassword:(0,n.O7)(),resourceId:(0,n.Z_)(),linkExpireDate:(0,n.Z_)().nullable(),password:(0,n.Z_)().test({name:"password-length",exclusive:!1,params:{},message:a.T.getPhrase("share.validation","minPassword"),test:function(e){return!((null==e?void 0:e.length)&&e.length<3)}}).default("")})},32915:(e,t,r)=>{r.d(t,{d:()=>E});var n=r(32735),a=r(23481),i=r(57900),l=r(64249),o=r(76246),c=r(17464),s=r(13876),u=r(83345),d=r(94696),m=r(31908);const p={badgeContainer:"GuynO"};function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var v="share.shareRestrictionWarning",y=a.T.encloseNamespace(v),h=1209600;function b(e){var t=e.entity,r=e.entityType,a=e.yearGroups,i=e.target;if(!["video","clip","interactive"].includes(r))return n.createElement("p",null,n.createElement(u.x,{namespace:v,phrase:"shareVideoList",options:{entityType:r}}));var s=m.M.getRating(t),f=(null==s?void 0:s.value)>=l.I.WARNING_RATING_VALUE;return n.createElement(n.Fragment,null,n.createElement("p",{className:"mb-2"},n.createElement(u.x,{namespace:v,phrase:"message",options:{entityType:r}})),n.createElement("div",{className:"mb-2"},n.createElement(c.c,{className:p.badgeContainer},f&&n.createElement(o.C,{data:m.M.getRating(t),type:o.g.Rating}),n.createElement(d.B,{video:t,yearGroups:a,className:"pt-0"}))),n.createElement("div",null),n.createElement("p",null,n.createElement(u.x,{namespace:v,phrase:"share"===i?"shareVideo":"addToPlaylist",options:{entityType:r}})))}function E(e){var t,r,a=e.onClickContinue,o=(t=n.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(t,r)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(t,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.")}()),c=o[0],u=o[1];return n.createElement(n.Fragment,null,n.createElement(b,Object.assign({},e)),n.createElement(s.u,null,n.createElement(s.u.Checkbox,{id:"dont-show-again",checked:c,onToggle:function(){return u(!c)},label:y("dontShowAgain")}),n.createElement(s.u.Submit,{variant:"dark",text:y("submit"),onClick:function(){if(c){var t="".concat(l.I.RESTRICTION_CACHE_KEY,":").concat(e.currentUser.id);i.SG.cacheSet(t,!0,h)}a()}})))}},82644:(e,t,r)=>{r.d(t,{b:()=>u,n:()=>s});var n=r(32735),a=r(92802),i=r(79014),l=r(1048);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r};function s(e){var t=e.castInitialValues,r=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,d=c(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),m=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=l.t.deepClone(e);return function e(r){Object.keys(t).forEach((function(n){t.hasOwnProperty(n)&&(l.t.isObject(r[n])?e(r[n]):null===t[n]&&delete t[n])}))}(t),t}(s)):s,p={allowInitialSubmit:e.allowInitialSubmit};return n.createElement(a.J9,Object.assign({enableReinitialize:!0},d,{initialValues:m,onSubmit:function(t,n){var a=n.setSubmitting,i=n.resetForm,l=n.setFieldError,c=r&&e.validationSchema?e.validationSchema.cast(t):t;u(c,(function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r.reset&&i(),r.errors)for(var n=0,c=Object.entries(r.errors);n<c.length;n++){var s=(e=c[n],t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],d=s[1];l(u,d)}a(!1)}))},initialStatus:p}),i.q.isFunction(e.children)?function(t){return e.children(t)}:n.Children.count(e.children)?e.children:null)}function u(){return(0,a.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},84678:(e,t,r)=>{r.d(t,{L:()=>i});var n=r(32735),a=r(76246);function i(e){return n.createElement(a.C,{type:a.g.Restriction,data:{restrictions:e.restrictions,yearGroups:e.yearGroups},inline:!0})}},94696:(e,t,r)=>{r.d(t,{B:()=>c});var n=r(32735),a=r(17464),i=r(84678),l=r(26361),o=r(31908);function c(e){var t=l.l.hasRestrictions(e.video),r=o.M.getCanBeConsumed(e.video).canConsume;return t&&e.yearGroups&&r?n.createElement(a.c,{className:e.className||"pt-1"},n.createElement(i.L,{restrictions:e.video._restrictions,yearGroups:e.yearGroups})):n.createElement(n.Fragment,null)}}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 6086-addbf8db6d-lite.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[6086],{86086:(t,e,n)=>{n.d(e,{w:()=>F});var r,i,o,a=n(33937),c=n(12399),s=n(6156),u=n(51794),l=n(95569),h=n(35884);function f(t){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f(t)}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,v(r.key),r)}}function d(t,e,n){return e&&p(t.prototype,e),n&&p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function v(t){var e=function(t,e){if("object"!=f(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==f(e)?e:String(e)}!function(t){t[t.Offline=0]="Offline",t[t.Online=1]="Online",t[t.Locked=2]="Locked",t[t.Suspended=3]="Suspended"}(r||(r={})),function(t){t[t.PlaybackStatusChange=0]="PlaybackStatusChange",t[t.PositionChange=1]="PositionChange"}(i||(i={})),function(t){t.Begin="BEGIN",t.Play="PLAY",t.Pause="PAUSE",t.Load="LOAD",t.Scan="SCAN",t.Stop="STOP"}(o||(o={}));var y=d((function t(e,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.title=e,this.device=n,this.locked=!1,this.position=0,this.playbackStatus=o.Load,this.debounced=h.l.withDebouncedSetters(this,2e3),h.l.withTimestampedSetters(this)}));function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function g(){g=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),c=new _(r||[]);return i(a,"_invoke",{value:D(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function m(){}function w(){}function k(){}var S={};u(S,a,(function(){return this}));var P=Object.getPrototypeOf,x=P&&P(P(A([])));x&&x!==n&&r.call(x,a)&&(S=x);var O=k.prototype=m.prototype=Object.create(S);function j(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(i,o,a,c){var s=h(t[i],t,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==b(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function D(e,n,r){var i=f;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var c=r.delegate;if(c){var s=L(c,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=h(e,n,r);if("normal"===u.type){if(i=r.done?v:p,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function L(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(b(e)+" is not iterable")}return w.prototype=k,i(O,"constructor",{value:k,configurable:!0}),i(k,"constructor",{value:w,configurable:!0}),w.displayName=u(k,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,u(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},j(E.prototype),u(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new E(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(O),u(O,s,"Generator"),u(O,a,(function(){return this})),u(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return c.type="throw",c.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function m(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,w(r.key),r)}}function w(t){var e=function(t,e){if("object"!=b(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==b(e)?e:String(e)}function k(t,e,n){return e=x(e),function(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,S()?Reflect.construct(e,n||[],x(t).constructor):e.apply(t,n))}function S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(S=function(){return!!t})()}function P(){return P="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=x(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},P.apply(this,arguments)}function x(t){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},x(t)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}var j=function(t){function e(t,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=k(this,e)).client=t,r.localState=new y(n.title,n.device),r.bindFunctions(),r.initialize(),r}var n,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&O(t,e)}(e,t),n=e,(r=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.dispose=this.dispose.bind(this),this.handleDisconnected=this.handleDisconnected.bind(this),this.handleAllVideoMessages=this.handleAllVideoMessages.bind(this),this.handlePlaybackChange=this.handlePlaybackChange.bind(this),this.handlePositionChange=this.handlePositionChange.bind(this),this.loadSource=this.loadSource.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.setVolume=this.setVolume.bind(this),this.isPlaying=this.isPlaying.bind(this),this.getPosition=this.getPosition.bind(this),this.getDuration=this.getDuration.bind(this),this.getVolume=this.getVolume.bind(this)}},{key:"initialize",value:function(){this.client.on("dispose",this.dispose),this.client.on("disconnected",this.handleDisconnected),this.client.on("message",this.handleAllVideoMessages)}},{key:"dispose",value:function(){this.client.off("dispose",this.dispose),this.client.off("disconnected",this.handleDisconnected),this.client.off("message",this.handleAllVideoMessages),this.client.stop(this.getDevice().id).catch((function(t){return console.error(t)})),P(x(e.prototype),"dispose",this).call(this)}},{key:"handleDisconnected",value:function(){this.trigger("error",new Error("The connection to the Apple TV has been lost and cannot be recovered"))}},{key:"handleAllVideoMessages",value:function(t){if(t.deviceId===this.getDevice().id){var e=this.localState.debounced;switch(t.event){case i.PlaybackStatusChange:this.handlePlaybackChange(e,t);break;case i.PositionChange:this.handlePositionChange(e,t)}}}},{key:"handlePlaybackChange",value:function(t,e){t.playbackStatus!==e.params.playbackStatus&&(t.playbackStatus=e.params.playbackStatus,this.trigger("playingchange",s.j.void),t.playbackStatus===o.Stop&&this.dispose())}},{key:"handlePositionChange",value:function(t,e){t.position!==e.params.position&&(t.position=e.params.position,this.trigger("positionchange",s.j.void))}},{key:"loadSource",value:function(){return t=this,e=void 0,n=void 0,r=g().mark((function t(){return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!this.localState.locked){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.client.lock(this.getDevice().id);case 5:return this.localState.locked=!0,t.next=8,this.client.loadVideo(this.getDevice().id);case 8:this.trigger("sourceloaded",s.j.void),t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),console.error(t.t0),this.trigger("error",new Error("Could not load video on Apple TV device"));case 15:case"end":return t.stop()}}),t,this,[[0,11]])})),new(n||(n=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function c(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}));var t,e,n,r}},{key:"play",value:function(){this.localState.locked&&this.localState.playbackStatus!==o.Play&&(this.localState.playbackStatus=o.Play,this.client.play(this.getDevice().id),this.trigger("playingchange",s.j.void))}},{key:"pause",value:function(){this.localState.locked&&this.localState.playbackStatus!==o.Pause&&(this.localState.playbackStatus=o.Pause,this.client.pause(this.getDevice().id),this.trigger("playingchange",s.j.void))}},{key:"seek",value:function(t){this.localState.locked&&this.localState.position!==t&&(this.localState.position=t,this.client.seek(this.getDevice().id,t),this.trigger("positionchange",s.j.void))}},{key:"setVolume",value:function(){console.info("Setting the volume is not supported on Apple TV")}},{key:"setMuted",value:function(){console.info("Muting is not supported on Apple TV")}},{key:"setSubtitles",value:function(){console.info("Subtitles are not supported on Apple TV")}},{key:"isPlaying",value:function(){return this.localState.playbackStatus===o.Play||this.localState.playbackStatus===o.Begin||this.localState.playbackStatus===o.Load}},{key:"isPlaybackFinished",value:function(){return this.localState.playbackStatus===o.Stop}},{key:"getPosition",value:function(){return this.localState.position}},{key:"getDuration",value:function(){}},{key:"getVolume",value:function(){return 1}},{key:"getMuted",value:function(){return!1}},{key:"getSubtitles",value:function(){}},{key:"getDevice",value:function(){return this.localState.device}},{key:"getTitle",value:function(){return this.localState.title}}])&&m(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),e}(s.N);function E(t){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}function D(){D=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),c=new _(r||[]);return i(a,"_invoke",{value:j(t,n,c)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function b(){}function g(){}function m(){}var w={};u(w,a,(function(){return this}));var k=Object.getPrototypeOf,S=k&&k(k(A([])));S&&S!==n&&r.call(S,a)&&(w=S);var P=m.prototype=b.prototype=Object.create(w);function x(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(i,o,a,c){var s=h(t[i],t,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==E(l)&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(l).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,c)}))}c(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function j(e,n,r){var i=f;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var c=r.delegate;if(c){var s=L(c,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var u=h(e,n,r);if("normal"===u.type){if(i=r.done?v:p,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=v,r.method="throw",r.arg=u.arg)}}}function L(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,L(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(E(e)+" is not iterable")}return g.prototype=m,i(P,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:g,configurable:!0}),g.displayName=u(m,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,s,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},x(O.prototype),u(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(P),u(P,s,"Generator"),u(P,a,(function(){return this})),u(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=A,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return c.type="throw",c.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:A(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function L(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,C(r.key),r)}}function C(t){var e=function(t,e){if("object"!=E(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==E(e)?e:String(e)}function T(t,e,n){return e=I(e),function(t,e){if(e&&("object"===E(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_()?Reflect.construct(e,n||[],I(t).constructor):e.apply(t,n))}function _(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_=function(){return!!t})()}function A(){return A="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=I(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},A.apply(this,arguments)}function I(t){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},I(t)}function G(t,e){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},G(t,e)}var N,R,V=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function c(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))};!function(t){t.DeviceList="DeviceList",t.DeviceStateChange="DeviceStateChange",t.Paired="Paired",t.Unpaired="Unpaired",t.PlayStatusChange="PlayStatusChange",t.TimeSync="TimeSync"}(N||(N={})),function(t){t.Command="Command",t.Pair="Pair",t.Unpair="Unpair",t.RenameDevice="Renamedevice",t.Subscribe="Subscribe",t.Lock="Lock"}(R||(R={}));var F=function(t){function e(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=T(this,e)).options=t,n.accessToken=void 0,n.devices=[],n.bindFunctions(),n.initialize(),n}var n,h,f;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&G(t,e)}(e,t),n=e,h=[{key:"bindFunctions",value:function(){this.initialize=this.initialize.bind(this),this.invoke=this.invoke.bind(this),this.invokeDebounced=(0,l.Ds)(this.invoke,500,!0),this.handleDeviceList=this.handleDeviceList.bind(this),this.handleDeviceStateChange=this.handleDeviceStateChange.bind(this),this.handleDevicePaired=this.handleDevicePaired.bind(this),this.handleDeviceUnpaired=this.handleDeviceUnpaired.bind(this),this.handlePlayStatusChange=this.handlePlayStatusChange.bind(this),this.handleTimeSync=this.handleTimeSync.bind(this),this.dispose=this.dispose.bind(this),this.canCastToDevice=this.canCastToDevice.bind(this),this.getDevices=this.getDevices.bind(this),this.startCastSession=this.startCastSession.bind(this),this.lock=this.lock.bind(this),this.loadVideo=this.loadVideo.bind(this),this.play=this.play.bind(this),this.pause=this.pause.bind(this),this.seek=this.seek.bind(this),this.stop=this.stop.bind(this),this.pair=this.pair.bind(this),this.unpair=this.unpair.bind(this),this.renameDevice=this.renameDevice.bind(this)}},{key:"initialize",value:function(){return V(this,void 0,void 0,D().mark((function t(){var e=this;return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.options.fetchAccessToken();case 3:this.accessToken=t.sent,this.connection=(0,a.OB)(this.accessToken.host,{logging:!1}),this.hubProxy=this.connection.createHubProxy("DeviceUserHub"),this.connection.disconnected((function(){return e.trigger("disconnected",s.j.void)})),this.hubProxy.on(N.DeviceList,this.handleDeviceList),this.hubProxy.on(N.DeviceStateChange,this.handleDeviceStateChange),this.hubProxy.on(N.Paired,this.handleDevicePaired),this.hubProxy.on(N.Unpaired,this.handleDeviceUnpaired),this.hubProxy.on(N.PlayStatusChange,this.handlePlayStatusChange),this.hubProxy.on(N.TimeSync,this.handleTimeSync),t.next=20;break;case 15:return t.prev=15,t.t0=t.catch(0),console.error(t.t0),this.trigger("error",new Error("Could not authenticate with Online API")),t.abrupt("return");case 20:this.connection.start({jsonp:!1,withCredentials:!1}).done((function(){return V(e,void 0,void 0,D().mark((function t(){return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.invoke(R.Subscribe,this.accessToken.token);case 3:if(t.sent){t.next=6;break}throw new Error("The subscription request was rejected by Online API");case 6:this.trigger("connected",s.j.void),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),console.error(t.t0),this.trigger("error",new Error("Could not subscribe to Online API"));case 13:case"end":return t.stop()}}),t,this,[[0,9]])})))})).fail((function(){e.trigger("error",new Error("Could not connect to Online API"))}));case 21:case"end":return t.stop()}}),t,this,[[0,15]])})))}},{key:"invoke",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=new Promise((function(n,i){var o,a;return(null===(a=e.hubProxy)||void 0===a?void 0:(o=a).invoke.apply(o,[t].concat(r))).done(n).fail(i)}));return u.J.fromPromise(o).timeout(2e4)}},{key:"handleDeviceList",value:function(t){this.devices=t.filter((function(t){return"vivi"!==t.type})).map(e.convertToGenericDevice),this.trigger("deviceschange",s.j.void)}},{key:"handleDeviceStateChange",value:function(t){var n=this.devices.findIndex((function(e){return e.id===t.deviceId}));n>=0&&(this.devices[n]=e.convertToGenericDevice(t),this.trigger("deviceschange",s.j.void))}},{key:"handleDevicePaired",value:function(t){"vivi"!==t.type&&(this.devices.push(e.convertToGenericDevice(t)),this.trigger("deviceschange",s.j.void))}},{key:"handleDeviceUnpaired",value:function(t){this.devices=this.devices.filter((function(e){return e.id!==t})),this.trigger("deviceschange",s.j.void)}},{key:"handlePlayStatusChange",value:function(t,e){this.trigger("message",{event:i.PlaybackStatusChange,deviceId:t,params:{playbackStatus:e.commandType}})}},{key:"handleTimeSync",value:function(t,e){this.trigger("message",{event:i.PositionChange,deviceId:t,params:{position:e}})}},{key:"dispose",value:function(){this.hubProxy.off(N.DeviceList,this.handleDeviceList),this.hubProxy.off(N.DeviceStateChange,this.handleDeviceStateChange),this.hubProxy.off(N.Paired,this.handleDevicePaired),this.hubProxy.off(N.Unpaired,this.handleDeviceUnpaired),this.hubProxy.off(N.PlayStatusChange,this.handlePlayStatusChange),this.hubProxy.off(N.TimeSync,this.handleTimeSync),this.hubProxy.connection.stop(!1,!0),A(I(e.prototype),"dispose",this).call(this)}},{key:"canCastToDevice",value:function(t){return t===c.Y.AppleTv}},{key:"getDevices",value:function(){return this.devices}},{key:"startCastSession",value:function(t){return new j(this,t)}},{key:"lock",value:function(t){var e;return V(this,void 0,void 0,D().mark((function n(){return D().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.invoke(R.Lock,t,this.options.userId,null!==(e=this.options.username)&&void 0!==e?e:"");case 2:if(n.sent){n.next=5;break}throw new Error("Could not lock device");case 5:case"end":return n.stop()}}),n,this)})))}},{key:"loadVideo",value:function(t){return V(this,void 0,void 0,D().mark((function e(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.options.trackingCode){e.next=2;break}throw new Error("Tracking code must be provided to cast videos");case 2:return e.next=4,this.invoke(R.Command,{DeviceId:t,CommandType:o.Play,Data:this.options.trackingCode});case 4:case"end":return e.stop()}}),e,this)})))}},{key:"play",value:function(t){return V(this,void 0,void 0,D().mark((function e(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.invoke(R.Command,{DeviceId:t,CommandType:o.Play});case 2:case"end":return e.stop()}}),e,this)})))}},{key:"pause",value:function(t){return V(this,void 0,void 0,D().mark((function e(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.invoke(R.Command,{DeviceId:t,CommandType:o.Pause});case 2:case"end":return e.stop()}}),e,this)})))}},{key:"seek",value:function(t,e){this.invokeDebounced(R.Command,{DeviceId:t,CommandType:o.Play,Params:"1,".concat(Math.trunc(e))})}},{key:"stop",value:function(t){return V(this,void 0,void 0,D().mark((function e(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.invoke(R.Command,{DeviceId:t,CommandType:o.Stop});case 2:case"end":return e.stop()}}),e,this)})))}},{key:"pair",value:function(t){return V(this,void 0,void 0,D().mark((function e(){var n;return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.invoke(R.Pair,t);case 2:if(n=e.sent){e.next=5;break}throw new Error("Could not pair device");case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"unpair",value:function(t){return V(this,void 0,void 0,D().mark((function e(){return D().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.invoke(R.Unpair,t);case 2:case"end":return e.stop()}}),e,this)})))}},{key:"renameDevice",value:function(t){var e=t.deviceId,n=t.deviceName;return V(this,void 0,void 0,D().mark((function t(){return D().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.invoke(R.RenameDevice,e,n);case 2:if(t.sent){t.next=5;break}throw new Error("Could not rename device");case 5:case"end":return t.stop()}}),t,this)})))}}],f=[{key:"convertToGenericDeviceStatus",value:function(t){switch(t){case r.Online:return c.L.Available;case r.Locked:return c.L.Busy;case r.Suspended:case r.Offline:return c.L.Offline}}},{key:"convertToGenericDevice",value:function(t){return{id:t.deviceId,name:t.name,type:c.Y.AppleTv,status:e.convertToGenericDeviceStatus(t.status)}}}],h&&L(n.prototype,h),f&&L(n,f),Object.defineProperty(n,"prototype",{writable:!1}),e}(s.N)},12399:(t,e,n)=>{var r,i;n.d(e,{L:()=>i,Y:()=>r}),function(t){t.AppleTv="apple-tv",t.Vivi="vivi"}(r||(r={})),function(t){t.Available="available",t.Offline="offline",t.Busy="busy"}(i||(i={}))},6156:(t,e,n)=>{n.d(e,{N:()=>l,j:()=>h});var r=n(51794);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,s(r.key),r)}}function c(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:String(e)}var u=function(){function t(){o(this,t),this.callbacks=[],this.predicates=[],this.controller=new AbortController,this.signal=this.controller.signal,this.trigger=this.trigger.bind(this),this.on=this.on.bind(this),this.one=this.one.bind(this),this.off=this.off.bind(this),this.dispose=this.dispose.bind(this),this.isDisposed=this.isDisposed.bind(this)}return c(t,[{key:"trigger",value:function(t){var e=this;this.callbacks.forEach((function(n,r){var i=e.predicates[r];i&&!i(t)||n(t)}))}},{key:"on",value:function(t){var e=this;this.isDisposed()&&console.warn("This EventChannel instance been disposed - this is a no-op");var n=this.callbacks.length;this.callbacks[n]=t,this.predicates[n]=function(){return!0};var r=function(){e.off(t)};return{off:r,filter:function(t){return e.predicates[n]=t,r}}}},{key:"one",value:function(){var t,e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0};return this.isDisposed()?r.J.reject(new Error("This EventChannel instance has been disposed")):new r.J((function(r,i){t=e.on((function(n){e.signal.removeEventListener("abort",o),t(),r(n)})).filter(n);var o=function(){t(),i(new Error("Aborted while waiting for message"))};e.signal.addEventListener("abort",o,{once:!0})}),(function(){t()}))}},{key:"off",value:function(t){var e=this.callbacks.indexOf(t);-1!==e&&(this.callbacks.splice(e,1),this.predicates.splice(e,1))}},{key:"dispose",value:function(){this.callbacks.length=0,this.predicates.length=0,this.controller.abort()}},{key:"isDisposed",value:function(){return this.signal.aborted}}]),t}(),l=function(){function t(){o(this,t),this.channels={},this.trigger=this.trigger.bind(this),this.on=this.on.bind(this),this.one=this.one.bind(this),this.off=this.off.bind(this),this.dispose=this.dispose.bind(this),this.getChannel=this.getChannel.bind(this)}return c(t,[{key:"trigger",value:function(t,e){this.getChannel(t).trigger(e)}},{key:"on",value:function(t,e){return this.getChannel(t).on(e)}},{key:"one",value:function(t,e){return this.getChannel(t).one(e)}},{key:"off",value:function(t,e){this.getChannel(t).off(e)}},{key:"dispose",value:function(){this.trigger("dispose",h.void),Object.values(this.channels).forEach((function(t){return t.dispose()})),this.channels={}}},{key:"getChannel",value:function(t){return this.channels[t]||(this.channels[t]=new u),this.channels[t]}}]),t}(),h={void:void 0}},51794:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,o(r.key),r)}}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:String(e)}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(c())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var i=new(t.bind.apply(t,r));return n&&s(i,n.prototype),i}(t,arguments,u(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),s(n,t)},a(t)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}n.d(e,{J:()=>l});var l=function(t){function e(t,n){var i,o,a,s;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=this,a=e,s=[t],a=u(a),i=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(o,c()?Reflect.construct(a,s||[],u(o).constructor):a.apply(o,s))).onTimeout=n,i.bindFunctions(),i}var n,o,a;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),n=e,a=[{key:"reject",value:function(t){return new e((function(e,n){return n(t)}))}},{key:"fromPromise",value:function(t){return new e((function(e,n){return t.then(e).catch(n)}))}}],(o=[{key:"bindFunctions",value:function(){this.timeout=this.timeout.bind(this)}},{key:"timeout",value:function(t){var e=this;return new Promise((function(n,r){e.then(n).catch(r).finally((function(){return clearTimeout(i)}));var i=setTimeout((function(){var t;null===(t=e.onTimeout)||void 0===t||t.call(e),r(new Error("Promise timed out"))}),t)}))}}])&&i(n.prototype,o),a&&i(n,a),Object.defineProperty(n,"prototype",{writable:!1}),e}(a(Promise))},35884:(t,e,n)=>{n.d(e,{l:()=>r});var r={withDebouncedSetters:function(t,e){return t._lastModified||(t._lastModified={}),new Proxy(t,{set:function(n,r,i,o){var a=t._lastModified[r.toString()];return!!(a&&Date.now()<a+e)||Reflect.set(n,r,i,o)}})},withTimestampedSetters:function(t){return t._lastModified||(t._lastModified={}),new Proxy(t,{set:function(e,n,r,i){return t._lastModified[n.toString()]=Date.now(),Reflect.set(e,n,r,i)}})}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7117],{97117:(e,t,n)=>{n.r(t),n.d(t,{CombineUploadsService:()=>j});var i=n(48088),r=n(79976),o=n(56050),s=n(60139),a=n(71365),d=n(23481),c=n(81886),u=n(28400),l=n(29555),g=n(63604),p=n(110),h="upload.utils",f={getStatus:function(e){if(f.hasError(e))return d.T.getPhrase(h,"videoProcessingError");if(!e.get("foregroundComplete")){var t=f.getProgress(e);return 0===t?d.T.getPhrase(h,"waiting"):d.T.getPhrase(h,"processing",{progress:t})}return f.isDone(e)?d.T.getPhrase(h,"complete"):d.T.getPhrase(h,"readyToWatch")},hasError:function(e){return e.get("pendingProcessStatus")===g.g.Error},isDone:function(e){return 2===e.get("pendingProcessStatus")},getProgress:function(e){return e.get("foregroundProgress")},hasExpired:function(e,t){var n=e.get("timeInitialized");return p.O.timeSince(n,"day")>=t}},m=n(52003),v=n(75795),y=n(14070),I=n(97291),P=n(57322),b=n(16800),k=n(48543);function S(e){return S="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},S(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,T(i.key),i)}}function U(e,t,n){return t&&O(e.prototype,t),n&&O(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function T(e){var t=function(e,t){if("object"!=S(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=S(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:String(t)}function C(e,t,n){return t=_(t),function(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,A()?Reflect.construct(t,n||[],_(e).constructor):t.apply(e,n))}function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(A=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function w(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}var L=d.T.encloseNamespace("upload.services"),D=function(e){function t(){return E(this,t),C(this,t,arguments)}return w(t,e),U(t,[{key:"modelId",value:function(e){return e.pendingProcessId||e.id}},{key:"comparator",get:function(){return function(e,t){var n=e.get("status"),i=t.get("status");return n===k.f.Errored?1:i===k.f.Errored?-1:0}}}]),t}(c.Q.FE),j=function(e){function t(){return E(this,t),C(this,t,arguments)}return w(t,e),U(t,[{key:"name",get:function(){return P.K.CombineUploads}},{key:"channelName",get:function(){return I.j.COMBINE_UPLOADS}},{key:"initialize",value:function(){this.initializeServices(),this.initializeCollections(),this.bindListeners()}},{key:"initializeServices",value:function(){this.videoUploadService=a.u.getInstance(P.K.VideoUpload,this),this.pendingItemsService=a.u.getInstance(P.K.PendingItems,this),this.alertService=a.u.getInstance(r.P.ALERT,this)}},{key:"initializeCollections",value:function(){this.uploads=this.videoUploadService.getCollection(),this.pendingItems=this.pendingItemsService.getPendingItems(),this.combined=new D,this.erroredVideos=new c.Q.FE,this.uploads.each(this.addUpload,this),this.pendingItems.each(this.addPendingItem,this)}},{key:"bindListeners",value:function(){this.listenTo(this.uploads,"add",this.addUpload),this.listenTo(this.pendingItems,"add",this.addPendingItem),this.listenTo(this.uploads,"remove",this.removeUpload),this.listenTo(this.pendingItems,"remove",this.removePendingItem),this.listenTo(this.uploads,"change",this.onChangeUpload),this.listenTo(this.pendingItems,"change",this.onChangePendingItem),this.listenTo(m.Q4.PENDING_ITEMS,l.S.PENDING_ITEM_READY_TO_WATCH,this.onPendingItemReadyToWatch)}},{key:"getUploadAttrs",value:function(e){return{id:e.get("id"),name:e.get("name"),progress:e.get("progress"),status:k.f.Uploading,pendingProcessId:e.get("pendingProcessId"),categoryId:e.get("categoryId")}}},{key:"getPendingItemAttrs",value:function(e){var t,n,i;return{id:e.get("pendingProcessId"),name:null===(t=e.get("video"))||void 0===t?void 0:t.get("name"),progress:e.get("foregroundProgress"),status:f.hasError(e)?k.f.Errored:k.f.Processing,pendingProcessId:e.get("pendingProcessId"),videoId:null===(n=e.get("video"))||void 0===n?void 0:n.get("id"),thumbnailUrl:e.get("thumbnailUrl"),video:null===(i=e.get("video"))||void 0===i?void 0:i.toJSON(),categoryId:e.get("categoryId")}}},{key:"addUpload",value:function(e){this.combined.add(this.getUploadAttrs(e))}},{key:"addPendingItem",value:function(e){var t=this.combined.findWhere({pendingProcessId:e.get("pendingProcessId")});t?t.set(this.getPendingItemAttrs(e)):this.combined.add(this.getPendingItemAttrs(e))}},{key:"removeUpload",value:function(e){var t=this.combined.get(e.get("id"));this.combined.remove(t),this.erroredVideos.remove(t)}},{key:"removePendingItem",value:function(e){var t=this.combined.get(e.get("pendingProcessId"));this.combined.remove(t),this.erroredVideos.remove(t),t.get("pendingProcessStatus")!==g.g.Completed&&i.Radio.channel(this.channelName).trigger(l.S.PROCESSING_CANCELLED)}},{key:"onChangeUpload",value:function(e){this.combined.get(e.get("id")).set(this.getUploadAttrs(e))}},{key:"onChangePendingItem",value:function(e){var t=this.combined.get(e.get("pendingProcessId"));t.set(this.getPendingItemAttrs(e)),f.hasError(e)&&this.onPendingItemError(t)}},{key:"onPendingItemError",value:function(e){if(!this.erroredVideos.findWhere({id:e.get("id")})){i.Radio.channel(this.channelName).trigger(l.S.PROCESSING_FAILED),this.erroredVideos.add(e);var t={heading:s.R6.Fail,type:s.NK.Fail,message:L("errorAlertMessage",{videoName:e.get("name")})},n=v.O.getCurrentContext().appLink;!!b.Y.getMyVideosAppLinks().find((function(e){return n.application===e.application&&n.action===e.action}))||(t.appLinkText=L("errorAlertAppLinkText"),t.appLinkClassName="info-link",t.appLink={application:I.O.MY_VIDEOS,action:y.e.MyVideos.MY_VIDEOS}),this.alertService.createAlert(t)}}},{key:"onPendingItemReadyToWatch",value:function(e){var t=e.get("video"),n={application:I.O.VIDEOS,action:y.e.Videos.PLAY_VIDEO,args:[t.get("id"),u.m.slugify(t.get("name"))]};this.alertService.createAlert({type:s.NK.Success,heading:L("completeUploadAlertHeading",{videoName:t.get("name")}),message:L("completeUploadAlertMessage",{videoName:t.get("name")}),appLink:n,appLinkText:L("completeUploadAlertAppLinkText",{videoName:t.get("name")}),appLinkClassName:"info-link"})}},{key:"cancelUpload",value:function(e){this.videoUploadService.cancelUpload(e)}},{key:"cancelProcessing",value:function(e){var t=this.pendingItems.findWhere({pendingProcessId:e});this.pendingItemsService.clearPendingItem(t)}},{key:"retryItem",value:function(e){var t=this;e.status===k.f.Uploading&&c.Q.Ry.throw(new o.H("Cannot retry uploading items.")),this.erroredVideos.remove(e);var n=this.pendingItems.findWhere({pendingProcessId:e.id});this.pendingItemsService.retryPendingItem(n,(function(){t.pendingItemsService.forceFetchPendingItems()}))}},{key:"editUpload",value:function(e){e.status===k.f.Uploading&&(this.uploads.get(e.id).get("sending")||c.Q.C$.trigger({application:I.O.UPLOAD,action:y.e.Upload.EDIT_UPLOAD,args:[e.id]}))}},{key:"updateUploadMetadata",value:function(e,t){var n=this.combined.findWhere({videoId:e});n&&n.set({name:t})}},{key:"getCollection",value:function(){return this.combined}}]),t}(c.Q.t6)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[717],{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(32725);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={partialOptions:"Gufgq",partialName:"SicQQ",partialDescription:"dPGMq",partialThumbnail:"vZrnb",partialDragHandle:"iq73R"};function s(e){return a.createElement("div",{className:"mx-2"},Array(e.numVideos).fill(null).map((function(t,n){return a.createElement("div",{className:"d-flex",key:n},e.allowBulkActions&&a.createElement("div",{className:"form-check pe-3 pe-sm-2 mx-0 mx-md-2"}),a.createElement(u,Object.assign({},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"," flex-grow-1")},a.createElement(i.Z,Object.assign({},o.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(n?"pb-2 pe-1":"mb-1 pe-3 pe-md-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}))}}},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:()=>K});var a=n(32735),r=n(70680),i=n(23481),o=n(20354),l=n(110),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(22902),S=n(79612),C=n(32725),N=n(14070),O=n(97291),j=n(65986),L=n(41063),A=n(27638),T=n(86698),F=n(44110),U=n(85369),x=n(97816),I=n(56017),P=n(33192),D=n(4632),B=n(54610),M=n(67453),_=n(37808),Y=n(82431),V="contentUpdates.contentUpdatesView";function Z(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,getSubTextAppLink:function(e){return Y.j.getSeriesAppLink(e.series)},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:V,phrase:"showMore",options:{classificationName:t.name}}))))}var q=n(74696);const R={partialBanner:"bxaA6"};function H(){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(R.partialBanner)}),a.createElement(q.S,null),";")})))}function z(e){return z="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},z(e)}function G(e,t,n){var a;return a=function(e,t){if("object"!=z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!=z(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==z(a)?a:String(a))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(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 W=5,J="contentUpdates.contentUpdatesView",Q=i.T.encloseNamespace(J);function K(e){var t,n,i,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 $(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)?$(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.")}()),V=Y[0],q=Y[1],R=(0,r.I0)(),z=(0,w.Z)(),K=(0,k.T)().hasPermissions,X=K(v.C.FollowSubjects),ee=new Date,te=l.O.format(l.O.endOf(l.O.subtract(ee,1,"year"),"day"),"YYYY-MM-DD"),ne=l.O.format(l.O.endOf(ee,"day"),"YYYY-MM-DD"),ae=o.a.useBasicFetch(y.L.config()),re=o.a.useBasicFetch(g.N.currentUser()),ie=o.a.useBasicFetch((null===(t=re.data)||void 0===t?void 0:t.isAuthenticated)&&b.h.yearGroups(re.data.customerId)),oe=(0,T.y)({redirectOnError:!0}).activePresentation;(0,S.M)(I.C.getDefaultMetadata({title:null==oe?void 0:oe.name,phraseContext:{phraseHandler:Q,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:P.f.getCanonicalLink(),allowIndexing:P.f.allowIndexing(),hrefLang:P.f.getStaticRouteHrefLang(null==oe?void 0:oe.learningLevel,(function(){return{application:O.O.CONTENT_UPDATES,action:N.e.ContentUpdates.CONTENT_UPDATES}}))}));var le=u.v.getContentUpdates(null==oe?void 0:oe.id,te,ne),ce=o.a.useBasicFetch(oe&&le),se=o.a.useBasicFetch(X&&h.o.mySubjectPreferences()),ue=(0,F.i)(),de=[],fe=[];ce.data&&ce.data.forEach((function(e){de.push(e.id),fe=fe.concat(e.videos)}));var pe=(0,E.f)(de,(function(e){return u.v.getClassifications(e)})).items,me=(0,j._)(j.i.VideoItem);(0,x.V)(fe,{hasCurriculumLinks:!0,flightNamespace:null===(n=le.normalizeOptions)||void 0===n?void 0:n.namespace});var ve=(0,A.u)(s.LZ.VideoThumbnail,null===(i=le.normalizeOptions)||void 0===i?void 0:i.namespace),ye=ve.setFavourite,be=ve.canFavourite;function he(e,t,n){q((function(t){return Object.assign(Object.assign({},t),G({},e,!0))}));var a=function(){var a;q((function(t){return Object.assign(Object.assign({},t),G({},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}),z.success(Q(n?"followed":"unfollowed",{classification:null===(a=pe[e])||void 0===a?void 0:a.name,escapeText:!0}))},r=function(){q((function(t){return Object.assign(Object.assign({},t),G({},e,!1))})),z.error(Q("error"))},i=n?h.o.followSubjects([e],a,r):h.o.unfollowSubjects([e],a,r);o.a.fetch(R,i)}var ge=(0,U.N)(),we=ge.showCalendar,Ee=ge.isLoading,ke=!(!(ce.hasCompleted&&ae.hasCompleted&&ue.hasCompleted)||X&&!se.hasCompleted||!pe||Ee),Se=function(e,t){return e&&t?e.map((function(e){return{showMore:e.videos.length>W,classification:t[e.id],videos:e.videos.slice(0,W).map((function(e){return e.classification=t[e.id],e})).filter((function(e){return e}))}})).filter((function(e){return e.classification})):null}(ce.data,pe),Ce=null!==(B=null===(D=se.data)||void 0===D?void 0:D.map((function(e){return e.id})))&&void 0!==B?B:[],Ne=K(v.C.ManageSubjectPreferences),Oe=(0,L.b)();return a.createElement(m.M.Provider,{value:me},a.createElement("div",{className:"bg-white px-3"},!Ee&&a.createElement(d.z,{type:C.Yv.Staff,appLinks:{forYou:e.appLinks.dashboardAppLink,whatsNew:e.appLinks.whatsNewAppLink,calendar:e.appLinks.calendarAppLink},showCalendar:we,active:"whatsNew"}),a.createElement("h1",null,a.createElement(p.x,{namespace:J,phrase:"heading"})),(Ne||Oe)&&a.createElement("p",null,Ne&&a.createElement(a.Fragment,null,a.createElement(p.x,{namespace:J,phrase:"onlyRelevant"})," ",a.createElement(f.F,{className:"info-link",appLink:{application:O.O.SETTINGS,action:N.e.Settings.TOPIC_PREFERENCES}},a.createElement(p.x,{namespace:J,phrase:"updatePreferences"}))),Oe&&a.createElement("span",{className:"d-block"},a.createElement(f.F,{className:"info-link",appLink:{application:O.O.SETTINGS,action:N.e.Settings.CONTENT_REVIEW}},a.createElement(p.x,{namespace:J,phrase:"contentReview"})))),ke?a.createElement(a.Fragment,null,Se.map((function(t,n){var r,i;return a.createElement(Z,{key:n,classification:t.classification,videos:t.videos,yearGroups:ie.data,imageCdnUrl:ae.data.imageCdnUrl,showMore:t.showMore,appLinks:e.appLinks,followed:Ce.includes(null===(r=t.classification)||void 0===r?void 0:r.id),follow:he,showFollowSpinner:V[null===(i=t.classification)||void 0===i?void 0:i.id],canFollow:X,setFavourite:ye,canFavourite:be,audiences:ue.data})}))):a.createElement(H,null)))}},87821:(e,t,n)=>{n.d(t,{p:()=>r});var a=n(110),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.O.format(e.lastTimeWatched),n=a.O.format(t,"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))}},85369:(e,t,n)=>{n.d(t,{N:()=>b});var a=n(32735),r=n(35242),i=n(20354),o=n(27022),l=n(72639),c=n(31949),s=n(37802),u=n(10144),d=n(86698);function f(e){return f="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},f(e)}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,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 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}}(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 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 v(e,t,n){var a;return a=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!=f(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==f(a)?a:String(a))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=v(v(v(v(v(v({},o.t.AU,[l.p.Level_1]),o.t.US,[l.p.Level_1]),o.t.UK,[l.p.Level_1]),o.t.SCOT,[l.p.Level_1]),o.t.NZ,[]),o.t.GLOBAL,[]);function b(){var e,t=(0,s.r)(null),n=t.hasSpecialEventCalendar,o=t.isLoadingSettings,l=(0,d.y)({redirectOnError:!0}).activePresentation,f=i.a.useBasicFetch(c.N.currentUser()),m=y[null===(e=f.data)||void 0===e?void 0:e.contentRegion],v=u.i.getMappedPresentationLevel(null==l?void 0:l.learningLevel),b=!(null==m?void 0:m.find((function(e){return e.toString()===(null==v?void 0:v.toString())}))),h=!o&&!n,g=p(a.useState(!h&&!b),2),w=g[0],E=g[1],k=p(a.useState(o||!(null==l?void 0:l.id)),2),S=k[0],C=k[1];return a.useEffect((function(){h||b?E(!1):S||E(!0),C(o||!(null==l?void 0:l.id))}),[n,null==l?void 0:l.id,S]),r.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:w,isLoading:S}}},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"}}}]);