@clickview/exchange 0.39.0 → 0.40.0-rc.0

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 (43) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/languages/en.json +1 -1
  3. package/dist/scripts/{127-fff9e00092-exchange.chunk.js → 127-92dc016a93-exchange.chunk.js} +1 -1
  4. package/dist/scripts/{156-a369c2a765-exchange.chunk.js → 156-bb118cf50b-exchange.chunk.js} +1 -1
  5. package/dist/scripts/{212-fe4ed18ba6-exchange.chunk.js → 212-c3bd645e6c-exchange.chunk.js} +1 -1
  6. package/dist/scripts/{226-310258d590-exchange.chunk.js → 226-f0592dee10-exchange.chunk.js} +1 -1
  7. package/dist/scripts/{267-a69e20c67b-exchange.chunk.js → 267-ef0b473b5b-exchange.chunk.js} +1 -1
  8. package/dist/scripts/{332-a15f8f6329-exchange.chunk.js → 332-7b0dc13857-exchange.chunk.js} +1 -1
  9. package/dist/scripts/{356-ee94674043-exchange.chunk.js → 356-210e55d8fa-exchange.chunk.js} +1 -1
  10. package/dist/scripts/{442-7d8c06bafa-exchange.chunk.js → 442-fbffc82edc-exchange.chunk.js} +1 -1
  11. package/dist/scripts/457-ad15c6044e-exchange.chunk.js +1 -0
  12. package/dist/scripts/{494-6454060c57-exchange.chunk.js → 494-fb999f8f33-exchange.chunk.js} +2 -2
  13. package/dist/scripts/522-37ac36517c-exchange.chunk.js +2 -0
  14. package/dist/scripts/538-129609b691-exchange.chunk.js +2 -0
  15. package/dist/scripts/558-26876df8ca-exchange.chunk.js +1 -0
  16. package/dist/scripts/{669-f8db61a3b5-exchange.chunk.js → 669-69f6cb92a9-exchange.chunk.js} +1 -1
  17. package/dist/scripts/75-7581313572-exchange.chunk.js +1 -0
  18. package/dist/scripts/761-00724e0b59-exchange.chunk.js +2 -0
  19. package/dist/scripts/{782-c9c274aa02-exchange.chunk.js → 782-bab82c17c1-exchange.chunk.js} +1 -1
  20. package/dist/scripts/{851-416bd6edca-exchange.chunk.js → 851-a3f5bf925d-exchange.chunk.js} +2 -2
  21. package/dist/scripts/{881-0889a79d75-exchange.chunk.js → 881-716ddfc816-exchange.chunk.js} +1 -1
  22. package/dist/scripts/95-24ea1f4f33-exchange.chunk.js +2 -0
  23. package/dist/scripts/bundle-818d86208c.min.js +2 -0
  24. package/package.json +1 -1
  25. package/dist/scripts/457-3fdb89469c-exchange.chunk.js +0 -1
  26. package/dist/scripts/497-2c41a372b8-exchange.chunk.js +0 -2
  27. package/dist/scripts/761-88c0dfbffd-exchange.chunk.js +0 -2
  28. package/dist/scripts/773-7409ad2920-exchange.chunk.js +0 -2
  29. package/dist/scripts/88-dff85bddb4-exchange.chunk.js +0 -1
  30. package/dist/scripts/979-e7bc1b2deb-exchange.chunk.js +0 -2
  31. package/dist/scripts/bundle-087cf63970.min.js +0 -2
  32. /package/dist/css/{773-exchange-1387f35e92.chunk.css → 522-exchange-1387f35e92.chunk.css} +0 -0
  33. /package/dist/css/{497-exchange-4cbfe56ba3.chunk.css → 538-exchange-4cbfe56ba3.chunk.css} +0 -0
  34. /package/dist/css/{88-exchange-6d2304419c.chunk.css → 75-exchange-6d2304419c.chunk.css} +0 -0
  35. /package/dist/css/{979-exchange-4cbfe56ba3.chunk.css → 95-exchange-4cbfe56ba3.chunk.css} +0 -0
  36. /package/dist/scripts/{494-6454060c57-exchange.chunk.js.LICENSE.txt → 494-fb999f8f33-exchange.chunk.js.LICENSE.txt} +0 -0
  37. /package/dist/scripts/{497-2c41a372b8-exchange.chunk.js.LICENSE.txt → 522-37ac36517c-exchange.chunk.js.LICENSE.txt} +0 -0
  38. /package/dist/scripts/{761-88c0dfbffd-exchange.chunk.js.LICENSE.txt → 538-129609b691-exchange.chunk.js.LICENSE.txt} +0 -0
  39. /package/dist/scripts/{726-ceeb7501b9-exchange.chunk.js → 726-0326486cac-exchange.chunk.js} +0 -0
  40. /package/dist/scripts/{773-7409ad2920-exchange.chunk.js.LICENSE.txt → 761-00724e0b59-exchange.chunk.js.LICENSE.txt} +0 -0
  41. /package/dist/scripts/{851-416bd6edca-exchange.chunk.js.LICENSE.txt → 851-a3f5bf925d-exchange.chunk.js.LICENSE.txt} +0 -0
  42. /package/dist/scripts/{979-e7bc1b2deb-exchange.chunk.js.LICENSE.txt → 95-24ea1f4f33-exchange.chunk.js.LICENSE.txt} +0 -0
  43. /package/dist/scripts/{bundle-087cf63970.min.js.LICENSE.txt → bundle-818d86208c.min.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- /*! For license information please see 494-6454060c57-exchange.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[494],{32119:(e,t,r)=>{r.d(t,{G:()=>o});var a=r(32735),n=r(71365);function o(e){var t,r;return t=e,r=n.u.getInstance(t),a.useEffect((function(){return function(){n.u.releaseInstance(t)}})),r}},69883:(e,t,r)=>{r.d(t,{Z:()=>i});var a=r(79976),n=r(60139),o=r(32119);function i(){var e=(0,o.G)(a.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:n.NK.Warning,heading:n.R6.Warning,message:t})},info:function(t,r){e.createAlert({heading:t,message:r,type:n.NK.Info})}}}},23455:(e,t,r)=>{r.d(t,{h:()=>i});var a=r(32735),n=r(81886),o=r(20470);function i(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.useEffect((function(){t.length&&t.some(n.Q.Ry.isStatusCodeError)&&n.Q.Ry.throw(new o.x)}),t)}},5353:(e,t,r)=>{r.d(t,{i:()=>d});var a,n=r(99940),o=r(97395),i=r(14965);!function(e){e[e.AllResults=0]="AllResults",e[e.Subtitles=1]="Subtitles",e[e.TitleAndDescription=2]="TitleAndDescription"}(a||(a={}));var c=r(55812);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function u(e){return Object.entries(e).reduce((function(e,t){var r,a,n=(a=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=o.call(r)).done)&&(c.push(a.value),c.length!==t);s=!0);}catch(e){u=!0,n=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw n}}return c}}(r,a)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.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)?s(e,t):void 0}}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];return e[o.charAt(0).toLowerCase()+o.slice(1)]=i,e}),{})}function l(e){return e?Array.isArray(e)?function(e){return e.map(u)}(e):u(e):null}var d={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:l}},region:function(e){return{url:"/api/tv/api/v2/regions/".concat(e),key:"tv:region:".concat(e),normalize:!1,formatData:l}},dateRange:function(e){return{url:"/api/tv/api/v2/regions/".concat(e,"/daterange"),key:"tv:region:".concat(e,":daterange"),normalize:!1,formatData:l}},channels:function(e){return{url:o._.urlBuilder("/api/tv/api/v2/channels",{region:e}),key:"tv:channels:".concat(e),normalize:!1,formatData:function(e){return l(e).sort((function(e,t){return e.sortOrder-t.sortOrder}))}}},payTvChannels:function(){return{url:"/api/tv/v1/pay-tv/channels/all",key:"pay:tv:channels",normalize:!1,formatData:l}},programsByChannel:function(e,t,r,a){return{url:o._.urlBuilder("/api/tv/api/v3/regions/".concat(e,"/channels/programs"),{channel:t,startDate:r,endDate:a}),key:["tv:programs:by:channel",e,t,r,a].join(":"),normalize:!1,formatData:l}},programsByLetter:function(e,t,r,a){return{url:o._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:e,startsWith:t,startDate:r,endDate:a}),key:["tv:programs:by:letter",e,t,r,a].join(":"),normalize:!1,formatData:l}},program:function(e){return{url:"/api/tv/api/v3/programs/".concat(e),key:"tv:programs:".concat(e),normalize:!1,formatData:function(e){var t=l(e);return t.region=l(e.Region),t}}},search:function(e,t,r){var n=t.query,i=t.dateBroadcast,s=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}(t,["query","dateBroadcast"]),u=r||1,d=s.filter||a.AllResults;return{url:o._.urlBuilder("/api/tv/api/v4/search",Object.assign(Object.assign(Object.assign({region:e,query:n,filter:d},c.a.getDateBroadcastParams(i)),s),{page:u,size:25})),key:["tv:search",n,e,Object.values(Object.assign({filter:d,dateBroadcast:i},s)).join(":"),u].join(":"),normalize:!1,formatData:function(e){var t=l(e);return t.results=l(e.Results),t.page=u,t}}},addFullVideo:function(e,t){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:n.k.POST,data:e,invalidationKeys:"tv:workspace:video:".concat(t)}},addAdFreeVideo:function(e,t){return{url:o._.urlBuilder("/api/tv/v4/programs/".concat(e.id,"/ad-free"),{customerId:e.customerId,userId:e.userId}),key:"tv:add:ad:free:video",normalize:!1,type:n.k.POST,invalidationKeys:"tv:workspace:video:".concat(t)}},adFreeCredits:function(e,t,r){var a=new Date;a.setHours(0,0,0,0),a.setMinutes(a.getMinutes()+a.getTimezoneOffset());var n=i.O.add(a,1,"day");return{url:o._.urlBuilder("/api/tv/v4/user-requests",{userId:e,customerId:t,regionCode:r,from:i.O.convertUTCToLocal(a).toISOString(),to:i.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:l}},createAdFreeRequest:function(e){return{url:o._.urlBuilder("/api/tv/v4/user-requests/ad-free",{userId:e.userId,customerId:e.customerId}),key:"tv:create:add:free:request",normalize:!1,type:n.k.POST,data:{programId:e.programId,regionCode:e.regionCode},invalidationKeys:["tv:add:free:credits"]}},workspaceVideo:function(e,t,r){return{url:o._.urlBuilder("/api/tv/v4/workspace/programs/".concat(e),{userId:t,customerId:r}),key:"tv:workspace:video:".concat(e),formatData:l}},requestProgram:function(e){return{url:"/api/tv/v1/pay-tv/user-requests",key:"tv:request:program",type:n.k.POST,data:e}},requestProgramUk:function(e){return{url:"/api/tv/api/v1/user-requests/program",key:"tv:request:program:uk",type:n.k.POST,data:e}}}},55812:(e,t,r)=>{r.d(t,{a:()=>i});var a=r(57900),n=r(14965),o=r(1048),i={getFormattedDateRange:function(e,t){return"".concat(n.O.format(e,"Do MMMM YYYY")," - ").concat(n.O.format(t,"Do MMMM YYYY"))},getDateBroadcastParams:function(e){var t=function(e){return n.O.format(e,"YYYY-MM-DD")},r=t(new Date);switch(e){case"yesterday":return{from:t(n.O.subtract(r,1,"day")),to:r};case"last-week":return{from:t(n.O.subtract(r,7,"days")),to:r};case"last-2-weeks":return{from:t(n.O.subtract(r,14,"days")),to:r}}},isHolidayPeriod:function(){var e,t=(e=a.SG.get("cv:holiday:dates"),o.t.isObject(e)?e:{startMonth:12,startDay:15,endMonth:1,endDay:6}),r=t.startMonth,n=t.startDay,i=t.endMonth,c=t.endDay,s=new Date,u=s.getMonth()+1,l=s.getDate();return u===r&&l>=n||u===i&&l<=c}}},22494:(e,t,r)=>{r.r(t),r.d(t,{TvAddView:()=>P});var a=r(32735),n=r(23481),o=r(81886),i=r(20354),c=r(11607);const s={selected:"zWik0",disabled:"bMSMv"};function u(e){var t,r,n,o,i,u="text-center cursor-pointer p-3 border rounded-3 mx-2 user-select-none w-50";return e.selected&&(u+=" border-info ".concat(s.selected)),(null===(t=e.option)||void 0===t?void 0:t.disabled)&&(u+=" ".concat(s.disabled)),a.createElement(c.L,{onClick:function(){var t;(null===(t=e.option)||void 0===t?void 0:t.disabled)||e.onSelect(e.option)},className:u},(null===(r=e.option)||void 0===r?void 0:r.imageUrl)&&a.createElement("img",{src:e.option.imageUrl,className:"img-fluid my-3 ".concat(null!==(n=e.option.imageClassName)&&void 0!==n?n:""),draggable:!1}),(null===(o=e.option)||void 0===o?void 0:o.title)&&a.createElement("h2",{className:"h3"},e.option.title),(null===(i=e.option)||void 0===i?void 0:i.description)&&a.createElement("p",{className:"mb-0",dangerouslySetInnerHTML:{__html:e.option.description}}),e.children)}var l=r(77696),d=r(13876),f=r(83345),p=r(31949),m=r(23455),v=r(73818),h=r(82329),y=r(99742),g=r(5353),b=r(60139),w=r(49985),E=r(65858),A=r(69883),k=r(65185);function O(e){return O="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},O(e)}function x(){x=function(){return t};var e,t={},r=Object.prototype,a=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,a){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new L(a||[]);return n(i,"_invoke",{value:T(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",p="suspendedYield",m="executing",v="completed",h={};function y(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,A=E&&E(E(C([])));A&&A!==r&&a.call(A,i)&&(w=A);var k=b.prototype=y.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function D(e,t){function r(n,o,i,c){var s=d(e[n],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==O(l)&&a.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(l).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(s.arg)}var o;n(this,"_invoke",{value:function(e,a){function n(){return new t((function(t,n){r(e,a,t,n)}))}return o=o?o.then(n,n):n()}})}function T(t,r,a){var n=f;return function(o,i){if(n===m)throw Error("Generator is already running");if(n===v){if("throw"===o)throw i;return{value:e,done:!0}}for(a.method=o,a.arg=i;;){var c=a.delegate;if(c){var s=I(c,a);if(s){if(s===h)continue;return s}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===f)throw n=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=m;var u=d(t,r,a);if("normal"===u.type){if(n=a.done?v:p,u.arg===h)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(n=v,a.method="throw",a.arg=u.arg)}}}function I(t,r){var a=r.method,n=t.iterator[a];if(n===e)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),h;var o=d(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function C(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function r(){for(;++n<t.length;)if(a.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(O(t)+" is not iterable")}return g.prototype=b,n(k,"constructor",{value:b,configurable:!0}),n(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(D.prototype),u(D.prototype,c,(function(){return this})),t.AsyncIterator=D,t.async=function(e,r,a,n,o){void 0===o&&(o=Promise);var i=new D(l(e,r,a,n),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(k),u(k,s,"Generator"),u(k,i,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=C,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(F),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(a,n){return c.type="throw",c.arg=t,r.next=a,n&&(r.method="next",r.arg=e),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),F(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;F(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,a){return this.delegate={iterator:C(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=e),h}},t}var S=function(e,t,r,a){return new(r||(r=Promise))((function(n,o){function i(e){try{s(a.next(e))}catch(e){o(e)}}function c(e){try{s(a.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}s((a=a.apply(e,t||[])).next())}))},D=n.T.encloseNamespace("tv.addRequests"),T=r(55812);const I={circle:"v0QaY"};function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}var F="tv.add",L=n.T.encloseNamespace(F),C={id:"ad-free",title:"adFreeTitle",description:"adFreeDescription",imageUrl:y.W.General.MOUNTAINS_FRAMED},_={id:"request-ad-free",title:"adFreeTitle",imageUrl:y.W.General.MOUNTAINS_FRAMED},j={id:"full-video",title:"fullVideoTitle",description:"fullVideoDescription",imageUrl:y.W.General.ANNOUNCEMENT_FRAMED};function P(e){var t=i.a.useBasicFetch(p.N.currentUser()),r=i.a.useBasicFetch(g.i.program(e.id)),n=i.a.useBasicFetch(t.data&&g.i.adFreeCredits(t.data.id,t.data.customerId,e.region)),c=function(e,t){var r=i.a.useGetFetchAsync(),a=(0,A.Z)(),n=i.a.useBasicFetch(p.N.currentUser()),c=i.a.useBasicFetch(p.N.workspace()),s=i.a.useBasicFetch(g.i.program(e)),u=i.a.useBasicFetch(g.i.region(t)),l=i.a.useBasicFetch(s.data&&n.data&&g.i.workspaceVideo(s.data.id,n.data.id,n.data.customerId));return{requestAdFreeVideo:function(){var e;return S(this,void 0,void 0,x().mark((function t(){var i,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r(g.i.createAdFreeRequest({programId:s.data.id,regionCode:u.data.code,userId:n.data.id,customerId:n.data.customerId}));case 3:a.success({heading:k.R.Success,message:D("requestAdFreeSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.AD_FREE_REQUEST,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AdFreeRequest,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),(i=null===(e=t.t0.responseJSON)||void 0===e?void 0:e.message)?(c=JSON.parse(i),a.error(D(c.Type,{video:s.data.title}))):a.error(D("error"));case 12:case"end":return t.stop()}}),t,null,[[0,8]])})))},addAdFreeVideo:function(){return S(this,void 0,void 0,x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.data.exists||!l.data.hasAdFree){e.next=3;break}return o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,params:{alreadyAdded:!0}}),e.abrupt("return");case 3:return e.prev=3,t={id:s.data.id,userId:n.data.id,customerId:n.data.customerId},e.next=7,r(g.i.addAdFreeVideo(t,s.data.id));case 7:a.success({heading:k.R.Success,message:D("addAdFreeSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AddAdFreeVideo,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),a.error(D("error"));case 15:case"end":return e.stop()}}),e,null,[[3,12]])})))},addFullVideo:function(){return S(this,void 0,void 0,x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.data.exists){e.next=3;break}return o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,params:{alreadyAdded:!0}}),e.abrupt("return");case 3:return e.prev=3,t={userId:n.data.id,customerId:n.data.customerId,globalId:s.data.globalId,libraryId:c.data.id},e.next=7,r(g.i.addFullVideo(t,s.data.id));case 7:a.success({heading:k.R.Success,message:D("addFullSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AddFullVideo,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),a.error(D("error"));case 15:case"end":return e.stop()}}),e,null,[[3,12]])})))}}}(e.id,e.region),s=c.requestAdFreeVideo,y=c.addAdFreeVideo,O=c.addFullVideo;(0,m.h)(r.statusCode);var P,M,R=(P=a.useState(null),M=2,function(e){if(Array.isArray(e))return e}(P)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=o.call(r)).done)&&(c.push(a.value),c.length!==t);s=!0);}catch(e){u=!0,n=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw n}}return c}}(P,M)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var r={}.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)?N(e,t):void 0}}(P,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=R[0],q=R[1],B=!Number.isNaN(e.currentTime),U=n.data&&n.data.userRequests<n.data.maxAvailableCredit,Y=n.data&&n.data.maxAvailableCredit-n.data.userRequests;a.useEffect((function(){n.hasCompleted&&(U||q(j))}),[n,U]);var z=t.hasCompleted&&r.hasCompleted&&n.hasCompleted,G=(null==V?void 0:V.id)===_.id&&T.a.isHolidayPeriod();return a.createElement(l.G,{size:"lg",title:L("title"),showLoadingSpinner:!z,closePopup:e.closePopup},z&&a.createElement(a.Fragment,null,a.createElement("div",{className:"d-flex mb-3 mx-n2"},r.data.hasAdsFree&&a.createElement(u,{option:{id:C.id},onSelect:q,selected:(null==V?void 0:V.id)===C.id},a.createElement("img",{src:C.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:C.title})),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:C.description}))),!r.data.hasAdsFree&&a.createElement(u,{option:{id:_.id,disabled:!U},onSelect:q,selected:(null==V?void 0:V.id)===_.id},a.createElement("img",{src:_.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("div",{className:"d-flex justify-content-center align-items-center mb-1"},a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:_.title})),a.createElement("span",{className:"badge bg-dark rounded-circle ms-2 ".concat(I.circle)},Y)),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:U?"requestAdFreeDescription":"noRequestsDescription"}))),a.createElement(u,{option:{id:j.id},onSelect:q,selected:(null==V?void 0:V.id)===j.id},a.createElement("img",{src:j.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:j.title})),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:j.description})))),G&&a.createElement("div",{className:"alert alert-warning",role:"alert"},a.createElement("h3",{className:"h5"},a.createElement(f.x,{namespace:F,phrase:"adFreeAlertHeading"})),a.createElement("p",{className:"m-0"},a.createElement(f.x,{namespace:F,phrase:"adFreeAlertBody"})))),a.createElement(d.u,null,a.createElement(d.u.Cancel,{text:L(B?"back":"close"),onClick:function(){B?o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.PREVIEW,args:[e.region,r.data.id],params:{currentTime:e.currentTime}}):e.closePopup()},variant:"link"}),a.createElement(d.u.Submit,{text:L("continue"),onClick:function(){V&&(V.id===j.id&&O(),V.id===C.id&&y(),V.id===_.id&&s())},variant:"dark",disabled:!V})))}}}]);
1
+ /*! For license information please see 494-fb999f8f33-exchange.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[494],{32119:(e,t,r)=>{r.d(t,{G:()=>o});var a=r(32735),n=r(71365);function o(e){var t,r;return t=e,r=n.u.getInstance(t),a.useEffect((function(){return function(){n.u.releaseInstance(t)}})),r}},69883:(e,t,r)=>{r.d(t,{Z:()=>i});var a=r(79976),n=r(60139),o=r(32119);function i(){var e=(0,o.G)(a.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:n.NK.Warning,heading:n.R6.Warning,message:t})},info:function(t,r){e.createAlert({heading:t,message:r,type:n.NK.Info})}}}},23455:(e,t,r)=>{r.d(t,{h:()=>i});var a=r(32735),n=r(81886),o=r(20470);function i(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.useEffect((function(){t.length&&t.some(n.Q.Ry.isStatusCodeError)&&n.Q.Ry.throw(new o.x)}),t)}},5353:(e,t,r)=>{r.d(t,{i:()=>d});var a,n=r(99940),o=r(97395),i=r(14965);!function(e){e[e.AllResults=0]="AllResults",e[e.Subtitles=1]="Subtitles",e[e.TitleAndDescription=2]="TitleAndDescription"}(a||(a={}));var c=r(55812);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function u(e){return Object.entries(e).reduce((function(e,t){var r,a,n=(a=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=o.call(r)).done)&&(c.push(a.value),c.length!==t);s=!0);}catch(e){u=!0,n=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw n}}return c}}(r,a)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.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)?s(e,t):void 0}}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];return e[o.charAt(0).toLowerCase()+o.slice(1)]=i,e}),{})}function l(e){return e?Array.isArray(e)?function(e){return e.map(u)}(e):u(e):null}var d={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:l}},region:function(e){return{url:"/api/tv/api/v2/regions/".concat(e),key:"tv:region:".concat(e),normalize:!1,formatData:l}},dateRange:function(e){return{url:"/api/tv/api/v2/regions/".concat(e,"/daterange"),key:"tv:region:".concat(e,":daterange"),normalize:!1,formatData:l}},channels:function(e){return{url:o._.urlBuilder("/api/tv/api/v2/channels",{region:e}),key:"tv:channels:".concat(e),normalize:!1,formatData:function(e){return l(e).sort((function(e,t){return e.sortOrder-t.sortOrder}))}}},payTvChannels:function(){return{url:"/api/tv/v1/pay-tv/channels/all",key:"pay:tv:channels",normalize:!1,formatData:l}},programsByChannel:function(e,t,r,a){return{url:o._.urlBuilder("/api/tv/api/v3/regions/".concat(e,"/channels/programs"),{channel:t,startDate:r,endDate:a}),key:["tv:programs:by:channel",e,t,r,a].join(":"),normalize:!1,formatData:l}},programsByLetter:function(e,t,r,a){return{url:o._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:e,startsWith:t,startDate:r,endDate:a}),key:["tv:programs:by:letter",e,t,r,a].join(":"),normalize:!1,formatData:l}},program:function(e){return{url:"/api/tv/api/v3/programs/".concat(e),key:"tv:programs:".concat(e),normalize:!1,formatData:function(e){var t=l(e);return t.region=l(e.Region),t}}},search:function(e,t,r){var n=t.query,i=t.dateBroadcast,s=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}(t,["query","dateBroadcast"]),u=r||1,d=s.filter||a.AllResults;return{url:o._.urlBuilder("/api/tv/api/v4/search",Object.assign(Object.assign(Object.assign({region:e,query:n,filter:d},c.a.getDateBroadcastParams(i)),s),{page:u,size:25})),key:["tv:search",n,e,Object.values(Object.assign({filter:d,dateBroadcast:i},s)).join(":"),u].join(":"),normalize:!1,formatData:function(e){var t=l(e);return t.results=l(e.Results),t.page=u,t}}},addFullVideo:function(e,t){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:n.k.POST,data:e,invalidationKeys:"tv:workspace:video:".concat(t)}},addAdFreeVideo:function(e,t){return{url:o._.urlBuilder("/api/tv/v4/programs/".concat(e.id,"/ad-free"),{customerId:e.customerId,userId:e.userId}),key:"tv:add:ad:free:video",normalize:!1,type:n.k.POST,invalidationKeys:"tv:workspace:video:".concat(t)}},adFreeCredits:function(e,t,r){var a=new Date;a.setHours(0,0,0,0),a.setMinutes(a.getMinutes()+a.getTimezoneOffset());var n=i.O.add(a,1,"day");return{url:o._.urlBuilder("/api/tv/v4/user-requests",{userId:e,customerId:t,regionCode:r,from:i.O.convertUTCToLocal(a).toISOString(),to:i.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:l}},createAdFreeRequest:function(e){return{url:o._.urlBuilder("/api/tv/v4/user-requests/ad-free",{userId:e.userId,customerId:e.customerId}),key:"tv:create:add:free:request",normalize:!1,type:n.k.POST,data:{programId:e.programId,regionCode:e.regionCode},invalidationKeys:["tv:add:free:credits"]}},workspaceVideo:function(e,t,r){return{url:o._.urlBuilder("/api/tv/v4/workspace/programs/".concat(e),{userId:t,customerId:r}),key:"tv:workspace:video:".concat(e),formatData:l}},requestProgram:function(e){return{url:"/api/tv/v1/pay-tv/user-requests",key:"tv:request:program",type:n.k.POST,data:e}},requestProgramUk:function(e){return{url:"/api/tv/api/v1/user-requests/program",key:"tv:request:program:uk",type:n.k.POST,data:e}}}},55812:(e,t,r)=>{r.d(t,{a:()=>i});var a=r(67624),n=r(14965),o=r(1048),i={getFormattedDateRange:function(e,t){return"".concat(n.O.format(e,"Do MMMM YYYY")," - ").concat(n.O.format(t,"Do MMMM YYYY"))},getDateBroadcastParams:function(e){var t=function(e){return n.O.format(e,"YYYY-MM-DD")},r=t(new Date);switch(e){case"yesterday":return{from:t(n.O.subtract(r,1,"day")),to:r};case"last-week":return{from:t(n.O.subtract(r,7,"days")),to:r};case"last-2-weeks":return{from:t(n.O.subtract(r,14,"days")),to:r}}},isHolidayPeriod:function(){var e,t=(e=a.SG.get("cv:holiday:dates"),o.t.isObject(e)?e:{startMonth:12,startDay:15,endMonth:1,endDay:6}),r=t.startMonth,n=t.startDay,i=t.endMonth,c=t.endDay,s=new Date,u=s.getMonth()+1,l=s.getDate();return u===r&&l>=n||u===i&&l<=c}}},22494:(e,t,r)=>{r.r(t),r.d(t,{TvAddView:()=>P});var a=r(32735),n=r(23481),o=r(81886),i=r(20354),c=r(11607);const s={selected:"zWik0",disabled:"bMSMv"};function u(e){var t,r,n,o,i,u="text-center cursor-pointer p-3 border rounded-3 mx-2 user-select-none w-50";return e.selected&&(u+=" border-info ".concat(s.selected)),(null===(t=e.option)||void 0===t?void 0:t.disabled)&&(u+=" ".concat(s.disabled)),a.createElement(c.L,{onClick:function(){var t;(null===(t=e.option)||void 0===t?void 0:t.disabled)||e.onSelect(e.option)},className:u},(null===(r=e.option)||void 0===r?void 0:r.imageUrl)&&a.createElement("img",{src:e.option.imageUrl,className:"img-fluid my-3 ".concat(null!==(n=e.option.imageClassName)&&void 0!==n?n:""),draggable:!1}),(null===(o=e.option)||void 0===o?void 0:o.title)&&a.createElement("h2",{className:"h3"},e.option.title),(null===(i=e.option)||void 0===i?void 0:i.description)&&a.createElement("p",{className:"mb-0",dangerouslySetInnerHTML:{__html:e.option.description}}),e.children)}var l=r(77696),d=r(13876),f=r(83345),p=r(31949),m=r(23455),v=r(73818),h=r(82329),y=r(99742),g=r(5353),b=r(60139),w=r(49985),E=r(65858),A=r(69883),k=r(65185);function O(e){return O="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},O(e)}function x(){x=function(){return t};var e,t={},r=Object.prototype,a=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,a){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new L(a||[]);return n(i,"_invoke",{value:T(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",p="suspendedYield",m="executing",v="completed",h={};function y(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,A=E&&E(E(C([])));A&&A!==r&&a.call(A,i)&&(w=A);var k=b.prototype=y.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function D(e,t){function r(n,o,i,c){var s=d(e[n],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==O(l)&&a.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(l).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(s.arg)}var o;n(this,"_invoke",{value:function(e,a){function n(){return new t((function(t,n){r(e,a,t,n)}))}return o=o?o.then(n,n):n()}})}function T(t,r,a){var n=f;return function(o,i){if(n===m)throw Error("Generator is already running");if(n===v){if("throw"===o)throw i;return{value:e,done:!0}}for(a.method=o,a.arg=i;;){var c=a.delegate;if(c){var s=I(c,a);if(s){if(s===h)continue;return s}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===f)throw n=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=m;var u=d(t,r,a);if("normal"===u.type){if(n=a.done?v:p,u.arg===h)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(n=v,a.method="throw",a.arg=u.arg)}}}function I(t,r){var a=r.method,n=t.iterator[a];if(n===e)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),h;var o=d(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function C(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function r(){for(;++n<t.length;)if(a.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(O(t)+" is not iterable")}return g.prototype=b,n(k,"constructor",{value:b,configurable:!0}),n(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(D.prototype),u(D.prototype,c,(function(){return this})),t.AsyncIterator=D,t.async=function(e,r,a,n,o){void 0===o&&(o=Promise);var i=new D(l(e,r,a,n),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(k),u(k,s,"Generator"),u(k,i,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=C,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(F),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(a,n){return c.type="throw",c.arg=t,r.next=a,n&&(r.method="next",r.arg=e),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),F(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;F(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,a){return this.delegate={iterator:C(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=e),h}},t}var S=function(e,t,r,a){return new(r||(r=Promise))((function(n,o){function i(e){try{s(a.next(e))}catch(e){o(e)}}function c(e){try{s(a.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}s((a=a.apply(e,t||[])).next())}))},D=n.T.encloseNamespace("tv.addRequests"),T=r(55812);const I={circle:"v0QaY"};function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}var F="tv.add",L=n.T.encloseNamespace(F),C={id:"ad-free",title:"adFreeTitle",description:"adFreeDescription",imageUrl:y.W.General.MOUNTAINS_FRAMED},_={id:"request-ad-free",title:"adFreeTitle",imageUrl:y.W.General.MOUNTAINS_FRAMED},j={id:"full-video",title:"fullVideoTitle",description:"fullVideoDescription",imageUrl:y.W.General.ANNOUNCEMENT_FRAMED};function P(e){var t=i.a.useBasicFetch(p.N.currentUser()),r=i.a.useBasicFetch(g.i.program(e.id)),n=i.a.useBasicFetch(t.data&&g.i.adFreeCredits(t.data.id,t.data.customerId,e.region)),c=function(e,t){var r=i.a.useGetFetchAsync(),a=(0,A.Z)(),n=i.a.useBasicFetch(p.N.currentUser()),c=i.a.useBasicFetch(p.N.workspace()),s=i.a.useBasicFetch(g.i.program(e)),u=i.a.useBasicFetch(g.i.region(t)),l=i.a.useBasicFetch(s.data&&n.data&&g.i.workspaceVideo(s.data.id,n.data.id,n.data.customerId));return{requestAdFreeVideo:function(){var e;return S(this,void 0,void 0,x().mark((function t(){var i,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r(g.i.createAdFreeRequest({programId:s.data.id,regionCode:u.data.code,userId:n.data.id,customerId:n.data.customerId}));case 3:a.success({heading:k.R.Success,message:D("requestAdFreeSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.AD_FREE_REQUEST,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AdFreeRequest,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),(i=null===(e=t.t0.responseJSON)||void 0===e?void 0:e.message)?(c=JSON.parse(i),a.error(D(c.Type,{video:s.data.title}))):a.error(D("error"));case 12:case"end":return t.stop()}}),t,null,[[0,8]])})))},addAdFreeVideo:function(){return S(this,void 0,void 0,x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.data.exists||!l.data.hasAdFree){e.next=3;break}return o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,params:{alreadyAdded:!0}}),e.abrupt("return");case 3:return e.prev=3,t={id:s.data.id,userId:n.data.id,customerId:n.data.customerId},e.next=7,r(g.i.addAdFreeVideo(t,s.data.id));case 7:a.success({heading:k.R.Success,message:D("addAdFreeSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AddAdFreeVideo,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),a.error(D("error"));case 15:case"end":return e.stop()}}),e,null,[[3,12]])})))},addFullVideo:function(){return S(this,void 0,void 0,x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.data.exists){e.next=3;break}return o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,params:{alreadyAdded:!0}}),e.abrupt("return");case 3:return e.prev=3,t={userId:n.data.id,customerId:n.data.customerId,globalId:s.data.globalId,libraryId:c.data.id},e.next=7,r(g.i.addFullVideo(t,s.data.id));case 7:a.success({heading:k.R.Success,message:D("addFullSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AddFullVideo,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),a.error(D("error"));case 15:case"end":return e.stop()}}),e,null,[[3,12]])})))}}}(e.id,e.region),s=c.requestAdFreeVideo,y=c.addAdFreeVideo,O=c.addFullVideo;(0,m.h)(r.statusCode);var P,M,R=(P=a.useState(null),M=2,function(e){if(Array.isArray(e))return e}(P)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=o.call(r)).done)&&(c.push(a.value),c.length!==t);s=!0);}catch(e){u=!0,n=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw n}}return c}}(P,M)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var r={}.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)?N(e,t):void 0}}(P,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=R[0],q=R[1],B=!Number.isNaN(e.currentTime),U=n.data&&n.data.userRequests<n.data.maxAvailableCredit,Y=n.data&&n.data.maxAvailableCredit-n.data.userRequests;a.useEffect((function(){n.hasCompleted&&(U||q(j))}),[n,U]);var z=t.hasCompleted&&r.hasCompleted&&n.hasCompleted,G=(null==V?void 0:V.id)===_.id&&T.a.isHolidayPeriod();return a.createElement(l.G,{size:"lg",title:L("title"),showLoadingSpinner:!z,closePopup:e.closePopup},z&&a.createElement(a.Fragment,null,a.createElement("div",{className:"d-flex mb-3 mx-n2"},r.data.hasAdsFree&&a.createElement(u,{option:{id:C.id},onSelect:q,selected:(null==V?void 0:V.id)===C.id},a.createElement("img",{src:C.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:C.title})),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:C.description}))),!r.data.hasAdsFree&&a.createElement(u,{option:{id:_.id,disabled:!U},onSelect:q,selected:(null==V?void 0:V.id)===_.id},a.createElement("img",{src:_.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("div",{className:"d-flex justify-content-center align-items-center mb-1"},a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:_.title})),a.createElement("span",{className:"badge bg-dark rounded-circle ms-2 ".concat(I.circle)},Y)),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:U?"requestAdFreeDescription":"noRequestsDescription"}))),a.createElement(u,{option:{id:j.id},onSelect:q,selected:(null==V?void 0:V.id)===j.id},a.createElement("img",{src:j.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:j.title})),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:j.description})))),G&&a.createElement("div",{className:"alert alert-warning",role:"alert"},a.createElement("h3",{className:"h5"},a.createElement(f.x,{namespace:F,phrase:"adFreeAlertHeading"})),a.createElement("p",{className:"m-0"},a.createElement(f.x,{namespace:F,phrase:"adFreeAlertBody"})))),a.createElement(d.u,null,a.createElement(d.u.Cancel,{text:L(B?"back":"close"),onClick:function(){B?o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.PREVIEW,args:[e.region,r.data.id],params:{currentTime:e.currentTime}}):e.closePopup()},variant:"link"}),a.createElement(d.u.Submit,{text:L("continue"),onClick:function(){V&&(V.id===j.id&&O(),V.id===C.id&&y(),V.id===_.id&&s())},variant:"dark",disabled:!V})))}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 522-37ac36517c-exchange.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[522],{66090:(e,t,n)=>{function r(e){return r="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},r(e)}n.d(t,{O:()=>a});var a={isNumber:function(e){return a.isType(e,"number")},isString:function(e){return a.isType(e,"string")},isType:function(e,t){return r(e)===t}}},66122:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(32735);function a(e){return r.createElement("span",{id:"".concat(e.name,"Error"),className:"".concat(e.className," invalid-feedback d-block"),role:"status"},e.children)}},11904:(e,t,n)=>{n.d(t,{n:()=>S,W:()=>w});var r=n(32735),a=n(80247),o=n(50132),i=n(92802),c=n(79014),l=n(1048),s=n(28825),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function m(e){var t=e.label,n=e.checkboxLabelClassName,a=e.checkboxLabelFontWeight,i=e.className,c=u(e,["label","checkboxLabelClassName","checkboxLabelFontWeight","className"]);return r.createElement(o.Z.Group,{className:"form-group"},r.createElement("div",{className:"form-check ".concat(i||"")},r.createElement(S,Object.assign({className:"form-check-input"},c)),r.createElement(o.Z.Label,{className:"form-check-label cursor-pointer ".concat("normal"===a?"fw-normal":""," \n ").concat(n),htmlFor:c.id},t),e.checkboxAppLink&&e.checkboxAppLinkText&&r.createElement(r.Fragment,null,r.createElement("span",null," "),r.createElement(s.F,{appLink:e.checkboxAppLink,className:"info-link"},e.checkboxAppLinkText))))}var d=n(83914),p=n(83345),f={getCustomFormControlClassName:function(e,t,n,r,a,o){var c="";return c=function(e,t){var n="";return n="select"===e?"form-select":"form-control","sm"===t&&(n+=" ".concat(n,"-sm")),"lg"===t&&(n+=" ".concat(n,"-lg")),n}(o,r),(0,i.u9)(t,n)&&(0,i.u9)(e,n)&&(c+=" is-invalid"),a&&(c+=" ".concat(a)),c}},v=n(35223);function g(e){var t=(0,i.u6)().values,n=l.t.get(t,e.fieldName);return"string"!=typeof n?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-end text-secondary fw-normal"},n.length,"/",e.limit," characters")}const h={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG",spinner:"CycFx"};function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},E="shared.formField";function S(e){var t,n,o=e.children,s=e.showLoadingSpinner,u=y(e,["children","showLoadingSpinner"]),m=(t=r.useState(e.type),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n={}.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)?b(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.")}()),p=m[0],f=m[1],g=c.q.isFunction(o)?function(e){return o(e)}:r.Children.count(o)?o:null;if("password"!==u.type)return s?r.createElement("div",{className:"position-relative"},r.createElement(i.gN,Object.assign({},l.t.omit(u,["formSize"])),g),r.createElement("div",{className:h.spinner},r.createElement(a.Z,{animation:"border",size:"sm"}))):r.createElement(i.gN,Object.assign({},l.t.omit(u,["formSize"])),g);var E="position-relative ".concat(h.passwordContainer);return u.className&&(E+=" ".concat(u.className)),u.disabled&&(E+=" ".concat(h.passwordContainerDisabled)),r.createElement("div",{className:E},r.createElement(i.gN,Object.assign({},l.t.omit(u,["formSize","type","className"]),{type:p,className:"".concat(h.passwordInput," border-0 w-100 h-100 outline-none rounded")}),g),"password"===u.type&&r.createElement(d.x,{svgName:"password"===p?v.vn.VisibleOn:v.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(h.revealPassword),onClick:function(){f("password"===p?"text":"password")}}))}function w(e){var t=e.label,n=e.className,a=e.showCharacterCounter,c=e.showRequiredStar,s=e.infoTooltip,u=e.infoTooltipPlacement,b=e.infoText,w=e.formSize,O=e.showOptionalLabel,C=e.formGroupClassname,I=y(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel","formGroupClassname"]),x=(0,i.u6)(),j=x.errors,N=x.touched,k=function(){};if("checkbox"===I.type){var T=l.t.omit(e,["formSize","infoTooltipPlacement"]);return e.disabled&&(T.onChange=k),r.createElement(m,Object.assign({},T))}var R=Object.assign(Object.assign({},I),{className:f.getCustomFormControlClassName(j,N,I.name,w,n,"string"==typeof e.as?e.as:null)});return e.disabled&&(R.onChange=k),r.createElement(o.Z.Group,{className:"form-group ".concat(C)},!!t&&r.createElement(o.Z.Label,{htmlFor:I.id,className:"d-flex align-items-center"},t,c&&r.createElement("span",{className:"text-danger"},"*"),s&&r.createElement(d.x,{className:"svg-container text-secondary ".concat(h.infoTooltip),svgName:v.vn.Info,title:s,tooltipPlacement:u,tooltipSpanHack:!0}),O&&r.createElement("span",{className:"text-secondary"}," ",r.createElement(p.x,{namespace:E,phrase:"optional"})),!!a&&!!I.maxLength&&r.createElement("div",{className:"ms-auto"},r.createElement(g,{fieldName:I.name,limit:I.maxLength}))),r.createElement(S,Object.assign({},R,{"aria-errormessage":"".concat(I.name,"Error")})),!!b&&r.createElement(o.Z.Text,{className:"text-secondary"},b),r.createElement(i.Bc,{name:I.name},(function(e){return r.createElement(o.Z.Control.Feedback,{id:"".concat(I.name,"Error"),type:"invalid",role:"status"},e)})))}S.defaultProps={autoComplete:"off"},w.defaultProps={autoComplete:"off",infoTooltipPlacement:"top"}},82644:(e,t,n)=>{n.d(t,{b:()=>u,n:()=>s});var r=n(32735),a=n(92802),o=n(79014),i=n(1048);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function s(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,m=l(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),d=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=i.t.deepClone(e);return function e(n){Object.keys(t).forEach((function(r){t.hasOwnProperty(r)&&(i.t.isObject(n[r])?e(n[r]):null===t[r]&&delete t[r])}))}(t),t}(s)):s,p={allowInitialSubmit:e.allowInitialSubmit};return r.createElement(a.J9,Object.assign({enableReinitialize:!0},m,{initialValues:d,onSubmit:function(t,r){var a=r.setSubmitting,o=r.resetForm,i=r.setFieldError,l=n&&e.validationSchema?e.validationSchema.cast(t):t;u(l,(function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.reset&&o(),n.errors)for(var r=0,l=Object.entries(n.errors);r<l.length;r++){var s=(e=l[r],t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(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],m=s[1];i(u,m)}a(!1)}))},initialStatus:p}),o.q.isFunction(e.children)?function(t){return e.children(t)}:r.Children.count(e.children)?e.children:null)}function u(){return(0,a.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},75289:(e,t,n)=>{n.d(t,{f:()=>i});var r=n(32735),a=n(83914);const o={circle:"Uxnsl",img:"BQ87Y"};function i(e){var t;return e.imageUrl||e.svgName?e.imageUrl?r.createElement("div",{className:"".concat(o.img," rounded-circle h-100 w-100"),style:{backgroundImage:"url(".concat(e.imageUrl,")")}}," "):r.createElement("div",{className:"".concat(o.circle," ").concat(e.variant?"bg-".concat(e.variant):""," text-").concat(e.textVariant," rounded-circle h-100 w-100 ").concat(null!==(t=e.svgWrapperClassName)&&void 0!==t?t:"")},r.createElement(a.x,{svgName:e.svgName,size:e.svgSize})):r.createElement(r.Fragment,null)}i.defaultProps={textVariant:"white"}},19808:(e,t,n)=>{var r;n.d(t,{b:()=>r}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(r||(r={}))},86764:(e,t,n)=>{var r;n.d(t,{r:()=>r}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(r||(r={}))},78417:(e,t,n)=>{var r;n.d(t,{r:()=>r}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(r||(r={}))},45778:(e,t,n)=>{n.d(t,{G:()=>a});var r=n(4594),a={isType:function(e,t){var n;return(null==e?void 0:e.typeId)?e.typeId===t:(null===(n=null==e?void 0:e.type)||void 0===n?void 0:n.toLowerCase())===r.E[t].toLowerCase()},isResource:function(e){return a.isType(e,r.E.Resource)},isClassification:function(e){return"Subject"===e.type}}},81522:(e,t,n)=>{n.r(t),n.d(t,{GiveFeedbackView:()=>kr});var r,a,o=n(32735),i=n(43823),c=n(53301),l=n.n(c),s=n(39202),u=n(23481),m=n(54150),d=n(32119),p=n(20354),f=n(49985),v=n(65858),g=n(29555),h=n(28046),b=n(77696),y=n(83345),E=n(52003),S=n(60735);!function(e){e[e.Other=0]="Other",e[e.SuggestImprovement=1]="SuggestImprovement",e[e.ReportBug=2]="ReportBug",e[e.RequestVideo=3]="RequestVideo",e[e.RaiseIssue=4]="RaiseIssue",e[e.GivePraise=5]="GivePraise",e[e.Footer=6]="Footer",e[e.RequestLivestream=7]="RequestLivestream"}(r||(r={})),function(e){e.Subject="Subject",e.Curriculum="Curriculum",e.StreamableLearning="StreamableLearning"}(a||(a={}));var w,O=n(12754),C=n(97395),I={presentationAudiences:function(e,t){var n=t||a.Subject.toLowerCase(),r={type:n,presentationId:e};return{bootstrapName:"presentationAudiences",url:C._.urlBuilder("/api/domain/v1/subjects/audiences",r),publicUrl:C._.urlBuilder("/api/subjects/presentation/".concat(e,"/audiences"),r),key:"presentation:audiences:".concat(e,":").concat(n),normalize:!1}},audiencesByPresentationId:function(e){return{url:"/api/domain/v1/subjects/presentations/".concat(e,"/audiences"),publicUrl:C._.urlBuilder("/api/subjects/presentation/".concat(e,"/audiences"),{type:a.Subject.toLowerCase(),presentationId:e}),key:"presentation:".concat(e,":audiences"),normalize:!1}}};!function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos",e.PinnedVideos="pinnedVideos"}(w||(w={}));var x=n(62803),j=n(78417),N=function(e){return"subjectpresentationaudiences.id:[".concat(e.join(","),"]")},k={topicsFromAllAvailablePresentations:function(e){var t={filterType:"topics",presentationId:e};return{url:C._.urlBuilder("{gateway}/v1/search/filters",t),publicUrl:C._.urlBuilder("/api/search/filters",t),key:"classification:availableTopics",normalize:!1}},availablePresentations:function(e){var t={type:null==e?void 0:e.toLowerCase()};return{url:C._.urlBuilder("/api/domain/v1/subjects/presentations/available",t),publicUrl:C._.urlBuilder("/api/subjects/presentations/available",t),key:"available:presentations:".concat(e),normalizeOptions:{namespace:"presentation"}}},topLevelTopics:function(e){var t={query:x.v.CLASSIFICATION_COLLECTION,sort:"alphabetical"};return{url:C._.urlBuilder("/api/domain/v1/subjects/presentations/".concat(e,"/classifications"),t),publicUrl:C._.urlBuilder("/api/subjects/presentations/".concat(e,"/classifications"),t),key:"presentation:".concat(e,":classifications")}},presentationById:function(e){return{url:"/api/domain/v1/subjects/presentations/".concat(e),publicUrl:"/api/subjects/presentations/".concat(e),key:"presentation:".concat(e)}},presentationBySlug:function(e,t,n){var r={type:n.toLowerCase(),contentRegion:t};return{url:C._.urlBuilder("/api/subjects/presentations/".concat(e),r),publicUrl:C._.urlBuilder("/api/subjects/presentations/".concat(e),r),key:"current:presentation:".concat(n.toLowerCase(),":").concat(t,":").concat(null!=e?e:""),bootstrapName:"presentation",normalizeOptions:{namespace:"presentation"}}},presentation:function(e,t){var n={type:null==e?void 0:e.toLowerCase()};return{url:C._.urlBuilder("/api/domain/v1/subjects/presentations",n),publicUrl:C._.urlBuilder("/api/subjects/presentations/".concat(t),n),key:"current:presentation".concat(e?":".concat(e.toLowerCase()):"").concat(t?":".concat(t):""),normalizeOptions:{namespace:"presentation"}}},classifications:function(){return{url:C._.urlBuilder("/api/domain/v1/subjects",{query:x.v.CLASSIFICATION_COLLECTION,type:a.Subject.toLowerCase()}),publicUrl:C._.urlBuilder("/api/subjects/classifications",{query:x.t.CLASSIFICATION_COLLECTION,type:a.Subject.toLowerCase()}),key:"classifications"}},classification:function(e,t,n){return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e),{query:x.v.CLASSIFICATION(t)}),publicUrl:C._.urlBuilder("/api/subjects/classifications/".concat(e),{query:x.t.CLASSIFICATION}),key:"classification:".concat(e),error:n}},path:function(e,t){var n={type:t};return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/path"),n),publicUrl:"/api/subjects/classifications/".concat(e,"/path"),key:"classification:".concat(e,":path")}},paths:function(e){return{url:"/api/subjects/classifications/".concat(e,"/paths"),key:"classification:".concat(e,":paths")}},children:function(e){return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/children"),{query:x.v.CLASSIFICATION_COLLECTION}),publicUrl:C._.urlBuilder("/api/subjects/classifications/".concat(e,"/children"),{query:x.t.CLASSIFICATION_COLLECTION}),key:"classification:".concat(e,":children")}},videos:function(e,t,n){if(t){var r="limit:100,orderbydesc:timestamp";n.length&&(r+=",".concat(N(n)));var a={query:"{".concat(r,"}(videoCollection),subjectpresentationaudiences{presentationId:").concat(t,"}"),permissionFilterOption:j.r.StripMetadata};return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/").concat(w.PinnedVideos),a),publicUrl:C._.urlBuilder("/api/subjects/classifications/".concat(e,"/").concat(w.PinnedVideos),a),key:"classification:".concat(e,":").concat(w.PinnedVideos,":").concat(n.join(":"))}}},playlists:function(e,t,n){if(t){var r="limit:100,orderby:name";n.length&&(r+=",".concat(N(n)));var a={query:"{".concat(r,"}").concat(x.v.PLAYLIST_COLLECTION)+",subjectpresentationaudiences{presentationId:".concat(t,"}"),permissionFilterOption:j.r.StripMetadata};return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/").concat(w.Playlists),a),publicUrl:C._.urlBuilder("/api/subjects/classifications/".concat(e,"/").concat(w.Playlists),a),key:"classification:".concat(e,":").concat(w.Playlists,":").concat(n.join(":")),formatData:function(e){var t;if(e)return Object.assign(Object.assign({},e),{data:null===(t=e.data)||void 0===t?void 0:t.filter((function(e){var t;return null===(t=e.cover)||void 0===t?void 0:t.url}))})}}}},series:function(e,t,n){if(t){var r="limit:100";n.length&&(r+=",".concat(N(n)));var a={query:"{".concat(r,"}").concat(x.v.SERIES)+",subjectpresentationaudiences{presentationId:".concat(t,"}"),permissionFilterOption:j.r.StripMetadata};return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/").concat(w.Series),a),publicUrl:C._.urlBuilder("/api/subjects/classifications/".concat(e,"/").concat(w.Series),a),key:"classification:".concat(e,":").concat(w.Series,":").concat(n.join(":")),formatData:function(e){var t;if(e)return Object.assign(Object.assign({},e),{data:null===(t=e.data)||void 0===t?void 0:t.filter((function(e){var t;return null===(t=e.tallPoster)||void 0===t?void 0:t.url}))})}}}},curriculumLinks:function(e,t){return{url:C._.urlBuilder("/api/subjects/presentations/".concat(t,"/objects/").concat(e,"/classifications/paths"),{type:a.Curriculum.toLowerCase()}),publicUrl:C._.urlBuilder("/api/subjects/presentations/".concat(t,"/objects/").concat(e,"/classifications/paths"),{type:a.Curriculum.toLowerCase()}),key:"curriculum:links:".concat(e,":").concat(t),normalize:!1}},subjectLinks:function(e,t){var n=C._.urlBuilder("/api/subjects/presentations/".concat(t,"/objects/").concat(e,"/classifications/paths"),{type:a.Subject.toLowerCase()});return{url:n,publicUrl:n,key:"subject:links:".concat(e,":").concat(t),normalize:!1}},getMappedCurriculums:function(e,t){var n={type:a.Curriculum.toLowerCase()};return{url:C._.urlBuilder("/api/domain/v1/subjects/objects/".concat(e,"/presentations"),n),publicUrl:C._.urlBuilder("/api/subjects/".concat(e,"/presentations"),Object.assign(Object.assign({},n),{pid:t})),key:"mapped:curriculums:".concat(e,":").concat(t.join(",")),normalize:!1}},regionAlternatives:function(e,t,n,r){return{url:"/api/subjects/classifications/".concat(e,"/region-alternatives"),publicUrl:"/api/subjects/classifications/".concat(e,"/region-alternatives"),key:"classification:regionAlternatives:".concat(e),normalize:!1,success:t,error:n,always:r}}},T=n(1666),R=n(99940),L={submitFeedback:function(e,t){return{url:"{gateway}/v1/feedback",key:"submit:feedback",type:R.k.POST,data:Object.assign(Object.assign({},e),t)}}},A=n(70145),F=n(31949),P=n(69883);function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var _=n(35286),V=n(81886),B=n(16714),q=n(47663);function G(e){return G="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},G(e)}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,D(r.key),r)}}function D(e){var t=function(e){if("object"!=G(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:t+""}function z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(z=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}var Q=u.T.encloseNamespace("shared.studentRestrictedDialogError"),Z=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=H(t),function(e,t){if(t&&("object"==G(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,z()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}(this,t,["Learner accessing feature that is for staff only"])}return function(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&&W(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"StudentRestrictedDialogError"}},{key:"dialogOptions",get:function(){return{title:Q("heading"),text:Q("description"),buttons:[{text:Q("close"),className:"btn btn-link",close:!0}]}}}])&&M(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(q.S),K=n(22902),X=n(57881),Y=n(19808),$=n(86613);function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ee,te={getUserInfo:function(e,t){return{id:e.id,username:e.username,email:e.email,userType:e.role===$.i.Admin?"Admin":"Staff",customerId:e.customerId,cvcId:t.crmId,customerName:t.name,instanceRegion:e.instanceRegion,contentRegion:e.contentRegion,firstName:e.givenName,lastName:e.familyName}},mapInstanceRegionToTag:function(e){switch(e){case Y.b.AU:return"au";case Y.b.NZ:return"nz";case Y.b.UK:return"uk";case Y.b.US:return"us"}},getTags:function(e,t,n,r){var a,o=[t].concat(function(e){if(Array.isArray(e))return J(e)}(a=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return J(e,t);var n={}.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)?J(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());o.push(n?"student":"staff"),e.role===$.i.Admin&&o.push("administrator");var i=te.mapInstanceRegionToTag(e.instanceRegion);return i&&o.push(i),o},categorizeFiles:function(e){return e.reduce((function(e,t){var n=t.get("fileInfo");return l().isValidFile(t.get("file"),h.l.VIDEO)?e.videoUrls.push(null==n?void 0:n.url):e.imageUrls.push(null==n?void 0:n.url),e}),{imageUrls:[],videoUrls:[]})}},ne=n(11607),re=n(49439);!function(e){e.SUGGEST_IMPROVEMENT="suggestImprovement",e.REPORT_BUG="reportBug",e.REQUEST_VIDEO="requestVideo",e.REQUEST_LIVESTREAM="requestLivestream",e.GIVE_PRAISE="givePraise",e.RAISE_ISSUE="raiseIssue",e.OTHER="other"}(ee||(ee={}));var ae=u.T.encloseNamespace("shared.feedbackFormTitles"),oe=function(e){switch(e){case ee.SUGGEST_IMPROVEMENT:case ee.REPORT_BUG:case ee.REQUEST_VIDEO:case ee.REQUEST_LIVESTREAM:case ee.GIVE_PRAISE:case ee.RAISE_ISSUE:case ee.OTHER:return ae(e)}};function ie(e){return ie="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},ie(e)}function ce(e,t,n){return(t=function(e){var t=function(e){if("object"!=ie(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ie(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=ce(ce(ce(ce(ce(ce(ce({mailSent:"https://img.clickviewapp.com/v2/images/2mZ7L9",mediaPreview:"https://img.clickviewapp.com/v2/images/ageRM0",lightBulb:"https://img.clickviewapp.com/v2/images/Oqg3JN",heartHands:"https://img.clickviewapp.com/v2/images/1ML8Oj",videoAlert:"https://img.clickviewapp.com/v2/images/dq2oMq"},ee.REQUEST_VIDEO,{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"}),ee.REQUEST_LIVESTREAM,{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"}),ee.SUGGEST_IMPROVEMENT,{default:"https://img.clickviewapp.com/v2/images/g7aR1l",hover:"https://img.clickviewapp.com/v2/images/zMR0Dk"}),ee.RAISE_ISSUE,{default:"https://img.clickviewapp.com/v2/images/5boW78",hover:"https://img.clickviewapp.com/v2/images/m6yRKr"}),ee.GIVE_PRAISE,{default:"https://img.clickviewapp.com/v2/images/nE1mdz",hover:"https://img.clickviewapp.com/v2/images/JjEnmR"}),ee.REPORT_BUG,{default:"https://img.clickviewapp.com/v2/images/AOdYpo",hover:"https://img.clickviewapp.com/v2/images/yro9NM"}),ee.OTHER,{default:"https://img.clickviewapp.com/v2/images/Eoaykj",hover:"https://img.clickviewapp.com/v2/images/wN59Zg"});const se={image:"_2jo0"};function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function me(e){var t,n,r=(t=(0,re.X)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return ue(e,t);var n={}.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)?ue(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.")}()),a=r[0],i=r[1],c=le[e.option];return o.createElement(ne.L,{ref:a,className:"col-lg-4 col-sm-6 col-12",onClick:function(){return e.onSelectOption(e.option)}},o.createElement("div",{className:"d-flex flex-column align-items-center h-100 rounded border py-3 gap-2"},o.createElement("img",{className:se.image,src:i?c.hover:c.default,alt:oe(e.option)}),o.createElement("p",{className:"fw-semibold text-center mb-0"},oe(e.option))))}function de(e){return o.createElement("div",{className:"row g-2"},e.options.map((function(t){return o.createElement(me,{key:t,option:t,onSelectOption:e.onSelectOption})})))}var pe=n(92802),fe=n(82644),ve=n(13876),ge=u.T.encloseNamespace("shared.feedbackButtons");function he(e){var t=(0,fe.b)();return o.createElement(ve.u,null,"form"===e.formStage&&o.createElement(o.Fragment,null,!e.hideCancelButton&&o.createElement(ve.u.Cancel,{onClick:function(){return e.setSelectedOption(null)},text:ge("cancel")}),o.createElement(ve.u.Submit,{variant:"dark",text:e.submitText||ge("submit"),disabled:!t.isValid})),"success"===e.formStage&&o.createElement(ve.u.Cancel,{variant:"dark",text:ge("close"),onClick:e.closePopup}))}const be={successImage:"yp7vQ"};var ye=u.T.encloseNamespace("shared.feedbackFormState");function Ee(e){return"form"===e.formStage||"error"===e.formStage?o.createElement(o.Fragment,null):o.createElement("div",{className:"text-center"},o.createElement("div",{className:"mb-3"},o.createElement("img",{className:be.successImage,src:e.successImageUrl||le.mailSent})),o.createElement("h4",{className:"mb-3"},e.successHeading||ye("successHeading")),o.createElement("p",{className:"mb-3"},e.successDescription||ye("successDescription")))}var Se=n(5173),we=n(11904),Oe=u.T.encloseNamespace("shared.feedbackForm"),Ce=5e3,Ie=function(e){switch(e){case"requiredError":return Oe(e);case"minCharactersError":return Oe(e,{limit:10});case"maxCharactersError":return Oe("maxCharactersError",{limit:Ce})}},xe=function(){return Se.Z_().min(10,Ie("minCharactersError")).max(Ce,Ie("maxCharactersError"))},je=u.T.encloseNamespace("shared.feedbackGivePraise"),Ne={praise:""},ke=Se.Ry().shape({praise:xe().required(Ie("requiredError"))}).noUnknown();function Te(){var e=(0,fe.b)();return o.createElement(o.Fragment,null,o.createElement(we.W,{as:"textarea",placeholder:je("givePraisePlaceholder"),label:je("givePraiseLabel"),name:"praise",rows:5,value:e.values.praise,showRequiredStar:!0}))}function Re(e){return o.createElement(vr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Ne),e.initialValues),validationSchema:ke,successImageUrl:le.heartHands,successHeading:je("successHeading"),successDescription:je("successDescription")}),o.createElement(Te,null))}var Le=u.T.encloseNamespace("shared.feedbackOther"),Ae={feedback:""},Fe=Se.Ry().shape({feedback:xe().required(Ie("requiredError"))}).noUnknown();function Pe(){var e=(0,fe.b)();return o.createElement(o.Fragment,null,o.createElement(we.W,{as:"textarea",placeholder:Le("otherPlaceholder"),label:Le("otherLabel"),name:"feedback",rows:5,value:e.values.feedback,showRequiredStar:!0}))}function Ue(e){return o.createElement(vr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Ae),e.initialValues),validationSchema:Fe}),o.createElement(Pe,null))}var _e=u.T.encloseNamespace("shared.feedbackRaiseIssue"),Ve={issue:""},Be=Se.Ry().shape({issue:xe().required(Ie("requiredError"))}).noUnknown();function qe(){var e=(0,fe.b)();return o.createElement(o.Fragment,null,o.createElement(we.W,{as:"textarea",placeholder:_e("raiseIssuePlaceholder"),label:_e("raiseIssueLabel"),name:"issue",rows:5,value:e.values.issue,showRequiredStar:!0}))}function Ge(e){return o.createElement(vr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Ve),e.initialValues),validationSchema:Be}),o.createElement(qe,null))}var Me=n(83914);function De(e){return De="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},De(e)}function ze(e,t,n){return(t=function(e){var t=function(e){if("object"!=De(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==De(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var He,We=ze(ze(ze(ze({},Y.b.AU,{phone:"02 9509 2600",email:"support@clickview.com.au",website:"https://www.clickviewsupport.com/hc"}),Y.b.UK,{phone:"+44 (0)333 207 6595",email:"info@clickview.co.uk",website:"https://www.clickviewsupport.com/hc"}),Y.b.NZ,{phone:"09 916 1156",email:"support@clickview.co.nz",website:"https://www.clickviewsupport.com/hc"}),Y.b.US,{phone:"+1 312-292-9322",email:"info@clickvieweducation.com",website:"https://www.clickviewsupport.com/hc"}),Qe=n(35223),Ze=n(58591),Ke=n(66122);!function(e){e.FileSelect="file-select",e.DragDrop="drag-drop"}(He||(He={}));const Xe={fileDrop:"vdCUc",resourcePreview:"tZQbH"};function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var $e="shared.feedbackFileUpload";function Je(e){var t=(0,Ze.uI)({onDrop:function(t){return e.onFilesAdded(t,He.DragDrop)},noClick:!0,noKeyboard:!0,multiple:!!e.acceptMultiple,noDragEventsBubbling:!0}),n=t.getRootProps,r=t.getInputProps,a=t.isDragActive,i=o.useRef(null),c=o.useCallback((function(e){e&&(i.current=e)}),[]),l="".concat(Xe.fileDrop," text-center p-2 rounded-1");return e.uploadError&&(l+=" border-red"),a&&(l+=" border-blue bg-light-blue"),o.createElement(o.Fragment,null,o.createElement("div",Object.assign({},n({className:l})),o.createElement("img",{className:Xe.resourcePreview,src:e.imageUrl,draggable:!1}),o.createElement("div",{className:"position-relative"},a&&o.createElement("p",{className:"position-absolute font-size-md translate-middle top-50 start-50 mb-0"},o.createElement(y.x,{namespace:$e,phrase:"dropUpload"})),o.createElement("div",{className:a?"opacity-0":""},o.createElement("p",{className:"mb-0"},o.createElement(y.x,{namespace:$e,phrase:"dragDrop"})),o.createElement("button",{type:"button",className:"btn btn-link text-underline p-0",onClick:function(){i.current.value=null,i.current.click()}},o.createElement(y.x,{namespace:$e,phrase:"upload"})))),o.createElement("input",{type:"file",name:"fileUpload",className:"file-select d-none",multiple:!!e.acceptMultiple,accept:e.mimeType,ref:c,onChange:function(t){return e.onFilesAdded(function(e){if(Array.isArray(e))return Ye(e)}(n=t.target.files)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Ye(e,t);var n={}.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)?Ye(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),He.FileSelect);var n},"aria-errormessage":"fileUploadError"}),o.createElement("input",Object.assign({},r()))),e.uploadError&&o.createElement(Ke.A,{name:"fileUpload"},e.uploadError))}const et={progress:"PeDF6"};function tt(e){var t=100===e.upload.progress;return o.createElement(o.Fragment,null,o.createElement("div",null,o.createElement(Me.x,{svgName:Qe.vn.Folder,className:"svg-container me-2"}),o.createElement("span",{className:"align-middle"},e.upload.name),t&&o.createElement(Me.x,{svgName:Qe.vn.Check,className:"svg-container float-end text-success"}),!t&&o.createElement("div",{role:"button","aria-label":"close",onClick:function(){return e.cancelUpload(e.upload.id)},className:"float-end description"},o.createElement(Me.x,{svgName:Qe.vn.Close}))),o.createElement("div",{className:"".concat(et.progress," progress my-2")},o.createElement("div",{className:"progress-bar bg-blue",role:"progressbar",style:{width:"".concat(e.upload.progress,"%")},"aria-valuenow":e.upload.progress,"aria-valuemin":0,"aria-valuemax":100})))}function nt(e){var t;return(null===(t=e.uploads)||void 0===t?void 0:t.length)?o.createElement(o.Fragment,null,e.uploads.map((function(t,n){return o.createElement(tt,{key:n,upload:t,cancelUpload:e.cancelUpload})}))):o.createElement(o.Fragment,null)}function rt(e){return o.createElement("div",{className:"bg-gray-100 rounded p-2"},o.createElement(Me.x,{className:"d-inline-block align-middle svg-container icon-purple me-2",svgName:Qe.vn.FileImg}),o.createElement("span",{className:"align-middle"},e.file.get("name")),o.createElement("button",{className:"btn p-0 border-0 float-end",onClick:function(){return e.deleteFile(e.file.get("id"))}},o.createElement(Me.x,{svgName:Qe.vn.Delete})))}function at(e){return o.createElement("div",{className:"d-flex flex-column gap-2"},e.uploadedFiles.map((function(t){return o.createElement(rt,{key:t.id,file:t,deleteFile:e.deleteFile})})))}var ot=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},it="shared.feedbackReportBug",ct=u.T.encloseNamespace(it),lt={issue:"",stepsToReproduce:""},st=Se.Ry().shape({issue:xe().required(Ie("requiredError")),stepsToReproduce:xe()}).noUnknown();function ut(e){var t=(0,fe.b)();return o.createElement(o.Fragment,null,o.createElement("div",{className:"form-group"},o.createElement("label",{className:"form-label mb-1"},o.createElement(y.x,{namespace:it,phrase:"mixedMediaLabel"})),o.createElement("p",{className:"text-secondary font-size-sm"},o.createElement(y.x,{namespace:it,phrase:"mixedMediaDescription"})),o.createElement("div",{className:"mb-3"},o.createElement(Je,{mimeType:h.l.MIXED_MEDIA,onFilesAdded:e.onFilesAdded,imageUrl:e.previewImageUrl,uploadError:e.uploadError,acceptMultiple:!0})),o.createElement(nt,{uploads:e.uploadingFiles,cancelUpload:e.cancelUpload}),o.createElement(at,{uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile})),o.createElement(we.W,{as:"textarea",placeholder:ct("issuePlaceholder"),label:ct("issueLabel"),name:"issue",value:t.values.issue,showRequiredStar:!0}),o.createElement(we.W,{as:"textarea",placeholder:ct("stepsPlaceholder"),label:ct("stepsLabel"),name:"stepsToReproduce",value:t.values.stepsToReproduce}),o.createElement("div",{className:"rounded bg-light-yellow p-2 mb-3"},o.createElement("p",{className:"fw-semibold mb-2"},o.createElement(y.x,{namespace:it,phrase:"help"})),o.createElement("div",{className:"d-flex gap-1 mb-2"},o.createElement(Me.x,{svgName:Qe.vn.Link}),o.createElement("a",{href:We[e.instanceRegion].website,target:"_blank",className:"text-underline"},o.createElement(y.x,{namespace:it,phrase:"visitHelpCentre"}))),o.createElement("p",{className:"mb-2"},o.createElement(y.x,{namespace:it,phrase:"supportTeam"})),o.createElement("div",{className:"d-flex gap-1 mb-2"},o.createElement(Me.x,{svgName:Qe.vn.Phone}),o.createElement("span",null,We[e.instanceRegion].phone)),o.createElement("div",{className:"d-flex gap-1 mb-2"},o.createElement(Me.x,{svgName:Qe.vn.Email}),o.createElement("span",null,We[e.instanceRegion].email))))}function mt(e){var t=e.onFilesAdded,n=e.cancelUpload,r=e.uploadingFiles,a=e.uploadedFiles,i=e.deleteFile,c=ot(e,["onFilesAdded","cancelUpload","uploadingFiles","uploadedFiles","deleteFile"]);return o.createElement(vr,Object.assign({},c,{initialValues:Object.assign(Object.assign({},lt),e.initialValues),validationSchema:st,submitText:ct("submit")}),o.createElement(ut,{onFilesAdded:t,previewImageUrl:le.mediaPreview,cancelUpload:n,uploadingFiles:r,uploadedFiles:a,deleteFile:i,uploadError:e.uploadError,instanceRegion:e.instanceRegion}))}var dt=n(75896),pt=n(79014),ft=n(4594),vt=n(76881),gt=n(37751);function ht(e){switch(e){case gt.R.Pink:return"pink";case gt.R.Orange:return"orange";case gt.R.Green:return"green";case gt.R.Blue:return"blue";case gt.R.Purple:return"purple";case gt.R.Indigo:return"indigo";default:return"pink"}}var bt=n(45778),yt=n(64818),Et=n(80247);const St={avatar:"srrS3"};function wt(e){var t=e.imageUrl,n=e.initials,r={};return t&&(r.backgroundImage="url('".concat(t,"')")),o.createElement("div",{className:St.avatar,style:r},t?o.createElement(o.Fragment,null," "):n)}var Ot=n(26354);const Ct={svgContainer:"laVU4",selection:"vEOCt",expander:"d1NHd",iconContainer:"rFH4W",icon:"BarYz",bubble:"HF0E8",spinnerContainer:"iKeXW",remove:"pyzCM",removeBubble:"mgt6Y"};var It=u.T.encloseNamespace("shared.inputSelection");function xt(e){var t,n="".concat(Ct.svgContainer," ").concat(Ct.icon);return e.typeId===ft.E.Classroom?n+=" text-teal":n+=" text-".concat(ht(null===(t=e.metadata)||void 0===t?void 0:t.colour)),n}function jt(e){var t,n=function(e){var t;switch(e.typeId){case ft.E.Classroom:return"text-teal-hover";case ft.E.ClassroomGroup:return"text-".concat(ht(null===(t=e.metadata)||void 0===t?void 0:t.colour),"-hover")}}(e.selection),r=e.selection.typeId===ft.E.Classroom;if(!e.canExpand){if(!e.selection.typeId||e.selection.typeId===ft.E.User){var a=e.selection;return o.createElement("div",{className:Ct.svgContainer},o.createElement(wt,{imageUrl:null===(t=a.avatar)||void 0===t?void 0:t.url,initials:yt.l.getInitials(e.selection.name,e.selection.surname)}))}return o.createElement(Ot.u,{title:It(r?"emptyClassroom":"emptyGroup")},o.createElement("div",{className:"align-items-center border border-white bg-white ".concat(Ct.iconContainer)},o.createElement(Me.x,{className:xt(e.selection),svgName:r?Qe.vn.Classrooms:Qe.vn.Group})))}return e.hasExpanded?o.createElement("div",{className:"d-flex align-items-center text-white ".concat(Ct.spinnerContainer," ").concat(Ct.svgContainer)},o.createElement(Et.Z,{as:"div",size:"sm",animation:"border",role:"status"})):o.createElement(o.Fragment,null,o.createElement(ne.L,{className:"align-items-center cursor-pointer text-white border border-white rounded-circle ".concat(Ct.expander," ").concat(n),onClick:e.onClickExpand},o.createElement(Me.x,{svgName:Qe.vn.Plus,className:"d-flex align-items-center ".concat(Ct.svgContainer)})),o.createElement("div",{className:"align-items-center border border-white bg-white ".concat(Ct.iconContainer)},o.createElement(Me.x,{className:xt(e.selection),svgName:r?Qe.vn.Classrooms:Qe.vn.Group})))}function Nt(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 r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kt(e,t);var n={}.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)?kt(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 kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Tt(e){var t;if(!e.typeId)return"ultramarine";switch(e.typeId){case ft.E.User:return"number"==typeof e.userType?2===e.userType?"ultramarine":"indigo":e.userType===vt.Y.Learner?"ultramarine":"indigo";case ft.E.Classroom:return"teal";case ft.E.ClassroomGroup:return ht(null===(t=e.metadata)||void 0===t?void 0:t.colour)}}function Rt(e){var t,n,r,a=bt.G.isType(e.selection,ft.E.Classroom),i=bt.G.isType(e.selection,ft.E.ClassroomGroup),c=e.onClickExpand&&(a||i),l=!!(null===(t=e.selection.users||e.selection.enrolments)||void 0===t?void 0:t.count),s=!!(null===(r=null===(n=e.selection.users)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length),u=Nt(o.useState(!1),2),m=u[0],d=u[1],p=Nt(o.useState(c&&l),2),f=p[0],v=p[1];if(o.useEffect((function(){v(c&&l)}),[c,l]),s){var g=e.selection,h=Tt(e.selection);return o.createElement("div",{className:"d-flex align-items-center flex-wrap me-1 mt-1 pb-1 ps-1 pe-4 position-relative border-".concat(h," text-").concat(h," ").concat(Ct.bubble)},g.users.data.map((function(t){return o.createElement(Lt,{key:"".concat(t.id,":").concat(e.selection.id),selection:t,colourVariant:h,hasStudentExperience:e.hasStudentExperience})})),o.createElement(ne.L,{className:"cursor-pointer position-absolute text-".concat(h," ").concat(Ct.removeBubble),onClick:function(){return e.onClickRemove(e.selection)}},o.createElement(Me.x,{svgName:Qe.vn.Close,className:"d-flex align-items-center ".concat(Ct.svgContainer)})))}return o.createElement(Lt,{selection:e.selection,canExpand:f,hasExpanded:m,onClickExpand:function(){d(!0),e.onClickExpand(e.selection.id)},onClickRemove:e.onClickRemove,colourVariant:Tt(e.selection),hasStudentExperience:e.hasStudentExperience})}function Lt(e){var t=e.colourVariant||Tt(e.selection),n=e.selection.name;return e.selection.typeId===ft.E.User&&(n=e.hasStudentExperience?yt.l.getDisplayName(e.selection):yt.l.getFullName(e.selection)),o.createElement("div",{className:"".concat(Ct.selection," bg-").concat(t," rounded-pill text-").concat(t," d-flex align-items-center me-1 mt-1 overflow-hidden")},!e.hideExpander&&o.createElement(jt,{canExpand:e.canExpand,hasExpanded:e.hasExpanded,onClickExpand:e.onClickExpand,selection:e.selection}),o.createElement("span",{className:"mx-1 text-white text-truncate"},n),pt.q.isFunction(e.onClickRemove)&&o.createElement(ne.L,{className:"d-flex align-items-center cursor-pointer align-self-stretch text-white ".concat(Ct.remove),onClick:function(){return e.onClickRemove(e.selection)}},o.createElement(Me.x,{svgName:Qe.vn.Close,className:"d-flex align-items-center ".concat(Ct.svgContainer)})))}var At=n(75289);const Ft={removeRecipient:"mCbMC",recipientItem:"kdcb0",showSpinner:"xH6Mu",avatarContainer:"Zcpg3",recipientDetails:"v5EmV",recipientDetailsWithRemoveButton:"_V928"};var Pt="shared.classroomGroupRecipientItemMetadata";function Ut(e){var t;return o.createElement(o.Fragment,null,o.createElement("div",{className:"".concat(Ft.avatarContainer," d-inline-block")},o.createElement(At.f,{svgName:Qe.vn.Group,variant:ht(null===(t=e.classroomGroup.metadata)||void 0===t?void 0:t.colour)})),o.createElement("div",{className:e.detailsClassName},o.createElement("h4",{className:"font-size-normal fw-normal m-0"},e.classroomGroup.name),o.createElement("p",{className:"text-secondary m-0"},function(e){var t,n,r,a=null!==(n=null===(t=e.users)||void 0===t?void 0:t.count)&&void 0!==n?n:0,o=null===(r=e.classroom)||void 0===r?void 0:r.name;return o?u.T.getPhrase(Pt,"subheading",{classroomName:o,smartCount:a}):""}(e.classroomGroup))))}var _t="shared.classroomRecipientItemMetadata";function Vt(e){return o.createElement(o.Fragment,null,o.createElement("div",{className:"".concat(Ft.avatarContainer," d-inline-block")},o.createElement(At.f,{svgName:Qe.vn.Classrooms,variant:"teal"})),o.createElement("div",{className:e.detailsClassName},o.createElement("h4",{className:"font-size-normal fw-normal m-0"},e.classroom.name),o.createElement("p",{className:"text-secondary m-0"},(i=null!==(r=null===(n=(t=e.classroom).users)||void 0===n?void 0:n.count)&&void 0!==r?r:null===(a=t.enrolments)||void 0===a?void 0:a.count,Number.isInteger(i)?u.T.getPhrase(_t,"subheading",{smartCount:i}):""))));var t,n,r,a,i}var Bt=n(76198);function qt(e,t){return e?t?(0,Bt._8)((n="profileId"in e?e.profileId:e.id,r=+"".concat(n).concat(Math.floor((new Date).getMinutes()/5)),{dictionaries:[Bt.O9,Bt.yd],separator:" ",length:2,style:"capital",seed:r})):"profileId"in e?e.name:yt.l.getFullName(e):"";var n,r}var Gt=n(29427),Mt=u.T.encloseNamespace("shared.userRecipientItemMetadata");function Dt(e){var t,n,r,a,i,c=(r=(t=e).user,a=t.anonymiseUsers,i=t.showDisplayName,"profileId"in r?{name:qt(r,a),surname:"",avatarUrl:null}:{name:a?qt(r,!0):i?yt.l.getDisplayName(r):yt.l.getFullName(r),surname:r.surname,avatarUrl:null===(n=r.avatar)||void 0===n?void 0:n.url}),l=c.name,s=c.surname,u=c.avatarUrl;return o.createElement(o.Fragment,null,o.createElement("div",{className:"".concat(Ft.avatarContainer," ").concat(e.avatarClassName," d-inline-block")},o.createElement(Gt.q,{imageUrl:u,imageCdnUrl:e.imageCdnUrl,initials:yt.l.getInitials(l,s),showAnonymousUser:"profileId"in e.user,anonymiseUsers:e.anonymiseUsers,anonymousSvgSize:Me.S.Small})),o.createElement("div",{className:e.detailsClassName},o.createElement("h4",{className:"font-size-normal fw-normal m-0"},l),e.showSubText&&"id"in e.user&&o.createElement("p",{className:"text-secondary m-0"},e.getSubText?e.getSubText(e.user):function(e){var t=yt.l.getUserType(e),n=yt.l.getUserRole(e);if(t===vt.Y.Staff)return n===$.i.Admin?Mt("admin"):Mt("staff");var r=yt.l.getYearGroup(e);return(null==r?void 0:r.name)&&"Learners"!==r.name?r.name:Mt("student")}(e.user))))}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Dt.defaults={showSubText:!0};var Ht=u.T.encloseNamespace("share.recipientItem");function Wt(e){switch(e){case ft.E.User:return Ht("removeUser");case ft.E.Classroom:return Ht("removeClassroom");case ft.E.ClassroomGroup:return Ht("removeGroup")}return null}function Qt(e){var t,n,r=(t=o.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return zt(e,t);var n={}.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)?zt(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.")}()),a=r[0],i=r[1],c="".concat(Ft.recipientItem," d-flex");a&&(c+=" ".concat(Ft.showSpinner));var l="".concat(e.removeRecipient?Ft.recipientDetailsWithRemoveButton:Ft.recipientDetails," d-inline-block ms-2");return o.createElement("div",{className:c},bt.G.isType(e.entity,ft.E.User)?o.createElement(Dt,{user:e.entity,imageCdnUrl:e.imageCdnUrl,detailsClassName:l,showDisplayName:e.showDisplayName,getSubText:e.getSubText,showSubText:!0}):bt.G.isType(e.entity,ft.E.Classroom)?o.createElement(Vt,{classroom:e.entity,detailsClassName:l}):bt.G.isType(e.entity,ft.E.ClassroomGroup)?o.createElement(Ut,{classroomGroup:e.entity,detailsClassName:l}):void 0,pt.q.isFunction(e.removeRecipient)&&o.createElement("div",{className:"".concat(Ft.removeRecipient," d-inline-flex justify-content-center align-items-center")},a?o.createElement(Et.Z,{as:"div",size:"sm",animation:"border",role:"status"}):o.createElement(Ot.u,{title:Wt(e.entity.typeId),spanHack:!0},o.createElement("div",{className:"btn-close cursor-pointer",role:"button","aria-label":"Close",onClick:function(){i(!0),e.removeRecipient(e.entity.id,(function(){return i(!1)}))}}))))}var Zt=n(8952),Kt=n(42648),Xt=n(1048);const Yt={inputWithoutHighlight:"cKcry",suggestionsContainerOpen:"avM9L",sectionContainer:"u35Wz",suggestionHighlighted:"gFitp",clearButton:"TAoT9",inputWithLeftIcon:"Rt24D",inputWithRightIcon:"pxKzq",inputWithTwoRightIcons:"Oerjh",iconContainer:"h8OBl",leftIconContainer:"L5mrV",rightIconContainer:"V23aG"};var $t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function Jt(e,t,n,r,a){var o="form-control";return n||(o+=" ".concat(Yt.inputWithoutHighlight)),"left"===e&&(o+=" ".concat(Yt.inputWithLeftIcon)),("right"===e&&!t||"left"===e&&t)&&(o+=" ".concat(Yt.inputWithRightIcon)),"right"===e&&t&&(o+=" ".concat(Yt.inputWithTwoRightIcons)),"lg"===a&&(o+=" form-control-lg"),"sm"===a&&(o+=" form-control-sm"),r&&(o+=" ".concat(r)),o}function en(e){var t="d-inline-block svg-container";return pt.q.isFunction(e)?t+" cursor-pointer":t}function tn(e){var t=e.onClickSearchIcon,n=e.searchIconPlacement,r=e.showClearInputIcon,a=e.onClickClearInput,i=e.highlightOnFocus,c=e.className,l=e.formSize,s=$t(e,["onClickSearchIcon","searchIconPlacement","showClearInputIcon","onClickClearInput","highlightOnFocus","className","formSize"]),u=function(){return o.createElement("div",{className:"d-inline-block"},o.createElement(Me.x,{svgName:Qe.vn.Search,size:Me.S.Standard,onClick:t,className:en(t)}))};return o.createElement("div",{className:"position-relative ".concat(Yt.inputContainer)},"left"===n&&o.createElement("div",{className:"".concat(Yt.iconContainer," ").concat(Yt.leftIconContainer)},o.createElement(u,null)),o.createElement("input",Object.assign({className:Jt(n,r,i,c,l)},s)),("right"===n||!!r)&&o.createElement("div",{className:"".concat(Yt.iconContainer," ").concat(Yt.rightIconContainer)},!!r&&o.createElement((function(){return o.createElement("button",{className:"d-inline-block text-secondary ".concat(Yt.clearButton),onMouseUp:a},o.createElement(Me.x,{svgName:Qe.vn.Close,size:Me.S.Standard,className:en(a)}))}),null),"right"===n&&o.createElement(u,null)))}var nn,rn=n(86764),an=n(3747),on=n(2948),cn=n(66090);function ln(e){return ln="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},ln(e)}function sn(e){return function(e){if(Array.isArray(e))return mn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||un(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 un(e,t){if(e){if("string"==typeof e)return mn(e,t);var n={}.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)?mn(e,t):void 0}}function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dn(e,t,n){return(t=function(e){var t=function(e){if("object"!=ln(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ln(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e,t){return dn(dn(dn(dn({},nn.Recent,t),nn.Local,e),nn.Remote,[]),nn.Generic,[])}function fn(e,t){return Xt.t.isObject(e)&&e.hasOwnProperty(t)&&cn.O.isString(e[t])}function vn(e,t,n,r){var a=e.trim().toLowerCase();return a.length<r?[]:t.filter((function(e){return!(!fn(e,n)||!cn.O.isString(e[n]))&&e[n].trim().toLowerCase().includes(a)}))}function gn(e,t){e(Object.assign(Object.assign({},pn([],[])),dn({},nn.Generic,[{type:t,generic:!0}])))}function hn(e,t,n){var r=pt.q.isFunction(t.formatRemoteSuggestions)?t.formatRemoteSuggestions(e):e;r.length||!t.getEmptyStateComponent?n((function(e){return Object.assign(Object.assign({},e),dn(dn({},nn.Remote,r),nn.Generic,[]))})):gn(n,"empty")}function bn(e,t,n){return function(r){var a,o,i=r.value,c=r.reason;if((null===(o=null===(a=e.allowableSuggestionFetchRequestedReasons)||void 0===a?void 0:a.includes(c))||void 0===o||o)&&(i.length||n(),!(i.length<e.activationLength))){if(e.local){var l=pt.q.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(i,e.local):vn(i,e.local,e.valueKey,e.activationLength);if(!l.length&&e.getEmptyStateComponent)return void gn(t,"empty");t((function(e){return Object.assign(Object.assign({},e),dn(dn({},nn.Local,l),nn.Generic,[]))}))}if("function"==typeof e.handleFetchSuggestions)return e.replacePreviousRemoteSuggestions?t((function(e){return Object.assign(Object.assign({},pn([],[])),dn({},nn.Remote,e.remote))})):gn(t,"loading"),void e.handleFetchSuggestions(i,(function(n){return hn(n,e,t)}),(function(){return gn(t,"errored")}));var s,u,m,d,f,v,g;e.getRemoteUrl&&(e.replacePreviousRemoteSuggestions?t((function(e){return Object.assign(Object.assign({},pn([],[])),dn({},nn.Remote,e.remote))})):gn(t,"loading"),s=e.getRemoteUrl,u=i,m=function(n){return hn(n,e,t)},d=function(){gn(t,"errored")},f=e.requestHeaders,v=e.getRemotePostBody,(g=pt.q.isFunction(s)&&s(u))&&(v?p.a.ajaxRequest({resource:g,type:R.k.POST,success:m,error:d,headers:f,data:v(u)}):p.a.ajaxRequest({resource:g,type:R.k.GET,success:m,error:d,headers:f})))}}}function yn(e,t){return fn(t,e)?o.createElement(o.Fragment,null,t[e]):o.createElement(o.Fragment,null)}function En(e,t){return"number"==typeof t||"boolean"==typeof t?t:t[e]||!1}function Sn(e,t){return"boolean"==typeof t||e.length<=t?e:e.slice(0,t)}function wn(e){return e.data}function On(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 r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||Cn(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 Cn(e,t){if(e){if("string"==typeof e)return In(e,t);var n={}.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)?In(e,t):void 0}}function In(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote",e.Generic="generic"}(nn||(nn={}));var xn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},jn="shared.searchBar",Nn=pt.q.isFunction;function kn(e){return e.renderAsForm?o.createElement("form",{onSubmit:e.onSubmit},e.children):o.createElement("div",{className:"w-100"},e.children)}function Tn(e){var t=pn(e.initialLocalSuggestions,e.recentSearches),n=On(o.useState(e.initialQuery||""),2),r=n[0],a=n[1],i=On(o.useState(t),2),c=i[0],l=i[1],s=o.useMemo((function(){return function(e,t,n,r,a,o){var i=function(t){var n=e[t];return n?n.map((function(e){return Object.assign(Object.assign({},e),{suggestionType:t})})):[]},c=i(nn.Recent),l=i(nn.Local),s=i(nn.Remote),u=i(nn.Generic);if(u.length)return[{data:u,suggestionType:nn.Generic}];if(pt.q.isFunction(r))return r([].concat(sn(l),sn(s),sn(c)));var m=[];return(null==l?void 0:l.length)&&m.push({title:t,data:Sn(l,En(nn.Local,a)),suggestionType:nn.Local}),(null==s?void 0:s.length)&&m.push({title:t,data:Sn(s,En(nn.Remote,a)),suggestionType:nn.Remote}),(null==c?void 0:c.length)&&m.push({title:n,data:Sn(c,En(nn.Recent,a)),suggestionType:nn.Recent}),"function"==typeof o?o(m):m}(c,e.suggestionsHeading,e.recentSearchHeading||u.T.getPhrase(jn,"recentSearchesHeading"),e.getSections,e.suggestionLimit,e.transformSections)}),[c]);o.useEffect((function(){Xt.t.isEqual(t,c)||r&&r.length>=(null==e?void 0:e.activationLength)||l(t)}),[t]),o.useEffect((function(){"function"==typeof e.onSuggestionUpdated&&e.onSuggestionUpdated(s)}),[s]);var m=o.useRef(null),d=o.useRef(!1);!function(e){var t,n,r=(t=(0,on.D)("lite:search:bar:focus",{focus:!1}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||un(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.")}()),a=r[0],i=r[1];o.useEffect((function(){a.focus&&(null==e?void 0:e.current)&&(e.current.focus(),i({focus:!1}))}),[a.focus]),a.focus}(m);var p=On(o.useState(e.initialQuery||""),2),f=p[0],v=p[1],g=On(o.useState("none"),2),h=g[0],b=g[1],y=(0,an.a)(rn.r.XS);o.useEffect((function(){e.resetSuggestionsOnNoActivation&&r&&(r.length>=e.activationLength||E())}),[r]),o.useEffect((function(){if(!r.length){var t=pn(e.initialLocalSuggestions,e.recentSearches);l(t)}}),[e.initialLocalSuggestions,e.recentSearches]),o.useEffect((function(){var t=e.initialQuery||"";r!==t&&(a(t),v(t))}),[e.initialQuery]),o.useEffect((function(){m.current&&e.autoFocusInput&&m.current.focus()}),[e.autoFocusInput]);var E=function(){var t=pn(e.initialLocalSuggestions,e.recentSearches);l(t)},S=function(){a(""),v("")};!function(e,t,n,r,a){o.useEffect((function(){e&&!e.current&&(e.current={resetQuery:t,setQuery:n,focusInput:r,blurInput:a})}),[null==e?void 0:e.current])}(e.controlsRef,S,a,(function(){var e;null===(e=m.current)||void 0===e||e.focus()}),(function(){var e;null===(e=m.current)||void 0===e||e.blur()}));var w,O,C,I,x,j=function(){b("none")},N=function(t){t.preventDefault(),Nn(e.onSubmit)&&e.onSubmit(r,m.current),e.clearQueryOnSelect&&S()},k=o.useMemo((function(){return e.debounceTime?pt.q.debounce(bn(e,l,E),e.debounceTime):bn(e,l,E)}),[e.debounceTime].concat(function(e){if(Array.isArray(e))return In(e)}(w=e.onSuggestionDependencies)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(w)||Cn(w)||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 T(){return"boolean"==typeof e.alwaysRenderSuggestions?e.alwaysRenderSuggestions:!!(e.alwaysRenderSuggestionsWhenFocused&&r.length>=e.activationLength)&&document.activeElement===m.current}return o.createElement(kn,{onSubmit:N,renderAsForm:!!e.renderAsForm},o.createElement(Zt,Object.assign({ref:function(e){null===e||m.current||(m.current=e.input)},suggestions:s,onSuggestionsFetchRequested:k,onSuggestionHighlighted:function(t){var n=t.suggestion;("none"!==h||n)&&(d.current&&e.onArrowKeyUpOrDown&&(d.current=!1,e.onArrowKeyUpOrDown()),b(n?"suggestion":"custom"))},onSuggestionsClearRequested:function(){T()||E()},onSuggestionSelected:function(t,n){var r=n.suggestion;r.generic||(e.clearQueryOnSelect&&S(),e.onSuggestionSelected(r,m.current,t))},getSuggestionValue:function(t){return function(t){return Nn(e.shouldUpdateQueryOnSelection)?e.shouldUpdateQueryOnSelection(t):e.shouldUpdateQueryOnSelection}(t)?function(e,t){return fn(t,e)?t[e]:""}(e.valueKey,t):r},renderSuggestion:function(t,n){if(t.generic){if("empty"===t.type)return r.length>=e.activationLength&&Nn(e.getEmptyStateComponent)?e.getEmptyStateComponent(r):o.createElement(o.Fragment,null);if("errored"===t.type&&Nn(e.getErrorStateComponent)){var a=bn(e,l,E);return e.getErrorStateComponent((function(){return a({value:r,reason:"input-changed"})}))}if("loading"===t.type)return i=e.loadingComponentClassName,o.createElement("div",{className:"d-flex justify-content-center cursor-default ".concat(null!=i?i:""),onClick:function(e){e.stopPropagation()}},o.createElement(Et.Z,{as:"span",animation:"border",role:"status"}))}var i;return Nn(e.getSuggestionComponent)?e.getSuggestionComponent(t,n):yn(e.valueKey,t)},renderSuggestionsContainer:function(t){var n=t.containerProps,a=n.ref,i=xn(n,["ref"]);if(!e.customScrollbarProps){var l={suggestions:c,query:r,isDropdownOpen:!!t.children};return o.createElement("div",Object.assign({ref:a},i,{onMouseOut:j}),t.children,e.getCreateComponent&&e.getCreateComponent(Object.assign({userInput:f,isActive:"custom"===h,resetQuery:S,resetSuggestions:E},l)),e.getFooterComponent&&e.getFooterComponent(l))}return o.createElement(Kt.ZP,Object.assign({ref:a},e.customScrollbarProps,i),t.children)},alwaysRenderSuggestions:T(),focusInputOnSuggestionClick:!y&&e.focusInputOnSuggestionClick,inputProps:{id:e.id,name:e.id,"aria-errormessage":"".concat(e.id,"Error"),"aria-label":e.label,placeholder:e.placeholder||u.T.getPhrase(jn,"placeholder"),value:r,onChange:function(t,n){var r=n.newValue,o=n.method;"type"===o&&v(r),("escape"!==o||(b("none"),null==e?void 0:e.resetQueryOnEscape))&&(["up","down"].includes(o)||(a(r),Nn(e.onQueryChange)&&e.onQueryChange(r)))},onKeyDown:function(t){"Backspace"!==t.key||!e.onBackspace||r?"ArrowUp"!==t.key&&"ArrowDown"!==t.key||(d.current=!0):e.onBackspace()},autoFocus:!!e.autoFocusInput,highlightOnFocus:e.highlightInputOnFocus,onClickSearchIcon:!!e.submitOnClickSearchIcon&&N,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:!!e.showClearInputIcon&&!!r.length,onClickClearInput:function(){S(),e.resetSuggestionsOnClear&&E(),Nn(e.onClickClearInput)&&e.onClickClearInput()},formSize:e.size,onBlur:function(){e.onBlur&&e.onBlur(r)},onFocus:function(){e.onFocus&&e.onFocus(r)},disabled:e.disabled},renderInputComponent:tn,theme:(O=e.theme,C=!!c.generic.length,I="function"==typeof O?O(C):O,x=function(e){return{container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded ".concat(Yt.suggestionsContainerOpen),suggestionsList:"list-unstyled m-0",suggestion:"".concat(e?"":"cursor-pointer"," py-1 px-2"),suggestionHighlighted:e?"":Yt.suggestionHighlighted,sectionContainer:"border-bottom py-1 ".concat(Yt.sectionContainer)}}(C),Object.assign(x,I)),multiSection:!0,renderSectionTitle:function(t){return Nn(e.renderSectionTitle)?e.renderSectionTitle(t,e.sectionTitleClassName):function(e,t){if(e.title)return o.createElement("div",{className:"pb-1 ".concat(null!=t?t:"")},o.createElement("strong",null,e.title))}(t,e.sectionTitleClassName)},getSectionSuggestions:wn},e.renderSuggestionsOnInputFocus?{shouldRenderSuggestions:function(){return Nn(e.renderSuggestionsOnInputFocus)?e.renderSuggestionsOnInputFocus(r):e.renderSuggestionsOnInputFocus}}:{})))}function Rn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Tn.defaultProps={valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialLocalSuggestions:[],searchIconPlacement:"right",renderAsForm:!0,onSuggestionDependencies:[],shouldUpdateQueryOnSelection:!0,focusInputOnSuggestionClick:!0,resetQueryOnEscape:!0};var Ln=function(e,t){var n,r,a=(n=o.useState(e),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return Rn(e,t);var n={}.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)?Rn(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=a[0],c=a[1];return o.useEffect((function(){var n=setTimeout((function(){return c(e)}),t);return function(){return clearTimeout(n)}}),[e,t]),i};const An={emptyState:"bKTf0"};var Fn="shared.typeaheadEmptyState";function Pn(e){var t=e.query,n=void 0===t?"":t,r=e.imageUrl,a=Ln(n,300);return o.createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},o.createElement("img",{alt:"",role:"presentation",src:r,className:"pb-2 ".concat(An.emptyState)}),o.createElement("h2",{role:"status",className:"h6"},o.createElement(y.x,{namespace:Fn,phrase:"noResults",options:{query:a,smartCount:a.length}})))}const Un={emptyState:"k5mEG"};var _n="shared.typeaheadErrorState";function Vn(e){return o.createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},o.createElement("img",{alt:"",role:"presentation",src:e.imageUrl,className:"pb-2 ".concat(Un.emptyState)}),o.createElement("h2",{className:"h6",role:"alert"},o.createElement(y.x,{namespace:_n,phrase:"error"})),o.createElement(ne.L,{onClick:function(t){t.stopPropagation(),e.onClickTryAgain()},className:"btn btn-link info-link p-0"},o.createElement(y.x,{namespace:_n,phrase:"tryAgain"})))}const Bn={container:"Dc3kX",suggestionsContainerOpen:"c5t3e",selectionContainer:"kFjoN",sectionContainer:"mLrE3"};var qn="shared.tokenizedTypeahead";function Gn(e){var t;return o.createElement("div",{className:"form-control h-auto d-flex align-items-top position-relative ".concat(e.hideIcon?"":"py-1 px-0"," ").concat(e.className)},!e.hideIcon&&o.createElement(Me.x,{className:"svg-container m-1",svgName:Qe.vn.Search}),o.createElement("div",{className:"".concat(Bn.selectionContainer," d-flex flex-wrap align-items-center mt-n1")},e.selections.map((function(t){return e.getInputTokenComponent?e.getInputTokenComponent(t):o.createElement(Rt,{key:t.id,selection:t,onClickRemove:e.removeSelection,onClickExpand:e.fetchSelectionMembers,hasStudentExperience:e.hasStudentExperience})})),o.createElement(Tn,Object.assign({},e,{onBackspace:function(){e.selections.length&&e.removeSelection(dt.m.last(e.selections))},recentSearchHeading:e.recentSearchHeading||u.T.getPhrase(qn,"recentSearchHeading"),placeholder:(null===(t=e.selections)||void 0===t?void 0:t.length)?" ":e.placeholder,searchIconPlacement:!1,clearQueryOnSelect:!0,getSuggestionComponent:function(t){return e.getSuggestionComponent?e.getSuggestionComponent(t):o.createElement(Qt,{entity:t,imageCdnUrl:e.imageCdnUrl,showDisplayName:e.hasStudentExperience})},getEmptyStateComponent:function(t){return o.createElement(Pn,{query:t,imageUrl:e.emptyStateImageUrl})},getErrorStateComponent:function(t){return o.createElement(Vn,{imageUrl:e.errorStateImageUrl,onClickTryAgain:t})},theme:{container:Bn.container,suggestionsContainerOpen:"bg-white py-1 rounded border mt-1 ".concat(Bn.suggestionsContainerOpen),sectionContainer:"border-bottom py-1 ".concat(Bn.sectionContainer)},sectionTitleClassName:"ps-2",renderSuggestionsOnInputFocus:e.renderSuggestionsOnInputFocus,onSuggestionDependencies:[e.selections]}))),!!e.sharePermissionsDescription&&o.createElement("span",{className:"px-2 text-secondary text-nowrap"},e.sharePermissionsDescription))}Gn.defaultProps={renderSuggestionsOnInputFocus:!0};var Mn="shared.feedbackRequestLivestream",Dn=u.T.encloseNamespace(Mn),zn={topic:"",studentLevel:[],producerCompany:"",additionalInfo:""},Hn=Se.Z_().max(Ce,Ie("maxCharactersError")),Wn=Se.Ry().shape({producerCompany:Hn.required((function(){return Dn("companyError")})),topic:Hn,studentLevel:Se.IX(Se.Z_()),additionalInfo:xe()}).noUnknown();function Qn(e){var t=(0,fe.b)(),n=t.values.studentLevel.map((function(t){return e.audiences.find((function(e){return e.name===t}))}))||[];function r(e){t.setFieldValue("studentLevel",dt.m.addOrRemoveImmutable(t.values.studentLevel,e.name)),requestAnimationFrame((function(){return t.setFieldTouched("studentLevel")}))}return o.createElement(o.Fragment,null,o.createElement(we.W,{placeholder:Dn("companyPlaceholder"),label:Dn("companyLabel"),name:"producerCompany",value:t.values.producerCompany,showRequiredStar:!0}),o.createElement(we.W,{placeholder:Dn("topicPlaceholder"),label:Dn("topicLabel"),name:"topic",value:t.values.topic}),o.createElement("div",{className:"form-group"},o.createElement("label",{className:"form-label"},o.createElement(y.x,{namespace:Mn,phrase:"audiencesLabel"})),o.createElement(Gn,{id:"audiences",placeholder:Dn("audiencesPlaceholder"),local:e.audiences,valueKey:"name",selections:n,onSuggestionSelected:r,removeSelection:function(e){return r(e)},errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:function(e){return o.createElement(Lt,{key:e.name,selection:{name:e.name,masterId:e.masterId},colourVariant:"teal",onClickRemove:function(e){return r(e)},hideExpander:!0})},getSuggestionComponent:function(e){return yn("name",e)},onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:function(e,t){var r=t.find((function(t){return t.name===e}));return vn(r?"":e,t,"name",0).filter((function(e){return!n.find((function(t){return t.name===e.name}))&&e.name!==(null==r?void 0:r.name)}))},focusInputOnSuggestionClick:!1,renderAsForm:!1,hideIcon:!0,onBlur:function(){return t.setFieldTouched("studentLevel")},className:"p-2 ".concat(t.touched.studentLevel&&t.errors.studentLevel?"is-invalid":"")}),t.touched.studentLevel&&t.errors.studentLevel&&o.createElement(Ke.A,{name:"audiences"},t.errors.studentLevel)),o.createElement(we.W,{as:"textarea",placeholder:Dn("otherPlaceholder"),label:Dn("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo}))}function Zn(e){return o.createElement(vr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},zn),e.initialValues),validationSchema:Wn}),o.createElement(Qn,{audiences:e.audiences}))}const Kn={image:"SdHLR"};function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Yn="shared.feedbackBeforeRequesting",$n=u.T.encloseNamespace(Yn);function Jn(e){var t,n,r=(t=o.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Xn(e,t);var n={}.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)?Xn(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.")}()),a=r[0],i=r[1];return o.createElement(o.Fragment,null,o.createElement("div",{className:"d-flex flex-column align-items-center my-4"},o.createElement("img",{className:"".concat(Kn.image," mb-3"),src:le.videoAlert}),o.createElement("h4",{className:"mb-3"},o.createElement(y.x,{namespace:Yn,phrase:"beforeRequesting"})),o.createElement("p",null,o.createElement(y.x,{namespace:Yn,phrase:"haveYouSearched",options:{exchangeUrl:"".concat(e.exchangeTvUrl,"/exchange")}}))),o.createElement(ve.u,null,o.createElement(ve.u.Checkbox,{id:"confirmExchange",checked:a,onToggle:function(){return i(!a)},label:$n("exchangeCheck")}),o.createElement(ve.u.Cancel,{onClick:function(){return e.setSelectedOption(null)},text:$n("back")}),o.createElement(ve.u.Submit,{variant:"dark",text:$n("continue"),disabled:!a,onClick:function(){return e.setConfirmed(!0)}})))}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tr,nr="shared.feedbackRequestVideo",rr=u.T.encloseNamespace(nr);!function(e){e.VideosTopic="videosTopic",e.VideoOrSeries="videoOrSeries"}(tr||(tr={}));var ar={videoRequestType:"",topic:"",studentLevel:[],videoTitle:"",seriesName:"",producerCompany:"",websiteOrTrailer:"",additionalInfo:""},or=function(){return Se.Z_().max(Ce,Ie("maxCharactersError"))},ir=Se.Ry().shape({videoRequestType:Se.Z_().required(rr("videoRequestTypeRequiredError")),topic:or().when("videoRequestType",{is:function(e){return e===tr.VideosTopic},then:or().required(rr("topicRequiredError")),otherwise:or().notRequired()}),studentLevel:Se.IX(Se.Z_()),videoTitle:or().when(["videoRequestType","seriesName"],{is:function(e,t){return e===tr.VideoOrSeries&&!t},then:or().required(rr("videoRequiredError")),otherwise:or().notRequired()}),seriesName:or(),producerCompany:or(),websiteOrTrailer:or(),additionalInfo:xe()}).noUnknown();function cr(e){var t=(0,fe.b)(),n=t.values.studentLevel.map((function(t){var n;return null===(n=e.audiences)||void 0===n?void 0:n.find((function(e){return e.name===t}))}))||[];function r(e){t.setFieldValue("studentLevel",dt.m.addOrRemoveImmutable(t.values.studentLevel,e.name)),requestAnimationFrame((function(){return t.setFieldTouched("studentLevel")}))}return o.createElement(o.Fragment,null,o.createElement(we.W,{as:"select",label:rr("videoRequestTypeLabel"),name:"videoRequestType",value:t.values.videoRequestType},o.createElement("option",{value:"",disabled:!0,hidden:!0},rr("videoRequestTypePlaceholder")),o.createElement("option",{value:tr.VideosTopic},rr("videosTopicType")),o.createElement("option",{value:tr.VideoOrSeries},rr("videoOrSeriesType"))),t.values.videoRequestType===tr.VideosTopic&&o.createElement(o.Fragment,null,o.createElement(we.W,{placeholder:rr("videoTopicPlaceholder"),label:rr("videoTopicLabel"),name:"topic",value:t.values.topic,showRequiredStar:!0}),o.createElement("div",{className:"form-group"},o.createElement("label",{className:"form-label"},o.createElement(y.x,{namespace:nr,phrase:"audiencesLabel"})),o.createElement(Gn,{id:"audiences",placeholder:rr("audiencesPlaceholder"),local:e.audiences,valueKey:"name",selections:n,onSuggestionSelected:r,removeSelection:function(e){return r(e)},errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:function(e){return o.createElement(Lt,{key:e.name,selection:{name:e.name,masterId:e.masterId},colourVariant:"teal",onClickRemove:function(e){return r(e)},hideExpander:!0})},getSuggestionComponent:function(e){return yn("name",e)},onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:function(e,t){var r=t.find((function(t){return t.name===e}));return vn(r?"":e,t,"name",0).filter((function(e){return!n.find((function(t){return t.name===e.name}))&&e.name!==(null==r?void 0:r.name)}))},focusInputOnSuggestionClick:!1,renderAsForm:!1,hideIcon:!0,onBlur:function(){return t.setFieldTouched("studentLevel")},className:"p-2 ".concat(t.touched.studentLevel&&t.errors.studentLevel?"is-invalid":"")}),t.touched.studentLevel&&t.errors.studentLevel&&o.createElement(Ke.A,{name:"audiences"},t.errors.studentLevel)),o.createElement(we.W,{as:"textarea",placeholder:rr("otherPlaceholder"),label:rr("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})),t.values.videoRequestType===tr.VideoOrSeries&&o.createElement(o.Fragment,null,o.createElement(we.W,{placeholder:rr("videoTitlePlaceholder"),label:rr("videoTitleLabel"),name:"videoTitle",value:t.values.videoTitle}),o.createElement(we.W,{placeholder:rr("seriesPlaceholder"),label:rr("seriesLabel"),name:"seriesName",value:t.values.seriesName}),o.createElement(we.W,{placeholder:rr("companyPlaceholder"),label:rr("companyLabel"),name:"producerCompany",value:t.values.producerCompany}),o.createElement(we.W,{placeholder:rr("videoTopicPlaceholder"),label:rr("topicLabel"),name:"topic",value:t.values.topic}),o.createElement(we.W,{placeholder:rr("websiteOrTrailerPlaceholder"),label:rr("websiteOrTrailerLabel"),name:"websiteOrTrailer",value:t.values.websiteOrTrailer}),o.createElement(we.W,{as:"textarea",placeholder:rr("otherPlaceholder"),label:rr("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})))}function lr(e){var t,n,r=(t=o.useState(!!e.skipBeforeRequesting),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return er(e,t);var n={}.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)?er(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.")}()),a=r[0],i=r[1],c=e.hasExchangeTvProduct&&!a;return o.createElement(vr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},ar),e.initialValues),validationSchema:ir,hideButtons:e.hasExchangeTvProduct&&!a,hideCancelButton:e.skipBeforeRequesting}),c&&o.createElement(Jn,{setConfirmed:i,setSelectedOption:e.setSelectedOption,exchangeTvUrl:e.exchangeTvUrl}),!c&&o.createElement(cr,{audiences:e.audiences}))}var sr="shared.feedbackSuggestImprovement",ur=u.T.encloseNamespace(sr),mr={suggestion:"",importance:""},dr=Se.Ry().shape({suggestion:xe().required(Ie("requiredError")),importance:xe()}).noUnknown();function pr(e){var t=(0,fe.b)();return o.createElement(o.Fragment,null,o.createElement(we.W,{as:"textarea",placeholder:ur("suggestionPlaceholder"),label:ur("suggestionLabel"),name:"suggestion",value:t.values.suggestion,showRequiredStar:!0}),o.createElement(we.W,{as:"textarea",placeholder:ur("whySuggestionPlaceholder"),label:ur("whySuggestionLabel"),name:"importance",rows:5,value:t.values.importance}),o.createElement("p",null,o.createElement(y.x,{namespace:sr,phrase:"contactSupport"})," ",o.createElement("button",{className:"btn btn-link text-underline p-0",onClick:function(){return e.setSelectedOption(ee.RAISE_ISSUE)}},o.createElement(y.x,{namespace:sr,phrase:"raiseIssue"}))))}function fr(e){return o.createElement(vr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},mr),e.initialValues),validationSchema:dr,successImageUrl:le.lightBulb,successHeading:ur("successHeading"),successDescription:ur("successDescription")}),o.createElement(pr,{setSelectedOption:e.setSelectedOption}))}function vr(e){var t=o.useRef(null);return o.createElement(fe.n,{onSubmit:e.onSubmit,initialValues:e.initialValues,validationSchema:e.validationSchema,validateOnMount:!0,innerRef:t},o.createElement(pe.l0,null,"form"===e.formStage&&e.children,o.createElement(Ee,{formStage:e.formStage,successImageUrl:e.successImageUrl,successHeading:e.successHeading,successDescription:e.successDescription}),!e.hideButtons&&o.createElement(he,{setSelectedOption:function(n){e.setFormState((function(e){var n;return Object.assign(Object.assign({},e),null===(n=t.current)||void 0===n?void 0:n.values)})),e.setSelectedOption(n)},submitText:e.submitText,formStage:e.formStage,closePopup:e.closePopup,hideCancelButton:e.hideCancelButton})))}function gr(e){var t={formStage:e.formStage,initialValues:e.initialValues,setFormState:e.setFormState,onSubmit:e.onSubmit,setSelectedOption:e.setSelectedOption,closePopup:e.closePopup};switch(e.selectedOption){case ee.SUGGEST_IMPROVEMENT:return o.createElement(fr,Object.assign({},t));case ee.REPORT_BUG:return o.createElement(mt,Object.assign({},t,{onFilesAdded:e.onFilesAdded,cancelUpload:e.cancelUpload,uploadingFiles:e.uploadingFiles,uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile,uploadError:e.uploadError,instanceRegion:e.instanceRegion}));case ee.REQUEST_VIDEO:return o.createElement(lr,Object.assign({},t,{audiences:e.audiences,hasExchangeTvProduct:e.hasExchangeTvProduct,exchangeTvUrl:e.exchangeTvUrl,skipBeforeRequesting:e.skipBeforeRequesting,hideCancelButton:e.hideCancelButton}));case ee.REQUEST_LIVESTREAM:return o.createElement(Zn,Object.assign({},t,{audiences:e.audiences}));case ee.RAISE_ISSUE:return o.createElement(Ge,Object.assign({},t));case ee.GIVE_PRAISE:return o.createElement(Re,Object.assign({},t));case ee.OTHER:return o.createElement(Ue,Object.assign({},t))}}function hr(e){return hr="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},hr(e)}function br(){br=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new T(r||[]);return a(i,"_invoke",{value:x(e,n,c)}),i}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",v="completed",g={};function h(){}function b(){}function y(){}var E={};s(E,i,(function(){return this}));var S=Object.getPrototypeOf,w=S&&S(S(R([])));w&&w!==n&&r.call(w,i)&&(E=w);var O=y.prototype=h.prototype=Object.create(E);function C(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function n(a,o,i,c){var l=m(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==hr(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function x(t,n,r){var a=d;return function(o,i){if(a===f)throw Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=f;var s=m(t,n,r);if("normal"===s.type){if(a=r.done?v:p,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=v,r.method="throw",r.arg=s.arg)}}}function j(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=m(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(hr(t)+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},C(I.prototype),s(I.prototype,c,(function(){return this})),t.AsyncIterator=I,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new I(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;k(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function yr(e){return function(e){if(Array.isArray(e))return wr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Sr(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 Er(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 r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||Sr(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 Sr(e,t){if(e){if("string"==typeof e)return wr(e,t);var n={}.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)?wr(e,t):void 0}}function wr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Or=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},Cr="shared.giveFeedback",Ir=u.T.encloseNamespace(Cr),xr=5,jr=60,Nr=1e6;function kr(e){var t,n,c,u,w,C=(0,P.Z)(),x=(0,m.useGetFetchAsync)(),j=p.a.useBasicFetch(F.N.currentUser()),N=p.a.useBasicFetch(j.data&&T.h.customer(j.data.customerId)),R=p.a.useBasicFetch(j.data&&F.N.user(j.data.id)),q=Er(o.useState(e.selectedOption),2),G=q[0],M=q[1],D=Er(o.useState("form"),2),z=D[0],H=D[1],W=Er(o.useState(null),2),Q=W[0],Y=W[1],$=(0,d.G)(S.D.MixedMediaUpload),J=function(e,t){var n,r,a,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],c=(r=o.useState(!1),a=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(r,a)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var n={}.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)?U(e,t):void 0}}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return o.useEffect((function(){var n=e();if(n)return n.off("add remove change"),n.on("add remove change",(function(){c((function(e){return!e}))})),t&&n.on("remove",t),function(){n.off("add remove change")}}),i),null===(n=e())||void 0===n?void 0:n.toJSON()}((function(){return $.getCollection()}),null),ne=o.useRef(null),re=o.useRef(0),ae=o.useRef([]),ie=Er(o.useState([]),2),ce=ie[0],le=ie[1],se=Er(o.useState(""),2),ue=se[0],me=se[1],pe=e.product===O.x.StreamableLearning?a.StreamableLearning:a.Subject,fe=p.a.useBasicFetch(k.presentation(pe)),ve=p.a.useBasicFetch(I.presentationAudiences(null,pe)),ge=null===(t=p.a.useBasicFetch(A.h.userProducts()).data)||void 0===t?void 0:t.find((function(e){return e.id===O.x.Exchange}));function he(e){M(e),e&&f.k.logUserAction({type:e},{actionType:v.Vw.Click,entity:v.py.Feedback,location:v.LZ.GiveFeedbackPopup,workflowPhase:v.eu.Start})}function be(e){switch(e){case ee.SUGGEST_IMPROVEMENT:return r.SuggestImprovement;case ee.REPORT_BUG:return r.ReportBug;case ee.REQUEST_VIDEO:return r.RequestVideo;case ee.REQUEST_LIVESTREAM:return r.RequestLivestream;case ee.GIVE_PRAISE:return r.GivePraise;case ee.RAISE_ISSUE:return r.RaiseIssue;case ee.OTHER:return r.Other}}return(0,_.L)(i.Radio.channel(E.Q4.MIXED_MEDIA_UPLOAD),g.S.UPLOAD_COMPLETE,(function(e){var t=e.toJSON();if(ae.current.push(t),re.current--,!(re.current>0)){var n=ae.current.length;ae.current.forEach((function(e){setTimeout((function(){n--;var t=$.getCollection().filter((function(t){var n;return(null===(n=t.get("fileInfo"))||void 0===n?void 0:n.id)===e.fileInfo.id}));$.getCollection().remove(t),le((function(e){return[].concat(yr(e),yr(t))})),n>0||(f.k.logUserAction({fileInfo:e.fileInfo},{location:v.LZ.GiveFeedbackPopup,actionType:v.Vw.Upload,entity:v.py.MixedMedia,descriptor:f.k.mapInteractionType(ne.current)}),C.success(Ir("mixedMediaUploadSuccess")))}))})),ae.current=[]}})),c=(0,K.T)(),u=c.hasPermissions,w=c.isLoaded,o.useEffect((function(){if(w&&u(B.C.StudentExperience)){var e=new Z;X.Y.logError(e),V.Q.Ry.throw(e)}}),[w]),o.createElement(b.G,{size:"lg",title:G?oe(G):Ir("title"),closePopup:e.closePopup,backdrop:"static"},!G&&o.createElement("p",null,o.createElement(y.x,{namespace:Cr,phrase:"description"})),!G&&o.createElement(de,{onSelectOption:he,options:[ee.SUGGEST_IMPROVEMENT,ee.REPORT_BUG,e.product===O.x.StreamableLearning?ee.REQUEST_LIVESTREAM:ee.REQUEST_VIDEO,ee.GIVE_PRAISE,ee.RAISE_ISSUE,ee.OTHER]}),G&&o.createElement(gr,{selectedOption:G,formStage:z,onSubmit:function(t,n){var r,a,o,i,c,l;return Or(this,void 0,void 0,br().mark((function u(){var m,d;return br().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return m={type:be(G),user:te.getUserInfo(j.data,N.data),tags:te.getTags(j.data,e.product,!1,["give feedback",oe(G).toLowerCase(),null===(a=null===(r=fe.data)||void 0===r?void 0:r.description)||void 0===a?void 0:a.toLowerCase().trim(),null===(l=null===(c=null===(i=null===(o=R.data)||void 0===o?void 0:o.userProfile)||void 0===i?void 0:i.metadata)||void 0===c?void 0:c.jobTitle)||void 0===l?void 0:l.toLowerCase()].filter(Boolean))},d=Object.assign(Object.assign({},t),{currentPageUrl:s.Ab.GetCurrentUrl()}),G===ee.REPORT_BUG&&ce.length&&(d=Object.assign(Object.assign({},d),te.categorizeFiles(ce))),u.prev=3,u.next=6,x(L.submitFeedback(m,d));case 6:f.k.logUserAction(Object.assign(Object.assign({},m),d),{actionType:v.Vw.Submit,entity:v.py.Feedback,location:v.LZ.GiveFeedbackPopup,workflowPhase:v.eu.Complete}),H("success"),u.next=13;break;case 10:u.prev=10,u.t0=u.catch(3),C.error(Ir("error"));case 13:return u.prev=13,n(),u.finish(13);case 16:case"end":return u.stop()}}),u,null,[[3,10,13,16]])})))},setSelectedOption:he,closePopup:e.closePopup,onFilesAdded:function(e,t){e.some((function(e){return e.size>jr*Nr}))?me(Ir("maxFileSizeUploadError",{limit:jr})):e.length>xr-J.length?me(Ir("maxFilesUploadError",{limit:xr})):e.some((function(e){return!l().isValidFile(e,h.l.MIXED_MEDIA)}))?me(Ir("invalidTypeUploadError")):(me(""),re.current+=e.length,t&&(ne.current=t),$.addFiles(e))},uploadingFiles:J,uploadedFiles:ce,deleteFile:function(e){le((function(t){return t.filter((function(t){return t.id!==e}))}))},cancelUpload:function(e){return $.cancelUpload(e)},audiences:ve.data,uploadError:ue,initialValues:Q,setFormState:Y,instanceRegion:null===(n=j.data)||void 0===n?void 0:n.instanceRegion,hasExchangeTvProduct:!!ge,exchangeTvUrl:null==ge?void 0:ge.url,skipBeforeRequesting:!!e.skipBeforeRequestingVideoStep,hideCancelButton:!!e.selectedOption}))}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 538-129609b691-exchange.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[538],{92869:(e,t,r)=>{r.d(t,{t:()=>o});var n=r(43823),i=r(95846),o={preventScrollTop:function(){n.Radio.channel(i.G.SHELL).trigger("prevent:scroll:top")}}},27898:(e,t,r)=>{r.d(t,{Q:()=>v,z:()=>p});var n=r(23481),i=r(75896),o=r(1048);function a(e){return a="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},a(e)}function c(e){return function(e){if(Array.isArray(e))return s(e)}(e)||u(e)||l(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 l(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.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)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}var d={"featured-result":1,"topic-list":8,company:8,"playlist-with-videos":1,"series-with-videos":1,"series-thumbnail":1,"playlist-thumbnail":1,"video-item":1,"companies-and-topics":16},p="curriculumCode",v={flattenResults:function(e){return e?e.results?Object.assign(Object.assign({},e),{results:i.m.flatten(e.results)}):Object.assign(Object.assign({},e),{results:[]}):null},getContextualSearchQueryParams:function(e){return e&&e.get("filterParam")?(t={},r=e.get("filterParam"),n=e.get("filterValue"),(r=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t):{};var t,r,n},mapMaxScoreToSearchResults:function(e,t){return e.map((function(e){return t?Object.assign(Object.assign({},e),{_maxScore:t}):e}))},groupResults:function(e,t,r,i,a){var s,p;if(!(null==e?void 0:e.length)&&!(null===(s=null==t?void 0:t.results)||void 0===s?void 0:s.length)&&!(null===(p=null==r?void 0:r.results)||void 0===p?void 0:p.length))return[];var v,f,y,h,g=function(e){if(Array.isArray(e))return e}(h=e)||u(h)||l(h)||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.")}(),b=g[0],E=g.slice(1),w=a.xs||a.sm,O=function(e,t,r,i,a){var l,s,u,p,v,f,y,h=a?"playlist-thumbnail":"playlist-with-videos",g=a?"series-thumbnail":"series-with-videos",b=[{type:"companies-and-topics",items:null!==(v=[].concat(c(null!==(s=null===(l=null==r?void 0:r.results)||void 0===l?void 0:l.slice(0,d.company))&&void 0!==s?s:[]),c(null!==(p=null===(u=null==t?void 0:t.results)||void 0===u?void 0:u.slice(0,d["topic-list"]))&&void 0!==p?p:[])))&&void 0!==v?v:[]},{type:"featured-result",items:o.t.isEmpty(i)?[]:[i]},{type:"video-item",items:[]},{type:"video-item",items:[]},{type:"video-item",items:[]},{type:h,items:[]},{type:g,items:[]},{heading:n.T.getPhrase("sharedSearch.utils","relatedTopics"),type:"topic-list",items:null!==(y=null===(f=null==t?void 0:t.results)||void 0===f?void 0:f.slice(d["topic-list"],2*d["topic-list"]))&&void 0!==y?y:[]}],E=!1;return null==e||e.forEach((function(e){var t=m(e,a);if(!e._featured||E||"video"!==e._index)if(b[2].items.length<d["video-item"]&&"video-item"===t)b[2].items.push(e);else if(b[3].items.length<d["video-item"]&&"video-item"===t)b[3].items.push(e);else if(b[4].items.length<d["video-item"]&&"video-item"===t)b[4].items.push(e);else if(b[5].items.length<d[h]&&t===h)b[5].items.push(e);else if(b[6].items.length<d[g]&&t===g)b[6].items.push(e);else{var r=b[b.length-1];if((null==r?void 0:r.type)===t){var n=d[t];r.items.length>=n?b.push({type:t,items:[e]}):r.items.push(e)}else b.push({type:t,items:[e]})}else E=!0})),b.filter((function(e){var t;return null===(t=e.items)||void 0===t?void 0:t.length}))}(b,t,r,i,w);return(null==E?void 0:E.length)?(f=O,y=w,(v=E)?(v.forEach((function(e){var t=f[f.length-1],r=!0;e.forEach((function(e){var n=m(e,y);if(r&&t.type===n)t.items.length>=d[n]?(r=!1,f.push({type:n,items:[e]})):t.items.push(e);else{var i=f[f.length-1];(null==i?void 0:i.type)===n?i.items.length>=d[n]?f.push({type:n,items:[e]}):i.items.push(e):f.push({type:n,items:[e]})}}))})),f):f):O}};function m(e,t){var r;return"video"===e._index||"interactive"===e._index||"clip"===e._index?"video-item":"series"===e._index?(null===(r=e.tallPoster)||void 0===r?void 0:r.id)&&!t?"series-with-videos":"series-thumbnail":"classification"===e._index?"topic-list":"playlist"===e._index?t?"playlist-thumbnail":"playlist-with-videos":void 0}},23201:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(32735),i=r(92802),o=r(2102),a=r(83345),c=r(33936),l="shared.formButtons";function s(e){var t=(0,i.u6)(),r=(0,c.l)(t);return n.createElement(o.m,{variant:e.variant||"primary",type:"submit",disabled:!r,size:e.size,className:e.className?e.className:"",showSpinner:t.isSubmitting},e.submitText?n.createElement(n.Fragment,null,e.submitText):n.createElement(a.x,{namespace:l,phrase:e.isNew?"create":"save"}))}},66122:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(32735);function i(e){return n.createElement("span",{id:"".concat(e.name,"Error"),className:"".concat(e.className," invalid-feedback d-block"),role:"status"},e.children)}},5960:(e,t,r)=>{var n,i;r.d(t,{X:()=>n}),function(e){e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived",e[e.Pending=3]="Pending",e[e.Rejected=4]="Rejected",e[e.Processing=5]="Processing"}(n||(n={})),function(e){e.Draft="Draft",e.Published="Published",e.Archived="Archived",e.Pending="Pending",e.Rejected="Rejected",e.Processing="Processing"}(i||(i={}))},78417:(e,t,r)=>{var n;r.d(t,{r:()=>n}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(n||(n={}))},78681:(e,t,r)=>{r.d(t,{Z:()=>n});var n={ratings:function(){return{url:"/api/domain/v2/me/ratings",key:"ratings"}}}},32299:(e,t,r)=>{r.d(t,{R:()=>f});var n,i=r(99940),o=r(97395),a=r(62803),c=r(5960),l=r(4594),s=r(78417);!function(e){e.Series="series",e.Playlist="playlist",e.Widget="widget",e.Folder="category",e.CategoryTree="categoryTree"}(n||(n={}));var u=r(68140),d=function(e,t){return o._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.VIDEO})},p=function(e,t){return o._.urlBuilder("/api/objects/".concat(e),{query:"thumbnail,_canBeConsumed,series,season,rating,libraries{typeId:[17]}",permissionFilterOption:s.r.StripMetadata,shareId:t})},v=function(e){return o._.urlBuilder("{gateway}/v1/objects",{"query.video":a.v.VIDEO_COLLECTION,"query.clip":a.v.CLIP_COLLECTION,"query.interactive":a.v.INTERACTIVE_COLLECTION,id:e})},m=function(e){var t=e.videoId,r=e.context,i=e.collectionId,c=e.moviesAndTv,l={videoId:t,limit:e.limit,query:a.v.VIDEO_COLLECTION};return r&&(r===n.Widget?l["context.widgetId"]=i:(l["context.collectionType"]=r,l["context.collectionId"]=i)),c&&(l["context.moviesAndTv"]=!0),o._.urlBuilder("{gateway}/v1/suggestions/related-videos",l)},f={video:function(e,t){return{url:o._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.VIDEO,permissionFilterOption:t}),publicUrl:o._.urlBuilder("/api/objects/".concat(e),{query:a.t.VIDEO,permissionFilterOption:t}),key:"videos:".concat(e,":").concat(t)}},publicVideo:function(e,t,r,n){return{url:p(e,t),key:"videos:".concat(e,":public:").concat(t),bootstrapName:"shared:object:".concat(e),success:r,error:n}},sharedVideo:function(e,t,r,n){return{url:d(e,t),key:"shared:video:".concat(e),success:r,error:n}},myVideos:function(e,t){var r=a.v.VIDEO_COLLECTION,n=a.v.CLIP_COLLECTION,i=a.v.INTERACTIVE,u="videos[".concat(r,"]{libraries.typeid:").concat(l.E.WorkspaceCollection,"}"),d="clips[".concat(n,"]"),p="interactives[".concat(i,"]{status:[").concat(c.X.Published,",").concat(c.X.Draft,"]}"),v={query:"(".concat(u,"|").concat(d,"|").concat(p,"){orderbydesc:id}"),permissionFilterOption:s.r.StripMetadata};return t&&(v.cursor=t),{url:o._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),v),key:"my:videos:".concat(t)}},videos:function(e,t){return{url:v(e),key:"videos:by:id:".concat(e.join(",")),success:t}},watchHistoryVideos:function(e,t){return{url:v(e),key:"watch:history:videos:by:id:".concat(e.join(",")),success:t}},updateVideo:function(e,t,r,n,o){return{key:"update:video:".concat(e),url:"{gateway}/v1/objects/".concat(e),type:i.k.PUT,data:t,success:r,error:n,always:o}},videoRatings:function(e,t){var r=e.map((function(e){return"id=".concat(e)}));if(r.length)return{url:"/api/domain/v2/objects?query=rating&".concat(r.join("&")),key:"video:ratings:by:id:".concat(e.join(",")),normalizeOptions:{namespace:t}}},videoMixinAssocs:function(e,t){if(e.map((function(e){return"id=".concat(e)})).length)return{url:o._.urlBuilder("{gateway}/v1/objects",{query:"interactives{limit:100},resources{limit:100},links{limit:100},_hasCurriculumLinks",id:e}),publicUrl:o._.urlBuilder("/api/objects",{query:"interactives{limit:100},resources{limit:100},links{limit:100},_hasCurriculumLinks",id:e}),key:"video:mixin:assocs:".concat(e.join(",")),normalizeOptions:{namespace:t}}},getRestrictions:function(e){var t=e.slice().sort();return{url:"/api/domain/v1/restrictedobjects"+"?objectTypeId=".concat(l.E.Video).concat(t.map((function(e){return"&objectId=".concat(e)})).join("")),key:"restrictions:".concat(t.join(",")),normalizeOptions:{namespace:"domain",idAttribute:"objectId"}}},delete:function(e,t,r){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:video:".concat(e),type:i.k.DELETE,success:t,error:r,invalidationKeys:["videos","search"]}},deleteBulk:function(e,t,r,n,o){var a=e.map((function(e){return"videoIds=".concat(e)})).join("&"),c=["categoryId=".concat(r),"".concat(a)].join("&");return{url:"/api/domain/v1/libraries/".concat(t,"/videos?").concat(c),key:"delete:bulk:video:".concat(e.join(":"),":").concat(t,":").concat(r),type:i.k.DELETE,success:n,error:o,invalidationKeys:["videos","search"]}},relatedVideos:function(e){var t=e.videoId,r=e.context,n=e.collectionId,i=e.moviesAndTv;return{url:m(e),key:"related:videos:".concat(t,":").concat(r,":").concat(n,":").concat(i)}},collectionVideos:function(e,t,r,n,i,l){var d=u.d.getVideoSortParam(t),p=a.v.VIDEO_COLLECTION,v=a.v.CLIP_COLLECTION,m=a.v.INTERACTIVE,f="videos[".concat(p,"]"),y="clips[".concat(v,"]"),h="interactives[".concat(m,"]{status:[").concat(c.X.Published,",").concat(c.X.Draft,"]}"),g=Object.assign({query:"(".concat(f,"|").concat(y,"|").concat(h,")").concat(d?"{".concat(d,"}"):""),permissionFilterOption:s.r.FilterOut},r?{cursor:r}:{}),b=["folder","videos",e,r,t].filter((function(e){return!!e})).join(":");return{url:o._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),g),key:b,success:n,error:i,always:l}},pointsOfInterest:function(e,t,r,n,i){var a={query:"{limit:100}",cursor:t};return{url:o._.urlBuilder("{gateway}/v1/objects/".concat(e,"/pointsofinterest"),a),publicUrl:o._.urlBuilder("/api/objects/".concat(e,"/pointsofinterest"),a),key:"pointsofinterest:".concat(e).concat(t?":".concat(t):""),success:r,error:n,always:i}},regionAlternatives:function(e,t,r,n){return{url:"/api/objects/videos/".concat(e,"/region-alternatives"),publicUrl:"/api/objects/videos/".concat(e,"/region-alternatives"),key:"video:regionAlternatives:".concat(e),normalize:!1,success:t,error:r,always:n}}}},83145:(e,t,r)=>{r.d(t,{U:()=>u});var n=r(99940),i=r(97395),o=r(75896),a=r(27898),c=r(62803),l=r(78417),s=r(68140),u={exchange:function(){return{url:i._.urlBuilder("/api/domain/v2/me/libraries",{type:["exchange"],maxCategoryDepth:0}),key:"exchange",normalize:!1,formatData:function(e){return o.m.first(e).data}}},categories:function(){return{url:i._.urlBuilder("/api/domain/v2/me/libraries",{type:["exchange"],maxCategoryDepth:2}),key:"exchange:categories",normalize:!1,formatData:function(e){return o.m.first(e).children}}},folderVideos:function(e,t,r){var n=s.d.getVideoSortParam(t),o=(n?"{".concat(n,",libraries.typeid:18}"):"")+c.v.VIDEO_COLLECTION;return{url:i._.urlBuilder("{gateway}/v1/objects/".concat(e,"/videos"),{cursor:r,query:o,permissionFilterOption:l.r.StripMetadata}),key:["folder","videos",e,r,t].filter((function(e){return!!e})).join(":")}},seriesVideos:function(e,t,r){var n=s.d.getVideoSortParam(t),o=(n?"{".concat(n,",libraries.typeid:18}"):"")+c.v.VIDEO_COLLECTION;return{url:i._.urlBuilder("{gateway}/v1/collections/".concat(e,"/videos"),{query:o,cursor:r}),key:["series","videos",e,r,t].filter((function(e){return!!e})).join(":")}},mostRecentVideos:function(e,t){var r="{orderByDesc:timestamp}"+c.v.VIDEO_COLLECTION;return{url:i._.urlBuilder("{gateway}/v1/collections/".concat(e,"/videos"),{query:r,cursor:t}),key:["mostRecent","videos",e,t].filter((function(e){return!!e})).join(":")}},addVideo:function(e,t){return{key:"add:video:exchange",url:"{gateway}/v1/users/me/add-videos",data:{libraryId:e,objectId:t},type:n.k.POST,invalidationKeys:"videos:".concat(t,":")}},suggestEdit:function(e){return{key:"suggest:an:edit",url:"{gateway}/v1/libraries/suggest-edit",data:e,type:n.k.POST}},search:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,o="search:".concat(e,":").concat(t,":").concat(n);o+=Object.keys(r).map((function(e){return r[e]})).join(";");var c=Object.assign({},Object.assign({index:t,cursor:null!=n?n:void 0,query:e},r));return{url:i._.urlBuilder("{gateway}/v3/search/exchange",c),key:o,formatData:function(e){var t,r,n,i=e.totalResults,o=null!==(r=null===(t=null==e?void 0:e.results)||void 0===t?void 0:t.filter((function(e){var t,r,n,o,a,c,l,s;if("series"!==e._index&&"playlist"!==e._index)return!0;if("playlist"===e._index){var u=e;return!!((null===(r=null===(t=u.clips)||void 0===t?void 0:t.data)||void 0===r?void 0:r.length)||(null===(o=null===(n=u.interactives)||void 0===n?void 0:n.data)||void 0===o?void 0:o.length)||(null===(c=null===(a=u.videos)||void 0===a?void 0:a.data)||void 0===c?void 0:c.length))||(i--,!1)}return 0!==(null===(s=null===(l=e.videos)||void 0===l?void 0:l.data)||void 0===s?void 0:s.length)||(i--,!1)})))&&void 0!==r?r:[];e.results=o,e.totalResults=i;var c=null===(n=o[0])||void 0===n?void 0:n._score;return Object.assign(Object.assign({},e),{results:a.Q.mapMaxScoreToSearchResults(o,c)})}}}}},95716:(e,t,r)=>{r.d(t,{M:()=>a});var n=r(2948),i=r(75795);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t){var r,a,c=(r=(0,n.D)("exchange:preview:".concat(e),t?i.O.getPreviousRoute():void 0),a=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,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(r,a)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.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}}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=c[0],s=c[1];return{previewContext:l,clearPreviewContext:function(){return s(void 0)}}}},61060:(e,t,r)=>{r.r(t),r.d(t,{ExchangeSuggestEditView:()=>ee});var n=r(32735),i=r(23481),o=r(92869),a=r(81886),c=r(20354),l=r(49985),s=r(65858),u=r(77696),d=r(92802),p=r(33795),v=r.n(p),m=r(14965),f=r(23201),y=r(11904),h=r(82644),g=r(13876),b=r(50132),E=r(83345),w="shared.flagRemovalRadio",O=i.T.encloseNamespace(w);function x(){var e=(0,d.u6)();return n.createElement("div",{className:"mb-3"},n.createElement("label",{className:"form-label"},n.createElement(E.x,{namespace:w,phrase:"flagRemovalReasonLabel"}),n.createElement("span",{className:"text-danger"},"*")),[O("nonEducational"),O("poorQuality"),O("offensive"),O("copyright"),O("ageAppropriate"),O("audio"),O("other")].map((function(t,r){return n.createElement(b.Z.Check,{type:"radio",key:r,label:t,name:t,id:"flag-".concat(r),onChange:function(){return function(t){e.setFieldValue("suggestion",t)}(t)},checked:e.values.suggestion===t,className:"mb-2"})})))}var j=r(79469),S=r(11607),k=r(66122);function L(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,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _(e,t);var r={}.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)?_(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 _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var C="shared.suggestEditForm";function I(e){var t=(0,d.u6)(),r=L(n.useState(),2),i=r[0],o=r[1],a=L(n.useState(!1),2),c=a[0],l=a[1];return n.createElement("div",{className:"form-group"},n.createElement("label",{className:"form-label"},n.createElement(E.x,{namespace:C,phrase:"suggestLabel"})),n.createElement("div",{"aria-describedby":"suggestEditRatingError"},n.createElement(j.Z,null,e.ratings.map((function(r){return n.createElement(S.L,{key:r.id,onClick:function(){return function(r){var n=(null==t?void 0:t.values.property)&&e.metadataValue===r.name;t.setFieldValue("suggestion",n?"":r.name),o(r),l(n)}(r)},className:"btn ".concat(r.id===(null==i?void 0:i.id)?"btn-dark":"btn-outline-dark")},r.code)})))),c&&n.createElement(k.A,{name:"suggestEditRating"},n.createElement(E.x,{namespace:C,phrase:"ratingError"})))}var P,T=r(5173),A=i.T.encloseNamespace("shared.suggestEditValidation");!function(e){e.VideoTitle="video title",e.Description="description",e.Rating="rating",e.SeriesTitle="series title",e.Season="season number",e.EpisodeNumber="episode number",e.BroadcastDate="broadcast date",e.Channel="channel",e.ProductionYear="production year",e.Distributors="distributors",e.ProductionCompanies="production companies",e.Directors="directors",e.Producers="producers",e.FlagRemoval="flag for removal",e.Other="other"}(P||(P={}));var N={VideoTitle:{name:P.VideoTitle,property:"name"},Description:{name:P.Description,property:"description"},Rating:{name:P.Rating,property:"rating.name"},SeriesTitle:{name:P.SeriesTitle,property:"series.name"},Season:{name:P.Season,property:"season.number"},EpisodeNumber:{name:P.EpisodeNumber,property:"episodeNumber"},BroadcastDate:{name:P.BroadcastDate,property:"dateBroadcast"},Channel:{name:P.Channel,property:"channel.name"},ProductionYear:{name:P.ProductionYear,property:"productionYear"},Distributors:{name:P.Distributors,property:"distributors",collection:!0},ProductionCompanies:{name:P.ProductionCompanies,property:"productionCompanies",collection:!0},Directors:{name:P.Directors,property:"directors",collection:!0},Producers:{name:P.Producers,property:"producers",collection:!0},FlagRemoval:{name:P.FlagRemoval},Other:{name:P.Other}};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var V="shared.suggestEditForm",D=i.T.encloseNamespace(V),F={property:"",suggestion:"",reason:"",currentValue:""};function B(e){var t,r,i,o,a=null===(t=e.ratings)||void 0===t?void 0:t.filter((function(e){return e.code})),c=(0,d.u6)(),l=(i=n.useState(),o=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,c=[],l=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return c}}(i,o)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var r={}.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)?R(e,t):void 0}}(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=l[0],u=l[1],p=null==c?void 0:c.values.property;return n.useEffect((function(){var t=function(){var t=N[p];if(!t||!t.property)return null;var r=v()(e.video,t.property);return!r||t.collection&&!r.data.length?D("none"):(t.collection&&(r=r.data.map((function(e){return e.name})).join(", ")),"BroadcastDate"===p?m.O.format(r,"D MMMM YYYY"):r)}();c.setValues({property:p,reason:"",suggestion:"",currentValue:t||""}),c.setTouched({}),u(t)}),[p]),n.createElement(d.l0,null,n.createElement(y.W,{as:"select",label:D("metadataLabel"),id:"property",name:"property",value:p,className:"text-capitalize",showRequiredStar:!0},n.createElement("option",{value:""},D("metadataPlaceholder")),Object.keys(N).map((function(e,t){return n.createElement("option",{key:t,value:e},N[e].name)}))),p&&n.createElement(n.Fragment,null,s&&n.createElement(n.Fragment,null,n.createElement("p",{className:"fw-semibold mb-0"},n.createElement(E.x,{namespace:V,phrase:"currentValueLabel"})," ",n.createElement("span",null,null===(r=N[p])||void 0===r?void 0:r.name)),n.createElement("p",null,s)),"Rating"===p&&n.createElement(I,{ratings:a,metadataValue:s}),"FlagRemoval"===p&&n.createElement(x,null),"Rating"!==p&&"FlagRemoval"!==p&&n.createElement(y.W,{label:D("suggestLabel"),placeholder:D("suggestPlaceholder"),type:"text",id:"suggestion",name:"suggestion",value:null==c?void 0:c.values.suggestion,showRequiredStar:!0}),"FlagRemoval"===p?n.createElement(y.W,{label:D("flagRemovalCommentsLabel"),placeholder:D("flagRemovalCommentsPlaceholder"),type:"text",id:"reason",name:"reason",value:null==c?void 0:c.values.reason}):n.createElement(y.W,{label:D("reasonLabel"),placeholder:D("reasonPlaceholder"),type:"text",id:"reason",name:"reason",value:null==c?void 0:c.values.reason,showRequiredStar:!0})),n.createElement(g.u,null,n.createElement(g.u.Cancel,{text:D("cancel"),onClick:e.closePopup,variant:"link"}),n.createElement(f.A,{variant:"dark",submitText:D("submit")})))}function q(e){return n.createElement(h.n,{initialValues:F,validationSchema:(0,T.Ry)().shape({property:(0,T.Z_)().required(A("metadata")),reason:(0,T.Z_)().when("property",{is:function(e){return"FlagRemoval"===e},then:(0,T.Z_)().notRequired(),otherwise:(0,T.Z_)().required(A("reason"))}),suggestion:(0,T.Z_)().required(A("suggestion")),currentValue:(0,T.Z_)()}),onSubmit:e.onClickSubmit},n.createElement(B,Object.assign({},e)))}var M=r(39151),G=r(78681),U=r(31949),Z=r(32299),z=r(69883),Y=r(1071),$=r(83145),W=r(95716);function X(e){return X="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},X(e)}function Q(){Q=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof h?t:h,a=Object.create(o.prototype),c=new I(n||[]);return i(a,"_invoke",{value:k(e,r,c)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",v="suspendedYield",m="executing",f="completed",y={};function h(){}function g(){}function b(){}var E={};s(E,a,(function(){return this}));var w=Object.getPrototypeOf,O=w&&w(w(P([])));O&&O!==r&&n.call(O,a)&&(E=O);var x=b.prototype=h.prototype=Object.create(E);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function r(i,o,a,c){var l=d(e[i],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==X(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(u).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var i=p;return function(o,a){if(i===m)throw Error("Generator is already running");if(i===f){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var c=n.delegate;if(c){var l=L(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var s=d(t,r,n);if("normal"===s.type){if(i=n.done?f:v,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=f,n.method="throw",n.arg=s.arg)}}}function L(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(X(t)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(S.prototype),s(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new S(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(x),s(x,l,"Generator"),s(x,a,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return c.type="throw",c.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!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 l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;C(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}var K=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{l(n.next(e))}catch(e){o(e)}}function c(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}l((n=n.apply(e,t||[])).next())}))},H="exchange.suggestEdit",J=i.T.encloseNamespace(H);function ee(e){var t=c.a.useGetFetchAsync(),r=(0,z.Z)(),i=(0,Y.b)(),d=i.loading,p=i.handleGenerateReportError,v=c.a.useBasicFetch(M.L.config()),m=c.a.useBasicFetch(U.N.currentUser()),f=c.a.useBasicFetch(Z.R.video(e.videoId)),y=c.a.useBasicFetch(G.Z.ratings()),h=(0,W.M)(e.videoId,!1),g=h.previewContext,b=h.clearPreviewContext;function w(){e.closePopup(),(null==g?void 0:g.appLink)&&(o.t.preventScrollTop(),a.Q.C$.trigger(g.appLink),b())}return v.hasCompleted&&m.hasCompleted&&f.hasCompleted&&y.hasCompleted?n.createElement(u.G,{title:J("title"),closePopup:w,showLoadingSpinner:d},n.createElement("p",null,n.createElement(E.x,{namespace:H,phrase:"description"})),n.createElement(q,{video:f.data,ratings:y.data,closePopup:w,onClickSubmit:function(e,n){return K(this,void 0,void 0,Q().mark((function i(){var o;return Q().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return o=Object.assign({videoId:f.data.id},e),i.prev=1,i.next=4,t($.U.suggestEdit(o));case 4:r.success(J("success")),w(),l.k.logUserAction({id:f.data.id,name:f.data.name},{actionType:s.Vw.Submit,entity:s.py.Video,descriptor:s.XX.SuggestEdit,location:s.LZ.Popup,workflowPhase:s.eu.Complete}),i.next=12;break;case 9:i.prev=9,i.t0=i.catch(1),p(i.t0,J("error"),J("noEmailError"));case 12:return i.prev=12,n(),i.finish(12);case 15:case"end":return i.stop()}}),i,null,[[1,9,12,15]])})))}})):n.createElement(n.Fragment,null)}},79469:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(95685),i=r.n(n),o=r(32735),a=r(46304),c=r(74512);const l=o.forwardRef((({bsPrefix:e,size:t,vertical:r=!1,className:n,role:o="group",as:l="div",...s},u)=>{const d=(0,a.vE)(e,"btn-group");let p=d;return r&&(p=`${d}-vertical`),(0,c.jsx)(l,{...s,ref:u,role:o,className:i()(n,p,t&&`${d}-${t}`)})}));l.displayName="ButtonGroup";const s=l}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[558],{32119:(e,t,r)=>{r.d(t,{G:()=>a});var n=r(32735),o=r(71365);function a(e){var t,r;return t=e,r=o.u.getInstance(t),n.useEffect((function(){return function(){o.u.releaseInstance(t)}})),r}},11904:(e,t,r)=>{r.d(t,{n:()=>w,W:()=>E});var n=r(32735),o=r(80247),a=r(50132),i=r(92802),c=r(79014),l=r(1048),s=r(28825),u=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 o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function f(e){var t=e.label,r=e.checkboxLabelClassName,o=e.checkboxLabelFontWeight,i=e.className,c=u(e,["label","checkboxLabelClassName","checkboxLabelFontWeight","className"]);return n.createElement(a.Z.Group,{className:"form-group"},n.createElement("div",{className:"form-check ".concat(i||"")},n.createElement(w,Object.assign({className:"form-check-input"},c)),n.createElement(a.Z.Label,{className:"form-check-label cursor-pointer ".concat("normal"===o?"fw-normal":""," \n ").concat(r),htmlFor:c.id},t),e.checkboxAppLink&&e.checkboxAppLinkText&&n.createElement(n.Fragment,null,n.createElement("span",null," "),n.createElement(s.F,{appLink:e.checkboxAppLink,className:"info-link"},e.checkboxAppLinkText))))}var m=r(83914),p=r(83345),d={getCustomFormControlClassName:function(e,t,r,n,o,a){var c="";return c=function(e,t){var r="";return r="select"===e?"form-select":"form-control","sm"===t&&(r+=" ".concat(r,"-sm")),"lg"===t&&(r+=" ".concat(r,"-lg")),r}(a,n),(0,i.u9)(t,r)&&(0,i.u9)(e,r)&&(c+=" is-invalid"),o&&(c+=" ".concat(o)),c}},b=r(35223);function y(e){var t=(0,i.u6)().values,r=l.t.get(t,e.fieldName);return"string"!=typeof r?n.createElement(n.Fragment,null):n.createElement("div",{className:"float-end text-secondary fw-normal"},r.length,"/",e.limit," characters")}const h={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG",spinner:"CycFx"};function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var g=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 o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},O="shared.formField";function w(e){var t,r,a=e.children,s=e.showLoadingSpinner,u=g(e,["children","showLoadingSpinner"]),f=(t=n.useState(e.type),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,o,a,i,c=[],l=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return c}}(t,r)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var r={}.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)?v(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.")}()),p=f[0],d=f[1],y=c.q.isFunction(a)?function(e){return a(e)}:n.Children.count(a)?a:null;if("password"!==u.type)return s?n.createElement("div",{className:"position-relative"},n.createElement(i.gN,Object.assign({},l.t.omit(u,["formSize"])),y),n.createElement("div",{className:h.spinner},n.createElement(o.Z,{animation:"border",size:"sm"}))):n.createElement(i.gN,Object.assign({},l.t.omit(u,["formSize"])),y);var O="position-relative ".concat(h.passwordContainer);return u.className&&(O+=" ".concat(u.className)),u.disabled&&(O+=" ".concat(h.passwordContainerDisabled)),n.createElement("div",{className:O},n.createElement(i.gN,Object.assign({},l.t.omit(u,["formSize","type","className"]),{type:p,className:"".concat(h.passwordInput," border-0 w-100 h-100 outline-none rounded")}),y),"password"===u.type&&n.createElement(m.x,{svgName:"password"===p?b.vn.VisibleOn:b.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(h.revealPassword),onClick:function(){d("password"===p?"text":"password")}}))}function E(e){var t=e.label,r=e.className,o=e.showCharacterCounter,c=e.showRequiredStar,s=e.infoTooltip,u=e.infoTooltipPlacement,v=e.infoText,E=e.formSize,S=e.showOptionalLabel,j=e.formGroupClassname,N=g(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel","formGroupClassname"]),x=(0,i.u6)(),P=x.errors,C=x.touched,k=function(){};if("checkbox"===N.type){var L=l.t.omit(e,["formSize","infoTooltipPlacement"]);return e.disabled&&(L.onChange=k),n.createElement(f,Object.assign({},L))}var T=Object.assign(Object.assign({},N),{className:d.getCustomFormControlClassName(P,C,N.name,E,r,"string"==typeof e.as?e.as:null)});return e.disabled&&(T.onChange=k),n.createElement(a.Z.Group,{className:"form-group ".concat(j)},!!t&&n.createElement(a.Z.Label,{htmlFor:N.id,className:"d-flex align-items-center"},t,c&&n.createElement("span",{className:"text-danger"},"*"),s&&n.createElement(m.x,{className:"svg-container text-secondary ".concat(h.infoTooltip),svgName:b.vn.Info,title:s,tooltipPlacement:u,tooltipSpanHack:!0}),S&&n.createElement("span",{className:"text-secondary"}," ",n.createElement(p.x,{namespace:O,phrase:"optional"})),!!o&&!!N.maxLength&&n.createElement("div",{className:"ms-auto"},n.createElement(y,{fieldName:N.name,limit:N.maxLength}))),n.createElement(w,Object.assign({},T,{"aria-errormessage":"".concat(N.name,"Error")})),!!v&&n.createElement(a.Z.Text,{className:"text-secondary"},v),n.createElement(i.Bc,{name:N.name},(function(e){return n.createElement(a.Z.Control.Feedback,{id:"".concat(N.name,"Error"),type:"invalid",role:"status"},e)})))}w.defaultProps={autoComplete:"off"},E.defaultProps={autoComplete:"off",infoTooltipPlacement:"top"}},82644:(e,t,r)=>{r.d(t,{b:()=>u,n:()=>s});var n=r(32735),o=r(92802),a=r(79014),i=r(1048);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var l=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 o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function s(e){var t=e.castInitialValues,r=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,f=l(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),m=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=i.t.deepClone(e);return function e(r){Object.keys(t).forEach((function(n){t.hasOwnProperty(n)&&(i.t.isObject(r[n])?e(r[n]):null===t[n]&&delete t[n])}))}(t),t}(s)):s,p={allowInitialSubmit:e.allowInitialSubmit};return n.createElement(o.J9,Object.assign({enableReinitialize:!0},f,{initialValues:m,onSubmit:function(t,n){var o=n.setSubmitting,a=n.resetForm,i=n.setFieldError,l=r&&e.validationSchema?e.validationSchema.cast(t):t;u(l,(function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r.reset&&a(),r.errors)for(var n=0,l=Object.entries(r.errors);n<l.length;n++){var s=(e=l[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,o,a,i,c=[],l=!0,s=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(c.push(n.value),c.length!==t);l=!0);}catch(e){s=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.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)?c(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],f=s[1];i(u,f)}o(!1)}))},initialStatus:p}),a.q.isFunction(e.children)?function(t){return e.children(t)}:n.Children.count(e.children)?e.children:null)}function u(){return(0,o.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},69883:(e,t,r)=>{r.d(t,{Z:()=>i});var n=r(79976),o=r(60139),a=r(32119);function i(){var e=(0,a.G)(n.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:o.NK.Warning,heading:o.R6.Warning,message:t})},info:function(t,r){e.createAlert({heading:t,message:r,type:o.NK.Info})}}}},1071:(e,t,r)=>{r.d(t,{b:()=>E});var n=r(81886),o=r(20354),a=r(12754),i=r(23481),c=r(97395),l=r(47663);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 u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var b="shared.verifiedEmailError",y=function(e){function t(e,r,n){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(o=function(e,t,r){return t=p(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,m()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}(this,t,["VerifiedEmailRequiredError"])).message=e,o.liteUrl=r,o.hasLite=n,o}return function(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&&d(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"VerifiedEmailRequiredError"}},{key:"dialogOptions",get:function(){var e=c._.safeUrlConcat(this.liteUrl,"settings/account");return{title:i.T.getPhrase(b,"heading"),text:this.hasLite?"".concat(this.message," ").concat(i.T.getPhrase(b,"visitSettings",{href:e})):this.message,buttons:[{text:i.T.getPhrase(b,"close"),className:"btn btn-dark",success:!0}]}}}])&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(l.S),h=r(39151),v=r(69883),g=r(70145),O=r(31949),w=function(){var e,t=o.a.useBasicFetch(O.N.currentUser()),r=o.a.useBasicFetch((null===(e=t.data)||void 0===e?void 0:e.isAuthenticated)&&g.h.userProducts()),n=!r.hasCompleted;return{hasProduct:function(e){var t;return!n&&!r.hasError&&!!(null===(t=r.data)||void 0===t?void 0:t.length)&&r.data.some((function(t){return t.id===e}))},products:r,isLoadingProducts:n}};function E(){var e=(0,v.Z)(),t=w(),r=t.hasProduct,i=t.isLoadingProducts,c=o.a.useBasicFetch(h.L.config());return{handleGenerateReportError:function(t,o,i){var l;t.responseJSON&&"no-email"===(null===(l=t.responseJSON)||void 0===l?void 0:l.type)?n.Q.Ry.throw(new y(i,c.data.liteUrl,r(a.x.Primary))):e.error(o)},loading:!c.hasCompleted||i}}}}]);