@playkit-js/unisphere 0.0.19-canary.0-338e5c5 → 0.0.19-canary.0-7e412b7

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-unisphere.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("KalturaPlayer",[],t):"object"==typeof exports?exports.KalturaPlayer=t():(e.KalturaPlayer=e.KalturaPlayer||{},e.KalturaPlayer.plugins=e.KalturaPlayer.plugins||{},e.KalturaPlayer.plugins.unisphere=t())}(self,(()=>(()=>{var e={51:(e,t,r)=>{var n=r(564).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof w?t:w,i=Object.create(o.prototype),a=new R(n||[]);return u(i,"_invoke",{value:k(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",y="suspendedYield",g="executing",m="completed",b={};function w(){}function E(){}function S(){}var P={};p(P,s,(function(){return this}));var O=Object.getPrototypeOf,I=O&&O(O(L([])));I&&I!==i&&a.call(I,s)&&(P=I);var x=S.prototype=w.prototype=Object.create(P);function _(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,u,c){var s=h(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(e,r,n){var o=v;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=T(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:y,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return E.prototype=S,u(x,"constructor",{value:S,configurable:!0}),u(S,"constructor",{value:E,configurable:!0}),E.displayName=p(S,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,p(e,f,"GeneratorFunction")),e.prototype=Object.create(x),e},r.awrap=function(e){return{__await:e}},_(j.prototype),p(j.prototype,l,(function(){return this})),r.AsyncIterator=j,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new j(d(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(x),p(x,f,"Generator"),p(x,s,(function(){return this})),p(x,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=L,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},564:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},790:(e,t,r)=>{var n=r(51)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=KalturaPlayer;function t(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function n(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function d(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h=r(790),v=r.n(h);const y=KalturaPlayer.ui.preact,g=KalturaPlayer.core;var m=function(e){return e.UPPER_BAR_ICON_SHOW="unisphere.event.player.upper-bar-icon.show",e.UPPER_BAR_ICON_CLICK="unisphere.event.player.upper-bar-icon.click",e.SIDE_PANEL_OPEN="unisphere.event.player.side-panel.open",e.SIDE_PANEL_CLOSE="unisphere.event.player.side-panel.close",e.SIDE_PANEL_TOGGLE="unisphere.event.player.side-panel.toggle",e.SET_VALUE_CURRENT_TIME="unisphere.event.player.set-value.current-time",e.CHAPTERS_ADD="unisphere.event.player.chapters.add",e.PLAYER_RESIZE="unisphere.event.player.resize",e.DISPATCH_EVENT="unisphere.event.player.dispatch-event",e.SIDE_PANEL_CLOSED="unisphere.event.player.side-panel.closed",e.SIDE_PANEL_OPENED="unisphere.event.player.side-panel.opened",e}({}),b=function(e){return e.SELECTED_CHAPTER="selectedChapter",e.CURRENT_TIME="currentTime",e.IS_PAUSED="isPaused",e.PLAYER_SESSION="player-session",e.IS_SMALL_SIZE="isSmallSize",e}(b||{}),w=function(e){var t;return(0,y.h)("div",{style:null!==(t=e.style)&&void 0!==t?t:{},id:e.id})},E=e.ui.components,S=E.Tooltip,P=E.Icon,O=function(t){var r=t.id,n=t.label,o=t.iconPath;return(0,y.h)(S,{label:n,type:"bottom"},(0,y.h)("button",{type:"button","data-testid":"playlist_pluginButton","aria-label":n,className:e.ui.style.upperBarIcon},(0,y.h)(P,{id:"unisphere-icon-".concat(r),height:32,width:32,viewBox:"0 0 32 32",path:o})))},I=function(){function e(){o(this,e)}return c(e,null,[{key:"set",value:function(t){e.workspaceInstance=t}},{key:"get",value:function(){return e.workspaceInstance}},{key:"destroy",value:function(){try{this.workspaceInstance.kill()}catch(e){}e.workspaceInstance=null}}])}();function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}d(I,"workspaceInstance",null);var k=function(){function e(){o(this,e)}return c(e,null,[{key:"addToUnsubscribeMap",value:function(t){return e.unsubscribeMap.set(e.sequence,t),++e.sequence,e.sequence}},{key:"unsubscribeAll",value:function(){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return j(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.unsubscribeMap);try{for(r.s();!(t=r.n()).done;){var n=_(t.value,2),o=n[0];(0,n[1])(),e.unsubscribeMap.delete(o)}}catch(e){r.e(e)}finally{r.f()}}},{key:"unsubscribe",value:function(t){var r=e.unsubscribeMap.get(t);r&&(r(),e.unsubscribeMap.delete(t))}}])}();function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}d(k,"unsubscribeMap",new Map),d(k,"sequence",-1);var A,M=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,T()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t)}(k);function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}d(M,"get",function(){var e=n(v().mark((function e(t){var r,n,o,i,a;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.widgetId,n=t.context,o=t.settings,i=I.get(),e.prev=2,e.next=5,null==i?void 0:i.loadRuntime(r,n,o||{});case 5:return a=e.sent,e.abrupt("return",a?null==a?void 0:a.runtime:null);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0));case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}());var L,C="unisphere.service.pub-sub",N=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,R()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(k);function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(U=function(){return!!e})()}A=N,d(N,"subscribe",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService(C);if(n){var o=n.subscribe(e,t);return A.addToUnsubscribeMap(o)}return-1})),d(N,"emit",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService(C);null==n||n.emit({id:e,version:"1.0.0",payload:t})}));var D="player",$="unisphere.service.storage",B=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,U()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(k);function F(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=0;t<5;++t)e+=g.Utils.Generator.uniqueId();return e}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}L=B,d(B,"update",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService($);null==n||n.update(D,e,t)})),d(B,"get",(function(e){var t=I.get(),r=null==t?void 0:t.getService($);return r?r.get(D,e):null})),d(B,"subscribe",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService($);if(n){var o=n.subscribe(t,{namespace:D,property:e,emitLastValue:!0});L.addToUnsubscribeMap(o)}}));var G=function(){return c((function e(){o(this,e),d(this,"_disposers",new Map)}),[{key:"generateId",value:function(e){return F("".concat(e.containerType,"_container_"))}},{key:"getSidePanelsManager",value:function(e){return e.getService("sidePanelsManager")}},{key:"addDisposer",value:function(e,t){this._disposers.set(e,t)}},{key:"dispose",value:function(e){var t=this._disposers.get(e);t&&(t(),this._disposers.delete(e))}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return W(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this._disposers);try{for(t.s();!(e=t.n()).done;){var r=_(e.value,1)[0];this.dispose(r)}}catch(e){t.e(e)}finally{t.f()}}}])}();function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(K=function(){return!!e})()}var z=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,K()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,[{key:"createContainer",value:function(e,t){var r,n=this,o=this.generateId(t),i=t.unisphereArea,a=t.position,u=t.expandMode,c=t.presets,s=null===(r=this.getSidePanelsManager(e))||void 0===r?void 0:r.add({label:o,panelComponent:function(){return(0,y.h)(w,{style:{height:"100%"},id:o})},presets:c,position:a,expandMode:u});return"number"==typeof s?(this.addDisposer(o,(function(){var t;null===(t=n.getSidePanelsManager(e))||void 0===t||t.remove(s)})),B.update(i,{upperBarIcon:{panelId:s}}),o):null}}])}(G);function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(V=function(){return!!e})()}var H=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,V()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,[{key:"createContainer",value:function(e,t){var r=this.generateId(t),n=t.playerArea,o=t.presets,i=e.ui.addComponent({label:r,presets:o,area:n,get:function(){return(0,y.h)(w,{style:{width:"inherit"},id:r})}});return this.addDisposer(r,i),r}}])}(G);function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Y=function(){return c((function e(t){o(this,e),d(this,"containerProducers",new Map([["sidepanel",new z],["simple",new H]])),this.player=t}),[{key:"createContainer",value:function(e){var t=this.containerProducers.get(e.containerType);return t?t.createContainer(this.player,e):null}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return q(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this.containerProducers);try{for(t.s();!(e=t.n()).done;){var r,n=_(e.value,1)[0];null===(r=this.containerProducers.get(n))||void 0===r||r.destroy()}}catch(e){t.e(e)}finally{t.f()}}}])}();function Z(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return J(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var X=function(){return c((function e(t,r,n){o(this,e),d(this,"iconIds",new Map),d(this,"panelIds",new Set),d(this,"persistentIconIds",new Map),this.player=t,this.eventManager=r,this.logger=n,this.containerManager=new Y(t),this.currentIsSmallSize=void 0}),[{key:"upperBarManager",get:function(){return this.player.getService("upperBarManager")}},{key:"sidePanelsManager",get:function(){return this.player.getService("sidePanelsManager")}},{key:"timelineManager",get:function(){return this.player.getService("timeline")}},{key:"cuePointManager",get:function(){return this.player.getService("kalturaCuepoints")}},{key:"addEventHandlers",value:function(){var t=this,r=e.ui.redux.useStore();this.unsubscribeStore=r.subscribe((function(){var e=r.getState().shell.isSmallSize;e!==t.currentIsSmallSize&&(t.currentIsSmallSize=e,B.update(b.IS_SMALL_SIZE,e))})),N.subscribe(m.UPPER_BAR_ICON_SHOW,(function(e){var r=e.payload,n=r.id,o=r.label,i=r.order,a=r.iconPath,u=r.panelId,c=r.isPersistent;t.addUpperBarIcon(n,o,i,a,u,c)})),N.subscribe(m.SIDE_PANEL_OPEN,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.activateItem(o),N.emit(m.SIDE_PANEL_OPENED,n)})),N.subscribe(m.SIDE_PANEL_CLOSE,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.deactivateItem(o),N.emit(m.SIDE_PANEL_CLOSED,n)})),N.subscribe(m.SIDE_PANEL_TOGGLE,(function(e){var r,n,o,i=e.payload,a=i.panelId;null!==(r=t.sidePanelsManager)&&void 0!==r&&r.isItemActive(a)?(null===(n=t.sidePanelsManager)||void 0===n||n.deactivateItem(a),N.emit(m.SIDE_PANEL_CLOSED,i)):(null===(o=t.sidePanelsManager)||void 0===o||o.activateItem(a),N.emit(m.SIDE_PANEL_OPENED,i))})),N.subscribe(m.SET_VALUE_CURRENT_TIME,(function(e){var r=e.payload.currentTime;r>=0&&(t.player.currentTime=r)})),N.subscribe(m.CHAPTERS_ADD,(function(e){var r=e.payload,n=r.chapters;if(n&&n.length){var o;null===(o=t.timelineManager)||void 0===o||o.disableChapters();for(var i=0;i<n.length;++i){var a,u=n[i],c=u.title,s=+u.time;null===(a=t.timelineManager)||void 0===a||a.addKalturaCuePoint(s,"SummaryAndChapters",i,c,{onClick:function(e){var t=e.cuePoint;B.update(b.SELECTED_CHAPTER,t.id)}})}t.player.dispatchEvent(new g.FakeEvent("UNISPHERE_CHAPTERS_ADDED",r))}})),N.subscribe(m.DISPATCH_EVENT,(function(e){var r=e.payload,n=r.eventName,o=r.data;t.player.dispatchEvent(new g.FakeEvent(n,o))})),this.eventManager.listen(this.player,e.core.EventType.TIME_UPDATE,(function(){B.update(b.CURRENT_TIME,"".concat(t.player.currentTime))})),this.eventManager.listen(this.player,e.ui.EventType.GUI_RESIZE,(function(){N.emit(m.PLAYER_RESIZE,{}),setTimeout((function(){N.emit(m.PLAYER_RESIZE,{})}),1e3)})),this.eventManager.listen(this.player,e.core.EventType.PAUSE,(function(){B.update(b.IS_PAUSED,!0)})),this.eventManager.listen(this.player,e.core.EventType.PLAY,(function(){B.update(b.IS_PAUSED,!1)}))}},{key:"addUpperBarIcon",value:function(e,t,r,n,o,i){var a;if(!this.iconIds.has(e)&&!this.persistentIconIds.has(e)){this.panelIds.add(o);var u=null===(a=this.upperBarManager)||void 0===a?void 0:a.add({displayName:t,ariaLabel:t,order:r,component:function(){return(0,y.h)(O,{id:e,label:t,iconPath:n})},svgIcon:{path:n},onClick:function(){N.emit(m.UPPER_BAR_ICON_CLICK,{id:e,panelId:o})}});i?this.persistentIconIds.set(e,u):this.iconIds.set(e,u)}}},{key:"isVideoClipped",value:function(){var e=this.player.config.sources,t=e.seekFrom,r=e.clipTo,n=e.duration;return"number"==typeof t&&t>0||"number"==typeof r&&r<n}},{key:"shouldLoadWidget",value:function(e){var t=e.widgetId,r=e.context;return!(t.includes("video-summary")&&"kaltura-player-list"===r&&this.isVideoClipped())}},{key:"loadWidgets",value:function(e){var t,r=this,n=Z(e);try{var o=function(){var e=t.value,n=e.widgetId,o=e.context;if(!n||!o||!r.shouldLoadWidget(e))return 1;var i,a=Z(e.containers);try{var u=function(){var t=i.value;if(!t.unisphereArea)return 1;var a=r.containerManager.createContainer(t);a&&M.get(e).then((function(e){null==e||e.assignAreaByName(t.unisphereArea,a)})).catch((function(e){r.logger.warn("Failed to load unisphere widget ".concat(n," with context ").concat(o," "),e)}))};for(a.s();!(i=a.n()).done;)u()}catch(e){a.e(e)}finally{a.f()}};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}}},{key:"init",value:function(e,t){I.set(e),this.addEventHandlers(),this.loadWidgets(t)}},{key:"updateSessionData",value:function(){var e,t;B.update(b.PLAYER_SESSION,{entryId:this.player.sources.id,ks:null===(e=this.player.config.session)||void 0===e?void 0:e.ks,entryName:null===(t=this.player.sources.metadata)||void 0===t?void 0:t.name})}},{key:"reset",value:function(){var e,t=Z(this.panelIds);try{for(t.s();!(e=t.n()).done;){var r,n=e.value;if(null!==(r=this.sidePanelsManager)&&void 0!==r&&r.isItemActive(n)){this.sidePanelsManager.deactivateItem(n);break}}}catch(e){t.e(e)}finally{t.f()}var o,i=Z(this.iconIds.values());try{for(i.s();!(o=i.n()).done;){var a,u=o.value;null===(a=this.upperBarManager)||void 0===a||a.remove(u)}}catch(e){i.e(e)}finally{i.f()}this.iconIds.clear(),this.containerManager.destroy()}},{key:"destroy",value:function(){this.reset(),this.containerManager.destroy();var e,t=Z(this.persistentIconIds.values());try{for(t.s();!(e=t.n()).done;){var r,n=e.value;null===(r=this.upperBarManager)||void 0===r||r.remove(n)}}catch(e){t.e(e)}finally{t.f()}N.destroy(),B.destroy(),I.destroy(),this.unsubscribeStore&&this.unsubscribeStore()}}])}(),Q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ee=function(e){return e&&e.Math===Math&&e},te=ee("object"==typeof globalThis&&globalThis)||ee("object"==typeof window&&window)||ee("object"==typeof self&&self)||ee("object"==typeof Q&&Q)||ee("object"==typeof Q&&Q)||function(){return this}()||Function("return this")(),re={},ne=function(e){try{return!!e()}catch(e){return!0}},oe=!ne((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ie=!ne((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ae=ie,ue=Function.prototype.call,ce=ae?ue.bind(ue):function(){return ue.apply(ue,arguments)},se={},le={}.propertyIsEnumerable,fe=Object.getOwnPropertyDescriptor,pe=fe&&!le.call({1:2},1);se.f=pe?function(e){var t=fe(this,e);return!!t&&t.enumerable}:le;var de,he,ve=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ye=ie,ge=Function.prototype,me=ge.call,be=ye&&ge.bind.bind(me,me),we=ye?be:function(e){return function(){return me.apply(e,arguments)}},Ee=we,Se=Ee({}.toString),Pe=Ee("".slice),Oe=function(e){return Pe(Se(e),8,-1)},Ie=ne,xe=Oe,_e=Object,je=we("".split),ke=Ie((function(){return!_e("z").propertyIsEnumerable(0)}))?function(e){return"String"===xe(e)?je(e,""):_e(e)}:_e,Te=function(e){return null==e},Ae=Te,Me=TypeError,Re=function(e){if(Ae(e))throw new Me("Can't call method on "+e);return e},Le=ke,Ce=Re,Ne=function(e){return Le(Ce(e))},Ue="object"==typeof document&&document.all,De=void 0===Ue&&void 0!==Ue?function(e){return"function"==typeof e||e===Ue}:function(e){return"function"==typeof e},$e=De,Be=function(e){return"object"==typeof e?null!==e:$e(e)},Fe=te,We=De,Ge=function(e,t){return arguments.length<2?(r=Fe[e],We(r)?r:void 0):Fe[e]&&Fe[e][t];var r},Ke=we({}.isPrototypeOf),ze="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Ve=te,He=ze,qe=Ve.process,Ye=Ve.Deno,Ze=qe&&qe.versions||Ye&&Ye.version,Je=Ze&&Ze.v8;Je&&(he=(de=Je.split("."))[0]>0&&de[0]<4?1:+(de[0]+de[1])),!he&&He&&(!(de=He.match(/Edge\/(\d+)/))||de[1]>=74)&&(de=He.match(/Chrome\/(\d+)/))&&(he=+de[1]);var Xe=he,Qe=Xe,et=ne,tt=te.String,rt=!!Object.getOwnPropertySymbols&&!et((function(){var e=Symbol("symbol detection");return!tt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Qe&&Qe<41})),nt=rt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ot=Ge,it=De,at=Ke,ut=Object,ct=nt?function(e){return"symbol"==typeof e}:function(e){var t=ot("Symbol");return it(t)&&at(t.prototype,ut(e))},st=String,lt=function(e){try{return st(e)}catch(e){return"Object"}},ft=De,pt=lt,dt=TypeError,ht=function(e){if(ft(e))return e;throw new dt(pt(e)+" is not a function")},vt=ht,yt=Te,gt=function(e,t){var r=e[t];return yt(r)?void 0:vt(r)},mt=ce,bt=De,wt=Be,Et=TypeError,St={exports:{}},Pt=te,Ot=Object.defineProperty,It=function(e,t){try{Ot(Pt,e,{value:t,configurable:!0,writable:!0})}catch(r){Pt[e]=t}return t},xt=te,_t=It,jt="__core-js_shared__",kt=St.exports=xt[jt]||_t(jt,{});(kt.versions||(kt.versions=[])).push({version:"3.36.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Tt=St.exports,At=Tt,Mt=function(e,t){return At[e]||(At[e]=t||{})},Rt=Re,Lt=Object,Ct=function(e){return Lt(Rt(e))},Nt=Ct,Ut=we({}.hasOwnProperty),Dt=Object.hasOwn||function(e,t){return Ut(Nt(e),t)},$t=we,Bt=0,Ft=Math.random(),Wt=$t(1..toString),Gt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Wt(++Bt+Ft,36)},Kt=Mt,zt=Dt,Vt=Gt,Ht=rt,qt=nt,Yt=te.Symbol,Zt=Kt("wks"),Jt=qt?Yt.for||Yt:Yt&&Yt.withoutSetter||Vt,Xt=function(e){return zt(Zt,e)||(Zt[e]=Ht&&zt(Yt,e)?Yt[e]:Jt("Symbol."+e)),Zt[e]},Qt=ce,er=Be,tr=ct,rr=gt,nr=TypeError,or=Xt("toPrimitive"),ir=function(e,t){if(!er(e)||tr(e))return e;var r,n=rr(e,or);if(n){if(void 0===t&&(t="default"),r=Qt(n,e,t),!er(r)||tr(r))return r;throw new nr("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&bt(r=e.toString)&&!wt(n=mt(r,e)))return n;if(bt(r=e.valueOf)&&!wt(n=mt(r,e)))return n;if("string"!==t&&bt(r=e.toString)&&!wt(n=mt(r,e)))return n;throw new Et("Can't convert object to primitive value")}(e,t)},ar=ct,ur=function(e){var t=ir(e,"string");return ar(t)?t:t+""},cr=Be,sr=te.document,lr=cr(sr)&&cr(sr.createElement),fr=function(e){return lr?sr.createElement(e):{}},pr=fr,dr=!oe&&!ne((function(){return 7!==Object.defineProperty(pr("div"),"a",{get:function(){return 7}}).a})),hr=oe,vr=ce,yr=se,gr=ve,mr=Ne,br=ur,wr=Dt,Er=dr,Sr=Object.getOwnPropertyDescriptor;re.f=hr?Sr:function(e,t){if(e=mr(e),t=br(t),Er)try{return Sr(e,t)}catch(e){}if(wr(e,t))return gr(!vr(yr.f,e,t),e[t])};var Pr={},Or=oe&&ne((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ir=Be,xr=String,_r=TypeError,jr=function(e){if(Ir(e))return e;throw new _r(xr(e)+" is not an object")},kr=oe,Tr=dr,Ar=Or,Mr=jr,Rr=ur,Lr=TypeError,Cr=Object.defineProperty,Nr=Object.getOwnPropertyDescriptor,Ur="enumerable",Dr="configurable",$r="writable";Pr.f=kr?Ar?function(e,t,r){if(Mr(e),t=Rr(t),Mr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&$r in r&&!r[$r]){var n=Nr(e,t);n&&n[$r]&&(e[t]=r.value,r={configurable:Dr in r?r[Dr]:n[Dr],enumerable:Ur in r?r[Ur]:n[Ur],writable:!1})}return Cr(e,t,r)}:Cr:function(e,t,r){if(Mr(e),t=Rr(t),Mr(r),Tr)try{return Cr(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Lr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Br=Pr,Fr=ve,Wr=oe?function(e,t,r){return Br.f(e,t,Fr(1,r))}:function(e,t,r){return e[t]=r,e},Gr={exports:{}},Kr=oe,zr=Dt,Vr=Function.prototype,Hr=Kr&&Object.getOwnPropertyDescriptor,qr=zr(Vr,"name"),Yr={EXISTS:qr,PROPER:qr&&"something"===function(){}.name,CONFIGURABLE:qr&&(!Kr||Kr&&Hr(Vr,"name").configurable)},Zr=De,Jr=Tt,Xr=we(Function.toString);Zr(Jr.inspectSource)||(Jr.inspectSource=function(e){return Xr(e)});var Qr,en,tn,rn=Jr.inspectSource,nn=De,on=te.WeakMap,an=nn(on)&&/native code/.test(String(on)),un=Gt,cn=Mt("keys"),sn=function(e){return cn[e]||(cn[e]=un(e))},ln={},fn=an,pn=te,dn=Be,hn=Wr,vn=Dt,yn=Tt,gn=sn,mn=ln,bn="Object already initialized",wn=pn.TypeError,En=pn.WeakMap;if(fn||yn.state){var Sn=yn.state||(yn.state=new En);Sn.get=Sn.get,Sn.has=Sn.has,Sn.set=Sn.set,Qr=function(e,t){if(Sn.has(e))throw new wn(bn);return t.facade=e,Sn.set(e,t),t},en=function(e){return Sn.get(e)||{}},tn=function(e){return Sn.has(e)}}else{var Pn=gn("state");mn[Pn]=!0,Qr=function(e,t){if(vn(e,Pn))throw new wn(bn);return t.facade=e,hn(e,Pn,t),t},en=function(e){return vn(e,Pn)?e[Pn]:{}},tn=function(e){return vn(e,Pn)}}var On={set:Qr,get:en,has:tn,enforce:function(e){return tn(e)?en(e):Qr(e,{})},getterFor:function(e){return function(t){var r;if(!dn(t)||(r=en(t)).type!==e)throw new wn("Incompatible receiver, "+e+" required");return r}}},In=we,xn=ne,_n=De,jn=Dt,kn=oe,Tn=Yr.CONFIGURABLE,An=rn,Mn=On.enforce,Rn=On.get,Ln=String,Cn=Object.defineProperty,Nn=In("".slice),Un=In("".replace),Dn=In([].join),$n=kn&&!xn((function(){return 8!==Cn((function(){}),"length",{value:8}).length})),Bn=String(String).split("String"),Fn=Gr.exports=function(e,t,r){"Symbol("===Nn(Ln(t),0,7)&&(t="["+Un(Ln(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!jn(e,"name")||Tn&&e.name!==t)&&(kn?Cn(e,"name",{value:t,configurable:!0}):e.name=t),$n&&r&&jn(r,"arity")&&e.length!==r.arity&&Cn(e,"length",{value:r.arity});try{r&&jn(r,"constructor")&&r.constructor?kn&&Cn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Mn(e);return jn(n,"source")||(n.source=Dn(Bn,"string"==typeof t?t:"")),e};Function.prototype.toString=Fn((function(){return _n(this)&&Rn(this).source||An(this)}),"toString");var Wn=Gr.exports,Gn=De,Kn=Pr,zn=Wn,Vn=It,Hn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(Gn(r)&&zn(r,i,n),n.global)o?e[t]=r:Vn(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:Kn.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},qn={},Yn=Math.ceil,Zn=Math.floor,Jn=Math.trunc||function(e){var t=+e;return(t>0?Zn:Yn)(t)},Xn=function(e){var t=+e;return t!=t||0===t?0:Jn(t)},Qn=Xn,eo=Math.max,to=Math.min,ro=Xn,no=Math.min,oo=function(e){var t=ro(e);return t>0?no(t,9007199254740991):0},io=oo,ao=function(e){return io(e.length)},uo=Ne,co=ao,so=function(e){return function(t,r,n){var o=uo(t),i=co(o);if(0===i)return!e&&-1;var a,u=function(e,t){var r=Qn(e);return r<0?eo(r+t,0):to(r,t)}(n,i);if(e&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((e||u in o)&&o[u]===r)return e||u||0;return!e&&-1}},lo={includes:so(!0),indexOf:so(!1)},fo=Dt,po=Ne,ho=lo.indexOf,vo=ln,yo=we([].push),go=function(e,t){var r,n=po(e),o=0,i=[];for(r in n)!fo(vo,r)&&fo(n,r)&&yo(i,r);for(;t.length>o;)fo(n,r=t[o++])&&(~ho(i,r)||yo(i,r));return i},mo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bo=go,wo=mo.concat("length","prototype");qn.f=Object.getOwnPropertyNames||function(e){return bo(e,wo)};var Eo={};Eo.f=Object.getOwnPropertySymbols;var So=Ge,Po=qn,Oo=Eo,Io=jr,xo=we([].concat),_o=So("Reflect","ownKeys")||function(e){var t=Po.f(Io(e)),r=Oo.f;return r?xo(t,r(e)):t},jo=Dt,ko=_o,To=re,Ao=Pr,Mo=function(e,t,r){for(var n=ko(t),o=Ao.f,i=To.f,a=0;a<n.length;a++){var u=n[a];jo(e,u)||r&&jo(r,u)||o(e,u,i(t,u))}},Ro=ne,Lo=De,Co=/#|\.prototype\./,No=function(e,t){var r=Do[Uo(e)];return r===Bo||r!==$o&&(Lo(t)?Ro(t):!!t)},Uo=No.normalize=function(e){return String(e).replace(Co,".").toLowerCase()},Do=No.data={},$o=No.NATIVE="N",Bo=No.POLYFILL="P",Fo=No,Wo=te,Go=re.f,Ko=Wr,zo=Hn,Vo=It,Ho=Mo,qo=Fo,Yo=function(e,t){var r,n,o,i,a,u=e.target,c=e.global,s=e.stat;if(r=c?Wo:s?Wo[u]||Vo(u,{}):Wo[u]&&Wo[u].prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=Go(r,n))&&a.value:r[n],!qo(c?n:u+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ho(i,o)}(e.sham||o&&o.sham)&&Ko(i,"sham",!0),zo(r,n,i,e)}},Zo=ie,Jo=Function.prototype,Xo=Jo.apply,Qo=Jo.call,ei="object"==typeof Reflect&&Reflect.apply||(Zo?Qo.bind(Xo):function(){return Qo.apply(Xo,arguments)}),ti=we,ri=ht,ni=Be,oi=String,ii=TypeError,ai=Be,ui=Re,ci=function(e){if(function(e){return ni(e)||null===e}(e))return e;throw new ii("Can't set "+oi(e)+" as a prototype")},si=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=function(e,t,r){try{return ti(ri(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return ui(r),ci(n),ai(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0),li=Pr.f,fi=De,pi=Be,di=si,hi={};hi[Xt("toStringTag")]="z";var vi="[object z]"===String(hi),yi=De,gi=Oe,mi=Xt("toStringTag"),bi=Object,wi="Arguments"===gi(function(){return arguments}()),Ei=vi?gi:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=bi(e),mi))?r:wi?gi(t):"Object"===(n=gi(t))&&yi(t.callee)?"Arguments":n},Si=Ei,Pi=String,Oi=function(e){if("Symbol"===Si(e))throw new TypeError("Cannot convert a Symbol value to a string");return Pi(e)},Ii=Oi,xi=Be,_i=Wr,ji=Error,ki=we("".replace),Ti=String(new ji("zxcasd").stack),Ai=/\n\s*at [^:]*:[^\n]*/,Mi=Ai.test(Ti),Ri=ve,Li=!ne((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ri(1,7)),7!==e.stack)})),Ci=Wr,Ni=Li,Ui=Error.captureStackTrace,Di=Ge,$i=Dt,Bi=Wr,Fi=Ke,Wi=si,Gi=Mo,Ki=function(e,t,r){r in e||li(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},zi=function(e,t,r,n){Ni&&(Ui?Ui(e,t):Ci(e,"stack",function(e,t){if(Mi&&"string"==typeof e&&!ji.prepareStackTrace)for(;t--;)e=ki(e,Ai,"");return e}(r,n)))},Vi=oe,Hi=Yo,qi=ei,Yi=function(e,t,r,n){var o="stackTraceLimit",i=n?2:1,a=e.split("."),u=a[a.length-1],c=Di.apply(null,a);if(c){var s=c.prototype;if($i(s,"cause")&&delete s.cause,!r)return c;var l=Di("Error"),f=t((function(e,t){var r,o,a,u,l,p,d,h=function(e,t){return void 0===e?arguments.length<2?"":t:Ii(e)}(n?t:e,void 0),v=n?new c(e):new c;return void 0!==h&&Bi(v,"message",h),zi(v,f,v.stack,2),this&&Fi(s,this)&&(a=v,u=this,l=f,di&&fi(p=u.constructor)&&p!==l&&pi(d=p.prototype)&&d!==l.prototype&&di(a,d)),arguments.length>i&&(r=v,xi(o=arguments[i])&&"cause"in o&&_i(r,"cause",o.cause)),v}));f.prototype=s,"Error"!==u?Wi?Wi(f,l):Gi(f,l,{name:!0}):Vi&&o in c&&(Ki(f,c,o),Ki(f,c,"prepareStackTrace")),Gi(f,c);try{s.name!==u&&Bi(s,"name",u),s.constructor=f}catch(e){}return f}},Zi="WebAssembly",Ji=te[Zi],Xi=7!==new Error("e",{cause:7}).cause,Qi=function(e,t){var r={};r[e]=Yi(e,t,Xi),Hi({global:!0,constructor:!0,arity:1,forced:Xi},r)},ea=function(e,t){if(Ji&&Ji[e]){var r={};r[e]=Yi(Zi+"."+e,t,Xi),Hi({target:Zi,stat:!0,constructor:!0,arity:1,forced:Xi},r)}};Qi("Error",(function(e){return function(t){return qi(e,this,arguments)}})),Qi("EvalError",(function(e){return function(t){return qi(e,this,arguments)}})),Qi("RangeError",(function(e){return function(t){return qi(e,this,arguments)}})),Qi("ReferenceError",(function(e){return function(t){return qi(e,this,arguments)}})),Qi("SyntaxError",(function(e){return function(t){return qi(e,this,arguments)}})),Qi("TypeError",(function(e){return function(t){return qi(e,this,arguments)}})),Qi("URIError",(function(e){return function(t){return qi(e,this,arguments)}})),ea("CompileError",(function(e){return function(t){return qi(e,this,arguments)}})),ea("LinkError",(function(e){return function(t){return qi(e,this,arguments)}})),ea("RuntimeError",(function(e){return function(t){return qi(e,this,arguments)}})),Error;var ta=Oe,ra=oe,na=Array.isArray||function(e){return"Array"===ta(e)},oa=TypeError,ia=Object.getOwnPropertyDescriptor,aa=ra&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),ua=TypeError,ca=Ct,sa=ao,la=aa?function(e,t){if(na(e)&&!ia(e,"length").writable)throw new oa("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t};Yo({target:"Array",proto:!0,arity:1,forced:ne((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=ca(this),r=sa(t),n=arguments.length;!function(e){if(e>9007199254740991)throw ua("Maximum allowed index exceeded")}(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return la(t,r),r}});var fa=go,pa=mo,da=Object.keys||function(e){return fa(e,pa)},ha=oe,va=we,ya=ce,ga=ne,ma=da,ba=Eo,wa=se,Ea=Ct,Sa=ke,Pa=Object.assign,Oa=Object.defineProperty,Ia=va([].concat),xa=!Pa||ga((function(){if(ha&&1!==Pa({b:1},Pa(Oa({},"a",{enumerable:!0,get:function(){Oa(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==Pa({},e)[r]||ma(Pa({},t)).join("")!==n}))?function(e,t){for(var r=Ea(e),n=arguments.length,o=1,i=ba.f,a=wa.f;n>o;)for(var u,c=Sa(arguments[o++]),s=i?Ia(ma(c),i(c)):ma(c),l=s.length,f=0;l>f;)u=s[f++],ha&&!ya(a,c,u)||(r[u]=c[u]);return r}:Pa,_a=xa;Yo({target:"Object",stat:!0,arity:2,forced:Object.assign!==_a},{assign:_a});var ja={},ka=oe,Ta=Or,Aa=Pr,Ma=jr,Ra=Ne,La=da;ja.f=ka&&!Ta?Object.defineProperties:function(e,t){Ma(e);for(var r,n=Ra(t),o=La(t),i=o.length,a=0;i>a;)Aa.f(e,r=o[a++],n[r]);return e};var Ca,Na=Ge("document","documentElement"),Ua=jr,Da=ja,$a=mo,Ba=ln,Fa=Na,Wa=fr,Ga="prototype",Ka="script",za=sn("IE_PROTO"),Va=function(){},Ha=function(e){return"<"+Ka+">"+e+"</"+Ka+">"},qa=function(e){e.write(Ha("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ya=function(){try{Ca=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;Ya="undefined"!=typeof document?document.domain&&Ca?qa(Ca):(t=Wa("iframe"),r="java"+Ka+":",t.style.display="none",Fa.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Ha("document.F=Object")),e.close(),e.F):qa(Ca);for(var n=$a.length;n--;)delete Ya[Ga][$a[n]];return Ya()};Ba[za]=!0;var Za=Object.create||function(e,t){var r;return null!==e?(Va[Ga]=Ua(e),r=new Va,Va[Ga]=null,r[za]=e):r=Ya(),void 0===t?r:Da.f(r,t)},Ja=Xt,Xa=Za,Qa=Pr.f,eu=Ja("unscopables"),tu=Array.prototype;void 0===tu[eu]&&Qa(tu,eu,{configurable:!0,value:Xa(null)});var ru,nu=lo.includes;Yo({target:"Array",proto:!0,forced:ne((function(){return!Array(1).includes()}))},{includes:function(e){return nu(this,e,arguments.length>1?arguments[1]:void 0)}}),ru="includes",tu[eu][ru]=!0;var ou,iu="\t\n\v\f\r                 \u2028\u2029\ufeff",au=Re,uu=Oi,cu=iu,su=we("".replace),lu=RegExp("^["+cu+"]+"),fu=RegExp("(^|[^"+cu+"])["+cu+"]+$"),pu=function(e){return function(t){var r=uu(au(t));return 1&e&&(r=su(r,lu,"")),2&e&&(r=su(r,fu,"$1")),r}},du={start:pu(1),end:pu(2),trim:pu(3)},hu=Yr.PROPER,vu=iu,yu=du.trim;Yo({target:"String",proto:!0,forced:(ou="trim",ne((function(){return!!vu[ou]()||"​…᠎"!=="​…᠎"[ou]()||hu&&vu[ou].name!==ou})))},{trim:function(){return yu(this)}});var gu,mu,bu=jr,wu=ne,Eu=te.RegExp,Su=wu((function(){var e=Eu("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Pu=Su||wu((function(){return!Eu("a","y").sticky})),Ou={BROKEN_CARET:Su||wu((function(){var e=Eu("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Pu,UNSUPPORTED_Y:Su},Iu=ne,xu=te.RegExp,_u=Iu((function(){var e=xu(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),ju=ne,ku=te.RegExp,Tu=ju((function(){var e=ku("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Au=ce,Mu=we,Ru=Oi,Lu=function(){var e=bu(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Cu=Ou,Nu=Za,Uu=On.get,Du=_u,$u=Tu,Bu=Mt("native-string-replace",String.prototype.replace),Fu=RegExp.prototype.exec,Wu=Fu,Gu=Mu("".charAt),Ku=Mu("".indexOf),zu=Mu("".replace),Vu=Mu("".slice),Hu=(mu=/b*/g,Au(Fu,gu=/a/,"a"),Au(Fu,mu,"a"),0!==gu.lastIndex||0!==mu.lastIndex),qu=Cu.BROKEN_CARET,Yu=void 0!==/()??/.exec("")[1];(Hu||Yu||qu||Du||$u)&&(Wu=function(e){var t,r,n,o,i,a,u,c=this,s=Uu(c),l=Ru(e),f=s.raw;if(f)return f.lastIndex=c.lastIndex,t=Au(Wu,f,l),c.lastIndex=f.lastIndex,t;var p=s.groups,d=qu&&c.sticky,h=Au(Lu,c),v=c.source,y=0,g=l;if(d&&(h=zu(h,"y",""),-1===Ku(h,"g")&&(h+="g"),g=Vu(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Gu(l,c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",h)),Yu&&(r=new RegExp("^"+v+"$(?!\\s)",h)),Hu&&(n=c.lastIndex),o=Au(Fu,d?r:c,g),d?o?(o.input=Vu(o.input,y),o[0]=Vu(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Hu&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Yu&&o&&o.length>1&&Au(Bu,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=Nu(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Zu=Wu;Yo({target:"RegExp",proto:!0,forced:/./.exec!==Zu},{exec:Zu});var Ju=ce,Xu=Hn,Qu=Zu,ec=ne,tc=Xt,rc=Wr,nc=tc("species"),oc=RegExp.prototype,ic=function(e,t,r,n){var o=tc(e),i=!ec((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),a=i&&!ec((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[nc]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var u=/./[o],c=t(o,""[e],(function(e,t,r,n,o){var a=t.exec;return a===Qu||a===oc.exec?i&&!o?{done:!0,value:Ju(u,t,r,n)}:{done:!0,value:Ju(e,r,t,n)}:{done:!1}}));Xu(String.prototype,e,c[0]),Xu(oc,o,c[1])}n&&rc(oc[o],"sham",!0)},ac=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},uc=ce,cc=jr,sc=De,lc=Oe,fc=Zu,pc=TypeError,dc=function(e,t){var r=e.exec;if(sc(r)){var n=uc(r,e,t);return null!==n&&cc(n),n}if("RegExp"===lc(e))return uc(fc,e,t);throw new pc("RegExp#exec called on incompatible receiver")},hc=ce,vc=jr,yc=Te,gc=Re,mc=ac,bc=Oi,wc=gt,Ec=dc;ic("search",(function(e,t,r){return[function(t){var r=gc(this),n=yc(t)?void 0:wc(t,e);return n?hc(n,t,r):new RegExp(t)[e](bc(r))},function(e){var n=vc(this),o=bc(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;mc(a,0)||(n.lastIndex=0);var u=Ec(n,o);return mc(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]}));const Sc=e=>{const t=window.location.search.substr(1).split("&"),r=`${e}=`,n=t.filter((e=>e.search(r)>=0));return n.length>0?n[0].substring(n[0].search(r)+r.length):""};let Pc="true"===Sc("unisphereVerbose")?"log":Sc("unisphereVerbose")||"";const Oc=["log","debug"].includes(Pc)?Pc:"warn",Ic=Sc("unisphereEnvironment")||"prod";let xc=localStorage.getItem("unisphereDevLoader")||null;const _c=Sc("unispherePresets")||null,jc={logLevel:Oc,loaderUrl:xc,verbose:Pc,environment:"dev"===Ic?"dev":"prod",presets:_c?_c.split(",").map((e=>e.trim())):null},kc=()=>jc;let Tc=window.unisphere;function Ac(e,t,r){return e in Tc?{value:Tc[e],isNew:!1}:(null==t||t.debug(`${e} not found on 'window.unisphere', creating with default value`,{data:{defaultValue:r}}),Tc[e]=r,{value:r,isNew:!0})}"unisphere"in window||(Tc=window.unisphere={});const Mc={logToConsole:!0,logLevel:kc().logLevel};class Rc{static createWorkspaceLogger(e){return new Rc(e)}kill(){this._killed=!0}constructor(e){this.workspaceName=e,this._killed=!1,this._settings=Object.assign({},Mc)}getLogger(e){return this._killed&&console.warn("Logger factory is killed, returning a new logger anyway"),new Lc(this.workspaceName,e,this.getSettings.bind(this))}getSettings(){return this._settings}updateSettings(e){this._settings=Object.assign(Object.assign({},this._settings),e)}}class Lc{constructor(e,t,r){this.workspaceName=e,this.runtime=t,this._getSettings=r;const n=function(){const{value:e}=Ac("loggers",null,{interceptors:[],logMessages:[]});return e}();this._globalLoggers=n}logMessage(e,t,r,n){const o={workspaceName:this.workspaceName,runtime:this.runtime,time:(new Date).toISOString(),message:t,data:r,error:n,level:e},i=this._getSettings();if(this._globalLoggers.logMessages.push(o),this._globalLoggers.interceptors.forEach((e=>{e(o)})),i.logToConsole&&this.shouldLog(e,i.logLevel)){const t=`${o.time} [Unisphere.${o.runtime}] ${o.message}`;switch(e){case"debug":console.debug(t,o.data);break;case"log":console.log(t,o.data);break;case"warn":console.warn(t,o.data);break;case"error":console.error(t,{data:o.data,error:o.error})}}}shouldLog(e,t){const r=["debug","log","warn","error"];return r.indexOf(e)>=r.indexOf(t)}log(e,t){this.logMessage("log",e,null==t?void 0:t.data)}debug(e,t){this.logMessage("debug",e,null==t?void 0:t.data)}warn(e,t){this.logMessage("warn",e,null==t?void 0:t.data)}error(e,t){this.logMessage("error",e,null==t?void 0:t.data,null==t?void 0:t.error)}}var Cc,Nc=Oe,Uc=we,Dc=function(e){if("Function"===Nc(e))return Uc(e)},$c=Be,Bc=Oe,Fc=Xt("match"),Wc=TypeError,Gc=function(e){if(function(e){var t;return $c(e)&&(void 0!==(t=e[Fc])?!!t:"RegExp"===Bc(e))}(e))throw new Wc("The method doesn't accept regular expressions");return e},Kc=Xt("match"),zc=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Kc]=!1,"/./"[e](t)}catch(e){}}return!1},Vc=Yo,Hc=Dc,qc=re.f,Yc=oo,Zc=Oi,Jc=Gc,Xc=Re,Qc=zc,es=Hc("".slice),ts=Math.min,rs=Qc("startsWith");function ns(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))}Vc({target:"String",proto:!0,forced:!(!rs&&(Cc=qc(String.prototype,"startsWith"),Cc&&!Cc.writable)||rs)},{startsWith:function(e){var t=Zc(Xc(this));Jc(e);var r=Yc(ts(arguments.length>1?arguments[1]:void 0,t.length)),n=Zc(e);return es(t,r,r+n.length)===n}}),"function"==typeof SuppressedError&&SuppressedError;var os="process"===Oe(te.process),is=Pr.f,as=Dt,us=Xt("toStringTag"),cs=Wn,ss=Pr,ls=Ge,fs=oe,ps=Xt("species"),ds=Ke,hs=TypeError,vs=we,ys=ne,gs=De,ms=Ei,bs=rn,ws=function(){},Es=Ge("Reflect","construct"),Ss=/^\s*(?:class|function)\b/,Ps=vs(Ss.exec),Os=!Ss.test(ws),Is=function(e){if(!gs(e))return!1;try{return Es(ws,[],e),!0}catch(e){return!1}},xs=function(e){if(!gs(e))return!1;switch(ms(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Os||!!Ps(Ss,bs(e))}catch(e){return!0}};xs.sham=!0;var _s,js,ks,Ts,As=!Es||ys((function(){var e;return Is(Is.call)||!Is(Object)||!Is((function(){e=!0}))||e}))?xs:Is,Ms=As,Rs=lt,Ls=TypeError,Cs=jr,Ns=Te,Us=Xt("species"),Ds=ht,$s=ie,Bs=Dc(Dc.bind),Fs=function(e,t){return Ds(e),void 0===t?e:$s?Bs(e,t):function(){return e.apply(t,arguments)}},Ws=we([].slice),Gs=TypeError,Ks=/(?:ipad|iphone|ipod).*applewebkit/i.test(ze),zs=te,Vs=ei,Hs=Fs,qs=De,Ys=Dt,Zs=ne,Js=Na,Xs=Ws,Qs=fr,el=Ks,tl=os,rl=zs.setImmediate,nl=zs.clearImmediate,ol=zs.process,il=zs.Dispatch,al=zs.Function,ul=zs.MessageChannel,cl=zs.String,sl=0,ll={},fl="onreadystatechange";Zs((function(){_s=zs.location}));var pl=function(e){if(Ys(ll,e)){var t=ll[e];delete ll[e],t()}},dl=function(e){return function(){pl(e)}},hl=function(e){pl(e.data)},vl=function(e){zs.postMessage(cl(e),_s.protocol+"//"+_s.host)};rl&&nl||(rl=function(e){!function(e,t){if(e<t)throw new Gs("Not enough arguments")}(arguments.length,1);var t=qs(e)?e:al(e),r=Xs(arguments,1);return ll[++sl]=function(){Vs(t,void 0,r)},js(sl),sl},nl=function(e){delete ll[e]},tl?js=function(e){ol.nextTick(dl(e))}:il&&il.now?js=function(e){il.now(dl(e))}:ul&&!el?(Ts=(ks=new ul).port2,ks.port1.onmessage=hl,js=Hs(Ts.postMessage,Ts)):zs.addEventListener&&qs(zs.postMessage)&&!zs.importScripts&&_s&&"file:"!==_s.protocol&&!Zs(vl)?(js=vl,zs.addEventListener("message",hl,!1)):js=fl in Qs("script")?function(e){Js.appendChild(Qs("script"))[fl]=function(){Js.removeChild(this),pl(e)}}:function(e){setTimeout(dl(e),0)});var yl={set:rl,clear:nl},gl=te,ml=oe,bl=Object.getOwnPropertyDescriptor,wl=function(){this.head=null,this.tail=null};wl.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var El,Sl,Pl,Ol,Il,xl=wl,_l=/ipad|iphone|ipod/i.test(ze)&&"undefined"!=typeof Pebble,jl=/web0s(?!.*chrome)/i.test(ze),kl=te,Tl=Fs,Al=yl.set,Ml=xl,Rl=Ks,Ll=_l,Cl=jl,Nl=os,Ul=kl.MutationObserver||kl.WebKitMutationObserver,Dl=kl.document,$l=kl.process,Bl=kl.Promise,Fl=function(e){if(!ml)return gl[e];var t=bl(gl,e);return t&&t.value}("queueMicrotask");if(!Fl){var Wl=new Ml,Gl=function(){var e,t;for(Nl&&(e=$l.domain)&&e.exit();t=Wl.get();)try{t()}catch(e){throw Wl.head&&El(),e}e&&e.enter()};Rl||Nl||Cl||!Ul||!Dl?!Ll&&Bl&&Bl.resolve?((Ol=Bl.resolve(void 0)).constructor=Bl,Il=Tl(Ol.then,Ol),El=function(){Il(Gl)}):Nl?El=function(){$l.nextTick(Gl)}:(Al=Tl(Al,kl),El=function(){Al(Gl)}):(Sl=!0,Pl=Dl.createTextNode(""),new Ul(Gl).observe(Pl,{characterData:!0}),El=function(){Pl.data=Sl=!Sl}),Fl=function(e){Wl.head||El(),Wl.add(e)}}var Kl=Fl,zl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Vl=te.Promise,Hl="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,ql=!Hl&&!os&&"object"==typeof window&&"object"==typeof document,Yl=te,Zl=Vl,Jl=De,Xl=Fo,Ql=rn,ef=Xt,tf=ql,rf=Hl,nf=Xe;Zl&&Zl.prototype;var of=ef("species"),af=!1,uf=Jl(Yl.PromiseRejectionEvent),cf=Xl("Promise",(function(){var e=Ql(Zl),t=e!==String(Zl);if(!t&&66===nf)return!0;if(!nf||nf<51||!/native code/.test(e)){var r=new Zl((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[of]=n,!(af=r.then((function(){}))instanceof n))return!0}return!t&&(tf||rf)&&!uf})),sf={CONSTRUCTOR:cf,REJECTION_EVENT:uf,SUBCLASSING:af},lf={},ff=ht,pf=TypeError,df=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new pf("Bad Promise constructor");t=e,r=n})),this.resolve=ff(t),this.reject=ff(r)};lf.f=function(e){return new df(e)};var hf,vf,yf,gf,mf,bf,wf,Ef=Yo,Sf=os,Pf=te,Of=ce,If=Hn,xf=si,_f=ht,jf=De,kf=Be,Tf=function(e,t){var r,n=Cs(e).constructor;return void 0===n||Ns(r=Cs(n)[Us])?t:function(e){if(Ms(e))return e;throw new Ls(Rs(e)+" is not a constructor")}(r)},Af=yl.set,Mf=Kl,Rf=zl,Lf=xl,Cf=On,Nf=Vl,Uf=lf,Df="Promise",$f=sf.CONSTRUCTOR,Bf=sf.REJECTION_EVENT,Ff=sf.SUBCLASSING,Wf=Cf.getterFor(Df),Gf=Cf.set,Kf=Nf&&Nf.prototype,zf=Nf,Vf=Kf,Hf=Pf.TypeError,qf=Pf.document,Yf=Pf.process,Zf=Uf.f,Jf=Zf,Xf=!!(qf&&qf.createEvent&&Pf.dispatchEvent),Qf="unhandledrejection",ep=function(e){var t;return!(!kf(e)||!jf(t=e.then))&&t},tp=function(e,t){var r,n,o,i=t.value,a=1===t.state,u=a?e.ok:e.fail,c=e.resolve,s=e.reject,l=e.domain;try{u?(a||(2===t.rejection&&ap(t),t.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===e.promise?s(new Hf("Promise-chain cycle")):(n=ep(r))?Of(n,r,c,s):c(r)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},rp=function(e,t){e.notified||(e.notified=!0,Mf((function(){for(var r,n=e.reactions;r=n.get();)tp(r,e);e.notified=!1,t&&!e.rejection&&op(e)})))},np=function(e,t,r){var n,o;Xf?((n=qf.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Pf.dispatchEvent(n)):n={promise:t,reason:r},!Bf&&(o=Pf["on"+e])?o(n):e===Qf&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",r)},op=function(e){Of(Af,Pf,(function(){var t,r=e.facade,n=e.value;if(ip(e)&&(t=Rf((function(){Sf?Yf.emit("unhandledRejection",n,r):np(Qf,r,n)})),e.rejection=Sf||ip(e)?2:1,t.error))throw t.value}))},ip=function(e){return 1!==e.rejection&&!e.parent},ap=function(e){Of(Af,Pf,(function(){var t=e.facade;Sf?Yf.emit("rejectionHandled",t):np("rejectionhandled",t,e.value)}))},up=function(e,t,r){return function(n){e(t,n,r)}},cp=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,rp(e,!0))},sp=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new Hf("Promise can't be resolved itself");var n=ep(t);n?Mf((function(){var r={done:!1};try{Of(n,t,up(sp,r,e),up(cp,r,e))}catch(t){cp(r,t,e)}})):(e.value=t,e.state=1,rp(e,!1))}catch(t){cp({done:!1},t,e)}}};if($f&&(Vf=(zf=function(e){(function(e,t){if(ds(t,e))return e;throw new hs("Incorrect invocation")})(this,Vf),_f(e),Of(hf,this);var t=Wf(this);try{e(up(sp,t),up(cp,t))}catch(e){cp(t,e)}}).prototype,(hf=function(e){Gf(this,{type:Df,done:!1,notified:!1,parent:!1,reactions:new Lf,rejection:!1,state:0,value:void 0})}).prototype=If(Vf,"then",(function(e,t){var r=Wf(this),n=Zf(Tf(this,zf));return r.parent=!0,n.ok=!jf(e)||e,n.fail=jf(t)&&t,n.domain=Sf?Yf.domain:void 0,0===r.state?r.reactions.add(n):Mf((function(){tp(n,r)})),n.promise})),vf=function(){var e=new hf,t=Wf(e);this.promise=e,this.resolve=up(sp,t),this.reject=up(cp,t)},Uf.f=Zf=function(e){return e===zf||void 0===e?new vf(e):Jf(e)},jf(Nf)&&Kf!==Object.prototype)){yf=Kf.then,Ff||If(Kf,"then",(function(e,t){var r=this;return new zf((function(e,t){Of(yf,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Kf.constructor}catch(e){}xf&&xf(Kf,Vf)}Ef({global:!0,constructor:!0,wrap:!0,forced:$f},{Promise:zf}),bf=Df,wf=!1,(mf=zf)&&!wf&&(mf=mf.prototype),mf&&!as(mf,us)&&is(mf,us,{configurable:!0,value:bf}),gf=ls(Df),fs&&gf&&!gf[ps]&&function(e,t,r){r.get&&cs(r.get,t,{getter:!0}),r.set&&cs(r.set,t,{setter:!0}),ss.f(e,t,r)}(gf,ps,{configurable:!0,get:function(){return this}});var lp={},fp=lp,pp=Xt("iterator"),dp=Array.prototype,hp=Ei,vp=gt,yp=Te,gp=lp,mp=Xt("iterator"),bp=function(e){if(!yp(e))return vp(e,mp)||vp(e,"@@iterator")||gp[hp(e)]},wp=ce,Ep=ht,Sp=jr,Pp=lt,Op=bp,Ip=TypeError,xp=ce,_p=jr,jp=gt,kp=Fs,Tp=ce,Ap=jr,Mp=lt,Rp=ao,Lp=Ke,Cp=bp,Np=function(e,t,r){var n,o;_p(e);try{if(!(n=jp(e,"return"))){if("throw"===t)throw r;return r}n=xp(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return _p(n),r},Up=TypeError,Dp=function(e,t){this.stopped=e,this.result=t},$p=Dp.prototype,Bp=function(e,t,r){var n,o,i,a,u,c,s,l,f=r&&r.that,p=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=kp(t,f),g=function(e){return n&&Np(n,"normal",e),new Dp(!0,e)},m=function(e){return p?(Ap(e),v?y(e[0],e[1],g):y(e[0],e[1])):v?y(e,g):y(e)};if(d)n=e.iterator;else if(h)n=e;else{if(!(o=Cp(e)))throw new Up(Mp(e)+" is not iterable");if(void 0!==(l=o)&&(fp.Array===l||dp[pp]===l)){for(i=0,a=Rp(e);a>i;i++)if((u=m(e[i]))&&Lp($p,u))return u;return new Dp(!1)}n=function(e,t){var r=arguments.length<2?Op(e):t;if(Ep(r))return Sp(wp(r,e));throw new Ip(Pp(e)+" is not iterable")}(e,o)}for(c=d?e.next:n.next;!(s=Tp(c,n)).done;){try{u=m(s.value)}catch(e){Np(n,"throw",e)}if("object"==typeof u&&u&&Lp($p,u))return u}return new Dp(!1)},Fp=Xt("iterator"),Wp=!1;try{var Gp=0,Kp={next:function(){return{done:!!Gp++}},return:function(){Wp=!0}};Kp[Fp]=function(){return this},Array.from(Kp,(function(){throw 2}))}catch(e){}var zp=Vl,Vp=sf.CONSTRUCTOR||!function(e,t){try{if(!t&&!Wp)return!1}catch(e){return!1}var r=!1;try{var n={};n[Fp]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}((function(e){zp.all(e).then(void 0,(function(){}))})),Hp=ce,qp=ht,Yp=lf,Zp=zl,Jp=Bp;Yo({target:"Promise",stat:!0,forced:Vp},{all:function(e){var t=this,r=Yp.f(t),n=r.resolve,o=r.reject,i=Zp((function(){var r=qp(t.resolve),i=[],a=0,u=1;Jp(e,(function(e){var c=a++,s=!1;u++,Hp(r,t,e).then((function(e){s||(s=!0,i[c]=e,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var Xp=Yo,Qp=sf.CONSTRUCTOR,ed=Vl,td=Ge,rd=De,nd=Hn,od=ed&&ed.prototype;if(Xp({target:"Promise",proto:!0,forced:Qp,real:!0},{catch:function(e){return this.then(void 0,e)}}),rd(ed)){var id=td("Promise").prototype.catch;od.catch!==id&&nd(od,"catch",id,{unsafe:!0})}var ad=ce,ud=ht,cd=lf,sd=zl,ld=Bp;Yo({target:"Promise",stat:!0,forced:Vp},{race:function(e){var t=this,r=cd.f(t),n=r.reject,o=sd((function(){var o=ud(t.resolve);ld(e,(function(e){ad(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var fd=lf;Yo({target:"Promise",stat:!0,forced:sf.CONSTRUCTOR},{reject:function(e){var t=fd.f(this);return(0,t.reject)(e),t.promise}});var pd=jr,dd=Be,hd=lf,vd=Yo,yd=sf.CONSTRUCTOR;Ge("Promise"),vd({target:"Promise",stat:!0,forced:yd},{resolve:function(e){return function(e,t){if(pd(e),dd(t)&&t.constructor===e)return t;var r=hd.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});const gd=Rc.createWorkspaceLogger("window").getLogger("fetchers"),{value:{factoriesByOwner:md}}=Ac("factoriesByOwner",gd,{factoriesByOwner:{}});function bd(e){return ns(this,arguments,void 0,(function*({owner:e,url:t}){let r=md[e];r||(gd.log(`no factories found for ${e}, creating new list`),r=[],md[e]=r);const n=r.find((e=>e.url===t));if(null==n?void 0:n.factoryModule)return gd.log(`using cached factory module for ${t}`),{factoryModule:n.factoryModule,error:null};const o=r.find((e=>e.url===t));if(o)return gd.log(`a request to fetch factory already in progress for ${t}, waiting for it to finish`),new Promise(((e,t)=>{o.onFetched.push(e),o.onError.push(t)}));gd.log(`fetching factory module for ${t}`);const i={url:t,factoryModule:null,error:null,onFetched:[],onError:[]};r.push(i);try{const e=yield import(t);gd.log(`fetched factory module for ${t}, caching it`),i.factoryModule=e,i.onFetched&&(gd.log(`calling onFetched callbacks for ${t} (${i.onFetched.length} queued)`),i.onFetched.forEach((r=>{try{r(e)}catch(e){gd.error(`error calling onFetched callback for ${t}`,{error:e})}}))),i.onFetched=[],i.onError=[]}catch(e){gd.log(`failed to fetch factory module for ${t}, removing from list`),i.onError&&(gd.log(`calling onError callbacks for ${t} (${i.onError.length} queued)`),i.onError.forEach((r=>{try{r(e)}catch(e){gd.error(`error calling onError callback for ${t}`,{error:e})}}))),i.onError=[],i.onFetched=[],r.splice(r.indexOf(i),1)}return{factoryModule:i.factoryModule,error:i.error}}))}const wd=kc(),Ed=e=>ns(void 0,void 0,void 0,(function*(){const t=Rc.createWorkspaceLogger(e.workspaceName||"").getLogger("fetch-loader");let r="",n="";if(wd.loaderUrl?(t.log(`using custom loader url from query params '${wd.loaderUrl}'`),n=wd.loaderUrl):e.devLoaderUrl&&(t.log(`using custom loader url from options '${e.devLoaderUrl}'`),n=e.devLoaderUrl),n){t.log(`verifying custom loader url '${n}' url against environment runtime json. fetching runtime json...`);const o=yield((e,t)=>ns(void 0,void 0,void 0,(function*(){let r,n=`${e}/runtime.json`;try{t.log(`loading runtime versions for env from '${n}'`),r=yield fetch(n).then((e=>e.json()))}catch(e){throw t.error(`error loading runtime versions for env from '${n}'`,{error:e}),new Error(`failed to load runtime versions for env from '${n}'`)}if(!r||!("domains"in r))throw new Error("invalid runtime json, 'domains' is missing in the runtime json");return r.domains})))(e.serverUrl,t),i=n.startsWith(e.serverUrl),a=o.some((e=>n.startsWith(e)));if(t.log("ensuring custom loader url is in environment artifacts or from an allowed domain",{data:{customLoaderUrl:n,serverUrl:e.serverUrl,isInEnvironmentArtifacts:i,isInAllowedDomains:a}}),!i&&!a)throw new Error(`the custom loader url '${n}' is not in the environment artifacts or from an allowed domain`);t.log(`using custom loader url '${n}'`),r=n}else t.log("using environment loader"),r=`${e.serverUrl}/loader/index.esm.js`;t.log("fetching environment unisphere loader",{data:{environmentLoaderUrl:r,options:e}});const{factoryModule:{loader:o}}=yield bd({owner:"runtime-js",url:r});if(!o)throw new Error(`failed to load dev loader from '${r}'`);return t.log("executing environment unisphere loader"),o(Object.assign({},e))}));var Sd=Yo,Pd=Dc,Od=re.f,Id=oo,xd=Oi,_d=Gc,jd=Re,kd=zc,Td=Pd("".slice),Ad=Math.min,Md=kd("endsWith"),Rd=!Md&&!!function(){var e=Od(String.prototype,"endsWith");return e&&!e.writable}();Sd({target:"String",proto:!0,forced:!Rd&&!Md},{endsWith:function(e){var t=xd(jd(this));_d(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,o=void 0===r?n:Ad(Id(r),n),i=xd(e);return Td(t,o-i.length,o)===i}});var Ld=we,Cd=Xn,Nd=Oi,Ud=Re,Dd=Ld("".charAt),$d=Ld("".charCodeAt),Bd=Ld("".slice),Fd=function(e){return function(t,r){var n,o,i=Nd(Ud(t)),a=Cd(r),u=i.length;return a<0||a>=u?e?"":void 0:(n=$d(i,a))<55296||n>56319||a+1===u||(o=$d(i,a+1))<56320||o>57343?e?Dd(i,a):n:e?Bd(i,a,a+2):o-56320+(n-55296<<10)+65536}},Wd=(Fd(!1),Fd(!0)),Gd=we,Kd=Ct,zd=Math.floor,Vd=Gd("".charAt),Hd=Gd("".replace),qd=Gd("".slice),Yd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Zd=/\$([$&'`]|\d{1,2})/g,Jd=ei,Xd=ce,Qd=we,eh=ic,th=ne,rh=jr,nh=De,oh=Te,ih=Xn,ah=oo,uh=Oi,ch=Re,sh=function(e,t,r){return t+(r?Wd(e,t).length:1)},lh=gt,fh=function(e,t,r,n,o,i){var a=r+e.length,u=n.length,c=Zd;return void 0!==o&&(o=Kd(o),c=Yd),Hd(i,c,(function(i,c){var s;switch(Vd(c,0)){case"$":return"$";case"&":return e;case"`":return qd(t,0,r);case"'":return qd(t,a);case"<":s=o[qd(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>u){var f=zd(l/10);return 0===f?i:f<=u?void 0===n[f-1]?Vd(c,1):n[f-1]+Vd(c,1):i}s=n[l-1]}return void 0===s?"":s}))},ph=dc,dh=Xt("replace"),hh=Math.max,vh=Math.min,yh=Qd([].concat),gh=Qd([].push),mh=Qd("".indexOf),bh=Qd("".slice),wh="$0"==="a".replace(/./,"$0"),Eh=!!/./[dh]&&""===/./[dh]("a","$0");function Sh(e){return ns(this,void 0,void 0,(function*(){return(yield function(){const e=window;return new Promise((t=>{var r,n;if(null===(n=null===(r=e.unisphere)||void 0===r?void 0:r.instancesManager)||void 0===n?void 0:n.get)t(e.unisphere.instancesManager.get);else{const r=()=>{document.removeEventListener("unisphere-ready",r),t(e.unisphere.instancesManager.get)};document.addEventListener("unisphere-ready",r)}}))}())(e)}))}function Ph(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ph=function(){return!!e})()}eh("replace",(function(e,t,r){var n=Eh?"$":"$0";return[function(e,r){var n=ch(this),o=oh(e)?void 0:lh(e,dh);return o?Xd(o,e,n,r):Xd(t,uh(n),e,r)},function(e,o){var i=rh(this),a=uh(e);if("string"==typeof o&&-1===mh(o,n)&&-1===mh(o,"$<")){var u=r(t,i,a,o);if(u.done)return u.value}var c=nh(o);c||(o=uh(o));var s,l=i.global;l&&(s=i.unicode,i.lastIndex=0);for(var f,p=[];null!==(f=ph(i,a))&&(gh(p,f),l);)""===uh(f[0])&&(i.lastIndex=sh(a,ah(i.lastIndex),s));for(var d,h="",v=0,y=0;y<p.length;y++){for(var g,m=uh((f=p[y])[0]),b=hh(vh(ih(f.index),a.length),0),w=[],E=1;E<f.length;E++)gh(w,void 0===(d=f[E])?d:String(d));var S=f.groups;if(c){var P=yh([m],w,b,a);void 0!==S&&gh(P,S),g=uh(Jd(o,void 0,P))}else g=fh(m,a,b,w,S,o);b>=v&&(h+=bh(a,v,b)+g,v=b+m.length)}return h+bh(a,v)}]}),!!th((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!wh||Eh),kc();var Oh=function(e){function t(e,r,n){var i,a,u,c;return o(this,t),a=this,c=[e,r,n],u=l(u=t),d(i=s(a,Ph()?Reflect.construct(u,c||[],l(a).constructor):u.apply(a,c)),"isReady",!1),d(i,"workspaceName",""),d(i,"shouldCreateWorkspace",!1),i.unispherePluginManager=new X(r,i.eventManager,i.logger),i.player.config.provider.unisphereLoaderUrl&&"string"==typeof i.config.workspaceName?i.workspaceName=i.config.workspaceName:(i.workspaceName=F("kaltura_player_workspace_"),i.shouldCreateWorkspace=!0),i}return p(t,e),c(t,[{key:"getWorkspace",value:(r=n(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.shouldCreateWorkspace){e.next=2;break}return e.abrupt("return",Ed({serverUrl:this.player.config.provider.unisphereLoaderUrl,workspaceName:this.workspaceName,ui:{theme:"light",language:"en"}}));case 2:return e.abrupt("return",Sh(this.config.workspaceName));case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"loadMedia",value:function(){var e=this;this.isReady?(this.unispherePluginManager.updateSessionData(),this.unispherePluginManager.loadWidgets(this.config.widgets)):this.getWorkspace().then((function(t){e.unispherePluginManager.init(t,e.config.widgets),e.unispherePluginManager.updateSessionData(),e.isReady=!0})).catch((function(){e.logger.warn("Failed to load unisphere workspace",e.workspaceName)}))}},{key:"reset",value:function(){this.unispherePluginManager.reset()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.unispherePluginManager.destroy()}}],[{key:"isValid",value:function(){return!0}}]);var r}(e.BasePlugin);d(Oh,"defaultConfig",{widgets:[]}),(0,e.registerPlugin)("unisphere",Oh)})(),{}})()));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("KalturaPlayer",[],t):"object"==typeof exports?exports.KalturaPlayer=t():(e.KalturaPlayer=e.KalturaPlayer||{},e.KalturaPlayer.plugins=e.KalturaPlayer.plugins||{},e.KalturaPlayer.plugins.unisphere=t())}(self,(()=>(()=>{var e={51:(e,t,r)=>{var n=r(564).default;function o(){"use strict";e.exports=o=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var t,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(t){p=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof w?t:w,i=Object.create(o.prototype),a=new R(n||[]);return u(i,"_invoke",{value:k(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var v="suspendedStart",y="suspendedYield",g="executing",m="completed",b={};function w(){}function E(){}function S(){}var P={};p(P,s,(function(){return this}));var O=Object.getPrototypeOf,I=O&&O(O(L([])));I&&I!==i&&a.call(I,s)&&(P=I);var x=S.prototype=w.prototype=Object.create(P);function _(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function r(o,i,u,c){var s=h(e[o],e,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){l.value=e,u(l)}),(function(e){return r("throw",e,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(e,r,n){var o=v;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=T(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?m:y,s.arg===b)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(a.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(n(e)+" is not iterable")}return E.prototype=S,u(x,"constructor",{value:S,configurable:!0}),u(S,"constructor",{value:E,configurable:!0}),E.displayName=p(S,f,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,S):(e.__proto__=S,p(e,f,"GeneratorFunction")),e.prototype=Object.create(x),e},r.awrap=function(e){return{__await:e}},_(j.prototype),p(j.prototype,l,(function(){return this})),r.AsyncIterator=j,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new j(d(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(x),p(x,f,"Generator"),p(x,s,(function(){return this})),p(x,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},r.values=L,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;M(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),b}},r}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},564:e=>{function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},790:(e,t,r)=>{var n=r(51)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=KalturaPlayer;function t(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function n(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,c,"next",e)}function c(e){t(a,o,i,u,c,"throw",e)}u(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function c(e,t,r){return t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}function d(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var h=r(790),v=r.n(h);const y=KalturaPlayer.ui.preact,g=KalturaPlayer.core;var m=function(e){return e.UPPER_BAR_ICON_SHOW="unisphere.event.player.upper-bar-icon.show",e.UPPER_BAR_ICON_CLICK="unisphere.event.player.upper-bar-icon.click",e.SIDE_PANEL_OPEN="unisphere.event.player.side-panel.open",e.SIDE_PANEL_CLOSE="unisphere.event.player.side-panel.close",e.SIDE_PANEL_TOGGLE="unisphere.event.player.side-panel.toggle",e.SET_VALUE_CURRENT_TIME="unisphere.event.player.set-value.current-time",e.CHAPTERS_ADD="unisphere.event.player.chapters.add",e.PLAYER_RESIZE="unisphere.event.player.resize",e.DISPATCH_EVENT="unisphere.event.player.dispatch-event",e.SIDE_PANEL_CLOSED="unisphere.event.player.side-panel.closed",e.SIDE_PANEL_OPENED="unisphere.event.player.side-panel.opened",e}({}),b=function(e){return e.SELECTED_CHAPTER="selectedChapter",e.CURRENT_TIME="currentTime",e.IS_PAUSED="isPaused",e.PLAYER_SESSION="player-session",e.IS_SMALL_SIZE="isSmallSize",e}(b||{}),w=function(e){var t;return(0,y.h)("div",{style:null!==(t=e.style)&&void 0!==t?t:{},id:e.id})},E=e.ui.components,S=E.Tooltip,P=E.Icon,O=function(t){var r=t.id,n=t.label,o=t.iconPath;return(0,y.h)(S,{label:n,type:"bottom"},(0,y.h)("button",{type:"button","data-testid":"playlist_pluginButton","aria-label":n,className:e.ui.style.upperBarIcon},(0,y.h)(P,{id:"unisphere-icon-".concat(r),height:32,width:32,viewBox:"0 0 32 32",path:o})))},I=function(){function e(){o(this,e)}return c(e,null,[{key:"set",value:function(t){e.workspaceInstance=t}},{key:"get",value:function(){return e.workspaceInstance}},{key:"destroy",value:function(){try{this.workspaceInstance.kill()}catch(e){}e.workspaceInstance=null}}])}();function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}d(I,"workspaceInstance",null);var k=function(){function e(){o(this,e)}return c(e,null,[{key:"addToUnsubscribeMap",value:function(t){return e.unsubscribeMap.set(e.sequence,t),++e.sequence,e.sequence}},{key:"unsubscribeAll",value:function(){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return j(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.unsubscribeMap);try{for(r.s();!(t=r.n()).done;){var n=_(t.value,2),o=n[0];(0,n[1])(),e.unsubscribeMap.delete(o)}}catch(e){r.e(e)}finally{r.f()}}},{key:"unsubscribe",value:function(t){var r=e.unsubscribeMap.get(t);r&&(r(),e.unsubscribeMap.delete(t))}}])}();function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}d(k,"unsubscribeMap",new Map),d(k,"sequence",-1);var A,M=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,T()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t)}(k);function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}d(M,"get",function(){var e=n(v().mark((function e(t){var r,n,o,i,a;return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.widgetId,n=t.context,o=t.settings,i=I.get(),e.prev=2,e.next=5,null==i?void 0:i.loadRuntime(r,n,o||{});case 5:return a=e.sent,e.abrupt("return",a?null==a?void 0:a.runtime:null);case 9:return e.prev=9,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0));case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}());var L,C="unisphere.service.pub-sub",N=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,R()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(k);function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}A=N,d(N,"subscribe",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService(C);if(n){var o=n.subscribe(e,t);return A.addToUnsubscribeMap(o)}return-1})),d(N,"emit",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService(C);null==n||n.emit({id:e,version:"1.0.0",payload:t})}));var U="player",$="unisphere.service.storage",B=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,D()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,null,[{key:"destroy",value:function(){t.unsubscribeAll()}}])}(k);function F(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=0;t<5;++t)e+=g.Utils.Generator.uniqueId();return e}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}L=B,d(B,"update",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService($);null==n||n.update(U,e,t)})),d(B,"get",(function(e){var t=I.get(),r=null==t?void 0:t.getService($);return r?r.get(U,e):null})),d(B,"subscribe",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService($);if(n){var o=n.subscribe(t,{namespace:U,property:e,emitLastValue:!0});L.addToUnsubscribeMap(o)}}));var G=function(){return c((function e(){o(this,e),d(this,"_disposers",new Map)}),[{key:"generateId",value:function(e){return F("".concat(e.containerType,"_container_"))}},{key:"getSidePanelsManager",value:function(e){return e.getService("sidePanelsManager")}},{key:"addDisposer",value:function(e,t){this._disposers.set(e,t)}},{key:"dispose",value:function(e){var t=this._disposers.get(e);t&&(t(),this._disposers.delete(e))}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return W(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?W(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this._disposers);try{for(t.s();!(e=t.n()).done;){var r=_(e.value,1)[0];this.dispose(r)}}catch(e){t.e(e)}finally{t.f()}}}])}();function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(K=function(){return!!e})()}var z=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,K()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,[{key:"createContainer",value:function(e,t){var r,n=this,o=this.generateId(t),i=t.unisphereArea,a=t.position,u=t.expandMode,c=t.presets,s=null===(r=this.getSidePanelsManager(e))||void 0===r?void 0:r.add({label:o,panelComponent:function(){return(0,y.h)(w,{style:{height:"100%"},id:o})},presets:c,position:a,expandMode:u});return"number"==typeof s?(this.addDisposer(o,(function(){var t;null===(t=n.getSidePanelsManager(e))||void 0===t||t.remove(s)})),B.update(i,{upperBarIcon:{panelId:s}}),o):null}}])}(G);function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(V=function(){return!!e})()}var H=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,V()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t,[{key:"createContainer",value:function(e,t){var r=this.generateId(t),n=t.playerArea,o=t.presets,i=e.ui.addComponent({label:r,presets:o,area:n,get:function(){return(0,y.h)(w,{style:{width:"inherit"},id:r})}});return this.addDisposer(r,i),r}}])}(G);function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Y=function(){return c((function e(t){o(this,e),d(this,"containerProducers",new Map([["sidepanel",new z],["simple",new H]])),this.player=t}),[{key:"createContainer",value:function(e){var t=this.containerProducers.get(e.containerType);return t?t.createContainer(this.player,e):null}},{key:"destroy",value:function(){var e,t=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return q(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this.containerProducers);try{for(t.s();!(e=t.n()).done;){var r,n=_(e.value,1)[0];null===(r=this.containerProducers.get(n))||void 0===r||r.destroy()}}catch(e){t.e(e)}finally{t.f()}}}])}();function Z(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return J(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var X=e.ui.reducers.shell,Q=function(){return c((function e(t,r,n){o(this,e),d(this,"iconIds",new Map),d(this,"panelIds",new Set),d(this,"persistentIconIds",new Map),this.player=t,this.eventManager=r,this.logger=n,this.containerManager=new Y(t),this.currentIsSmallSize=void 0}),[{key:"upperBarManager",get:function(){return this.player.getService("upperBarManager")}},{key:"sidePanelsManager",get:function(){return this.player.getService("sidePanelsManager")}},{key:"timelineManager",get:function(){return this.player.getService("timeline")}},{key:"cuePointManager",get:function(){return this.player.getService("kalturaCuepoints")}},{key:"addEventHandlers",value:function(){var t=this,r=e.ui.redux.useStore();this.unsubscribeStore=r.subscribe((function(){var e=r.getState().shell.isSmallSize;e!==t.currentIsSmallSize&&(t.currentIsSmallSize=e,B.update(b.IS_SMALL_SIZE,e))})),N.subscribe(m.UPPER_BAR_ICON_SHOW,(function(e){var r=e.payload,n=r.id,o=r.label,i=r.order,a=r.iconPath,u=r.panelId,c=r.isPersistent;t.addUpperBarIcon(n,o,i,a,u,c)})),N.subscribe(m.SIDE_PANEL_OPEN,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.activateItem(o),N.emit(m.SIDE_PANEL_OPENED,n)})),N.subscribe(m.SIDE_PANEL_CLOSE,(function(e){var r,n=e.payload,o=n.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.deactivateItem(o),N.emit(m.SIDE_PANEL_CLOSED,n)})),N.subscribe(m.SIDE_PANEL_TOGGLE,(function(e){var r,n,o,i=e.payload,a=i.panelId;null!==(r=t.sidePanelsManager)&&void 0!==r&&r.isItemActive(a)?(null===(n=t.sidePanelsManager)||void 0===n||n.deactivateItem(a),N.emit(m.SIDE_PANEL_CLOSED,i)):(null===(o=t.sidePanelsManager)||void 0===o||o.activateItem(a),N.emit(m.SIDE_PANEL_OPENED,i))})),N.subscribe(m.SET_VALUE_CURRENT_TIME,(function(e){var r=e.payload.currentTime;r>=0&&(t.player.currentTime=r)})),N.subscribe(m.CHAPTERS_ADD,(function(e){var r=e.payload,n=r.chapters;if(n&&n.length){var o;null===(o=t.timelineManager)||void 0===o||o.disableChapters();for(var i=0;i<n.length;++i){var a,u=n[i],c=u.title,s=+u.time;null===(a=t.timelineManager)||void 0===a||a.addKalturaCuePoint(s,"SummaryAndChapters",i,c,{onClick:function(e){var t=e.cuePoint;B.update(b.SELECTED_CHAPTER,t.id)}})}t.player.ui.store.dispatch(X.actions.updateTimeDisplayIsMinimized(!0)),t.player.dispatchEvent(new g.FakeEvent("UNISPHERE_CHAPTERS_ADDED",r))}})),N.subscribe(m.DISPATCH_EVENT,(function(e){var r=e.payload,n=r.eventName,o=r.data;t.player.dispatchEvent(new g.FakeEvent(n,o))})),this.eventManager.listen(this.player,e.core.EventType.TIME_UPDATE,(function(){B.update(b.CURRENT_TIME,"".concat(t.player.currentTime))})),this.eventManager.listen(this.player,e.ui.EventType.GUI_RESIZE,(function(){N.emit(m.PLAYER_RESIZE,{}),setTimeout((function(){N.emit(m.PLAYER_RESIZE,{})}),1e3)})),this.eventManager.listen(this.player,e.core.EventType.PAUSE,(function(){B.update(b.IS_PAUSED,!0)})),this.eventManager.listen(this.player,e.core.EventType.PLAY,(function(){B.update(b.IS_PAUSED,!1)}))}},{key:"addUpperBarIcon",value:function(e,t,r,n,o,i){var a;if(!this.iconIds.has(e)&&!this.persistentIconIds.has(e)){this.panelIds.add(o);var u=null===(a=this.upperBarManager)||void 0===a?void 0:a.add({displayName:t,ariaLabel:t,order:r,component:function(){return(0,y.h)(O,{id:e,label:t,iconPath:n})},svgIcon:{path:n},onClick:function(){N.emit(m.UPPER_BAR_ICON_CLICK,{id:e,panelId:o})}});i?this.persistentIconIds.set(e,u):this.iconIds.set(e,u)}}},{key:"isVideoClipped",value:function(){var e=this.player.config.sources,t=e.seekFrom,r=e.clipTo,n=e.duration;return"number"==typeof t&&t>0||"number"==typeof r&&r<n}},{key:"shouldLoadWidget",value:function(e){var t=e.widgetId,r=e.context;return!(t.includes("video-summary")&&"kaltura-player-list"===r&&this.isVideoClipped())}},{key:"loadWidgets",value:function(e){var t,r=this,n=Z(e);try{var o=function(){var e=t.value,n=e.widgetId,o=e.context;if(!n||!o||!r.shouldLoadWidget(e))return 1;var i,a=Z(e.containers);try{var u=function(){var t=i.value;if(!t.unisphereArea)return 1;var a=r.containerManager.createContainer(t);a&&M.get(e).then((function(e){null==e||e.assignAreaByName(t.unisphereArea,a)})).catch((function(e){r.logger.warn("Failed to load unisphere widget ".concat(n," with context ").concat(o," "),e)}))};for(a.s();!(i=a.n()).done;)u()}catch(e){a.e(e)}finally{a.f()}};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}}},{key:"init",value:function(e,t){I.set(e),this.addEventHandlers(),this.loadWidgets(t)}},{key:"updateSessionData",value:function(){var e,t;B.update(b.PLAYER_SESSION,{entryId:this.player.sources.id,ks:null===(e=this.player.config.session)||void 0===e?void 0:e.ks,entryName:null===(t=this.player.sources.metadata)||void 0===t?void 0:t.name})}},{key:"reset",value:function(){var e,t=Z(this.panelIds);try{for(t.s();!(e=t.n()).done;){var r,n=e.value;if(null!==(r=this.sidePanelsManager)&&void 0!==r&&r.isItemActive(n)){this.sidePanelsManager.deactivateItem(n);break}}}catch(e){t.e(e)}finally{t.f()}var o,i=Z(this.iconIds.values());try{for(i.s();!(o=i.n()).done;){var a,u=o.value;null===(a=this.upperBarManager)||void 0===a||a.remove(u)}}catch(e){i.e(e)}finally{i.f()}this.iconIds.clear(),this.containerManager.destroy(),this.player.ui.store.dispatch(X.actions.updateTimeDisplayIsMinimized(!1))}},{key:"destroy",value:function(){this.reset(),this.containerManager.destroy();var e,t=Z(this.persistentIconIds.values());try{for(t.s();!(e=t.n()).done;){var r,n=e.value;null===(r=this.upperBarManager)||void 0===r||r.remove(n)}}catch(e){t.e(e)}finally{t.f()}N.destroy(),B.destroy(),I.destroy(),this.unsubscribeStore&&this.unsubscribeStore()}}])}(),ee="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},te=function(e){return e&&e.Math===Math&&e},re=te("object"==typeof globalThis&&globalThis)||te("object"==typeof window&&window)||te("object"==typeof self&&self)||te("object"==typeof ee&&ee)||te("object"==typeof ee&&ee)||function(){return this}()||Function("return this")(),ne={},oe=function(e){try{return!!e()}catch(e){return!0}},ie=!oe((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),ae=!oe((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ue=ae,ce=Function.prototype.call,se=ue?ce.bind(ce):function(){return ce.apply(ce,arguments)},le={},fe={}.propertyIsEnumerable,pe=Object.getOwnPropertyDescriptor,de=pe&&!fe.call({1:2},1);le.f=de?function(e){var t=pe(this,e);return!!t&&t.enumerable}:fe;var he,ve,ye=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ge=ae,me=Function.prototype,be=me.call,we=ge&&me.bind.bind(be,be),Ee=ge?we:function(e){return function(){return be.apply(e,arguments)}},Se=Ee,Pe=Se({}.toString),Oe=Se("".slice),Ie=function(e){return Oe(Pe(e),8,-1)},xe=oe,_e=Ie,je=Object,ke=Ee("".split),Te=xe((function(){return!je("z").propertyIsEnumerable(0)}))?function(e){return"String"===_e(e)?ke(e,""):je(e)}:je,Ae=function(e){return null==e},Me=Ae,Re=TypeError,Le=function(e){if(Me(e))throw new Re("Can't call method on "+e);return e},Ce=Te,Ne=Le,De=function(e){return Ce(Ne(e))},Ue="object"==typeof document&&document.all,$e=void 0===Ue&&void 0!==Ue?function(e){return"function"==typeof e||e===Ue}:function(e){return"function"==typeof e},Be=$e,Fe=function(e){return"object"==typeof e?null!==e:Be(e)},We=re,Ge=$e,Ke=function(e,t){return arguments.length<2?(r=We[e],Ge(r)?r:void 0):We[e]&&We[e][t];var r},ze=Ee({}.isPrototypeOf),Ve="undefined"!=typeof navigator&&String(navigator.userAgent)||"",He=re,qe=Ve,Ye=He.process,Ze=He.Deno,Je=Ye&&Ye.versions||Ze&&Ze.version,Xe=Je&&Je.v8;Xe&&(ve=(he=Xe.split("."))[0]>0&&he[0]<4?1:+(he[0]+he[1])),!ve&&qe&&(!(he=qe.match(/Edge\/(\d+)/))||he[1]>=74)&&(he=qe.match(/Chrome\/(\d+)/))&&(ve=+he[1]);var Qe=ve,et=Qe,tt=oe,rt=re.String,nt=!!Object.getOwnPropertySymbols&&!tt((function(){var e=Symbol("symbol detection");return!rt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&et&&et<41})),ot=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,it=Ke,at=$e,ut=ze,ct=Object,st=ot?function(e){return"symbol"==typeof e}:function(e){var t=it("Symbol");return at(t)&&ut(t.prototype,ct(e))},lt=String,ft=function(e){try{return lt(e)}catch(e){return"Object"}},pt=$e,dt=ft,ht=TypeError,vt=function(e){if(pt(e))return e;throw new ht(dt(e)+" is not a function")},yt=vt,gt=Ae,mt=function(e,t){var r=e[t];return gt(r)?void 0:yt(r)},bt=se,wt=$e,Et=Fe,St=TypeError,Pt={exports:{}},Ot=re,It=Object.defineProperty,xt=function(e,t){try{It(Ot,e,{value:t,configurable:!0,writable:!0})}catch(r){Ot[e]=t}return t},_t=re,jt=xt,kt="__core-js_shared__",Tt=Pt.exports=_t[kt]||jt(kt,{});(Tt.versions||(Tt.versions=[])).push({version:"3.36.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"});var At=Pt.exports,Mt=At,Rt=function(e,t){return Mt[e]||(Mt[e]=t||{})},Lt=Le,Ct=Object,Nt=function(e){return Ct(Lt(e))},Dt=Nt,Ut=Ee({}.hasOwnProperty),$t=Object.hasOwn||function(e,t){return Ut(Dt(e),t)},Bt=Ee,Ft=0,Wt=Math.random(),Gt=Bt(1..toString),Kt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Gt(++Ft+Wt,36)},zt=Rt,Vt=$t,Ht=Kt,qt=nt,Yt=ot,Zt=re.Symbol,Jt=zt("wks"),Xt=Yt?Zt.for||Zt:Zt&&Zt.withoutSetter||Ht,Qt=function(e){return Vt(Jt,e)||(Jt[e]=qt&&Vt(Zt,e)?Zt[e]:Xt("Symbol."+e)),Jt[e]},er=se,tr=Fe,rr=st,nr=mt,or=TypeError,ir=Qt("toPrimitive"),ar=function(e,t){if(!tr(e)||rr(e))return e;var r,n=nr(e,ir);if(n){if(void 0===t&&(t="default"),r=er(n,e,t),!tr(r)||rr(r))return r;throw new or("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&wt(r=e.toString)&&!Et(n=bt(r,e)))return n;if(wt(r=e.valueOf)&&!Et(n=bt(r,e)))return n;if("string"!==t&&wt(r=e.toString)&&!Et(n=bt(r,e)))return n;throw new St("Can't convert object to primitive value")}(e,t)},ur=st,cr=function(e){var t=ar(e,"string");return ur(t)?t:t+""},sr=Fe,lr=re.document,fr=sr(lr)&&sr(lr.createElement),pr=function(e){return fr?lr.createElement(e):{}},dr=pr,hr=!ie&&!oe((function(){return 7!==Object.defineProperty(dr("div"),"a",{get:function(){return 7}}).a})),vr=ie,yr=se,gr=le,mr=ye,br=De,wr=cr,Er=$t,Sr=hr,Pr=Object.getOwnPropertyDescriptor;ne.f=vr?Pr:function(e,t){if(e=br(e),t=wr(t),Sr)try{return Pr(e,t)}catch(e){}if(Er(e,t))return mr(!yr(gr.f,e,t),e[t])};var Or={},Ir=ie&&oe((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xr=Fe,_r=String,jr=TypeError,kr=function(e){if(xr(e))return e;throw new jr(_r(e)+" is not an object")},Tr=ie,Ar=hr,Mr=Ir,Rr=kr,Lr=cr,Cr=TypeError,Nr=Object.defineProperty,Dr=Object.getOwnPropertyDescriptor,Ur="enumerable",$r="configurable",Br="writable";Or.f=Tr?Mr?function(e,t,r){if(Rr(e),t=Lr(t),Rr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Br in r&&!r[Br]){var n=Dr(e,t);n&&n[Br]&&(e[t]=r.value,r={configurable:$r in r?r[$r]:n[$r],enumerable:Ur in r?r[Ur]:n[Ur],writable:!1})}return Nr(e,t,r)}:Nr:function(e,t,r){if(Rr(e),t=Lr(t),Rr(r),Ar)try{return Nr(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Cr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var Fr=Or,Wr=ye,Gr=ie?function(e,t,r){return Fr.f(e,t,Wr(1,r))}:function(e,t,r){return e[t]=r,e},Kr={exports:{}},zr=ie,Vr=$t,Hr=Function.prototype,qr=zr&&Object.getOwnPropertyDescriptor,Yr=Vr(Hr,"name"),Zr={EXISTS:Yr,PROPER:Yr&&"something"===function(){}.name,CONFIGURABLE:Yr&&(!zr||zr&&qr(Hr,"name").configurable)},Jr=$e,Xr=At,Qr=Ee(Function.toString);Jr(Xr.inspectSource)||(Xr.inspectSource=function(e){return Qr(e)});var en,tn,rn,nn=Xr.inspectSource,on=$e,an=re.WeakMap,un=on(an)&&/native code/.test(String(an)),cn=Kt,sn=Rt("keys"),ln=function(e){return sn[e]||(sn[e]=cn(e))},fn={},pn=un,dn=re,hn=Fe,vn=Gr,yn=$t,gn=At,mn=ln,bn=fn,wn="Object already initialized",En=dn.TypeError,Sn=dn.WeakMap;if(pn||gn.state){var Pn=gn.state||(gn.state=new Sn);Pn.get=Pn.get,Pn.has=Pn.has,Pn.set=Pn.set,en=function(e,t){if(Pn.has(e))throw new En(wn);return t.facade=e,Pn.set(e,t),t},tn=function(e){return Pn.get(e)||{}},rn=function(e){return Pn.has(e)}}else{var On=mn("state");bn[On]=!0,en=function(e,t){if(yn(e,On))throw new En(wn);return t.facade=e,vn(e,On,t),t},tn=function(e){return yn(e,On)?e[On]:{}},rn=function(e){return yn(e,On)}}var In={set:en,get:tn,has:rn,enforce:function(e){return rn(e)?tn(e):en(e,{})},getterFor:function(e){return function(t){var r;if(!hn(t)||(r=tn(t)).type!==e)throw new En("Incompatible receiver, "+e+" required");return r}}},xn=Ee,_n=oe,jn=$e,kn=$t,Tn=ie,An=Zr.CONFIGURABLE,Mn=nn,Rn=In.enforce,Ln=In.get,Cn=String,Nn=Object.defineProperty,Dn=xn("".slice),Un=xn("".replace),$n=xn([].join),Bn=Tn&&!_n((function(){return 8!==Nn((function(){}),"length",{value:8}).length})),Fn=String(String).split("String"),Wn=Kr.exports=function(e,t,r){"Symbol("===Dn(Cn(t),0,7)&&(t="["+Un(Cn(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!kn(e,"name")||An&&e.name!==t)&&(Tn?Nn(e,"name",{value:t,configurable:!0}):e.name=t),Bn&&r&&kn(r,"arity")&&e.length!==r.arity&&Nn(e,"length",{value:r.arity});try{r&&kn(r,"constructor")&&r.constructor?Tn&&Nn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Rn(e);return kn(n,"source")||(n.source=$n(Fn,"string"==typeof t?t:"")),e};Function.prototype.toString=Wn((function(){return jn(this)&&Ln(this).source||Mn(this)}),"toString");var Gn=Kr.exports,Kn=$e,zn=Or,Vn=Gn,Hn=xt,qn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(Kn(r)&&Vn(r,i,n),n.global)o?e[t]=r:Hn(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:zn.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Yn={},Zn=Math.ceil,Jn=Math.floor,Xn=Math.trunc||function(e){var t=+e;return(t>0?Jn:Zn)(t)},Qn=function(e){var t=+e;return t!=t||0===t?0:Xn(t)},eo=Qn,to=Math.max,ro=Math.min,no=Qn,oo=Math.min,io=function(e){var t=no(e);return t>0?oo(t,9007199254740991):0},ao=io,uo=function(e){return ao(e.length)},co=De,so=uo,lo=function(e){return function(t,r,n){var o=co(t),i=so(o);if(0===i)return!e&&-1;var a,u=function(e,t){var r=eo(e);return r<0?to(r+t,0):ro(r,t)}(n,i);if(e&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((e||u in o)&&o[u]===r)return e||u||0;return!e&&-1}},fo={includes:lo(!0),indexOf:lo(!1)},po=$t,ho=De,vo=fo.indexOf,yo=fn,go=Ee([].push),mo=function(e,t){var r,n=ho(e),o=0,i=[];for(r in n)!po(yo,r)&&po(n,r)&&go(i,r);for(;t.length>o;)po(n,r=t[o++])&&(~vo(i,r)||go(i,r));return i},bo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wo=mo,Eo=bo.concat("length","prototype");Yn.f=Object.getOwnPropertyNames||function(e){return wo(e,Eo)};var So={};So.f=Object.getOwnPropertySymbols;var Po=Ke,Oo=Yn,Io=So,xo=kr,_o=Ee([].concat),jo=Po("Reflect","ownKeys")||function(e){var t=Oo.f(xo(e)),r=Io.f;return r?_o(t,r(e)):t},ko=$t,To=jo,Ao=ne,Mo=Or,Ro=function(e,t,r){for(var n=To(t),o=Mo.f,i=Ao.f,a=0;a<n.length;a++){var u=n[a];ko(e,u)||r&&ko(r,u)||o(e,u,i(t,u))}},Lo=oe,Co=$e,No=/#|\.prototype\./,Do=function(e,t){var r=$o[Uo(e)];return r===Fo||r!==Bo&&(Co(t)?Lo(t):!!t)},Uo=Do.normalize=function(e){return String(e).replace(No,".").toLowerCase()},$o=Do.data={},Bo=Do.NATIVE="N",Fo=Do.POLYFILL="P",Wo=Do,Go=re,Ko=ne.f,zo=Gr,Vo=qn,Ho=xt,qo=Ro,Yo=Wo,Zo=function(e,t){var r,n,o,i,a,u=e.target,c=e.global,s=e.stat;if(r=c?Go:s?Go[u]||Ho(u,{}):Go[u]&&Go[u].prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=Ko(r,n))&&a.value:r[n],!Yo(c?n:u+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;qo(i,o)}(e.sham||o&&o.sham)&&zo(i,"sham",!0),Vo(r,n,i,e)}},Jo=ae,Xo=Function.prototype,Qo=Xo.apply,ei=Xo.call,ti="object"==typeof Reflect&&Reflect.apply||(Jo?ei.bind(Qo):function(){return ei.apply(Qo,arguments)}),ri=Ee,ni=vt,oi=Fe,ii=String,ai=TypeError,ui=Fe,ci=Le,si=function(e){if(function(e){return oi(e)||null===e}(e))return e;throw new ai("Can't set "+ii(e)+" as a prototype")},li=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=function(e,t,r){try{return ri(ni(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return ci(r),si(n),ui(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0),fi=Or.f,pi=$e,di=Fe,hi=li,vi={};vi[Qt("toStringTag")]="z";var yi="[object z]"===String(vi),gi=$e,mi=Ie,bi=Qt("toStringTag"),wi=Object,Ei="Arguments"===mi(function(){return arguments}()),Si=yi?mi:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=wi(e),bi))?r:Ei?mi(t):"Object"===(n=mi(t))&&gi(t.callee)?"Arguments":n},Pi=Si,Oi=String,Ii=function(e){if("Symbol"===Pi(e))throw new TypeError("Cannot convert a Symbol value to a string");return Oi(e)},xi=Ii,_i=Fe,ji=Gr,ki=Error,Ti=Ee("".replace),Ai=String(new ki("zxcasd").stack),Mi=/\n\s*at [^:]*:[^\n]*/,Ri=Mi.test(Ai),Li=ye,Ci=!oe((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Li(1,7)),7!==e.stack)})),Ni=Gr,Di=Ci,Ui=Error.captureStackTrace,$i=Ke,Bi=$t,Fi=Gr,Wi=ze,Gi=li,Ki=Ro,zi=function(e,t,r){r in e||fi(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},Vi=function(e,t,r,n){Di&&(Ui?Ui(e,t):Ni(e,"stack",function(e,t){if(Ri&&"string"==typeof e&&!ki.prepareStackTrace)for(;t--;)e=Ti(e,Mi,"");return e}(r,n)))},Hi=ie,qi=Zo,Yi=ti,Zi=function(e,t,r,n){var o="stackTraceLimit",i=n?2:1,a=e.split("."),u=a[a.length-1],c=$i.apply(null,a);if(c){var s=c.prototype;if(Bi(s,"cause")&&delete s.cause,!r)return c;var l=$i("Error"),f=t((function(e,t){var r,o,a,u,l,p,d,h=function(e,t){return void 0===e?arguments.length<2?"":t:xi(e)}(n?t:e,void 0),v=n?new c(e):new c;return void 0!==h&&Fi(v,"message",h),Vi(v,f,v.stack,2),this&&Wi(s,this)&&(a=v,u=this,l=f,hi&&pi(p=u.constructor)&&p!==l&&di(d=p.prototype)&&d!==l.prototype&&hi(a,d)),arguments.length>i&&(r=v,_i(o=arguments[i])&&"cause"in o&&ji(r,"cause",o.cause)),v}));f.prototype=s,"Error"!==u?Gi?Gi(f,l):Ki(f,l,{name:!0}):Hi&&o in c&&(zi(f,c,o),zi(f,c,"prepareStackTrace")),Ki(f,c);try{s.name!==u&&Fi(s,"name",u),s.constructor=f}catch(e){}return f}},Ji="WebAssembly",Xi=re[Ji],Qi=7!==new Error("e",{cause:7}).cause,ea=function(e,t){var r={};r[e]=Zi(e,t,Qi),qi({global:!0,constructor:!0,arity:1,forced:Qi},r)},ta=function(e,t){if(Xi&&Xi[e]){var r={};r[e]=Zi(Ji+"."+e,t,Qi),qi({target:Ji,stat:!0,constructor:!0,arity:1,forced:Qi},r)}};ea("Error",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("EvalError",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("RangeError",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("ReferenceError",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("SyntaxError",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("TypeError",(function(e){return function(t){return Yi(e,this,arguments)}})),ea("URIError",(function(e){return function(t){return Yi(e,this,arguments)}})),ta("CompileError",(function(e){return function(t){return Yi(e,this,arguments)}})),ta("LinkError",(function(e){return function(t){return Yi(e,this,arguments)}})),ta("RuntimeError",(function(e){return function(t){return Yi(e,this,arguments)}})),Error;var ra=Ie,na=ie,oa=Array.isArray||function(e){return"Array"===ra(e)},ia=TypeError,aa=Object.getOwnPropertyDescriptor,ua=na&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),ca=TypeError,sa=Nt,la=uo,fa=ua?function(e,t){if(oa(e)&&!aa(e,"length").writable)throw new ia("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t};Zo({target:"Array",proto:!0,arity:1,forced:oe((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=sa(this),r=la(t),n=arguments.length;!function(e){if(e>9007199254740991)throw ca("Maximum allowed index exceeded")}(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return fa(t,r),r}});var pa=mo,da=bo,ha=Object.keys||function(e){return pa(e,da)},va=ie,ya=Ee,ga=se,ma=oe,ba=ha,wa=So,Ea=le,Sa=Nt,Pa=Te,Oa=Object.assign,Ia=Object.defineProperty,xa=ya([].concat),_a=!Oa||ma((function(){if(va&&1!==Oa({b:1},Oa(Ia({},"a",{enumerable:!0,get:function(){Ia(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==Oa({},e)[r]||ba(Oa({},t)).join("")!==n}))?function(e,t){for(var r=Sa(e),n=arguments.length,o=1,i=wa.f,a=Ea.f;n>o;)for(var u,c=Pa(arguments[o++]),s=i?xa(ba(c),i(c)):ba(c),l=s.length,f=0;l>f;)u=s[f++],va&&!ga(a,c,u)||(r[u]=c[u]);return r}:Oa,ja=_a;Zo({target:"Object",stat:!0,arity:2,forced:Object.assign!==ja},{assign:ja});var ka={},Ta=ie,Aa=Ir,Ma=Or,Ra=kr,La=De,Ca=ha;ka.f=Ta&&!Aa?Object.defineProperties:function(e,t){Ra(e);for(var r,n=La(t),o=Ca(t),i=o.length,a=0;i>a;)Ma.f(e,r=o[a++],n[r]);return e};var Na,Da=Ke("document","documentElement"),Ua=kr,$a=ka,Ba=bo,Fa=fn,Wa=Da,Ga=pr,Ka="prototype",za="script",Va=ln("IE_PROTO"),Ha=function(){},qa=function(e){return"<"+za+">"+e+"</"+za+">"},Ya=function(e){e.write(qa("")),e.close();var t=e.parentWindow.Object;return e=null,t},Za=function(){try{Na=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;Za="undefined"!=typeof document?document.domain&&Na?Ya(Na):(t=Ga("iframe"),r="java"+za+":",t.style.display="none",Wa.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(qa("document.F=Object")),e.close(),e.F):Ya(Na);for(var n=Ba.length;n--;)delete Za[Ka][Ba[n]];return Za()};Fa[Va]=!0;var Ja=Object.create||function(e,t){var r;return null!==e?(Ha[Ka]=Ua(e),r=new Ha,Ha[Ka]=null,r[Va]=e):r=Za(),void 0===t?r:$a.f(r,t)},Xa=Qt,Qa=Ja,eu=Or.f,tu=Xa("unscopables"),ru=Array.prototype;void 0===ru[tu]&&eu(ru,tu,{configurable:!0,value:Qa(null)});var nu,ou=fo.includes;Zo({target:"Array",proto:!0,forced:oe((function(){return!Array(1).includes()}))},{includes:function(e){return ou(this,e,arguments.length>1?arguments[1]:void 0)}}),nu="includes",ru[tu][nu]=!0;var iu,au="\t\n\v\f\r                 \u2028\u2029\ufeff",uu=Le,cu=Ii,su=au,lu=Ee("".replace),fu=RegExp("^["+su+"]+"),pu=RegExp("(^|[^"+su+"])["+su+"]+$"),du=function(e){return function(t){var r=cu(uu(t));return 1&e&&(r=lu(r,fu,"")),2&e&&(r=lu(r,pu,"$1")),r}},hu={start:du(1),end:du(2),trim:du(3)},vu=Zr.PROPER,yu=au,gu=hu.trim;Zo({target:"String",proto:!0,forced:(iu="trim",oe((function(){return!!yu[iu]()||"​…᠎"!=="​…᠎"[iu]()||vu&&yu[iu].name!==iu})))},{trim:function(){return gu(this)}});var mu,bu,wu=kr,Eu=oe,Su=re.RegExp,Pu=Eu((function(){var e=Su("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Ou=Pu||Eu((function(){return!Su("a","y").sticky})),Iu={BROKEN_CARET:Pu||Eu((function(){var e=Su("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Ou,UNSUPPORTED_Y:Pu},xu=oe,_u=re.RegExp,ju=xu((function(){var e=_u(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),ku=oe,Tu=re.RegExp,Au=ku((function(){var e=Tu("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Mu=se,Ru=Ee,Lu=Ii,Cu=function(){var e=wu(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Nu=Iu,Du=Ja,Uu=In.get,$u=ju,Bu=Au,Fu=Rt("native-string-replace",String.prototype.replace),Wu=RegExp.prototype.exec,Gu=Wu,Ku=Ru("".charAt),zu=Ru("".indexOf),Vu=Ru("".replace),Hu=Ru("".slice),qu=(bu=/b*/g,Mu(Wu,mu=/a/,"a"),Mu(Wu,bu,"a"),0!==mu.lastIndex||0!==bu.lastIndex),Yu=Nu.BROKEN_CARET,Zu=void 0!==/()??/.exec("")[1];(qu||Zu||Yu||$u||Bu)&&(Gu=function(e){var t,r,n,o,i,a,u,c=this,s=Uu(c),l=Lu(e),f=s.raw;if(f)return f.lastIndex=c.lastIndex,t=Mu(Gu,f,l),c.lastIndex=f.lastIndex,t;var p=s.groups,d=Yu&&c.sticky,h=Mu(Cu,c),v=c.source,y=0,g=l;if(d&&(h=Vu(h,"y",""),-1===zu(h,"g")&&(h+="g"),g=Hu(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ku(l,c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",h)),Zu&&(r=new RegExp("^"+v+"$(?!\\s)",h)),qu&&(n=c.lastIndex),o=Mu(Wu,d?r:c,g),d?o?(o.input=Hu(o.input,y),o[0]=Hu(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:qu&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Zu&&o&&o.length>1&&Mu(Fu,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=Du(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Ju=Gu;Zo({target:"RegExp",proto:!0,forced:/./.exec!==Ju},{exec:Ju});var Xu=se,Qu=qn,ec=Ju,tc=oe,rc=Qt,nc=Gr,oc=rc("species"),ic=RegExp.prototype,ac=function(e,t,r,n){var o=rc(e),i=!tc((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),a=i&&!tc((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[oc]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var u=/./[o],c=t(o,""[e],(function(e,t,r,n,o){var a=t.exec;return a===ec||a===ic.exec?i&&!o?{done:!0,value:Xu(u,t,r,n)}:{done:!0,value:Xu(e,r,t,n)}:{done:!1}}));Qu(String.prototype,e,c[0]),Qu(ic,o,c[1])}n&&nc(ic[o],"sham",!0)},uc=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},cc=se,sc=kr,lc=$e,fc=Ie,pc=Ju,dc=TypeError,hc=function(e,t){var r=e.exec;if(lc(r)){var n=cc(r,e,t);return null!==n&&sc(n),n}if("RegExp"===fc(e))return cc(pc,e,t);throw new dc("RegExp#exec called on incompatible receiver")},vc=se,yc=kr,gc=Ae,mc=Le,bc=uc,wc=Ii,Ec=mt,Sc=hc;ac("search",(function(e,t,r){return[function(t){var r=mc(this),n=gc(t)?void 0:Ec(t,e);return n?vc(n,t,r):new RegExp(t)[e](wc(r))},function(e){var n=yc(this),o=wc(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;bc(a,0)||(n.lastIndex=0);var u=Sc(n,o);return bc(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]}));const Pc=e=>{const t=window.location.search.substr(1).split("&"),r=`${e}=`,n=t.filter((e=>e.search(r)>=0));return n.length>0?n[0].substring(n[0].search(r)+r.length):""};let Oc="true"===Pc("unisphereVerbose")?"log":Pc("unisphereVerbose")||"";const Ic=["log","debug"].includes(Oc)?Oc:"warn",xc=Pc("unisphereEnvironment")||"prod";let _c=localStorage.getItem("unisphereDevLoader")||null;const jc=Pc("unispherePresets")||null,kc={logLevel:Ic,loaderUrl:_c,verbose:Oc,environment:"dev"===xc?"dev":"prod",presets:jc?jc.split(",").map((e=>e.trim())):null},Tc=()=>kc;let Ac=window.unisphere;function Mc(e,t,r){return e in Ac?{value:Ac[e],isNew:!1}:(null==t||t.debug(`${e} not found on 'window.unisphere', creating with default value`,{data:{defaultValue:r}}),Ac[e]=r,{value:r,isNew:!0})}"unisphere"in window||(Ac=window.unisphere={});const Rc={logToConsole:!0,logLevel:Tc().logLevel};class Lc{static createWorkspaceLogger(e){return new Lc(e)}kill(){this._killed=!0}constructor(e){this.workspaceName=e,this._killed=!1,this._settings=Object.assign({},Rc)}getLogger(e){return this._killed&&console.warn("Logger factory is killed, returning a new logger anyway"),new Cc(this.workspaceName,e,this.getSettings.bind(this))}getSettings(){return this._settings}updateSettings(e){this._settings=Object.assign(Object.assign({},this._settings),e)}}class Cc{constructor(e,t,r){this.workspaceName=e,this.runtime=t,this._getSettings=r;const n=function(){const{value:e}=Mc("loggers",null,{interceptors:[],logMessages:[]});return e}();this._globalLoggers=n}logMessage(e,t,r,n){const o={workspaceName:this.workspaceName,runtime:this.runtime,time:(new Date).toISOString(),message:t,data:r,error:n,level:e},i=this._getSettings();if(this._globalLoggers.logMessages.push(o),this._globalLoggers.interceptors.forEach((e=>{e(o)})),i.logToConsole&&this.shouldLog(e,i.logLevel)){const t=`${o.time} [Unisphere.${o.runtime}] ${o.message}`;switch(e){case"debug":console.debug(t,o.data);break;case"log":console.log(t,o.data);break;case"warn":console.warn(t,o.data);break;case"error":console.error(t,{data:o.data,error:o.error})}}}shouldLog(e,t){const r=["debug","log","warn","error"];return r.indexOf(e)>=r.indexOf(t)}log(e,t){this.logMessage("log",e,null==t?void 0:t.data)}debug(e,t){this.logMessage("debug",e,null==t?void 0:t.data)}warn(e,t){this.logMessage("warn",e,null==t?void 0:t.data)}error(e,t){this.logMessage("error",e,null==t?void 0:t.data,null==t?void 0:t.error)}}var Nc,Dc=Ie,Uc=Ee,$c=function(e){if("Function"===Dc(e))return Uc(e)},Bc=Fe,Fc=Ie,Wc=Qt("match"),Gc=TypeError,Kc=function(e){if(function(e){var t;return Bc(e)&&(void 0!==(t=e[Wc])?!!t:"RegExp"===Fc(e))}(e))throw new Gc("The method doesn't accept regular expressions");return e},zc=Qt("match"),Vc=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[zc]=!1,"/./"[e](t)}catch(e){}}return!1},Hc=Zo,qc=$c,Yc=ne.f,Zc=io,Jc=Ii,Xc=Kc,Qc=Le,es=Vc,ts=qc("".slice),rs=Math.min,ns=es("startsWith");function os(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function u(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,u)}c((n=n.apply(e,t||[])).next())}))}Hc({target:"String",proto:!0,forced:!(!ns&&(Nc=Yc(String.prototype,"startsWith"),Nc&&!Nc.writable)||ns)},{startsWith:function(e){var t=Jc(Qc(this));Xc(e);var r=Zc(rs(arguments.length>1?arguments[1]:void 0,t.length)),n=Jc(e);return ts(t,r,r+n.length)===n}}),"function"==typeof SuppressedError&&SuppressedError;var is="process"===Ie(re.process),as=Or.f,us=$t,cs=Qt("toStringTag"),ss=Gn,ls=Or,fs=Ke,ps=ie,ds=Qt("species"),hs=ze,vs=TypeError,ys=Ee,gs=oe,ms=$e,bs=Si,ws=nn,Es=function(){},Ss=Ke("Reflect","construct"),Ps=/^\s*(?:class|function)\b/,Os=ys(Ps.exec),Is=!Ps.test(Es),xs=function(e){if(!ms(e))return!1;try{return Ss(Es,[],e),!0}catch(e){return!1}},_s=function(e){if(!ms(e))return!1;switch(bs(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Is||!!Os(Ps,ws(e))}catch(e){return!0}};_s.sham=!0;var js,ks,Ts,As,Ms=!Ss||gs((function(){var e;return xs(xs.call)||!xs(Object)||!xs((function(){e=!0}))||e}))?_s:xs,Rs=Ms,Ls=ft,Cs=TypeError,Ns=kr,Ds=Ae,Us=Qt("species"),$s=vt,Bs=ae,Fs=$c($c.bind),Ws=function(e,t){return $s(e),void 0===t?e:Bs?Fs(e,t):function(){return e.apply(t,arguments)}},Gs=Ee([].slice),Ks=TypeError,zs=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ve),Vs=re,Hs=ti,qs=Ws,Ys=$e,Zs=$t,Js=oe,Xs=Da,Qs=Gs,el=pr,tl=zs,rl=is,nl=Vs.setImmediate,ol=Vs.clearImmediate,il=Vs.process,al=Vs.Dispatch,ul=Vs.Function,cl=Vs.MessageChannel,sl=Vs.String,ll=0,fl={},pl="onreadystatechange";Js((function(){js=Vs.location}));var dl=function(e){if(Zs(fl,e)){var t=fl[e];delete fl[e],t()}},hl=function(e){return function(){dl(e)}},vl=function(e){dl(e.data)},yl=function(e){Vs.postMessage(sl(e),js.protocol+"//"+js.host)};nl&&ol||(nl=function(e){!function(e,t){if(e<t)throw new Ks("Not enough arguments")}(arguments.length,1);var t=Ys(e)?e:ul(e),r=Qs(arguments,1);return fl[++ll]=function(){Hs(t,void 0,r)},ks(ll),ll},ol=function(e){delete fl[e]},rl?ks=function(e){il.nextTick(hl(e))}:al&&al.now?ks=function(e){al.now(hl(e))}:cl&&!tl?(As=(Ts=new cl).port2,Ts.port1.onmessage=vl,ks=qs(As.postMessage,As)):Vs.addEventListener&&Ys(Vs.postMessage)&&!Vs.importScripts&&js&&"file:"!==js.protocol&&!Js(yl)?(ks=yl,Vs.addEventListener("message",vl,!1)):ks=pl in el("script")?function(e){Xs.appendChild(el("script"))[pl]=function(){Xs.removeChild(this),dl(e)}}:function(e){setTimeout(hl(e),0)});var gl={set:nl,clear:ol},ml=re,bl=ie,wl=Object.getOwnPropertyDescriptor,El=function(){this.head=null,this.tail=null};El.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Sl,Pl,Ol,Il,xl,_l=El,jl=/ipad|iphone|ipod/i.test(Ve)&&"undefined"!=typeof Pebble,kl=/web0s(?!.*chrome)/i.test(Ve),Tl=re,Al=Ws,Ml=gl.set,Rl=_l,Ll=zs,Cl=jl,Nl=kl,Dl=is,Ul=Tl.MutationObserver||Tl.WebKitMutationObserver,$l=Tl.document,Bl=Tl.process,Fl=Tl.Promise,Wl=function(e){if(!bl)return ml[e];var t=wl(ml,e);return t&&t.value}("queueMicrotask");if(!Wl){var Gl=new Rl,Kl=function(){var e,t;for(Dl&&(e=Bl.domain)&&e.exit();t=Gl.get();)try{t()}catch(e){throw Gl.head&&Sl(),e}e&&e.enter()};Ll||Dl||Nl||!Ul||!$l?!Cl&&Fl&&Fl.resolve?((Il=Fl.resolve(void 0)).constructor=Fl,xl=Al(Il.then,Il),Sl=function(){xl(Kl)}):Dl?Sl=function(){Bl.nextTick(Kl)}:(Ml=Al(Ml,Tl),Sl=function(){Ml(Kl)}):(Pl=!0,Ol=$l.createTextNode(""),new Ul(Kl).observe(Ol,{characterData:!0}),Sl=function(){Ol.data=Pl=!Pl}),Wl=function(e){Gl.head||Sl(),Gl.add(e)}}var zl=Wl,Vl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Hl=re.Promise,ql="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Yl=!ql&&!is&&"object"==typeof window&&"object"==typeof document,Zl=re,Jl=Hl,Xl=$e,Ql=Wo,ef=nn,tf=Qt,rf=Yl,nf=ql,of=Qe;Jl&&Jl.prototype;var af=tf("species"),uf=!1,cf=Xl(Zl.PromiseRejectionEvent),sf=Ql("Promise",(function(){var e=ef(Jl),t=e!==String(Jl);if(!t&&66===of)return!0;if(!of||of<51||!/native code/.test(e)){var r=new Jl((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[af]=n,!(uf=r.then((function(){}))instanceof n))return!0}return!t&&(rf||nf)&&!cf})),lf={CONSTRUCTOR:sf,REJECTION_EVENT:cf,SUBCLASSING:uf},ff={},pf=vt,df=TypeError,hf=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new df("Bad Promise constructor");t=e,r=n})),this.resolve=pf(t),this.reject=pf(r)};ff.f=function(e){return new hf(e)};var vf,yf,gf,mf,bf,wf,Ef,Sf=Zo,Pf=is,Of=re,If=se,xf=qn,_f=li,jf=vt,kf=$e,Tf=Fe,Af=function(e,t){var r,n=Ns(e).constructor;return void 0===n||Ds(r=Ns(n)[Us])?t:function(e){if(Rs(e))return e;throw new Cs(Ls(e)+" is not a constructor")}(r)},Mf=gl.set,Rf=zl,Lf=Vl,Cf=_l,Nf=In,Df=Hl,Uf=ff,$f="Promise",Bf=lf.CONSTRUCTOR,Ff=lf.REJECTION_EVENT,Wf=lf.SUBCLASSING,Gf=Nf.getterFor($f),Kf=Nf.set,zf=Df&&Df.prototype,Vf=Df,Hf=zf,qf=Of.TypeError,Yf=Of.document,Zf=Of.process,Jf=Uf.f,Xf=Jf,Qf=!!(Yf&&Yf.createEvent&&Of.dispatchEvent),ep="unhandledrejection",tp=function(e){var t;return!(!Tf(e)||!kf(t=e.then))&&t},rp=function(e,t){var r,n,o,i=t.value,a=1===t.state,u=a?e.ok:e.fail,c=e.resolve,s=e.reject,l=e.domain;try{u?(a||(2===t.rejection&&up(t),t.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===e.promise?s(new qf("Promise-chain cycle")):(n=tp(r))?If(n,r,c,s):c(r)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},np=function(e,t){e.notified||(e.notified=!0,Rf((function(){for(var r,n=e.reactions;r=n.get();)rp(r,e);e.notified=!1,t&&!e.rejection&&ip(e)})))},op=function(e,t,r){var n,o;Qf?((n=Yf.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Of.dispatchEvent(n)):n={promise:t,reason:r},!Ff&&(o=Of["on"+e])?o(n):e===ep&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",r)},ip=function(e){If(Mf,Of,(function(){var t,r=e.facade,n=e.value;if(ap(e)&&(t=Lf((function(){Pf?Zf.emit("unhandledRejection",n,r):op(ep,r,n)})),e.rejection=Pf||ap(e)?2:1,t.error))throw t.value}))},ap=function(e){return 1!==e.rejection&&!e.parent},up=function(e){If(Mf,Of,(function(){var t=e.facade;Pf?Zf.emit("rejectionHandled",t):op("rejectionhandled",t,e.value)}))},cp=function(e,t,r){return function(n){e(t,n,r)}},sp=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,np(e,!0))},lp=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new qf("Promise can't be resolved itself");var n=tp(t);n?Rf((function(){var r={done:!1};try{If(n,t,cp(lp,r,e),cp(sp,r,e))}catch(t){sp(r,t,e)}})):(e.value=t,e.state=1,np(e,!1))}catch(t){sp({done:!1},t,e)}}};if(Bf&&(Hf=(Vf=function(e){(function(e,t){if(hs(t,e))return e;throw new vs("Incorrect invocation")})(this,Hf),jf(e),If(vf,this);var t=Gf(this);try{e(cp(lp,t),cp(sp,t))}catch(e){sp(t,e)}}).prototype,(vf=function(e){Kf(this,{type:$f,done:!1,notified:!1,parent:!1,reactions:new Cf,rejection:!1,state:0,value:void 0})}).prototype=xf(Hf,"then",(function(e,t){var r=Gf(this),n=Jf(Af(this,Vf));return r.parent=!0,n.ok=!kf(e)||e,n.fail=kf(t)&&t,n.domain=Pf?Zf.domain:void 0,0===r.state?r.reactions.add(n):Rf((function(){rp(n,r)})),n.promise})),yf=function(){var e=new vf,t=Gf(e);this.promise=e,this.resolve=cp(lp,t),this.reject=cp(sp,t)},Uf.f=Jf=function(e){return e===Vf||void 0===e?new yf(e):Xf(e)},kf(Df)&&zf!==Object.prototype)){gf=zf.then,Wf||xf(zf,"then",(function(e,t){var r=this;return new Vf((function(e,t){If(gf,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete zf.constructor}catch(e){}_f&&_f(zf,Hf)}Sf({global:!0,constructor:!0,wrap:!0,forced:Bf},{Promise:Vf}),wf=$f,Ef=!1,(bf=Vf)&&!Ef&&(bf=bf.prototype),bf&&!us(bf,cs)&&as(bf,cs,{configurable:!0,value:wf}),mf=fs($f),ps&&mf&&!mf[ds]&&function(e,t,r){r.get&&ss(r.get,t,{getter:!0}),r.set&&ss(r.set,t,{setter:!0}),ls.f(e,t,r)}(mf,ds,{configurable:!0,get:function(){return this}});var fp={},pp=fp,dp=Qt("iterator"),hp=Array.prototype,vp=Si,yp=mt,gp=Ae,mp=fp,bp=Qt("iterator"),wp=function(e){if(!gp(e))return yp(e,bp)||yp(e,"@@iterator")||mp[vp(e)]},Ep=se,Sp=vt,Pp=kr,Op=ft,Ip=wp,xp=TypeError,_p=se,jp=kr,kp=mt,Tp=Ws,Ap=se,Mp=kr,Rp=ft,Lp=uo,Cp=ze,Np=wp,Dp=function(e,t,r){var n,o;jp(e);try{if(!(n=kp(e,"return"))){if("throw"===t)throw r;return r}n=_p(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return jp(n),r},Up=TypeError,$p=function(e,t){this.stopped=e,this.result=t},Bp=$p.prototype,Fp=function(e,t,r){var n,o,i,a,u,c,s,l,f=r&&r.that,p=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),y=Tp(t,f),g=function(e){return n&&Dp(n,"normal",e),new $p(!0,e)},m=function(e){return p?(Mp(e),v?y(e[0],e[1],g):y(e[0],e[1])):v?y(e,g):y(e)};if(d)n=e.iterator;else if(h)n=e;else{if(!(o=Np(e)))throw new Up(Rp(e)+" is not iterable");if(void 0!==(l=o)&&(pp.Array===l||hp[dp]===l)){for(i=0,a=Lp(e);a>i;i++)if((u=m(e[i]))&&Cp(Bp,u))return u;return new $p(!1)}n=function(e,t){var r=arguments.length<2?Ip(e):t;if(Sp(r))return Pp(Ep(r,e));throw new xp(Op(e)+" is not iterable")}(e,o)}for(c=d?e.next:n.next;!(s=Ap(c,n)).done;){try{u=m(s.value)}catch(e){Dp(n,"throw",e)}if("object"==typeof u&&u&&Cp(Bp,u))return u}return new $p(!1)},Wp=Qt("iterator"),Gp=!1;try{var Kp=0,zp={next:function(){return{done:!!Kp++}},return:function(){Gp=!0}};zp[Wp]=function(){return this},Array.from(zp,(function(){throw 2}))}catch(e){}var Vp=Hl,Hp=lf.CONSTRUCTOR||!function(e,t){try{if(!t&&!Gp)return!1}catch(e){return!1}var r=!1;try{var n={};n[Wp]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}((function(e){Vp.all(e).then(void 0,(function(){}))})),qp=se,Yp=vt,Zp=ff,Jp=Vl,Xp=Fp;Zo({target:"Promise",stat:!0,forced:Hp},{all:function(e){var t=this,r=Zp.f(t),n=r.resolve,o=r.reject,i=Jp((function(){var r=Yp(t.resolve),i=[],a=0,u=1;Xp(e,(function(e){var c=a++,s=!1;u++,qp(r,t,e).then((function(e){s||(s=!0,i[c]=e,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var Qp=Zo,ed=lf.CONSTRUCTOR,td=Hl,rd=Ke,nd=$e,od=qn,id=td&&td.prototype;if(Qp({target:"Promise",proto:!0,forced:ed,real:!0},{catch:function(e){return this.then(void 0,e)}}),nd(td)){var ad=rd("Promise").prototype.catch;id.catch!==ad&&od(id,"catch",ad,{unsafe:!0})}var ud=se,cd=vt,sd=ff,ld=Vl,fd=Fp;Zo({target:"Promise",stat:!0,forced:Hp},{race:function(e){var t=this,r=sd.f(t),n=r.reject,o=ld((function(){var o=cd(t.resolve);fd(e,(function(e){ud(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var pd=ff;Zo({target:"Promise",stat:!0,forced:lf.CONSTRUCTOR},{reject:function(e){var t=pd.f(this);return(0,t.reject)(e),t.promise}});var dd=kr,hd=Fe,vd=ff,yd=Zo,gd=lf.CONSTRUCTOR;Ke("Promise"),yd({target:"Promise",stat:!0,forced:gd},{resolve:function(e){return function(e,t){if(dd(e),hd(t)&&t.constructor===e)return t;var r=vd.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});const md=Lc.createWorkspaceLogger("window").getLogger("fetchers"),{value:{factoriesByOwner:bd}}=Mc("factoriesByOwner",md,{factoriesByOwner:{}});function wd(e){return os(this,arguments,void 0,(function*({owner:e,url:t}){let r=bd[e];r||(md.log(`no factories found for ${e}, creating new list`),r=[],bd[e]=r);const n=r.find((e=>e.url===t));if(null==n?void 0:n.factoryModule)return md.log(`using cached factory module for ${t}`),{factoryModule:n.factoryModule,error:null};const o=r.find((e=>e.url===t));if(o)return md.log(`a request to fetch factory already in progress for ${t}, waiting for it to finish`),new Promise(((e,t)=>{o.onFetched.push(e),o.onError.push(t)}));md.log(`fetching factory module for ${t}`);const i={url:t,factoryModule:null,error:null,onFetched:[],onError:[]};r.push(i);try{const e=yield import(t);md.log(`fetched factory module for ${t}, caching it`),i.factoryModule=e,i.onFetched&&(md.log(`calling onFetched callbacks for ${t} (${i.onFetched.length} queued)`),i.onFetched.forEach((r=>{try{r(e)}catch(e){md.error(`error calling onFetched callback for ${t}`,{error:e})}}))),i.onFetched=[],i.onError=[]}catch(e){md.log(`failed to fetch factory module for ${t}, removing from list`),i.onError&&(md.log(`calling onError callbacks for ${t} (${i.onError.length} queued)`),i.onError.forEach((r=>{try{r(e)}catch(e){md.error(`error calling onError callback for ${t}`,{error:e})}}))),i.onError=[],i.onFetched=[],r.splice(r.indexOf(i),1)}return{factoryModule:i.factoryModule,error:i.error}}))}const Ed=Tc(),Sd=e=>os(void 0,void 0,void 0,(function*(){const t=Lc.createWorkspaceLogger(e.workspaceName||"").getLogger("fetch-loader");let r="",n="";if(Ed.loaderUrl?(t.log(`using custom loader url from query params '${Ed.loaderUrl}'`),n=Ed.loaderUrl):e.devLoaderUrl&&(t.log(`using custom loader url from options '${e.devLoaderUrl}'`),n=e.devLoaderUrl),n){t.log(`verifying custom loader url '${n}' url against environment runtime json. fetching runtime json...`);const o=yield((e,t)=>os(void 0,void 0,void 0,(function*(){let r,n=`${e}/runtime.json`;try{t.log(`loading runtime versions for env from '${n}'`),r=yield fetch(n).then((e=>e.json()))}catch(e){throw t.error(`error loading runtime versions for env from '${n}'`,{error:e}),new Error(`failed to load runtime versions for env from '${n}'`)}if(!r||!("domains"in r))throw new Error("invalid runtime json, 'domains' is missing in the runtime json");return r.domains})))(e.serverUrl,t),i=n.startsWith(e.serverUrl),a=o.some((e=>n.startsWith(e)));if(t.log("ensuring custom loader url is in environment artifacts or from an allowed domain",{data:{customLoaderUrl:n,serverUrl:e.serverUrl,isInEnvironmentArtifacts:i,isInAllowedDomains:a}}),!i&&!a)throw new Error(`the custom loader url '${n}' is not in the environment artifacts or from an allowed domain`);t.log(`using custom loader url '${n}'`),r=n}else t.log("using environment loader"),r=`${e.serverUrl}/loader/index.esm.js`;t.log("fetching environment unisphere loader",{data:{environmentLoaderUrl:r,options:e}});const{factoryModule:{loader:o}}=yield wd({owner:"runtime-js",url:r});if(!o)throw new Error(`failed to load dev loader from '${r}'`);return t.log("executing environment unisphere loader"),o(Object.assign({},e))}));var Pd=Zo,Od=$c,Id=ne.f,xd=io,_d=Ii,jd=Kc,kd=Le,Td=Vc,Ad=Od("".slice),Md=Math.min,Rd=Td("endsWith"),Ld=!Rd&&!!function(){var e=Id(String.prototype,"endsWith");return e&&!e.writable}();Pd({target:"String",proto:!0,forced:!Ld&&!Rd},{endsWith:function(e){var t=_d(kd(this));jd(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,o=void 0===r?n:Md(xd(r),n),i=_d(e);return Ad(t,o-i.length,o)===i}});var Cd=Ee,Nd=Qn,Dd=Ii,Ud=Le,$d=Cd("".charAt),Bd=Cd("".charCodeAt),Fd=Cd("".slice),Wd=function(e){return function(t,r){var n,o,i=Dd(Ud(t)),a=Nd(r),u=i.length;return a<0||a>=u?e?"":void 0:(n=Bd(i,a))<55296||n>56319||a+1===u||(o=Bd(i,a+1))<56320||o>57343?e?$d(i,a):n:e?Fd(i,a,a+2):o-56320+(n-55296<<10)+65536}},Gd=(Wd(!1),Wd(!0)),Kd=Ee,zd=Nt,Vd=Math.floor,Hd=Kd("".charAt),qd=Kd("".replace),Yd=Kd("".slice),Zd=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Jd=/\$([$&'`]|\d{1,2})/g,Xd=ti,Qd=se,eh=Ee,th=ac,rh=oe,nh=kr,oh=$e,ih=Ae,ah=Qn,uh=io,ch=Ii,sh=Le,lh=function(e,t,r){return t+(r?Gd(e,t).length:1)},fh=mt,ph=function(e,t,r,n,o,i){var a=r+e.length,u=n.length,c=Jd;return void 0!==o&&(o=zd(o),c=Zd),qd(i,c,(function(i,c){var s;switch(Hd(c,0)){case"$":return"$";case"&":return e;case"`":return Yd(t,0,r);case"'":return Yd(t,a);case"<":s=o[Yd(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>u){var f=Vd(l/10);return 0===f?i:f<=u?void 0===n[f-1]?Hd(c,1):n[f-1]+Hd(c,1):i}s=n[l-1]}return void 0===s?"":s}))},dh=hc,hh=Qt("replace"),vh=Math.max,yh=Math.min,gh=eh([].concat),mh=eh([].push),bh=eh("".indexOf),wh=eh("".slice),Eh="$0"==="a".replace(/./,"$0"),Sh=!!/./[hh]&&""===/./[hh]("a","$0");function Ph(e){return os(this,void 0,void 0,(function*(){return(yield function(){const e=window;return new Promise((t=>{var r,n;if(null===(n=null===(r=e.unisphere)||void 0===r?void 0:r.instancesManager)||void 0===n?void 0:n.get)t(e.unisphere.instancesManager.get);else{const r=()=>{document.removeEventListener("unisphere-ready",r),t(e.unisphere.instancesManager.get)};document.addEventListener("unisphere-ready",r)}}))}())(e)}))}function Oh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Oh=function(){return!!e})()}th("replace",(function(e,t,r){var n=Sh?"$":"$0";return[function(e,r){var n=sh(this),o=ih(e)?void 0:fh(e,hh);return o?Qd(o,e,n,r):Qd(t,ch(n),e,r)},function(e,o){var i=nh(this),a=ch(e);if("string"==typeof o&&-1===bh(o,n)&&-1===bh(o,"$<")){var u=r(t,i,a,o);if(u.done)return u.value}var c=oh(o);c||(o=ch(o));var s,l=i.global;l&&(s=i.unicode,i.lastIndex=0);for(var f,p=[];null!==(f=dh(i,a))&&(mh(p,f),l);)""===ch(f[0])&&(i.lastIndex=lh(a,uh(i.lastIndex),s));for(var d,h="",v=0,y=0;y<p.length;y++){for(var g,m=ch((f=p[y])[0]),b=vh(yh(ah(f.index),a.length),0),w=[],E=1;E<f.length;E++)mh(w,void 0===(d=f[E])?d:String(d));var S=f.groups;if(c){var P=gh([m],w,b,a);void 0!==S&&mh(P,S),g=ch(Xd(o,void 0,P))}else g=ph(m,a,b,w,S,o);b>=v&&(h+=wh(a,v,b)+g,v=b+m.length)}return h+wh(a,v)}]}),!!rh((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Eh||Sh),Tc();var Ih=function(e){function t(e,r,n){var i,a,u,c;return o(this,t),a=this,c=[e,r,n],u=l(u=t),d(i=s(a,Oh()?Reflect.construct(u,c||[],l(a).constructor):u.apply(a,c)),"isReady",!1),d(i,"workspaceName",""),d(i,"shouldCreateWorkspace",!1),i.unispherePluginManager=new Q(r,i.eventManager,i.logger),i.player.config.provider.unisphereLoaderUrl&&"string"==typeof i.config.workspaceName?i.workspaceName=i.config.workspaceName:(i.workspaceName=F("kaltura_player_workspace_"),i.shouldCreateWorkspace=!0),i}return p(t,e),c(t,[{key:"getWorkspace",value:(r=n(v().mark((function e(){return v().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.shouldCreateWorkspace){e.next=2;break}return e.abrupt("return",Sd({serverUrl:this.player.config.provider.unisphereLoaderUrl,workspaceName:this.workspaceName,ui:{theme:"light",language:"en"}}));case 2:return e.abrupt("return",Ph(this.config.workspaceName));case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"loadMedia",value:function(){var e=this;this.isReady?(this.unispherePluginManager.updateSessionData(),this.unispherePluginManager.loadWidgets(this.config.widgets)):this.getWorkspace().then((function(t){e.unispherePluginManager.init(t,e.config.widgets),e.unispherePluginManager.updateSessionData(),e.isReady=!0})).catch((function(){e.logger.warn("Failed to load unisphere workspace",e.workspaceName)}))}},{key:"reset",value:function(){this.unispherePluginManager.reset()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.unispherePluginManager.destroy()}}],[{key:"isValid",value:function(){return!0}}]);var r}(e.BasePlugin);d(Ih,"defaultConfig",{widgets:[]}),(0,e.registerPlugin)("unisphere",Ih)})(),{}})()));
3
3
  //# sourceMappingURL=playkit-unisphere.js.map