@playkit-js/unisphere 0.0.3 → 0.0.4-canary.0-fd969ca
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/playkit-unisphere.js +1 -1
- package/dist/playkit-unisphere.js.map +1 -1
- package/package.json +1 -1
- package/src/services/container/producers/base-container-producer.ts +2 -7
- package/src/services/index.ts +1 -0
- package/src/services/unisphere/unisphere-workspace-service.ts +6 -0
- package/src/services/utils/index.ts +1 -0
- package/src/services/utils/utils.ts +12 -0
- package/src/unisphere-plugin-manager.tsx +4 -0
- package/src/unisphere-plugin.tsx +5 -2
|
@@ -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 k(n||[]);return u(i,"_invoke",{value:P(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 O={};p(O,s,(function(){return this}));var I=Object.getPrototypeOf,x=I&&I(I(C([])));x&&x!==i&&a.call(x,s)&&(O=x);var _=S.prototype=w.prototype=Object.create(O);function R(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function T(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 P(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=j(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 j(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,j(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 k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function C(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(_,"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(_),e},r.awrap=function(e){return{__await:e}},R(T.prototype),p(T.prototype,l,(function(){return this})),r.AsyncIterator=T,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new T(d(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},R(_),p(_,f,"Generator"),p(_,s,(function(){return this})),p(_,"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=C,k.prototype={constructor:k,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:C(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;var g=function(e){return e.UPPER_BAR_ICON_SHOW="unisphere.event.player.upper-bar-icon.show",e.SIDE_PANEL_OPEN="unisphere.event.player.side-panel.open",e.SIDE_PANEL_CLOSE="unisphere.event.player.side-panel.close",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}({}),m=function(e){return e.SELECTED_CHAPTER="selectedChapter",e.CURRENT_TIME="currentTime",e.IS_PAUSED="isPaused",e.PLAYER_SESSION="player-session",e}(m||{}),b=function(e){var t;return(0,y.h)("div",{style:null!==(t=e.style)&&void 0!==t?t:{},id:e.id})},w=e.ui.components,E=w.Tooltip,S=w.Icon,O=function(t){var r=t.id,n=t.label,o=t.iconPath;return(0,y.h)(E,{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)(S,{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(){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 R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}d(I,"workspaceInstance",null);var T=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 R(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}(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 P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(P=function(){return!!e})()}d(T,"unsubscribeMap",new Map),d(T,"sequence",-1);var j,A=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,P()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t)}(T);function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}d(A,"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 k,C="unisphere.service.pub-sub",N=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,M()?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()}}])}(T);function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}j=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 j.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",U="unisphere.service.storage",$=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,L()?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()}}])}(T);k=$,d($,"update",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService(U);null==n||n.update(D,e,t)})),d($,"get",(function(e){var t=I.get(),r=null==t?void 0:t.getService(U);return r?r.get(D,e):null})),d($,"subscribe",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService(U);if(n){var o=n.subscribe(t,{namespace:D,property:e,emitLastValue:!0});k.addToUnsubscribeMap(o)}}));const B=KalturaPlayer.core;function F(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 W=function(){return c((function e(){o(this,e),d(this,"_disposers",new Map)}),[{key:"generateId",value:function(e){for(var t="".concat(e.containerType,"_container_"),r=0;r<4;++r)t+=B.Utils.Generator.uniqueId();return t}},{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 F(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)?F(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 G(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(G=function(){return!!e})()}var K=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,G()?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)(b,{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)})),$.update(i,{upperBarIcon:{panelId:s}}),o):null}}])}(W);function V(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(V=function(){return!!e})()}var Y=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)(b,{style:{width:"inherit"},id:r})}});return this.addDisposer(r,i),r}}])}(W);function H(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 z=function(){return c((function e(t){o(this,e),d(this,"containerProducers",new Map([["sidepanel",new K],["simple",new Y]])),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 H(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)?H(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 q(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 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&&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 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}var Z=function(){return c((function e(t,r,n){o(this,e),d(this,"iconIds",new Map),d(this,"persistentIconIds",new Map),this.player=t,this.eventManager=r,this.logger=n,this.containerManager=new z(t)}),[{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;N.subscribe(g.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(g.SIDE_PANEL_OPEN,(function(e){var r,n=e.payload.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.activateItem(n)})),N.subscribe(g.SIDE_PANEL_CLOSE,(function(e){var r,n=e.payload.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.deactivateItem(n)})),N.subscribe(g.SET_VALUE_CURRENT_TIME,(function(e){var r=e.payload.currentTime;r>=0&&(t.player.currentTime=r)})),N.subscribe(g.CHAPTERS_ADD,(function(e){var r=e.payload.chapters;if(r&&r.length)for(var n=0;n<r.length;++n){var o,i=r[n],a=i.title,u=+i.time;null===(o=t.timelineManager)||void 0===o||o.addKalturaCuePoint(u,"Chapter",n,a,{onClick:function(e){var t=e.cuePoint;$.update(m.SELECTED_CHAPTER,t.id)}})}})),this.eventManager.listen(this.player,e.core.EventType.TIME_UPDATE,(function(){$.update(m.CURRENT_TIME,"".concat(t.player.currentTime))})),this.eventManager.listen(this.player,e.ui.EventType.GUI_RESIZE,(function(){N.emit(g.PLAYER_RESIZE,{})})),this.eventManager.listen(this.player,e.core.EventType.PAUSE,(function(){$.update(m.IS_PAUSED,!0)})),this.eventManager.listen(this.player,e.core.EventType.PLAY,(function(){$.update(m.IS_PAUSED,!1)}))}},{key:"addUpperBarIcon",value:function(e,t,r,n,o,i){var a,u=this;if(!this.iconIds.has(e)&&!this.persistentIconIds.has(e)){var c=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(){var e,t,r;null!==(e=u.sidePanelsManager)&&void 0!==e&&e.isItemActive(o)?null===(t=u.sidePanelsManager)||void 0===t||t.deactivateItem(o):null===(r=u.sidePanelsManager)||void 0===r||r.activateItem(o)}});i?this.iconIds.set(e,c):this.persistentIconIds.set(e,c)}}},{key:"loadWidgets",value:function(e){var t,r=this,n=q(e);try{var o=function(){var e=t.value,n=e.widgetId,o=e.context;if(!n||!o)return 1;var i,a=q(e.containers);try{var u=function(){var t=i.value;if(!t.unisphereArea)return 1;var a=r.containerManager.createContainer(t);a&&A.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:"registerCuepointType",value:function(){var e,t;null===(e=this.cuePointManager)||void 0===e||e.registerTypes([null===(t=this.cuePointManager)||void 0===t?void 0:t.CuepointType.SUMMARY])}},{key:"init",value:function(e,t){I.set(e),this.addEventHandlers(),this.loadWidgets(t)}},{key:"updateSessionData",value:function(){var e,t;$.update(m.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=q(this.iconIds.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()}}},{key:"destroy",value:function(){this.reset(),this.containerManager.destroy();var e,t=q(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(),$.destroy(),I.destroy()}}])}(),J="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Q=function(e){return e&&e.Math===Math&&e},ee=Q("object"==typeof globalThis&&globalThis)||Q("object"==typeof window&&window)||Q("object"==typeof self&&self)||Q("object"==typeof J&&J)||Q("object"==typeof J&&J)||function(){return this}()||Function("return this")(),te={},re=function(e){try{return!!e()}catch(e){return!0}},ne=!re((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),oe=!re((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ie=oe,ae=Function.prototype.call,ue=ie?ae.bind(ae):function(){return ae.apply(ae,arguments)},ce={},se={}.propertyIsEnumerable,le=Object.getOwnPropertyDescriptor,fe=le&&!se.call({1:2},1);ce.f=fe?function(e){var t=le(this,e);return!!t&&t.enumerable}:se;var pe,de,he=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ve=oe,ye=Function.prototype,ge=ye.call,me=ve&&ye.bind.bind(ge,ge),be=ve?me:function(e){return function(){return ge.apply(e,arguments)}},we=be,Ee=we({}.toString),Se=we("".slice),Oe=function(e){return Se(Ee(e),8,-1)},Ie=re,xe=Oe,_e=Object,Re=be("".split),Te=Ie((function(){return!_e("z").propertyIsEnumerable(0)}))?function(e){return"String"===xe(e)?Re(e,""):_e(e)}:_e,Pe=function(e){return null==e},je=Pe,Ae=TypeError,Me=function(e){if(je(e))throw new Ae("Can't call method on "+e);return e},ke=Te,Ce=Me,Ne=function(e){return ke(Ce(e))},Le="object"==typeof document&&document.all,De=void 0===Le&&void 0!==Le?function(e){return"function"==typeof e||e===Le}:function(e){return"function"==typeof e},Ue=De,$e=function(e){return"object"==typeof e?null!==e:Ue(e)},Be=ee,Fe=De,We=function(e,t){return arguments.length<2?(r=Be[e],Fe(r)?r:void 0):Be[e]&&Be[e][t];var r},Ge=be({}.isPrototypeOf),Ke="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Ve=ee,Ye=Ke,He=Ve.process,ze=Ve.Deno,qe=He&&He.versions||ze&&ze.version,Xe=qe&&qe.v8;Xe&&(de=(pe=Xe.split("."))[0]>0&&pe[0]<4?1:+(pe[0]+pe[1])),!de&&Ye&&(!(pe=Ye.match(/Edge\/(\d+)/))||pe[1]>=74)&&(pe=Ye.match(/Chrome\/(\d+)/))&&(de=+pe[1]);var Ze=de,Je=Ze,Qe=re,et=ee.String,tt=!!Object.getOwnPropertySymbols&&!Qe((function(){var e=Symbol("symbol detection");return!et(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Je&&Je<41})),rt=tt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,nt=We,ot=De,it=Ge,at=Object,ut=rt?function(e){return"symbol"==typeof e}:function(e){var t=nt("Symbol");return ot(t)&&it(t.prototype,at(e))},ct=String,st=function(e){try{return ct(e)}catch(e){return"Object"}},lt=De,ft=st,pt=TypeError,dt=function(e){if(lt(e))return e;throw new pt(ft(e)+" is not a function")},ht=dt,vt=Pe,yt=function(e,t){var r=e[t];return vt(r)?void 0:ht(r)},gt=ue,mt=De,bt=$e,wt=TypeError,Et={exports:{}},St=ee,Ot=Object.defineProperty,It=function(e,t){try{Ot(St,e,{value:t,configurable:!0,writable:!0})}catch(r){St[e]=t}return t},xt=ee,_t=It,Rt="__core-js_shared__",Tt=Et.exports=xt[Rt]||_t(Rt,{});(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 Pt=Et.exports,jt=Pt,At=function(e,t){return jt[e]||(jt[e]=t||{})},Mt=Me,kt=Object,Ct=function(e){return kt(Mt(e))},Nt=Ct,Lt=be({}.hasOwnProperty),Dt=Object.hasOwn||function(e,t){return Lt(Nt(e),t)},Ut=be,$t=0,Bt=Math.random(),Ft=Ut(1..toString),Wt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ft(++$t+Bt,36)},Gt=At,Kt=Dt,Vt=Wt,Yt=tt,Ht=rt,zt=ee.Symbol,qt=Gt("wks"),Xt=Ht?zt.for||zt:zt&&zt.withoutSetter||Vt,Zt=function(e){return Kt(qt,e)||(qt[e]=Yt&&Kt(zt,e)?zt[e]:Xt("Symbol."+e)),qt[e]},Jt=ue,Qt=$e,er=ut,tr=yt,rr=TypeError,nr=Zt("toPrimitive"),or=function(e,t){if(!Qt(e)||er(e))return e;var r,n=tr(e,nr);if(n){if(void 0===t&&(t="default"),r=Jt(n,e,t),!Qt(r)||er(r))return r;throw new rr("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&mt(r=e.toString)&&!bt(n=gt(r,e)))return n;if(mt(r=e.valueOf)&&!bt(n=gt(r,e)))return n;if("string"!==t&&mt(r=e.toString)&&!bt(n=gt(r,e)))return n;throw new wt("Can't convert object to primitive value")}(e,t)},ir=ut,ar=function(e){var t=or(e,"string");return ir(t)?t:t+""},ur=$e,cr=ee.document,sr=ur(cr)&&ur(cr.createElement),lr=function(e){return sr?cr.createElement(e):{}},fr=lr,pr=!ne&&!re((function(){return 7!==Object.defineProperty(fr("div"),"a",{get:function(){return 7}}).a})),dr=ne,hr=ue,vr=ce,yr=he,gr=Ne,mr=ar,br=Dt,wr=pr,Er=Object.getOwnPropertyDescriptor;te.f=dr?Er:function(e,t){if(e=gr(e),t=mr(t),wr)try{return Er(e,t)}catch(e){}if(br(e,t))return yr(!hr(vr.f,e,t),e[t])};var Sr={},Or=ne&&re((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ir=$e,xr=String,_r=TypeError,Rr=function(e){if(Ir(e))return e;throw new _r(xr(e)+" is not an object")},Tr=ne,Pr=pr,jr=Or,Ar=Rr,Mr=ar,kr=TypeError,Cr=Object.defineProperty,Nr=Object.getOwnPropertyDescriptor,Lr="enumerable",Dr="configurable",Ur="writable";Sr.f=Tr?jr?function(e,t,r){if(Ar(e),t=Mr(t),Ar(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Ur in r&&!r[Ur]){var n=Nr(e,t);n&&n[Ur]&&(e[t]=r.value,r={configurable:Dr in r?r[Dr]:n[Dr],enumerable:Lr in r?r[Lr]:n[Lr],writable:!1})}return Cr(e,t,r)}:Cr:function(e,t,r){if(Ar(e),t=Mr(t),Ar(r),Pr)try{return Cr(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new kr("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var $r=Sr,Br=he,Fr=ne?function(e,t,r){return $r.f(e,t,Br(1,r))}:function(e,t,r){return e[t]=r,e},Wr={exports:{}},Gr=ne,Kr=Dt,Vr=Function.prototype,Yr=Gr&&Object.getOwnPropertyDescriptor,Hr=Kr(Vr,"name"),zr={EXISTS:Hr,PROPER:Hr&&"something"===function(){}.name,CONFIGURABLE:Hr&&(!Gr||Gr&&Yr(Vr,"name").configurable)},qr=De,Xr=Pt,Zr=be(Function.toString);qr(Xr.inspectSource)||(Xr.inspectSource=function(e){return Zr(e)});var Jr,Qr,en,tn=Xr.inspectSource,rn=De,nn=ee.WeakMap,on=rn(nn)&&/native code/.test(String(nn)),an=Wt,un=At("keys"),cn=function(e){return un[e]||(un[e]=an(e))},sn={},ln=on,fn=ee,pn=$e,dn=Fr,hn=Dt,vn=Pt,yn=cn,gn=sn,mn="Object already initialized",bn=fn.TypeError,wn=fn.WeakMap;if(ln||vn.state){var En=vn.state||(vn.state=new wn);En.get=En.get,En.has=En.has,En.set=En.set,Jr=function(e,t){if(En.has(e))throw new bn(mn);return t.facade=e,En.set(e,t),t},Qr=function(e){return En.get(e)||{}},en=function(e){return En.has(e)}}else{var Sn=yn("state");gn[Sn]=!0,Jr=function(e,t){if(hn(e,Sn))throw new bn(mn);return t.facade=e,dn(e,Sn,t),t},Qr=function(e){return hn(e,Sn)?e[Sn]:{}},en=function(e){return hn(e,Sn)}}var On={set:Jr,get:Qr,has:en,enforce:function(e){return en(e)?Qr(e):Jr(e,{})},getterFor:function(e){return function(t){var r;if(!pn(t)||(r=Qr(t)).type!==e)throw new bn("Incompatible receiver, "+e+" required");return r}}},In=be,xn=re,_n=De,Rn=Dt,Tn=ne,Pn=zr.CONFIGURABLE,jn=tn,An=On.enforce,Mn=On.get,kn=String,Cn=Object.defineProperty,Nn=In("".slice),Ln=In("".replace),Dn=In([].join),Un=Tn&&!xn((function(){return 8!==Cn((function(){}),"length",{value:8}).length})),$n=String(String).split("String"),Bn=Wr.exports=function(e,t,r){"Symbol("===Nn(kn(t),0,7)&&(t="["+Ln(kn(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Rn(e,"name")||Pn&&e.name!==t)&&(Tn?Cn(e,"name",{value:t,configurable:!0}):e.name=t),Un&&r&&Rn(r,"arity")&&e.length!==r.arity&&Cn(e,"length",{value:r.arity});try{r&&Rn(r,"constructor")&&r.constructor?Tn&&Cn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=An(e);return Rn(n,"source")||(n.source=Dn($n,"string"==typeof t?t:"")),e};Function.prototype.toString=Bn((function(){return _n(this)&&Mn(this).source||jn(this)}),"toString");var Fn=Wr.exports,Wn=De,Gn=Sr,Kn=Fn,Vn=It,Yn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(Wn(r)&&Kn(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:Gn.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Hn={},zn=Math.ceil,qn=Math.floor,Xn=Math.trunc||function(e){var t=+e;return(t>0?qn:zn)(t)},Zn=function(e){var t=+e;return t!=t||0===t?0:Xn(t)},Jn=Zn,Qn=Math.max,eo=Math.min,to=Zn,ro=Math.min,no=function(e){var t=to(e);return t>0?ro(t,9007199254740991):0},oo=no,io=function(e){return oo(e.length)},ao=Ne,uo=io,co=function(e){return function(t,r,n){var o=ao(t),i=uo(o);if(0===i)return!e&&-1;var a,u=function(e,t){var r=Jn(e);return r<0?Qn(r+t,0):eo(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}},so={includes:co(!0),indexOf:co(!1)},lo=Dt,fo=Ne,po=so.indexOf,ho=sn,vo=be([].push),yo=function(e,t){var r,n=fo(e),o=0,i=[];for(r in n)!lo(ho,r)&&lo(n,r)&&vo(i,r);for(;t.length>o;)lo(n,r=t[o++])&&(~po(i,r)||vo(i,r));return i},go=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mo=yo,bo=go.concat("length","prototype");Hn.f=Object.getOwnPropertyNames||function(e){return mo(e,bo)};var wo={};wo.f=Object.getOwnPropertySymbols;var Eo=We,So=Hn,Oo=wo,Io=Rr,xo=be([].concat),_o=Eo("Reflect","ownKeys")||function(e){var t=So.f(Io(e)),r=Oo.f;return r?xo(t,r(e)):t},Ro=Dt,To=_o,Po=te,jo=Sr,Ao=function(e,t,r){for(var n=To(t),o=jo.f,i=Po.f,a=0;a<n.length;a++){var u=n[a];Ro(e,u)||r&&Ro(r,u)||o(e,u,i(t,u))}},Mo=re,ko=De,Co=/#|\.prototype\./,No=function(e,t){var r=Do[Lo(e)];return r===$o||r!==Uo&&(ko(t)?Mo(t):!!t)},Lo=No.normalize=function(e){return String(e).replace(Co,".").toLowerCase()},Do=No.data={},Uo=No.NATIVE="N",$o=No.POLYFILL="P",Bo=No,Fo=ee,Wo=te.f,Go=Fr,Ko=Yn,Vo=It,Yo=Ao,Ho=Bo,zo=function(e,t){var r,n,o,i,a,u=e.target,c=e.global,s=e.stat;if(r=c?Fo:s?Fo[u]||Vo(u,{}):Fo[u]&&Fo[u].prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=Wo(r,n))&&a.value:r[n],!Ho(c?n:u+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Yo(i,o)}(e.sham||o&&o.sham)&&Go(i,"sham",!0),Ko(r,n,i,e)}},qo=oe,Xo=Function.prototype,Zo=Xo.apply,Jo=Xo.call,Qo="object"==typeof Reflect&&Reflect.apply||(qo?Jo.bind(Zo):function(){return Jo.apply(Zo,arguments)}),ei=be,ti=dt,ri=$e,ni=String,oi=TypeError,ii=$e,ai=Me,ui=function(e){if(function(e){return ri(e)||null===e}(e))return e;throw new oi("Can't set "+ni(e)+" as a prototype")},ci=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=function(e,t,r){try{return ei(ti(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return ai(r),ui(n),ii(r)?(t?e(r,n):r.__proto__=n,r):r}}():void 0),si=Sr.f,li=De,fi=$e,pi=ci,di=function(e,t,r){var n,o;return pi&&li(n=t.constructor)&&n!==r&&fi(o=n.prototype)&&o!==r.prototype&&pi(e,o),e},hi={};hi[Zt("toStringTag")]="z";var vi="[object z]"===String(hi),yi=De,gi=Oe,mi=Zt("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,Oi=String,Ii=function(e){if("Symbol"===Si(e))throw new TypeError("Cannot convert a Symbol value to a string");return Oi(e)},xi=Ii,_i=function(e,t){return void 0===e?arguments.length<2?"":t:xi(e)},Ri=$e,Ti=Fr,Pi=Error,ji=be("".replace),Ai=String(new Pi("zxcasd").stack),Mi=/\n\s*at [^:]*:[^\n]*/,ki=Mi.test(Ai),Ci=function(e,t){if(ki&&"string"==typeof e&&!Pi.prepareStackTrace)for(;t--;)e=ji(e,Mi,"");return e},Ni=he,Li=!re((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ni(1,7)),7!==e.stack)})),Di=Fr,Ui=Ci,$i=Li,Bi=Error.captureStackTrace,Fi=We,Wi=Dt,Gi=Fr,Ki=Ge,Vi=ci,Yi=Ao,Hi=function(e,t,r){r in e||si(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},zi=di,qi=_i,Xi=ne,Zi=zo,Ji=Qo,Qi=function(e,t,r,n){var o="stackTraceLimit",i=n?2:1,a=e.split("."),u=a[a.length-1],c=Fi.apply(null,a);if(c){var s=c.prototype;if(Wi(s,"cause")&&delete s.cause,!r)return c;var l=Fi("Error"),f=t((function(e,t){var r,o,a,u,l,p,d=qi(n?t:e,void 0),h=n?new c(e):new c;return void 0!==d&&Gi(h,"message",d),a=h,u=f,l=h.stack,p=2,$i&&(Bi?Bi(a,u):Di(a,"stack",Ui(l,p))),this&&Ki(s,this)&&zi(h,this,f),arguments.length>i&&(r=h,Ri(o=arguments[i])&&"cause"in o&&Ti(r,"cause",o.cause)),h}));f.prototype=s,"Error"!==u?Vi?Vi(f,l):Yi(f,l,{name:!0}):Xi&&o in c&&(Hi(f,c,o),Hi(f,c,"prepareStackTrace")),Yi(f,c);try{s.name!==u&&Gi(s,"name",u),s.constructor=f}catch(e){}return f}},ea="WebAssembly",ta=ee[ea],ra=7!==new Error("e",{cause:7}).cause,na=function(e,t){var r={};r[e]=Qi(e,t,ra),Zi({global:!0,constructor:!0,arity:1,forced:ra},r)},oa=function(e,t){if(ta&&ta[e]){var r={};r[e]=Qi(ea+"."+e,t,ra),Zi({target:ea,stat:!0,constructor:!0,arity:1,forced:ra},r)}};na("Error",(function(e){return function(t){return Ji(e,this,arguments)}})),na("EvalError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("RangeError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("ReferenceError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("SyntaxError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("TypeError",(function(e){return function(t){return Ji(e,this,arguments)}})),na("URIError",(function(e){return function(t){return Ji(e,this,arguments)}})),oa("CompileError",(function(e){return function(t){return Ji(e,this,arguments)}})),oa("LinkError",(function(e){return function(t){return Ji(e,this,arguments)}})),oa("RuntimeError",(function(e){return function(t){return Ji(e,this,arguments)}})),Error;var ia=Oe,aa=ne,ua=Array.isArray||function(e){return"Array"===ia(e)},ca=TypeError,sa=Object.getOwnPropertyDescriptor,la=aa&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),fa=TypeError,pa=Ct,da=io,ha=la?function(e,t){if(ua(e)&&!sa(e,"length").writable)throw new ca("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t};zo({target:"Array",proto:!0,arity:1,forced:re((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=pa(this),r=da(t),n=arguments.length;!function(e){if(e>9007199254740991)throw fa("Maximum allowed index exceeded")}(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return ha(t,r),r}});var va=yo,ya=go,ga=Object.keys||function(e){return va(e,ya)},ma=ne,ba=be,wa=ue,Ea=re,Sa=ga,Oa=wo,Ia=ce,xa=Ct,_a=Te,Ra=Object.assign,Ta=Object.defineProperty,Pa=ba([].concat),ja=!Ra||Ea((function(){if(ma&&1!==Ra({b:1},Ra(Ta({},"a",{enumerable:!0,get:function(){Ta(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!==Ra({},e)[r]||Sa(Ra({},t)).join("")!==n}))?function(e,t){for(var r=xa(e),n=arguments.length,o=1,i=Oa.f,a=Ia.f;n>o;)for(var u,c=_a(arguments[o++]),s=i?Pa(Sa(c),i(c)):Sa(c),l=s.length,f=0;l>f;)u=s[f++],ma&&!wa(a,c,u)||(r[u]=c[u]);return r}:Ra,Aa=ja;zo({target:"Object",stat:!0,arity:2,forced:Object.assign!==Aa},{assign:Aa});var Ma={},ka=ne,Ca=Or,Na=Sr,La=Rr,Da=Ne,Ua=ga;Ma.f=ka&&!Ca?Object.defineProperties:function(e,t){La(e);for(var r,n=Da(t),o=Ua(t),i=o.length,a=0;i>a;)Na.f(e,r=o[a++],n[r]);return e};var $a,Ba=We("document","documentElement"),Fa=Rr,Wa=Ma,Ga=go,Ka=sn,Va=Ba,Ya=lr,Ha="prototype",za="script",qa=cn("IE_PROTO"),Xa=function(){},Za=function(e){return"<"+za+">"+e+"</"+za+">"},Ja=function(e){e.write(Za("")),e.close();var t=e.parentWindow.Object;return e=null,t},Qa=function(){try{$a=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;Qa="undefined"!=typeof document?document.domain&&$a?Ja($a):(t=Ya("iframe"),r="java"+za+":",t.style.display="none",Va.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Za("document.F=Object")),e.close(),e.F):Ja($a);for(var n=Ga.length;n--;)delete Qa[Ha][Ga[n]];return Qa()};Ka[qa]=!0;var eu=Object.create||function(e,t){var r;return null!==e?(Xa[Ha]=Fa(e),r=new Xa,Xa[Ha]=null,r[qa]=e):r=Qa(),void 0===t?r:Wa.f(r,t)},tu=Zt,ru=eu,nu=Sr.f,ou=tu("unscopables"),iu=Array.prototype;void 0===iu[ou]&&nu(iu,ou,{configurable:!0,value:ru(null)});var au=so.includes;zo({target:"Array",proto:!0,forced:re((function(){return!Array(1).includes()}))},{includes:function(e){return au(this,e,arguments.length>1?arguments[1]:void 0)}}),function(e){iu[ou][e]=!0}("includes");var uu=TypeError,cu=function(e,t){if(e<t)throw new uu("Not enough arguments");return e},su="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",lu=su+"+/",fu=su+"-_",pu=function(e){for(var t={},r=0;r<64;r++)t[e.charAt(r)]=r;return t},du={i2c:lu,c2i:pu(lu),i2cUrl:fu,c2iUrl:pu(fu)},hu=zo,vu=ee,yu=We,gu=be,mu=ue,bu=re,wu=Ii,Eu=cu,Su=du.c2i,Ou=/[^\d+/a-z]/i,Iu=/[\t\n\f\r ]+/g,xu=/[=]{1,2}$/,_u=yu("atob"),Ru=String.fromCharCode,Tu=gu("".charAt),Pu=gu("".replace),ju=gu(Ou.exec),Au=!!_u&&!bu((function(){return"hi"!==_u("aGk=")})),Mu=Au&&bu((function(){return""!==_u(" ")})),ku=Au&&!bu((function(){_u("a")})),Cu=Au&&!bu((function(){_u()})),Nu=Au&&1!==_u.length;hu({global:!0,bind:!0,enumerable:!0,forced:!Au||Mu||ku||Cu||Nu},{atob:function(e){if(Eu(arguments.length,1),Au&&!Mu&&!ku)return mu(_u,vu,e);var t,r,n,o=Pu(wu(e),Iu,""),i="",a=0,u=0;if(o.length%4==0&&(o=Pu(o,xu,"")),(t=o.length)%4==1||ju(Ou,o))throw new(yu("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;a<t;)r=Tu(o,a++),n=u%4?64*n+Su[r]:Su[r],u++%4&&(i+=Ru(255&n>>(-2*u&6)));return i}});var Lu="process"===Oe(ee.process),Du=Lu,Uu=Fn,$u=Sr,Bu=function(e,t,r){return r.get&&Uu(r.get,t,{getter:!0}),r.set&&Uu(r.set,t,{setter:!0}),$u.f(e,t,r)},Fu=Ge,Wu=TypeError,Gu=function(e,t){if(Fu(t,e))return e;throw new Wu("Incorrect invocation")},Ku=ne,Vu=re,Yu=Rr,Hu=_i,zu=Error.prototype.toString,qu=Vu((function(){if(Ku){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==zu.call(e))return!0}return"2: 1"!==zu.call({message:1,name:2})||"Error"!==zu.call({})}))?function(){var e=Yu(this),t=Hu(e.name,"Error"),r=Hu(e.message);return t?r?t+": "+r:t:r}:zu,Xu={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}},Zu=zo,Ju=We,Qu=re,ec=eu,tc=he,rc=Sr.f,nc=Yn,oc=Bu,ic=Dt,ac=Gu,uc=Rr,cc=qu,sc=_i,lc=Xu,fc=Ci,pc=On,dc=ne,hc="DOMException",vc="DATA_CLONE_ERR",yc=Ju("Error"),gc=Ju(hc)||function(){try{(new(Ju("MessageChannel")||function(e){try{if(Du)return Function('return require("'+e+'")')()}catch(e){}}("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(e){if(e.name===vc&&25===e.code)return e.constructor}}(),mc=gc&&gc.prototype,bc=yc.prototype,wc=pc.set,Ec=pc.getterFor(hc),Sc="stack"in new yc(hc),Oc=function(e){return ic(lc,e)&&lc[e].m?lc[e].c:0},Ic=function(){ac(this,xc);var e=arguments.length,t=sc(e<1?void 0:arguments[0]),r=sc(e<2?void 0:arguments[1],"Error"),n=Oc(r);if(wc(this,{type:hc,name:r,message:t,code:n}),dc||(this.name=r,this.message=t,this.code=n),Sc){var o=new yc(t);o.name=hc,rc(this,"stack",tc(1,fc(o.stack,1)))}},xc=Ic.prototype=ec(bc),_c=function(e){return{enumerable:!0,configurable:!0,get:e}},Rc=function(e){return _c((function(){return Ec(this)[e]}))};dc&&(oc(xc,"code",Rc("code")),oc(xc,"message",Rc("message")),oc(xc,"name",Rc("name"))),rc(xc,"constructor",tc(1,Ic));var Tc=Qu((function(){return!(new gc instanceof yc)})),Pc=Tc||Qu((function(){return bc.toString!==cc||"2: 1"!==String(new gc(1,2))})),jc=Tc||Qu((function(){return 25!==new gc(1,"DataCloneError").code}));Tc||25!==gc[vc]||mc[vc],Zu({global:!0,constructor:!0,forced:Tc},{DOMException:Tc?Ic:gc});var Ac=Ju(hc),Mc=Ac.prototype;for(var kc in Pc&&gc===Ac&&nc(Mc,"toString",cc),jc&&dc&&gc===Ac&&oc(Mc,"code",_c((function(){return Oc(uc(this).name)}))),lc)if(ic(lc,kc)){var Cc=lc[kc],Nc=Cc.s,Lc=tc(6,Cc.c);ic(Ac,Nc)||rc(Ac,Nc,Lc),ic(Mc,Nc)||rc(Mc,Nc,Lc)}var Dc=zo,Uc=ee,$c=We,Bc=he,Fc=Sr.f,Wc=Dt,Gc=Gu,Kc=di,Vc=_i,Yc=Xu,Hc=Ci,zc=ne,qc="DOMException",Xc=$c("Error"),Zc=$c(qc),Jc=function(){Gc(this,Qc);var e=arguments.length,t=Vc(e<1?void 0:arguments[0]),r=Vc(e<2?void 0:arguments[1],"Error"),n=new Zc(t,r),o=new Xc(t);return o.name=qc,Fc(n,"stack",Bc(1,Hc(o.stack,1))),Kc(n,this,Jc),n},Qc=Jc.prototype=Zc.prototype,es="stack"in new Xc(qc),ts="stack"in new Zc(1,2),rs=Zc&&zc&&Object.getOwnPropertyDescriptor(Uc,qc),ns=!(!rs||rs.writable&&rs.configurable),os=es&&!ns&&!ts;Dc({global:!0,constructor:!0,forced:os},{DOMException:os?Jc:Zc});var is=$c(qc),as=is.prototype;if(as.constructor!==is)for(var us in Fc(as,"constructor",Bc(1,is)),Yc)if(Wc(Yc,us)){var cs=Yc[us],ss=cs.s;Wc(is,ss)||Fc(is,ss,Bc(6,cs.c))}var ls=Sr.f,fs=Dt,ps=Zt("toStringTag"),ds=function(e,t,r){e&&!r&&(e=e.prototype),e&&!fs(e,ps)&&ls(e,ps,{configurable:!0,value:t})},hs="DOMException";ds(We(hs),hs);var vs,ys,gs=Rr,ms=re,bs=ee.RegExp,ws=ms((function(){var e=bs("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Es=ws||ms((function(){return!bs("a","y").sticky})),Ss={BROKEN_CARET:ws||ms((function(){var e=bs("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Es,UNSUPPORTED_Y:ws},Os=re,Is=ee.RegExp,xs=Os((function(){var e=Is(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),_s=re,Rs=ee.RegExp,Ts=_s((function(){var e=Rs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ps=ue,js=be,As=Ii,Ms=function(){var e=gs(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},ks=Ss,Cs=eu,Ns=On.get,Ls=xs,Ds=Ts,Us=At("native-string-replace",String.prototype.replace),$s=RegExp.prototype.exec,Bs=$s,Fs=js("".charAt),Ws=js("".indexOf),Gs=js("".replace),Ks=js("".slice),Vs=(ys=/b*/g,Ps($s,vs=/a/,"a"),Ps($s,ys,"a"),0!==vs.lastIndex||0!==ys.lastIndex),Ys=ks.BROKEN_CARET,Hs=void 0!==/()??/.exec("")[1];(Vs||Hs||Ys||Ls||Ds)&&(Bs=function(e){var t,r,n,o,i,a,u,c=this,s=Ns(c),l=As(e),f=s.raw;if(f)return f.lastIndex=c.lastIndex,t=Ps(Bs,f,l),c.lastIndex=f.lastIndex,t;var p=s.groups,d=Ys&&c.sticky,h=Ps(Ms,c),v=c.source,y=0,g=l;if(d&&(h=Gs(h,"y",""),-1===Ws(h,"g")&&(h+="g"),g=Ks(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Fs(l,c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",h)),Hs&&(r=new RegExp("^"+v+"$(?!\\s)",h)),Vs&&(n=c.lastIndex),o=Ps($s,d?r:c,g),d?o?(o.input=Ks(o.input,y),o[0]=Ks(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Vs&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Hs&&o&&o.length>1&&Ps(Us,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=Cs(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var zs=Bs;zo({target:"RegExp",proto:!0,forced:/./.exec!==zs},{exec:zs});var qs=ue,Xs=Yn,Zs=zs,Js=re,Qs=Zt,el=Fr,tl=Qs("species"),rl=RegExp.prototype,nl=function(e,t,r,n){var o=Qs(e),i=!Js((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),a=i&&!Js((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[tl]=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===Zs||a===rl.exec?i&&!o?{done:!0,value:qs(u,t,r,n)}:{done:!0,value:qs(e,r,t,n)}:{done:!1}}));Xs(String.prototype,e,c[0]),Xs(rl,o,c[1])}n&&el(rl[o],"sham",!0)},ol=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},il=ue,al=Rr,ul=De,cl=Oe,sl=zs,ll=TypeError,fl=function(e,t){var r=e.exec;if(ul(r)){var n=il(r,e,t);return null!==n&&al(n),n}if("RegExp"===cl(e))return il(sl,e,t);throw new ll("RegExp#exec called on incompatible receiver")},pl=ue,dl=Rr,hl=Pe,vl=Me,yl=ol,gl=Ii,ml=yt,bl=fl;nl("search",(function(e,t,r){return[function(t){var r=vl(this),n=hl(t)?void 0:ml(t,e);return n?pl(n,t,r):new RegExp(t)[e](gl(r))},function(e){var n=dl(this),o=gl(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;yl(a,0)||(n.lastIndex=0);var u=bl(n,o);return yl(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]}));const wl=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 El="true"===wl("unisphereVerbose")?"log":wl("unisphereVerbose")||"";const Sl=["log","debug"].includes(El)?El:"warn",Ol=wl("unisphereEnvironment")||"prod";let Il=wl("unisphereDevLoader")||null;if(Il)try{Il=JSON.parse(window.atob(Il))}catch(e){Il=null,console.error("failed to parse dev loader path from query params",{error:e})}const xl={logLevel:Sl,loaderUrl:Il,verbose:El,environment:"dev"===Ol?"dev":"prod"},_l=()=>xl;let Rl=window.unisphere;"unisphere"in window||(Rl=window.unisphere={});const Tl={logToConsole:!0,logLevel:_l().logLevel};class Pl{static createWorkspaceLogger(e){return new Pl(e)}constructor(e){this.workspaceName=e,this._settings=Object.assign({},Tl)}getLogger(e){return new jl(this.workspaceName,e,this.getSettings.bind(this))}getSettings(){return this._settings}updateSettings(e){this._settings=Object.assign(Object.assign({},this._settings),e)}}class jl{constructor(e,t,r){this.workspaceName=e,this.runtime=t,this._getSettings=r;const{value:n}=(i={interceptors:[],logMessages:[]},(o="loggers")in Rl?{value:Rl[o],isNew:!1}:(Rl[o]=i,{value:i,isNew:!0}));var o,i;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 Al=We,Ml=Bu,kl=ne,Cl=Zt("species"),Nl=be,Ll=re,Dl=De,Ul=Ei,$l=tn,Bl=function(){},Fl=We("Reflect","construct"),Wl=/^\s*(?:class|function)\b/,Gl=Nl(Wl.exec),Kl=!Wl.test(Bl),Vl=function(e){if(!Dl(e))return!1;try{return Fl(Bl,[],e),!0}catch(e){return!1}},Yl=function(e){if(!Dl(e))return!1;switch(Ul(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Kl||!!Gl(Wl,$l(e))}catch(e){return!0}};Yl.sham=!0;var Hl,zl,ql,Xl,Zl=!Fl||Ll((function(){var e;return Vl(Vl.call)||!Vl(Object)||!Vl((function(){e=!0}))||e}))?Yl:Vl,Jl=Zl,Ql=st,ef=TypeError,tf=Rr,rf=Pe,nf=Zt("species"),of=Oe,af=be,uf=function(e){if("Function"===of(e))return af(e)},cf=dt,sf=oe,lf=uf(uf.bind),ff=function(e,t){return cf(e),void 0===t?e:sf?lf(e,t):function(){return e.apply(t,arguments)}},pf=be([].slice),df=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ke),hf=ee,vf=Qo,yf=ff,gf=De,mf=Dt,bf=re,wf=Ba,Ef=pf,Sf=lr,Of=cu,If=df,xf=Lu,_f=hf.setImmediate,Rf=hf.clearImmediate,Tf=hf.process,Pf=hf.Dispatch,jf=hf.Function,Af=hf.MessageChannel,Mf=hf.String,kf=0,Cf={},Nf="onreadystatechange";bf((function(){Hl=hf.location}));var Lf=function(e){if(mf(Cf,e)){var t=Cf[e];delete Cf[e],t()}},Df=function(e){return function(){Lf(e)}},Uf=function(e){Lf(e.data)},$f=function(e){hf.postMessage(Mf(e),Hl.protocol+"//"+Hl.host)};_f&&Rf||(_f=function(e){Of(arguments.length,1);var t=gf(e)?e:jf(e),r=Ef(arguments,1);return Cf[++kf]=function(){vf(t,void 0,r)},zl(kf),kf},Rf=function(e){delete Cf[e]},xf?zl=function(e){Tf.nextTick(Df(e))}:Pf&&Pf.now?zl=function(e){Pf.now(Df(e))}:Af&&!If?(Xl=(ql=new Af).port2,ql.port1.onmessage=Uf,zl=yf(Xl.postMessage,Xl)):hf.addEventListener&&gf(hf.postMessage)&&!hf.importScripts&&Hl&&"file:"!==Hl.protocol&&!bf($f)?(zl=$f,hf.addEventListener("message",Uf,!1)):zl=Nf in Sf("script")?function(e){wf.appendChild(Sf("script"))[Nf]=function(){wf.removeChild(this),Lf(e)}}:function(e){setTimeout(Df(e),0)});var Bf={set:_f,clear:Rf},Ff=ee,Wf=ne,Gf=Object.getOwnPropertyDescriptor,Kf=function(){this.head=null,this.tail=null};Kf.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 Vf,Yf,Hf,zf,qf,Xf=Kf,Zf=/ipad|iphone|ipod/i.test(Ke)&&"undefined"!=typeof Pebble,Jf=/web0s(?!.*chrome)/i.test(Ke),Qf=ee,ep=ff,tp=Bf.set,rp=Xf,np=df,op=Zf,ip=Jf,ap=Lu,up=Qf.MutationObserver||Qf.WebKitMutationObserver,cp=Qf.document,sp=Qf.process,lp=Qf.Promise,fp=function(e){if(!Wf)return Ff[e];var t=Gf(Ff,e);return t&&t.value}("queueMicrotask");if(!fp){var pp=new rp,dp=function(){var e,t;for(ap&&(e=sp.domain)&&e.exit();t=pp.get();)try{t()}catch(e){throw pp.head&&Vf(),e}e&&e.enter()};np||ap||ip||!up||!cp?!op&&lp&&lp.resolve?((zf=lp.resolve(void 0)).constructor=lp,qf=ep(zf.then,zf),Vf=function(){qf(dp)}):ap?Vf=function(){sp.nextTick(dp)}:(tp=ep(tp,Qf),Vf=function(){tp(dp)}):(Yf=!0,Hf=cp.createTextNode(""),new up(dp).observe(Hf,{characterData:!0}),Vf=function(){Hf.data=Yf=!Yf}),fp=function(e){pp.head||Vf(),pp.add(e)}}var hp=fp,vp=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},yp=ee.Promise,gp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,mp=!gp&&!Lu&&"object"==typeof window&&"object"==typeof document,bp=ee,wp=yp,Ep=De,Sp=Bo,Op=tn,Ip=Zt,xp=mp,_p=gp,Rp=Ze;wp&&wp.prototype;var Tp=Ip("species"),Pp=!1,jp=Ep(bp.PromiseRejectionEvent),Ap=Sp("Promise",(function(){var e=Op(wp),t=e!==String(wp);if(!t&&66===Rp)return!0;if(!Rp||Rp<51||!/native code/.test(e)){var r=new wp((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Tp]=n,!(Pp=r.then((function(){}))instanceof n))return!0}return!t&&(xp||_p)&&!jp})),Mp={CONSTRUCTOR:Ap,REJECTION_EVENT:jp,SUBCLASSING:Pp},kp={},Cp=dt,Np=TypeError,Lp=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new Np("Bad Promise constructor");t=e,r=n})),this.resolve=Cp(t),this.reject=Cp(r)};kp.f=function(e){return new Lp(e)};var Dp,Up,$p,Bp,Fp=zo,Wp=Lu,Gp=ee,Kp=ue,Vp=Yn,Yp=ci,Hp=ds,zp=dt,qp=De,Xp=$e,Zp=Gu,Jp=function(e,t){var r,n=tf(e).constructor;return void 0===n||rf(r=tf(n)[nf])?t:function(e){if(Jl(e))return e;throw new ef(Ql(e)+" is not a constructor")}(r)},Qp=Bf.set,ed=hp,td=vp,rd=Xf,nd=On,od=yp,id=kp,ad="Promise",ud=Mp.CONSTRUCTOR,cd=Mp.REJECTION_EVENT,sd=Mp.SUBCLASSING,ld=nd.getterFor(ad),fd=nd.set,pd=od&&od.prototype,dd=od,hd=pd,vd=Gp.TypeError,yd=Gp.document,gd=Gp.process,md=id.f,bd=md,wd=!!(yd&&yd.createEvent&&Gp.dispatchEvent),Ed="unhandledrejection",Sd=function(e){var t;return!(!Xp(e)||!qp(t=e.then))&&t},Od=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&&Td(t),t.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===e.promise?s(new vd("Promise-chain cycle")):(n=Sd(r))?Kp(n,r,c,s):c(r)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},Id=function(e,t){e.notified||(e.notified=!0,ed((function(){for(var r,n=e.reactions;r=n.get();)Od(r,e);e.notified=!1,t&&!e.rejection&&_d(e)})))},xd=function(e,t,r){var n,o;wd?((n=yd.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Gp.dispatchEvent(n)):n={promise:t,reason:r},!cd&&(o=Gp["on"+e])?o(n):e===Ed&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",r)},_d=function(e){Kp(Qp,Gp,(function(){var t,r=e.facade,n=e.value;if(Rd(e)&&(t=td((function(){Wp?gd.emit("unhandledRejection",n,r):xd(Ed,r,n)})),e.rejection=Wp||Rd(e)?2:1,t.error))throw t.value}))},Rd=function(e){return 1!==e.rejection&&!e.parent},Td=function(e){Kp(Qp,Gp,(function(){var t=e.facade;Wp?gd.emit("rejectionHandled",t):xd("rejectionhandled",t,e.value)}))},Pd=function(e,t,r){return function(n){e(t,n,r)}},jd=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Id(e,!0))},Ad=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new vd("Promise can't be resolved itself");var n=Sd(t);n?ed((function(){var r={done:!1};try{Kp(n,t,Pd(Ad,r,e),Pd(jd,r,e))}catch(t){jd(r,t,e)}})):(e.value=t,e.state=1,Id(e,!1))}catch(t){jd({done:!1},t,e)}}};if(ud&&(hd=(dd=function(e){Zp(this,hd),zp(e),Kp(Dp,this);var t=ld(this);try{e(Pd(Ad,t),Pd(jd,t))}catch(e){jd(t,e)}}).prototype,(Dp=function(e){fd(this,{type:ad,done:!1,notified:!1,parent:!1,reactions:new rd,rejection:!1,state:0,value:void 0})}).prototype=Vp(hd,"then",(function(e,t){var r=ld(this),n=md(Jp(this,dd));return r.parent=!0,n.ok=!qp(e)||e,n.fail=qp(t)&&t,n.domain=Wp?gd.domain:void 0,0===r.state?r.reactions.add(n):ed((function(){Od(n,r)})),n.promise})),Up=function(){var e=new Dp,t=ld(e);this.promise=e,this.resolve=Pd(Ad,t),this.reject=Pd(jd,t)},id.f=md=function(e){return e===dd||void 0===e?new Up(e):bd(e)},qp(od)&&pd!==Object.prototype)){$p=pd.then,sd||Vp(pd,"then",(function(e,t){var r=this;return new dd((function(e,t){Kp($p,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete pd.constructor}catch(e){}Yp&&Yp(pd,hd)}Fp({global:!0,constructor:!0,wrap:!0,forced:ud},{Promise:dd}),Hp(dd,ad,!1),Bp=Al(ad),kl&&Bp&&!Bp[Cl]&&Ml(Bp,Cl,{configurable:!0,get:function(){return this}});var Md={},kd=Md,Cd=Zt("iterator"),Nd=Array.prototype,Ld=Ei,Dd=yt,Ud=Pe,$d=Md,Bd=Zt("iterator"),Fd=function(e){if(!Ud(e))return Dd(e,Bd)||Dd(e,"@@iterator")||$d[Ld(e)]},Wd=ue,Gd=dt,Kd=Rr,Vd=st,Yd=Fd,Hd=TypeError,zd=ue,qd=Rr,Xd=yt,Zd=ff,Jd=ue,Qd=Rr,eh=st,th=io,rh=Ge,nh=Fd,oh=function(e,t,r){var n,o;qd(e);try{if(!(n=Xd(e,"return"))){if("throw"===t)throw r;return r}n=zd(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return qd(n),r},ih=TypeError,ah=function(e,t){this.stopped=e,this.result=t},uh=ah.prototype,ch=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=Zd(t,f),g=function(e){return n&&oh(n,"normal",e),new ah(!0,e)},m=function(e){return p?(Qd(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=nh(e)))throw new ih(eh(e)+" is not iterable");if(void 0!==(l=o)&&(kd.Array===l||Nd[Cd]===l)){for(i=0,a=th(e);a>i;i++)if((u=m(e[i]))&&rh(uh,u))return u;return new ah(!1)}n=function(e,t){var r=arguments.length<2?Yd(e):t;if(Gd(r))return Kd(Wd(r,e));throw new Hd(Vd(e)+" is not iterable")}(e,o)}for(c=d?e.next:n.next;!(s=Jd(c,n)).done;){try{u=m(s.value)}catch(e){oh(n,"throw",e)}if("object"==typeof u&&u&&rh(uh,u))return u}return new ah(!1)},sh=Zt("iterator"),lh=!1;try{var fh=0,ph={next:function(){return{done:!!fh++}},return:function(){lh=!0}};ph[sh]=function(){return this},Array.from(ph,(function(){throw 2}))}catch(e){}var dh=yp,hh=Mp.CONSTRUCTOR||!function(e,t){try{if(!t&&!lh)return!1}catch(e){return!1}var r=!1;try{var n={};n[sh]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}((function(e){dh.all(e).then(void 0,(function(){}))})),vh=ue,yh=dt,gh=kp,mh=vp,bh=ch;zo({target:"Promise",stat:!0,forced:hh},{all:function(e){var t=this,r=gh.f(t),n=r.resolve,o=r.reject,i=mh((function(){var r=yh(t.resolve),i=[],a=0,u=1;bh(e,(function(e){var c=a++,s=!1;u++,vh(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 wh=zo,Eh=Mp.CONSTRUCTOR,Sh=yp,Oh=We,Ih=De,xh=Yn,_h=Sh&&Sh.prototype;if(wh({target:"Promise",proto:!0,forced:Eh,real:!0},{catch:function(e){return this.then(void 0,e)}}),Ih(Sh)){var Rh=Oh("Promise").prototype.catch;_h.catch!==Rh&&xh(_h,"catch",Rh,{unsafe:!0})}var Th=ue,Ph=dt,jh=kp,Ah=vp,Mh=ch;zo({target:"Promise",stat:!0,forced:hh},{race:function(e){var t=this,r=jh.f(t),n=r.reject,o=Ah((function(){var o=Ph(t.resolve);Mh(e,(function(e){Th(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var kh=kp;zo({target:"Promise",stat:!0,forced:Mp.CONSTRUCTOR},{reject:function(e){var t=kh.f(this);return(0,t.reject)(e),t.promise}});var Ch=Rr,Nh=$e,Lh=kp,Dh=zo,Uh=Mp.CONSTRUCTOR;We("Promise"),Dh({target:"Promise",stat:!0,forced:Uh},{resolve:function(e){return function(e,t){if(Ch(e),Nh(t)&&t.constructor===e)return t;var r=Lh.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});var $h=$e,Bh=Oe,Fh=Zt("match"),Wh=TypeError,Gh=function(e){if(function(e){var t;return $h(e)&&(void 0!==(t=e[Fh])?!!t:"RegExp"===Bh(e))}(e))throw new Wh("The method doesn't accept regular expressions");return e},Kh=Zt("match"),Vh=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Kh]=!1,"/./"[e](t)}catch(e){}}return!1},Yh=zo,Hh=uf,zh=te.f,qh=no,Xh=Ii,Zh=Gh,Jh=Me,Qh=Vh,ev=Hh("".slice),tv=Math.min,rv=Qh("startsWith"),nv=!rv&&!!function(){var e=zh(String.prototype,"startsWith");return e&&!e.writable}();function ov(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())}))}Yh({target:"String",proto:!0,forced:!nv&&!rv},{startsWith:function(e){var t=Xh(Jh(this));Zh(e);var r=qh(tv(arguments.length>1?arguments[1]:void 0,t.length)),n=Xh(e);return ev(t,r,r+n.length)===n}}),"function"==typeof SuppressedError&&SuppressedError;const iv=_l(),av=(e,t)=>ov(void 0,void 0,void 0,(function*(){const r=Pl.createWorkspaceLogger(e.workspaceName||"").getLogger("fetch-loader");let n="",o="";if(iv.loaderUrl?(r.log(`using custom loader url from query params '${iv.loaderUrl}'`),o=iv.loaderUrl):e.devLoaderUrl&&(r.log(`using custom loader url from options '${e.devLoaderUrl}'`),o=e.devLoaderUrl),o){r.log(`verifying custom loader url '${o}' url against environment runtime json. fetching runtime json...`);const t=yield((e,t)=>ov(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,r),i=o.startsWith(e.serverUrl),a=t.some((e=>o.startsWith(e)));if(r.log("ensuring custom loader url is in environment artifacts or from an allowed domain",{data:{customLoaderUrl:o,serverUrl:e.serverUrl,isInEnvironmentArtifacts:i,isInAllowedDomains:a}}),!i&&!a)throw new Error(`the custom loader url '${o}' is not in the environment artifacts or from an allowed domain`);r.log(`using custom loader url '${o}'`),n=o}else r.log("using environment loader"),n=`${e.serverUrl}/loader/index.esm.js`;r.log("fetching environment unisphere loader",{data:{environmentLoaderUrl:n,options:e}});const{loader:i}=yield import(n);if(!(null==t?void 0:t.aborted)){if(!i)throw new Error(`failed to load dev loader from '${n}'`);return r.log("executing environment unisphere loader"),i(Object.assign({},e))}r.debug("cancelled loading workspace, this might be due to strict mode in development mode, ignore")}));var uv=zo,cv=uf,sv=te.f,lv=no,fv=Ii,pv=Gh,dv=Me,hv=Vh,vv=cv("".slice),yv=Math.min,gv=hv("endsWith"),mv=!gv&&!!function(){var e=sv(String.prototype,"endsWith");return e&&!e.writable}();uv({target:"String",proto:!0,forced:!mv&&!gv},{endsWith:function(e){var t=fv(dv(this));pv(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,o=void 0===r?n:yv(lv(r),n),i=fv(e);return vv(t,o-i.length,o)===i}});var bv=be,wv=Zn,Ev=Ii,Sv=Me,Ov=bv("".charAt),Iv=bv("".charCodeAt),xv=bv("".slice),_v=function(e){return function(t,r){var n,o,i=Ev(Sv(t)),a=wv(r),u=i.length;return a<0||a>=u?e?"":void 0:(n=Iv(i,a))<55296||n>56319||a+1===u||(o=Iv(i,a+1))<56320||o>57343?e?Ov(i,a):n:e?xv(i,a,a+2):o-56320+(n-55296<<10)+65536}},Rv=(_v(!1),_v(!0)),Tv=be,Pv=Ct,jv=Math.floor,Av=Tv("".charAt),Mv=Tv("".replace),kv=Tv("".slice),Cv=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Nv=/\$([$&'`]|\d{1,2})/g,Lv=Qo,Dv=ue,Uv=be,$v=nl,Bv=re,Fv=Rr,Wv=De,Gv=Pe,Kv=Zn,Vv=no,Yv=Ii,Hv=Me,zv=function(e,t,r){return t+(r?Rv(e,t).length:1)},qv=yt,Xv=function(e,t,r,n,o,i){var a=r+e.length,u=n.length,c=Nv;return void 0!==o&&(o=Pv(o),c=Cv),Mv(i,c,(function(i,c){var s;switch(Av(c,0)){case"$":return"$";case"&":return e;case"`":return kv(t,0,r);case"'":return kv(t,a);case"<":s=o[kv(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>u){var f=jv(l/10);return 0===f?i:f<=u?void 0===n[f-1]?Av(c,1):n[f-1]+Av(c,1):i}s=n[l-1]}return void 0===s?"":s}))},Zv=fl,Jv=Zt("replace"),Qv=Math.max,ey=Math.min,ty=Uv([].concat),ry=Uv([].push),ny=Uv("".indexOf),oy=Uv("".slice),iy="$0"==="a".replace(/./,"$0"),ay=!!/./[Jv]&&""===/./[Jv]("a","$0");function uy(e){return ov(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 cy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(cy=function(){return!!e})()}$v("replace",(function(e,t,r){var n=ay?"$":"$0";return[function(e,r){var n=Hv(this),o=Gv(e)?void 0:qv(e,Jv);return o?Dv(o,e,n,r):Dv(t,Yv(n),e,r)},function(e,o){var i=Fv(this),a=Yv(e);if("string"==typeof o&&-1===ny(o,n)&&-1===ny(o,"$<")){var u=r(t,i,a,o);if(u.done)return u.value}var c=Wv(o);c||(o=Yv(o));var s,l=i.global;l&&(s=i.unicode,i.lastIndex=0);for(var f,p=[];null!==(f=Zv(i,a))&&(ry(p,f),l);)""===Yv(f[0])&&(i.lastIndex=zv(a,Vv(i.lastIndex),s));for(var d,h="",v=0,y=0;y<p.length;y++){for(var g,m=Yv((f=p[y])[0]),b=Qv(ey(Kv(f.index),a.length),0),w=[],E=1;E<f.length;E++)ry(w,void 0===(d=f[E])?d:String(d));var S=f.groups;if(c){var O=ty([m],w,b,a);void 0!==S&&ry(O,S),g=Yv(Lv(o,void 0,O))}else g=Xv(m,a,b,w,S,o);b>=v&&(h+=oy(a,v,b)+g,v=b+m.length)}return h+oy(a,v)}]}),!!Bv((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!iy||ay),_l();var sy=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,cy()?Reflect.construct(u,c||[],l(a).constructor):u.apply(a,c)),"isReady",!1),d(i,"workspaceName",""),d(i,"shouldCreateWorkspace",!1),i.unispherePluginManager=new Z(r,i.eventManager,i.logger),i.player.config.provider.unisphereLoaderUrl&&"string"==typeof i.config.workspaceName?i.workspaceName=i.config.workspaceName:(i.workspaceName="kaltura_player_workspace_".concat(i.player.config.targetId),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",av({serverUrl:this.player.config.provider.unisphereLoaderUrl,workspaceName:this.workspaceName,ui:{theme:"light",language:"en"}}));case 2:return e.abrupt("return",uy(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.unispherePluginManager.registerCuepointType(),this.isReady?this.unispherePluginManager.updateSessionData():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(sy,"defaultConfig",{widgets:[]}),(0,e.registerPlugin)("unisphere",sy)})(),{}})()));
|
|
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 k(n||[]);return u(i,"_invoke",{value:P(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 O={};p(O,s,(function(){return this}));var I=Object.getPrototypeOf,x=I&&I(I(C([])));x&&x!==i&&a.call(x,s)&&(O=x);var R=S.prototype=w.prototype=Object.create(O);function _(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function T(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 P(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=j(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 j(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,j(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 k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function C(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(R,"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(R),e},r.awrap=function(e){return{__await:e}},_(T.prototype),p(T.prototype,l,(function(){return this})),r.AsyncIterator=T,r.async=function(e,t,n,o,i){void 0===i&&(i=Promise);var a=new T(d(e,t,n,o),i);return r.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},_(R),p(R,f,"Generator"),p(R,s,(function(){return this})),p(R,"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=C,k.prototype={constructor:k,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:C(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;var g=function(e){return e.UPPER_BAR_ICON_SHOW="unisphere.event.player.upper-bar-icon.show",e.SIDE_PANEL_OPEN="unisphere.event.player.side-panel.open",e.SIDE_PANEL_CLOSE="unisphere.event.player.side-panel.close",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}({}),m=function(e){return e.SELECTED_CHAPTER="selectedChapter",e.CURRENT_TIME="currentTime",e.IS_PAUSED="isPaused",e.PLAYER_SESSION="player-session",e}(m||{}),b=function(e){var t;return(0,y.h)("div",{style:null!==(t=e.style)&&void 0!==t?t:{},id:e.id})},w=e.ui.components,E=w.Tooltip,S=w.Icon,O=function(t){var r=t.id,n=t.label,o=t.iconPath;return(0,y.h)(E,{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)(S,{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 R(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 _(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 T=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 _(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}(e))||t&&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=R(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 P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(P=function(){return!!e})()}d(T,"unsubscribeMap",new Map),d(T,"sequence",-1);var j,A=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,P()?Reflect.construct(r,n||[],l(e).constructor):r.apply(e,n));var e,r,n}return p(t,e),c(t)}(T);function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}d(A,"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 k,C="unisphere.service.pub-sub",N=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,M()?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()}}])}(T);function L(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(L=function(){return!!e})()}j=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 j.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",U="unisphere.service.storage",$=function(e){function t(){return o(this,t),e=this,n=arguments,r=l(r=t),s(e,L()?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()}}])}(T);k=$,d($,"update",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService(U);null==n||n.update(D,e,t)})),d($,"get",(function(e){var t=I.get(),r=null==t?void 0:t.getService(U);return r?r.get(D,e):null})),d($,"subscribe",(function(e,t){var r=I.get(),n=null==r?void 0:r.getService(U);if(n){var o=n.subscribe(t,{namespace:D,property:e,emitLastValue:!0});k.addToUnsubscribeMap(o)}}));const B=KalturaPlayer.core;function F(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=0;t<5;++t)e+=B.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}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=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 Y=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)(b,{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)})),$.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)(b,{style:{width:"inherit"},id:r})}});return this.addDisposer(r,i),r}}])}(G);function z(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 q=function(){return c((function e(t){o(this,e),d(this,"containerProducers",new Map([["sidepanel",new Y],["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 z(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)?z(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=R(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 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&&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 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}var J=function(){return c((function e(t,r,n){o(this,e),d(this,"iconIds",new Map),d(this,"persistentIconIds",new Map),this.player=t,this.eventManager=r,this.logger=n,this.containerManager=new q(t)}),[{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;N.subscribe(g.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(g.SIDE_PANEL_OPEN,(function(e){var r,n=e.payload.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.activateItem(n)})),N.subscribe(g.SIDE_PANEL_CLOSE,(function(e){var r,n=e.payload.panelId;null===(r=t.sidePanelsManager)||void 0===r||r.deactivateItem(n)})),N.subscribe(g.SET_VALUE_CURRENT_TIME,(function(e){var r=e.payload.currentTime;r>=0&&(t.player.currentTime=r)})),N.subscribe(g.CHAPTERS_ADD,(function(e){var r=e.payload.chapters;if(r&&r.length)for(var n=0;n<r.length;++n){var o,i=r[n],a=i.title,u=+i.time;null===(o=t.timelineManager)||void 0===o||o.addKalturaCuePoint(u,"Chapter",n,a,{onClick:function(e){var t=e.cuePoint;$.update(m.SELECTED_CHAPTER,t.id)}})}})),this.eventManager.listen(this.player,e.core.EventType.TIME_UPDATE,(function(){$.update(m.CURRENT_TIME,"".concat(t.player.currentTime))})),this.eventManager.listen(this.player,e.ui.EventType.GUI_RESIZE,(function(){N.emit(g.PLAYER_RESIZE,{}),setTimeout((function(){N.emit(g.PLAYER_RESIZE,{})}),1e3)})),this.eventManager.listen(this.player,e.core.EventType.PAUSE,(function(){$.update(m.IS_PAUSED,!0)})),this.eventManager.listen(this.player,e.core.EventType.PLAY,(function(){$.update(m.IS_PAUSED,!1)}))}},{key:"addUpperBarIcon",value:function(e,t,r,n,o,i){var a,u=this;if(!this.iconIds.has(e)&&!this.persistentIconIds.has(e)){var c=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(){var e,t,r;null!==(e=u.sidePanelsManager)&&void 0!==e&&e.isItemActive(o)?null===(t=u.sidePanelsManager)||void 0===t||t.deactivateItem(o):null===(r=u.sidePanelsManager)||void 0===r||r.activateItem(o)}});i?this.iconIds.set(e,c):this.persistentIconIds.set(e,c)}}},{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)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&&A.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:"registerCuepointType",value:function(){var e,t;null===(e=this.cuePointManager)||void 0===e||e.registerTypes([null===(t=this.cuePointManager)||void 0===t?void 0:t.CuepointType.SUMMARY])}},{key:"init",value:function(e,t){I.set(e),this.addEventHandlers(),this.loadWidgets(t)}},{key:"updateSessionData",value:function(){var e,t;$.update(m.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.iconIds.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()}}},{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(),$.destroy(),I.destroy()}}])}(),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),Oe=Ee("".slice),Ie=function(e){return Oe(Se(e),8,-1)},xe=ne,Re=Ie,_e=Object,Te=we("".split),Pe=xe((function(){return!_e("z").propertyIsEnumerable(0)}))?function(e){return"String"===Re(e)?Te(e,""):_e(e)}:_e,je=function(e){return null==e},Ae=je,Me=TypeError,ke=function(e){if(Ae(e))throw new Me("Can't call method on "+e);return e},Ce=Pe,Ne=ke,Le=function(e){return Ce(Ne(e))},De="object"==typeof document&&document.all,Ue=void 0===De&&void 0!==De?function(e){return"function"==typeof e||e===De}:function(e){return"function"==typeof e},$e=Ue,Be=function(e){return"object"==typeof e?null!==e:$e(e)},Fe=te,We=Ue,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),Ye="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Ve=te,He=Ye,ze=Ve.process,qe=Ve.Deno,Ze=ze&&ze.versions||qe&&qe.version,Xe=Ze&&Ze.v8;Xe&&(he=(de=Xe.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 Je=he,Qe=Je,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=Ue,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=Ue,pt=lt,dt=TypeError,ht=function(e){if(ft(e))return e;throw new dt(pt(e)+" is not a function")},vt=ht,yt=je,gt=function(e,t){var r=e[t];return yt(r)?void 0:vt(r)},mt=ce,bt=Ue,wt=Be,Et=TypeError,St={exports:{}},Ot=te,It=Object.defineProperty,xt=function(e,t){try{It(Ot,e,{value:t,configurable:!0,writable:!0})}catch(r){Ot[e]=t}return t},Rt=te,_t=xt,Tt="__core-js_shared__",Pt=St.exports=Rt[Tt]||_t(Tt,{});(Pt.versions||(Pt.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 jt=St.exports,At=jt,Mt=function(e,t){return At[e]||(At[e]=t||{})},kt=ke,Ct=Object,Nt=function(e){return Ct(kt(e))},Lt=Nt,Dt=we({}.hasOwnProperty),Ut=Object.hasOwn||function(e,t){return Dt(Lt(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,Yt=Ut,Vt=Gt,Ht=rt,zt=nt,qt=te.Symbol,Zt=Kt("wks"),Xt=zt?qt.for||qt:qt&&qt.withoutSetter||Vt,Jt=function(e){return Yt(Zt,e)||(Zt[e]=Ht&&Yt(qt,e)?qt[e]:Xt("Symbol."+e)),Zt[e]},Qt=ce,er=Be,tr=ct,rr=gt,nr=TypeError,or=Jt("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=Le,br=ur,wr=Ut,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 Or={},Ir=oe&&ne((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xr=Be,Rr=String,_r=TypeError,Tr=function(e){if(xr(e))return e;throw new _r(Rr(e)+" is not an object")},Pr=oe,jr=dr,Ar=Ir,Mr=Tr,kr=ur,Cr=TypeError,Nr=Object.defineProperty,Lr=Object.getOwnPropertyDescriptor,Dr="enumerable",Ur="configurable",$r="writable";Or.f=Pr?Ar?function(e,t,r){if(Mr(e),t=kr(t),Mr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&$r in r&&!r[$r]){var n=Lr(e,t);n&&n[$r]&&(e[t]=r.value,r={configurable:Ur in r?r[Ur]:n[Ur],enumerable:Dr in r?r[Dr]:n[Dr],writable:!1})}return Nr(e,t,r)}:Nr:function(e,t,r){if(Mr(e),t=kr(t),Mr(r),jr)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 Br=Or,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,Yr=Ut,Vr=Function.prototype,Hr=Kr&&Object.getOwnPropertyDescriptor,zr=Yr(Vr,"name"),qr={EXISTS:zr,PROPER:zr&&"something"===function(){}.name,CONFIGURABLE:zr&&(!Kr||Kr&&Hr(Vr,"name").configurable)},Zr=Ue,Xr=jt,Jr=we(Function.toString);Zr(Xr.inspectSource)||(Xr.inspectSource=function(e){return Jr(e)});var Qr,en,tn,rn=Xr.inspectSource,nn=Ue,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=Ut,yn=jt,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 On=gn("state");mn[On]=!0,Qr=function(e,t){if(vn(e,On))throw new wn(bn);return t.facade=e,hn(e,On,t),t},en=function(e){return vn(e,On)?e[On]:{}},tn=function(e){return vn(e,On)}}var In={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}}},xn=we,Rn=ne,_n=Ue,Tn=Ut,Pn=oe,jn=qr.CONFIGURABLE,An=rn,Mn=In.enforce,kn=In.get,Cn=String,Nn=Object.defineProperty,Ln=xn("".slice),Dn=xn("".replace),Un=xn([].join),$n=Pn&&!Rn((function(){return 8!==Nn((function(){}),"length",{value:8}).length})),Bn=String(String).split("String"),Fn=Gr.exports=function(e,t,r){"Symbol("===Ln(Cn(t),0,7)&&(t="["+Dn(Cn(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!Tn(e,"name")||jn&&e.name!==t)&&(Pn?Nn(e,"name",{value:t,configurable:!0}):e.name=t),$n&&r&&Tn(r,"arity")&&e.length!==r.arity&&Nn(e,"length",{value:r.arity});try{r&&Tn(r,"constructor")&&r.constructor?Pn&&Nn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=Mn(e);return Tn(n,"source")||(n.source=Un(Bn,"string"==typeof t?t:"")),e};Function.prototype.toString=Fn((function(){return _n(this)&&kn(this).source||An(this)}),"toString");var Wn=Gr.exports,Gn=Ue,Kn=Or,Yn=Wn,Vn=xt,Hn=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(Gn(r)&&Yn(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},zn={},qn=Math.ceil,Zn=Math.floor,Xn=Math.trunc||function(e){var t=+e;return(t>0?Zn:qn)(t)},Jn=function(e){var t=+e;return t!=t||0===t?0:Xn(t)},Qn=Jn,eo=Math.max,to=Math.min,ro=Jn,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=Le,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=Ut,po=Le,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");zn.f=Object.getOwnPropertyNames||function(e){return bo(e,wo)};var Eo={};Eo.f=Object.getOwnPropertySymbols;var So=Ge,Oo=zn,Io=Eo,xo=Tr,Ro=we([].concat),_o=So("Reflect","ownKeys")||function(e){var t=Oo.f(xo(e)),r=Io.f;return r?Ro(t,r(e)):t},To=Ut,Po=_o,jo=re,Ao=Or,Mo=function(e,t,r){for(var n=Po(t),o=Ao.f,i=jo.f,a=0;a<n.length;a++){var u=n[a];To(e,u)||r&&To(r,u)||o(e,u,i(t,u))}},ko=ne,Co=Ue,No=/#|\.prototype\./,Lo=function(e,t){var r=Uo[Do(e)];return r===Bo||r!==$o&&(Co(t)?ko(t):!!t)},Do=Lo.normalize=function(e){return String(e).replace(No,".").toLowerCase()},Uo=Lo.data={},$o=Lo.NATIVE="N",Bo=Lo.POLYFILL="P",Fo=Lo,Wo=te,Go=re.f,Ko=Wr,Yo=Hn,Vo=xt,Ho=Mo,zo=Fo,qo=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],!zo(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),Yo(r,n,i,e)}},Zo=ie,Xo=Function.prototype,Jo=Xo.apply,Qo=Xo.call,ei="object"==typeof Reflect&&Reflect.apply||(Zo?Qo.bind(Jo):function(){return Qo.apply(Jo,arguments)}),ti=we,ri=ht,ni=Be,oi=String,ii=TypeError,ai=Be,ui=ke,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=Or.f,fi=Ue,pi=Be,di=si,hi=function(e,t,r){var n,o;return di&&fi(n=t.constructor)&&n!==r&&pi(o=n.prototype)&&o!==r.prototype&&di(e,o),e},vi={};vi[Jt("toStringTag")]="z";var yi="[object z]"===String(vi),gi=Ue,mi=Ie,bi=Jt("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},Oi=Si,Ii=String,xi=function(e){if("Symbol"===Oi(e))throw new TypeError("Cannot convert a Symbol value to a string");return Ii(e)},Ri=xi,_i=function(e,t){return void 0===e?arguments.length<2?"":t:Ri(e)},Ti=Be,Pi=Wr,ji=Error,Ai=we("".replace),Mi=String(new ji("zxcasd").stack),ki=/\n\s*at [^:]*:[^\n]*/,Ci=ki.test(Mi),Ni=function(e,t){if(Ci&&"string"==typeof e&&!ji.prepareStackTrace)for(;t--;)e=Ai(e,ki,"");return e},Li=ve,Di=!ne((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Li(1,7)),7!==e.stack)})),Ui=Wr,$i=Ni,Bi=Di,Fi=Error.captureStackTrace,Wi=Ge,Gi=Ut,Ki=Wr,Yi=Ke,Vi=si,Hi=Mo,zi=function(e,t,r){r in e||li(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},qi=hi,Zi=_i,Xi=oe,Ji=qo,Qi=ei,ea=function(e,t,r,n){var o="stackTraceLimit",i=n?2:1,a=e.split("."),u=a[a.length-1],c=Wi.apply(null,a);if(c){var s=c.prototype;if(Gi(s,"cause")&&delete s.cause,!r)return c;var l=Wi("Error"),f=t((function(e,t){var r,o,a,u,l,p,d=Zi(n?t:e,void 0),h=n?new c(e):new c;return void 0!==d&&Ki(h,"message",d),a=h,u=f,l=h.stack,p=2,Bi&&(Fi?Fi(a,u):Ui(a,"stack",$i(l,p))),this&&Yi(s,this)&&qi(h,this,f),arguments.length>i&&(r=h,Ti(o=arguments[i])&&"cause"in o&&Pi(r,"cause",o.cause)),h}));f.prototype=s,"Error"!==u?Vi?Vi(f,l):Hi(f,l,{name:!0}):Xi&&o in c&&(zi(f,c,o),zi(f,c,"prepareStackTrace")),Hi(f,c);try{s.name!==u&&Ki(s,"name",u),s.constructor=f}catch(e){}return f}},ta="WebAssembly",ra=te[ta],na=7!==new Error("e",{cause:7}).cause,oa=function(e,t){var r={};r[e]=ea(e,t,na),Ji({global:!0,constructor:!0,arity:1,forced:na},r)},ia=function(e,t){if(ra&&ra[e]){var r={};r[e]=ea(ta+"."+e,t,na),Ji({target:ta,stat:!0,constructor:!0,arity:1,forced:na},r)}};oa("Error",(function(e){return function(t){return Qi(e,this,arguments)}})),oa("EvalError",(function(e){return function(t){return Qi(e,this,arguments)}})),oa("RangeError",(function(e){return function(t){return Qi(e,this,arguments)}})),oa("ReferenceError",(function(e){return function(t){return Qi(e,this,arguments)}})),oa("SyntaxError",(function(e){return function(t){return Qi(e,this,arguments)}})),oa("TypeError",(function(e){return function(t){return Qi(e,this,arguments)}})),oa("URIError",(function(e){return function(t){return Qi(e,this,arguments)}})),ia("CompileError",(function(e){return function(t){return Qi(e,this,arguments)}})),ia("LinkError",(function(e){return function(t){return Qi(e,this,arguments)}})),ia("RuntimeError",(function(e){return function(t){return Qi(e,this,arguments)}})),Error;var aa=Ie,ua=oe,ca=Array.isArray||function(e){return"Array"===aa(e)},sa=TypeError,la=Object.getOwnPropertyDescriptor,fa=ua&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),pa=TypeError,da=Nt,ha=ao,va=fa?function(e,t){if(ca(e)&&!la(e,"length").writable)throw new sa("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t};qo({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=da(this),r=ha(t),n=arguments.length;!function(e){if(e>9007199254740991)throw pa("Maximum allowed index exceeded")}(r+n);for(var o=0;o<n;o++)t[r]=arguments[o],r++;return va(t,r),r}});var ya=go,ga=mo,ma=Object.keys||function(e){return ya(e,ga)},ba=oe,wa=we,Ea=ce,Sa=ne,Oa=ma,Ia=Eo,xa=se,Ra=Nt,_a=Pe,Ta=Object.assign,Pa=Object.defineProperty,ja=wa([].concat),Aa=!Ta||Sa((function(){if(ba&&1!==Ta({b:1},Ta(Pa({},"a",{enumerable:!0,get:function(){Pa(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!==Ta({},e)[r]||Oa(Ta({},t)).join("")!==n}))?function(e,t){for(var r=Ra(e),n=arguments.length,o=1,i=Ia.f,a=xa.f;n>o;)for(var u,c=_a(arguments[o++]),s=i?ja(Oa(c),i(c)):Oa(c),l=s.length,f=0;l>f;)u=s[f++],ba&&!Ea(a,c,u)||(r[u]=c[u]);return r}:Ta,Ma=Aa;qo({target:"Object",stat:!0,arity:2,forced:Object.assign!==Ma},{assign:Ma});var ka={},Ca=oe,Na=Ir,La=Or,Da=Tr,Ua=Le,$a=ma;ka.f=Ca&&!Na?Object.defineProperties:function(e,t){Da(e);for(var r,n=Ua(t),o=$a(t),i=o.length,a=0;i>a;)La.f(e,r=o[a++],n[r]);return e};var Ba,Fa=Ge("document","documentElement"),Wa=Tr,Ga=ka,Ka=mo,Ya=ln,Va=Fa,Ha=fr,za="prototype",qa="script",Za=sn("IE_PROTO"),Xa=function(){},Ja=function(e){return"<"+qa+">"+e+"</"+qa+">"},Qa=function(e){e.write(Ja("")),e.close();var t=e.parentWindow.Object;return e=null,t},eu=function(){try{Ba=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;eu="undefined"!=typeof document?document.domain&&Ba?Qa(Ba):(t=Ha("iframe"),r="java"+qa+":",t.style.display="none",Va.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Ja("document.F=Object")),e.close(),e.F):Qa(Ba);for(var n=Ka.length;n--;)delete eu[za][Ka[n]];return eu()};Ya[Za]=!0;var tu=Object.create||function(e,t){var r;return null!==e?(Xa[za]=Wa(e),r=new Xa,Xa[za]=null,r[Za]=e):r=eu(),void 0===t?r:Ga.f(r,t)},ru=Jt,nu=tu,ou=Or.f,iu=ru("unscopables"),au=Array.prototype;void 0===au[iu]&&ou(au,iu,{configurable:!0,value:nu(null)});var uu=lo.includes;qo({target:"Array",proto:!0,forced:ne((function(){return!Array(1).includes()}))},{includes:function(e){return uu(this,e,arguments.length>1?arguments[1]:void 0)}}),function(e){au[iu][e]=!0}("includes");var cu=TypeError,su=function(e,t){if(e<t)throw new cu("Not enough arguments");return e},lu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",fu=lu+"+/",pu=lu+"-_",du=function(e){for(var t={},r=0;r<64;r++)t[e.charAt(r)]=r;return t},hu={i2c:fu,c2i:du(fu),i2cUrl:pu,c2iUrl:du(pu)},vu=qo,yu=te,gu=Ge,mu=we,bu=ce,wu=ne,Eu=xi,Su=su,Ou=hu.c2i,Iu=/[^\d+/a-z]/i,xu=/[\t\n\f\r ]+/g,Ru=/[=]{1,2}$/,_u=gu("atob"),Tu=String.fromCharCode,Pu=mu("".charAt),ju=mu("".replace),Au=mu(Iu.exec),Mu=!!_u&&!wu((function(){return"hi"!==_u("aGk=")})),ku=Mu&&wu((function(){return""!==_u(" ")})),Cu=Mu&&!wu((function(){_u("a")})),Nu=Mu&&!wu((function(){_u()})),Lu=Mu&&1!==_u.length;vu({global:!0,bind:!0,enumerable:!0,forced:!Mu||ku||Cu||Nu||Lu},{atob:function(e){if(Su(arguments.length,1),Mu&&!ku&&!Cu)return bu(_u,yu,e);var t,r,n,o=ju(Eu(e),xu,""),i="",a=0,u=0;if(o.length%4==0&&(o=ju(o,Ru,"")),(t=o.length)%4==1||Au(Iu,o))throw new(gu("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(;a<t;)r=Pu(o,a++),n=u%4?64*n+Ou[r]:Ou[r],u++%4&&(i+=Tu(255&n>>(-2*u&6)));return i}});var Du="process"===Ie(te.process),Uu=Du,$u=Wn,Bu=Or,Fu=function(e,t,r){return r.get&&$u(r.get,t,{getter:!0}),r.set&&$u(r.set,t,{setter:!0}),Bu.f(e,t,r)},Wu=Ke,Gu=TypeError,Ku=function(e,t){if(Wu(t,e))return e;throw new Gu("Incorrect invocation")},Yu=oe,Vu=ne,Hu=Tr,zu=_i,qu=Error.prototype.toString,Zu=Vu((function(){if(Yu){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==qu.call(e))return!0}return"2: 1"!==qu.call({message:1,name:2})||"Error"!==qu.call({})}))?function(){var e=Hu(this),t=zu(e.name,"Error"),r=zu(e.message);return t?r?t+": "+r:t:r}:qu,Xu={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}},Ju=qo,Qu=Ge,ec=ne,tc=tu,rc=ve,nc=Or.f,oc=Hn,ic=Fu,ac=Ut,uc=Ku,cc=Tr,sc=Zu,lc=_i,fc=Xu,pc=Ni,dc=In,hc=oe,vc="DOMException",yc="DATA_CLONE_ERR",gc=Qu("Error"),mc=Qu(vc)||function(){try{(new(Qu("MessageChannel")||function(e){try{if(Uu)return Function('return require("'+e+'")')()}catch(e){}}("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(e){if(e.name===yc&&25===e.code)return e.constructor}}(),bc=mc&&mc.prototype,wc=gc.prototype,Ec=dc.set,Sc=dc.getterFor(vc),Oc="stack"in new gc(vc),Ic=function(e){return ac(fc,e)&&fc[e].m?fc[e].c:0},xc=function(){uc(this,Rc);var e=arguments.length,t=lc(e<1?void 0:arguments[0]),r=lc(e<2?void 0:arguments[1],"Error"),n=Ic(r);if(Ec(this,{type:vc,name:r,message:t,code:n}),hc||(this.name=r,this.message=t,this.code=n),Oc){var o=new gc(t);o.name=vc,nc(this,"stack",rc(1,pc(o.stack,1)))}},Rc=xc.prototype=tc(wc),_c=function(e){return{enumerable:!0,configurable:!0,get:e}},Tc=function(e){return _c((function(){return Sc(this)[e]}))};hc&&(ic(Rc,"code",Tc("code")),ic(Rc,"message",Tc("message")),ic(Rc,"name",Tc("name"))),nc(Rc,"constructor",rc(1,xc));var Pc=ec((function(){return!(new mc instanceof gc)})),jc=Pc||ec((function(){return wc.toString!==sc||"2: 1"!==String(new mc(1,2))})),Ac=Pc||ec((function(){return 25!==new mc(1,"DataCloneError").code}));Pc||25!==mc[yc]||bc[yc],Ju({global:!0,constructor:!0,forced:Pc},{DOMException:Pc?xc:mc});var Mc=Qu(vc),kc=Mc.prototype;for(var Cc in jc&&mc===Mc&&oc(kc,"toString",sc),Ac&&hc&&mc===Mc&&ic(kc,"code",_c((function(){return Ic(cc(this).name)}))),fc)if(ac(fc,Cc)){var Nc=fc[Cc],Lc=Nc.s,Dc=rc(6,Nc.c);ac(Mc,Lc)||nc(Mc,Lc,Dc),ac(kc,Lc)||nc(kc,Lc,Dc)}var Uc=qo,$c=te,Bc=Ge,Fc=ve,Wc=Or.f,Gc=Ut,Kc=Ku,Yc=hi,Vc=_i,Hc=Xu,zc=Ni,qc=oe,Zc="DOMException",Xc=Bc("Error"),Jc=Bc(Zc),Qc=function(){Kc(this,es);var e=arguments.length,t=Vc(e<1?void 0:arguments[0]),r=Vc(e<2?void 0:arguments[1],"Error"),n=new Jc(t,r),o=new Xc(t);return o.name=Zc,Wc(n,"stack",Fc(1,zc(o.stack,1))),Yc(n,this,Qc),n},es=Qc.prototype=Jc.prototype,ts="stack"in new Xc(Zc),rs="stack"in new Jc(1,2),ns=Jc&&qc&&Object.getOwnPropertyDescriptor($c,Zc),os=!(!ns||ns.writable&&ns.configurable),is=ts&&!os&&!rs;Uc({global:!0,constructor:!0,forced:is},{DOMException:is?Qc:Jc});var as=Bc(Zc),us=as.prototype;if(us.constructor!==as)for(var cs in Wc(us,"constructor",Fc(1,as)),Hc)if(Gc(Hc,cs)){var ss=Hc[cs],ls=ss.s;Gc(as,ls)||Wc(as,ls,Fc(6,ss.c))}var fs=Or.f,ps=Ut,ds=Jt("toStringTag"),hs=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ps(e,ds)&&fs(e,ds,{configurable:!0,value:t})},vs="DOMException";hs(Ge(vs),vs);var ys,gs,ms=Tr,bs=ne,ws=te.RegExp,Es=bs((function(){var e=ws("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),Ss=Es||bs((function(){return!ws("a","y").sticky})),Os={BROKEN_CARET:Es||bs((function(){var e=ws("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:Ss,UNSUPPORTED_Y:Es},Is=ne,xs=te.RegExp,Rs=Is((function(){var e=xs(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),_s=ne,Ts=te.RegExp,Ps=_s((function(){var e=Ts("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),js=ce,As=we,Ms=xi,ks=function(){var e=ms(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},Cs=Os,Ns=tu,Ls=In.get,Ds=Rs,Us=Ps,$s=Mt("native-string-replace",String.prototype.replace),Bs=RegExp.prototype.exec,Fs=Bs,Ws=As("".charAt),Gs=As("".indexOf),Ks=As("".replace),Ys=As("".slice),Vs=(gs=/b*/g,js(Bs,ys=/a/,"a"),js(Bs,gs,"a"),0!==ys.lastIndex||0!==gs.lastIndex),Hs=Cs.BROKEN_CARET,zs=void 0!==/()??/.exec("")[1];(Vs||zs||Hs||Ds||Us)&&(Fs=function(e){var t,r,n,o,i,a,u,c=this,s=Ls(c),l=Ms(e),f=s.raw;if(f)return f.lastIndex=c.lastIndex,t=js(Fs,f,l),c.lastIndex=f.lastIndex,t;var p=s.groups,d=Hs&&c.sticky,h=js(ks,c),v=c.source,y=0,g=l;if(d&&(h=Ks(h,"y",""),-1===Gs(h,"g")&&(h+="g"),g=Ys(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ws(l,c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",h)),zs&&(r=new RegExp("^"+v+"$(?!\\s)",h)),Vs&&(n=c.lastIndex),o=js(Bs,d?r:c,g),d?o?(o.input=Ys(o.input,y),o[0]=Ys(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Vs&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),zs&&o&&o.length>1&&js($s,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=Ns(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var qs=Fs;qo({target:"RegExp",proto:!0,forced:/./.exec!==qs},{exec:qs});var Zs=ce,Xs=Hn,Js=qs,Qs=ne,el=Jt,tl=Wr,rl=el("species"),nl=RegExp.prototype,ol=function(e,t,r,n){var o=el(e),i=!Qs((function(){var t={};return t[o]=function(){return 7},7!==""[e](t)})),a=i&&!Qs((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[rl]=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===Js||a===nl.exec?i&&!o?{done:!0,value:Zs(u,t,r,n)}:{done:!0,value:Zs(e,r,t,n)}:{done:!1}}));Xs(String.prototype,e,c[0]),Xs(nl,o,c[1])}n&&tl(nl[o],"sham",!0)},il=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},al=ce,ul=Tr,cl=Ue,sl=Ie,ll=qs,fl=TypeError,pl=function(e,t){var r=e.exec;if(cl(r)){var n=al(r,e,t);return null!==n&&ul(n),n}if("RegExp"===sl(e))return al(ll,e,t);throw new fl("RegExp#exec called on incompatible receiver")},dl=ce,hl=Tr,vl=je,yl=ke,gl=il,ml=xi,bl=gt,wl=pl;ol("search",(function(e,t,r){return[function(t){var r=yl(this),n=vl(t)?void 0:bl(t,e);return n?dl(n,t,r):new RegExp(t)[e](ml(r))},function(e){var n=hl(this),o=ml(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;gl(a,0)||(n.lastIndex=0);var u=wl(n,o);return gl(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]}));const El=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 Sl="true"===El("unisphereVerbose")?"log":El("unisphereVerbose")||"";const Ol=["log","debug"].includes(Sl)?Sl:"warn",Il=El("unisphereEnvironment")||"prod";let xl=El("unisphereDevLoader")||null;if(xl)try{xl=JSON.parse(window.atob(xl))}catch(e){xl=null,console.error("failed to parse dev loader path from query params",{error:e})}const Rl={logLevel:Ol,loaderUrl:xl,verbose:Sl,environment:"dev"===Il?"dev":"prod"},_l=()=>Rl;let Tl=window.unisphere;"unisphere"in window||(Tl=window.unisphere={});const Pl={logToConsole:!0,logLevel:_l().logLevel};class jl{static createWorkspaceLogger(e){return new jl(e)}constructor(e){this.workspaceName=e,this._settings=Object.assign({},Pl)}getLogger(e){return new Al(this.workspaceName,e,this.getSettings.bind(this))}getSettings(){return this._settings}updateSettings(e){this._settings=Object.assign(Object.assign({},this._settings),e)}}class Al{constructor(e,t,r){this.workspaceName=e,this.runtime=t,this._getSettings=r;const{value:n}=(i={interceptors:[],logMessages:[]},(o="loggers")in Tl?{value:Tl[o],isNew:!1}:(Tl[o]=i,{value:i,isNew:!0}));var o,i;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 Ml=Ge,kl=Fu,Cl=oe,Nl=Jt("species"),Ll=we,Dl=ne,Ul=Ue,$l=Si,Bl=rn,Fl=function(){},Wl=Ge("Reflect","construct"),Gl=/^\s*(?:class|function)\b/,Kl=Ll(Gl.exec),Yl=!Gl.test(Fl),Vl=function(e){if(!Ul(e))return!1;try{return Wl(Fl,[],e),!0}catch(e){return!1}},Hl=function(e){if(!Ul(e))return!1;switch($l(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Yl||!!Kl(Gl,Bl(e))}catch(e){return!0}};Hl.sham=!0;var zl,ql,Zl,Xl,Jl=!Wl||Dl((function(){var e;return Vl(Vl.call)||!Vl(Object)||!Vl((function(){e=!0}))||e}))?Hl:Vl,Ql=Jl,ef=lt,tf=TypeError,rf=Tr,nf=je,of=Jt("species"),af=Ie,uf=we,cf=function(e){if("Function"===af(e))return uf(e)},sf=ht,lf=ie,ff=cf(cf.bind),pf=function(e,t){return sf(e),void 0===t?e:lf?ff(e,t):function(){return e.apply(t,arguments)}},df=we([].slice),hf=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ye),vf=te,yf=ei,gf=pf,mf=Ue,bf=Ut,wf=ne,Ef=Fa,Sf=df,Of=fr,If=su,xf=hf,Rf=Du,_f=vf.setImmediate,Tf=vf.clearImmediate,Pf=vf.process,jf=vf.Dispatch,Af=vf.Function,Mf=vf.MessageChannel,kf=vf.String,Cf=0,Nf={},Lf="onreadystatechange";wf((function(){zl=vf.location}));var Df=function(e){if(bf(Nf,e)){var t=Nf[e];delete Nf[e],t()}},Uf=function(e){return function(){Df(e)}},$f=function(e){Df(e.data)},Bf=function(e){vf.postMessage(kf(e),zl.protocol+"//"+zl.host)};_f&&Tf||(_f=function(e){If(arguments.length,1);var t=mf(e)?e:Af(e),r=Sf(arguments,1);return Nf[++Cf]=function(){yf(t,void 0,r)},ql(Cf),Cf},Tf=function(e){delete Nf[e]},Rf?ql=function(e){Pf.nextTick(Uf(e))}:jf&&jf.now?ql=function(e){jf.now(Uf(e))}:Mf&&!xf?(Xl=(Zl=new Mf).port2,Zl.port1.onmessage=$f,ql=gf(Xl.postMessage,Xl)):vf.addEventListener&&mf(vf.postMessage)&&!vf.importScripts&&zl&&"file:"!==zl.protocol&&!wf(Bf)?(ql=Bf,vf.addEventListener("message",$f,!1)):ql=Lf in Of("script")?function(e){Ef.appendChild(Of("script"))[Lf]=function(){Ef.removeChild(this),Df(e)}}:function(e){setTimeout(Uf(e),0)});var Ff={set:_f,clear:Tf},Wf=te,Gf=oe,Kf=Object.getOwnPropertyDescriptor,Yf=function(){this.head=null,this.tail=null};Yf.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 Vf,Hf,zf,qf,Zf,Xf=Yf,Jf=/ipad|iphone|ipod/i.test(Ye)&&"undefined"!=typeof Pebble,Qf=/web0s(?!.*chrome)/i.test(Ye),ep=te,tp=pf,rp=Ff.set,np=Xf,op=hf,ip=Jf,ap=Qf,up=Du,cp=ep.MutationObserver||ep.WebKitMutationObserver,sp=ep.document,lp=ep.process,fp=ep.Promise,pp=function(e){if(!Gf)return Wf[e];var t=Kf(Wf,e);return t&&t.value}("queueMicrotask");if(!pp){var dp=new np,hp=function(){var e,t;for(up&&(e=lp.domain)&&e.exit();t=dp.get();)try{t()}catch(e){throw dp.head&&Vf(),e}e&&e.enter()};op||up||ap||!cp||!sp?!ip&&fp&&fp.resolve?((qf=fp.resolve(void 0)).constructor=fp,Zf=tp(qf.then,qf),Vf=function(){Zf(hp)}):up?Vf=function(){lp.nextTick(hp)}:(rp=tp(rp,ep),Vf=function(){rp(hp)}):(Hf=!0,zf=sp.createTextNode(""),new cp(hp).observe(zf,{characterData:!0}),Vf=function(){zf.data=Hf=!Hf}),pp=function(e){dp.head||Vf(),dp.add(e)}}var vp=pp,yp=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},gp=te.Promise,mp="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,bp=!mp&&!Du&&"object"==typeof window&&"object"==typeof document,wp=te,Ep=gp,Sp=Ue,Op=Fo,Ip=rn,xp=Jt,Rp=bp,_p=mp,Tp=Je;Ep&&Ep.prototype;var Pp=xp("species"),jp=!1,Ap=Sp(wp.PromiseRejectionEvent),Mp=Op("Promise",(function(){var e=Ip(Ep),t=e!==String(Ep);if(!t&&66===Tp)return!0;if(!Tp||Tp<51||!/native code/.test(e)){var r=new Ep((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[Pp]=n,!(jp=r.then((function(){}))instanceof n))return!0}return!t&&(Rp||_p)&&!Ap})),kp={CONSTRUCTOR:Mp,REJECTION_EVENT:Ap,SUBCLASSING:jp},Cp={},Np=ht,Lp=TypeError,Dp=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new Lp("Bad Promise constructor");t=e,r=n})),this.resolve=Np(t),this.reject=Np(r)};Cp.f=function(e){return new Dp(e)};var Up,$p,Bp,Fp,Wp=qo,Gp=Du,Kp=te,Yp=ce,Vp=Hn,Hp=si,zp=hs,qp=ht,Zp=Ue,Xp=Be,Jp=Ku,Qp=function(e,t){var r,n=rf(e).constructor;return void 0===n||nf(r=rf(n)[of])?t:function(e){if(Ql(e))return e;throw new tf(ef(e)+" is not a constructor")}(r)},ed=Ff.set,td=vp,rd=yp,nd=Xf,od=In,id=gp,ad=Cp,ud="Promise",cd=kp.CONSTRUCTOR,sd=kp.REJECTION_EVENT,ld=kp.SUBCLASSING,fd=od.getterFor(ud),pd=od.set,dd=id&&id.prototype,hd=id,vd=dd,yd=Kp.TypeError,gd=Kp.document,md=Kp.process,bd=ad.f,wd=bd,Ed=!!(gd&&gd.createEvent&&Kp.dispatchEvent),Sd="unhandledrejection",Od=function(e){var t;return!(!Xp(e)||!Zp(t=e.then))&&t},Id=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&&Pd(t),t.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===e.promise?s(new yd("Promise-chain cycle")):(n=Od(r))?Yp(n,r,c,s):c(r)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},xd=function(e,t){e.notified||(e.notified=!0,td((function(){for(var r,n=e.reactions;r=n.get();)Id(r,e);e.notified=!1,t&&!e.rejection&&_d(e)})))},Rd=function(e,t,r){var n,o;Ed?((n=gd.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),Kp.dispatchEvent(n)):n={promise:t,reason:r},!sd&&(o=Kp["on"+e])?o(n):e===Sd&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",r)},_d=function(e){Yp(ed,Kp,(function(){var t,r=e.facade,n=e.value;if(Td(e)&&(t=rd((function(){Gp?md.emit("unhandledRejection",n,r):Rd(Sd,r,n)})),e.rejection=Gp||Td(e)?2:1,t.error))throw t.value}))},Td=function(e){return 1!==e.rejection&&!e.parent},Pd=function(e){Yp(ed,Kp,(function(){var t=e.facade;Gp?md.emit("rejectionHandled",t):Rd("rejectionhandled",t,e.value)}))},jd=function(e,t,r){return function(n){e(t,n,r)}},Ad=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,xd(e,!0))},Md=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new yd("Promise can't be resolved itself");var n=Od(t);n?td((function(){var r={done:!1};try{Yp(n,t,jd(Md,r,e),jd(Ad,r,e))}catch(t){Ad(r,t,e)}})):(e.value=t,e.state=1,xd(e,!1))}catch(t){Ad({done:!1},t,e)}}};if(cd&&(vd=(hd=function(e){Jp(this,vd),qp(e),Yp(Up,this);var t=fd(this);try{e(jd(Md,t),jd(Ad,t))}catch(e){Ad(t,e)}}).prototype,(Up=function(e){pd(this,{type:ud,done:!1,notified:!1,parent:!1,reactions:new nd,rejection:!1,state:0,value:void 0})}).prototype=Vp(vd,"then",(function(e,t){var r=fd(this),n=bd(Qp(this,hd));return r.parent=!0,n.ok=!Zp(e)||e,n.fail=Zp(t)&&t,n.domain=Gp?md.domain:void 0,0===r.state?r.reactions.add(n):td((function(){Id(n,r)})),n.promise})),$p=function(){var e=new Up,t=fd(e);this.promise=e,this.resolve=jd(Md,t),this.reject=jd(Ad,t)},ad.f=bd=function(e){return e===hd||void 0===e?new $p(e):wd(e)},Zp(id)&&dd!==Object.prototype)){Bp=dd.then,ld||Vp(dd,"then",(function(e,t){var r=this;return new hd((function(e,t){Yp(Bp,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete dd.constructor}catch(e){}Hp&&Hp(dd,vd)}Wp({global:!0,constructor:!0,wrap:!0,forced:cd},{Promise:hd}),zp(hd,ud,!1),Fp=Ml(ud),Cl&&Fp&&!Fp[Nl]&&kl(Fp,Nl,{configurable:!0,get:function(){return this}});var kd={},Cd=kd,Nd=Jt("iterator"),Ld=Array.prototype,Dd=Si,Ud=gt,$d=je,Bd=kd,Fd=Jt("iterator"),Wd=function(e){if(!$d(e))return Ud(e,Fd)||Ud(e,"@@iterator")||Bd[Dd(e)]},Gd=ce,Kd=ht,Yd=Tr,Vd=lt,Hd=Wd,zd=TypeError,qd=ce,Zd=Tr,Xd=gt,Jd=pf,Qd=ce,eh=Tr,th=lt,rh=ao,nh=Ke,oh=Wd,ih=function(e,t,r){var n,o;Zd(e);try{if(!(n=Xd(e,"return"))){if("throw"===t)throw r;return r}n=qd(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return Zd(n),r},ah=TypeError,uh=function(e,t){this.stopped=e,this.result=t},ch=uh.prototype,sh=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=Jd(t,f),g=function(e){return n&&ih(n,"normal",e),new uh(!0,e)},m=function(e){return p?(eh(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=oh(e)))throw new ah(th(e)+" is not iterable");if(void 0!==(l=o)&&(Cd.Array===l||Ld[Nd]===l)){for(i=0,a=rh(e);a>i;i++)if((u=m(e[i]))&&nh(ch,u))return u;return new uh(!1)}n=function(e,t){var r=arguments.length<2?Hd(e):t;if(Kd(r))return Yd(Gd(r,e));throw new zd(Vd(e)+" is not iterable")}(e,o)}for(c=d?e.next:n.next;!(s=Qd(c,n)).done;){try{u=m(s.value)}catch(e){ih(n,"throw",e)}if("object"==typeof u&&u&&nh(ch,u))return u}return new uh(!1)},lh=Jt("iterator"),fh=!1;try{var ph=0,dh={next:function(){return{done:!!ph++}},return:function(){fh=!0}};dh[lh]=function(){return this},Array.from(dh,(function(){throw 2}))}catch(e){}var hh=gp,vh=kp.CONSTRUCTOR||!function(e,t){try{if(!t&&!fh)return!1}catch(e){return!1}var r=!1;try{var n={};n[lh]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}((function(e){hh.all(e).then(void 0,(function(){}))})),yh=ce,gh=ht,mh=Cp,bh=yp,wh=sh;qo({target:"Promise",stat:!0,forced:vh},{all:function(e){var t=this,r=mh.f(t),n=r.resolve,o=r.reject,i=bh((function(){var r=gh(t.resolve),i=[],a=0,u=1;wh(e,(function(e){var c=a++,s=!1;u++,yh(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 Eh=qo,Sh=kp.CONSTRUCTOR,Oh=gp,Ih=Ge,xh=Ue,Rh=Hn,_h=Oh&&Oh.prototype;if(Eh({target:"Promise",proto:!0,forced:Sh,real:!0},{catch:function(e){return this.then(void 0,e)}}),xh(Oh)){var Th=Ih("Promise").prototype.catch;_h.catch!==Th&&Rh(_h,"catch",Th,{unsafe:!0})}var Ph=ce,jh=ht,Ah=Cp,Mh=yp,kh=sh;qo({target:"Promise",stat:!0,forced:vh},{race:function(e){var t=this,r=Ah.f(t),n=r.reject,o=Mh((function(){var o=jh(t.resolve);kh(e,(function(e){Ph(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var Ch=Cp;qo({target:"Promise",stat:!0,forced:kp.CONSTRUCTOR},{reject:function(e){var t=Ch.f(this);return(0,t.reject)(e),t.promise}});var Nh=Tr,Lh=Be,Dh=Cp,Uh=qo,$h=kp.CONSTRUCTOR;Ge("Promise"),Uh({target:"Promise",stat:!0,forced:$h},{resolve:function(e){return function(e,t){if(Nh(e),Lh(t)&&t.constructor===e)return t;var r=Dh.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});var Bh=Be,Fh=Ie,Wh=Jt("match"),Gh=TypeError,Kh=function(e){if(function(e){var t;return Bh(e)&&(void 0!==(t=e[Wh])?!!t:"RegExp"===Fh(e))}(e))throw new Gh("The method doesn't accept regular expressions");return e},Yh=Jt("match"),Vh=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Yh]=!1,"/./"[e](t)}catch(e){}}return!1},Hh=qo,zh=cf,qh=re.f,Zh=oo,Xh=xi,Jh=Kh,Qh=ke,ev=Vh,tv=zh("".slice),rv=Math.min,nv=ev("startsWith"),ov=!nv&&!!function(){var e=qh(String.prototype,"startsWith");return e&&!e.writable}();function iv(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())}))}Hh({target:"String",proto:!0,forced:!ov&&!nv},{startsWith:function(e){var t=Xh(Qh(this));Jh(e);var r=Zh(rv(arguments.length>1?arguments[1]:void 0,t.length)),n=Xh(e);return tv(t,r,r+n.length)===n}}),"function"==typeof SuppressedError&&SuppressedError;const av=_l(),uv=(e,t)=>iv(void 0,void 0,void 0,(function*(){const r=jl.createWorkspaceLogger(e.workspaceName||"").getLogger("fetch-loader");let n="",o="";if(av.loaderUrl?(r.log(`using custom loader url from query params '${av.loaderUrl}'`),o=av.loaderUrl):e.devLoaderUrl&&(r.log(`using custom loader url from options '${e.devLoaderUrl}'`),o=e.devLoaderUrl),o){r.log(`verifying custom loader url '${o}' url against environment runtime json. fetching runtime json...`);const t=yield((e,t)=>iv(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,r),i=o.startsWith(e.serverUrl),a=t.some((e=>o.startsWith(e)));if(r.log("ensuring custom loader url is in environment artifacts or from an allowed domain",{data:{customLoaderUrl:o,serverUrl:e.serverUrl,isInEnvironmentArtifacts:i,isInAllowedDomains:a}}),!i&&!a)throw new Error(`the custom loader url '${o}' is not in the environment artifacts or from an allowed domain`);r.log(`using custom loader url '${o}'`),n=o}else r.log("using environment loader"),n=`${e.serverUrl}/loader/index.esm.js`;r.log("fetching environment unisphere loader",{data:{environmentLoaderUrl:n,options:e}});const{loader:i}=yield import(n);if(!(null==t?void 0:t.aborted)){if(!i)throw new Error(`failed to load dev loader from '${n}'`);return r.log("executing environment unisphere loader"),i(Object.assign({},e))}r.debug("cancelled loading workspace, this might be due to strict mode in development mode, ignore")}));var cv=qo,sv=cf,lv=re.f,fv=oo,pv=xi,dv=Kh,hv=ke,vv=Vh,yv=sv("".slice),gv=Math.min,mv=vv("endsWith"),bv=!mv&&!!function(){var e=lv(String.prototype,"endsWith");return e&&!e.writable}();cv({target:"String",proto:!0,forced:!bv&&!mv},{endsWith:function(e){var t=pv(hv(this));dv(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,o=void 0===r?n:gv(fv(r),n),i=pv(e);return yv(t,o-i.length,o)===i}});var wv=we,Ev=Jn,Sv=xi,Ov=ke,Iv=wv("".charAt),xv=wv("".charCodeAt),Rv=wv("".slice),_v=function(e){return function(t,r){var n,o,i=Sv(Ov(t)),a=Ev(r),u=i.length;return a<0||a>=u?e?"":void 0:(n=xv(i,a))<55296||n>56319||a+1===u||(o=xv(i,a+1))<56320||o>57343?e?Iv(i,a):n:e?Rv(i,a,a+2):o-56320+(n-55296<<10)+65536}},Tv=(_v(!1),_v(!0)),Pv=we,jv=Nt,Av=Math.floor,Mv=Pv("".charAt),kv=Pv("".replace),Cv=Pv("".slice),Nv=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Lv=/\$([$&'`]|\d{1,2})/g,Dv=ei,Uv=ce,$v=we,Bv=ol,Fv=ne,Wv=Tr,Gv=Ue,Kv=je,Yv=Jn,Vv=oo,Hv=xi,zv=ke,qv=function(e,t,r){return t+(r?Tv(e,t).length:1)},Zv=gt,Xv=function(e,t,r,n,o,i){var a=r+e.length,u=n.length,c=Lv;return void 0!==o&&(o=jv(o),c=Nv),kv(i,c,(function(i,c){var s;switch(Mv(c,0)){case"$":return"$";case"&":return e;case"`":return Cv(t,0,r);case"'":return Cv(t,a);case"<":s=o[Cv(c,1,-1)];break;default:var l=+c;if(0===l)return i;if(l>u){var f=Av(l/10);return 0===f?i:f<=u?void 0===n[f-1]?Mv(c,1):n[f-1]+Mv(c,1):i}s=n[l-1]}return void 0===s?"":s}))},Jv=pl,Qv=Jt("replace"),ey=Math.max,ty=Math.min,ry=$v([].concat),ny=$v([].push),oy=$v("".indexOf),iy=$v("".slice),ay="$0"==="a".replace(/./,"$0"),uy=!!/./[Qv]&&""===/./[Qv]("a","$0");function cy(e){return iv(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 sy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(sy=function(){return!!e})()}Bv("replace",(function(e,t,r){var n=uy?"$":"$0";return[function(e,r){var n=zv(this),o=Kv(e)?void 0:Zv(e,Qv);return o?Uv(o,e,n,r):Uv(t,Hv(n),e,r)},function(e,o){var i=Wv(this),a=Hv(e);if("string"==typeof o&&-1===oy(o,n)&&-1===oy(o,"$<")){var u=r(t,i,a,o);if(u.done)return u.value}var c=Gv(o);c||(o=Hv(o));var s,l=i.global;l&&(s=i.unicode,i.lastIndex=0);for(var f,p=[];null!==(f=Jv(i,a))&&(ny(p,f),l);)""===Hv(f[0])&&(i.lastIndex=qv(a,Vv(i.lastIndex),s));for(var d,h="",v=0,y=0;y<p.length;y++){for(var g,m=Hv((f=p[y])[0]),b=ey(ty(Yv(f.index),a.length),0),w=[],E=1;E<f.length;E++)ny(w,void 0===(d=f[E])?d:String(d));var S=f.groups;if(c){var O=ry([m],w,b,a);void 0!==S&&ny(O,S),g=Hv(Dv(o,void 0,O))}else g=Xv(m,a,b,w,S,o);b>=v&&(h+=iy(a,v,b)+g,v=b+m.length)}return h+iy(a,v)}]}),!!Fv((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!ay||uy),_l();var ly=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,sy()?Reflect.construct(u,c||[],l(a).constructor):u.apply(a,c)),"isReady",!1),d(i,"workspaceName",""),d(i,"shouldCreateWorkspace",!1),i.unispherePluginManager=new J(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",uv({serverUrl:this.player.config.provider.unisphereLoaderUrl,workspaceName:this.workspaceName,ui:{theme:"light",language:"en"}}));case 2:return e.abrupt("return",cy(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.unispherePluginManager.registerCuepointType(),this.isReady?this.unispherePluginManager.updateSessionData():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(ly,"defaultConfig",{widgets:[]}),(0,e.registerPlugin)("unisphere",ly)})(),{}})()));
|
|
3
3
|
//# sourceMappingURL=playkit-unisphere.js.map
|