@playkit-js/banner-overlay 1.2.6-canary.0-99d06db → 1.2.6

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.
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see playkit-banner-overlay.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("KalturaPlayer",[],e):"object"==typeof exports?exports.KalturaPlayer=e():(t.KalturaPlayer=t.KalturaPlayer||{},t.KalturaPlayer.plugins=t.KalturaPlayer.plugins||{},t.KalturaPlayer.plugins.bannerOverlay=e())}(self,(()=>(()=>{var t={341:t=>{self,t.exports=function(){var t={61:function(t,e,r){var n=r(698).default;function i(){"use strict";t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof A?e:A,o=Object.create(i.prototype),a=new S(n||[]);return s(o,"_invoke",{value:R(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var y="suspendedStart",g="suspendedYield",v="executing",m="completed",b={};function A(){}function _(){}function E(){}var x={};p(x,l,(function(){return this}));var C=Object.getPrototypeOf,w=C&&C(C(L([])));w&&w!==o&&a.call(w,l)&&(x=w);var T=E.prototype=A.prototype=Object.create(x);function I(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(i,o,s,u){var l=d(t[i],t,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==n(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(f).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(l.arg)}var i;s(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function R(t,r,n){var i=y;return function(o,a){if(i===v)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===y)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var l=d(t,r,n);if("normal"===l.type){if(i=n.done?m:g,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=m,n.method="throw",n.arg=l.arg)}}}function k(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,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;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,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function P(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[l];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(a.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(n(t)+" is not iterable")}return _.prototype=E,s(T,"constructor",{value:E,configurable:!0}),s(E,"constructor",{value:_,configurable:!0}),_.displayName=p(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,p(t,f,"GeneratorFunction")),t.prototype=Object.create(T),t},r.awrap=function(t){return{__await:t}},I(O.prototype),p(O.prototype,c,(function(){return this})),r.AsyncIterator=O,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new O(h(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},I(T),p(T,f,"Generator"),p(T,l,(function(){return this})),p(T,"toString",(function(){return"[object Generator]"})),r.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}},r.values=L,S.prototype={constructor:S,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(N),!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 t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){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 i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(o)},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),b},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),N(r),b}},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 i=n.arg;N(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},698:function(t){function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},687:function(t,e,r){var n=r(61)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{NAME:function(){return Lt},Provider:function(){return St},ProviderParser:function(){return ut},RequestBuilder:function(){return ct},ResponseTypes:function(){return t},VERSION:function(){return Dt}});var t={};function e(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){return o="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},o(t)}function a(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===o(e)?e:String(e)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function u(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}function p(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function d(t,e,r){return(e=a(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.r(t),r.d(t,{BaseServiceResult:function(){return C},KalturaAccessControlMessage:function(){return j},KalturaAccessControlModifyRequestHostRegexAction:function(){return R},KalturaBaseEntryListResponse:function(){return I},KalturaBumper:function(){return N},KalturaDrmPlaybackPluginData:function(){return k},KalturaFlavorAsset:function(){return S},KalturaMediaEntries:function(){return L},KalturaMediaEntry:function(){return T},KalturaMetadata:function(){return D},KalturaMetadataListResponse:function(){return M},KalturaPlaybackContext:function(){return B},KalturaPlaybackSource:function(){return P},KalturaPlaylist:function(){return U},KalturaRuleAction:function(){return O},KalturaUIConfResponse:function(){return F},KalturaUserEntry:function(){return V},KalturaUserEntryListResponse:function(){return G}});var y=r(687),g=r.n(y),v={get:function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}}},m={};function b(t){return v.get(t)}var A=b,_=function t(e){var r;return Array.isArray(e)?(r=e.length>0?e.slice(0):[]).forEach((function(e,n){("object"===o(e)||Array.isArray(e)&&e.length>0)&&(r[n]=t(e))})):"object"===o(e)?(r=Object.assign({},e),Object.keys(r).forEach((function(e){("object"===o(r[e])||Array.isArray(r[e])&&r[e].length>0)&&(r[e]=t(r[e]))}))):r=e,r},E={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0,loadThumbnailWithKs:!1,replaceHostOnlyManifestUrls:!1},x=function(){function t(){i(this,t)}return u(t,null,[{key:"set",value:function(t){null!=t&&t.overrideServiceUrl&&(t.serviceUrl=t.overrideServiceUrl),t&&Object.assign(E,t)}},{key:"get",value:function(){return _(E)}},{key:"serviceUrl",get:function(){return E.serviceUrl}}]),t}(),C=u((function t(e){i(this,t),d(this,"hasError",!1),"KalturaAPIException"===e.objectType?(this.hasError=!0,this.error=new w(e.code,e.message)):e.error&&"KalturaAPIException"===e.error.objectType?(this.hasError=!0,this.error=new w(e.error.code,e.error.message)):this.data=e})),w=u((function t(e,r){i(this,t),this.code=e,this.message=r})),T=u((function t(e){i(this,t),this.id=e.id,this.referenceId=e.referenceId,this.externalSourceType=e.externalSourceType,this.name=e.name,this.description=e.description,this.dataUrl=e.dataUrl,this.type=e.type,this.entryType=e.mediaType,this.flavorParamsIds=e.flavorParamsIds,this.duration=e.duration,this.poster=e.thumbnailUrl,this.rawThumbnailUrl=e.thumbnailUrl,this.status=e.status,this.dvrStatus=e.dvrStatus,this.tags=e.tags,this.adminTags=e.adminTags,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.creatorId=e.creatorId,this.userId=e.userId,this.endDate=e.endDate,this.plays=e.plays,this.views=e.views,this.downloadUrl=e.downloadUrl,this.rootEntryId=e.rootEntryId,this.capabilities=e.capabilities}));d(T,"EntryType",{AUTOMATIC:{value:-1},EXTERNAL_MEDIA:{value:"externalMedia.externalMedia"},MEDIA_CLIP:{value:1},MIX:{value:2},PLAYLIST:{value:5},DATA:{value:6},LIVE_STREAM:{value:7},LIVE_CHANNEL:{value:8},DOCUMENT:{value:10}}),d(T,"MediaType",{VIDEO:{value:1},IMAGE:{value:2},AUDIO:{value:5},LIVE_STREAM_FLASH:{value:201},LIVE_STREAM_WINDOWS_MEDIA:{value:202},LIVE_STREAM_REAL_MEDIA:{value:203},LIVE_STREAM_QUICK_TIME:{value:204}}),d(T,"EntryStatus",{ERROR_IMPORTING:-2,ERROR_CONVERTING:-1,SCAN_FAILURE:"virusScan.ScanFailure",IMPORT:0,INFECTED:"virusScan.Infected",PRECONVERT:1,READY:2,DELETED:3,PENDING:4,MODERATE:5,BLOCKED:6,NO_CONTENT:7}),d(T,"EntryModerationStatus",{PENDING_MODERATION:1,APPROVED:2,REJECTED:3,FLAGGED_FOR_REVIEW:4,MODERATE:5,AUTO_APPROVED:6});var I=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).hasError||(e.totalCount=t.totalCount,e.totalCount>0&&(e.entries=[],t.objects.map((function(t){return e.entries.push(new T(t))})))),e}return u(o)}(C),O=u((function t(e){i(this,t),this.type=e.type}));d(O,"Type",{DRM_POLICY:"drm.DRM_POLICY",BLOCK:1,PREVIEW:2,LIMIT_FLAVORS:3,ADD_TO_STORAGE:4,LIMIT_DELIVERY_PROFILES:5,SERVE_FROM_REMOTE_SERVER:6,REQUEST_HOST_REGEX:7,LIMIT_THUMBNAIL_CAPTURE:8,SCHEDULED_RESTRICTED:"SCHEDULED_RESTRICTED"});var R=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).pattern=t.pattern,e.replacement=t.replacement,e.replacmenServerNodeId=t.replacmenServerNodeId,e.checkAliveTimeoutMs=t.checkAliveTimeoutMs,e}return u(o)}(O),k=u((function t(e){i(this,t),this.scheme=e.scheme,this.licenseURL=e.licenseURL,this.certificate=e.certificate}));d(k,"Scheme",{"drm.PLAYREADY_CENC":"com.microsoft.playready","drm.WIDEVINE_CENC":"com.widevine.alpha","fairplay.FAIRPLAY":"com.apple.fairplay",WIDEVINE_CENC:"com.widevine.alpha",PLAYREADY_CENC:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"});var P=function(){function t(e){var r=this;i(this,t),d(this,"drm",[]),this.format=e.format,this.deliveryProfileId=e.deliveryProfileId,this.url=e.url,this.protocols=e.protocols,this.flavorIds=e.flavorIds,e.drm&&e.drm.map((function(t){return r.drm.push(new k(t))}))}return u(t,[{key:"hasDrmData",value:function(){return this.drm&&this.drm.length>0}},{key:"hasFlavorIds",value:function(){return!!this.flavorIds&&this.flavorIds.length>0}},{key:"getProtocol",value:function(t){var e="";if(this.protocols&&this.protocols.length>0)this.protocols.split(",").forEach((function(r){r===t&&(e=r)}));else if("http"===t)return t;return e}}]),t}(),N=u((function t(e){i(this,t),this.entryId=e.entryId,this.clickThroughUrl=e.url,this.sources=e.sources?e.sources.map((function(t){return new P(t)})):[]})),S=function(){function t(e){i(this,t),this.id=e.id,this.flavorParamsId=e.flavorParamsId,this.fileExt=e.fileExt,this.bitrate=e.bitrate,this.width=e.width,this.height=e.height,this.id=e.id,this.frameRate=e.frameRate,this.isOriginal=e.isOriginal,this.isWeb=e.isWeb,this.containerFormat=e.containerFormat,this.videoCodecId=e.videoCodecId,this.status=e.status,this.language=e.language,this.label=e.label,this.tags=t.parseTags(e.tags)}return u(t,null,[{key:"parseTags",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(",")}}]),t}();d(S,"Status",{ERROR:-1,QUEUED:0,CONVERTING:1,READY:2,DELETED:3,NOT_APPLICABLE:4,TEMP:5,WAIT_FOR_CONVERT:6,IMPORTING:7,VALIDATING:8,EXPORTING:9});var L=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).hasError||(e.entries=[],t.map((function(t){return e.entries.push(new T(t))}))),e}return u(o)}(C),D=u((function t(e){i(this,t),this.id=e.id,this.metadataProfileId=e.metadataProfileId,this.metadataProfileVersion=e.metadataProfileVersion,this.metadataProfileId=e.metadataProfileId,this.metadataObjectType=e.metadataObjectType,this.objectId=e.objectId,this.version=e.version,this.created=new Date(0),this.created.setUTCSeconds(e.createdAt),this.updated=new Date(0),this.updated.setUTCSeconds(e.updatedAt),this.status=e.status,this.xml=e.xml}));d(D,"ObjectType",{AD_CUE_POINT:"adCuePointMetadata.AdCuePoint",ANNOTATION:"annotationMetadata.Annotation",CODE_CUE_POINT:"codeCuePointMetadata.CodeCuePoint",THUMB_CUE_POINT:"thumbCuePointMetadata.thumbCuePoint",ENTRY:1,CATEGORY:2,USER:3,PARTNER:4,DYNAMIC_OBJECT:5}),d(D,"Status",{VALID:1,INVALID:2,DELETED:3});var M=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).hasError||(e.totalCount=t.totalCount,e.totalCount>0&&(e.metas=[],t.objects.map((function(t){return e.metas.push(new D(t))})))),e}return u(o)}(C),j=u((function t(e){i(this,t),this.message=e.message,this.code=e.code})),B=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;if(i(this,o),d(l(e=n.call(this,t)),"sources",[]),d(l(e),"actions",[]),d(l(e),"messages",[]),d(l(e),"flavorAssets",[]),d(l(e),"bumperData",[]),!e.hasError){var r=t.messages;r&&r.map((function(t){return e.messages.push(new j(t))}));var a=t.actions;a&&a.map((function(t){t.type===O.Type.REQUEST_HOST_REGEX?e.actions.push(new R(t)):e.actions.push(new O(t))}));var s=t.sources;s&&s.map((function(t){return e.sources.push(new P(t))}));var u=t.flavorAssets;u&&u.map((function(t){return e.flavorAssets.push(new S(t))}));var c=t.bumperData;c&&c.map((function(t){return e.bumperData.push(new N(t))})),t.activeLiveStreamTime&&(e.activeLiveStreamTime={startTime:t.activeLiveStreamTime.startTime,endTime:t.activeLiveStreamTime.endTime})}return e}return u(o,[{key:"hasBlockAction",value:function(){return void 0!==this.getBlockAction()}},{key:"getBlockAction",value:function(){return this.actions.find((function(t){return t.type===O.Type.BLOCK}))}},{key:"hasScheduledRestriction",value:function(){return this.messages.some((function(t){return t.code===O.Type.SCHEDULED_RESTRICTED}))}},{key:"getErrorMessages",value:function(){return this.messages}},{key:"getRequestHostRegexAction",value:function(){var t=this.actions.find((function(t){return t.type===O.Type.REQUEST_HOST_REGEX}));if(t instanceof R)return t}}]),o}(C),U=u((function t(e){i(this,t),this.id=e.id,this.name=e.name,this.description=e.description,this.poster=e.thumbnailUrl})),F=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).hasError||(e.name=t.name,e.description=t.description,e.objTypeAsString=t.objTypeAsString,e.width=t.width,e.height=t.height,e.htmlParams=t.htmlParams,e.swfUrl=t.swfUrl,e.confFilePath=t.confFilePath,e.confFile=t.confFile,e.confFileFeatures=t.confFileFeatures,e.config=t.config,e.confVars=t.confVars,e.useCdn=t.useCdn,e.tags=t.tags,e.swfUrlVersion=t.swfUrlVersion,e.created=new Date(0),e.created.setUTCSeconds(t.createdAt),e.updated=new Date(0),e.updated.setUTCSeconds(t.updatedAt),e.html5Url=t.description,e.version=t.description,e.partnerTags=t.description,e.objType=t.description,e.creationMode=t.description),e}return u(o)}(C);d(F,"Type",{PLAYER:1,CONTRIBUTION_WIZARD:2,SIMPLE_EDITOR:3,ADVANCED_EDITOR:4,PLAYLIST:5,APP_STUDIO:6,KRECORD:7,PLAYER_V3:8,KMC_ACCOUNT:9,KMC_ANALYTICS:10,KMC_CONTENT:11,KMC_DASHBOARD:12,KMC_LOGIN:13,PLAYER_SL:14,CLIENTSIDE_ENCODER:15,KMC_GENERAL:16,KMC_ROLES_AND_PERMISSIONS:17,CLIPPER:18,KSR:19,KUPLOAD:20,WEBCASTING:21}),d(F,"CreationMode",{WIZARD:2,ADVANCED:3});var V=u((function t(e){i(this,t),this.playlistLastEntryId=e.playlistLastEntryId,this.entryId=e.entryId,this.id=e.id,this.userId=e.userId,this.partnerId=e.partnerId,this.status=e.status,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt})),G=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).hasError||(e.totalCount=t.totalCount,e.entries=[],e.totalCount>0&&t.objects.map((function(t){return e.entries.push(new V(t))}))),e}return u(o)}(C),q=function(){function t(){i(this,t)}return u(t,null,[{key:"build",value:function(t){var e=x.get(),r=e.serviceUrl.substr(0,e.serviceUrl.lastIndexOf("/")),n=t.partnerId,i=t.entryId,o=t.ks,a=t.uiConfId,s=t.format,u=t.protocol,l=t.extension,c=t.flavorIds;if(!r||isNaN(Number.parseInt(n))||!i||!s||!u)return"";var f=r;return r.endsWith("/")||(f+="/"),f+="p/"+n+"/sp/"+n+"00/playManifest/entryId/"+i+"/protocol/"+u+"/format/"+s,c?f+="/flavorIds/"+c:a&&(f+="/uiConfId/"+a),""!==o&&(f+="/ks/"+o),""!==l&&(f+="/a."+l),a&&""!==c&&(f+="?uiConfId="+a),f}}]),t}(),H=function(){function t(){i(this,t)}return u(t,null,[{key:"xmlToJson",value:function(t){var e={};if(1===t.nodeType){if(t.attributes.length>0){e["@attributes"]={};for(var r=0;r<t.attributes.length;r++){var n=t.attributes.item(r);e["@attributes"][n.nodeName]=n.nodeValue}}}else 3===t.nodeType&&(e=t.nodeValue);if(t.hasChildNodes())for(var i=0;i<t.childNodes.length;i++){var o=t.childNodes.item(i),a=o.nodeName;if(void 0===e[a])e[a]=this.xmlToJson(o);else{if(void 0===e[a].push){var s=e[a];e[a]=[],e[a].push(s)}e[a].push(this.xmlToJson(o))}}return e}}]),t}(),K={DASH:{name:"dash",mimeType:"application/dash+xml",pathExt:"mpd"},HLS:{name:"hls",mimeType:"application/x-mpegURL",pathExt:"m3u8"},WVM:{name:"wvm",mimeType:"video/wvm",pathExt:"wvm"},MP4:{name:"mp4",mimeType:"video/mp4",pathExt:"mp4"},MP3:{name:"mp3",mimeType:"audio/mpeg",pathExt:"mp3"}},W=new Map([["mpegdash",K.DASH],["applehttp",K.HLS],["url",K.MP4]]);function Y(t){var e=W.get(t);return!!e&&e.name===K.MP4.name}var $=function(){function t(){i(this,t),this.progressive=[],this.dash=[],this.hls=[],this.image=[],this.document=[]}return u(t,[{key:"map",value:function(t,e){if(e)switch(e.name){case K.MP4.name:this.progressive.push(t);break;case K.DASH.name:this.dash.push(t);break;case K.HLS.name:this.hls.push(t)}}},{key:"toJSON",value:function(){var t={progressive:[],dash:[],hls:[],image:[],document:[]};return this.progressive.forEach((function(e){return t.progressive.push(e.toJSON())})),this.hls.forEach((function(e){return t.hls.push(e.toJSON())})),this.dash.forEach((function(e){return t.dash.push(e.toJSON())})),t.image=this.image,t.document=this.document,t}}]),t}(),X=function(){function t(){i(this,t),this.metadata=new Map,this.sources=new $,this.type=t.Type.UNKNOWN}return u(t,[{key:"toJSON",value:function(){return{id:this.id,name:this.name,sources:this.sources.toJSON(),duration:this.duration,dvrStatus:this.dvrStatus,status:this.status,metadata:this.metadata,type:this.type,poster:this.poster,assetReferenceType:this.assetReferenceType,downloadUrl:this.downloadUrl,rawThumbnailUrl:this.rawThumbnailUrl,rootEntryId:this.rootEntryId,capabilities:this.capabilities}}}]),t}();d(X,"Type",{VOD:"Vod",LIVE:"Live",IMAGE:"Image",AUDIO:"Audio",UNKNOWN:"Unknown",DOCUMENT:"Document"}),d(X,"DvrStatus",{ON:1,OFF:0});var J=function(){function t(e,r,n){i(this,t),this.licenseUrl=e,this.scheme=r,n&&(this.certificate=n)}return u(t,[{key:"toJSON",value:function(){var t={licenseUrl:this.licenseUrl,scheme:this.scheme};return this.certificate&&(t.certificate=this.certificate),t}}]),t}(),Z=function(){function t(){i(this,t)}return u(t,[{key:"toJSON",value:function(){var t={id:this.id,url:this.url,mimetype:this.mimetype};return this.bandwidth&&(t.bandwidth=this.bandwidth),this.width&&(t.width=this.width),this.height&&(t.height=this.height),this.label&&(t.label=this.label),this.drmData&&this.drmData.length>0&&(t.drmData=[],this.drmData.forEach((function(e){Array.isArray(t.drmData)&&t.drmData.push(e.toJSON())}))),t}}]),t}(),z=u((function t(){i(this,t),this.items=[]})),Q=u((function t(){i(this,t),this.items=[]})),tt=u((function t(e){i(this,t),this.url=e.url,this.clickThroughUrl=e.clickThroughUrl})),et={SRT:"1",DFXP:"2",WEBVTT:"3",CAP:"4"},rt={3:"vtt",1:"srt"},nt=function(){function t(){i(this,t)}return u(t,null,[{key:"createConfig",value:function(t,e){return t.map((function(t){var r=t.url,n=rt[t.format];return[et.DFXP,et.CAP].includes(t.format)&&(r=t.webVttUrl,n=rt[et.WEBVTT]),r=st(r,e),{default:!!t.isDefault,type:n,language:t.languageCode,label:t.label,url:r}}))}}]),t}(),it=function(){function t(e){i(this,t),this.id=e.id,this.url=t.extractBaseThumbnailUrl(e.dataUrl),this.mimetype=""}return u(t,null,[{key:"extractBaseThumbnailUrl",value:function(t){return t.match(".+entry_id/[a-zA-Z0-9_]+/")[0].slice(0,-1)}}]),t}(),ot=u((function t(e){i(this,t),this.id=e.id,this.url=e.downloadUrl,this.thumbnailUrl=e.poster,this.mimetype=""})),at=function(){function t(){i(this,t)}return u(t,null,[{key:"getMediaEntry",value:function(e,r,n,i){var o=new X,a=i.entry,s=i.playBackContextResult,u=i.metadataListResult,l=s.sources;return o.activeLiveStreamTime=s.activeLiveStreamTime,o.sources=t._getParsedSources(l,e,r,n,a,s),t._fillBaseData(o,a,u,s),o.type!==X.Type.LIVE&&x.get().useApiCaptions&&s.data.playbackCaptions&&(o.sources.captions=nt.createConfig(s.data.playbackCaptions,e)),o}},{key:"addKsToUrl",value:function(t,e){var r;return e?(r=-1!==t.split("?")[0].replace(/^.*[\\/]/,"").indexOf(".")?-1===t.indexOf("?")?"?ks=":"&ks=":"/ks/",t+r+e):t}},{key:"getPlaylist",value:function(e){var r=new z,n=e.playlistData,i=e.playlistItems.entries,o=e.playlistUserEntries.entries;return r.id=n.id,r.name=n.name,r.description=n.description,r.poster=n.poster,r.playlistLastEntryId=o.map((function(t){return t.playlistLastEntryId}))[0],i.forEach((function(e){var n=new X;t._fillBaseData(n,e),r.items.push(n)})),r}},{key:"getEntryList",value:function(e){var r=new Q;return e.playlistItems.entries.forEach((function(e){var n=new X;t._fillBaseData(n,e),r.items.push(n)})),r}},{key:"getBumper",value:function(e,r,n){var i=e.playBackContextResult,o=i.bumperData[0];if(o){var a=(o&&o.sources).find((function(t){return Y(t.format)}));if(a){var s=t._parseProgressiveSources(a,i,r,n,0,o.entryId);if(s[0])return new tt({url:s[0].url,clickThroughUrl:o.clickThroughUrl})}}}},{key:"_fillBaseData",value:function(e,r,n,i){if(e.poster=r.poster,e.rawThumbnailUrl=r.rawThumbnailUrl,e.id=r.id,e.duration=r.duration,e.downloadUrl=r.downloadUrl||"",e.metadata=t._parseMetadata(n),e.metadata.description=r.description||"",e.metadata.entryId=r.id||"",e.metadata.name=r.name||"",r.createdAt&&(e.metadata.createdAt=r.createdAt),r.updatedAt&&(e.metadata.updatedAt=r.updatedAt),r.creatorId&&(e.metadata.creatorId=r.creatorId),r.userId&&(e.metadata.userId=r.userId),r.endDate&&(e.metadata.endDate=r.endDate),r.views&&(e.metadata.views=r.views),r.plays&&(e.metadata.plays=r.plays),e.metadata.tags=r.tags||"",e.metadata.adminTags=r.adminTags||"",e.status=r.status,e.rootEntryId=r.rootEntryId,e.capabilities=r.capabilities?r.capabilities.split(","):[],e.type=t._getEntryType(r.entryType,r.type),e.type===X.Type.LIVE&&(e.dvrStatus=r.dvrStatus),i&&i.flavorAssets[0]&&i.flavorAssets[0].width&&i.flavorAssets[0].height){var o=i.flavorAssets[0],a=o.height,s=o.width;e.metadata.aspectRatio=+Number(s/a).toFixed(2)}return i&&Array.isArray(i.flavorAssets)&&(e.metadata.audioFlavors=i.flavorAssets.filter((function(t){return t.bitrate&&!t.width&&!t.height}))),e}},{key:"_getEntryType",value:function(t,e){var r=X.Type.UNKNOWN;switch(t){case T.MediaType.IMAGE.value:r=X.Type.IMAGE;break;case T.MediaType.AUDIO.value:r=X.Type.AUDIO;break;default:switch(e){case T.EntryType.MEDIA_CLIP.value:r=X.Type.VOD;break;case T.EntryType.LIVE_STREAM.value:case T.EntryType.LIVE_CHANNEL.value:r=X.Type.LIVE;break;case T.EntryType.DOCUMENT.value:r=X.Type.DOCUMENT;break;default:r=X.Type.UNKNOWN}}return r}},{key:"_getParsedSources",value:function(e,r,n,i,o,a){var s,u,l=new $;return o.type===T.EntryType.EXTERNAL_MEDIA.value?((u=new Z).mimetype="video/youtube",u.url=o.referenceId,u.id=o.id+"_youtube",l.progressive.push(u)):o.entryType===T.MediaType.IMAGE.value?l.image.push(new it(o)):o.type===T.EntryType.DOCUMENT.value?l.document.push(new ot(o)):e&&e.length>0&&(e.filter((function(t){return!Y(t.format)})).forEach((function(e){var s=t._parseAdaptiveSource(e,a,r,n,i,o.id);if(s){var u=W.get(e.format);l.map(s,u)}})),s=e.find((function(e){return Y(e.format)&&""!==e.getProtocol(t._getBaseProtocol())})),l.progressive=t._parseProgressiveSources(s,a,r,n,i,o.id)),l}},{key:"_parseAdaptiveSource",value:function(e,r,n,i,o,a){var s=new Z;if(e){var u="",l=W.get(e.format),c=e.getProtocol(t._getBaseProtocol()),f=e.deliveryProfileId,p=e.format,h="";if(l&&(h=l.pathExt,s.mimetype=l.mimeType),e.hasFlavorIds()?(!h&&r.flavorAssets&&r.flavorAssets.length>0&&(h=r.flavorAssets[0].fileExt),u=q.build({entryId:a,flavorIds:e.flavorIds,format:p,ks:n,partnerId:i,uiConfId:o,extension:h,protocol:c})):u=t.addKsToUrl(e.url,n),!u){var d="failed to create play url from source, discarding source: (".concat(a,"_").concat(f,"), ").concat(p);return t._logger.warn(d),null}if(s.url=u,s.id=a+"_"+f+","+p,e.hasDrmData()){var y=[];e.drm.forEach((function(t){y.push(new J(t.licenseURL,k.Scheme[t.scheme],t.certificate))})),s.drmData=y}}return s}},{key:"_parseProgressiveSources",value:function(e,r,n,i,o,a){var s=[],u=[];if(e){var l=e.getProtocol(t._getBaseProtocol()),c=e.format,f=e.deliveryProfileId,p=f+","+c;r.flavorAssets.map((function(e){var r=new Z;r.id=e.id+p,r.mimetype="mp3"===e.fileExt?"audio/mp3":"video/mp4",r.height=e.height,r.width=e.width,r.bandwidth=1024*e.bitrate,r.label=e.label||e.language;var h=q.build({entryId:a,flavorIds:e.id,format:c,ks:n,partnerId:i,uiConfId:o,extension:e.fileExt,protocol:l});if(""===h)return t._logger.warn("failed to create play url from source, discarding source: (".concat(a,"_").concat(f,"), ").concat(c,".")),null;r.url=h,e.height&&e.width?s.push(r):u.push(r)}))}return u.length&&!s.length?u:s}},{key:"_parseMetadata",value:function(t){var e={};return t&&t.metas&&t.metas.length>0&&t.metas.forEach((function(t){if(t.xml){var r=new DOMParser;t.xml=t.xml.replace(/\r?\n|\r/g,""),t.xml=t.xml.replace(/>\s*/g,">"),t.xml=t.xml.replace(/>\s*/g,">");var n=r.parseFromString(t.xml,"text/xml"),i=H.xmlToJson(n);Object.keys(i.metadata).forEach((function(t){e[t]=i.metadata[t]["#text"]}))}})),e}},{key:"_getBaseProtocol",value:function(){var t=x.get(),e=/^https?:/.exec(t.cdnUrl),r=e?e[0]:document.location.protocol;return"string"==typeof r?r.slice(0,-1):"https"}},{key:"hasBlockAction",value:function(t){return t.playBackContextResult.hasBlockAction()}},{key:"getBlockAction",value:function(t){return t.playBackContextResult.getBlockAction()}},{key:"hasScheduledRestriction",value:function(t){return t.playBackContextResult.hasScheduledRestriction()}},{key:"getErrorMessages",value:function(t){return t.playBackContextResult.getErrorMessages()}}]),t}();d(at,"_logger",A("OVPProviderParser"));var st=at.addKsToUrl,ut=at,lt=u((function t(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};i(this,t),this.severity=e,this.category=r,this.code=n,this.data=o,t._logger.error("Category:".concat(r," | Code:").concat(n," |"),o)}));d(lt,"Severity",{RECOVERABLE:1,CRITICAL:2}),d(lt,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),d(lt,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,SCHEDULED_RESTRICTED:2003,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),d(lt,"_logger",A("Error"));var ct=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;i(this,t),d(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),d(this,"_attemptCounter",1),this.headers=e}return u(t,[{key:"getUrl",value:function(t){return t+"/service/"+this.service+(this.action?"/action/"+this.action:"")}},{key:"doHttpRequest",value:function(){var t=this,e=new Promise((function(e,r){t._requestPromise={resolve:e,reject:r}}));return this.url||this._requestPromise.reject(new lt(lt.Severity.CRITICAL,lt.Category.NETWORK,lt.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),e}},{key:"_createXHR",value:function(){var t=this,e=new XMLHttpRequest;e.onreadystatechange=function(){if(4===e.readyState&&200===e.status)try{var r=JSON.parse(e.responseText);return t.responseHeaders=t._getResponseHeaders(e),t._requestPromise.resolve(r)}catch(r){t._requestPromise.reject(t._createError(e,lt.Code.BAD_SERVER_RESPONSE,{text:e.responseText}))}},e.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(e.timeout=this.retryConfig.timeout);var r=performance.now();e.ontimeout=function(){t._handleError(e,lt.Code.TIMEOUT,{timeout:(performance.now()-r)/1e3,statusText:e.statusText})},e.onerror=e.onabort=function(){t._handleError(e,lt.Code.HTTP_ERROR,{text:e.responseText,statusText:e.statusText})},this.headers.forEach((function(t,r){e.setRequestHeader(r,t)})),e.send(this.params)}},{key:"_getResponseHeaders",value:function(t){return t.getAllResponseHeaders().split("\n").filter((function(t){return 0===t.toLowerCase().indexOf("x-")}))}},{key:"_handleError",value:function(t,e,r){var n=this._createError(t,e,r);if(t.onreadystatechange=function(){},t.onerror=function(){},t.ontimeout=function(){},t.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(n);this._attemptCounter++,this._createXHR()}},{key:"_createError",value:function(t,e,r){return Object.assign(r,{url:this.url,headers:this._getResponseHeaders(t),attempt:this._attemptCounter}),new lt(lt.Severity.CRITICAL,lt.Category.NETWORK,e,r)}}]),t}(),ft=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){var t;i(this,o);for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return d(l(t=n.call.apply(n,[this].concat(r))),"requests",[]),t}return u(o,[{key:"add",value:function(t){this.requests.push(t);var e={},r={service:t.service,action:t.action};return Object.assign(e,d({},this.requests.length,Object.assign(r,t.params))),Object.assign(e,this.params),this.params=e,this}},{key:"execute",value:function(t){var e=this;return new Promise((function(r,n){try{e.params=JSON.stringify(e.params)}catch(t){o._logger.error("".concat(t.message)),n(new lt(lt.Severity.CRITICAL,lt.Category.PROVIDER,lt.Code.FAILED_PARSING_REQUEST,{error:t,params:e.params}))}e.doHttpRequest().then((function(i){var o=new pt(i,t);o.success?r({headers:e.responseHeaders,response:o}):n(new lt(lt.Severity.CRITICAL,lt.Category.NETWORK,lt.Code.MULTIREQUEST_API_ERROR,{url:e.url,headers:e.responseHeaders,results:o.results}))}),(function(t){n(t)}))}))}}]),o}(ct);d(ft,"_logger",A("MultiRequestBuilder"));var pt=u((function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];i(this,t),d(this,"results",[]);var n=e.result?e.result:e,o=(Array.isArray(n)?n:[n]).map((function(t){return new C(t)})),a=o.filter((function(t){return t.hasError}));a.forEach((function(e){t._logger.error("Service returned an error with error code: ".concat(e.error.code," and message: ").concat(e.error.message,"."))})),this.results=o,r&&a.length||a.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(t){return!t.hasError})),this.success=!0)}));d(pt,"_logger",A("MultiRequestResult"));var ht=function(){function t(){i(this,t)}return u(t,null,[{key:"getMultiRequest",value:function(t,e,r){var n=x.get(),i=n.serviceParams;Object.assign(i,{ks:e,clientTag:"html5:v"+t}),r&&Object.assign(i,{partnerId:r});var o=new Map;o.set("Content-Type","application/json");var a=new ft(o);return a.method="POST",a.service="multirequest",a.url=a.getUrl(n.serviceUrl),a.params=i,a}}]),t}(),dt=u((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.type=e.type||t.Type.INCLUDE_FIELDS,this.fields=e.fields||"id,referenceId,name,description,thumbnailUrl,dataUrl,duration,msDuration,flavorParamsIds,mediaType,type,tags,dvrStatus,externalSourceType,status,createdAt,updatedAt,endDate,plays,views,downloadUrl,creatorId,userId,rootEntryId,capabilities,adminTags"}));d(dt,"Type",{INCLUDE_FIELDS:1,EXCLUDE_FIELDS:2});var yt="baseEntry",gt=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){return i(this,o),n.apply(this,arguments)}return u(o,null,[{key:"getPlaybackContext",value:function(t,e,r,n){var i=new Map;i.set("Content-Type","application/json");var o=new ct(i);o.service=yt,o.action="getPlaybackContext",o.method="POST",o.url=o.getUrl(t),o.tag="baseEntry-getPlaybackContext";var a={objectType:"KalturaContextDataParams",flavorTags:"all"};return n&&(a.referrer=n),o.params={entryId:r,ks:e,contextDataParams:a},o}},{key:"list",value:function(t,e,r,n,i){var a=new Map;a.set("Content-Type","application/json");var s=new ct(a);return s.service=yt,s.action="list",s.method="POST",s.url=s.getUrl(t),s.tag="list",s.params=o.getEntryListReqParams(r,e,n,i),s}},{key:"getEntryListReqParams",value:function(t,e,r,n){var i={};return t?i=r?{redirectFromEntryId:t}:{idEqual:t}:n&&(i={objectType:"KalturaBaseEntryFilter",referenceIdEqual:n}),{ks:e,filter:i,responseProfile:new dt}}}]),o}(ht),vt=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){return i(this,o),n.apply(this,arguments)}return u(o,null,[{key:"list",value:function(t,e,r){var n=new Map;n.set("Content-Type","application/json");var i=new ct(n);i.service="metadata_metadata",i.action="list",i.method="POST",i.url=i.getUrl(t),i.tag="metadata_metadata-list";var o={objectType:"KalturaMetadataFilter",objectIdEqual:r,metadataObjectTypeEqual:"1"};return i.params={filter:o,ks:e},i}}]),o}(ht),mt=function(){function t(e){i(this,t),d(this,"_response",{}),this.requests=this.buildRequests(e),this._entryId=e.entryId,this._referenceId=e.referenceId}return u(t,[{key:"requests",get:function(){return this._requests},set:function(t){this._requests=t}},{key:"response",get:function(){return this._response},set:function(t){var e=new I(t[0].data);this._response.entry=e.entries[0],this._response.playBackContextResult=new B(t[1].data),this._response.metadataListResult=new M(t[2].data)}},{key:"buildRequests",value:function(t){var e=x.get(),r=[];r.push(gt.list(e.serviceUrl,t.ks,t.entryId,t.redirectFromEntryId,t.referenceId));var n="{1:result:ks}"===t.ks?"{2:result:objects:0:id}":"{1:result:objects:0:id}";return r.push(gt.getPlaybackContext(e.serviceUrl,t.ks,n,t.referrer)),r.push(vt.list(e.serviceUrl,t.ks,n)),r}},{key:"isValid",value:function(){return!(!this._entryId&&!this._referenceId)}}],[{key:"id",get:function(){return"media"}}]),t}(),bt=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){return i(this,o),n.apply(this,arguments)}return u(o,null,[{key:"anonymousSession",value:function(t,e){var r=new Map;r.set("Content-Type","application/json");var n=new ct(r);return n.service="session",n.action="startWidgetSession",n.method="POST",n.url=n.getUrl(t),n.tag="session-startWidget",n.params={widgetId:e},n}}]),o}(ht),At=function(){function t(e){i(this,t),d(this,"_response",{}),this.requests=this.buildRequests(e),this._widgetId=e.widgetId}return u(t,[{key:"requests",get:function(){return this._requests},set:function(t){this._requests=t}},{key:"response",get:function(){return this._response.ks},set:function(t){this._response.ks=t[0].data.ks}},{key:"buildRequests",value:function(t){var e=x.get(),r=[];return r.push(bt.anonymousSession(e.serviceUrl,t.widgetId)),r}},{key:"isValid",value:function(){return!!this._widgetId}}],[{key:"id",get:function(){return"session"}}]),t}(),_t=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t,e){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=arguments.length>3?arguments[3]:void 0;return i(this,o),(r=n.call(this,s))._multiRequest=ht.getMultiRequest(t,a,e),r}return u(o)}(function(){function t(e){i(this,t),d(this,"_loadersResponseMap",new Map),d(this,"_loaders",new Map),this._networkRetryConfig=e}return u(t,[{key:"add",value:function(t,e,r){var n=this,i=new t(e);if(i.isValid()){this._loaders.set(t.id,i);var o=this._multiRequest.requests.length,a=i.requests;this._multiRequest.retryConfig=this._networkRetryConfig,a.forEach((function(t){t.params=t.params||{},t.params.ks=t.params.ks||r,n._multiRequest.add(t)}));var s=Array.from(new Array(a.length),(function(t,e){return e+o}));this._loadersResponseMap.set(t.id,s)}}},{key:"fetchData",value:function(t){var e=this;return new Promise((function(r,n){e._multiRequest.execute(t).then((function(t){e._multiResponse=t.response,e.prepareData(t.response).success?r(e._loaders):n(new lt(lt.Severity.CRITICAL,lt.Category.NETWORK,lt.Code.API_RESPONSE_MISMATCH,{headers:t.headers}))}),(function(t){n(t)}))}))}},{key:"prepareData",value:function(t){var e=this;return this._loaders.forEach((function(r,n){var i=e._loadersResponseMap.get(n);try{i&&i.length>0&&(r.response=t.results.slice(i[0],i[i.length-1]+1))}catch(t){return{success:!1,error:t}}})),{success:!0,data:this._loaders}}}]),t}()),Et="playlist",xt=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){return i(this,o),n.apply(this,arguments)}return u(o,null,[{key:"execute",value:function(t,e,r,n){var i=new Map;i.set("Content-Type","application/json");var o=new ct(i);o.service=Et,o.action="execute",o.method="POST",o.url=o.getUrl(t),o.tag="".concat(Et,"-execute");var a=new dt;return n&&(a.fields=a.fields+n),o.params={ks:e,id:r,responseProfile:a},o}},{key:"get",value:function(t,e,r){var n=new Map;n.set("Content-Type","application/json");var i=new ct(n);return i.service=Et,i.action="get",i.method="POST",i.url=i.getUrl(t),i.tag="".concat(Et,"-get"),i.params={ks:e,id:r,responseProfile:{fields:"id,name,description,thumbnailUrl",type:1}},i}},{key:"getLastEntryId",value:function(t,e,r){var n=new Map;n.set("Content-Type","application/json");var i=new ct(n);return i.service="userEntry",i.action="list",i.method="POST",i.url=i.getUrl(t),i.tag="userEntry-list",i.params={ks:e,filter:{objectType:"KalturaViewHistoryUserEntry",entryIdEqual:r,userIdEqualCurrent:1},responseProfile:{fields:"playlistLastEntryId",type:1}},i}}]),o}(ht),Ct=function(){function t(e){i(this,t),d(this,"_response",{}),this.requests=this.buildRequests(e),this._playlistId=e.playlistId}return u(t,[{key:"requests",get:function(){return this._requests},set:function(t){this._requests=t}},{key:"response",get:function(){return this._response},set:function(t){this._response.playlistData=new U(t[0].data),this._response.playlistItems=new L(t[1].data),this._response.playlistUserEntries=new G(t[2].data)}},{key:"buildRequests",value:function(t){var e=x.get(),r=[];return r.push(xt.get(e.serviceUrl,t.ks,t.playlistId)),r.push(xt.execute(e.serviceUrl,t.ks,t.playlistId,t.cacheToken)),r.push(xt.getLastEntryId(e.serviceUrl,t.ks,t.playlistId)),r}},{key:"isValid",value:function(){return!!this._playlistId}}],[{key:"id",get:function(){return"playlist"}}]),t}(),wt=function(){function t(e,r){i(this,t),d(this,"_networkRetryConfig",{async:!0,timeout:0,maxAttempts:4}),function(t){t&&"function"==typeof t.getLogger&&(v.get=t.getLogger),t&&t.LogLevel&&(m=t.LogLevel)}(e.logger),this._partnerId=e.partnerId,this._widgetId=e.widgetId,this._uiConfId=e.uiConfId,this._isAnonymous=!e.ks,this._ks=e.ks||"",this._playerVersion=r,this._referrer=e.referrer}return u(t,[{key:"partnerId",get:function(){return this._partnerId}},{key:"widgetId",get:function(){return this._widgetId||this.defaultWidgetId}},{key:"defaultWidgetId",get:function(){return"_"+this._partnerId}},{key:"uiConfId",get:function(){return this._uiConfId}},{key:"ks",get:function(){return this._ks},set:function(t){this._ks=t}},{key:"playerVersion",get:function(){return this._playerVersion}},{key:"isAnonymous",get:function(){return this._isAnonymous}},{key:"getMediaConfig",value:function(t){return Promise.reject(new lt(lt.Severity.CRITICAL,lt.Category.PROVIDER,lt.Code.METHOD_NOT_IMPLEMENTED,{message:"getMediaConfig method must be implement by the derived class"}))}},{key:"getPlaylistConfig",value:function(t){return Promise.reject(new lt(lt.Severity.CRITICAL,lt.Category.PROVIDER,lt.Code.METHOD_NOT_IMPLEMENTED,{message:"The provider does not support loading playlist by id"}))}},{key:"getEntryListConfig",value:function(t){return Promise.reject(new lt(lt.Severity.CRITICAL,lt.Category.PROVIDER,lt.Code.METHOD_NOT_IMPLEMENTED,{message:"The provider does not support loading entry list"}))}},{key:"_verifyHasSources",value:function(t){if(0===t.hls.concat(t.dash,t.progressive,t.image,t.document).length)throw new lt(lt.Severity.CRITICAL,lt.Category.SERVICE,lt.Code.MISSING_PLAY_SOURCE,{action:"",messages:"No play source for entry id: ".concat(t.id)})}},{key:"LogLevel",get:function(){return m}},{key:"getLogLevel",value:function(t){return function(t){return b(t).getLevel()}(t)}},{key:"setLogLevel",value:function(t,e){!function(t,e){b(e).setLevel(t)}(t,e)}}]),t}(),Tt=function(){function t(e){i(this,t),d(this,"_response",{playlistItems:{entries:[]}}),this.requests=this.buildRequests(e),this._entries=e.entries}return u(t,[{key:"requests",get:function(){return this._requests},set:function(t){this._requests=t}},{key:"response",get:function(){return this._response},set:function(t){var e,r=this;t.forEach((function(t){e=new I(t.data),r._response.playlistItems.entries.push(e.entries[0])}))}},{key:"buildRequests",value:function(t){var e=x.get(),r=[];return t.entries.forEach((function(n){r.push(gt.list(e.serviceUrl,t.ks,n.entryId||n,t.redirectFromEntryId,n.referenceId))})),r}},{key:"isValid",value:function(){return!(!this._entries||!this._entries.length)}}],[{key:"id",get:function(){return"entry_list"}}]),t}();function It(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 Ot(t){return function(t){if(Array.isArray(t))return It(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return It(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)?It(t,e):void 0}}(t)||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.")}()}var Rt=function(){function t(){i(this,t)}return u(t,null,[{key:"_applyRegexAction",value:function(t,e){if(t){var r=new RegExp(t.pattern,"i");if(e.match(r))return e.replace(r,t.replacement+"/")}return e}},{key:"_pingECDNAndReplaceHostUrls",value:function(e,r,n){return new Promise((function(i){var o=n+"/api_v3/service/system/action/ping/format/1",a=new XMLHttpRequest;a.open("GET",o),a.timeout=r.checkAliveTimeoutMs,a.onreadystatechange=function(){4===a.readyState&&(200===a.status&&t._replaceHostUrls(e,r),i(e))},a.ontimeout=function(){t._logger.warn("Got timeout while pinging the ECDN url. the ping url: ".concat(o)),i(e)},a.send()}))}},{key:"handleRegexAction",value:function(e,r){return new Promise((function(n){var i=x.get().cdnUrl,o=t._extractRegexActionFromData(r),a=t._getRegExp(o);i&&o&&a&&i.match(a)?o.checkAliveTimeoutMs>0?(t._logger.debug("executing ping request..."),t._pingECDNAndReplaceHostUrls(e,o,i.replace(a,o.replacement)).then(n)):(t._replaceHostUrls(e,o),n(e)):(t._logger.debug("exiting handleRegexAction - not applying regex action."),n(e))}))}},{key:"_replaceHostUrls",value:function(e,r){t._logger.debug("Starting to modify urls...");var n=e.sources,i=n.hls,o=n.dash,a=n.progressive,s=n.image;[].concat(Ot(i),Ot(o),Ot(a),Ot(s)).forEach((function(e){return e.url=t._applyRegexAction(r,e.url)})),x.get().replaceHostOnlyManifestUrls||(t._logger.debug("replaceHostOnlyManifestUrls flag is off - modifying captions and poster URLs"),n.captions&&n.captions.forEach((function(e){return e.url=t._applyRegexAction(r,e.url)})),"string"==typeof n.poster&&(n.poster=t._applyRegexAction(r,n.poster))),t._logger.debug("Finished modifying urls")}},{key:"_extractRegexActionFromData",value:function(t){var e;return null===(e=t.get(mt.id))||void 0===e||null===(e=e.response)||void 0===e?void 0:e.playBackContextResult.getRequestHostRegexAction()}},{key:"_getRegExp",value:function(t){if(t&&t.pattern&&t.replacement)return new RegExp(t.pattern,"i")}}]),t}();d(Rt,"_logger",A("RegexActionHandler"));var kt=Rt,Pt=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){return i(this,o),n.apply(this,arguments)}return u(o,null,[{key:"get",value:function(t,e){var r=new Map;r.set("Content-Type","application/json");var n=new ct(r);return n.service="user",n.action="get",n.method="POST",n.url=n.getUrl(t),n.tag="user-get",n.params={ks:e,format:1},n}}]),o}(ht),Nt=function(){function t(e){i(this,t),this.id=e.id}return u(t,[{key:"isAnonymous",value:function(){return t.INVALID_IDS.includes(this.id)}}]),t}();d(Nt,"INVALID_IDS",["0","",null,void 0]);var St=function(t){f(c,t);var r,n,o,a,s=(o=c,a=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(t){return!1}}(),function(){var t,e=h(o);if(a){var r=h(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return p(this,t)});function c(t,e){var r;return i(this,c),d(l(r=s.call(this,t,e)),"_filterOptionsConfig",{redirectFromEntryId:!0}),d(l(r),"_retryAttempts",0),r._logger=A("OVPProvider"),x.set(t.env),r._setFilterOptionsConfig(t.filterOptions),r._vrTag=t.vrTag||"360",r._networkRetryConfig=Object.assign(r._networkRetryConfig,t.networkRetryParameters),r._isAnonymous=!r._ks||void 0,void 0===r._isAnonymous&&r.initializeUserResponse(x.serviceUrl,r._ks).then((function(){r._logger.info("User response initialized")})).catch((function(t){r._logger.error("Failed to initialize user response",t)})),r}return u(c,[{key:"env",get:function(){return x.get()}},{key:"initializeUserResponse",value:(r=g().mark((function t(e,r){var n,i,o;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=Pt.get(e,r)).params=JSON.stringify(n.params),t.next=4,n.doHttpRequest();case 4:i=t.sent,o=new Nt(i),this._isAnonymous=o.isAnonymous();case 7:case"end":return t.stop()}}),t,this)})),n=function(){var t=this,n=arguments;return new Promise((function(i,o){var a=r.apply(t,n);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))},function(t,e){return n.apply(this,arguments)})},{key:"getMediaConfig",value:function(t){var e=this;return t.ks&&(this.ks=t.ks),this._dataLoader=new _t(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(r,n){var i=t.entryId,o=t.referenceId;if(i||o){var a=e.ks;a||(a="{1:result:ks}",e._dataLoader.add(At,{widgetId:e.widgetId}));var s=e._getEntryRedirectFilter(t);return e._dataLoader.add(mt,{entryId:i,ks:a,redirectFromEntryId:s,referenceId:o,referrer:e._referrer}),e._dataLoader.fetchData().then((function(t){try{var i=e._parseDataFromResponse(t);kt.handleRegexAction(i,t).then(r)}catch(t){n(t)}}),(function(t){n(t)}))}n(new lt(lt.Severity.CRITICAL,lt.Category.PROVIDER,lt.Code.MISSING_MANDATORY_PARAMS,{message:"missing entry id"}))}))}},{key:"doRequest",value:function(t,e,r){var n=this,i=e||this.ks,o=new _t(this.playerVersion,this.partnerId,i,this._networkRetryConfig);return new Promise((function(e,a){return i||o.add(At,{widgetId:n.widgetId}),t.forEach((function(t){o.add(t.loader,t.params,i||"{1:result:ks}")})),o.fetchData(r).then((function(t){try{e(t)}catch(t){a(t)}}),(function(t){a(t)}))}))}},{key:"_getEntryRedirectFilter",value:function(t){return"boolean"==typeof t.redirectFromEntryId?t.redirectFromEntryId:"boolean"!=typeof this._filterOptionsConfig.redirectFromEntryId||this._filterOptionsConfig.redirectFromEntryId}},{key:"_setFilterOptionsConfig",value:function(t){t&&"boolean"==typeof t.redirectFromEntryId&&(this._filterOptionsConfig.redirectFromEntryId=t.redirectFromEntryId)}},{key:"_parseDataFromResponse",value:function(t){this._logger.debug("Data parsing started");var e={session:{isAnonymous:this._isAnonymous,partnerId:this.partnerId},sources:this._getDefaultSourcesObject(),plugins:{}};if(this.uiConfId&&(e.session.uiConfId=this.uiConfId),t){if(t.has(At.id)){var r=t.get(At.id);r&&r.response&&(e.session.ks=r.response,this.widgetId!==this.defaultWidgetId&&(this.ks=e.session.ks))}else e.session.ks=this.ks;if(t.has(mt.id)){var n=t.get(mt.id);if(n&&n.response){var i=n.response;if(ut.hasBlockAction(i))throw new lt(lt.Severity.CRITICAL,lt.Category.SERVICE,lt.Code.BLOCK_ACTION,{action:ut.getBlockAction(i),messages:ut.getErrorMessages(i)});if(ut.hasScheduledRestriction(i))throw new lt(lt.Severity.CRITICAL,lt.Category.SERVICE,lt.Code.SCHEDULED_RESTRICTED,{messages:ut.getErrorMessages(i)});var o=ut.getMediaEntry(this.ks,this.partnerId,this.uiConfId,i);Object.assign(e.sources,this._getSourcesObject(o)),this._verifyMediaStatus(o),this._verifyHasSources(e.sources);var a=ut.getBumper(i,this.ks,this.partnerId);a&&Object.assign(e.plugins,{bumper:a})}}}return this._logger.debug("Data parsing finished",e),e}},{key:"_verifyMediaStatus",value:function(t){if([T.EntryStatus.IMPORT,T.EntryStatus.PRECONVERT].includes(t.status))throw new lt(lt.Severity.CRITICAL,lt.Category.SERVICE,lt.Code.MEDIA_STATUS_NOT_READY,{messages:"Status of entry id ".concat(t.id," is ").concat(t.status," and is still being imported or converted"),data:{status}})}},{key:"getPlaylistConfig",value:function(t){var e=this;return t.ks&&(this.ks=t.ks),this._dataLoader=new _t(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(r,n){var i=t.playlistId;if(i){var o=e.ks;o||(o="{1:result:ks}",e._dataLoader.add(At,{widgetId:e.widgetId})),e._dataLoader.add(Ct,{playlistId:i,ks:o}),e._dataLoader.fetchData().then((function(i){try{e._handlePlaylistResponse(i,r,n,t)}catch(t){n(t)}}),(function(t){n(t)}))}else n({success:!1,data:"Missing mandatory parameter"})}))}},{key:"_handlePlaylistResponse",value:function(t,e,r,n){this._logger.debug("Handling playlist response",{attempt:this._retryAttempts+1,maxAttempts:10});var i=this._parsePlaylistDataFromResponse(t);i.items.length>0?this._handlePlaylistSuccess(i,e):this._handlePlaylistRetry(e,r,n)}},{key:"_handlePlaylistSuccess",value:function(t,e){this._logger.debug("Playlist items found",{itemsCount:t.items.length,totalAttempts:this._retryAttempts+1}),this._retryAttempts=0,e(t)}},{key:"_handlePlaylistRetry",value:function(t,e,r){this._retryAttempts>=10?this._handleMaxRetriesReached(e):(this._retryAttempts++,this._schedulePlaylistRetry(t,e,r))}},{key:"_handleMaxRetriesReached",value:function(t){this._logger.error("Max retry attempts reached - rejecting playlist",{maxAttempts:10}),this._retryAttempts=0,t(this._getPlaylistObject())}},{key:"_schedulePlaylistRetry",value:function(t,e,r){var n=this;setTimeout((function(){n._dataLoader=new _t(n.playerVersion,n.partnerId,n.ks,n._networkRetryConfig);var i=n.ks;i||(i="{1:result:ks}",n._dataLoader.add(At,{widgetId:n.widgetId}));var o={playlistId:r.playlistId,ks:i,cacheToken:",".repeat(n._retryAttempts)};n._dataLoader.add(Ct,o),n._dataLoader.fetchData().then((function(i){n._handlePlaylistResponse(i,t,e,r)}),(function(t){e(t)}))}),1e4)}},{key:"_parsePlaylistDataFromResponse",value:function(t){var e=this;this._logger.debug("Data parsing started");var r=this._getPlaylistObject();if(t&&t.has(Ct.id)){var n=t.get(Ct.id);if(n&&n.response){var i=ut.getPlaylist(n.response);r.id=i.id,r.poster=i.poster,r.metadata.name=i.name,r.metadata.description=i.description,r.playlistLastEntryId=i.playlistLastEntryId,i.items.forEach((function(t){return r.items.push({sources:e._getSourcesObject(t)})}))}}return this._logger.debug("Data parsing finished",r),r}},{key:"getEntryListConfig",value:function(t){var e=this;return t.ks&&(this.ks=t.ks),this._dataLoader=new _t(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(r,n){var i=t.entries;if(i&&i.length){var o=e.ks;o||(o="{1:result:ks}",e._dataLoader.add(At,{widgetId:e.widgetId}));var a=e._getEntryRedirectFilter(t);e._dataLoader.add(Tt,{entries:i,ks:o,redirectFromEntryId:a}),e._dataLoader.fetchData(!1).then((function(t){r(e._parseEntryListDataFromResponse(t))}),(function(t){n(t)}))}else n({success:!1,data:"Missing mandatory parameter"})}))}},{key:"_parseEntryListDataFromResponse",value:function(t){var e=this;this._logger.debug("Data parsing started");var r=this._getPlaylistObject();if(t&&t.has(Tt.id)){var n=t.get(Tt.id);n&&n.response&&ut.getEntryList(n.response).items.forEach((function(t){return r.items.push({sources:e._getSourcesObject(t)})}))}return this._logger.debug("Data parsing finished",r),r}},{key:"_getPlaylistObject",value:function(){return{id:"",metadata:{name:"",description:""},poster:"",playlistLastEntryId:"",items:[]}}},{key:"_getDefaultSourcesObject",value:function(){return{hls:[],dash:[],progressive:[],image:[],document:[],id:"",duration:0,type:X.Type.UNKNOWN,poster:"",rawThumbnailUrl:"",dvr:!1,vr:null,metadata:{name:"",description:"",tags:""}}}},{key:"_getSourcesObject",value:function(t){var e=this,r=this._getDefaultSourcesObject(),n=t.sources.toJSON();return r.hls=n.hls,r.dash=n.dash,r.progressive=n.progressive,r.image=n.image,r.document=n.document,r.id=t.id,r.duration=t.duration,r.type=t.type,r.dvr=!!t.dvrStatus,r.poster=t.poster,r.rawThumbnailUrl=t.rawThumbnailUrl,r.downloadUrl=t.downloadUrl,r.rootEntryId=t.rootEntryId,r.capabilities=t.capabilities,t.activeLiveStreamTime&&(r.activeLiveStreamTime=t.activeLiveStreamTime),t.sources.captions&&(r.captions=t.sources.captions),t.metadata&&"string"==typeof t.metadata.tags&&t.metadata.tags.split(",").some((function(t){return t.trim()===e._vrTag}))&&(r.vr={}),Object.assign(r.metadata,t.metadata),r}}]),c}(wt),Lt="@playkit-js/playkit-js-providers-ovp",Dt="2.44.1"}(),n}()},740:(t,e,r)=>{"use strict";r.d(e,{AR:()=>h,Ah:()=>g,Fb:()=>p,Gj:()=>u,I:()=>m,J_:()=>f,Oq:()=>_,RC:()=>y,TD:()=>s,ZP:()=>x,Zh:()=>c,az:()=>l,eL:()=>d,f6:()=>A,hT:()=>E,w3:()=>b,we:()=>v});var n=r(537),i=r.n(n),o=r(645),a=r.n(o)()(i());a.push([t.id,'.playkit-banner-overlay__banner-overlay__banner-overlay{position:absolute;pointer-events:none;width:100%;padding:4px 8px}.playkit-banner-overlay__banner-overlay__banner-content{display:flex;border-radius:var(--Roundness-2, 8px);background:var(--B-40, rgba(0, 0, 0, 0.4));padding:4px 8px;gap:8px;color:#fff;font-size:16px;font-family:"Lato",sans-serif;font-style:normal;font-weight:400;line-height:150%;box-sizing:border-box;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);pointer-events:auto;box-shadow:0 4px 4px rgba(0,0,0,.25);overflow:visible;text-shadow:0 4px 4px rgba(0,0,0,.25)}.playkit-banner-overlay__banner-overlay__content-center{justify-content:center;text-align:center}.playkit-banner-overlay__banner-overlay__content-left{justify-content:flex-start;text-align:left}.playkit-banner-overlay__banner-overlay__content-right{justify-content:flex-end;text-align:right}.playkit-banner-overlay__banner-overlay__banner-text{display:block;width:100%;margin:0}.playkit-banner-overlay__banner-overlay__text-container{flex:1 1 auto;min-width:0;overflow:visible}.playkit-banner-overlay__banner-overlay__text-truncated{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.playkit-banner-overlay__banner-overlay__text-wrapping{word-wrap:break-word;word-break:break-word}.playkit-banner-overlay__banner-overlay__close-button{background:none;border:none;color:#fff;font-size:20px;width:24px;height:24px;cursor:pointer;opacity:.9;transition:opacity .2s ease;flex:0 0 auto;display:flex;justify-content:center}.playkit-banner-overlay__banner-overlay__close-button:hover{opacity:1}.playkit-banner-overlay__banner-overlay__close-button:focus{outline:1px solid rgba(255,255,255,.5);outline-offset:2px}.playkit-banner-overlay__banner-overlay__top{top:0;left:50%;transform:translateX(-50%)}.playkit-banner-overlay__banner-overlay__bottom{bottom:0;left:50%;transform:translateX(-50%)}.playkit-banner-overlay__banner-overlay__top-left{top:0;left:0}.playkit-banner-overlay__banner-overlay__top-right{top:0;right:0}.playkit-banner-overlay__banner-overlay__bottom-left{bottom:0;left:0}.playkit-banner-overlay__banner-overlay__bottom-right{bottom:0;right:0}@media(max-width: 480px){.playkit-banner-overlay__banner-overlay__banner-content{font-size:14px;padding:4px 6px}}',"",{version:3,sources:["webpack://./src/components/banner-overlay/banner-overlay.scss"],names:[],mappings:"AAAA,wDACE,iBAAA,CACA,mBAAA,CACA,UAAA,CACA,eAAA,CAGF,wDACE,YAAA,CACA,qCAAA,CACA,0CAAA,CACA,eAAA,CACA,OAAA,CACA,UAAA,CACA,cAAA,CACA,6BAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA,CACA,qBAAA,CACA,yBAAA,CACA,iCAAA,CACA,mBAAA,CACA,oCAAA,CACA,gBAAA,CACA,qCAAA,CAGF,wDACE,sBAAA,CACA,iBAAA,CAGF,sDACE,0BAAA,CACA,eAAA,CAGF,uDACE,wBAAA,CACA,gBAAA,CAGF,qDACE,aAAA,CACA,UAAA,CACA,QAAA,CAGF,wDACE,aAAA,CACA,WAAA,CACA,gBAAA,CAGF,wDACE,eAAA,CACA,kBAAA,CACA,sBAAA,CAGF,uDACE,oBAAA,CACA,qBAAA,CAGF,sDACE,eAAA,CACA,WAAA,CACA,UAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,cAAA,CACA,UAAA,CACA,2BAAA,CACA,aAAA,CAEA,YAAA,CACA,sBAAA,CAEA,4DACE,SAAA,CAGF,4DACE,sCAAA,CACA,kBAAA,CAIJ,6CACE,KAAA,CACA,QAAA,CACA,0BAAA,CAGF,gDACE,QAAA,CACA,QAAA,CACA,0BAAA,CAGF,kDACE,KAAA,CACA,MAAA,CAGF,mDACE,KAAA,CACA,OAAA,CAGF,qDACE,QAAA,CACA,MAAA,CAGF,sDACE,QAAA,CACA,OAAA,CAGF,yBACE,wDACE,cAAA,CACA,eAAA,CAAA",sourcesContent:[".banner-overlay {\n position: absolute;\n pointer-events: none;\n width: 100%;\n padding: 4px 8px;\n}\n\n.banner-content {\n display: flex;\n border-radius: var(--Roundness-2, 8px);\n background: var(--B-40, rgba(0, 0, 0, 0.40));\n padding: 4px 8px;\n gap: 8px;\n color: #FFFFFF;\n font-size: 16px;\n font-family: 'Lato', sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n box-sizing: border-box;\n backdrop-filter: blur(2px);\n -webkit-backdrop-filter: blur(2px);\n pointer-events: auto;\n box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);\n overflow: visible;\n text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);\n}\n\n.content-center {\n justify-content: center;\n text-align: center;\n}\n\n.content-left {\n justify-content: flex-start;\n text-align: left;\n}\n\n.content-right {\n justify-content: flex-end;\n text-align: right;\n}\n\n.banner-text {\n display: block;\n width: 100%;\n margin: 0;\n}\n\n.text-container {\n flex: 1 1 auto;\n min-width: 0;\n overflow: visible;\n}\n\n.text-truncated {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.text-wrapping {\n word-wrap: break-word;\n word-break: break-word;\n}\n\n.close-button {\n background: none;\n border: none;\n color: #FFFFFF;\n font-size: 20px;\n width: 24px;\n height: 24px;\n cursor: pointer;\n opacity: 0.9;\n transition: opacity 0.2s ease;\n flex: 0 0 auto;\n\n display: flex;\n justify-content: center;\n\n &:hover {\n opacity: 1;\n }\n\n &:focus {\n outline: 1px solid rgba(255, 255, 255, 0.5);\n outline-offset: 2px;\n }\n}\n\n.top {\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.bottom {\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.top-left {\n top: 0;\n left: 0;\n}\n\n.top-right {\n top: 0;\n right: 0;\n}\n\n.bottom-left {\n bottom: 0;\n left: 0;\n}\n\n.bottom-right {\n bottom: 0;\n right: 0;\n}\n\n@media (max-width: 480px) {\n .banner-content {\n font-size: 14px;\n padding: 4px 6px;\n }\n}"],sourceRoot:""}]);var s="playkit-banner-overlay__banner-overlay__banner-overlay",u="playkit-banner-overlay__banner-overlay__banner-content",l="playkit-banner-overlay__banner-overlay__content-center",c="playkit-banner-overlay__banner-overlay__content-left",f="playkit-banner-overlay__banner-overlay__content-right",p="playkit-banner-overlay__banner-overlay__banner-text",h="playkit-banner-overlay__banner-overlay__text-container",d="playkit-banner-overlay__banner-overlay__text-truncated",y="playkit-banner-overlay__banner-overlay__text-wrapping",g="playkit-banner-overlay__banner-overlay__close-button",v="playkit-banner-overlay__banner-overlay__top",m="playkit-banner-overlay__banner-overlay__bottom",b="playkit-banner-overlay__banner-overlay__top-left",A="playkit-banner-overlay__banner-overlay__top-right",_="playkit-banner-overlay__banner-overlay__bottom-left",E="playkit-banner-overlay__banner-overlay__bottom-right";const x=a},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);n&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},537:t=>{"use strict";t.exports=function(t){var e=t[1],r=t[3];if(!r)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),o="/*# ".concat(i," */");return[e].concat([o]).join("\n")}return[e].join("\n")}},932:(t,e,r)=>{"use strict";const n=r(501),i=r(844),o=r(192);t.exports={XMLParser:i,XMLValidator:n,XMLBuilder:o}},694:t=>{t.exports=function(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const r of t){if("string"==typeof r&&e===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}}:()=>!1}},849:(t,e)=>{"use strict";const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+r+"]["+r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,r){if(e){const n=Object.keys(e),i=n.length;for(let o=0;o<i;o++)t[n[o]]="strict"===r?[e[n[o]]]:e[n[o]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(t){return!(null==i.exec(t))},e.getAllMatches=function(t,e){const r=[];let n=e.exec(t);for(;n;){const i=[];i.startIndex=e.lastIndex-n[0].length;const o=n.length;for(let t=0;t<o;t++)i.push(n[t]);r.push(i),n=e.exec(t)}return r},e.nameRegexp=n},501:(t,e,r)=>{"use strict";const n=r(849),i={allowBooleanAttributes:!1,unpairedTags:[]};function o(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function a(t,e){const r=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const n=t.substr(r,e-r);if(e>5&&"xml"===n)return d("InvalidXml","XML declaration allowed only at the start of the document.",g(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function s(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let r=1;for(e+=8;e<t.length;e++)if("<"===t[e])r++;else if(">"===t[e]&&(r--,0===r))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}e.validate=function(t,e){e=Object.assign({},i,e);const r=[];let u=!1,l=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let i=0;i<t.length;i++)if("<"===t[i]&&"?"===t[i+1]){if(i+=2,i=a(t,i),i.err)return i}else{if("<"!==t[i]){if(o(t[i]))continue;return d("InvalidChar","char '"+t[i]+"' is not expected.",g(t,i))}{let y=i;if(i++,"!"===t[i]){i=s(t,i);continue}{let v=!1;"/"===t[i]&&(v=!0,i++);let m="";for(;i<t.length&&">"!==t[i]&&" "!==t[i]&&"\t"!==t[i]&&"\n"!==t[i]&&"\r"!==t[i];i++)m+=t[i];if(m=m.trim(),"/"===m[m.length-1]&&(m=m.substring(0,m.length-1),i--),f=m,!n.isName(f)){let e;return e=0===m.trim().length?"Invalid space after '<'.":"Tag '"+m+"' is an invalid name.",d("InvalidTag",e,g(t,i))}const b=c(t,i);if(!1===b)return d("InvalidAttr","Attributes for '"+m+"' have open quote.",g(t,i));let A=b.value;if(i=b.index,"/"===A[A.length-1]){const r=i-A.length;A=A.substring(0,A.length-1);const n=p(A,e);if(!0!==n)return d(n.err.code,n.err.msg,g(t,r+n.err.line));u=!0}else if(v){if(!b.tagClosed)return d("InvalidTag","Closing tag '"+m+"' doesn't have proper closing.",g(t,i));if(A.trim().length>0)return d("InvalidTag","Closing tag '"+m+"' can't have attributes or invalid starting.",g(t,y));if(0===r.length)return d("InvalidTag","Closing tag '"+m+"' has not been opened.",g(t,y));{const e=r.pop();if(m!==e.tagName){let r=g(t,e.tagStartPos);return d("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+m+"'.",g(t,y))}0==r.length&&(l=!0)}}else{const n=p(A,e);if(!0!==n)return d(n.err.code,n.err.msg,g(t,i-A.length+n.err.line));if(!0===l)return d("InvalidXml","Multiple possible root nodes found.",g(t,i));-1!==e.unpairedTags.indexOf(m)||r.push({tagName:m,tagStartPos:y}),u=!0}for(i++;i<t.length;i++)if("<"===t[i]){if("!"===t[i+1]){i++,i=s(t,i);continue}if("?"!==t[i+1])break;if(i=a(t,++i),i.err)return i}else if("&"===t[i]){const e=h(t,i);if(-1==e)return d("InvalidChar","char '&' is not expected.",g(t,i));i=e}else if(!0===l&&!o(t[i]))return d("InvalidXml","Extra text at the end",g(t,i));"<"===t[i]&&i--}}}var f;return u?1==r.length?d("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",g(t,r[0].tagStartPos)):!(r.length>0)||d("InvalidXml","Invalid '"+JSON.stringify(r.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):d("InvalidXml","Start tag expected.",1)};const u='"',l="'";function c(t,e){let r="",n="",i=!1;for(;e<t.length;e++){if(t[e]===u||t[e]===l)""===n?n=t[e]:n!==t[e]||(n="");else if(">"===t[e]&&""===n){i=!0;break}r+=t[e]}return""===n&&{value:r,index:e,tagClosed:i}}const f=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(t,e){const r=n.getAllMatches(t,f),i={};for(let t=0;t<r.length;t++){if(0===r[t][1].length)return d("InvalidAttr","Attribute '"+r[t][2]+"' has no space in starting.",v(r[t]));if(void 0!==r[t][3]&&void 0===r[t][4])return d("InvalidAttr","Attribute '"+r[t][2]+"' is without value.",v(r[t]));if(void 0===r[t][3]&&!e.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+r[t][2]+"' is not allowed.",v(r[t]));const n=r[t][2];if(!y(n))return d("InvalidAttr","Attribute '"+n+"' is an invalid name.",v(r[t]));if(i.hasOwnProperty(n))return d("InvalidAttr","Attribute '"+n+"' is repeated.",v(r[t]));i[n]=1}return!0}function h(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let r=/\d/;for("x"===t[e]&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(r))break}return-1}(t,++e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(";"===t[e])break;return-1}return e}function d(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function y(t){return n.isName(t)}function g(t,e){const r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function v(t){return t.startIndex+t[1].length}},192:(t,e,r)=>{"use strict";const n=r(592),i=r(694),o={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function a(t){this.options=Object.assign({},o,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=i(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=s,this.options.format?(this.indentate=u,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function s(t,e,r,n){const i=this.j2x(t,r+1,n.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}function u(t){return this.options.indentBy.repeat(t)}function l(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}a.prototype.build=function(t){return this.options.preserveOrder?n(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},a.prototype.j2x=function(t,e,r){let n="",i="";const o=r.join(".");for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a))if(void 0===t[a])this.isAttribute(a)&&(i+="");else if(null===t[a])this.isAttribute(a)||a===this.options.cdataPropName?i+="":"?"===a[0]?i+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)i+=this.buildTextValNode(t[a],a,"",e);else if("object"!=typeof t[a]){const r=this.isAttribute(a);if(r&&!this.ignoreAttributesFn(r,o))n+=this.buildAttrPairStr(r,""+t[a]);else if(!r)if(a===this.options.textNodeName){let e=this.options.tagValueProcessor(a,""+t[a]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[a],a,"",e)}else if(Array.isArray(t[a])){const n=t[a].length;let o="",s="";for(let u=0;u<n;u++){const n=t[a][u];if(void 0===n);else if(null===n)"?"===a[0]?i+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const t=this.j2x(n,e+1,r.concat(a));o+=t.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(s+=t.attrStr)}else o+=this.processTextOrObjNode(n,a,e,r);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(a,n);t=this.replaceEntitiesValue(t),o+=t}else o+=this.buildTextValNode(n,a,"",e)}this.options.oneListGroup&&(o=this.buildObjectNode(o,a,s,e)),i+=o}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){const e=Object.keys(t[a]),r=e.length;for(let i=0;i<r;i++)n+=this.buildAttrPairStr(e[i],""+t[a][e[i]])}else i+=this.processTextOrObjNode(t[a],a,e,r);return{attrStr:n,val:i}},a.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},a.prototype.buildObjectNode=function(t,e,r,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,o="";return"?"===e[0]&&(o="?",i=""),!r&&""!==r||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+r+o+this.tagEndChar+t+this.indentate(n)+i:this.indentate(n)+"<"+e+r+o+">"+t+i}},a.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},a.prototype.buildTextValNode=function(t,e,r,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),""===i?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"</"+e+this.tagEndChar}},a.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t},t.exports=a},592:t=>{function e(t,a,s,u){let l="",c=!1;for(let f=0;f<t.length;f++){const p=t[f],h=r(p);if(void 0===h)continue;let d="";if(d=0===s.length?h:`${s}.${h}`,h===a.textNodeName){let t=p[h];i(d,a)||(t=a.tagValueProcessor(h,t),t=o(t,a)),c&&(l+=u),l+=t,c=!1;continue}if(h===a.cdataPropName){c&&(l+=u),l+=`<![CDATA[${p[h][0][a.textNodeName]}]]>`,c=!1;continue}if(h===a.commentPropName){l+=u+`\x3c!--${p[h][0][a.textNodeName]}--\x3e`,c=!0;continue}if("?"===h[0]){const t=n(p[":@"],a),e="?xml"===h?"":u;let r=p[h][0][a.textNodeName];r=0!==r.length?" "+r:"",l+=e+`<${h}${r}${t}?>`,c=!0;continue}let y=u;""!==y&&(y+=a.indentBy);const g=u+`<${h}${n(p[":@"],a)}`,v=e(p[h],a,d,y);-1!==a.unpairedTags.indexOf(h)?a.suppressUnpairedNode?l+=g+">":l+=g+"/>":v&&0!==v.length||!a.suppressEmptyNode?v&&v.endsWith(">")?l+=g+`>${v}${u}</${h}>`:(l+=g+">",v&&""!==u&&(v.includes("/>")||v.includes("</"))?l+=u+a.indentBy+v+u:l+=v,l+=`</${h}>`):l+=g+"/>",c=!0}return l}function r(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function n(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let i=e.attributeValueProcessor(n,t[n]);i=o(i,e),!0===i&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${i}"`}return r}function i(t,e){let r=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function o(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){const n=e.entities[r];t=t.replace(n.regex,n.val)}return t}t.exports=function(t,r){let n="";return r.format&&r.indentBy.length>0&&(n="\n"),e(t,r,"",n)}},780:(t,e,r)=>{const n=r(849);function i(t,e){let r="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)r+=t[e];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=t[e++];let i="";for(;e<t.length&&t[e]!==n;e++)i+=t[e];return[r,i,e]}function o(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function a(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function s(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function u(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function l(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function c(t){if(n.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}t.exports=function(t,e){const r={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let n=1,f=!1,p=!1,h="";for(;e<t.length;e++)if("<"!==t[e]||p)if(">"===t[e]){if(p?"-"===t[e-1]&&"-"===t[e-2]&&(p=!1,n--):n--,0===n)break}else"["===t[e]?f=!0:h+=t[e];else{if(f&&a(t,e)){let n,o;e+=7,[n,o,e]=i(t,e+1),-1===o.indexOf("&")&&(r[c(n)]={regx:RegExp(`&${n};`,"g"),val:o})}else if(f&&s(t,e))e+=8;else if(f&&u(t,e))e+=8;else if(f&&l(t,e))e+=9;else{if(!o)throw new Error("Invalid DOCTYPE");p=!0}n++,h=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:e}}},745:(t,e)=>{const r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t}};e.buildOptions=function(t){return Object.assign({},r,t)},e.defaultOptions=r},78:(t,e,r)=>{"use strict";const n=r(849),i=r(311),o=r(780),a=r(153),s=r(694);function u(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function l(t,e,r,n,i,o,a){if(void 0!==t&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){a||(t=this.replaceEntitiesValue(t));const n=this.options.tagValueProcessor(e,t,r,i,o);return null==n?t:typeof n!=typeof t||n!==t?n:this.options.trimValues||t.trim()===t?_(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function c(t){if(this.options.removeNSPrefix){const e=t.split(":"),r="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=r+e[1])}return t}const f=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function p(t,e,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const r=n.getAllMatches(t,f),i=r.length,o={};for(let t=0;t<i;t++){const n=this.resolveNameSpace(r[t][1]);if(this.ignoreAttributesFn(n,e))continue;let i=r[t][4],a=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const t=this.options.attributeValueProcessor(n,i,e);o[a]=null==t?i:typeof t!=typeof i||t!==i?t:_(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[a]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=o,t}return o}}const h=function(t){t=t.replace(/\r\n?/g,"\n");const e=new i("!xml");let r=e,n="",a="";for(let s=0;s<t.length;s++)if("<"===t[s])if("/"===t[s+1]){const e=m(t,">",s,"Closing Tag is not closed.");let i=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=i.indexOf(":");-1!==t&&(i=i.substr(t+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),r&&(n=this.saveTextToParentTag(n,r,a));const o=a.substring(a.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let u=0;o&&-1!==this.options.unpairedTags.indexOf(o)?(u=a.lastIndexOf(".",a.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=a.lastIndexOf("."),a=a.substring(0,u),r=this.tagsNodeStack.pop(),n="",s=e}else if("?"===t[s+1]){let e=b(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,a),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new i(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,a,e.tagName)),this.addChild(r,t,a)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=m(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const i=t.substring(s+4,e-2);n=this.saveTextToParentTag(n,r,a),r.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=e}else if("!D"===t.substr(s+1,2)){const e=o(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=m(t,"]]>",s,"CDATA is not closed.")-2,i=t.substring(s+9,e);n=this.saveTextToParentTag(n,r,a);let o=this.parseTextData(i,r.tagname,a,!0,!1,!0,!0);null==o&&(o=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):r.add(this.options.textNodeName,o),s=e+2}else{let o=b(t,s,this.options.removeNSPrefix),u=o.tagName;const l=o.rawTagName;let c=o.tagExp,f=o.attrExpPresent,p=o.closeIndex;this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,a,!1));const h=r;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(r=this.tagsNodeStack.pop(),a=a.substring(0,a.lastIndexOf("."))),u!==e.tagname&&(a+=a?"."+u:u),this.isItStopNode(this.options.stopNodes,a,u)){let e="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===u[u.length-1]?(u=u.substr(0,u.length-1),a=a.substr(0,a.length-1),c=u):c=c.substr(0,c.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(u))s=o.closeIndex;else{const r=this.readStopNodeData(t,l,p+1);if(!r)throw new Error(`Unexpected end of ${l}`);s=r.i,e=r.tagContent}const n=new i(u);u!==c&&f&&(n[":@"]=this.buildAttributesMap(c,a,u)),e&&(e=this.parseTextData(e,u,a,!0,f,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),n.add(this.options.textNodeName,e),this.addChild(r,n,a)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===u[u.length-1]?(u=u.substr(0,u.length-1),a=a.substr(0,a.length-1),c=u):c=c.substr(0,c.length-1),this.options.transformTagName&&(u=this.options.transformTagName(u));const t=new i(u);u!==c&&f&&(t[":@"]=this.buildAttributesMap(c,a,u)),this.addChild(r,t,a),a=a.substr(0,a.lastIndexOf("."))}else{const t=new i(u);this.tagsNodeStack.push(r),u!==c&&f&&(t[":@"]=this.buildAttributesMap(c,a,u)),this.addChild(r,t,a),r=t}n="",s=p}}else n+=t[s];return e.child};function d(t,e,r){const n=this.options.updateTag(e.tagname,r,e[":@"]);!1===n||("string"==typeof n?(e.tagname=n,t.addChild(e)):t.addChild(e))}const y=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){const r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function g(t,e,r,n){return t&&(void 0===n&&(n=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function v(t,e,r){const n="*."+r;for(const r in t){const i=t[r];if(n===i||e===i)return!0}return!1}function m(t,e,r,n){const i=t.indexOf(e,r);if(-1===i)throw new Error(n);return i+e.length-1}function b(t,e,r,n=">"){const i=function(t,e,r=">"){let n,i="";for(let o=e;o<t.length;o++){let e=t[o];if(n)e===n&&(n="");else if('"'===e||"'"===e)n=e;else if(e===r[0]){if(!r[1])return{data:i,index:o};if(t[o+1]===r[1])return{data:i,index:o}}else"\t"===e&&(e=" ");i+=e}}(t,e+1,n);if(!i)return;let o=i.data;const a=i.index,s=o.search(/\s/);let u=o,l=!0;-1!==s&&(u=o.substring(0,s),o=o.substring(s+1).trimStart());const c=u;if(r){const t=u.indexOf(":");-1!==t&&(u=u.substr(t+1),l=u!==i.data.substr(t+1))}return{tagName:u,tagExp:o,closeIndex:a,attrExpPresent:l,rawTagName:c}}function A(t,e,r){const n=r;let i=1;for(;r<t.length;r++)if("<"===t[r])if("/"===t[r+1]){const o=m(t,">",r,`${e} is not closed`);if(t.substring(r+2,o).trim()===e&&(i--,0===i))return{tagContent:t.substring(n,r),i:o};r=o}else if("?"===t[r+1])r=m(t,"?>",r+1,"StopNode is not closed.");else if("!--"===t.substr(r+1,3))r=m(t,"--\x3e",r+3,"StopNode is not closed.");else if("!["===t.substr(r+1,2))r=m(t,"]]>",r,"StopNode is not closed.")-2;else{const n=b(t,r,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&i++,r=n.closeIndex)}}function _(t,e,r){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&a(t,r)}return n.isExist(t)?t:""}t.exports=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=u,this.parseXml=h,this.parseTextData=l,this.resolveNameSpace=c,this.buildAttributesMap=p,this.isItStopNode=v,this.replaceEntitiesValue=y,this.readStopNodeData=A,this.saveTextToParentTag=g,this.addChild=d,this.ignoreAttributesFn=s(this.options.ignoreAttributes)}}},844:(t,e,r)=>{const{buildOptions:n}=r(745),i=r(78),{prettify:o}=r(997),a=r(501);t.exports=class{constructor(t){this.externalEntities={},this.options=n(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const r=a.validate(t,e);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new i(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(t);return this.options.preserveOrder||void 0===n?n:o(n,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}},997:(t,e)=>{"use strict";function r(t,e,a){let s;const u={};for(let l=0;l<t.length;l++){const c=t[l],f=n(c);let p="";if(p=void 0===a?f:a+"."+f,f===e.textNodeName)void 0===s?s=c[f]:s+=""+c[f];else{if(void 0===f)continue;if(c[f]){let t=r(c[f],e,p);const n=o(t,e);c[":@"]?i(t,c[":@"],p,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==u[f]&&u.hasOwnProperty(f)?(Array.isArray(u[f])||(u[f]=[u[f]]),u[f].push(t)):e.isArray(f,p,n)?u[f]=[t]:u[f]=t}}}return"string"==typeof s?s.length>0&&(u[e.textNodeName]=s):void 0!==s&&(u[e.textNodeName]=s),u}function n(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const r=e[t];if(":@"!==r)return r}}function i(t,e,r,n){if(e){const i=Object.keys(e),o=i.length;for(let a=0;a<o;a++){const o=i[a];n.isArray(o,r+"."+o,!0,!0)?t[o]=[e[o]]:t[o]=e[o]}}}function o(t,e){const{textNodeName:r}=e,n=Object.keys(t).length;return 0===n||!(1!==n||!t[r]&&"boolean"!=typeof t[r]&&0!==t[r])}e.prettify=function(t,e){return r(t,e)}},311:t=>{"use strict";t.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},153:t=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,r=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(t,i={}){if(i=Object.assign({},n,i),!t||"string"!=typeof t)return t;let o=t.trim();if(void 0!==i.skipLike&&i.skipLike.test(o))return t;if("0"===t)return 0;if(i.hex&&e.test(o))return function(t,e){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(o);if(-1!==o.search(/[eE]/)){const e=o.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(e){if(i.leadingZeros)o=(e[1]||"")+e[3];else if("0"!==e[2]||"."!==e[3][0])return t;return i.eNotation?Number(o):t}return t}{const e=r.exec(o);if(e){const r=e[1],n=e[2];let s=(a=e[3])&&-1!==a.indexOf(".")?("."===(a=a.replace(/0+$/,""))?a="0":"."===a[0]?a="0"+a:"."===a[a.length-1]&&(a=a.substr(0,a.length-1)),a):a;if(!i.leadingZeros&&n.length>0&&r&&"."!==o[2])return t;if(!i.leadingZeros&&n.length>0&&!r&&"."!==o[1])return t;if(i.leadingZeros&&n===t)return 0;{const e=Number(o),a=""+e;return-1!==a.search(/[eE]/)?i.eNotation?e:t:-1!==o.indexOf(".")?"0"===a&&""===s||a===s||r&&a==="-"+s?e:t:n?s===a||r+s===a?e:t:o===a||o===r+a?e:t}}return t}var a}},379:t=>{"use strict";var e=[];function r(t){for(var r=-1,n=0;n<e.length;n++)if(e[n].identifier===t){r=n;break}return r}function n(t,n){for(var o={},a=[],s=0;s<t.length;s++){var u=t[s],l=n.base?u[0]+n.base:u[0],c=o[l]||0,f="".concat(l," ").concat(c);o[l]=c+1;var p=r(f),h={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==p)e[p].references++,e[p].updater(h);else{var d=i(h,n);n.byIndex=s,e.splice(s,0,{identifier:f,updater:d,references:1})}a.push(f)}return a}function i(t,e){var r=e.domAPI(e);return r.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,i){var o=n(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var s=r(o[a]);e[s].references--}for(var u=n(t,i),l=0;l<o.length;l++){var c=r(o[l]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}o=u}}},216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},575:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach((function(r){t.setAttribute(r,e[r])}))}},37:t=>{"use strict";var e,r=(e=[],function(t,r){return e[t]=r,e.filter(Boolean).join("\n")});function n(t,e,n,i){var o;if(n)o="";else{o="",i.supports&&(o+="@supports (".concat(i.supports,") {")),i.media&&(o+="@media ".concat(i.media," {"));var a=void 0!==i.layer;a&&(o+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),o+=i.css,a&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}")}if(t.styleSheet)t.styleSheet.cssText=r(e,o);else{var s=document.createTextNode(o),u=t.childNodes;u[e]&&t.removeChild(u[e]),u.length?t.insertBefore(s,u[e]):t.appendChild(s)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,r=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(r,e,!1,t)},remove:function(t){n(r,e,!0,t)}}}},61:(t,e,r)=>{var n=r(698).default;function i(){"use strict";t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof A?e:A,o=Object.create(i.prototype),a=new S(n||[]);return s(o,"_invoke",{value:R(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var y="suspendedStart",g="suspendedYield",v="executing",m="completed",b={};function A(){}function _(){}function E(){}var x={};p(x,l,(function(){return this}));var C=Object.getPrototypeOf,w=C&&C(C(L([])));w&&w!==o&&a.call(w,l)&&(x=w);var T=E.prototype=A.prototype=Object.create(x);function I(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(i,o,s,u){var l=d(t[i],t,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==n(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(f).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(l.arg)}var i;s(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function R(t,r,n){var i=y;return function(o,a){if(i===v)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===y)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var l=d(t,r,n);if("normal"===l.type){if(i=n.done?m:g,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=m,n.method="throw",n.arg=l.arg)}}}function k(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,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;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,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function P(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[l];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(a.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(n(t)+" is not iterable")}return _.prototype=E,s(T,"constructor",{value:E,configurable:!0}),s(E,"constructor",{value:_,configurable:!0}),_.displayName=p(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,p(t,f,"GeneratorFunction")),t.prototype=Object.create(T),t},r.awrap=function(t){return{__await:t}},I(O.prototype),p(O.prototype,c,(function(){return this})),r.AsyncIterator=O,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new O(h(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},I(T),p(T,f,"Generator"),p(T,l,(function(){return this})),p(T,"toString",(function(){return"[object Generator]"})),r.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}},r.values=L,S.prototype={constructor:S,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(N),!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 t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){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 i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(o)},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),b},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),N(r),b}},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 i=n.arg;N(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},698:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},687:(t,e,r)=>{var n=r(61)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,exports:{}};return t[n](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{BannerAlignment:()=>A,Icon:()=>_});const t=KalturaPlayer;function e(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function i(t){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=t.apply(r,n);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t){return a="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},a(t)}function s(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:String(e)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function l(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},h.apply(this,arguments)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}function g(t,e,r){return(e=s(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var v=r(687),m=r.n(v);const b=KalturaPlayer.ui.preact;var A=function(t){return t.TOP="top",t.BOTTOM="bottom",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_RIGHT="bottom-right",t}({}),_=function(t){return t.CLOSE="M13.364 11.9497L17.6066 16.1924C17.9971 16.5829 17.9971 17.2161 17.6066 17.6066C17.2161 17.9971 16.5829 17.9971 16.1924 17.6066L11.9497 13.364L7.70711 17.6066C7.31658 17.9971 6.68342 17.9971 6.29289 17.6066C5.90237 17.2161 5.90237 16.5829 6.29289 16.1924L10.5355 11.9497L6.29289 7.70711C5.90237 7.31658 5.90237 6.68342 6.29289 6.29289C6.68342 5.90237 7.31658 5.90237 7.70711 6.29289L11.9497 10.5355L16.1924 6.29289C16.5829 5.90237 17.2161 5.90237 17.6066 6.29289C17.9971 6.68342 17.9971 7.31658 17.6066 7.70711L13.364 11.9497Z",t}(_||{});function E(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 x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,l=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return E(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)?E(t,e):void 0}}(t,e)||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.")}()}const C=KalturaPlayer.ui.preactHooks,w=KalturaPlayer.core;var T=r(379),I=r.n(T),O=r(37),R=r.n(O),k=r(575),P=r.n(k),N=r(216),S=r.n(N),L=r(740),D={attributes:{id:"@playkit-js/banner-overlay"}};D.setAttributes=P(),D.insert=function(t){window.kalturaGlobalConfig&&"string"==typeof window.kalturaGlobalConfig.stylesNonce&&t.setAttribute("nonce",window.kalturaGlobalConfig.stylesNonce),document.head.appendChild(t)},D.domAPI=R(),D.insertStyleElement=S(),I()(L.ZP,D),L.ZP&&L.ZP.locals&&L.ZP.locals;var M=t.ui.Components,j=M.Icon,B=M.Tooltip,U=(0,t.ui.preacti18n.withText)({closeBannerLabel:"bannerOverlay.closeBanner"})((function(t){var e=t.text,r=t.alignment,n=void 0===r?A.TOP_LEFT:r,i=t.allowWrapping,o=void 0===i||i,a=t.allowClose,s=void 0!==a&&a,u=t.onClose,l=t.closeBannerLabel,c=t.player,f=x((0,C.useState)(!1),2),p=f[0],h=f[1],d=x((0,C.useState)(!1),2),y=d[0],g=d[1],v=(0,C.useRef)(null),m=function(){if(!o&&v.current){var t=v.current,e=t.scrollWidth>t.clientWidth;h(e)}};(0,C.useEffect)((function(){m(),c&&!y&&(c.dispatchEvent(new w.FakeEvent("banner_message_displays")),g(!0))}),[o,c,y]),(0,C.useEffect)((function(){requestAnimationFrame(m)}),[e,o]);var E,T,I=function(){switch(n){case A.TOP:return L.we;case A.BOTTOM:return L.I;case A.TOP_LEFT:return L.w3;case A.TOP_RIGHT:return L.f6;case A.BOTTOM_LEFT:return L.Oq;case A.BOTTOM_RIGHT:return L.hT;default:return L.w3}}(),O=function(){switch(n){case A.TOP:case A.BOTTOM:return L.az;case A.TOP_RIGHT:case A.BOTTOM_RIGHT:return L.J_;case A.TOP_LEFT:case A.BOTTOM_LEFT:default:return L.Zh}}();return(0,b.h)("div",{"data-testid":"banner-overlay",className:"".concat(L.TD," ").concat(I),role:"status","aria-live":"polite","aria-label":e},(0,b.h)("div",{className:"".concat(L.Gj," ").concat(O)},(0,b.h)("div",{className:L.AR},(E=o?L.RC:L.eL,T=(0,b.h)("span",{ref:v,className:"".concat(L.Fb," ").concat(E)},e),!o&&p?(0,b.h)(B,{label:e,type:"top"},T):T)),s&&(0,b.h)("button",{className:L.Ah,onClick:function(){null==c||c.dispatchEvent(new w.FakeEvent("banner_message_manually_dismissed")),null==u||u()},"aria-live":"polite","aria-label":"".concat(l,": ").concat(e),tabIndex:0,"data-testid":"banner-close-button"},(0,b.h)(B,{label:l,type:"top"},(0,b.h)(j,{id:"banner-overlay-close-icon",path:_.CLOSE,viewBox:"0 0 25 25"})))))})),F=(0,t.ui.Components.withPlayer)((0,t.ui.Event.withEventManager)((function(t){var e=t.text,r=t.alignment,n=void 0===r?A.TOP_LEFT:r,i=t.allowWrapping,o=void 0===i||i,a=t.allowClose,s=void 0!==a&&a,u=t.duration,l=t.onClose,c=t.player,f=!0===o||"true"===o,p=!0===s||"true"===s,h=function(t){var e=t.duration,r=t.player,n=t.eventManager,i=t.onHide,o=t.onPlayerStarted,a=x((0,C.useState)(!0),2),s=a[0],u=a[1],l=x((0,C.useState)(!1),2),c=l[0],f=l[1],p=(0,C.useRef)(),h=function(){!c&&"unlimited"!==e&&"number"==typeof e&&e>0&&(f(!0),null==o||o(),p.current=setTimeout((function(){u(!1),i()}),1e3*e))};return(0,C.useEffect)((function(){if(!("unlimited"!==e&&"number"==typeof e&&e<0))return r&&n&&n.listenOnce(r,r.Event.Core.FIRST_PLAYING,h),function(){p.current&&clearTimeout(p.current)};u(!1)}),[r,n,e]),{isVisible:s,hasPlayerStarted:c,hide:function(){u(!1),i()}}}({duration:u,player:c,eventManager:t.eventManager,onHide:function(){null==l||l()}}),d=h.isVisible,y=h.hide;return d?(0,b.h)(U,{text:e,alignment:n,allowWrapping:f,allowClose:p,onClose:function(){y()},player:c}):null}))),V=r(341),G=l((function t(e){o(this,t),this.xml=e.xml}));function q(t,e,r){return e=p(e),f(t,H()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function H(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(H=function(){return!!t})()}var K=function(t){function e(t){var r;return o(this,e),g(c(r=q(this,e,[t])),"data",null),r.hasError||(r.totalCount=t.totalCount,1===r.totalCount&&(r.data=new G(t.objects[0]))),r}return y(e,t),l(e)}(t.providers.ResponseTypes.BaseServiceResult),W=function(){function t(e){var r=e.entryId,n=e.metadataProfileId;o(this,t),g(this,"_requests",[]),g(this,"_response",{metadata:null}),this._entryId=r,this._metadataProfileId=n;var i=new Map,a=new V.RequestBuilder(i);a.service="metadata_metadata",a.action="list",a.params={filter:{objectType:"KalturaMetadataFilter",metadataProfileIdEqual:this._metadataProfileId,metadataObjectTypeEqual:1,objectIdEqual:this._entryId}},this.requests.push(a)}return l(t,[{key:"requests",get:function(){return this._requests},set:function(t){this._requests=t}},{key:"response",get:function(){return this._response},set:function(t){var e,r=new K(null===(e=t[0])||void 0===e?void 0:e.data);r.totalCount&&(this._response.metadata=null==r?void 0:r.data)}},{key:"isValid",value:function(){return Boolean(this._entryId)&&Boolean(this._metadataProfileId)}}],[{key:"id",get:function(){return"metadata"}}]),t}(),Y=r(932);function $(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function X(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$(Object(r),!0).forEach((function(e){g(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function J(t,e,r){return e=p(e),f(t,Z()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function Z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Z=function(){return!!t})()}var z="unlimited",Q=function(e){function r(){var t;o(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return g(c(t=J(this,r,[].concat(n))),"initialConfig",null),g(c(t),"bannerComponent",null),t}var n,a;return y(r,e),l(r,[{key:"loadMedia",value:(a=i(m().mark((function t(){var e,r;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.info("BannerOverlay: loadMedia lifecycle hook called"),this.initialConfig=X({},this.config),e=!0,!this.useMetadata()){t.next=8;break}return t.next=6,this.getMetadataFromEntry();case 6:(r=t.sent)?(e=this.isValidBannerMetadata(r),r&&e&&this.updateConfigFromMetadata(r)):this.config.text="";case 8:this.removeBannerComponent(),this.config.text&&e&&this.addBannerComponent();case 10:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"addBannerComponent",value:function(){var e=this;this.bannerComponent&&this.removeBannerComponent();var r={label:"banner-overlay",area:t.ui.ReservedPresetAreas.InteractiveArea,presets:[t.ui.ReservedPresetNames.Playback,t.ui.ReservedPresetNames.Live,t.ui.ReservedPresetNames.Img,t.ui.ReservedPresetNames.Document],get:function(){return(0,b.h)(F,{text:e.config.text,alignment:e.config.alignment,allowWrapping:e.config.allowWrapping,allowClose:e.config.allowClose,duration:e.config.duration,onClose:e.handleBannerClose.bind(e),player:e.player})}};this.bannerComponent=this.player.ui.addComponent(r)}},{key:"handleBannerClose",value:function(){this.removeBannerComponent()}},{key:"removeBannerComponent",value:function(){try{var t;null===(t=this.bannerComponent)||void 0===t||t.call(this)}finally{this.bannerComponent=null}}},{key:"isBoolean",value:function(t){return"boolean"==typeof t}},{key:"isValidBannerMetadata",value:function(t){var e=Number(t.BannerDisplayDuration),r=t.BannerText&&t.BannerText.trim().length>0,n=!t.BannerWrap||this.isBoolean(t.BannerWrap),i=!t.BannerShowCloseButton||this.isBoolean(t.BannerShowCloseButton),o=!t.BannerAlignment||Object.values(A).includes(t.BannerAlignment),a=!0;return t.BannerDisplayDuration&&(a=t.BannerDisplayDuration===z||!isNaN(e)&&e>0),r&&n&&i&&o&&a}},{key:"getMetadataFromEntry",value:(n=i(m().mark((function t(){var e,r,n,i,o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.player.sources.id,n=(null===(e=this.player.config.session)||void 0===e?void 0:e.ks)||"",i=this.config.metadataProfileId,t.next=5,this.player.provider.doRequest([{loader:W,params:{entryId:r,metadataProfileId:i}}],n);case 5:return o=t.sent,t.abrupt("return",this.parseDataFromResponse(o));case 7:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"parseDataFromResponse",value:function(t){var e;if(t&&t.has(W.id)){var r,n,i=t.get(W.id);null!==(n=e=null==i||null===(r=i.response)||void 0===r?void 0:r.metadata)&&void 0!==n&&n.xml&&(e=(new Y.XMLParser).parse(e.xml).metadata)}return e}},{key:"updateConfigFromMetadata",value:function(t){this.config.text=t.BannerText,this.isBoolean(t.BannerWrap)?this.config.allowWrapping=t.BannerWrap:void 0===t.BannerWrap&&(this.config.allowWrapping=!0),this.isBoolean(t.BannerShowCloseButton)?this.config.allowClose=t.BannerShowCloseButton:void 0===t.BannerShowCloseButton&&(this.config.allowClose=!1),t.BannerAlignment?this.config.alignment=t.BannerAlignment:void 0===t.BannerAlignment&&(this.config.alignment=A.TOP_LEFT),t.BannerDisplayDuration?t.BannerDisplayDuration===z?this.config.duration=t.BannerDisplayDuration:this.config.duration=Number(t.BannerDisplayDuration):void 0===t.BannerDisplayDuration&&(this.config.duration=5)}},{key:"useMetadata",value:function(){return this.config.useConfigFromMetadata&&!!this.config.metadataProfileId}},{key:"reset",value:function(){this.logger.info("BannerOverlay: reset lifecycle hook called"),this.config=X({},this.initialConfig),this.removeBannerComponent()}},{key:"destroy",value:function(){this.removeBannerComponent(),h(p(r.prototype),"destroy",this).call(this),this.logger.info("BannerOverlay: destroy lifecycle hook called")}}],[{key:"isValid",value:function(){return!0}}]),r}(t.BasePlugin);g(Q,"defaultConfig",{text:"",duration:5,alignment:A.TOP_LEFT,allowWrapping:!0,allowClose:!1,useConfigFromMetadata:!1}),(0,t.registerPlugin)("bannerOverlay",Q)})(),n})()));
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("KalturaPlayer",[],e):"object"==typeof exports?exports.KalturaPlayer=e():(t.KalturaPlayer=t.KalturaPlayer||{},t.KalturaPlayer.plugins=t.KalturaPlayer.plugins||{},t.KalturaPlayer.plugins.bannerOverlay=e())}(self,(()=>(()=>{var t={341:t=>{self,t.exports=function(){var t={61:function(t,e,r){var n=r(698).default;function i(){"use strict";t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof A?e:A,o=Object.create(i.prototype),a=new S(n||[]);return s(o,"_invoke",{value:R(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var y="suspendedStart",g="suspendedYield",v="executing",m="completed",b={};function A(){}function _(){}function E(){}var x={};p(x,l,(function(){return this}));var C=Object.getPrototypeOf,w=C&&C(C(L([])));w&&w!==o&&a.call(w,l)&&(x=w);var T=E.prototype=A.prototype=Object.create(x);function I(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(i,o,s,u){var l=d(t[i],t,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==n(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(f).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(l.arg)}var i;s(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function R(t,r,n){var i=y;return function(o,a){if(i===v)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===y)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var l=d(t,r,n);if("normal"===l.type){if(i=n.done?m:g,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=m,n.method="throw",n.arg=l.arg)}}}function k(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,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;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,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function P(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[l];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(a.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(n(t)+" is not iterable")}return _.prototype=E,s(T,"constructor",{value:E,configurable:!0}),s(E,"constructor",{value:_,configurable:!0}),_.displayName=p(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,p(t,f,"GeneratorFunction")),t.prototype=Object.create(T),t},r.awrap=function(t){return{__await:t}},I(O.prototype),p(O.prototype,c,(function(){return this})),r.AsyncIterator=O,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new O(h(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},I(T),p(T,f,"Generator"),p(T,l,(function(){return this})),p(T,"toString",(function(){return"[object Generator]"})),r.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}},r.values=L,S.prototype={constructor:S,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(N),!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 t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){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 i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(o)},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),b},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),N(r),b}},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 i=n.arg;N(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},698:function(t){function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},687:function(t,e,r){var n=r(61)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return function(){"use strict";r.r(n),r.d(n,{NAME:function(){return Lt},Provider:function(){return St},ProviderParser:function(){return ut},RequestBuilder:function(){return ct},ResponseTypes:function(){return t},VERSION:function(){return Dt}});var t={};function e(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){return o="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},o(t)}function a(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===o(e)?e:String(e)}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function u(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}function p(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function d(t,e,r){return(e=a(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.r(t),r.d(t,{BaseServiceResult:function(){return C},KalturaAccessControlMessage:function(){return j},KalturaAccessControlModifyRequestHostRegexAction:function(){return R},KalturaBaseEntryListResponse:function(){return I},KalturaBumper:function(){return N},KalturaDrmPlaybackPluginData:function(){return k},KalturaFlavorAsset:function(){return S},KalturaMediaEntries:function(){return L},KalturaMediaEntry:function(){return T},KalturaMetadata:function(){return D},KalturaMetadataListResponse:function(){return M},KalturaPlaybackContext:function(){return B},KalturaPlaybackSource:function(){return P},KalturaPlaylist:function(){return U},KalturaRuleAction:function(){return O},KalturaUIConfResponse:function(){return F},KalturaUserEntry:function(){return V},KalturaUserEntryListResponse:function(){return G}});var y=r(687),g=r.n(y),v={get:function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}}},m={};function b(t){return v.get(t)}var A=b,_=function t(e){var r;return Array.isArray(e)?(r=e.length>0?e.slice(0):[]).forEach((function(e,n){("object"===o(e)||Array.isArray(e)&&e.length>0)&&(r[n]=t(e))})):"object"===o(e)?(r=Object.assign({},e),Object.keys(r).forEach((function(e){("object"===o(r[e])||Array.isArray(r[e])&&r[e].length>0)&&(r[e]=t(r[e]))}))):r=e,r},E={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0,loadThumbnailWithKs:!1,replaceHostOnlyManifestUrls:!1},x=function(){function t(){i(this,t)}return u(t,null,[{key:"set",value:function(t){null!=t&&t.overrideServiceUrl&&(t.serviceUrl=t.overrideServiceUrl),t&&Object.assign(E,t)}},{key:"get",value:function(){return _(E)}},{key:"serviceUrl",get:function(){return E.serviceUrl}}]),t}(),C=u((function t(e){i(this,t),d(this,"hasError",!1),"KalturaAPIException"===e.objectType?(this.hasError=!0,this.error=new w(e.code,e.message)):e.error&&"KalturaAPIException"===e.error.objectType?(this.hasError=!0,this.error=new w(e.error.code,e.error.message)):this.data=e})),w=u((function t(e,r){i(this,t),this.code=e,this.message=r})),T=u((function t(e){i(this,t),this.id=e.id,this.referenceId=e.referenceId,this.externalSourceType=e.externalSourceType,this.name=e.name,this.description=e.description,this.dataUrl=e.dataUrl,this.type=e.type,this.entryType=e.mediaType,this.flavorParamsIds=e.flavorParamsIds,this.duration=e.duration,this.poster=e.thumbnailUrl,this.rawThumbnailUrl=e.thumbnailUrl,this.status=e.status,this.dvrStatus=e.dvrStatus,this.tags=e.tags,this.adminTags=e.adminTags,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.creatorId=e.creatorId,this.userId=e.userId,this.endDate=e.endDate,this.plays=e.plays,this.views=e.views,this.downloadUrl=e.downloadUrl,this.rootEntryId=e.rootEntryId,this.capabilities=e.capabilities}));d(T,"EntryType",{AUTOMATIC:{value:-1},EXTERNAL_MEDIA:{value:"externalMedia.externalMedia"},MEDIA_CLIP:{value:1},MIX:{value:2},PLAYLIST:{value:5},DATA:{value:6},LIVE_STREAM:{value:7},LIVE_CHANNEL:{value:8},DOCUMENT:{value:10}}),d(T,"MediaType",{VIDEO:{value:1},IMAGE:{value:2},AUDIO:{value:5},LIVE_STREAM_FLASH:{value:201},LIVE_STREAM_WINDOWS_MEDIA:{value:202},LIVE_STREAM_REAL_MEDIA:{value:203},LIVE_STREAM_QUICK_TIME:{value:204}}),d(T,"EntryStatus",{ERROR_IMPORTING:-2,ERROR_CONVERTING:-1,SCAN_FAILURE:"virusScan.ScanFailure",IMPORT:0,INFECTED:"virusScan.Infected",PRECONVERT:1,READY:2,DELETED:3,PENDING:4,MODERATE:5,BLOCKED:6,NO_CONTENT:7}),d(T,"EntryModerationStatus",{PENDING_MODERATION:1,APPROVED:2,REJECTED:3,FLAGGED_FOR_REVIEW:4,MODERATE:5,AUTO_APPROVED:6});var I=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).hasError||(e.totalCount=t.totalCount,e.totalCount>0&&(e.entries=[],t.objects.map((function(t){return e.entries.push(new T(t))})))),e}return u(o)}(C),O=u((function t(e){i(this,t),this.type=e.type}));d(O,"Type",{DRM_POLICY:"drm.DRM_POLICY",BLOCK:1,PREVIEW:2,LIMIT_FLAVORS:3,ADD_TO_STORAGE:4,LIMIT_DELIVERY_PROFILES:5,SERVE_FROM_REMOTE_SERVER:6,REQUEST_HOST_REGEX:7,LIMIT_THUMBNAIL_CAPTURE:8,SCHEDULED_RESTRICTED:"SCHEDULED_RESTRICTED"});var R=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).pattern=t.pattern,e.replacement=t.replacement,e.replacmenServerNodeId=t.replacmenServerNodeId,e.checkAliveTimeoutMs=t.checkAliveTimeoutMs,e}return u(o)}(O),k=u((function t(e){i(this,t),this.scheme=e.scheme,this.licenseURL=e.licenseURL,this.certificate=e.certificate}));d(k,"Scheme",{"drm.PLAYREADY_CENC":"com.microsoft.playready","drm.WIDEVINE_CENC":"com.widevine.alpha","fairplay.FAIRPLAY":"com.apple.fairplay",WIDEVINE_CENC:"com.widevine.alpha",PLAYREADY_CENC:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"});var P=function(){function t(e){var r=this;i(this,t),d(this,"drm",[]),this.format=e.format,this.deliveryProfileId=e.deliveryProfileId,this.url=e.url,this.protocols=e.protocols,this.flavorIds=e.flavorIds,e.drm&&e.drm.map((function(t){return r.drm.push(new k(t))}))}return u(t,[{key:"hasDrmData",value:function(){return this.drm&&this.drm.length>0}},{key:"hasFlavorIds",value:function(){return!!this.flavorIds&&this.flavorIds.length>0}},{key:"getProtocol",value:function(t){var e="";if(this.protocols&&this.protocols.length>0)this.protocols.split(",").forEach((function(r){r===t&&(e=r)}));else if("http"===t)return t;return e}}]),t}(),N=u((function t(e){i(this,t),this.entryId=e.entryId,this.clickThroughUrl=e.url,this.sources=e.sources?e.sources.map((function(t){return new P(t)})):[]})),S=function(){function t(e){i(this,t),this.id=e.id,this.flavorParamsId=e.flavorParamsId,this.fileExt=e.fileExt,this.bitrate=e.bitrate,this.width=e.width,this.height=e.height,this.id=e.id,this.frameRate=e.frameRate,this.isOriginal=e.isOriginal,this.isWeb=e.isWeb,this.containerFormat=e.containerFormat,this.videoCodecId=e.videoCodecId,this.status=e.status,this.language=e.language,this.label=e.label,this.tags=t.parseTags(e.tags)}return u(t,null,[{key:"parseTags",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(",")}}]),t}();d(S,"Status",{ERROR:-1,QUEUED:0,CONVERTING:1,READY:2,DELETED:3,NOT_APPLICABLE:4,TEMP:5,WAIT_FOR_CONVERT:6,IMPORTING:7,VALIDATING:8,EXPORTING:9});var L=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).hasError||(e.entries=[],t.map((function(t){return e.entries.push(new T(t))}))),e}return u(o)}(C),D=u((function t(e){i(this,t),this.id=e.id,this.metadataProfileId=e.metadataProfileId,this.metadataProfileVersion=e.metadataProfileVersion,this.metadataProfileId=e.metadataProfileId,this.metadataObjectType=e.metadataObjectType,this.objectId=e.objectId,this.version=e.version,this.created=new Date(0),this.created.setUTCSeconds(e.createdAt),this.updated=new Date(0),this.updated.setUTCSeconds(e.updatedAt),this.status=e.status,this.xml=e.xml}));d(D,"ObjectType",{AD_CUE_POINT:"adCuePointMetadata.AdCuePoint",ANNOTATION:"annotationMetadata.Annotation",CODE_CUE_POINT:"codeCuePointMetadata.CodeCuePoint",THUMB_CUE_POINT:"thumbCuePointMetadata.thumbCuePoint",ENTRY:1,CATEGORY:2,USER:3,PARTNER:4,DYNAMIC_OBJECT:5}),d(D,"Status",{VALID:1,INVALID:2,DELETED:3});var M=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).hasError||(e.totalCount=t.totalCount,e.totalCount>0&&(e.metas=[],t.objects.map((function(t){return e.metas.push(new D(t))})))),e}return u(o)}(C),j=u((function t(e){i(this,t),this.message=e.message,this.code=e.code})),B=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;if(i(this,o),d(l(e=n.call(this,t)),"sources",[]),d(l(e),"actions",[]),d(l(e),"messages",[]),d(l(e),"flavorAssets",[]),d(l(e),"bumperData",[]),!e.hasError){var r=t.messages;r&&r.map((function(t){return e.messages.push(new j(t))}));var a=t.actions;a&&a.map((function(t){t.type===O.Type.REQUEST_HOST_REGEX?e.actions.push(new R(t)):e.actions.push(new O(t))}));var s=t.sources;s&&s.map((function(t){return e.sources.push(new P(t))}));var u=t.flavorAssets;u&&u.map((function(t){return e.flavorAssets.push(new S(t))}));var c=t.bumperData;c&&c.map((function(t){return e.bumperData.push(new N(t))})),t.activeLiveStreamTime&&(e.activeLiveStreamTime={startTime:t.activeLiveStreamTime.startTime,endTime:t.activeLiveStreamTime.endTime})}return e}return u(o,[{key:"hasBlockAction",value:function(){return void 0!==this.getBlockAction()}},{key:"getBlockAction",value:function(){return this.actions.find((function(t){return t.type===O.Type.BLOCK}))}},{key:"hasScheduledRestriction",value:function(){return this.messages.some((function(t){return t.code===O.Type.SCHEDULED_RESTRICTED}))}},{key:"getErrorMessages",value:function(){return this.messages}},{key:"getRequestHostRegexAction",value:function(){var t=this.actions.find((function(t){return t.type===O.Type.REQUEST_HOST_REGEX}));if(t instanceof R)return t}}]),o}(C),U=u((function t(e){i(this,t),this.id=e.id,this.name=e.name,this.description=e.description,this.poster=e.thumbnailUrl})),F=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).hasError||(e.name=t.name,e.description=t.description,e.objTypeAsString=t.objTypeAsString,e.width=t.width,e.height=t.height,e.htmlParams=t.htmlParams,e.swfUrl=t.swfUrl,e.confFilePath=t.confFilePath,e.confFile=t.confFile,e.confFileFeatures=t.confFileFeatures,e.config=t.config,e.confVars=t.confVars,e.useCdn=t.useCdn,e.tags=t.tags,e.swfUrlVersion=t.swfUrlVersion,e.created=new Date(0),e.created.setUTCSeconds(t.createdAt),e.updated=new Date(0),e.updated.setUTCSeconds(t.updatedAt),e.html5Url=t.description,e.version=t.description,e.partnerTags=t.description,e.objType=t.description,e.creationMode=t.description),e}return u(o)}(C);d(F,"Type",{PLAYER:1,CONTRIBUTION_WIZARD:2,SIMPLE_EDITOR:3,ADVANCED_EDITOR:4,PLAYLIST:5,APP_STUDIO:6,KRECORD:7,PLAYER_V3:8,KMC_ACCOUNT:9,KMC_ANALYTICS:10,KMC_CONTENT:11,KMC_DASHBOARD:12,KMC_LOGIN:13,PLAYER_SL:14,CLIENTSIDE_ENCODER:15,KMC_GENERAL:16,KMC_ROLES_AND_PERMISSIONS:17,CLIPPER:18,KSR:19,KUPLOAD:20,WEBCASTING:21}),d(F,"CreationMode",{WIZARD:2,ADVANCED:3});var V=u((function t(e){i(this,t),this.playlistLastEntryId=e.playlistLastEntryId,this.entryId=e.entryId,this.id=e.id,this.userId=e.userId,this.partnerId=e.partnerId,this.status=e.status,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt})),G=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t){var e;return i(this,o),(e=n.call(this,t)).hasError||(e.totalCount=t.totalCount,e.entries=[],e.totalCount>0&&t.objects.map((function(t){return e.entries.push(new V(t))}))),e}return u(o)}(C),q=function(){function t(){i(this,t)}return u(t,null,[{key:"build",value:function(t){var e=x.get(),r=e.serviceUrl.substr(0,e.serviceUrl.lastIndexOf("/")),n=t.partnerId,i=t.entryId,o=t.ks,a=t.uiConfId,s=t.format,u=t.protocol,l=t.extension,c=t.flavorIds;if(!r||isNaN(Number.parseInt(n))||!i||!s||!u)return"";var f=r;return r.endsWith("/")||(f+="/"),f+="p/"+n+"/sp/"+n+"00/playManifest/entryId/"+i+"/protocol/"+u+"/format/"+s,c?f+="/flavorIds/"+c:a&&(f+="/uiConfId/"+a),""!==o&&(f+="/ks/"+o),""!==l&&(f+="/a."+l),a&&""!==c&&(f+="?uiConfId="+a),f}}]),t}(),H=function(){function t(){i(this,t)}return u(t,null,[{key:"xmlToJson",value:function(t){var e={};if(1===t.nodeType){if(t.attributes.length>0){e["@attributes"]={};for(var r=0;r<t.attributes.length;r++){var n=t.attributes.item(r);e["@attributes"][n.nodeName]=n.nodeValue}}}else 3===t.nodeType&&(e=t.nodeValue);if(t.hasChildNodes())for(var i=0;i<t.childNodes.length;i++){var o=t.childNodes.item(i),a=o.nodeName;if(void 0===e[a])e[a]=this.xmlToJson(o);else{if(void 0===e[a].push){var s=e[a];e[a]=[],e[a].push(s)}e[a].push(this.xmlToJson(o))}}return e}}]),t}(),K={DASH:{name:"dash",mimeType:"application/dash+xml",pathExt:"mpd"},HLS:{name:"hls",mimeType:"application/x-mpegURL",pathExt:"m3u8"},WVM:{name:"wvm",mimeType:"video/wvm",pathExt:"wvm"},MP4:{name:"mp4",mimeType:"video/mp4",pathExt:"mp4"},MP3:{name:"mp3",mimeType:"audio/mpeg",pathExt:"mp3"}},W=new Map([["mpegdash",K.DASH],["applehttp",K.HLS],["url",K.MP4]]);function Y(t){var e=W.get(t);return!!e&&e.name===K.MP4.name}var $=function(){function t(){i(this,t),this.progressive=[],this.dash=[],this.hls=[],this.image=[],this.document=[]}return u(t,[{key:"map",value:function(t,e){if(e)switch(e.name){case K.MP4.name:this.progressive.push(t);break;case K.DASH.name:this.dash.push(t);break;case K.HLS.name:this.hls.push(t)}}},{key:"toJSON",value:function(){var t={progressive:[],dash:[],hls:[],image:[],document:[]};return this.progressive.forEach((function(e){return t.progressive.push(e.toJSON())})),this.hls.forEach((function(e){return t.hls.push(e.toJSON())})),this.dash.forEach((function(e){return t.dash.push(e.toJSON())})),t.image=this.image,t.document=this.document,t}}]),t}(),X=function(){function t(){i(this,t),this.metadata=new Map,this.sources=new $,this.type=t.Type.UNKNOWN}return u(t,[{key:"toJSON",value:function(){return{id:this.id,name:this.name,sources:this.sources.toJSON(),duration:this.duration,dvrStatus:this.dvrStatus,status:this.status,metadata:this.metadata,type:this.type,poster:this.poster,assetReferenceType:this.assetReferenceType,downloadUrl:this.downloadUrl,rawThumbnailUrl:this.rawThumbnailUrl,rootEntryId:this.rootEntryId,capabilities:this.capabilities}}}]),t}();d(X,"Type",{VOD:"Vod",LIVE:"Live",IMAGE:"Image",AUDIO:"Audio",UNKNOWN:"Unknown",DOCUMENT:"Document"}),d(X,"DvrStatus",{ON:1,OFF:0});var J=function(){function t(e,r,n){i(this,t),this.licenseUrl=e,this.scheme=r,n&&(this.certificate=n)}return u(t,[{key:"toJSON",value:function(){var t={licenseUrl:this.licenseUrl,scheme:this.scheme};return this.certificate&&(t.certificate=this.certificate),t}}]),t}(),Z=function(){function t(){i(this,t)}return u(t,[{key:"toJSON",value:function(){var t={id:this.id,url:this.url,mimetype:this.mimetype};return this.bandwidth&&(t.bandwidth=this.bandwidth),this.width&&(t.width=this.width),this.height&&(t.height=this.height),this.label&&(t.label=this.label),this.drmData&&this.drmData.length>0&&(t.drmData=[],this.drmData.forEach((function(e){Array.isArray(t.drmData)&&t.drmData.push(e.toJSON())}))),t}}]),t}(),z=u((function t(){i(this,t),this.items=[]})),Q=u((function t(){i(this,t),this.items=[]})),tt=u((function t(e){i(this,t),this.url=e.url,this.clickThroughUrl=e.clickThroughUrl})),et={SRT:"1",DFXP:"2",WEBVTT:"3",CAP:"4"},rt={3:"vtt",1:"srt"},nt=function(){function t(){i(this,t)}return u(t,null,[{key:"createConfig",value:function(t,e){return t.map((function(t){var r=t.url,n=rt[t.format];return[et.DFXP,et.CAP].includes(t.format)&&(r=t.webVttUrl,n=rt[et.WEBVTT]),r=st(r,e),{default:!!t.isDefault,type:n,language:t.languageCode,label:t.label,url:r}}))}}]),t}(),it=function(){function t(e){i(this,t),this.id=e.id,this.url=t.extractBaseThumbnailUrl(e.dataUrl),this.mimetype=""}return u(t,null,[{key:"extractBaseThumbnailUrl",value:function(t){return t.match(".+entry_id/[a-zA-Z0-9_]+/")[0].slice(0,-1)}}]),t}(),ot=u((function t(e){i(this,t),this.id=e.id,this.url=e.downloadUrl,this.thumbnailUrl=e.poster,this.mimetype=""})),at=function(){function t(){i(this,t)}return u(t,null,[{key:"getMediaEntry",value:function(e,r,n,i){var o=new X,a=i.entry,s=i.playBackContextResult,u=i.metadataListResult,l=s.sources;return o.activeLiveStreamTime=s.activeLiveStreamTime,o.sources=t._getParsedSources(l,e,r,n,a,s),t._fillBaseData(o,a,u,s),o.type!==X.Type.LIVE&&x.get().useApiCaptions&&s.data.playbackCaptions&&(o.sources.captions=nt.createConfig(s.data.playbackCaptions,e)),o}},{key:"addKsToUrl",value:function(t,e){var r;return e?(r=-1!==t.split("?")[0].replace(/^.*[\\/]/,"").indexOf(".")?-1===t.indexOf("?")?"?ks=":"&ks=":"/ks/",t+r+e):t}},{key:"getPlaylist",value:function(e){var r=new z,n=e.playlistData,i=e.playlistItems.entries,o=e.playlistUserEntries.entries;return r.id=n.id,r.name=n.name,r.description=n.description,r.poster=n.poster,r.playlistLastEntryId=o.map((function(t){return t.playlistLastEntryId}))[0],i.forEach((function(e){var n=new X;t._fillBaseData(n,e),r.items.push(n)})),r}},{key:"getEntryList",value:function(e){var r=new Q;return e.playlistItems.entries.forEach((function(e){var n=new X;t._fillBaseData(n,e),r.items.push(n)})),r}},{key:"getBumper",value:function(e,r,n){var i=e.playBackContextResult,o=i.bumperData[0];if(o){var a=(o&&o.sources).find((function(t){return Y(t.format)}));if(a){var s=t._parseProgressiveSources(a,i,r,n,0,o.entryId);if(s[0])return new tt({url:s[0].url,clickThroughUrl:o.clickThroughUrl})}}}},{key:"_fillBaseData",value:function(e,r,n,i){if(e.poster=r.poster,e.rawThumbnailUrl=r.rawThumbnailUrl,e.id=r.id,e.duration=r.duration,e.downloadUrl=r.downloadUrl||"",e.metadata=t._parseMetadata(n),e.metadata.description=r.description||"",e.metadata.entryId=r.id||"",e.metadata.name=r.name||"",r.createdAt&&(e.metadata.createdAt=r.createdAt),r.updatedAt&&(e.metadata.updatedAt=r.updatedAt),r.creatorId&&(e.metadata.creatorId=r.creatorId),r.userId&&(e.metadata.userId=r.userId),r.endDate&&(e.metadata.endDate=r.endDate),r.views&&(e.metadata.views=r.views),r.plays&&(e.metadata.plays=r.plays),e.metadata.tags=r.tags||"",e.metadata.adminTags=r.adminTags||"",e.status=r.status,e.rootEntryId=r.rootEntryId,e.capabilities=r.capabilities?r.capabilities.split(","):[],e.type=t._getEntryType(r.entryType,r.type),e.type===X.Type.LIVE&&(e.dvrStatus=r.dvrStatus),i&&i.flavorAssets[0]&&i.flavorAssets[0].width&&i.flavorAssets[0].height){var o=i.flavorAssets[0],a=o.height,s=o.width;e.metadata.aspectRatio=+Number(s/a).toFixed(2)}return i&&Array.isArray(i.flavorAssets)&&(e.metadata.audioFlavors=i.flavorAssets.filter((function(t){return t.bitrate&&!t.width&&!t.height}))),e}},{key:"_getEntryType",value:function(t,e){var r=X.Type.UNKNOWN;switch(t){case T.MediaType.IMAGE.value:r=X.Type.IMAGE;break;case T.MediaType.AUDIO.value:r=X.Type.AUDIO;break;default:switch(e){case T.EntryType.MEDIA_CLIP.value:r=X.Type.VOD;break;case T.EntryType.LIVE_STREAM.value:case T.EntryType.LIVE_CHANNEL.value:r=X.Type.LIVE;break;case T.EntryType.DOCUMENT.value:r=X.Type.DOCUMENT;break;default:r=X.Type.UNKNOWN}}return r}},{key:"_getParsedSources",value:function(e,r,n,i,o,a){var s,u,l=new $;return o.type===T.EntryType.EXTERNAL_MEDIA.value?((u=new Z).mimetype="video/youtube",u.url=o.referenceId,u.id=o.id+"_youtube",l.progressive.push(u)):o.entryType===T.MediaType.IMAGE.value?l.image.push(new it(o)):o.type===T.EntryType.DOCUMENT.value?l.document.push(new ot(o)):e&&e.length>0&&(e.filter((function(t){return!Y(t.format)})).forEach((function(e){var s=t._parseAdaptiveSource(e,a,r,n,i,o.id);if(s){var u=W.get(e.format);l.map(s,u)}})),s=e.find((function(e){return Y(e.format)&&""!==e.getProtocol(t._getBaseProtocol())})),l.progressive=t._parseProgressiveSources(s,a,r,n,i,o.id)),l}},{key:"_parseAdaptiveSource",value:function(e,r,n,i,o,a){var s=new Z;if(e){var u="",l=W.get(e.format),c=e.getProtocol(t._getBaseProtocol()),f=e.deliveryProfileId,p=e.format,h="";if(l&&(h=l.pathExt,s.mimetype=l.mimeType),e.hasFlavorIds()?(!h&&r.flavorAssets&&r.flavorAssets.length>0&&(h=r.flavorAssets[0].fileExt),u=q.build({entryId:a,flavorIds:e.flavorIds,format:p,ks:n,partnerId:i,uiConfId:o,extension:h,protocol:c})):u=t.addKsToUrl(e.url,n),!u){var d="failed to create play url from source, discarding source: (".concat(a,"_").concat(f,"), ").concat(p);return t._logger.warn(d),null}if(s.url=u,s.id=a+"_"+f+","+p,e.hasDrmData()){var y=[];e.drm.forEach((function(t){y.push(new J(t.licenseURL,k.Scheme[t.scheme],t.certificate))})),s.drmData=y}}return s}},{key:"_parseProgressiveSources",value:function(e,r,n,i,o,a){var s=[],u=[];if(e){var l=e.getProtocol(t._getBaseProtocol()),c=e.format,f=e.deliveryProfileId,p=f+","+c;r.flavorAssets.map((function(e){var r=new Z;r.id=e.id+p,r.mimetype="mp3"===e.fileExt?"audio/mp3":"video/mp4",r.height=e.height,r.width=e.width,r.bandwidth=1024*e.bitrate,r.label=e.label||e.language;var h=q.build({entryId:a,flavorIds:e.id,format:c,ks:n,partnerId:i,uiConfId:o,extension:e.fileExt,protocol:l});if(""===h)return t._logger.warn("failed to create play url from source, discarding source: (".concat(a,"_").concat(f,"), ").concat(c,".")),null;r.url=h,e.height&&e.width?s.push(r):u.push(r)}))}return u.length&&!s.length?u:s}},{key:"_parseMetadata",value:function(t){var e={};return t&&t.metas&&t.metas.length>0&&t.metas.forEach((function(t){if(t.xml){var r=new DOMParser;t.xml=t.xml.replace(/\r?\n|\r/g,""),t.xml=t.xml.replace(/>\s*/g,">"),t.xml=t.xml.replace(/>\s*/g,">");var n=r.parseFromString(t.xml,"text/xml"),i=H.xmlToJson(n);Object.keys(i.metadata).forEach((function(t){e[t]=i.metadata[t]["#text"]}))}})),e}},{key:"_getBaseProtocol",value:function(){var t=x.get(),e=/^https?:/.exec(t.cdnUrl),r=e?e[0]:document.location.protocol;return"string"==typeof r?r.slice(0,-1):"https"}},{key:"hasBlockAction",value:function(t){return t.playBackContextResult.hasBlockAction()}},{key:"getBlockAction",value:function(t){return t.playBackContextResult.getBlockAction()}},{key:"hasScheduledRestriction",value:function(t){return t.playBackContextResult.hasScheduledRestriction()}},{key:"getErrorMessages",value:function(t){return t.playBackContextResult.getErrorMessages()}}]),t}();d(at,"_logger",A("OVPProviderParser"));var st=at.addKsToUrl,ut=at,lt=u((function t(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};i(this,t),this.severity=e,this.category=r,this.code=n,this.data=o,t._logger.error("Category:".concat(r," | Code:").concat(n," |"),o)}));d(lt,"Severity",{RECOVERABLE:1,CRITICAL:2}),d(lt,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),d(lt,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,SCHEDULED_RESTRICTED:2003,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),d(lt,"_logger",A("Error"));var ct=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map;i(this,t),d(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),d(this,"_attemptCounter",1),this.headers=e}return u(t,[{key:"getUrl",value:function(t){return t+"/service/"+this.service+(this.action?"/action/"+this.action:"")}},{key:"doHttpRequest",value:function(){var t=this,e=new Promise((function(e,r){t._requestPromise={resolve:e,reject:r}}));return this.url||this._requestPromise.reject(new lt(lt.Severity.CRITICAL,lt.Category.NETWORK,lt.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),e}},{key:"_createXHR",value:function(){var t=this,e=new XMLHttpRequest;e.onreadystatechange=function(){if(4===e.readyState&&200===e.status)try{var r=JSON.parse(e.responseText);return t.responseHeaders=t._getResponseHeaders(e),t._requestPromise.resolve(r)}catch(r){t._requestPromise.reject(t._createError(e,lt.Code.BAD_SERVER_RESPONSE,{text:e.responseText}))}},e.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(e.timeout=this.retryConfig.timeout);var r=performance.now();e.ontimeout=function(){t._handleError(e,lt.Code.TIMEOUT,{timeout:(performance.now()-r)/1e3,statusText:e.statusText})},e.onerror=e.onabort=function(){t._handleError(e,lt.Code.HTTP_ERROR,{text:e.responseText,statusText:e.statusText})},this.headers.forEach((function(t,r){e.setRequestHeader(r,t)})),e.send(this.params)}},{key:"_getResponseHeaders",value:function(t){return t.getAllResponseHeaders().split("\n").filter((function(t){return 0===t.toLowerCase().indexOf("x-")}))}},{key:"_handleError",value:function(t,e,r){var n=this._createError(t,e,r);if(t.onreadystatechange=function(){},t.onerror=function(){},t.ontimeout=function(){},t.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(n);this._attemptCounter++,this._createXHR()}},{key:"_createError",value:function(t,e,r){return Object.assign(r,{url:this.url,headers:this._getResponseHeaders(t),attempt:this._attemptCounter}),new lt(lt.Severity.CRITICAL,lt.Category.NETWORK,e,r)}}]),t}(),ft=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){var t;i(this,o);for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return d(l(t=n.call.apply(n,[this].concat(r))),"requests",[]),t}return u(o,[{key:"add",value:function(t){this.requests.push(t);var e={},r={service:t.service,action:t.action};return Object.assign(e,d({},this.requests.length,Object.assign(r,t.params))),Object.assign(e,this.params),this.params=e,this}},{key:"execute",value:function(t){var e=this;return new Promise((function(r,n){try{e.params=JSON.stringify(e.params)}catch(t){o._logger.error("".concat(t.message)),n(new lt(lt.Severity.CRITICAL,lt.Category.PROVIDER,lt.Code.FAILED_PARSING_REQUEST,{error:t,params:e.params}))}e.doHttpRequest().then((function(i){var o=new pt(i,t);o.success?r({headers:e.responseHeaders,response:o}):n(new lt(lt.Severity.CRITICAL,lt.Category.NETWORK,lt.Code.MULTIREQUEST_API_ERROR,{url:e.url,headers:e.responseHeaders,results:o.results}))}),(function(t){n(t)}))}))}}]),o}(ct);d(ft,"_logger",A("MultiRequestBuilder"));var pt=u((function t(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];i(this,t),d(this,"results",[]);var n=e.result?e.result:e,o=(Array.isArray(n)?n:[n]).map((function(t){return new C(t)})),a=o.filter((function(t){return t.hasError}));a.forEach((function(e){t._logger.error("Service returned an error with error code: ".concat(e.error.code," and message: ").concat(e.error.message,"."))})),this.results=o,r&&a.length||a.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(t){return!t.hasError})),this.success=!0)}));d(pt,"_logger",A("MultiRequestResult"));var ht=function(){function t(){i(this,t)}return u(t,null,[{key:"getMultiRequest",value:function(t,e,r){var n=x.get(),i=n.serviceParams;Object.assign(i,{ks:e,clientTag:"html5:v"+t}),r&&Object.assign(i,{partnerId:r});var o=new Map;o.set("Content-Type","application/json");var a=new ft(o);return a.method="POST",a.service="multirequest",a.url=a.getUrl(n.serviceUrl),a.params=i,a}}]),t}(),dt=u((function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.type=e.type||t.Type.INCLUDE_FIELDS,this.fields=e.fields||"id,referenceId,name,description,thumbnailUrl,dataUrl,duration,msDuration,flavorParamsIds,mediaType,type,tags,dvrStatus,externalSourceType,status,createdAt,updatedAt,endDate,plays,views,downloadUrl,creatorId,userId,rootEntryId,capabilities,adminTags"}));d(dt,"Type",{INCLUDE_FIELDS:1,EXCLUDE_FIELDS:2});var yt="baseEntry",gt=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){return i(this,o),n.apply(this,arguments)}return u(o,null,[{key:"getPlaybackContext",value:function(t,e,r,n){var i=new Map;i.set("Content-Type","application/json");var o=new ct(i);o.service=yt,o.action="getPlaybackContext",o.method="POST",o.url=o.getUrl(t),o.tag="baseEntry-getPlaybackContext";var a={objectType:"KalturaContextDataParams",flavorTags:"all"};return n&&(a.referrer=n),o.params={entryId:r,ks:e,contextDataParams:a},o}},{key:"list",value:function(t,e,r,n,i){var a=new Map;a.set("Content-Type","application/json");var s=new ct(a);return s.service=yt,s.action="list",s.method="POST",s.url=s.getUrl(t),s.tag="list",s.params=o.getEntryListReqParams(r,e,n,i),s}},{key:"getEntryListReqParams",value:function(t,e,r,n){var i={};return t?i=r?{redirectFromEntryId:t}:{idEqual:t}:n&&(i={objectType:"KalturaBaseEntryFilter",referenceIdEqual:n}),{ks:e,filter:i,responseProfile:new dt}}}]),o}(ht),vt=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){return i(this,o),n.apply(this,arguments)}return u(o,null,[{key:"list",value:function(t,e,r){var n=new Map;n.set("Content-Type","application/json");var i=new ct(n);i.service="metadata_metadata",i.action="list",i.method="POST",i.url=i.getUrl(t),i.tag="metadata_metadata-list";var o={objectType:"KalturaMetadataFilter",objectIdEqual:r,metadataObjectTypeEqual:"1"};return i.params={filter:o,ks:e},i}}]),o}(ht),mt=function(){function t(e){i(this,t),d(this,"_response",{}),this.requests=this.buildRequests(e),this._entryId=e.entryId,this._referenceId=e.referenceId}return u(t,[{key:"requests",get:function(){return this._requests},set:function(t){this._requests=t}},{key:"response",get:function(){return this._response},set:function(t){var e=new I(t[0].data);this._response.entry=e.entries[0],this._response.playBackContextResult=new B(t[1].data),this._response.metadataListResult=new M(t[2].data)}},{key:"buildRequests",value:function(t){var e=x.get(),r=[];r.push(gt.list(e.serviceUrl,t.ks,t.entryId,t.redirectFromEntryId,t.referenceId));var n="{1:result:ks}"===t.ks?"{2:result:objects:0:id}":"{1:result:objects:0:id}";return r.push(gt.getPlaybackContext(e.serviceUrl,t.ks,n,t.referrer)),r.push(vt.list(e.serviceUrl,t.ks,n)),r}},{key:"isValid",value:function(){return!(!this._entryId&&!this._referenceId)}}],[{key:"id",get:function(){return"media"}}]),t}(),bt=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){return i(this,o),n.apply(this,arguments)}return u(o,null,[{key:"anonymousSession",value:function(t,e){var r=new Map;r.set("Content-Type","application/json");var n=new ct(r);return n.service="session",n.action="startWidgetSession",n.method="POST",n.url=n.getUrl(t),n.tag="session-startWidget",n.params={widgetId:e},n}}]),o}(ht),At=function(){function t(e){i(this,t),d(this,"_response",{}),this.requests=this.buildRequests(e),this._widgetId=e.widgetId}return u(t,[{key:"requests",get:function(){return this._requests},set:function(t){this._requests=t}},{key:"response",get:function(){return this._response.ks},set:function(t){this._response.ks=t[0].data.ks}},{key:"buildRequests",value:function(t){var e=x.get(),r=[];return r.push(bt.anonymousSession(e.serviceUrl,t.widgetId)),r}},{key:"isValid",value:function(){return!!this._widgetId}}],[{key:"id",get:function(){return"session"}}]),t}(),_t=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(t,e){var r,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=arguments.length>3?arguments[3]:void 0;return i(this,o),(r=n.call(this,s))._multiRequest=ht.getMultiRequest(t,a,e),r}return u(o)}(function(){function t(e){i(this,t),d(this,"_loadersResponseMap",new Map),d(this,"_loaders",new Map),this._networkRetryConfig=e}return u(t,[{key:"add",value:function(t,e,r){var n=this,i=new t(e);if(i.isValid()){this._loaders.set(t.id,i);var o=this._multiRequest.requests.length,a=i.requests;this._multiRequest.retryConfig=this._networkRetryConfig,a.forEach((function(t){t.params=t.params||{},t.params.ks=t.params.ks||r,n._multiRequest.add(t)}));var s=Array.from(new Array(a.length),(function(t,e){return e+o}));this._loadersResponseMap.set(t.id,s)}}},{key:"fetchData",value:function(t){var e=this;return new Promise((function(r,n){e._multiRequest.execute(t).then((function(t){e._multiResponse=t.response,e.prepareData(t.response).success?r(e._loaders):n(new lt(lt.Severity.CRITICAL,lt.Category.NETWORK,lt.Code.API_RESPONSE_MISMATCH,{headers:t.headers}))}),(function(t){n(t)}))}))}},{key:"prepareData",value:function(t){var e=this;return this._loaders.forEach((function(r,n){var i=e._loadersResponseMap.get(n);try{i&&i.length>0&&(r.response=t.results.slice(i[0],i[i.length-1]+1))}catch(t){return{success:!1,error:t}}})),{success:!0,data:this._loaders}}}]),t}()),Et="playlist",xt=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){return i(this,o),n.apply(this,arguments)}return u(o,null,[{key:"execute",value:function(t,e,r,n){var i=new Map;i.set("Content-Type","application/json");var o=new ct(i);o.service=Et,o.action="execute",o.method="POST",o.url=o.getUrl(t),o.tag="".concat(Et,"-execute");var a=new dt;return n&&(a.fields=a.fields+n),o.params={ks:e,id:r,responseProfile:a},o}},{key:"get",value:function(t,e,r){var n=new Map;n.set("Content-Type","application/json");var i=new ct(n);return i.service=Et,i.action="get",i.method="POST",i.url=i.getUrl(t),i.tag="".concat(Et,"-get"),i.params={ks:e,id:r,responseProfile:{fields:"id,name,description,thumbnailUrl",type:1}},i}},{key:"getLastEntryId",value:function(t,e,r){var n=new Map;n.set("Content-Type","application/json");var i=new ct(n);return i.service="userEntry",i.action="list",i.method="POST",i.url=i.getUrl(t),i.tag="userEntry-list",i.params={ks:e,filter:{objectType:"KalturaViewHistoryUserEntry",entryIdEqual:r,userIdEqualCurrent:1},responseProfile:{fields:"playlistLastEntryId",type:1}},i}}]),o}(ht),Ct=function(){function t(e){i(this,t),d(this,"_response",{}),this.requests=this.buildRequests(e),this._playlistId=e.playlistId}return u(t,[{key:"requests",get:function(){return this._requests},set:function(t){this._requests=t}},{key:"response",get:function(){return this._response},set:function(t){this._response.playlistData=new U(t[0].data),this._response.playlistItems=new L(t[1].data),this._response.playlistUserEntries=new G(t[2].data)}},{key:"buildRequests",value:function(t){var e=x.get(),r=[];return r.push(xt.get(e.serviceUrl,t.ks,t.playlistId)),r.push(xt.execute(e.serviceUrl,t.ks,t.playlistId,t.cacheToken)),r.push(xt.getLastEntryId(e.serviceUrl,t.ks,t.playlistId)),r}},{key:"isValid",value:function(){return!!this._playlistId}}],[{key:"id",get:function(){return"playlist"}}]),t}(),wt=function(){function t(e,r){i(this,t),d(this,"_networkRetryConfig",{async:!0,timeout:0,maxAttempts:4}),function(t){t&&"function"==typeof t.getLogger&&(v.get=t.getLogger),t&&t.LogLevel&&(m=t.LogLevel)}(e.logger),this._partnerId=e.partnerId,this._widgetId=e.widgetId,this._uiConfId=e.uiConfId,this._isAnonymous=!e.ks,this._ks=e.ks||"",this._playerVersion=r,this._referrer=e.referrer}return u(t,[{key:"partnerId",get:function(){return this._partnerId}},{key:"widgetId",get:function(){return this._widgetId||this.defaultWidgetId}},{key:"defaultWidgetId",get:function(){return"_"+this._partnerId}},{key:"uiConfId",get:function(){return this._uiConfId}},{key:"ks",get:function(){return this._ks},set:function(t){this._ks=t}},{key:"playerVersion",get:function(){return this._playerVersion}},{key:"isAnonymous",get:function(){return this._isAnonymous}},{key:"getMediaConfig",value:function(t){return Promise.reject(new lt(lt.Severity.CRITICAL,lt.Category.PROVIDER,lt.Code.METHOD_NOT_IMPLEMENTED,{message:"getMediaConfig method must be implement by the derived class"}))}},{key:"getPlaylistConfig",value:function(t){return Promise.reject(new lt(lt.Severity.CRITICAL,lt.Category.PROVIDER,lt.Code.METHOD_NOT_IMPLEMENTED,{message:"The provider does not support loading playlist by id"}))}},{key:"getEntryListConfig",value:function(t){return Promise.reject(new lt(lt.Severity.CRITICAL,lt.Category.PROVIDER,lt.Code.METHOD_NOT_IMPLEMENTED,{message:"The provider does not support loading entry list"}))}},{key:"_verifyHasSources",value:function(t){if(0===t.hls.concat(t.dash,t.progressive,t.image,t.document).length)throw new lt(lt.Severity.CRITICAL,lt.Category.SERVICE,lt.Code.MISSING_PLAY_SOURCE,{action:"",messages:"No play source for entry id: ".concat(t.id)})}},{key:"LogLevel",get:function(){return m}},{key:"getLogLevel",value:function(t){return function(t){return b(t).getLevel()}(t)}},{key:"setLogLevel",value:function(t,e){!function(t,e){b(e).setLevel(t)}(t,e)}}]),t}(),Tt=function(){function t(e){i(this,t),d(this,"_response",{playlistItems:{entries:[]}}),this.requests=this.buildRequests(e),this._entries=e.entries}return u(t,[{key:"requests",get:function(){return this._requests},set:function(t){this._requests=t}},{key:"response",get:function(){return this._response},set:function(t){var e,r=this;t.forEach((function(t){e=new I(t.data),r._response.playlistItems.entries.push(e.entries[0])}))}},{key:"buildRequests",value:function(t){var e=x.get(),r=[];return t.entries.forEach((function(n){r.push(gt.list(e.serviceUrl,t.ks,n.entryId||n,t.redirectFromEntryId,n.referenceId))})),r}},{key:"isValid",value:function(){return!(!this._entries||!this._entries.length)}}],[{key:"id",get:function(){return"entry_list"}}]),t}();function It(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 Ot(t){return function(t){if(Array.isArray(t))return It(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return It(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)?It(t,e):void 0}}(t)||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.")}()}var Rt=function(){function t(){i(this,t)}return u(t,null,[{key:"_applyRegexAction",value:function(t,e){if(t){var r=new RegExp(t.pattern,"i");if(e.match(r))return e.replace(r,t.replacement+"/")}return e}},{key:"_pingECDNAndReplaceHostUrls",value:function(e,r,n){return new Promise((function(i){var o=n+"/api_v3/service/system/action/ping/format/1",a=new XMLHttpRequest;a.open("GET",o),a.timeout=r.checkAliveTimeoutMs,a.onreadystatechange=function(){4===a.readyState&&(200===a.status&&t._replaceHostUrls(e,r),i(e))},a.ontimeout=function(){t._logger.warn("Got timeout while pinging the ECDN url. the ping url: ".concat(o)),i(e)},a.send()}))}},{key:"handleRegexAction",value:function(e,r){return new Promise((function(n){var i=x.get().cdnUrl,o=t._extractRegexActionFromData(r),a=t._getRegExp(o);i&&o&&a&&i.match(a)?o.checkAliveTimeoutMs>0?(t._logger.debug("executing ping request..."),t._pingECDNAndReplaceHostUrls(e,o,i.replace(a,o.replacement)).then(n)):(t._replaceHostUrls(e,o),n(e)):(t._logger.debug("exiting handleRegexAction - not applying regex action."),n(e))}))}},{key:"_replaceHostUrls",value:function(e,r){t._logger.debug("Starting to modify urls...");var n=e.sources,i=n.hls,o=n.dash,a=n.progressive,s=n.image;[].concat(Ot(i),Ot(o),Ot(a),Ot(s)).forEach((function(e){return e.url=t._applyRegexAction(r,e.url)})),x.get().replaceHostOnlyManifestUrls||(t._logger.debug("replaceHostOnlyManifestUrls flag is off - modifying captions and poster URLs"),n.captions&&n.captions.forEach((function(e){return e.url=t._applyRegexAction(r,e.url)})),"string"==typeof n.poster&&(n.poster=t._applyRegexAction(r,n.poster))),t._logger.debug("Finished modifying urls")}},{key:"_extractRegexActionFromData",value:function(t){var e;return null===(e=t.get(mt.id))||void 0===e||null===(e=e.response)||void 0===e?void 0:e.playBackContextResult.getRequestHostRegexAction()}},{key:"_getRegExp",value:function(t){if(t&&t.pattern&&t.replacement)return new RegExp(t.pattern,"i")}}]),t}();d(Rt,"_logger",A("RegexActionHandler"));var kt=Rt,Pt=function(t){f(o,t);var e,r,n=(e=o,r=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(t){return!1}}(),function(){var t,n=h(e);if(r){var i=h(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return p(this,t)});function o(){return i(this,o),n.apply(this,arguments)}return u(o,null,[{key:"get",value:function(t,e){var r=new Map;r.set("Content-Type","application/json");var n=new ct(r);return n.service="user",n.action="get",n.method="POST",n.url=n.getUrl(t),n.tag="user-get",n.params={ks:e,format:1},n}}]),o}(ht),Nt=function(){function t(e){i(this,t),this.id=e.id}return u(t,[{key:"isAnonymous",value:function(){return t.INVALID_IDS.includes(this.id)}}]),t}();d(Nt,"INVALID_IDS",["0","",null,void 0]);var St=function(t){f(c,t);var r,n,o,a,s=(o=c,a=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(t){return!1}}(),function(){var t,e=h(o);if(a){var r=h(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return p(this,t)});function c(t,e){var r;return i(this,c),d(l(r=s.call(this,t,e)),"_filterOptionsConfig",{redirectFromEntryId:!0}),d(l(r),"_retryAttempts",0),r._logger=A("OVPProvider"),x.set(t.env),r._setFilterOptionsConfig(t.filterOptions),r._vrTag=t.vrTag||"360",r._networkRetryConfig=Object.assign(r._networkRetryConfig,t.networkRetryParameters),r._isAnonymous=!r._ks||void 0,void 0===r._isAnonymous&&r.initializeUserResponse(x.serviceUrl,r._ks).then((function(){r._logger.info("User response initialized")})).catch((function(t){r._logger.error("Failed to initialize user response",t)})),r}return u(c,[{key:"env",get:function(){return x.get()}},{key:"initializeUserResponse",value:(r=g().mark((function t(e,r){var n,i,o;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=Pt.get(e,r)).params=JSON.stringify(n.params),t.next=4,n.doHttpRequest();case 4:i=t.sent,o=new Nt(i),this._isAnonymous=o.isAnonymous();case 7:case"end":return t.stop()}}),t,this)})),n=function(){var t=this,n=arguments;return new Promise((function(i,o){var a=r.apply(t,n);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))},function(t,e){return n.apply(this,arguments)})},{key:"getMediaConfig",value:function(t){var e=this;return t.ks&&(this.ks=t.ks),this._dataLoader=new _t(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(r,n){var i=t.entryId,o=t.referenceId;if(i||o){var a=e.ks;a||(a="{1:result:ks}",e._dataLoader.add(At,{widgetId:e.widgetId}));var s=e._getEntryRedirectFilter(t);return e._dataLoader.add(mt,{entryId:i,ks:a,redirectFromEntryId:s,referenceId:o,referrer:e._referrer}),e._dataLoader.fetchData().then((function(t){try{var i=e._parseDataFromResponse(t);kt.handleRegexAction(i,t).then(r)}catch(t){n(t)}}),(function(t){n(t)}))}n(new lt(lt.Severity.CRITICAL,lt.Category.PROVIDER,lt.Code.MISSING_MANDATORY_PARAMS,{message:"missing entry id"}))}))}},{key:"doRequest",value:function(t,e,r){var n=this,i=e||this.ks,o=new _t(this.playerVersion,this.partnerId,i,this._networkRetryConfig);return new Promise((function(e,a){return i||o.add(At,{widgetId:n.widgetId}),t.forEach((function(t){o.add(t.loader,t.params,i||"{1:result:ks}")})),o.fetchData(r).then((function(t){try{e(t)}catch(t){a(t)}}),(function(t){a(t)}))}))}},{key:"_getEntryRedirectFilter",value:function(t){return"boolean"==typeof t.redirectFromEntryId?t.redirectFromEntryId:"boolean"!=typeof this._filterOptionsConfig.redirectFromEntryId||this._filterOptionsConfig.redirectFromEntryId}},{key:"_setFilterOptionsConfig",value:function(t){t&&"boolean"==typeof t.redirectFromEntryId&&(this._filterOptionsConfig.redirectFromEntryId=t.redirectFromEntryId)}},{key:"_parseDataFromResponse",value:function(t){this._logger.debug("Data parsing started");var e={session:{isAnonymous:this._isAnonymous,partnerId:this.partnerId},sources:this._getDefaultSourcesObject(),plugins:{}};if(this.uiConfId&&(e.session.uiConfId=this.uiConfId),t){if(t.has(At.id)){var r=t.get(At.id);r&&r.response&&(e.session.ks=r.response,this.widgetId!==this.defaultWidgetId&&(this.ks=e.session.ks))}else e.session.ks=this.ks;if(t.has(mt.id)){var n=t.get(mt.id);if(n&&n.response){var i=n.response;if(ut.hasBlockAction(i))throw new lt(lt.Severity.CRITICAL,lt.Category.SERVICE,lt.Code.BLOCK_ACTION,{action:ut.getBlockAction(i),messages:ut.getErrorMessages(i)});if(ut.hasScheduledRestriction(i))throw new lt(lt.Severity.CRITICAL,lt.Category.SERVICE,lt.Code.SCHEDULED_RESTRICTED,{messages:ut.getErrorMessages(i)});var o=ut.getMediaEntry(this.ks,this.partnerId,this.uiConfId,i);Object.assign(e.sources,this._getSourcesObject(o)),this._verifyMediaStatus(o),this._verifyHasSources(e.sources);var a=ut.getBumper(i,this.ks,this.partnerId);a&&Object.assign(e.plugins,{bumper:a})}}}return this._logger.debug("Data parsing finished",e),e}},{key:"_verifyMediaStatus",value:function(t){if([T.EntryStatus.IMPORT,T.EntryStatus.PRECONVERT].includes(t.status))throw new lt(lt.Severity.CRITICAL,lt.Category.SERVICE,lt.Code.MEDIA_STATUS_NOT_READY,{messages:"Status of entry id ".concat(t.id," is ").concat(t.status," and is still being imported or converted"),data:{status}})}},{key:"getPlaylistConfig",value:function(t){var e=this;return t.ks&&(this.ks=t.ks),this._dataLoader=new _t(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(r,n){var i=t.playlistId;if(i){var o=e.ks;o||(o="{1:result:ks}",e._dataLoader.add(At,{widgetId:e.widgetId})),e._dataLoader.add(Ct,{playlistId:i,ks:o}),e._dataLoader.fetchData().then((function(i){try{e._handlePlaylistResponse(i,r,n,t)}catch(t){n(t)}}),(function(t){n(t)}))}else n({success:!1,data:"Missing mandatory parameter"})}))}},{key:"_handlePlaylistResponse",value:function(t,e,r,n){this._logger.debug("Handling playlist response",{attempt:this._retryAttempts+1,maxAttempts:10});var i=this._parsePlaylistDataFromResponse(t);i.items.length>0?this._handlePlaylistSuccess(i,e):this._handlePlaylistRetry(e,r,n)}},{key:"_handlePlaylistSuccess",value:function(t,e){this._logger.debug("Playlist items found",{itemsCount:t.items.length,totalAttempts:this._retryAttempts+1}),this._retryAttempts=0,e(t)}},{key:"_handlePlaylistRetry",value:function(t,e,r){this._retryAttempts>=10?this._handleMaxRetriesReached(e):(this._retryAttempts++,this._schedulePlaylistRetry(t,e,r))}},{key:"_handleMaxRetriesReached",value:function(t){this._logger.error("Max retry attempts reached - rejecting playlist",{maxAttempts:10}),this._retryAttempts=0,t(this._getPlaylistObject())}},{key:"_schedulePlaylistRetry",value:function(t,e,r){var n=this;setTimeout((function(){n._dataLoader=new _t(n.playerVersion,n.partnerId,n.ks,n._networkRetryConfig);var i=n.ks;i||(i="{1:result:ks}",n._dataLoader.add(At,{widgetId:n.widgetId}));var o={playlistId:r.playlistId,ks:i,cacheToken:",".repeat(n._retryAttempts)};n._dataLoader.add(Ct,o),n._dataLoader.fetchData().then((function(i){n._handlePlaylistResponse(i,t,e,r)}),(function(t){e(t)}))}),1e4)}},{key:"_parsePlaylistDataFromResponse",value:function(t){var e=this;this._logger.debug("Data parsing started");var r=this._getPlaylistObject();if(t&&t.has(Ct.id)){var n=t.get(Ct.id);if(n&&n.response){var i=ut.getPlaylist(n.response);r.id=i.id,r.poster=i.poster,r.metadata.name=i.name,r.metadata.description=i.description,r.playlistLastEntryId=i.playlistLastEntryId,i.items.forEach((function(t){return r.items.push({sources:e._getSourcesObject(t)})}))}}return this._logger.debug("Data parsing finished",r),r}},{key:"getEntryListConfig",value:function(t){var e=this;return t.ks&&(this.ks=t.ks),this._dataLoader=new _t(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(r,n){var i=t.entries;if(i&&i.length){var o=e.ks;o||(o="{1:result:ks}",e._dataLoader.add(At,{widgetId:e.widgetId}));var a=e._getEntryRedirectFilter(t);e._dataLoader.add(Tt,{entries:i,ks:o,redirectFromEntryId:a}),e._dataLoader.fetchData(!1).then((function(t){r(e._parseEntryListDataFromResponse(t))}),(function(t){n(t)}))}else n({success:!1,data:"Missing mandatory parameter"})}))}},{key:"_parseEntryListDataFromResponse",value:function(t){var e=this;this._logger.debug("Data parsing started");var r=this._getPlaylistObject();if(t&&t.has(Tt.id)){var n=t.get(Tt.id);n&&n.response&&ut.getEntryList(n.response).items.forEach((function(t){return r.items.push({sources:e._getSourcesObject(t)})}))}return this._logger.debug("Data parsing finished",r),r}},{key:"_getPlaylistObject",value:function(){return{id:"",metadata:{name:"",description:""},poster:"",playlistLastEntryId:"",items:[]}}},{key:"_getDefaultSourcesObject",value:function(){return{hls:[],dash:[],progressive:[],image:[],document:[],id:"",duration:0,type:X.Type.UNKNOWN,poster:"",rawThumbnailUrl:"",dvr:!1,vr:null,metadata:{name:"",description:"",tags:""}}}},{key:"_getSourcesObject",value:function(t){var e=this,r=this._getDefaultSourcesObject(),n=t.sources.toJSON();return r.hls=n.hls,r.dash=n.dash,r.progressive=n.progressive,r.image=n.image,r.document=n.document,r.id=t.id,r.duration=t.duration,r.type=t.type,r.dvr=!!t.dvrStatus,r.poster=t.poster,r.rawThumbnailUrl=t.rawThumbnailUrl,r.downloadUrl=t.downloadUrl,r.rootEntryId=t.rootEntryId,r.capabilities=t.capabilities,t.activeLiveStreamTime&&(r.activeLiveStreamTime=t.activeLiveStreamTime),t.sources.captions&&(r.captions=t.sources.captions),t.metadata&&"string"==typeof t.metadata.tags&&t.metadata.tags.split(",").some((function(t){return t.trim()===e._vrTag}))&&(r.vr={}),Object.assign(r.metadata,t.metadata),r}}]),c}(wt),Lt="@playkit-js/playkit-js-providers-ovp",Dt="2.44.1"}(),n}()},740:(t,e,r)=>{"use strict";r.d(e,{AR:()=>h,Ah:()=>g,Fb:()=>p,Gj:()=>u,I:()=>m,J_:()=>f,Oq:()=>_,RC:()=>y,TD:()=>s,ZP:()=>x,Zh:()=>c,az:()=>l,eL:()=>d,f6:()=>A,hT:()=>E,w3:()=>b,we:()=>v});var n=r(537),i=r.n(n),o=r(645),a=r.n(o)()(i());a.push([t.id,'.playkit-banner-overlay__banner-overlay__banner-overlay{position:absolute;pointer-events:none;width:100%;padding:4px 8px}.playkit-banner-overlay__banner-overlay__banner-content{display:flex;border-radius:var(--Roundness-2, 8px);background:var(--B-40, rgba(0, 0, 0, 0.4));padding:4px 8px;gap:8px;color:#fff;font-size:16px;font-family:"Lato",sans-serif;font-style:normal;font-weight:400;line-height:150%;box-sizing:border-box;backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);pointer-events:auto;box-shadow:0 4px 4px rgba(0,0,0,.25);overflow:visible;text-shadow:0 4px 4px rgba(0,0,0,.25)}.playkit-banner-overlay__banner-overlay__content-center{justify-content:center;text-align:center}.playkit-banner-overlay__banner-overlay__content-left{justify-content:flex-start;text-align:left}.playkit-banner-overlay__banner-overlay__content-right{justify-content:flex-end;text-align:right}.playkit-banner-overlay__banner-overlay__banner-text{display:block;width:100%;margin:0}.playkit-banner-overlay__banner-overlay__text-container{flex:1 1 auto;min-width:0;overflow:visible}.playkit-banner-overlay__banner-overlay__text-truncated{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.playkit-banner-overlay__banner-overlay__text-wrapping{word-wrap:break-word;word-break:break-word}.playkit-banner-overlay__banner-overlay__close-button{background:none;border:none;color:#fff;font-size:20px;width:24px;height:24px;cursor:pointer;opacity:.9;transition:opacity .2s ease;flex:0 0 auto;display:flex;justify-content:center}.playkit-banner-overlay__banner-overlay__close-button:hover{opacity:1}.playkit-banner-overlay__banner-overlay__close-button:focus{outline:1px solid rgba(255,255,255,.5);outline-offset:2px}.playkit-banner-overlay__banner-overlay__top{top:0;left:50%;transform:translateX(-50%)}.playkit-banner-overlay__banner-overlay__bottom{bottom:0;left:50%;transform:translateX(-50%)}.playkit-banner-overlay__banner-overlay__top-left{top:0;left:0}.playkit-banner-overlay__banner-overlay__top-right{top:0;right:0}.playkit-banner-overlay__banner-overlay__bottom-left{bottom:0;left:0}.playkit-banner-overlay__banner-overlay__bottom-right{bottom:0;right:0}@media(max-width: 480px){.playkit-banner-overlay__banner-overlay__banner-content{font-size:14px;padding:4px 6px}}',"",{version:3,sources:["webpack://./src/components/banner-overlay/banner-overlay.scss"],names:[],mappings:"AAAA,wDACE,iBAAA,CACA,mBAAA,CACA,UAAA,CACA,eAAA,CAGF,wDACE,YAAA,CACA,qCAAA,CACA,0CAAA,CACA,eAAA,CACA,OAAA,CACA,UAAA,CACA,cAAA,CACA,6BAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA,CACA,qBAAA,CACA,yBAAA,CACA,iCAAA,CACA,mBAAA,CACA,oCAAA,CACA,gBAAA,CACA,qCAAA,CAGF,wDACE,sBAAA,CACA,iBAAA,CAGF,sDACE,0BAAA,CACA,eAAA,CAGF,uDACE,wBAAA,CACA,gBAAA,CAGF,qDACE,aAAA,CACA,UAAA,CACA,QAAA,CAGF,wDACE,aAAA,CACA,WAAA,CACA,gBAAA,CAGF,wDACE,eAAA,CACA,kBAAA,CACA,sBAAA,CAGF,uDACE,oBAAA,CACA,qBAAA,CAGF,sDACE,eAAA,CACA,WAAA,CACA,UAAA,CACA,cAAA,CACA,UAAA,CACA,WAAA,CACA,cAAA,CACA,UAAA,CACA,2BAAA,CACA,aAAA,CAEA,YAAA,CACA,sBAAA,CAEA,4DACE,SAAA,CAGF,4DACE,sCAAA,CACA,kBAAA,CAIJ,6CACE,KAAA,CACA,QAAA,CACA,0BAAA,CAGF,gDACE,QAAA,CACA,QAAA,CACA,0BAAA,CAGF,kDACE,KAAA,CACA,MAAA,CAGF,mDACE,KAAA,CACA,OAAA,CAGF,qDACE,QAAA,CACA,MAAA,CAGF,sDACE,QAAA,CACA,OAAA,CAGF,yBACE,wDACE,cAAA,CACA,eAAA,CAAA",sourcesContent:[".banner-overlay {\n position: absolute;\n pointer-events: none;\n width: 100%;\n padding: 4px 8px;\n}\n\n.banner-content {\n display: flex;\n border-radius: var(--Roundness-2, 8px);\n background: var(--B-40, rgba(0, 0, 0, 0.40));\n padding: 4px 8px;\n gap: 8px;\n color: #FFFFFF;\n font-size: 16px;\n font-family: 'Lato', sans-serif;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n box-sizing: border-box;\n backdrop-filter: blur(2px);\n -webkit-backdrop-filter: blur(2px);\n pointer-events: auto;\n box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);\n overflow: visible;\n text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);\n}\n\n.content-center {\n justify-content: center;\n text-align: center;\n}\n\n.content-left {\n justify-content: flex-start;\n text-align: left;\n}\n\n.content-right {\n justify-content: flex-end;\n text-align: right;\n}\n\n.banner-text {\n display: block;\n width: 100%;\n margin: 0;\n}\n\n.text-container {\n flex: 1 1 auto;\n min-width: 0;\n overflow: visible;\n}\n\n.text-truncated {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.text-wrapping {\n word-wrap: break-word;\n word-break: break-word;\n}\n\n.close-button {\n background: none;\n border: none;\n color: #FFFFFF;\n font-size: 20px;\n width: 24px;\n height: 24px;\n cursor: pointer;\n opacity: 0.9;\n transition: opacity 0.2s ease;\n flex: 0 0 auto;\n\n display: flex;\n justify-content: center;\n\n &:hover {\n opacity: 1;\n }\n\n &:focus {\n outline: 1px solid rgba(255, 255, 255, 0.5);\n outline-offset: 2px;\n }\n}\n\n.top {\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.bottom {\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.top-left {\n top: 0;\n left: 0;\n}\n\n.top-right {\n top: 0;\n right: 0;\n}\n\n.bottom-left {\n bottom: 0;\n left: 0;\n}\n\n.bottom-right {\n bottom: 0;\n right: 0;\n}\n\n@media (max-width: 480px) {\n .banner-content {\n font-size: 14px;\n padding: 4px 6px;\n }\n}"],sourceRoot:""}]);var s="playkit-banner-overlay__banner-overlay__banner-overlay",u="playkit-banner-overlay__banner-overlay__banner-content",l="playkit-banner-overlay__banner-overlay__content-center",c="playkit-banner-overlay__banner-overlay__content-left",f="playkit-banner-overlay__banner-overlay__content-right",p="playkit-banner-overlay__banner-overlay__banner-text",h="playkit-banner-overlay__banner-overlay__text-container",d="playkit-banner-overlay__banner-overlay__text-truncated",y="playkit-banner-overlay__banner-overlay__text-wrapping",g="playkit-banner-overlay__banner-overlay__close-button",v="playkit-banner-overlay__banner-overlay__top",m="playkit-banner-overlay__banner-overlay__bottom",b="playkit-banner-overlay__banner-overlay__top-left",A="playkit-banner-overlay__banner-overlay__top-right",_="playkit-banner-overlay__banner-overlay__bottom-left",E="playkit-banner-overlay__banner-overlay__bottom-right";const x=a},645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);n&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),e.push(c))}},e}},537:t=>{"use strict";t.exports=function(t){var e=t[1],r=t[3];if(!r)return e;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),o="/*# ".concat(i," */");return[e].concat([o]).join("\n")}return[e].join("\n")}},932:(t,e,r)=>{"use strict";const n=r(501),i=r(844),o=r(192);t.exports={XMLParser:i,XMLValidator:n,XMLBuilder:o}},694:t=>{t.exports=function(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const r of t){if("string"==typeof r&&e===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}}:()=>!1}},849:(t,e)=>{"use strict";const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+r+"]["+r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+n+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,r){if(e){const n=Object.keys(e),i=n.length;for(let o=0;o<i;o++)t[n[o]]="strict"===r?[e[n[o]]]:e[n[o]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(t){return!(null==i.exec(t))},e.getAllMatches=function(t,e){const r=[];let n=e.exec(t);for(;n;){const i=[];i.startIndex=e.lastIndex-n[0].length;const o=n.length;for(let t=0;t<o;t++)i.push(n[t]);r.push(i),n=e.exec(t)}return r},e.nameRegexp=n},501:(t,e,r)=>{"use strict";const n=r(849),i={allowBooleanAttributes:!1,unpairedTags:[]};function o(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function a(t,e){const r=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const n=t.substr(r,e-r);if(e>5&&"xml"===n)return d("InvalidXml","XML declaration allowed only at the start of the document.",g(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function s(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let r=1;for(e+=8;e<t.length;e++)if("<"===t[e])r++;else if(">"===t[e]&&(r--,0===r))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}e.validate=function(t,e){e=Object.assign({},i,e);const r=[];let u=!1,l=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let i=0;i<t.length;i++)if("<"===t[i]&&"?"===t[i+1]){if(i+=2,i=a(t,i),i.err)return i}else{if("<"!==t[i]){if(o(t[i]))continue;return d("InvalidChar","char '"+t[i]+"' is not expected.",g(t,i))}{let y=i;if(i++,"!"===t[i]){i=s(t,i);continue}{let v=!1;"/"===t[i]&&(v=!0,i++);let m="";for(;i<t.length&&">"!==t[i]&&" "!==t[i]&&"\t"!==t[i]&&"\n"!==t[i]&&"\r"!==t[i];i++)m+=t[i];if(m=m.trim(),"/"===m[m.length-1]&&(m=m.substring(0,m.length-1),i--),f=m,!n.isName(f)){let e;return e=0===m.trim().length?"Invalid space after '<'.":"Tag '"+m+"' is an invalid name.",d("InvalidTag",e,g(t,i))}const b=c(t,i);if(!1===b)return d("InvalidAttr","Attributes for '"+m+"' have open quote.",g(t,i));let A=b.value;if(i=b.index,"/"===A[A.length-1]){const r=i-A.length;A=A.substring(0,A.length-1);const n=p(A,e);if(!0!==n)return d(n.err.code,n.err.msg,g(t,r+n.err.line));u=!0}else if(v){if(!b.tagClosed)return d("InvalidTag","Closing tag '"+m+"' doesn't have proper closing.",g(t,i));if(A.trim().length>0)return d("InvalidTag","Closing tag '"+m+"' can't have attributes or invalid starting.",g(t,y));if(0===r.length)return d("InvalidTag","Closing tag '"+m+"' has not been opened.",g(t,y));{const e=r.pop();if(m!==e.tagName){let r=g(t,e.tagStartPos);return d("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+m+"'.",g(t,y))}0==r.length&&(l=!0)}}else{const n=p(A,e);if(!0!==n)return d(n.err.code,n.err.msg,g(t,i-A.length+n.err.line));if(!0===l)return d("InvalidXml","Multiple possible root nodes found.",g(t,i));-1!==e.unpairedTags.indexOf(m)||r.push({tagName:m,tagStartPos:y}),u=!0}for(i++;i<t.length;i++)if("<"===t[i]){if("!"===t[i+1]){i++,i=s(t,i);continue}if("?"!==t[i+1])break;if(i=a(t,++i),i.err)return i}else if("&"===t[i]){const e=h(t,i);if(-1==e)return d("InvalidChar","char '&' is not expected.",g(t,i));i=e}else if(!0===l&&!o(t[i]))return d("InvalidXml","Extra text at the end",g(t,i));"<"===t[i]&&i--}}}var f;return u?1==r.length?d("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",g(t,r[0].tagStartPos)):!(r.length>0)||d("InvalidXml","Invalid '"+JSON.stringify(r.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):d("InvalidXml","Start tag expected.",1)};const u='"',l="'";function c(t,e){let r="",n="",i=!1;for(;e<t.length;e++){if(t[e]===u||t[e]===l)""===n?n=t[e]:n!==t[e]||(n="");else if(">"===t[e]&&""===n){i=!0;break}r+=t[e]}return""===n&&{value:r,index:e,tagClosed:i}}const f=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(t,e){const r=n.getAllMatches(t,f),i={};for(let t=0;t<r.length;t++){if(0===r[t][1].length)return d("InvalidAttr","Attribute '"+r[t][2]+"' has no space in starting.",v(r[t]));if(void 0!==r[t][3]&&void 0===r[t][4])return d("InvalidAttr","Attribute '"+r[t][2]+"' is without value.",v(r[t]));if(void 0===r[t][3]&&!e.allowBooleanAttributes)return d("InvalidAttr","boolean attribute '"+r[t][2]+"' is not allowed.",v(r[t]));const n=r[t][2];if(!y(n))return d("InvalidAttr","Attribute '"+n+"' is an invalid name.",v(r[t]));if(i.hasOwnProperty(n))return d("InvalidAttr","Attribute '"+n+"' is repeated.",v(r[t]));i[n]=1}return!0}function h(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let r=/\d/;for("x"===t[e]&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(r))break}return-1}(t,++e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(";"===t[e])break;return-1}return e}function d(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function y(t){return n.isName(t)}function g(t,e){const r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function v(t){return t.startIndex+t[1].length}},192:(t,e,r)=>{"use strict";const n=r(592),i=r(694),o={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function a(t){this.options=Object.assign({},o,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=i(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=l),this.processTextOrObjNode=s,this.options.format?(this.indentate=u,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function s(t,e,r,n){const i=this.j2x(t,r+1,n.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}function u(t){return this.options.indentBy.repeat(t)}function l(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}a.prototype.build=function(t){return this.options.preserveOrder?n(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},a.prototype.j2x=function(t,e,r){let n="",i="";const o=r.join(".");for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a))if(void 0===t[a])this.isAttribute(a)&&(i+="");else if(null===t[a])this.isAttribute(a)||a===this.options.cdataPropName?i+="":"?"===a[0]?i+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if(t[a]instanceof Date)i+=this.buildTextValNode(t[a],a,"",e);else if("object"!=typeof t[a]){const r=this.isAttribute(a);if(r&&!this.ignoreAttributesFn(r,o))n+=this.buildAttrPairStr(r,""+t[a]);else if(!r)if(a===this.options.textNodeName){let e=this.options.tagValueProcessor(a,""+t[a]);i+=this.replaceEntitiesValue(e)}else i+=this.buildTextValNode(t[a],a,"",e)}else if(Array.isArray(t[a])){const n=t[a].length;let o="",s="";for(let u=0;u<n;u++){const n=t[a][u];if(void 0===n);else if(null===n)"?"===a[0]?i+=this.indentate(e)+"<"+a+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+a+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const t=this.j2x(n,e+1,r.concat(a));o+=t.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(s+=t.attrStr)}else o+=this.processTextOrObjNode(n,a,e,r);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(a,n);t=this.replaceEntitiesValue(t),o+=t}else o+=this.buildTextValNode(n,a,"",e)}this.options.oneListGroup&&(o=this.buildObjectNode(o,a,s,e)),i+=o}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){const e=Object.keys(t[a]),r=e.length;for(let i=0;i<r;i++)n+=this.buildAttrPairStr(e[i],""+t[a][e[i]])}else i+=this.processTextOrObjNode(t[a],a,e,r);return{attrStr:n,val:i}},a.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},a.prototype.buildObjectNode=function(t,e,r,n){if(""===t)return"?"===e[0]?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,o="";return"?"===e[0]&&(o="?",i=""),!r&&""!==r||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===o.length?this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(n)+"<"+e+r+o+this.tagEndChar+t+this.indentate(n)+i:this.indentate(n)+"<"+e+r+o+">"+t+i}},a.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},a.prototype.buildTextValNode=function(t,e,r,n){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(n)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),""===i?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"</"+e+this.tagEndChar}},a.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t},t.exports=a},592:t=>{function e(t,a,s,u){let l="",c=!1;for(let f=0;f<t.length;f++){const p=t[f],h=r(p);if(void 0===h)continue;let d="";if(d=0===s.length?h:`${s}.${h}`,h===a.textNodeName){let t=p[h];i(d,a)||(t=a.tagValueProcessor(h,t),t=o(t,a)),c&&(l+=u),l+=t,c=!1;continue}if(h===a.cdataPropName){c&&(l+=u),l+=`<![CDATA[${p[h][0][a.textNodeName]}]]>`,c=!1;continue}if(h===a.commentPropName){l+=u+`\x3c!--${p[h][0][a.textNodeName]}--\x3e`,c=!0;continue}if("?"===h[0]){const t=n(p[":@"],a),e="?xml"===h?"":u;let r=p[h][0][a.textNodeName];r=0!==r.length?" "+r:"",l+=e+`<${h}${r}${t}?>`,c=!0;continue}let y=u;""!==y&&(y+=a.indentBy);const g=u+`<${h}${n(p[":@"],a)}`,v=e(p[h],a,d,y);-1!==a.unpairedTags.indexOf(h)?a.suppressUnpairedNode?l+=g+">":l+=g+"/>":v&&0!==v.length||!a.suppressEmptyNode?v&&v.endsWith(">")?l+=g+`>${v}${u}</${h}>`:(l+=g+">",v&&""!==u&&(v.includes("/>")||v.includes("</"))?l+=u+a.indentBy+v+u:l+=v,l+=`</${h}>`):l+=g+"/>",c=!0}return l}function r(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(t.hasOwnProperty(n)&&":@"!==n)return n}}function n(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let i=e.attributeValueProcessor(n,t[n]);i=o(i,e),!0===i&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${i}"`}return r}function i(t,e){let r=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function o(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){const n=e.entities[r];t=t.replace(n.regex,n.val)}return t}t.exports=function(t,r){let n="";return r.format&&r.indentBy.length>0&&(n="\n"),e(t,r,"",n)}},780:(t,e,r)=>{const n=r(849);function i(t,e){let r="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)r+=t[e];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=t[e++];let i="";for(;e<t.length&&t[e]!==n;e++)i+=t[e];return[r,i,e]}function o(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function a(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function s(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function u(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function l(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function c(t){if(n.isName(t))return t;throw new Error(`Invalid entity name ${t}`)}t.exports=function(t,e){const r={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let n=1,f=!1,p=!1,h="";for(;e<t.length;e++)if("<"!==t[e]||p)if(">"===t[e]){if(p?"-"===t[e-1]&&"-"===t[e-2]&&(p=!1,n--):n--,0===n)break}else"["===t[e]?f=!0:h+=t[e];else{if(f&&a(t,e)){let n,o;e+=7,[n,o,e]=i(t,e+1),-1===o.indexOf("&")&&(r[c(n)]={regx:RegExp(`&${n};`,"g"),val:o})}else if(f&&s(t,e))e+=8;else if(f&&u(t,e))e+=8;else if(f&&l(t,e))e+=9;else{if(!o)throw new Error("Invalid DOCTYPE");p=!0}n++,h=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:e}}},745:(t,e)=>{const r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t}};e.buildOptions=function(t){return Object.assign({},r,t)},e.defaultOptions=r},78:(t,e,r)=>{"use strict";const n=r(849),i=r(311),o=r(780),a=r(153),s=r(694);function u(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function l(t,e,r,n,i,o,a){if(void 0!==t&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){a||(t=this.replaceEntitiesValue(t));const n=this.options.tagValueProcessor(e,t,r,i,o);return null==n?t:typeof n!=typeof t||n!==t?n:this.options.trimValues||t.trim()===t?_(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function c(t){if(this.options.removeNSPrefix){const e=t.split(":"),r="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=r+e[1])}return t}const f=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function p(t,e,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const r=n.getAllMatches(t,f),i=r.length,o={};for(let t=0;t<i;t++){const n=this.resolveNameSpace(r[t][1]);if(this.ignoreAttributesFn(n,e))continue;let i=r[t][4],a=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const t=this.options.attributeValueProcessor(n,i,e);o[a]=null==t?i:typeof t!=typeof i||t!==i?t:_(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[a]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=o,t}return o}}const h=function(t){t=t.replace(/\r\n?/g,"\n");const e=new i("!xml");let r=e,n="",a="";for(let s=0;s<t.length;s++)if("<"===t[s])if("/"===t[s+1]){const e=m(t,">",s,"Closing Tag is not closed.");let i=t.substring(s+2,e).trim();if(this.options.removeNSPrefix){const t=i.indexOf(":");-1!==t&&(i=i.substr(t+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),r&&(n=this.saveTextToParentTag(n,r,a));const o=a.substring(a.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let u=0;o&&-1!==this.options.unpairedTags.indexOf(o)?(u=a.lastIndexOf(".",a.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=a.lastIndexOf("."),a=a.substring(0,u),r=this.tagsNodeStack.pop(),n="",s=e}else if("?"===t[s+1]){let e=b(t,s,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,a),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new i(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,a,e.tagName)),this.addChild(r,t,a)}s=e.closeIndex+1}else if("!--"===t.substr(s+1,3)){const e=m(t,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){const i=t.substring(s+4,e-2);n=this.saveTextToParentTag(n,r,a),r.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}s=e}else if("!D"===t.substr(s+1,2)){const e=o(t,s);this.docTypeEntities=e.entities,s=e.i}else if("!["===t.substr(s+1,2)){const e=m(t,"]]>",s,"CDATA is not closed.")-2,i=t.substring(s+9,e);n=this.saveTextToParentTag(n,r,a);let o=this.parseTextData(i,r.tagname,a,!0,!1,!0,!0);null==o&&(o=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):r.add(this.options.textNodeName,o),s=e+2}else{let o=b(t,s,this.options.removeNSPrefix),u=o.tagName;const l=o.rawTagName;let c=o.tagExp,f=o.attrExpPresent,p=o.closeIndex;this.options.transformTagName&&(u=this.options.transformTagName(u)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,a,!1));const h=r;if(h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(r=this.tagsNodeStack.pop(),a=a.substring(0,a.lastIndexOf("."))),u!==e.tagname&&(a+=a?"."+u:u),this.isItStopNode(this.options.stopNodes,a,u)){let e="";if(c.length>0&&c.lastIndexOf("/")===c.length-1)"/"===u[u.length-1]?(u=u.substr(0,u.length-1),a=a.substr(0,a.length-1),c=u):c=c.substr(0,c.length-1),s=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(u))s=o.closeIndex;else{const r=this.readStopNodeData(t,l,p+1);if(!r)throw new Error(`Unexpected end of ${l}`);s=r.i,e=r.tagContent}const n=new i(u);u!==c&&f&&(n[":@"]=this.buildAttributesMap(c,a,u)),e&&(e=this.parseTextData(e,u,a,!0,f,!0,!0)),a=a.substr(0,a.lastIndexOf(".")),n.add(this.options.textNodeName,e),this.addChild(r,n,a)}else{if(c.length>0&&c.lastIndexOf("/")===c.length-1){"/"===u[u.length-1]?(u=u.substr(0,u.length-1),a=a.substr(0,a.length-1),c=u):c=c.substr(0,c.length-1),this.options.transformTagName&&(u=this.options.transformTagName(u));const t=new i(u);u!==c&&f&&(t[":@"]=this.buildAttributesMap(c,a,u)),this.addChild(r,t,a),a=a.substr(0,a.lastIndexOf("."))}else{const t=new i(u);this.tagsNodeStack.push(r),u!==c&&f&&(t[":@"]=this.buildAttributesMap(c,a,u)),this.addChild(r,t,a),r=t}n="",s=p}}else n+=t[s];return e.child};function d(t,e,r){const n=this.options.updateTag(e.tagname,r,e[":@"]);!1===n||("string"==typeof n?(e.tagname=n,t.addChild(e)):t.addChild(e))}const y=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){const r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function g(t,e,r,n){return t&&(void 0===n&&(n=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,n))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function v(t,e,r){const n="*."+r;for(const r in t){const i=t[r];if(n===i||e===i)return!0}return!1}function m(t,e,r,n){const i=t.indexOf(e,r);if(-1===i)throw new Error(n);return i+e.length-1}function b(t,e,r,n=">"){const i=function(t,e,r=">"){let n,i="";for(let o=e;o<t.length;o++){let e=t[o];if(n)e===n&&(n="");else if('"'===e||"'"===e)n=e;else if(e===r[0]){if(!r[1])return{data:i,index:o};if(t[o+1]===r[1])return{data:i,index:o}}else"\t"===e&&(e=" ");i+=e}}(t,e+1,n);if(!i)return;let o=i.data;const a=i.index,s=o.search(/\s/);let u=o,l=!0;-1!==s&&(u=o.substring(0,s),o=o.substring(s+1).trimStart());const c=u;if(r){const t=u.indexOf(":");-1!==t&&(u=u.substr(t+1),l=u!==i.data.substr(t+1))}return{tagName:u,tagExp:o,closeIndex:a,attrExpPresent:l,rawTagName:c}}function A(t,e,r){const n=r;let i=1;for(;r<t.length;r++)if("<"===t[r])if("/"===t[r+1]){const o=m(t,">",r,`${e} is not closed`);if(t.substring(r+2,o).trim()===e&&(i--,0===i))return{tagContent:t.substring(n,r),i:o};r=o}else if("?"===t[r+1])r=m(t,"?>",r+1,"StopNode is not closed.");else if("!--"===t.substr(r+1,3))r=m(t,"--\x3e",r+3,"StopNode is not closed.");else if("!["===t.substr(r+1,2))r=m(t,"]]>",r,"StopNode is not closed.")-2;else{const n=b(t,r,">");n&&((n&&n.tagName)===e&&"/"!==n.tagExp[n.tagExp.length-1]&&i++,r=n.closeIndex)}}function _(t,e,r){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&a(t,r)}return n.isExist(t)?t:""}t.exports=class{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=u,this.parseXml=h,this.parseTextData=l,this.resolveNameSpace=c,this.buildAttributesMap=p,this.isItStopNode=v,this.replaceEntitiesValue=y,this.readStopNodeData=A,this.saveTextToParentTag=g,this.addChild=d,this.ignoreAttributesFn=s(this.options.ignoreAttributes)}}},844:(t,e,r)=>{const{buildOptions:n}=r(745),i=r(78),{prettify:o}=r(997),a=r(501);t.exports=class{constructor(t){this.externalEntities={},this.options=n(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const r=a.validate(t,e);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new i(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(t);return this.options.preserveOrder||void 0===n?n:o(n,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}},997:(t,e)=>{"use strict";function r(t,e,a){let s;const u={};for(let l=0;l<t.length;l++){const c=t[l],f=n(c);let p="";if(p=void 0===a?f:a+"."+f,f===e.textNodeName)void 0===s?s=c[f]:s+=""+c[f];else{if(void 0===f)continue;if(c[f]){let t=r(c[f],e,p);const n=o(t,e);c[":@"]?i(t,c[":@"],p,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==u[f]&&u.hasOwnProperty(f)?(Array.isArray(u[f])||(u[f]=[u[f]]),u[f].push(t)):e.isArray(f,p,n)?u[f]=[t]:u[f]=t}}}return"string"==typeof s?s.length>0&&(u[e.textNodeName]=s):void 0!==s&&(u[e.textNodeName]=s),u}function n(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const r=e[t];if(":@"!==r)return r}}function i(t,e,r,n){if(e){const i=Object.keys(e),o=i.length;for(let a=0;a<o;a++){const o=i[a];n.isArray(o,r+"."+o,!0,!0)?t[o]=[e[o]]:t[o]=e[o]}}}function o(t,e){const{textNodeName:r}=e,n=Object.keys(t).length;return 0===n||!(1!==n||!t[r]&&"boolean"!=typeof t[r]&&0!==t[r])}e.prettify=function(t,e){return r(t,e)}},311:t=>{"use strict";t.exports=class{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}},153:t=>{const e=/^[-+]?0x[a-fA-F0-9]+$/,r=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};t.exports=function(t,i={}){if(i=Object.assign({},n,i),!t||"string"!=typeof t)return t;let o=t.trim();if(void 0!==i.skipLike&&i.skipLike.test(o))return t;if("0"===t)return 0;if(i.hex&&e.test(o))return function(t,e){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(o);if(-1!==o.search(/[eE]/)){const e=o.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(e){if(i.leadingZeros)o=(e[1]||"")+e[3];else if("0"!==e[2]||"."!==e[3][0])return t;return i.eNotation?Number(o):t}return t}{const e=r.exec(o);if(e){const r=e[1],n=e[2];let s=(a=e[3])&&-1!==a.indexOf(".")?("."===(a=a.replace(/0+$/,""))?a="0":"."===a[0]?a="0"+a:"."===a[a.length-1]&&(a=a.substr(0,a.length-1)),a):a;if(!i.leadingZeros&&n.length>0&&r&&"."!==o[2])return t;if(!i.leadingZeros&&n.length>0&&!r&&"."!==o[1])return t;if(i.leadingZeros&&n===t)return 0;{const e=Number(o),a=""+e;return-1!==a.search(/[eE]/)?i.eNotation?e:t:-1!==o.indexOf(".")?"0"===a&&""===s||a===s||r&&a==="-"+s?e:t:n?s===a||r+s===a?e:t:o===a||o===r+a?e:t}}return t}var a}},379:t=>{"use strict";var e=[];function r(t){for(var r=-1,n=0;n<e.length;n++)if(e[n].identifier===t){r=n;break}return r}function n(t,n){for(var o={},a=[],s=0;s<t.length;s++){var u=t[s],l=n.base?u[0]+n.base:u[0],c=o[l]||0,f="".concat(l," ").concat(c);o[l]=c+1;var p=r(f),h={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==p)e[p].references++,e[p].updater(h);else{var d=i(h,n);n.byIndex=s,e.splice(s,0,{identifier:f,updater:d,references:1})}a.push(f)}return a}function i(t,e){var r=e.domAPI(e);return r.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;r.update(t=e)}else r.remove()}}t.exports=function(t,i){var o=n(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<o.length;a++){var s=r(o[a]);e[s].references--}for(var u=n(t,i),l=0;l<o.length;l++){var c=r(o[l]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}o=u}}},216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},575:t=>{"use strict";t.exports=function(t,e){Object.keys(e).forEach((function(r){t.setAttribute(r,e[r])}))}},37:t=>{"use strict";var e,r=(e=[],function(t,r){return e[t]=r,e.filter(Boolean).join("\n")});function n(t,e,n,i){var o;if(n)o="";else{o="",i.supports&&(o+="@supports (".concat(i.supports,") {")),i.media&&(o+="@media ".concat(i.media," {"));var a=void 0!==i.layer;a&&(o+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),o+=i.css,a&&(o+="}"),i.media&&(o+="}"),i.supports&&(o+="}")}if(t.styleSheet)t.styleSheet.cssText=r(e,o);else{var s=document.createTextNode(o),u=t.childNodes;u[e]&&t.removeChild(u[e]),u.length?t.insertBefore(s,u[e]):t.appendChild(s)}}var i={singleton:null,singletonCounter:0};t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=i.singletonCounter++,r=i.singleton||(i.singleton=t.insertStyleElement(t));return{update:function(t){n(r,e,!1,t)},remove:function(t){n(r,e,!0,t)}}}},61:(t,e,r)=>{var n=r(698).default;function i(){"use strict";t.exports=i=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var e,r={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},l=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof A?e:A,o=Object.create(i.prototype),a=new S(n||[]);return s(o,"_invoke",{value:R(t,r,a)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var y="suspendedStart",g="suspendedYield",v="executing",m="completed",b={};function A(){}function _(){}function E(){}var x={};p(x,l,(function(){return this}));var C=Object.getPrototypeOf,w=C&&C(C(L([])));w&&w!==o&&a.call(w,l)&&(x=w);var T=E.prototype=A.prototype=Object.create(x);function I(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(i,o,s,u){var l=d(t[i],t,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==n(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):e.resolve(f).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(l.arg)}var i;s(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}})}function R(t,r,n){var i=y;return function(o,a){if(i===v)throw new Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=k(s,n);if(u){if(u===b)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===y)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var l=d(t,r,n);if("normal"===l.type){if(i=n.done?m:g,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i=m,n.method="throw",n.arg=l.arg)}}}function k(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,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=d(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;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,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function P(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 N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[l];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(a.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(n(t)+" is not iterable")}return _.prototype=E,s(T,"constructor",{value:E,configurable:!0}),s(E,"constructor",{value:_,configurable:!0}),_.displayName=p(E,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,p(t,f,"GeneratorFunction")),t.prototype=Object.create(T),t},r.awrap=function(t){return{__await:t}},I(O.prototype),p(O.prototype,c,(function(){return this})),r.AsyncIterator=O,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new O(h(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},I(T),p(T,f,"Generator"),p(T,l,(function(){return this})),p(T,"toString",(function(){return"[object Generator]"})),r.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}},r.values=L,S.prototype={constructor:S,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(N),!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 t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){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 i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,b):this.complete(o)},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),b},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),N(r),b}},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 i=n.arg;N(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},r}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},698:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},687:(t,e,r)=>{var n=r(61)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={id:n,exports:{}};return t[n](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{BannerAlignment:()=>A,Icon:()=>_});const t=KalturaPlayer;function e(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function i(t){return function(){var r=this,n=arguments;return new Promise((function(i,o){var a=t.apply(r,n);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t){return a="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},a(t)}function s(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:String(e)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function l(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},h.apply(this,arguments)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}function g(t,e,r){return(e=s(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var v=r(687),m=r.n(v);const b=KalturaPlayer.ui.preact;var A=function(t){return t.TOP="top",t.BOTTOM="bottom",t.TOP_LEFT="top-left",t.TOP_RIGHT="top-right",t.BOTTOM_LEFT="bottom-left",t.BOTTOM_RIGHT="bottom-right",t}({}),_=function(t){return t.CLOSE="M13.364 11.9497L17.6066 16.1924C17.9971 16.5829 17.9971 17.2161 17.6066 17.6066C17.2161 17.9971 16.5829 17.9971 16.1924 17.6066L11.9497 13.364L7.70711 17.6066C7.31658 17.9971 6.68342 17.9971 6.29289 17.6066C5.90237 17.2161 5.90237 16.5829 6.29289 16.1924L10.5355 11.9497L6.29289 7.70711C5.90237 7.31658 5.90237 6.68342 6.29289 6.29289C6.68342 5.90237 7.31658 5.90237 7.70711 6.29289L11.9497 10.5355L16.1924 6.29289C16.5829 5.90237 17.2161 5.90237 17.6066 6.29289C17.9971 6.68342 17.9971 7.31658 17.6066 7.70711L13.364 11.9497Z",t}(_||{});function E(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 x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,l=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return E(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)?E(t,e):void 0}}(t,e)||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.")}()}const C=KalturaPlayer.ui.preactHooks,w=KalturaPlayer.core;var T=r(379),I=r.n(T),O=r(37),R=r.n(O),k=r(575),P=r.n(k),N=r(216),S=r.n(N),L=r(740),D={attributes:{id:"@playkit-js/banner-overlay"}};D.setAttributes=P(),D.insert=function(t){window.kalturaGlobalConfig&&"string"==typeof window.kalturaGlobalConfig.stylesNonce&&t.setAttribute("nonce",window.kalturaGlobalConfig.stylesNonce),document.head.appendChild(t)},D.domAPI=R(),D.insertStyleElement=S(),I()(L.ZP,D),L.ZP&&L.ZP.locals&&L.ZP.locals;var M=t.ui.Components,j=M.Icon,B=M.Tooltip,U=(0,t.ui.preacti18n.withText)({closeBannerLabel:"bannerOverlay.closeBanner"})((function(t){var e=t.text,r=t.alignment,n=void 0===r?A.TOP_LEFT:r,i=t.allowWrapping,o=void 0===i||i,a=t.allowClose,s=void 0!==a&&a,u=t.onClose,l=t.closeBannerLabel,c=t.player,f=x((0,C.useState)(!1),2),p=f[0],h=f[1],d=x((0,C.useState)(!1),2),y=d[0],g=d[1],v=(0,C.useRef)(null),m=function(){if(!o&&v.current){var t=v.current,e=t.scrollWidth>t.clientWidth;h(e)}};(0,C.useEffect)((function(){m(),c&&!y&&(c.dispatchEvent(new w.FakeEvent("banner_message_displays")),g(!0))}),[o,c,y]),(0,C.useEffect)((function(){requestAnimationFrame(m)}),[e,o]);var E,T,I=function(){switch(n){case A.TOP:return L.we;case A.BOTTOM:return L.I;case A.TOP_LEFT:return L.w3;case A.TOP_RIGHT:return L.f6;case A.BOTTOM_LEFT:return L.Oq;case A.BOTTOM_RIGHT:return L.hT;default:return L.w3}}(),O=function(){switch(n){case A.TOP:case A.BOTTOM:return L.az;case A.TOP_RIGHT:case A.BOTTOM_RIGHT:return L.J_;case A.TOP_LEFT:case A.BOTTOM_LEFT:default:return L.Zh}}();return(0,b.h)("div",{"data-testid":"banner-overlay",className:"".concat(L.TD," ").concat(I),role:"status","aria-live":"polite","aria-label":e},(0,b.h)("div",{className:"".concat(L.Gj," ").concat(O)},(0,b.h)("div",{className:L.AR},(E=o?L.RC:L.eL,T=(0,b.h)("span",{ref:v,className:"".concat(L.Fb," ").concat(E)},e),!o&&p?(0,b.h)(B,{label:e,type:"top"},T):T)),s&&(0,b.h)("button",{className:L.Ah,onClick:function(){null==c||c.dispatchEvent(new w.FakeEvent("banner_message_manually_dismissed")),null==u||u()},"aria-live":"polite","aria-label":"".concat(l,": ").concat(e),tabIndex:0,"data-testid":"banner-close-button"},(0,b.h)(B,{label:l,type:"top"},(0,b.h)(j,{id:"banner-overlay-close-icon",path:_.CLOSE,viewBox:"0 0 25 25"})))))})),F=(0,t.ui.Components.withPlayer)((0,t.ui.Event.withEventManager)((function(t){var e=t.text,r=t.alignment,n=void 0===r?A.TOP_LEFT:r,i=t.allowWrapping,o=void 0===i||i,a=t.allowClose,s=void 0!==a&&a,u=t.duration,l=t.onClose,c=t.player,f=!0===o||"true"===o,p=!0===s||"true"===s,h=function(t){var e=t.duration,r=t.player,n=t.eventManager,i=t.onHide,o=t.onPlayerStarted,a=x((0,C.useState)(!0),2),s=a[0],u=a[1],l=x((0,C.useState)(!1),2),c=l[0],f=l[1],p=(0,C.useRef)(),h=function(){!c&&"unlimited"!==e&&"number"==typeof e&&e>0&&(f(!0),null==o||o(),p.current=setTimeout((function(){u(!1),i()}),1e3*e))};return(0,C.useEffect)((function(){if(!("unlimited"!==e&&"number"==typeof e&&e<0))return r&&n&&n.listenOnce(r,r.Event.Core.FIRST_PLAYING,h),function(){p.current&&clearTimeout(p.current)};u(!1)}),[r,n,e]),{isVisible:s,hasPlayerStarted:c,hide:function(){u(!1),i()}}}({duration:u,player:c,eventManager:t.eventManager,onHide:function(){null==l||l()}}),d=h.isVisible,y=h.hide;return d?(0,b.h)(U,{text:e,alignment:n,allowWrapping:f,allowClose:p,onClose:function(){y()},player:c}):null}))),V=r(341),G=l((function t(e){o(this,t),this.xml=e.xml}));function q(t,e,r){return e=p(e),f(t,H()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function H(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(H=function(){return!!t})()}var K=function(t){function e(t){var r;return o(this,e),g(c(r=q(this,e,[t])),"data",null),r.hasError||(r.totalCount=t.totalCount,1===r.totalCount&&(r.data=new G(t.objects[0]))),r}return y(e,t),l(e)}(t.providers.ResponseTypes.BaseServiceResult),W=function(){function t(e){var r=e.entryId,n=e.metadataProfileId;o(this,t),g(this,"_requests",[]),g(this,"_response",{metadata:null}),this._entryId=r,this._metadataProfileId=n;var i=new Map,a=new V.RequestBuilder(i);a.service="metadata_metadata",a.action="list",a.params={filter:{objectType:"KalturaMetadataFilter",metadataProfileIdEqual:this._metadataProfileId,metadataObjectTypeEqual:1,objectIdEqual:this._entryId}},this.requests.push(a)}return l(t,[{key:"requests",get:function(){return this._requests},set:function(t){this._requests=t}},{key:"response",get:function(){return this._response},set:function(t){var e,r=new K(null===(e=t[0])||void 0===e?void 0:e.data);r.totalCount&&(this._response.metadata=null==r?void 0:r.data)}},{key:"isValid",value:function(){return Boolean(this._entryId)&&Boolean(this._metadataProfileId)}}],[{key:"id",get:function(){return"metadata"}}]),t}(),Y=r(932);function $(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function X(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$(Object(r),!0).forEach((function(e){g(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function J(t,e,r){return e=p(e),f(t,Z()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}function Z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Z=function(){return!!t})()}var z="unlimited",Q=function(e){function r(){var t;o(this,r);for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return g(c(t=J(this,r,[].concat(n))),"initialConfig",null),g(c(t),"bannerComponent",null),t}var n,a;return y(r,e),l(r,[{key:"loadMedia",value:(a=i(m().mark((function t(){var e,r;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.logger.info("BannerOverlay: loadMedia lifecycle hook called"),this.initialConfig=X({},this.config),e=!0,!this.useMetadata()){t.next=8;break}return t.next=6,this.getMetadataFromEntry();case 6:(r=t.sent)?(e=this.isValidBannerMetadata(r),r&&e&&this.updateConfigFromMetadata(r)):this.config.text="";case 8:this.removeBannerComponent(),this.config.text&&e&&this.addBannerComponent();case 10:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"addBannerComponent",value:function(){var e=this;this.bannerComponent&&this.removeBannerComponent();var r={label:"banner-overlay",area:t.ui.ReservedPresetAreas.InteractiveArea,presets:[t.ui.ReservedPresetNames.Playback,t.ui.ReservedPresetNames.Live,t.ui.ReservedPresetNames.Img,t.ui.ReservedPresetNames.Document],get:function(){return(0,b.h)(F,{text:e.config.text,alignment:e.config.alignment,allowWrapping:e.config.allowWrapping,allowClose:e.config.allowClose,duration:e.config.duration,onClose:e.handleBannerClose.bind(e),player:e.player})}};this.bannerComponent=this.player.ui.addComponent(r)}},{key:"handleBannerClose",value:function(){this.removeBannerComponent()}},{key:"removeBannerComponent",value:function(){try{var t;null===(t=this.bannerComponent)||void 0===t||t.call(this)}finally{this.bannerComponent=null}}},{key:"isBoolean",value:function(t){return"boolean"==typeof t}},{key:"isValidBannerMetadata",value:function(t){var e=Number(t.BannerDisplayDuration),r=t.BannerText&&t.BannerText.trim().length>0,n=!t.BannerWrap||this.isBoolean(t.BannerWrap),i=!t.BannerShowCloseButton||this.isBoolean(t.BannerShowCloseButton),o=!t.BannerAlignment||Object.values(A).includes(t.BannerAlignment),a=!0;return t.BannerDisplayDuration&&(a=t.BannerDisplayDuration===z||!isNaN(e)&&e>0),r&&n&&i&&o&&a}},{key:"getMetadataFromEntry",value:(n=i(m().mark((function t(){var e,r,n,i,o;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=this.player.sources.id,n=(null===(e=this.player.config.session)||void 0===e?void 0:e.ks)||"",i=this.config.metadataProfileId,t.next=5,this.player.provider.doRequest([{loader:W,params:{entryId:r,metadataProfileId:i}}],n);case 5:return o=t.sent,t.abrupt("return",this.parseDataFromResponse(o));case 7:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"parseDataFromResponse",value:function(t){var e;if(t&&t.has(W.id)){var r,n,i=t.get(W.id);null!==(n=e=null==i||null===(r=i.response)||void 0===r?void 0:r.metadata)&&void 0!==n&&n.xml&&(e=(new Y.XMLParser).parse(e.xml).metadata)}return e}},{key:"updateConfigFromMetadata",value:function(t){this.config.text=t.BannerText,this.isBoolean(t.BannerWrap)?this.config.allowWrapping=t.BannerWrap:void 0===t.BannerWrap&&(this.config.allowWrapping=!0),this.isBoolean(t.BannerShowCloseButton)?this.config.allowClose=t.BannerShowCloseButton:void 0===t.BannerShowCloseButton&&(this.config.allowClose=!1),t.BannerAlignment?this.config.alignment=t.BannerAlignment:void 0===t.BannerAlignment&&(this.config.alignment=A.TOP_LEFT),t.BannerDisplayDuration===z?this.config.duration=z:0===t.BannerDisplayDuration?this.config.duration=0:void 0===t.BannerDisplayDuration?this.config.duration=5:this.config.duration=Number(t.BannerDisplayDuration)}},{key:"useMetadata",value:function(){return this.config.useConfigFromMetadata&&!!this.config.metadataProfileId}},{key:"reset",value:function(){this.logger.info("BannerOverlay: reset lifecycle hook called"),this.config=X({},this.initialConfig),this.removeBannerComponent()}},{key:"destroy",value:function(){this.removeBannerComponent(),h(p(r.prototype),"destroy",this).call(this),this.logger.info("BannerOverlay: destroy lifecycle hook called")}}],[{key:"isValid",value:function(){return!0}}]),r}(t.BasePlugin);g(Q,"defaultConfig",{text:"",duration:5,alignment:A.TOP_LEFT,allowWrapping:!0,allowClose:!1,useConfigFromMetadata:!1}),(0,t.registerPlugin)("bannerOverlay",Q)})(),n})()));
3
3
  //# sourceMappingURL=playkit-banner-overlay.js.map