@clickview/exchange 0.0.1-dev.0 → 0.0.1-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.
- package/.eslintrc.json +2 -2
- package/dist/bundles.json +2 -2
- package/dist/css/{lite-exchange-11da8fa6e3.css → lite-exchange-cec4c599f2.css} +1 -1
- package/dist/scripts/243-c8777a8497-exchange.chunk.js +2 -0
- package/dist/scripts/{267-c794745bc7-exchange.chunk.js → 267-addd5149dc-exchange.chunk.js} +1 -1
- package/dist/scripts/{498-f12ae3d243-exchange.chunk.js → 498-72f28b8849-exchange.chunk.js} +1 -1
- package/dist/scripts/{612-62874e57da-exchange.chunk.js → 612-32446c9c81-exchange.chunk.js} +1 -1
- package/dist/scripts/70-a50a233cd2-exchange.chunk.js +1 -0
- package/dist/scripts/bundle-64db375dab.min.js +2 -0
- package/jest.config.js +11 -11
- package/package.json +36 -36
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/intersection-observer.d.ts +82 -82
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
- package/typings/utils/imports.d.ts +11 -11
- package/dist/scripts/243-1a6c42f0c1-exchange.chunk.js +0 -2
- package/dist/scripts/70-f24936c4d3-exchange.chunk.js +0 -1
- package/dist/scripts/bundle-59eb82b596.min.js +0 -2
- /package/dist/scripts/{243-1a6c42f0c1-exchange.chunk.js.LICENSE.txt → 243-c8777a8497-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{267-c794745bc7-exchange.chunk.js.LICENSE.txt → 267-addd5149dc-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{442-f089c95007-exchange.chunk.js → 442-3d8d3d0567-exchange.chunk.js} +0 -0
- /package/dist/scripts/{611-8f619aff9d-exchange.chunk.js → 611-e8b4d1e217-exchange.chunk.js} +0 -0
- /package/dist/scripts/{612-62874e57da-exchange.chunk.js.LICENSE.txt → 612-32446c9c81-exchange.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{637-f312680f75-exchange.chunk.js → 637-487bd9da9b-exchange.chunk.js} +0 -0
- /package/dist/scripts/{725-c1517598e5-exchange.chunk.js → 725-9a3505a30b-exchange.chunk.js} +0 -0
- /package/dist/scripts/{851-d71bd07a22-exchange.chunk.js → 851-d150558adb-exchange.chunk.js} +0 -0
- /package/dist/scripts/{90-73fc8286c0-exchange.chunk.js → 90-f767d9f5c1-exchange.chunk.js} +0 -0
- /package/dist/scripts/{91-2e27cf99bd-exchange.chunk.js → 91-dcc31982be-exchange.chunk.js} +0 -0
- /package/dist/scripts/{925-f30ba100dc-exchange.chunk.js → 925-475287539a-exchange.chunk.js} +0 -0
- /package/dist/scripts/{952-245618ec68-exchange.chunk.js → 952-fab06105d8-exchange.chunk.js} +0 -0
- /package/dist/scripts/{967-2db4e1019e-exchange.chunk.js → 967-a3e29f266f-exchange.chunk.js} +0 -0
- /package/dist/scripts/{972-b81f6f8450-exchange.chunk.js → 972-6a9e78c990-exchange.chunk.js} +0 -0
- /package/dist/scripts/{bundle-59eb82b596.min.js.LICENSE.txt → bundle-64db375dab.min.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 612-
|
|
1
|
+
/*! For license information please see 612-32446c9c81-exchange.chunk.js.LICENSE.txt */
|
|
2
2
|
"use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[612],{55110:(t,e,r)=>{r.d(e,{Z:()=>c});var n=r(32735),o=r(71365);var a=r(60139),i=r(79976);function c(){var t,e,r,c=(t=i.P.ALERT,e=t,r=o.u.getInstance(e),n.useEffect((function(){return function(){o.u.releaseInstance(e)}})),r);return{success:function(t){c.success(t)()},error:function(t){c.error(t)()},warning:function(t){c.createAlert({type:a.NK.Warning,heading:a.R6.Warning,message:t})}}}},85854:(t,e,r)=>{r.d(e,{i:()=>l});var n=r(99940),o=r(97395),a=r(110);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t){return Object.entries(t).reduce((function(t,e){var r,n,o=(n=2,function(t){if(Array.isArray(t))return t}(r=e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(r,n)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(r,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=o[0],c=o[1];return t[a.charAt(0).toLowerCase()+a.slice(1)]=c,t}),{})}function u(t){return t?Array.isArray(t)?function(t){return t.map(c)}(t):c(t):null}var l={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:u}},region:function(t){return{url:"/api/tv/api/v2/regions/".concat(t),key:"tv:region:".concat(t),normalize:!1,formatData:u}},channels:function(t){return{url:o._.urlBuilder("/api/tv/api/v2/channels",{region:t}),key:"tv:channels:".concat(t),normalize:!1,formatData:function(t){return u(t).sort((function(t,e){return t.sortOrder-e.sortOrder}))}}},programsByChannel:function(t,e,r,n){return{url:o._.urlBuilder("/api/tv/api/v3/regions/".concat(t,"/channels/programs"),{channel:e,startDate:r,endDate:n}),key:["tv:programs:by:channel",t,e,r,n].join(":"),normalize:!1,formatData:u}},programsByLetter:function(t,e,r,n){return{url:o._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:t,startsWith:e,startDate:r,endDate:n}),key:["tv:programs:by:letter",t,e,r,n].join(":"),normalize:!1,formatData:u}},program:function(t){return{url:"/api/tv/api/v3/programs/".concat(t),key:"tv:programs:".concat(t),normalize:!1,formatData:u}},search:function(t,e,r,n){var a=n||0;return{url:o._.urlBuilder("/api/tv/api/v3/search",{region:t,query:e,filter:r,page:a,size:25}),key:["tv:search",t,e,r,a].join(":"),normalize:!1,formatData:function(t){var e=u(t);return e.results=u(t.Results),e.page=a,e}}},addFullVideo:function(t){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:n.k.POST,data:t}},adFreeCredits:function(t,e){var r=new Date;r.setHours(0,0,0,0),r.setMinutes(r.getMinutes()+r.getTimezoneOffset());var n=a.O.add(r,1,"day");return{url:o._.urlBuilder("/api/tv/api/v1/user-requests",{username:t,region:e,from:a.O.convertUTCToLocal(r).toISOString(),to:a.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:u}},createAdFreeRequest:function(t){return{url:"/api/tv/api/v1/user-requests",key:"tv:create:add:free:request",normalize:!1,type:n.k.POST,data:t,invalidationKeys:["tv:add:free:credits"]}}}},57612:(t,e,r)=>{r.r(e),r.d(e,{TvAddFullVideoView:()=>w});var n=r(85854),o=r(60139),a=r(81886),i=r(20354),c=r(21132),u=r(75230),l=r(31949),s=r(55110),f=r(32735),h=r(65185),p=r(73818),d=r(82329),v=r(99742);function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function m(){m=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var a=e&&e.prototype instanceof h?e:h,i=Object.create(a.prototype),c=new _(o||[]);return n(i,"_invoke",{value:L(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function h(){}function p(){}function d(){}var v={};u(v,a,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(j([])));w&&w!==e&&r.call(w,a)&&(v=w);var b=d.prototype=h.prototype=Object.create(v);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,a,i,c){var u=s(t[n],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==y(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return o("throw",t,i,c)}))}c(u.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function L(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function E(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:T}}function T(){return{value:void 0,done:!0}}return p.prototype=d,n(b,"constructor",{value:d,configurable:!0}),n(d,"constructor",{value:p,configurable:!0}),p.displayName=u(d,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},k(x.prototype),u(x.prototype,i,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new x(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(b),u(b,c,"Generator"),u(b,a,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=j,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var g=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{u(n.next(t))}catch(t){a(t)}}function c(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}u((n=n.apply(t,e||[])).next())}))};function w(t){var e=i.a.useGetFetchAsync(),r=(0,s.Z)(),y=i.a.useBasicFetch(n.i.region(t.region)),w=i.a.useBasicFetch(n.i.program(t.id)),b=i.a.useBasicFetch(l.N.currentUser()),k=i.a.useBasicFetch(l.N.workspace()),x=y.hasCompleted&&w.hasCompleted&&b.hasCompleted&&k.hasCompleted;return f.createElement(c.G,{title:"Add full video",showLoadingSpinner:!x,closePopup:t.closePopup},x&&f.createElement(f.Fragment,null,f.createElement("div",{className:"p-4"},f.createElement("img",{src:v.W.General.VIDEO_BOX,className:"img-fluid px-5",draggable:!1})),f.createElement("p",null,"The full recording will be added to ",f.createElement("strong",null,"My Videos"),". This may take up to 20 minutes.")),f.createElement(u.u,null,f.createElement(u.u.Cancel,{text:"Back",onClick:function(){a.Q.AppLinkHelper.trigger({application:d.O.TV,action:p.e.Tv.ADD,args:[y.data.code,w.data.id]})},variant:"link"}),f.createElement(u.u.Submit,{text:"Add",onClick:function(){return g(this,void 0,void 0,m().mark((function a(){return m().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,e(n.i.addFullVideo({userId:b.data.id,customerId:b.data.customerId,globalId:w.data.globalId,libraryId:k.data.id}));case 3:r.success({heading:h.R.Success,message:"<strong>".concat(w.data.title,"</strong> will be added to My Videos"),appLinkText:"Go to My Videos",appLink:{application:d.O.TV,action:p.e.Tv.INDEX},type:o.NK.Success}),a.next=9;break;case 6:a.prev=6,a.t0=a.catch(0),r.error("Something went wrong.");case 9:return a.prev=9,t.closePopup(),a.finish(9);case 12:case"end":return a.stop()}}),a,null,[[0,6,9,12]])})))},variant:"dark"})))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[70],{29254:(e,t,r)=>{r.d(t,{C:()=>P,g:()=>l});var n=r(32735),o=r(23481),i=r(35223),a=r(96560),c=r(1164);function u(e){return u="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},u(e)}function s(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===u(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l,f="shared.shared-utils",p={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case a.r.HostedLibrary:case a.r.CustomLibrary:return e.name;case a.r.Exchange:return o.T.getPhrase(f,"exchange");case a.r.Workspace:return o.T.getPhrase(f,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case a.r.HostedLibrary:case a.r.CustomLibrary:return"bg-info";case a.r.Exchange:return"bg-green";case a.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,r;return!!(null===(r=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===r?void 0:r.length)},mapTypeToSvg:function(e){var t,r=(s(t={},c.L.Pdf,i.vn.FilePDF),s(t,c.L.Image,i.vn.FileImg),s(t,c.L.PowerPoint,i.vn.FilePowerpoint),s(t,c.L.Document,i.vn.FileWord),s(t,c.L.Excel,i.vn.FileExcel),s(t,c.L.Zip,i.vn.FileZip),s(t,c.L.File,i.vn.File),t)[e];return r||(r=i.vn.Folder),r},mapTypeToClass:function(e){switch(e){case c.L.Pdf:return"icon-red";case c.L.Image:return"icon-purple";case c.L.Document:return"icon-blue";case c.L.Excel:return"icon-green";case c.L.PowerPoint:return"icon-orange";case c.L.Zip:return"icon-teal";case c.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case c.L.Pdf:return o.T.getPhrase(f,"pdf");case c.L.Image:return o.T.getPhrase(f,"image");case c.L.Document:return o.T.getPhrase(f,"document");case c.L.Excel:return o.T.getPhrase(f,"spreadsheet");case c.L.PowerPoint:return o.T.getPhrase(f,"presentation");case c.L.Zip:return o.T.getPhrase(f,"zipArchive");case c.L.File:return o.T.getPhrase(f,"file");default:return""}}},d=r(9366),g=function(e,t,r){var n=t-(e=e.toString()).length;return n<=0?e:new Array(n+1).join(r)+e},y={ToDisplayDuration:function(e){if(!d.isNumber(e))return"";var t=new Date(e),r=t.getUTCHours(),n=g(t.getUTCMinutes(),2,"0"),o=g(t.getUTCSeconds(),2,"0");return r>0?"".concat(r,":").concat(n,":").concat(o):"".concat(n,":").concat(o)},ToDisplayDurationNewStyle:function(e){if(!d.isNumber(e))return"";var t=new Date(e),r=t.getUTCHours(),n=t.getUTCMinutes(),o=t.getUTCSeconds();if((r>0||n>0)&&o>=30&&(n+=1),r>0){var i=r>1?"hrs":"hr";return n>0?"".concat(r).concat(i," ").concat(n,"m"):"".concat(r," ").concat(i)}return n>0?"".concat(n,"m"):"".concat(o,"s")}},b=r(18150),v=r(83914),m=r(5960),h=r(26361),w=o.T.encloseNamespace("shared.badges");function P(e){var t=e.type,r=e.data;if(!function(e,t){var r,n,o;return"boolean"==typeof t?!!t:e===l.Rating?t&&!!t.value:e===l.Resources?!!(null==t?void 0:t.length)||!!(null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.length):e===l.Interactive?!!(null==t?void 0:t.length)||!!(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length):e===l.Captions?!!(null==t?void 0:t.length)||!!(null===(o=null==t?void 0:t.data)||void 0===o?void 0:o.length):e===l.Status?"number"==typeof t:!!t}(t,r))return n.createElement(n.Fragment,null);var o=function(e,t){var r="";if(e===l.DurationApproximate&&(r="duration-badge-new px-2 rounded-pill text-nowrap d-flex align-items-center"),e===l.DurationExact&&(r="duration-badge"),e===l.Interactive&&(r="interactive-badge"),e===l.Rating&&(r="rating-badge ".concat(p.mapRatingToClass(t.value))),e===l.ProductionYear&&(r="production-year-badge"),e===l.Resources&&(r="resources-badge"),e===l.Captions)return"p-0";if(e===l.Status)return"badge ".concat(function(e){switch(e){case m.X.Published:return"badge-success";case m.X.Archive:case m.X.Rejected:return"badge-danger";case m.X.Draft:return"draft-badge px-2 rounded-pill text-nowrap d-flex align-items-center";case m.X.Pending:case m.X.Processing:return"badge-warning"}}(t));if(e===l.Trending)return"trending-badge px-2 d-flex align-items-center";if(e===l.Count&&(r="count-badge px-1 rounded"),e===l.Restriction){var n=h.l.mapRestrictionToClass(t.restrictions);return"restriction-badge badge-pill px-2 d-flex align-items-center ".concat(n)}return"".concat("badge"," ").concat(r)}(t,r);o="".concat(o," ").concat(e.inline?"d-inline-block":"d-flex justify-content-center");var a=function(e,t){return e===l.Interactive?w("interactive"):e===l.DurationApproximate?y.ToDisplayDurationNewStyle(t):e===l.DurationExact?y.ToDisplayDuration(t):e===l.Rating?t.code:e===l.ProductionYear?t:e===l.Resources?w("resources"):e===l.Captions?n.createElement(v.x,{svgName:i.vn.CloseCaptionBadge}):e===l.Status?m.X[t]:e===l.Trending?n.createElement(n.Fragment,null,n.createElement(v.x,{svgName:i.vn.Trending}),n.createElement("span",{className:"pl-1"},t)):e===l.Count?t:e===l.Restriction?n.createElement(n.Fragment,null,n.createElement(v.x,{svgName:h.l.mapRestrictionToSvg(t.restrictions)}),n.createElement("span",null,h.l.mapRestrictionToText(t.restrictions,t.yearGroups))):void 0}(t,r),c=function(e,t){return e===l.Rating?{title:t.name,placement:"top"}:null}(t,r),u=e.inline&&"";return c?n.createElement("span",{className:"badge-wrapper"},n.createElement(b.u,Object.assign({},c,{spanHack:!0,spanHackClassName:u}),n.createElement("span",{className:o},a))):n.createElement("span",{className:"".concat(o," badge-wrapper")},a)}!function(e){e.DurationExact="duration-exact",e.DurationApproximate="duration-approximate",e.Interactive="interactive",e.Rating="rating",e.ProductionYear="production-year",e.Resources="resources",e.Captions="captions",e.Status="status",e.Trending="trending",e.Count="count",e.Restriction="restriction"}(l||(l={}))},96560:(e,t,r)=>{var n;r.d(t,{r:()=>n}),function(e){e.Folder="category",e.CategoryTree="category_tree",e.CustomLibrary="custom_library",e.HostedLibrary="hosted_library",e.Exchange="exchange",e.Workspace="workspace",e.Video="video",e.Clip="clip",e.Interactive="interactive"}(n||(n={}))},1164:(e,t,r)=>{var n;r.d(t,{L:()=>n}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(n||(n={}))},69834:(e,t,r)=>{r.d(t,{r:()=>T});var n=r(81886),o=r(50242),i=r(67058),a=r(49075),c=r(23481),u=r(64364);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 l(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,(void 0,o=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===s(o)?o:String(o)),n)}var o}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var d="shared.privateResourceError",g=function(e){!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&&f(e,t)}(a,e);var t,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=p(n);if(o){var r=p(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return 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)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,c.T.getPhrase(d,"title"))}return t=a,(r=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return c.T.getPhrase(d,"heading")}},{key:"description",get:function(){return c.T.getPhrase(d,"description")}}])&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(u.H);function y(e){return y="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},y(e)}function b(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,(void 0,o=function(e,t){if("object"!==y(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===y(o)?o:String(o)),n)}var o}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var h="shared.regionLockedResourceError",w=function(e){!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&&v(e,t)}(a,e);var t,r,n,o,i=(n=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(n);if(o){var r=m(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===y(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)}(this,e)});function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,c.T.getPhrase(h,"title"))}return t=a,(r=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return c.T.getPhrase(h,"heading")}},{key:"description",get:function(){return c.T.getPhrase(h,"description")}}])&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(u.H),P={notFound:i.d,forbidden:{rating:g,yearLevel:g,region:w,privacy:g},badRequest:a._};function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var i;i="number"==typeof e?e:e.status;var a=Object.assign(Object.assign({},P),t);i&&n.Q.ErrorHelper.isStatusCodeError(i)&&(i!==o.o.NotFound?i!==o.o.Forbidden?r.badRequest||n.Q.ErrorHelper.throw(new a.badRequest):r.forbidden||n.Q.ErrorHelper.throw(new a.forbidden.privacy):r.notFound||n.Q.ErrorHelper.throw(new a.notFound))}}}}]);
|