@tivio/sdk-js 1.1.0-alpha → 1.1.0-alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@sentry/browser"),require("firebase/app"),require("firebase/auth"),require("firebase/firestore"),require("mobx")):"function"==typeof define&&define.amd?define("@tivio/sdk-js",["@sentry/browser","firebase/app","firebase/auth","firebase/firestore","mobx"],t):"object"==typeof exports?exports["@tivio/sdk-js"]=t(require("@sentry/browser"),require("firebase/app"),require("firebase/auth"),require("firebase/firestore"),require("mobx")):e["@tivio/sdk-js"]=t(e["@sentry/browser"],e["firebase/app"],e["firebase/auth"],e["firebase/firestore"],e.mobx)}(this,(function(e,t,n,r,o){return i={194:function(e,t,n){var r,o;e.exports=(r=n(259),o=n(784),function(){var e={2096:function(e){"use strict";function t(e,t){for(var n=e.toString();n.length<t;)n="0"+n;return n}function n(e){return t(e,2)}function r(r,o){"string"!=typeof r&&(o=r,r=e.exports.ISO8601_FORMAT),o||(o=e.exports.now());var i,a,s,u,c=n(o.getDate()),l=n(o.getMonth()+1),f=n(o.getFullYear()),d=n(f.substring(2,4)),p=r.indexOf("yyyy")>-1?f:d,g=n(o.getHours()),h=n(o.getMinutes()),v=n(o.getSeconds()),y=t(o.getMilliseconds(),3),b=(i=o.getTimezoneOffset(),a=Math.abs(i),s=String(Math.floor(a/60)),u=String(a%60),1===s.length&&(s="0"+s),1===u.length&&(u="0"+u),i<0?"+"+s+u:"-"+s+u);return r.replace(/dd/g,c).replace(/MM/g,l).replace(/y{1,4}/g,p).replace(/hh/g,g).replace(/mm/g,h).replace(/ss/g,v).replace(/SSS/g,y).replace(/O/g,b)}function o(e,t,n,r){e["set"+(r?"":"UTC")+t](n)}e.exports=r,e.exports.asString=r,e.exports.parse=function(t,n,r){if(!t)throw new Error("pattern must be supplied");return function(t,n,r){var i=t.indexOf("O")<0,a=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(e,t){o(e,"FullYear",t,i)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Month",t-1,i)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Date",t,i)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Hours",t,i)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(e,t){o(e,"Minutes",t,i)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(e,t){o(e,"Seconds",t,i)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(e,t){o(e,"Milliseconds",t,i)}},{pattern:/O/,regexp:"[+-]\\d{3,4}|Z",fn:function(e,t){"Z"===t&&(t=0);var n=Math.abs(t),r=(t>0?-1:1)*(n%100+60*Math.floor(n/100));e.setUTCMinutes(e.getUTCMinutes()+r)}}],s=a.reduce((function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,"("+t.regexp+")")):t.index=-1,e}),{regexp:t,index:[]}),u=a.filter((function(e){return e.index>-1}));u.sort((function(e,t){return e.index-t.index}));var c=new RegExp(s.regexp).exec(n);if(c){var l=r||e.exports.now();return u.forEach((function(e,t){e.fn(l,c[t+1])})),l}throw new Error("String '"+n+"' could not be parsed as '"+t+"'")}(t,n,r)},e.exports.now=function(){return new Date},e.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS",e.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO",e.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS",e.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"},187:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.gtag=t.install=void 0,t.install=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="ga-gtag";if(!document.getElementById(r)){var o=document.head,i=document.createElement("script");i.id=r,i.type="text/javascript",i.async=!0,i.src="https://www.googletagmanager.com/gtag/js?id=".concat(e),o.insertBefore(i,o.firstChild),window.dataLayer=window.dataLayer||[],n("js",new Date),n("config",e,t)}};var n=function(){window.dataLayer.push(arguments)};t.gtag=n;var r=n;t.default=r},421:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){o(e,t,n[t])}))}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(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}}),t&&d(e,t)}n.r(t),n.d(t,{default:function(){return z}});var g={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return u(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||g,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,i({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),v=new h,y=function(){function e(){a(this,e),this.observers={}}return u(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function b(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function m(e){return null==e?"":""+e}function O(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function _(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function P(e,t,n){var r=_(e,t,Object);r.obj[r.k]=n}function S(e,t){var n=_(e,t),r=n.obj,o=n.k;if(r)return r[o]}function E(e,t,n){var r=S(e,n);return void 0!==r?r:S(t,n)}function w(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):w(e[r],t[r],n):e[r]=t[r]);return e}function j(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function T(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var L="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,k=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,t),n=l(this,f(t).call(this)),L&&y.call(c(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return p(t,e),u(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),S(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),P(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var u=S(this.data,s)||{};r?w(u,n,o):u=i({},u,n),P(this.data,s,u),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(y),C={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},I={},M=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,t),n=l(this,f(t).call(this)),L&&y.call(c(n)),O(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,c(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=v.create("translator"),n}return p(t,e),u(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,o){var a=this;if("object"!==r(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],n),c=u.key,l=u.namespaces,f=l[l.length-1],d=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var g=n.nsSeparator||this.options.nsSeparator;return f+g+c}return c}var h=this.resolve(e,n),v=h&&h.res,y=h&&h.usedKey||c,b=h&&h.exactUsedKey||c,m=Object.prototype.toString.apply(v),O=["[object Number]","[object Function]","[object RegExp]"],_=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,P=!this.i18nFormat||this.i18nFormat.handleAsObject;if(P&&v&&"string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v&&O.indexOf(m)<0&&("string"!=typeof _||"[object Array]"!==m)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,v,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var S="[object Array]"===m,E=S?[]:{},w=S?b:y;for(var j in v)if(Object.prototype.hasOwnProperty.call(v,j)){var x="".concat(w).concat(s).concat(j);E[j]=this.translate(x,i({},n,{joinArrays:!1,ns:l})),E[j]===x&&(E[j]=v[j])}v=E}}else if(P&&"string"==typeof _&&"[object Array]"===m)(v=v.join(_))&&(v=this.extendTranslation(v,e,n,o));else{var T=!1,L=!1,k=void 0!==n.count&&"string"!=typeof n.count,C=t.hasDefaultValue(n),I=k?this.pluralResolver.getSuffix(d,n.count):"",M=n["defaultValue".concat(I)]||n.defaultValue;!this.isValidLookup(v)&&C&&(T=!0,v=M),this.isValidLookup(v)||(L=!0,v=c);var R=C&&M!==v&&this.options.updateMissing;if(L||T||R){if(this.logger.log(R?"updateKey":"missingKey",d,f,c,R?M:v),s){var A=this.resolve(c,i({},n,{keySeparator:!1}));A&&A.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&D&&D[0])for(var B=0;B<D.length;B++)N.push(D[B]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(n.lng||this.language):N.push(n.lng||this.language);var F=function(e,t,r){a.options.missingKeyHandler?a.options.missingKeyHandler(e,f,t,R?r:v,R,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,f,t,R?r:v,R,n),a.emit("missingKey",e,f,t,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?N.forEach((function(e){a.pluralResolver.getSuffixes(e).forEach((function(t){F([e],c+t,n["defaultValue".concat(t)]||M)}))})):F(N,c,M))}v=this.extendTranslation(v,e,n,h,o),L&&v===c&&this.options.appendNamespaceToMissingKey&&(v="".concat(f,":").concat(c)),L&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(v))}return v}},{key:"extendTranslation",value:function(e,t,n,r,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(i({},n,{interpolation:i({},this.options.interpolation,n.interpolation)}));var s,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=i({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),u){var f=e.match(this.interpolator.nestingRegexp);s<(f&&f.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):a.translate.apply(a,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,p="string"==typeof d?[d]:d;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=C.handle(p,e,t,this.options&&this.options.postProcessPassResolved?i({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!I["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(I["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,l=c,p=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(p,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&d&&p.push(l+i),d&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=i));u=p.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(y);function R(e){return e.charAt(0).toUpperCase()+e.slice(1)}var A=function(){function e(t){a(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=v.create("languageUtils")}return u(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=R(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=R(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=R(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],D={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function B(){var e={};return N.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:D[t.fc]}}))})),e}var F=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=n,this.logger=v.create("pluralResolver"),this.rules=B()}return u(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=v.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return u(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:T,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?j(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?j(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?j(t.nestingPrefix):t.nestingPrefixEscaped||j("$t("),this.nestingSuffix=t.nestingSuffix?j(t.nestingSuffix):t.nestingSuffixEscaped||j(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=E(t,u,e);return s.alwaysFormat?s.format(o,void 0,n):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(E(t,u,a),c,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(d){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=m(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=i({},a);function u(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,s)).replace(/'/g,'"');try{s=JSON.parse(o),t&&(s=i({},t,s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=f.shift(),c=f,l=!0}if((r=t(u.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=m(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return o.format(e,t,a.lng,a)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),U=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,t),o=l(this,f(t).call(this)),L&&y.call(c(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=v.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return p(t,e),u(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=_(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,i({},a,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(y);function H(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===r(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===r(e[2])||"object"===r(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function W(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function K(){}var G=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(a(this,t),e=l(this,f(t).call(this)),L&&y.call(c(e)),e.options=W(n),e.services={},e.logger=v,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),l(e,c(e));setTimeout((function(){e.init(n,r)}),0)}return e}return p(t,e),u(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},H(),this.options,W(t)),this.format=this.options.interpolation.format,n||(n=K),!this.options.isClone){this.modules.logger?v.init(r(this.modules.logger),this.options):v.init(null,this.options);var o=new A(this.options);this.store=new k(this.options.resources,this.options);var a=this.services;a.logger=v,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new F(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new V(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new U(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new M(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var u=b(),c=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=b();return e||(e=this.languages),t||(t=this.options.ns),n||(n=K),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&C.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=b();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var a;if("object"!==r(o)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,o].concat(u))}else a=i({},o);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=b();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=b();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,o=i({},this.options,n,{isClone:!0}),a=new t(o);return["store","services","language"].forEach((function(t){a[t]=e[t]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new M(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.emit.apply(a,[e].concat(n))})),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(y),z=new G},6160:function(e,t,n){e=n.nmd(e);var r,o,i,a="[object Map]",s="[object Promise]",u="[object Set]",c="[object WeakMap]",l="[object DataView]",f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,p="object"==typeof self&&self&&self.Object===Object&&self,g=d||p||Function("return this")(),h=t&&!t.nodeType&&t,v=h&&e&&!e.nodeType&&e,y=v&&v.exports===h,b=Function.prototype,m=Object.prototype,O=g["__core-js_shared__"],_=(r=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",P=b.toString,S=m.hasOwnProperty,E=m.toString,w=RegExp("^"+P.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=y?g.Buffer:void 0,x=m.propertyIsEnumerable,T=j?j.isBuffer:void 0,L=(o=Object.keys,i=Object,function(e){return o(i(e))}),k=U(g,"DataView"),C=U(g,"Map"),I=U(g,"Promise"),M=U(g,"Set"),R=U(g,"WeakMap"),A=!x.call({valueOf:1},"valueOf"),N=W(k),D=W(C),B=W(I),F=W(M),V=W(R);function U(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!q(e)||function(e){return!!_&&_ in e}(e))return!1;var t=Y(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?w:f;return t.test(W(e))}(n)?n:void 0}var H=function(e){return E.call(e)};function W(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(k&&H(new k(new ArrayBuffer(1)))!=l||C&&H(new C)!=a||I&&H(I.resolve())!=s||M&&H(new M)!=u||R&&H(new R)!=c)&&(H=function(e){var t=E.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?W(n):void 0;if(r)switch(r){case N:return l;case D:return a;case B:return s;case F:return u;case V:return c}return t});var K=Array.isArray;function G(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!Y(e)}var z=T||function(){return!1};function Y(e){var t=q(e)?E.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(G(e)&&(K(e)||"string"==typeof e||"function"==typeof e.splice||z(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&G(e)}(e)&&S.call(e,"callee")&&(!x.call(e,"callee")||"[object Arguments]"==E.call(e))}(e)))return!e.length;var t=H(e);if(t==a||t==u)return!e.size;if(A||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||m)}(e))return!L(e).length;for(var n in e)if(S.call(e,n))return!1;return!0}},3099:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentManagementHeaderScriptDebug=t.ConsentManagementHeaderScript=t.appendCmpScriptToHeadOnce=t.ConsentManagementHelmet=t.ConsentSettings=void 0;var u=a(n(8156)),c=new(n(6797).Logger)("ConsentSettings"),l="tivio-cmp-script",f="//assets.adobedtm.com/e949270ea86e/06f76135b050/launch-facbe9b48c75.min.js",d=l,p="//cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",g=l,h="UTF-8",v="text/javascript";t.ConsentSettings=function(e){var n=e.as,o=s(e,["as"]),i=(0,u.useRef)(null);return u.default.createElement(u.default.Fragment,null,u.default.createElement(t.ConsentManagementHelmet,null),u.default.createElement("button",{id:"ot-sdk-btn",className:"ot-sdk-show-settings",ref:i,style:{display:"none"}}),u.default.createElement(n,r({onClick:function(){var e;return null===(e=null==i?void 0:i.current)||void 0===e?void 0:e.click()}},o)))},t.ConsentManagementHelmet=function(){return(0,t.appendCmpScriptToHeadOnce)(),null},t.appendCmpScriptToHeadOnce=function(){if(!document.getElementById(l)){var e="localhost"===window.location.hostname;c.info("Injecting "+(e&&"DEBUG")+" CMP script to <head/>..."),e?b():y()}};var y=function(){var e=document.createElement("script");e.id=d,e.src=f,e.async=!0,document.head.appendChild(e)},b=function(){var e=document.createElement("script");e.id=g,e.src=p,e.type=v,e.charset=h,e.dataset.domainScript="a13ec48d-2cc6-47c5-b419-b0fbfae8ca5a",e.async=!0;var t=document.createElement("script");t.id="tivio-cmp-script-2",t.type="text/javascript",t.text="function OptanonWrapper() { }",document.head.appendChild(e),document.head.appendChild(t)};t.ConsentManagementHeaderScript=function(){return u.default.createElement("script",{id:d,src:f,async:!0})},t.ConsentManagementHeaderScriptDebug=function(){return u.default.createElement(u.default.Fragment,null,u.default.createElement("script",{id:g,src:p,type:v,charSet:h,"data-domain-script":"a13ec48d-2cc6-47c5-b419-b0fbfae8ca5a",async:!0}),u.default.createElement("script",{type:"text/javascript"},"function OptanonWrapper() "))}},9281:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3099),t)},7723:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3902),t)},3902:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.VAST_PROVIDERS=t.VastProvider=void 0,function(e){e.ETARGET_PREBID="etarget-prebid",e.MALL_TV_PREBID="malltv-prebid",e.IMPRESSION_MEDIA_PREBID="impressionMedia-prebid",e.MALL_TV="malltv",e.FALLBACK_MP4="fallback",e.FALLBACK_HLS="fallback-hls",e.JOJ="joj",e.PRIMA="prima"}(n=t.VastProvider||(t.VastProvider={})),t.VAST_PROVIDERS=[{id:n.ETARGET_PREBID,name:"Etarget Prebid"},{id:n.MALL_TV_PREBID,name:"MALL.TV Prebid"},{id:n.IMPRESSION_MEDIA_PREBID,name:"Impression Media Prebid"},{id:n.MALL_TV,name:"MALL.TV"},{id:n.JOJ,name:"JOJ"},{id:n.PRIMA,name:"Prima"},{id:n.FALLBACK_MP4,name:"Fallback (MP4)",development:!0},{id:n.FALLBACK_HLS,name:"Fallback (HLS)",development:!0}]},2509:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2951),t)},2951:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firestoreJavascriptFilters=t.firestoreArrayFilters=t.firestoreObjectFilters=void 0;var r=n(543);t.firestoreObjectFilters={isTranscoded:{field:"transcodingStatus",operator:"==",value:r.TRANSCODING_STATUS.DONE},isPublished:{field:"publishedStatus",operator:"==",value:r.PUBLISHED_STATUS.PUBLISHED}},t.firestoreArrayFilters={isTranscoded:Object.values(t.firestoreObjectFilters.isTranscoded),isPublished:Object.values(t.firestoreObjectFilters.isPublished)},t.firestoreJavascriptFilters={isTranscoded:function(e){return e===r.TRANSCODING_STATUS.DONE},isPublished:function(e){return e===r.PUBLISHED_STATUS.PUBLISHED}}},7515:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3556),t),o(n(6557),t),o(n(1321),t),o(n(3370),t)},3556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useBottomListener=void 0;var r=n(8156);t.useBottomListener=function(e){var t=e.onBottom,n=e.onCloseToBottom,o=e.closeThreshold,i=void 0===o?400:o,a=(0,r.useState)(!1),s=a[0],u=a[1],c=(0,r.useState)(!1),l=c[0],f=c[1],d=(0,r.useCallback)((function(){var e=("innerHeight"in window?window.innerHeight:document.documentElement.offsetHeight)+window.pageYOffset,t=document.body,n=document.documentElement,r=Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight);u(e>=r),f(e+i>=r)}),[s,u]);return(0,r.useEffect)((function(){return window.addEventListener("scroll",d),function(){window.removeEventListener("scroll",d)}}),[]),(0,r.useEffect)((function(){l&&(null==n||n())}),[l]),(0,r.useEffect)((function(){s&&(null==t||t())}),[s]),{isBottom:s,isCloseToBottom:l}}},1321:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useImageLoader=void 0;var r=n(8156);t.useImageLoader=function(e,t){var n=(0,r.useState)(e),o=n[0],i=n[1],a=(0,r.useState)(!1),s=a[0],u=a[1];return(0,r.useEffect)((function(){if(t){var e=new Image;e.src=t,e.onload=function(){i(t),u(!0)}}}),[t]),{loadedImageSrc:o,imageIsLoaded:s}}},6557:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLoading=void 0;var r=n(8156);t.useLoading=function(e){void 0===e&&(e=!1);var t=(0,r.useState)(e),n=t[0],o=t[1],i=(0,r.useRef)(n),a=function(e){o(e),i.current=e};return{loading:n,startLoading:function(){i.current||a(!0)},stopLoading:function(){i.current&&a(!1)}}}},3370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useOnChange=t.usePrevious=void 0;var r=n(8156);function o(e){var t,n=(0,r.useState)([]),o=n[0],i=n[1];return(0,r.useEffect)((function(){i(o.concat(e).slice(-2))}),[e]),null!==(t=o[o.length-2])&&void 0!==t?t:null}t.usePrevious=o,t.useOnChange=function(e,t){var n=o(e);n!==e&&t(n,e)}},3895:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguagePicker=void 0;var a=i(n(8156)),s=n(6915);t.LanguagePicker=function(){var e=(0,s.useLanguageOptions)(),t=e.language,n=e.languages,r=e.selectLanguage,o=(0,a.useCallback)((function(e){r(e.target.value)}),[r]);return a.default.createElement("select",{name:"tivio-language-select","data-e2e":"tivio-language-select",value:t,onChange:o},n.map((function(e){return a.default.createElement("option",{key:e,value:e},e)})))}},6915:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.useLanguage=t.useLanguageOptions=t.useT=t.useI18n=void 0;var o=n(8156),i=n(6255),a=n(6009),s=n(5318);t.useI18n=function(){return(0,o.useContext)(a.I18nContext).i18n},t.useT=function(){var e=(0,t.useI18n)();return e?e.t.bind(e):function(e){return e}},t.useLanguageOptions=function(){var e=(0,o.useContext)(s.LanguageContext);return r(r({},e),{languages:i.languages})},t.useLanguage=function(){return(0,o.useContext)(s.LanguageContext).language}},6009:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.I18nContextProvider=t.I18nContext=void 0;var s=a(n(421)),u=i(n(8156)),c=n(6797),l=n(5318),f=new c.Logger("language");t.I18nContext=(0,u.createContext)({i18n:null}),t.I18nContextProvider=function(e){var n=e.children,r=e.translations,o=(0,u.useState)({i18n:null}),i=o[0],a=o[1],c=(0,u.useContext)(l.LanguageContext).language;return(0,u.useLayoutEffect)((function(){f.info("initializing language",c),function(e,t){return new Promise((function(n,r){n(s.default.createInstance({lng:t,resources:e},(function(e){e&&r(e)})))}))}(r,c).then((function(e){a({i18n:e})}))}),[]),(0,u.useLayoutEffect)((function(){i.i18n&&(f.info("changing language",c),i.i18n.changeLanguage(c),a({i18n:i.i18n}))}),[c]),u.default.createElement(t.I18nContext.Provider,{value:i},n)}},4045:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6915),t),o(n(6009),t),o(n(5318),t),o(n(8133),t),o(n(3895),t)},5318:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageContextProvider=t.LanguageContext=void 0;var a=i(n(8156)),s=n(6255),u=n(6797),c=n(8683),l=new u.Logger("language");t.LanguageContext=(0,a.createContext)({language:s.Language.EN,selectLanguage:function(){}}),t.LanguageContextProvider=function(e){var n=e.language,r=e.children,o=(0,a.useState)((0,c.normalizeLanguage)(n)),i=o[0],s=o[1];(0,a.useLayoutEffect)((function(){var e=(0,c.normalizeLanguage)(n);s(e),l.info("Setting language (passed as prop): "+e+" (before normalization: "+n+")")}),[n]);var u=(0,a.useCallback)((function(e){l.info("Setting language: "+e),s(e)}),[]);return a.default.createElement(t.LanguageContext.Provider,{value:{language:i,selectLanguage:u}},r)}},8133:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8683:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLanguage=void 0;var r=n(6255),o=new(n(6797).Logger)("i18n");t.normalizeLanguage=function(e){if(null==e)return r.Language.EN;var t=e.toLocaleLowerCase();return"cs"===t||"cz"===t||"cze"===t||"ces"===t?r.Language.CS:"sk"===t||"slk"===t||"slo"===t?r.Language.SK:("en"===t||"eng"===t||o.warn("Unrecognized language (input: "+e+"). Falling back to ENG"),r.Language.EN)}},1920:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.VAST_PROVIDERS=t.VastProvider=t.LanguagePicker=t.useLanguageOptions=t.I18nContextProvider=t.LanguageContextProvider=t.useT=t.firestoreObjectFilters=t.firestoreJavascriptFilters=t.firestoreArrayFilters=t.random=t.isIndexedDbSupported=t.isCookiesEnabled=t.isBrowser=t.onceAsync=t.once=t.executeAsNewEventLoopJob=t.removeAccents=t.normalizeText=t.formatCurrency=t.formatEpisode=t.toTwoPlaces=t.preloadImages=t.preloadImage=t.Cache=t.twoPlaces=t.parseCzechDate=t.getQueryByWhereFilters=t.getQueryByFilter=t.isInThePast=t.getSecs=t.getRelativeTime=t.getMinsSecsHours=t.getMinsSecs=t.getMins=t.getHours=t.getDuration=t.addSeconds=t.addMs=t.addMinutes=t.addHours=t.addDays=t.Analytics=t.createLogger=t.Logger=t.replaceWithoutOverwritingValues=t.notEmptyFilter=t.chunkArray=t.Pagination=t.RefsPagination=void 0;var i=n(1645),a=n(4291);Object.defineProperty(t,"RefsPagination",{enumerable:!0,get:function(){return a.RefsPagination}}),Object.defineProperty(t,"Pagination",{enumerable:!0,get:function(){return a.Pagination}}),o(n(7515),t);var s=n(6797);Object.defineProperty(t,"chunkArray",{enumerable:!0,get:function(){return s.chunkArray}}),Object.defineProperty(t,"notEmptyFilter",{enumerable:!0,get:function(){return s.notEmptyFilter}}),Object.defineProperty(t,"replaceWithoutOverwritingValues",{enumerable:!0,get:function(){return s.replaceWithoutOverwritingValues}}),Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return s.Logger}}),Object.defineProperty(t,"createLogger",{enumerable:!0,get:function(){return s.createLogger}}),Object.defineProperty(t,"Analytics",{enumerable:!0,get:function(){return s.Analytics}}),Object.defineProperty(t,"addDays",{enumerable:!0,get:function(){return s.addDays}}),Object.defineProperty(t,"addHours",{enumerable:!0,get:function(){return s.addHours}}),Object.defineProperty(t,"addMinutes",{enumerable:!0,get:function(){return s.addMinutes}}),Object.defineProperty(t,"addMs",{enumerable:!0,get:function(){return s.addMs}}),Object.defineProperty(t,"addSeconds",{enumerable:!0,get:function(){return s.addSeconds}}),Object.defineProperty(t,"getDuration",{enumerable:!0,get:function(){return s.getDuration}}),Object.defineProperty(t,"getHours",{enumerable:!0,get:function(){return s.getHours}}),Object.defineProperty(t,"getMins",{enumerable:!0,get:function(){return s.getMins}}),Object.defineProperty(t,"getMinsSecs",{enumerable:!0,get:function(){return s.getMinsSecs}}),Object.defineProperty(t,"getMinsSecsHours",{enumerable:!0,get:function(){return s.getMinsSecsHours}}),Object.defineProperty(t,"getRelativeTime",{enumerable:!0,get:function(){return s.getRelativeTime}}),Object.defineProperty(t,"getSecs",{enumerable:!0,get:function(){return s.getSecs}}),Object.defineProperty(t,"isInThePast",{enumerable:!0,get:function(){return s.isInThePast}}),Object.defineProperty(t,"getQueryByFilter",{enumerable:!0,get:function(){return s.getQueryByFilter}}),Object.defineProperty(t,"getQueryByWhereFilters",{enumerable:!0,get:function(){return s.getQueryByWhereFilters}}),Object.defineProperty(t,"parseCzechDate",{enumerable:!0,get:function(){return s.parseCzechDate}}),Object.defineProperty(t,"twoPlaces",{enumerable:!0,get:function(){return s.twoPlaces}}),Object.defineProperty(t,"Cache",{enumerable:!0,get:function(){return s.Cache}}),Object.defineProperty(t,"preloadImage",{enumerable:!0,get:function(){return s.preloadImage}}),Object.defineProperty(t,"preloadImages",{enumerable:!0,get:function(){return s.preloadImages}}),Object.defineProperty(t,"toTwoPlaces",{enumerable:!0,get:function(){return s.toTwoPlaces}}),Object.defineProperty(t,"formatEpisode",{enumerable:!0,get:function(){return s.formatEpisode}}),Object.defineProperty(t,"formatCurrency",{enumerable:!0,get:function(){return s.formatCurrency}}),Object.defineProperty(t,"normalizeText",{enumerable:!0,get:function(){return s.normalizeText}}),Object.defineProperty(t,"removeAccents",{enumerable:!0,get:function(){return s.removeAccents}}),Object.defineProperty(t,"executeAsNewEventLoopJob",{enumerable:!0,get:function(){return s.executeAsNewEventLoopJob}}),Object.defineProperty(t,"once",{enumerable:!0,get:function(){return s.once}}),Object.defineProperty(t,"onceAsync",{enumerable:!0,get:function(){return s.onceAsync}}),Object.defineProperty(t,"isBrowser",{enumerable:!0,get:function(){return s.isBrowser}}),Object.defineProperty(t,"isCookiesEnabled",{enumerable:!0,get:function(){return s.isCookiesEnabled}}),Object.defineProperty(t,"isIndexedDbSupported",{enumerable:!0,get:function(){return s.isIndexedDbSupported}}),Object.defineProperty(t,"random",{enumerable:!0,get:function(){return s.random}}),o(n(3854),t);var u=n(2509);Object.defineProperty(t,"firestoreArrayFilters",{enumerable:!0,get:function(){return u.firestoreArrayFilters}}),Object.defineProperty(t,"firestoreJavascriptFilters",{enumerable:!0,get:function(){return u.firestoreJavascriptFilters}}),Object.defineProperty(t,"firestoreObjectFilters",{enumerable:!0,get:function(){return u.firestoreObjectFilters}});var c=n(4045);Object.defineProperty(t,"useT",{enumerable:!0,get:function(){return c.useT}}),Object.defineProperty(t,"LanguageContextProvider",{enumerable:!0,get:function(){return c.LanguageContextProvider}}),Object.defineProperty(t,"I18nContextProvider",{enumerable:!0,get:function(){return c.I18nContextProvider}}),Object.defineProperty(t,"useLanguageOptions",{enumerable:!0,get:function(){return c.useLanguageOptions}}),Object.defineProperty(t,"LanguagePicker",{enumerable:!0,get:function(){return c.LanguagePicker}});var l=n(7723);Object.defineProperty(t,"VastProvider",{enumerable:!0,get:function(){return l.VastProvider}}),Object.defineProperty(t,"VAST_PROVIDERS",{enumerable:!0,get:function(){return l.VAST_PROVIDERS}}),o(n(6895),t),o(n(9281),t),(0,i.polyfill)()},3331:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Pagination=void 0;var i=n(259),a=(0,n(6797).createLogger)("Pagination");t.Pagination=function(e,t,n){var s,u,c=this;this.query=e,this.creator=t,this.options=n,this.lastDocumentSnapshot=null,this.items=[],this.hasNextPage=!0,this.loading=!1,this.limit=10,this.fetchMore=function(){c.loading?a.info("loading ..."):c.hasNextPage?(a.info("fetch more"),c.fetchData()):a.info("no more data")},this.fetchData=function(){return r(c,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:a.info("fetch data"),n.label=1;case 1:return n.trys.push([1,3,4,5]),this.startLoading(),[4,this.makeQuery()];case 2:return e=n.sent(),a.info("fetched "+e.size+" docs, going to create entities"),this.items=this.items.concat(this.querySnapshotToEntities(e)),this.lastDocumentSnapshot=this.getLastSnapshotFromQuerySnapshot(e),[3,5];case 3:return t=n.sent(),console.error(t),[3,5];case 4:return this.stopLoading(),[7];case 5:return[2]}}))}))},this.querySnapshotToEntities=function(e){return e.docs.map((function(e){return c.creator(e.ref,e.data())}))},this.makeQuery=function(){return r(c,void 0,void 0,(function(){var e,t;return o(this,(function(n){return e=this.query,(null===(t=this.options)||void 0===t?void 0:t.noLimit)?(a.info("fetch all documents without pagination"),this.hasNextPage=!1):this.lastDocumentSnapshot?(a.info("making query with limit",this.limit),e=e.limit(this.limit).startAfter(this.lastDocumentSnapshot)):(a.info("making first query with limit",this.limit),e=e.limit(this.limit)),[2,e.get()]}))}))},this.getLastSnapshotFromQuerySnapshot=function(e){var t=e.size;return c.hasNextPage=!e.empty&&e.size==c.limit,t>0?e.docs[t-1]:null},this.startLoading=function(){c.loading=!0},this.stopLoading=function(){c.loading=!1},this.addItemToEnd=function(e){c.hasNextPage?a.info("ignoring of adding an item to pagination locally because not all items are loaded"):(a.info("add item to end"),c.items=c.items.concat([e]))},this.addItemToStart=function(e){a.info("add item to start"),c.items=[e].concat(c.items)},(0,i.makeObservable)(this,{items:i.observable}),this.limit=null!==(u=null===(s=this.options)||void 0===s?void 0:s.limit)&&void 0!==u?u:this.limit,this.fetchData()}},4291:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2523),t),o(n(3331),t)},2523:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.RefsPagination=void 0;var i=n(259),a=n(6797),s=(0,a.createLogger)("RefsPagination"),u=function(){function e(e,t,n,u,c){var l=this;if(void 0===n&&(n=!0),void 0===u&&(u=10),void 0===c&&(c=!0),this.refs=e,this.creator=t,this.initialized=n,this.limit=u,this.items=[],this.currentItems=[],this.currentPage=0,this.hasNextPage=!0,this.loading=!1,this.error=null,this.fetchMore=function(){return r(l,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return this.isLoading?[2]:(this.currentPage++,[4,this.fetchData()]);case 1:return e.sent(),[2]}}))}))},this.fetchData=function(){return r(l,void 0,void 0,(function(){var e,t,n,i,u,c,l=this;return o(this,(function(f){switch(f.label){case 0:if(this.isLoading||!this.hasNextPage)return[2];f.label=1;case 1:return f.trys.push([1,4,5,6]),s.info("fetchData"),e=this.currentPage*this.limit,t=e+this.limit,0!==this.items.slice(e,t).length?[3,3]:(n=this.refs.slice(e,t),t>=this.refs.length&&(this.hasNextPage=!1),this.startLoading(),[4,Promise.all(n.map((function(e){return r(l,void 0,void 0,(function(){var t,n;return o(this,(function(r){switch(r.label){case 0:return[4,e.get()];case 1:return t=r.sent(),(n=t.data())?[2,this.creator(e,n)]:[2,null]}}))}))})))]);case 2:return i=f.sent(),u=i.filter(a.notEmptyFilter),s.info("fetched "+u.length+" items of "+n.length+" refs"),this.endLoading(),this.setCurrentItems=u,this.setItems=this.items.concat(u),[3,3];case 3:return[3,6];case 4:return c=f.sent(),s.error(c),this.setError=c,[3,6];case 5:return this.endLoading(),[7];case 6:return[2]}}))}))},this.addItemToStart=function(e,t){l.refs=l.refs.concat([t]),l.getItems.unshift(e)},this.addItem=function(e,t){l.refs.length===l.items.length&&(l.setItems=l.items.concat([e])),l.refs=l.refs.concat([t])},this.getItem=function(e){return r(l,void 0,void 0,(function(){var t,n,r;return o(this,(function(o){switch(o.label){case 0:return(t=this.refs.find((function(t){return t.id===e})))?[4,t.get()]:[3,2];case 1:return n=o.sent(),(r=n.data())?[2,this.creator(n.ref,r)]:[3,3];case 2:throw new Error("ref-not-found");case 3:return[2]}}))}))},this.limit>1e3)throw new Error("Limit cannot be greater than 1000");c&&this.fetchData(),(0,i.makeObservable)(this,{items:i.observable,refs:i.observable,loading:i.observable,error:i.observable,hasNextPage:i.observable})}return e.prototype.startLoading=function(){this.setLoading=!0},e.prototype.endLoading=function(){this.setLoading=!1},Object.defineProperty(e.prototype,"getError",{get:function(){return this.error},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getCurrentItems",{get:function(){return this.currentItems},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getItems",{get:function(){return this.items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getRefs",{get:function(){return this.refs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getHasNextPage",{get:function(){return this.hasNextPage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return this.loading},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getItemsCount",{get:function(){return this.refs.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this.initialized},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setItems",{set:function(e){this.items=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setLoading",{set:function(e){this.loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setCurrentItems",{set:function(e){this.currentItems=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setIsInitialized",{set:function(e){this.initialized=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setError",{set:function(e){this.error=e},enumerable:!1,configurable:!0}),e}();t.RefsPagination=u},1645:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.polyfill=void 0,t.polyfill=function(){"object"==typeof window&&"object"==typeof document&&window.addEventListener("load",(function(){var e=document.createElement("script");e.src="https://polyfill.io/v3/polyfill.min.js?features=String.prototype.normalize",e.id="tivio-polyfill-string-prototype-normalize",document.head.appendChild(e)}))}},3690:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.PLATFORM=t.CUSTOMER_BUILD=void 0,function(e){e.OKTAGON="OKTAGON",e.JOJ="JOJ",e.MALL="MALL",e.GARAZ="GARAZ",e.U_KULATEHO_STOLU="U_KULATEHO_STOLU"}(n||(n={})),t.CUSTOMER_BUILD=n,function(e){e.MOBILE="MOBILE",e.WEB="WEB",e.TV="TV"}(r||(r={})),t.PLATFORM=r},9352:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(8757),t),o(n(3690),t)},8757:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6255:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.languages=t.Language=void 0,function(e){e.CS="cs",e.DE="de",e.EN="en",e.FR="fr",e.PL="pl",e.SK="sk",e.SP="sp"}(n=t.Language||(t.Language={})),t.languages=Object.values(n)},7245:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ASSET_PRESET_PLACEMENTS=t.AssetPresetPlacement=void 0,function(e){e.TV_CHANNEL="tvChannel",e.CHANNEL="channel",e.SECTION="section",e.VIDEO="video",e.TAG="tag"}(n=t.AssetPresetPlacement||(t.AssetPresetPlacement={})),t.ASSET_PRESET_PLACEMENTS=Object.values(n)},5761:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},543:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(7245),t),o(n(5761),t),o(n(1435),t),o(n(2778),t),o(n(8496),t),o(n(5925),t),o(n(2226),t),o(n(1281),t),o(n(7371),t),o(n(800),t),o(n(2062),t),o(n(557),t),o(n(4338),t),o(n(4757),t)},1435:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2778:function(e,t){"use strict";var n,r,o,i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdProfileType=t.OnlineSkippability=t.StreamSkippability=t.MONETIZATION_FREQUENCY=void 0,(i=t.MONETIZATION_FREQUENCY||(t.MONETIZATION_FREQUENCY={})).ONE_TIME_PAYMENT="ONE_TIME_PAYMENT",i.DAILY="DAILY",i.WEEKLY="WEEKLY",i.MONTHLY="MONTHLY",i.ANNUALLY="ANNUALLY",(o=t.StreamSkippability||(t.StreamSkippability={})).SKIPPABLE="SKIPPABLE",o.NOT_SKIPPABLE="NOT_SKIPPABLE",o.AUTO_SKIP="AUTO_SKIP",(r=t.OnlineSkippability||(t.OnlineSkippability={})).SKIPPABLE="SKIPPABLE",r.NOT_SKIPPABLE="NOT_SKIPPABLE",r.VAST_BASED="VAST_BASED",(n=t.AdProfileType||(t.AdProfileType={})).ONLINE="ONLINE",n.STREAM="STREAM"},8496:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4757:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentGateway=t.PurchaseStatus=t.CURRENCIES=void 0,t.CURRENCIES=["CZK","EUR","USD"],(n=t.PurchaseStatus||(t.PurchaseStatus={})).NEW="NEW",n.PAID="PAID",n.CANCELLED="CANCELLED",n.ERROR="ERROR",(t.PaymentGateway||(t.PaymentGateway={})).QERKO="qerko"},557:function(e,t){"use strict";var n,r,o,i,a,s,u,c;Object.defineProperty(t,"__esModule",{value:!0}),t.ORDER_BY_FIELD_PATH=t.WHERE_FILTER_FIELD_PATH=t.WHERE_FILTER_OPERATOR=t.ORDER_BY_DIRECTION=t.ROW_TYPE=t.FILTER_COLLECTION=t.ROW_ITEM_COMPONENT=t.ROW_COMPONENT=void 0,function(e){e.ROW="ROW",e.BANNER="BANNER"}(n||(n={})),t.ROW_COMPONENT=n,function(e){e.ROW_ITEM_PORTRAIT="ROW_ITEM_PORTRAIT",e.ROW_ITEM_LANDSCAPE="ROW_ITEM_LANDSCAPE",e.ROW_ITEM_CIRCLED="ROW_ITEM_CIRCLED"}(r||(r={})),t.ROW_ITEM_COMPONENT=r,function(e){e.VIDEOS="videos",e.TAGS="tags"}(o||(o={})),t.ROW_TYPE=o,function(e){e.DESC="desc",e.ASC="asc"}(i||(i={})),t.ORDER_BY_DIRECTION=i,function(e){e.LESS="<",e.LESS_OR_EQUAL="<=",e.EQUAL="==",e.NOT_EQUAL="!=",e.GREATER_OR_EQUAL=">=",e.GREATER=">",e.ARRAY_CONTAINS="array-contains",e.IN="in",e.ARRAY_CONTAINS_ANY="array-contains-any",e.NOT_IN="not-in"}(a||(a={})),t.WHERE_FILTER_OPERATOR=a,function(e){e.CREATED="created",e.TAGS="tags",e.TAG_TYPE_REF="tagTypeRef"}(s||(s={})),t.WHERE_FILTER_FIELD_PATH=s,function(e){e.VIDEOS="videos",e.TAGS="tags",e.TV_CHANNELS="tvChannels"}(u||(u={})),t.FILTER_COLLECTION=u,function(e){e.CREATED="created"}(c||(c={})),t.ORDER_BY_FIELD_PATH=c},2062:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5925:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4338:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.TagMetadataFieldType=t.TagSimplicityType=void 0,(r=t.TagSimplicityType||(t.TagSimplicityType={})).SIMPLE="SIMPLE",r.COMPOSED="COMPOSED",(n=t.TagMetadataFieldType||(t.TagMetadataFieldType={})).STRING="STRING",n.TRANSLATION="TRANSLATION",n.NUMBER="NUMBER",n.BOOLEAN="BOOLEAN"},2226:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TvStream=void 0,(n=t.TvStream||(t.TvStream={})).STARTOVER="startover",n.TIMESHIFT="timeshift",n.LIVE="live",n.ALL="all"},1281:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7371:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.USER_TYPE=void 0,function(e){e.ORGANIZATION_USER="ORGANIZATION_USER",e.TIVIO_USER="TIVIO_USER"}(n||(n={})),t.USER_TYPE=n},800:function(e,t){"use strict";var n,r,o,i,a,s,u,c;Object.defineProperty(t,"__esModule",{value:!0}),t.NewVideoSourceCodec=t.NewVideoSourceEncrytion=t.NewVideoSourceProtocol=t.ELEMENT_TYPE=t.DATA_SOURCE=t.TRANSCODING_STATUS=t.PUBLISHED_STATUS=t.PlacementType=void 0,function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"}(n||(n={})),t.PUBLISHED_STATUS=n,function(e){e.ON_HOLD="CREATED",e.IN_PROGRESS="ENCODING",e.DONE="ENCODING_DONE",e.ERROR="ERROR"}(r||(r={})),t.TRANSCODING_STATUS=r,function(e){e.MALL_TV="MALL_TV",e.TIVIO_ADMIN="TIVIO_ADMIN",e.EPG_IMPORT="EPG_IMPORT"}(o||(o={})),t.DATA_SOURCE=o,function(e){e.PLAYLIST="PLAYLIST",e.VIDEO="VIDEO",e.TV_PROGRAM="TV_PROGRAM"}(i||(i={})),t.ELEMENT_TYPE=i,(c=t.PlacementType||(t.PlacementType={})).VIDEO="video",c.SECTION="section",c.CHANNEL="channel",c.CONDITION="condition",function(e){e.HLS="hls",e.DASH="dash",e.MP4="mp4"}(a||(a={})),t.NewVideoSourceProtocol=a,function(e){e.NONE="none",e.WIDEVINE="widevine",e.FAIRPLAY="fairplay",e.PLAYREADY="playready"}(s||(s={})),t.NewVideoSourceEncrytion=s,function(e){e.H264="h264",e.H265="h265"}(u||(u={})),t.NewVideoSourceCodec=u},9396:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},786:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5129:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9786:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(9363),t),o(n(2635),t),o(n(786),t),o(n(3910),t),o(n(190),t),o(n(4906),t),o(n(3948),t),o(n(7535),t),o(n(3161),t),o(n(5656),t),o(n(9614),t),o(n(9396),t),o(n(1738),t),o(n(5129),t),o(n(3959),t),o(n(7605),t)},3959:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3910:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1738:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7535:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ROW_ITEM_TYPES=void 0,(n=t.ROW_ITEM_TYPES||(t.ROW_ITEM_TYPES={})).VIDEO="VIDEO",n.TAG="TAG",n.TV_CHANNEL="TV_CHANNEL"},3161:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7605:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ALGOLIA_INDEX_NAME=void 0,(n=t.ALGOLIA_INDEX_NAME||(t.ALGOLIA_INDEX_NAME={})).VIDEOS="videos",n.TAGS="tags",n.TV_CHANNELS="tvChannels"},190:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9614:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5656:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4906:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9363:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3948:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2635:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2010:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6895:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2010),t),o(n(543),t),o(n(9786),t),o(n(9352),t),o(n(6255),t)},9075:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=void 0;var o=n(187),i=new(n(6222).Logger)("analytics"),a=function(){function e(){this.eventNames=null,this.gaMeasurementId=null}return e.prototype.init=function(e,t){this.gaMeasurementId=e,this.eventNames=t,(0,o.install)(e)},e.prototype.trackAnalytic=function(e,t,n){if(this.isInitialized()){var r=this.eventNames[e];r&&(i.info("Tracking analytic "+e+" under "+r,t,n),this.trackEvent(r,t,n))}else i.warn("Failed to track event, because analytics are not initialized yet",e,t)},e.prototype.isInitialized=function(){return null!=this.eventNames&&null!=this.gaMeasurementId},e.prototype.trackEvent=function(e,t,n){var i=r(r({},null!=t?t:{}),{send_to:this.gaMeasurementId});n?(0,o.gtag)("event",e,i,n):(0,o.gtag)("event",e,i)},e}();t.Analytics=a},4511:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceWithoutOverwritingValues=t.chunkArray=t.notEmptyFilter=void 0,t.notEmptyFilter=function(e){return!!e},t.chunkArray=function(e,t){var n,r=e.length,o=[];for(n=0;n<r;n+=t){var i=e.slice(n,n+t);o.push(i)}return o},t.replaceWithoutOverwritingValues=function(e,t,n){var r=[];return t.forEach((function(t){var o=e.find((function(e){return n(t,e)}));r.push(null!=o?o:t)})),r}},7607:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;var n=function(){function e(e){var t,n;this.enabled=!0,this.map=new Map,this.max=null!==(t=null==e?void 0:e.max)&&void 0!==t?t:1e3,this.convertKey=null!==(n=null==e?void 0:e.convertKey)&&void 0!==n?n:function(e){return e}}return e.prototype.set=function(e,t){this.enabled&&(this.map.size>this.max&&this.map.clear(),this.map.set(this.convertKey(e),t))},e.prototype.get=function(e){var t;return null!==(t=this.map.get(this.convertKey(e)))&&void 0!==t?t:null},e.prototype.has=function(e){return!!this.enabled&&this.map.has(this.convertKey(e))},e.prototype.getSize=function(){return this.map.size},e.prototype.disable=function(){this.enabled=!1},e}();t.Cache=n},3489:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.onceAsync=t.once=void 0,t.once=function(e){var t=!1;return function(){t||(e(),t=!0)}},t.onceAsync=function(e){var t=!1;return function(){return n(void 0,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return t?[3,2]:(t=!0,[4,e()]);case 1:n.sent(),n.label=2;case 2:return[2]}}))}))}}},7500:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.stringComparator=t.booleanComparator=t.numberComparator=t.SortDirection=void 0,function(e){e.ASC="ASC",e.DESC="DESC"}(n=t.SortDirection||(t.SortDirection={})),t.numberComparator=function(e,t,r){return r===n.ASC?e-t:t-e},t.booleanComparator=function(e,t){return e&&t?0:e&&!t?-1:!e&&t?1:0},t.stringComparator=function(e,t){return e<t?-1:1}},3854:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(7500),t),o(n(9153),t),o(n(9924),t)},9153:function(e,t,n){"use strict";var r,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.strategiesComparator=t.expirationComparator=t.placementTypeComparator=t.PLACEMENT_TYPE_PRIORITIES=void 0;var i=n(7500),a=n(6895),s=o(n(6160));t.PLACEMENT_TYPE_PRIORITIES=((r={})[a.PlacementType.VIDEO]=3,r[a.PlacementType.CONDITION]=2,r[a.PlacementType.SECTION]=1,r[a.PlacementType.CHANNEL]=0,r),t.placementTypeComparator=function(e,n,r){return void 0===r&&(r=i.SortDirection.DESC),(0,i.numberComparator)(t.PLACEMENT_TYPE_PRIORITIES[e.placementType],t.PLACEMENT_TYPE_PRIORITIES[n.placementType],r)},t.expirationComparator=function(e,t,n){var r,o;return void 0===n&&(n=i.SortDirection.ASC),(0,i.numberComparator)(null!==(r=e.expirationDaysSincePublished)&&void 0!==r?r:Number.MAX_VALUE,null!==(o=t.expirationDaysSincePublished)&&void 0!==o?o:Number.MAX_VALUE,n)},t.strategiesComparator=function(e,t){return(0,i.numberComparator)((0,s.default)(e.strategies)?0:1,(0,s.default)(t.strategies)?0:1,i.SortDirection.ASC)}},9924:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalsFirstRestAlphabeticallyComparator=t.alphabeticComparator=t.sortAlphabetically=void 0;var r=n(7500);t.sortAlphabetically=function(e){return e.sort((function(e,t){return(0,r.stringComparator)(e.name,t.name)}))},t.alphabeticComparator=function(e,t){return(0,r.stringComparator)(e.name,t.name)},t.globalsFirstRestAlphabeticallyComparator=function(e,t){var n,o;return(0,r.booleanComparator)(null!==(n=e.isGlobal)&&void 0!==n&&n,null!==(o=t.isGlobal)&&void 0!==o&&o)||(0,r.stringComparator)(e.name,t.name)}},3918:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIndexedDbSupported=t.isCookiesEnabled=t.isBrowser=void 0,t.isBrowser=function(){return"object"==typeof window&&"object"==typeof document},t.isCookiesEnabled=function(){if(!(0,t.isBrowser)()||"string"!=typeof document.cookie)return!1;document.cookie="tiviocookietest=1";var e=-1!=document.cookie.indexOf("tiviocookietest=");return document.cookie="tiviocookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e},t.isIndexedDbSupported=function(){return window&&null!=window.indexedDB&&null!=window.IDBCursor&&null!=window.IDBCursorWithValue&&null!=window.IDBDatabase&&null!=window.IDBFactory&&null!=window.IDBIndex&&null!=window.IDBKeyRange&&null!=window.IDBObjectStore&&null!=window.IDBOpenDBRequest&&null!=window.IDBRequest&&null!=window.IDBTransaction&&null!=window.IDBVersionChangeEvent}},711:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeAsNewEventLoopJob=void 0,t.executeAsNewEventLoopJob=function(e){setTimeout(e)}},8399:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatCurrency=t.formatEpisode=t.toTwoPlaces=void 0,t.toTwoPlaces=function(e){return e<10?"0"+e:""+e},t.formatEpisode=function(e,n){return"S"+(0,t.toTwoPlaces)(e)+"E"+(0,t.toTwoPlaces)(n)},t.formatCurrency=function(e){switch(e){case"CZK":return"Kč";case"EUR":return"€";case"USD":return"$"}}},3434:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preloadImages=t.preloadImage=void 0,t.preloadImage=function(e){return new Promise((function(t,n){var r=new Image;r.src=e,r.onload=t,r.onerror=function(){n("image failed to load (uri:"+e+")")}}))},t.preloadImages=function(e){return Promise.all(e.map(t.preloadImage))}},6797:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4511),t),o(n(9075),t),o(n(6222),t),o(n(8029),t),o(n(7607),t),o(n(3854),t),o(n(6845),t),o(n(3434),t),o(n(8399),t),o(n(2729),t),o(n(711),t),o(n(3489),t),o(n(3918),t),o(n(6971),t)},6222:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=t.Logger=void 0;var r=function(){function e(e){this.name=e,this.isEnabled=!0}return e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["error"],e,!1))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["info"],e,!1))},e.prototype.off=function(){this.isEnabled=!1},e.prototype.on=function(){this.isEnabled=!0},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["warn"],e,!1))},e.prototype.forceInfo=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];console.info.apply(console,n([e.prefix+":"+this.name],t,!1))},e.prototype.log=function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e.enabled&&this.isEnabled&&console[t].apply(console,n([e.prefix+":"+this.name],r,!1))},e.enabled=!0,e.prefix="tivio",e}();t.Logger=r,t.createLogger=function(e){return new r(e)}},6971:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.random=void 0,t.random=function(e){return Math.round(Math.random()*e)}},6845:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQueryByFilter=t.getQueryByWhereFilters=void 0;var n=function(e,t){return e.reduce((function(e,t){return Array.isArray(t.value)&&0===t.value.length?e:e.where(t.fieldPath,t.opStr,t.value)}),t)};t.getQueryByWhereFilters=n,t.getQueryByFilter=function(e,t){return n(e.where,t).orderBy(e.orderBy.fieldPath,e.orderBy.directionStr)}},2729:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeText=t.toKebabCase=t.toSnakeCase=t.removeAccents=void 0,t.removeAccents=function(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")},t.toSnakeCase=function(e){return e.trim().toLocaleLowerCase().replace(/\s+/g,"_")},t.toKebabCase=function(e){return e.trim().toLocaleLowerCase().replace(/\s+/g,"-")},t.normalizeText=function(e,n){void 0===n&&(n="snake-case");var r=(0,t.removeAccents)(e);return"snake-case"===n?(0,t.toSnakeCase)(r):(0,t.toKebabCase)(r)}},8029:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getRelativeTime=t.getDuration=t.getMinsSecsHours=t.getMinsSecs=t.twoPlaces=t.getHours=t.getMins=t.getSecs=t.parseCzechDate=t.isInThePast=t.addSeconds=t.addMs=t.addMinutes=t.addHours=t.addDays=void 0;var a=i(n(2096));function s(e,t){return u(e,60*t)}function u(e,t){return l(e,60*t)}function c(e,t){return new Date(e.getTime()+t)}function l(e,t){return c(e,1e3*t)}function f(e,t){var n=null!=e?Math.floor(e/1e3):0;return t?n%60:n}function d(e,t){var n=null!=e?Math.floor(f(e)/60):0;return t?n%60:n}function p(e,t){var n=null!=e?Math.floor(d(e)/60):0;return t?n%24:n}function g(e){return e>=10?e:"0"+e}t.addDays=function(e,t){return s(e,24*t)},t.addHours=s,t.addMinutes=u,t.addMs=c,t.addSeconds=l,t.isInThePast=function(e){return e<new Date},t.parseCzechDate=function(e){var t=a.parse("dd.MM.yyyy hh:mm",e),n=1e3*t.getSeconds()+t.getMilliseconds();return new Date(t.getTime()-n)},t.getSecs=f,t.getMins=d,t.getHours=p,t.twoPlaces=g,t.getMinsSecs=function(e){if(e<0)return{mins:0,secs:0,text:"",textWordy:""};var t=d(e),n=f(e,!0),r="";return n&&(r=n+" s"),t&&(r=t+" min"+(r.length>0?" "+r:"")),{mins:t,secs:n,text:t+":"+g(n),textWordy:r}},t.getMinsSecsHours=function(e){var t=p(e),n=d(e,!0),r=f(e,!0),o=n+":"+g(r);return t>0&&(4===o.length&&(o="0"+o),o=t+":"+o),{hours:t,mins:n,secs:r,text:o}},t.getDuration=function(e){return null==e||e<0?null:Math.round(e/60)+" MIN"},t.getRelativeTime=function(e){if(null==e)return"";var t=((new Date).getTime()-e.getTime())/36e5,n=Math.floor(t);if(n<1)return"";if(n<24)return n+" HOURS AGO";var r=t/24,o=Math.floor(r);if(o<7)return o+" DAYS AGO";var i=r/7,a=Math.floor(i);if(a<5)return a+" WEEKS AGO";var s=r/30,u=Math.floor(s);if(u<12)return u+" MONTHS AGO";var c=r/365;return Math.ceil(c)+" YEARS AGO"}},259:function(e){"use strict";e.exports=r},8156:function(e){"use strict";e.exports=o}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n(1920)}())},320:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,u=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(u[l]=a[l]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},426:function(e,t,n){"use strict";var r=n(320),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||g}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var m=b.prototype=new y;m.constructor=b,r(m,v.prototype),m.isPureReactComponent=!0;var O={current:null},_=Object.prototype.hasOwnProperty,P={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,r)&&!P.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:O.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var w=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function x(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case i:u=!0}}if(u)return a=a(u=e),e=""===r?"."+j(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(w,"$&/")+"/"),x(a,t,n,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(w,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+j(s=e[c],c);u+=x(s,t,n,l,a)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=x(s=s.value,t,n,l=r+j(s,c++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function T(e,t,n){if(null==e)return e;var r=[],o=0;return x(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function L(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var k={current:null};function C(){var e=k.current;if(null===e)throw Error(p(321));return e}var I={ReactCurrentDispatcher:k,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:O,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:T,forEach:function(e,t,n){T(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error(p(143));return e}},t.Component=v,t.PureComponent=b,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.cloneElement=function(e,t,n){if(null==e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=O.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)_.call(t,l)&&!P.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:L}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return C().useCallback(e,t)},t.useContext=function(e,t){return C().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return C().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return C().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return C().useLayoutEffect(e,t)},t.useMemo=function(e,t){return C().useMemo(e,t)},t.useReducer=function(e,t,n){return C().useReducer(e,t,n)},t.useRef=function(e){return C().useRef(e)},t.useState=function(e){return C().useState(e)},t.version="17.0.2"},784:function(e,t,n){"use strict";e.exports=n(426)},992:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerWrapperEventType=void 0,function(e){e.adMetadata="adMetadata"}(n||(n={})),t.PlayerWrapperEventType=n},958:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.createInternalConf=t.defaultConf=void 0;var o=n(782),i=n(373);t.defaultConf={resolverUrl:"https://tivio-resolver-production.tiv.io/serveBundle/resolver2.js",fetchPackage:i.fetchPackage},t.createInternalConf=function(e){return r(r(r({},t.defaultConf),e),{logger:void 0!==e.logger?e.logger:(0,o.createLogger)({isConsoleEnabled:!0}),sdkVersion:"1.1.0-alpha"})}},920:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(643),t),o(n(173),t),o(n(992),t)},643:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createTivio=t.createRemotePackageLoader=t.fetchBundleViaResolver=void 0;var i=n(194),a=n(958),s=n(229),u=n(614),c=new i.Logger("bundleLoader");t.fetchBundleViaResolver=function(e){return r(void 0,void 0,void 0,(function(){var t,n;return o(this,(function(r){return t=e.resolverUrl,n=e.fetchPackage,c.info("Fetching bundle via resolver"),[2,n(t).then((function(t){var n,r={},o={exports:r};try{new Function("require","module","exports",t)(s.resolveShared,o,r)}catch(e){throw new Error("Cannot load Tivio Resolver "+e)}if("function"!=typeof(null===(n=o.exports.tivio)||void 0===n?void 0:n.fetch))throw new Error("Invalid Tivio Resolver export");return o.exports.tivio.fetch(e.secret,e.sdkVersion)}))]}))}))},t.createRemotePackageLoader=function(){return function(e){return function(e){return r(void 0,void 0,void 0,(function(){var n;return o(this,(function(a){switch(a.label){case 0:return n="",(0,i.isIndexedDbSupported)()?[3,2]:[4,(s=e.secret,r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return c.info("Fetching bundle via cloudfn, because indexedDB is not supported"),[4,fetch("production"==="MISSING_ENV_VAR".ENV?"https://europe-west3-tivio-production.cloudfunctions.net/getRemoteBundle":"https://europe-west3-tivio-dev.cloudfunctions.net/getRemoteBundle",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret:s})})];case 1:return[4,t.sent().json()];case 2:return e=t.sent(),[2,(n=e.bundleUrl,r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return c.info("Fetching bundle by url",n),[4,fetch(n)];case 1:if(!((r=(e=t.sent()).status)>=200&&r<=400))throw new Error("Failed to fetch bundleUrlOverride "+n+", HTTP error status code: "+e.status);return[4,e.text()];case 2:return[2,t.sent()]}var r}))})))]}var n}))})))];case 1:return n=a.sent(),[3,4];case 2:return[4,(0,t.fetchBundleViaResolver)(e)];case 3:n=a.sent(),a.label=4;case 4:return[2,n]}var s}))}))}(e).then((function(e){var t={},n={exports:t};try{new Function("require","module","exports",e)(s.resolveShared,n,t)}catch(e){throw new Error("Cannot load module "+e)}if("object"!=typeof n.exports.Tivio)throw new Error('Tivio package does not export "Tivio" namespace');if("function"!=typeof n.exports.Tivio.setUser)throw new Error('Tivio namespace does not export "setUser" member');if("function"!=typeof n.exports.Tivio.init)throw new Error('Tivio namespace does not export "init" member');return n.exports.Tivio}))}},t.createTivio=function(){var e=(0,t.createRemotePackageLoader)(),n=!1;return function(t){return r(void 0,void 0,void 0,(function(){var i,s;return o(this,(function(c){return i=(0,a.createInternalConf)(t),s=(0,u.createSettings)(i),[2,e(i).then((function(e){return r(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return n?[3,2]:[4,e.init(i)];case 1:t.sent(),n=!0,t.label=2;case 2:return s.onSetUser(e.setUser),[2,{state:"ready",error:null,settings:s,conf:i,AdSource:e.AdSource,ChannelSource:e.ChannelSource,VodTivioSource:e.VodTivioSource,getChannelById:e.getChannelById,getPlayer:e.getPlayer,getSectionById:e.getSectionById,getVideoById:e.getVideoById,getWidgetById:e.getWidgetById,setLanguage:e.setLanguage,setUser:e.setUser,subscribeToWidget:e.subscribeToWidget,subscribeToChannel:e.subscribeToChannel,subscribeToSection:e.subscribeToSection,subscribeToVideo:e.subscribeToVideo,subscribeToVideosInSection:e.subscribeToVideosInSection,subscribeToSectionsInChannel:e.subscribeToSectionsInChannel,subscribeToChannelsInWidget:e.subscribeToChannelsInWidget,subscribeToScreen:e.subscribeToScreen,subscribeToItemsInRow:e.subscribeToItemsInRow,createUserWithEmailAndPassword:e.createUserWithEmailAndPassword,signInWithEmailAndPassword:e.signInWithEmailAndPassword,createPlayerWrapper:e.createPlayerWrapper}]}}))}))})).catch((function(e){var t;return null===(t=i.logger)||void 0===t||t.exception(e),{state:"error",error:""+e,conf:i,settings:s}}))]}))}))}}},229:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveShared=void 0;var s=a(n(937));n(703),n(462);var u=i(n(259)),c=i(n(970)),l={mobx:u,firebase:s.default,"firebase/app":s.default,"firebase/auth":null,"firebase/firestore":null,timers:c};t.resolveShared=function(e){if(!(e in l))throw new Error("Could not resolve shared dependency "+e);return l[e]}},782:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=void 0;var a=i(n(356));t.createLogger=function(e){var t=!1!==e.isSentryEnabled&&!0;t&&(a.init({dsn:"https://f318b29129f84c459ea756907bc1a2e6@o507550.ingest.sentry.io/5600272",release:"@tivio/sdk-js@1.1.0-alpha",tracesSampleRate:1}),window.sentry=a),console.info("Sentry "+(t?"on":"off"));var n=function(n,r){e.isConsoleEnabled&&console[n]("Tivio sdk-js "+r.join(" ")),t&&a.captureMessage(""+r,a.Severity.fromString(n))};return{error:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("error",e)},info:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("info",e)},warn:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("warn",e)},debug:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("debug",e)},exception:function(n){e.isConsoleEnabled&&console.error(n),t&&a.captureException(n)}}}},373:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchPackage=void 0;var o={cache:"no-store"},i=function(e){var t=e.headers.get("content-type");return 200!==e.status?Promise.reject('Incorrect status "'+e.status+'" was obtained while fetching the module.'):t&&(t.includes("application/javascript")||t.includes("text/javascript"))?e.text():Promise.reject('Incorrect content "'+t+'" was obtained while fetching the module.')},a=function(e){return Promise.reject("Network failure: "+e)};t.fetchPackage=function(e){return n(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,fetch(e,o).then(i).catch(a)]}))}))}},614:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSettings=void 0,t.createSettings=function(e){var t=null,n=null;return{onSetUser:function(r){var o;"function"!=typeof r?null===(o=e.logger)||void 0===o||o.exception("Tivio Bundle setUser handler must be a function"):(t=r,null!==n&&r(n.userId,n.userPayload))},setUser:function(e,r){"function"==typeof t?(n=null,t(e,r)):n={userId:e,userPayload:r}}}}},173:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},356:function(t){"use strict";t.exports=e},937:function(e){"use strict";e.exports=t},703:function(e){"use strict";e.exports=n},462:function(e){"use strict";e.exports=r},259:function(e){"use strict";e.exports=o},970:function(){}},a={},function e(t){var n=a[t];if(void 0!==n)return n.exports;var r=a[t]={exports:{}};return i[t].call(r.exports,r,r.exports,e),r.exports}(920);var i,a}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@sentry/browser"),require("firebase/app"),require("firebase/auth"),require("firebase/firestore"),require("mobx")):"function"==typeof define&&define.amd?define("@tivio/sdk-js",["@sentry/browser","firebase/app","firebase/auth","firebase/firestore","mobx"],t):"object"==typeof exports?exports["@tivio/sdk-js"]=t(require("@sentry/browser"),require("firebase/app"),require("firebase/auth"),require("firebase/firestore"),require("mobx")):e["@tivio/sdk-js"]=t(e["@sentry/browser"],e["firebase/app"],e["firebase/auth"],e["firebase/firestore"],e.mobx)}(this,(function(e,t,n,r,o){return i={194:function(e,t,n){var r,o;e.exports=(r=n(259),o=n(784),function(){var e={2096:function(e){"use strict";function t(e,t){for(var n=e.toString();n.length<t;)n="0"+n;return n}function n(e){return t(e,2)}function r(r,o){"string"!=typeof r&&(o=r,r=e.exports.ISO8601_FORMAT),o||(o=e.exports.now());var i,a,s,u,c=n(o.getDate()),l=n(o.getMonth()+1),f=n(o.getFullYear()),d=n(f.substring(2,4)),p=r.indexOf("yyyy")>-1?f:d,g=n(o.getHours()),h=n(o.getMinutes()),v=n(o.getSeconds()),y=t(o.getMilliseconds(),3),b=(i=o.getTimezoneOffset(),a=Math.abs(i),s=String(Math.floor(a/60)),u=String(a%60),1===s.length&&(s="0"+s),1===u.length&&(u="0"+u),i<0?"+"+s+u:"-"+s+u);return r.replace(/dd/g,c).replace(/MM/g,l).replace(/y{1,4}/g,p).replace(/hh/g,g).replace(/mm/g,h).replace(/ss/g,v).replace(/SSS/g,y).replace(/O/g,b)}function o(e,t,n,r){e["set"+(r?"":"UTC")+t](n)}e.exports=r,e.exports.asString=r,e.exports.parse=function(t,n,r){if(!t)throw new Error("pattern must be supplied");return function(t,n,r){var i=t.indexOf("O")<0,a=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(e,t){o(e,"FullYear",t,i)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Month",t-1,i)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Date",t,i)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(e,t){o(e,"Hours",t,i)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(e,t){o(e,"Minutes",t,i)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(e,t){o(e,"Seconds",t,i)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(e,t){o(e,"Milliseconds",t,i)}},{pattern:/O/,regexp:"[+-]\\d{3,4}|Z",fn:function(e,t){"Z"===t&&(t=0);var n=Math.abs(t),r=(t>0?-1:1)*(n%100+60*Math.floor(n/100));e.setUTCMinutes(e.getUTCMinutes()+r)}}],s=a.reduce((function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,"("+t.regexp+")")):t.index=-1,e}),{regexp:t,index:[]}),u=a.filter((function(e){return e.index>-1}));u.sort((function(e,t){return e.index-t.index}));var c=new RegExp(s.regexp).exec(n);if(c){var l=r||e.exports.now();return u.forEach((function(e,t){e.fn(l,c[t+1])})),l}throw new Error("String '"+n+"' could not be parsed as '"+t+"'")}(t,n,r)},e.exports.now=function(){return new Date},e.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS",e.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO",e.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS",e.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"},187:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.gtag=t.install=void 0,t.install=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="ga-gtag";if(!document.getElementById(r)){var o=document.head,i=document.createElement("script");i.id=r,i.type="text/javascript",i.async=!0,i.src="https://www.googletagmanager.com/gtag/js?id=".concat(e),o.insertBefore(i,o.firstChild),window.dataLayer=window.dataLayer||[],n("js",new Date),n("config",e,t)}};var n=function(){window.dataLayer.push(arguments)};t.gtag=n;var r=n;t.default=r},421:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){o(e,t,n[t])}))}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(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}}),t&&d(e,t)}n.r(t),n.d(t,{default:function(){return z}});var g={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},h=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.init(t,n)}return u(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||g,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,i({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}(),v=new h,y=function(){function e(){a(this,e),this.observers={}}return u(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function b(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function m(e){return null==e?"":""+e}function O(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function _(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function P(e,t,n){var r=_(e,t,Object);r.obj[r.k]=n}function S(e,t){var n=_(e,t),r=n.obj,o=n.k;if(r)return r[o]}function E(e,t,n){var r=S(e,n);return void 0!==r?r:S(t,n)}function w(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):w(e[r],t[r],n):e[r]=t[r]);return e}function j(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function T(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var L="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,k=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return a(this,t),n=l(this,f(t).call(this)),L&&y.call(c(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return p(t,e),u(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),S(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),P(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var u=S(this.data,s)||{};r?w(u,n,o):u=i({},u,n),P(this.data,s,u),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?i({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(y),C={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},I={},M=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,t),n=l(this,f(t).call(this)),L&&y.call(c(n)),O(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,c(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=v.create("translator"),n}return p(t,e),u(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,o){var a=this;if("object"!==r(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var s=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,u=this.extractFromKey(e[e.length-1],n),c=u.key,l=u.namespaces,f=l[l.length-1],d=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(p){var g=n.nsSeparator||this.options.nsSeparator;return f+g+c}return c}var h=this.resolve(e,n),v=h&&h.res,y=h&&h.usedKey||c,b=h&&h.exactUsedKey||c,m=Object.prototype.toString.apply(v),O=["[object Number]","[object Function]","[object RegExp]"],_=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,P=!this.i18nFormat||this.i18nFormat.handleAsObject;if(P&&v&&"string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v&&O.indexOf(m)<0&&("string"!=typeof _||"[object Array]"!==m)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,v,n):"key '".concat(c," (").concat(this.language,")' returned an object instead of string.");if(s){var S="[object Array]"===m,E=S?[]:{},w=S?b:y;for(var j in v)if(Object.prototype.hasOwnProperty.call(v,j)){var x="".concat(w).concat(s).concat(j);E[j]=this.translate(x,i({},n,{joinArrays:!1,ns:l})),E[j]===x&&(E[j]=v[j])}v=E}}else if(P&&"string"==typeof _&&"[object Array]"===m)(v=v.join(_))&&(v=this.extendTranslation(v,e,n,o));else{var T=!1,L=!1,k=void 0!==n.count&&"string"!=typeof n.count,C=t.hasDefaultValue(n),I=k?this.pluralResolver.getSuffix(d,n.count):"",M=n["defaultValue".concat(I)]||n.defaultValue;!this.isValidLookup(v)&&C&&(T=!0,v=M),this.isValidLookup(v)||(L=!0,v=c);var R=C&&M!==v&&this.options.updateMissing;if(L||T||R){if(this.logger.log(R?"updateKey":"missingKey",d,f,c,R?M:v),s){var A=this.resolve(c,i({},n,{keySeparator:!1}));A&&A.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var N=[],D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&D&&D[0])for(var B=0;B<D.length;B++)N.push(D[B]);else"all"===this.options.saveMissingTo?N=this.languageUtils.toResolveHierarchy(n.lng||this.language):N.push(n.lng||this.language);var F=function(e,t,r){a.options.missingKeyHandler?a.options.missingKeyHandler(e,f,t,R?r:v,R,n):a.backendConnector&&a.backendConnector.saveMissing&&a.backendConnector.saveMissing(e,f,t,R?r:v,R,n),a.emit("missingKey",e,f,t,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?N.forEach((function(e){a.pluralResolver.getSuffixes(e).forEach((function(t){F([e],c+t,n["defaultValue".concat(t)]||M)}))})):F(N,c,M))}v=this.extendTranslation(v,e,n,h,o),L&&v===c&&this.options.appendNamespaceToMissingKey&&(v="".concat(f,":").concat(c)),L&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(v))}return v}},{key:"extendTranslation",value:function(e,t,n,r,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(i({},n,{interpolation:i({},this.options.interpolation,n.interpolation)}));var s,u=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(u){var c=e.match(this.interpolator.nestingRegexp);s=c&&c.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=i({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),u){var f=e.match(this.interpolator.nestingRegexp);s<(f&&f.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):a.translate.apply(a,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,p="string"==typeof d?[d]:d;return null!=e&&p&&p.length&&!1!==n.applyPostProcessor&&(e=C.handle(p,e,t,this.options&&this.options.postProcessPassResolved?i({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),c=u.key;n=c;var l=u.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!I["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(I["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,l=c,p=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(p,c,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&d&&p.push(l+i),d&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=i));u=p.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),t}(y);function R(e){return e.charAt(0).toUpperCase()+e.slice(1)}var A=function(){function e(t){a(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=v.create("languageUtils")}return u(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=R(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=R(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=R(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],D={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function B(){var e={};return N.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:D[t.fc]}}))})),e}var F=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this.languageUtils=t,this.options=n,this.logger=v.create("pluralResolver"),this.rules=B()}return u(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.logger=v.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return u(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:T,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?j(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?j(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?j(t.nestingPrefix):t.nestingPrefixEscaped||j("$t("),this.nestingSuffix=t.nestingSuffix?j(t.nestingSuffix):t.nestingSuffixEscaped||j(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=E(t,u,e);return s.alwaysFormat?s.format(o,void 0,n):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(E(t,u,a),c,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(d){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=m(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=i({},a);function u(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,s)).replace(/'/g,'"');try{s=JSON.parse(o),t&&(s=i({},t,s))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete s.defaultValue,e}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(e);){var c=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var f=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=f.shift(),c=f,l=!0}if((r=t(u.call(this,n[1].trim(),s),s))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=m(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=c.reduce((function(e,t){return o.format(e,t,a.lng,a)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),U=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return a(this,t),o=l(this,f(t).call(this)),L&&y.call(c(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=v.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return p(t,e),u(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,u,c,l;r=n.loaded,s=i,(c=(u=_(r,[o],Object)).obj)[l=u.k]=c[l]||[],c[l].push(s),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,i({},a,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(y);function H(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===r(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===r(e[2])||"object"===r(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function W(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function K(){}var G=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(a(this,t),e=l(this,f(t).call(this)),L&&y.call(c(e)),e.options=W(n),e.services={},e.logger=v,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),l(e,c(e));setTimeout((function(){e.init(n,r)}),0)}return e}return p(t,e),u(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=i({},H(),this.options,W(t)),this.format=this.options.interpolation.format,n||(n=K),!this.options.isClone){this.modules.logger?v.init(r(this.modules.logger),this.options):v.init(null,this.options);var o=new A(this.options);this.store=new k(this.options.resources,this.options);var a=this.services;a.logger=v,a.resourceStore=this.store,a.languageUtils=o,a.pluralResolver=new F(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),a.interpolator=new V(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new U(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new M(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.length>0&&"dev"!==s[0]&&(this.options.lng=s[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var u=b(),c=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=b();return e||(e=this.languages),t||(t=this.options.ns),n||(n=K),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&C.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=b();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,o=function e(t,o){var a;if("object"!==r(o)){for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];a=n.options.overloadTranslationOptionHandler([t,o].concat(u))}else a=i({},o);return a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,n.t(t,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=b();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=b();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:K,o=i({},this.options,n,{isClone:!0}),a=new t(o);return["store","services","language"].forEach((function(t){a[t]=e[t]})),a.services=i({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new M(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.emit.apply(a,[e].concat(n))})),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}}]),t}(y),z=new G},6160:function(e,t,n){e=n.nmd(e);var r,o,i,a="[object Map]",s="[object Promise]",u="[object Set]",c="[object WeakMap]",l="[object DataView]",f=/^\[object .+?Constructor\]$/,d="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,p="object"==typeof self&&self&&self.Object===Object&&self,g=d||p||Function("return this")(),h=t&&!t.nodeType&&t,v=h&&e&&!e.nodeType&&e,y=v&&v.exports===h,b=Function.prototype,m=Object.prototype,O=g["__core-js_shared__"],_=(r=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",P=b.toString,S=m.hasOwnProperty,E=m.toString,w=RegExp("^"+P.call(S).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=y?g.Buffer:void 0,x=m.propertyIsEnumerable,T=j?j.isBuffer:void 0,L=(o=Object.keys,i=Object,function(e){return o(i(e))}),k=U(g,"DataView"),C=U(g,"Map"),I=U(g,"Promise"),M=U(g,"Set"),R=U(g,"WeakMap"),A=!x.call({valueOf:1},"valueOf"),N=W(k),D=W(C),B=W(I),F=W(M),V=W(R);function U(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){if(!q(e)||function(e){return!!_&&_ in e}(e))return!1;var t=Y(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?w:f;return t.test(W(e))}(n)?n:void 0}var H=function(e){return E.call(e)};function W(e){if(null!=e){try{return P.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(k&&H(new k(new ArrayBuffer(1)))!=l||C&&H(new C)!=a||I&&H(I.resolve())!=s||M&&H(new M)!=u||R&&H(new R)!=c)&&(H=function(e){var t=E.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?W(n):void 0;if(r)switch(r){case N:return l;case D:return a;case B:return s;case F:return u;case V:return c}return t});var K=Array.isArray;function G(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}(e.length)&&!Y(e)}var z=T||function(){return!1};function Y(e){var t=q(e)?E.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function q(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=function(e){if(G(e)&&(K(e)||"string"==typeof e||"function"==typeof e.splice||z(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&G(e)}(e)&&S.call(e,"callee")&&(!x.call(e,"callee")||"[object Arguments]"==E.call(e))}(e)))return!e.length;var t=H(e);if(t==a||t==u)return!e.size;if(A||function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||m)}(e))return!L(e).length;for(var n in e)if(S.call(e,n))return!1;return!0}},3099:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return i(t,e),t},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentManagementHeaderScriptDebug=t.ConsentManagementHeaderScript=t.appendCmpScriptToHeadOnce=t.ConsentManagementHelmet=t.ConsentSettings=void 0;var u=a(n(8156)),c=new(n(6797).Logger)("ConsentSettings"),l="tivio-cmp-script",f="//assets.adobedtm.com/e949270ea86e/06f76135b050/launch-facbe9b48c75.min.js",d=l,p="//cookie-cdn.cookiepro.com/scripttemplates/otSDKStub.js",g=l,h="UTF-8",v="text/javascript";t.ConsentSettings=function(e){var n=e.as,o=s(e,["as"]),i=(0,u.useRef)(null);return u.default.createElement(u.default.Fragment,null,u.default.createElement(t.ConsentManagementHelmet,null),u.default.createElement("button",{id:"ot-sdk-btn",className:"ot-sdk-show-settings",ref:i,style:{display:"none"}}),u.default.createElement(n,r({onClick:function(){var e;return null===(e=null==i?void 0:i.current)||void 0===e?void 0:e.click()}},o)))},t.ConsentManagementHelmet=function(){return(0,t.appendCmpScriptToHeadOnce)(),null},t.appendCmpScriptToHeadOnce=function(){if(!document.getElementById(l)){var e="localhost"===window.location.hostname;c.info("Injecting "+(e&&"DEBUG")+" CMP script to <head/>..."),e?b():y()}};var y=function(){var e=document.createElement("script");e.id=d,e.src=f,e.async=!0,document.head.appendChild(e)},b=function(){var e=document.createElement("script");e.id=g,e.src=p,e.type=v,e.charset=h,e.dataset.domainScript="a13ec48d-2cc6-47c5-b419-b0fbfae8ca5a",e.async=!0;var t=document.createElement("script");t.id="tivio-cmp-script-2",t.type="text/javascript",t.text="function OptanonWrapper() { }",document.head.appendChild(e),document.head.appendChild(t)};t.ConsentManagementHeaderScript=function(){return u.default.createElement("script",{id:d,src:f,async:!0})},t.ConsentManagementHeaderScriptDebug=function(){return u.default.createElement(u.default.Fragment,null,u.default.createElement("script",{id:g,src:p,type:v,charSet:h,"data-domain-script":"a13ec48d-2cc6-47c5-b419-b0fbfae8ca5a",async:!0}),u.default.createElement("script",{type:"text/javascript"},"function OptanonWrapper() "))}},9281:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3099),t)},7723:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3902),t)},3902:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.VAST_PROVIDERS=t.VastProvider=void 0,function(e){e.ETARGET_PREBID="etarget-prebid",e.MALL_TV_PREBID="malltv-prebid",e.IMPRESSION_MEDIA_PREBID="impressionMedia-prebid",e.MALL_TV="malltv",e.FALLBACK_MP4="fallback",e.FALLBACK_HLS="fallback-hls",e.JOJ="joj",e.PRIMA="prima"}(n=t.VastProvider||(t.VastProvider={})),t.VAST_PROVIDERS=[{id:n.ETARGET_PREBID,name:"Etarget Prebid"},{id:n.MALL_TV_PREBID,name:"MALL.TV Prebid"},{id:n.IMPRESSION_MEDIA_PREBID,name:"Impression Media Prebid"},{id:n.MALL_TV,name:"MALL.TV"},{id:n.JOJ,name:"JOJ"},{id:n.PRIMA,name:"Prima"},{id:n.FALLBACK_MP4,name:"Fallback (MP4)",development:!0},{id:n.FALLBACK_HLS,name:"Fallback (HLS)",development:!0}]},2509:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2951),t)},2951:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firestoreJavascriptFilters=t.firestoreArrayFilters=t.firestoreObjectFilters=void 0;var r=n(543);t.firestoreObjectFilters={isTranscoded:{field:"transcodingStatus",operator:"==",value:r.TRANSCODING_STATUS.DONE},isPublished:{field:"publishedStatus",operator:"==",value:r.PUBLISHED_STATUS.PUBLISHED}},t.firestoreArrayFilters={isTranscoded:Object.values(t.firestoreObjectFilters.isTranscoded),isPublished:Object.values(t.firestoreObjectFilters.isPublished)},t.firestoreJavascriptFilters={isTranscoded:function(e){return e===r.TRANSCODING_STATUS.DONE},isPublished:function(e){return e===r.PUBLISHED_STATUS.PUBLISHED}}},7515:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(3556),t),o(n(6557),t),o(n(1321),t),o(n(3370),t)},3556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useBottomListener=void 0;var r=n(8156);t.useBottomListener=function(e){var t=e.onBottom,n=e.onCloseToBottom,o=e.closeThreshold,i=void 0===o?400:o,a=(0,r.useState)(!1),s=a[0],u=a[1],c=(0,r.useState)(!1),l=c[0],f=c[1],d=(0,r.useCallback)((function(){var e=("innerHeight"in window?window.innerHeight:document.documentElement.offsetHeight)+window.pageYOffset,t=document.body,n=document.documentElement,r=Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight);u(e>=r),f(e+i>=r)}),[s,u]);return(0,r.useEffect)((function(){return window.addEventListener("scroll",d),function(){window.removeEventListener("scroll",d)}}),[]),(0,r.useEffect)((function(){l&&(null==n||n())}),[l]),(0,r.useEffect)((function(){s&&(null==t||t())}),[s]),{isBottom:s,isCloseToBottom:l}}},1321:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useImageLoader=void 0;var r=n(8156);t.useImageLoader=function(e,t){var n=(0,r.useState)(e),o=n[0],i=n[1],a=(0,r.useState)(!1),s=a[0],u=a[1];return(0,r.useEffect)((function(){if(t){var e=new Image;e.src=t,e.onload=function(){i(t),u(!0)}}}),[t]),{loadedImageSrc:o,imageIsLoaded:s}}},6557:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLoading=void 0;var r=n(8156);t.useLoading=function(e){void 0===e&&(e=!1);var t=(0,r.useState)(e),n=t[0],o=t[1],i=(0,r.useRef)(n),a=function(e){o(e),i.current=e};return{loading:n,startLoading:function(){i.current||a(!0)},stopLoading:function(){i.current&&a(!1)}}}},3370:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useOnChange=t.usePrevious=void 0;var r=n(8156);function o(e){var t,n=(0,r.useState)([]),o=n[0],i=n[1];return(0,r.useEffect)((function(){i(o.concat(e).slice(-2))}),[e]),null!==(t=o[o.length-2])&&void 0!==t?t:null}t.usePrevious=o,t.useOnChange=function(e,t){var n=o(e);n!==e&&t(n,e)}},3895:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguagePicker=void 0;var a=i(n(8156)),s=n(6915);t.LanguagePicker=function(){var e=(0,s.useLanguageOptions)(),t=e.language,n=e.languages,r=e.selectLanguage,o=(0,a.useCallback)((function(e){r(e.target.value)}),[r]);return a.default.createElement("select",{name:"tivio-language-select","data-e2e":"tivio-language-select",value:t,onChange:o},n.map((function(e){return a.default.createElement("option",{key:e,value:e},e)})))}},6915:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.useLanguage=t.useLanguageOptions=t.useT=t.useI18n=void 0;var o=n(8156),i=n(6255),a=n(6009),s=n(5318);t.useI18n=function(){return(0,o.useContext)(a.I18nContext).i18n},t.useT=function(){var e=(0,t.useI18n)();return e?e.t.bind(e):function(e){return e}},t.useLanguageOptions=function(){var e=(0,o.useContext)(s.LanguageContext);return r(r({},e),{languages:i.languages})},t.useLanguage=function(){return(0,o.useContext)(s.LanguageContext).language}},6009:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.I18nContextProvider=t.I18nContext=void 0;var s=a(n(421)),u=i(n(8156)),c=n(6797),l=n(5318),f=new c.Logger("language");t.I18nContext=(0,u.createContext)({i18n:null}),t.I18nContextProvider=function(e){var n=e.children,r=e.translations,o=(0,u.useState)({i18n:null}),i=o[0],a=o[1],c=(0,u.useContext)(l.LanguageContext).language;return(0,u.useLayoutEffect)((function(){f.info("initializing language",c),function(e,t){return new Promise((function(n,r){n(s.default.createInstance({lng:t,resources:e},(function(e){e&&r(e)})))}))}(r,c).then((function(e){a({i18n:e})}))}),[]),(0,u.useLayoutEffect)((function(){i.i18n&&(f.info("changing language",c),i.i18n.changeLanguage(c),a({i18n:i.i18n}))}),[c]),u.default.createElement(t.I18nContext.Provider,{value:i},n)}},4045:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(6915),t),o(n(6009),t),o(n(5318),t),o(n(8133),t),o(n(3895),t)},5318:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageContextProvider=t.LanguageContext=void 0;var a=i(n(8156)),s=n(6255),u=n(6797),c=n(8683),l=new u.Logger("language");t.LanguageContext=(0,a.createContext)({language:s.Language.EN,selectLanguage:function(){}}),t.LanguageContextProvider=function(e){var n=e.language,r=e.children,o=(0,a.useState)((0,c.normalizeLanguage)(n)),i=o[0],s=o[1];(0,a.useLayoutEffect)((function(){var e=(0,c.normalizeLanguage)(n);s(e),l.info("Setting language (passed as prop): "+e+" (before normalization: "+n+")")}),[n]);var u=(0,a.useCallback)((function(e){l.info("Setting language: "+e),s(e)}),[]);return a.default.createElement(t.LanguageContext.Provider,{value:{language:i,selectLanguage:u}},r)}},8133:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8683:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLanguage=void 0;var r=n(6255),o=new(n(6797).Logger)("i18n");t.normalizeLanguage=function(e){if(null==e)return r.Language.EN;var t=e.toLocaleLowerCase();return"cs"===t||"cz"===t||"cze"===t||"ces"===t?r.Language.CS:"sk"===t||"slk"===t||"slo"===t?r.Language.SK:("en"===t||"eng"===t||o.warn("Unrecognized language (input: "+e+"). Falling back to ENG"),r.Language.EN)}},1920:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.VAST_PROVIDERS=t.VastProvider=t.LanguagePicker=t.useLanguageOptions=t.I18nContextProvider=t.LanguageContextProvider=t.useT=t.firestoreObjectFilters=t.firestoreJavascriptFilters=t.firestoreArrayFilters=t.random=t.isIndexedDbSupported=t.isCookiesEnabled=t.isBrowser=t.onceAsync=t.once=t.executeAsNewEventLoopJob=t.removeAccents=t.normalizeText=t.formatCurrency=t.formatEpisode=t.toTwoPlaces=t.preloadImages=t.preloadImage=t.Cache=t.twoPlaces=t.parseCzechDate=t.getQueryByWhereFilters=t.getQueryByFilter=t.isInThePast=t.getSecs=t.getRelativeTime=t.getMinsSecsHours=t.getMinsSecs=t.getMins=t.getHours=t.getDuration=t.addSeconds=t.addMs=t.addMinutes=t.addHours=t.addDays=t.Analytics=t.createLogger=t.Logger=t.replaceWithoutOverwritingValues=t.notEmptyFilter=t.chunkArray=t.Pagination=t.RefsPagination=void 0;var i=n(1645),a=n(4291);Object.defineProperty(t,"RefsPagination",{enumerable:!0,get:function(){return a.RefsPagination}}),Object.defineProperty(t,"Pagination",{enumerable:!0,get:function(){return a.Pagination}}),o(n(7515),t);var s=n(6797);Object.defineProperty(t,"chunkArray",{enumerable:!0,get:function(){return s.chunkArray}}),Object.defineProperty(t,"notEmptyFilter",{enumerable:!0,get:function(){return s.notEmptyFilter}}),Object.defineProperty(t,"replaceWithoutOverwritingValues",{enumerable:!0,get:function(){return s.replaceWithoutOverwritingValues}}),Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return s.Logger}}),Object.defineProperty(t,"createLogger",{enumerable:!0,get:function(){return s.createLogger}}),Object.defineProperty(t,"Analytics",{enumerable:!0,get:function(){return s.Analytics}}),Object.defineProperty(t,"addDays",{enumerable:!0,get:function(){return s.addDays}}),Object.defineProperty(t,"addHours",{enumerable:!0,get:function(){return s.addHours}}),Object.defineProperty(t,"addMinutes",{enumerable:!0,get:function(){return s.addMinutes}}),Object.defineProperty(t,"addMs",{enumerable:!0,get:function(){return s.addMs}}),Object.defineProperty(t,"addSeconds",{enumerable:!0,get:function(){return s.addSeconds}}),Object.defineProperty(t,"getDuration",{enumerable:!0,get:function(){return s.getDuration}}),Object.defineProperty(t,"getHours",{enumerable:!0,get:function(){return s.getHours}}),Object.defineProperty(t,"getMins",{enumerable:!0,get:function(){return s.getMins}}),Object.defineProperty(t,"getMinsSecs",{enumerable:!0,get:function(){return s.getMinsSecs}}),Object.defineProperty(t,"getMinsSecsHours",{enumerable:!0,get:function(){return s.getMinsSecsHours}}),Object.defineProperty(t,"getRelativeTime",{enumerable:!0,get:function(){return s.getRelativeTime}}),Object.defineProperty(t,"getSecs",{enumerable:!0,get:function(){return s.getSecs}}),Object.defineProperty(t,"isInThePast",{enumerable:!0,get:function(){return s.isInThePast}}),Object.defineProperty(t,"getQueryByFilter",{enumerable:!0,get:function(){return s.getQueryByFilter}}),Object.defineProperty(t,"getQueryByWhereFilters",{enumerable:!0,get:function(){return s.getQueryByWhereFilters}}),Object.defineProperty(t,"parseCzechDate",{enumerable:!0,get:function(){return s.parseCzechDate}}),Object.defineProperty(t,"twoPlaces",{enumerable:!0,get:function(){return s.twoPlaces}}),Object.defineProperty(t,"Cache",{enumerable:!0,get:function(){return s.Cache}}),Object.defineProperty(t,"preloadImage",{enumerable:!0,get:function(){return s.preloadImage}}),Object.defineProperty(t,"preloadImages",{enumerable:!0,get:function(){return s.preloadImages}}),Object.defineProperty(t,"toTwoPlaces",{enumerable:!0,get:function(){return s.toTwoPlaces}}),Object.defineProperty(t,"formatEpisode",{enumerable:!0,get:function(){return s.formatEpisode}}),Object.defineProperty(t,"formatCurrency",{enumerable:!0,get:function(){return s.formatCurrency}}),Object.defineProperty(t,"normalizeText",{enumerable:!0,get:function(){return s.normalizeText}}),Object.defineProperty(t,"removeAccents",{enumerable:!0,get:function(){return s.removeAccents}}),Object.defineProperty(t,"executeAsNewEventLoopJob",{enumerable:!0,get:function(){return s.executeAsNewEventLoopJob}}),Object.defineProperty(t,"once",{enumerable:!0,get:function(){return s.once}}),Object.defineProperty(t,"onceAsync",{enumerable:!0,get:function(){return s.onceAsync}}),Object.defineProperty(t,"isBrowser",{enumerable:!0,get:function(){return s.isBrowser}}),Object.defineProperty(t,"isCookiesEnabled",{enumerable:!0,get:function(){return s.isCookiesEnabled}}),Object.defineProperty(t,"isIndexedDbSupported",{enumerable:!0,get:function(){return s.isIndexedDbSupported}}),Object.defineProperty(t,"random",{enumerable:!0,get:function(){return s.random}}),o(n(3854),t);var u=n(2509);Object.defineProperty(t,"firestoreArrayFilters",{enumerable:!0,get:function(){return u.firestoreArrayFilters}}),Object.defineProperty(t,"firestoreJavascriptFilters",{enumerable:!0,get:function(){return u.firestoreJavascriptFilters}}),Object.defineProperty(t,"firestoreObjectFilters",{enumerable:!0,get:function(){return u.firestoreObjectFilters}});var c=n(4045);Object.defineProperty(t,"useT",{enumerable:!0,get:function(){return c.useT}}),Object.defineProperty(t,"LanguageContextProvider",{enumerable:!0,get:function(){return c.LanguageContextProvider}}),Object.defineProperty(t,"I18nContextProvider",{enumerable:!0,get:function(){return c.I18nContextProvider}}),Object.defineProperty(t,"useLanguageOptions",{enumerable:!0,get:function(){return c.useLanguageOptions}}),Object.defineProperty(t,"LanguagePicker",{enumerable:!0,get:function(){return c.LanguagePicker}});var l=n(7723);Object.defineProperty(t,"VastProvider",{enumerable:!0,get:function(){return l.VastProvider}}),Object.defineProperty(t,"VAST_PROVIDERS",{enumerable:!0,get:function(){return l.VAST_PROVIDERS}}),o(n(6895),t),o(n(9281),t),(0,i.polyfill)()},3331:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Pagination=void 0;var i=n(259),a=(0,n(6797).createLogger)("Pagination");t.Pagination=function(e,t,n){var s,u,c=this;this.query=e,this.creator=t,this.options=n,this.lastDocumentSnapshot=null,this.items=[],this.hasNextPage=!0,this.loading=!1,this.limit=10,this.fetchMore=function(){c.loading?a.info("loading ..."):c.hasNextPage?(a.info("fetch more"),c.fetchData()):a.info("no more data")},this.fetchData=function(){return r(c,void 0,void 0,(function(){var e,t;return o(this,(function(n){switch(n.label){case 0:a.info("fetch data"),n.label=1;case 1:return n.trys.push([1,3,4,5]),this.startLoading(),[4,this.makeQuery()];case 2:return e=n.sent(),a.info("fetched "+e.size+" docs, going to create entities"),this.items=this.items.concat(this.querySnapshotToEntities(e)),this.lastDocumentSnapshot=this.getLastSnapshotFromQuerySnapshot(e),[3,5];case 3:return t=n.sent(),console.error(t),[3,5];case 4:return this.stopLoading(),[7];case 5:return[2]}}))}))},this.querySnapshotToEntities=function(e){return e.docs.map((function(e){return c.creator(e.ref,e.data())}))},this.makeQuery=function(){return r(c,void 0,void 0,(function(){var e,t;return o(this,(function(n){return e=this.query,(null===(t=this.options)||void 0===t?void 0:t.noLimit)?(a.info("fetch all documents without pagination"),this.hasNextPage=!1):this.lastDocumentSnapshot?(a.info("making query with limit",this.limit),e=e.limit(this.limit).startAfter(this.lastDocumentSnapshot)):(a.info("making first query with limit",this.limit),e=e.limit(this.limit)),[2,e.get()]}))}))},this.getLastSnapshotFromQuerySnapshot=function(e){var t=e.size;return c.hasNextPage=!e.empty&&e.size==c.limit,t>0?e.docs[t-1]:null},this.startLoading=function(){c.loading=!0},this.stopLoading=function(){c.loading=!1},this.addItemToEnd=function(e){c.hasNextPage?a.info("ignoring of adding an item to pagination locally because not all items are loaded"):(a.info("add item to end"),c.items=c.items.concat([e]))},this.addItemToStart=function(e){a.info("add item to start"),c.items=[e].concat(c.items)},(0,i.makeObservable)(this,{items:i.observable}),this.limit=null!==(u=null===(s=this.options)||void 0===s?void 0:s.limit)&&void 0!==u?u:this.limit,this.fetchData()}},4291:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2523),t),o(n(3331),t)},2523:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.RefsPagination=void 0;var i=n(259),a=n(6797),s=(0,a.createLogger)("RefsPagination"),u=function(){function e(e,t,n,u,c){var l=this;if(void 0===n&&(n=!0),void 0===u&&(u=10),void 0===c&&(c=!0),this.refs=e,this.creator=t,this.initialized=n,this.limit=u,this.items=[],this.currentItems=[],this.currentPage=0,this.hasNextPage=!0,this.loading=!1,this.error=null,this.fetchMore=function(){return r(l,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return this.isLoading?[2]:(this.currentPage++,[4,this.fetchData()]);case 1:return e.sent(),[2]}}))}))},this.fetchData=function(){return r(l,void 0,void 0,(function(){var e,t,n,i,u,c,l=this;return o(this,(function(f){switch(f.label){case 0:if(this.isLoading||!this.hasNextPage)return[2];f.label=1;case 1:return f.trys.push([1,4,5,6]),s.info("fetchData"),e=this.currentPage*this.limit,t=e+this.limit,0!==this.items.slice(e,t).length?[3,3]:(n=this.refs.slice(e,t),t>=this.refs.length&&(this.hasNextPage=!1),this.startLoading(),[4,Promise.all(n.map((function(e){return r(l,void 0,void 0,(function(){var t,n;return o(this,(function(r){switch(r.label){case 0:return[4,e.get()];case 1:return t=r.sent(),(n=t.data())?[2,this.creator(e,n)]:[2,null]}}))}))})))]);case 2:return i=f.sent(),u=i.filter(a.notEmptyFilter),s.info("fetched "+u.length+" items of "+n.length+" refs"),this.endLoading(),this.setCurrentItems=u,this.setItems=this.items.concat(u),[3,3];case 3:return[3,6];case 4:return c=f.sent(),s.error(c),this.setError=c,[3,6];case 5:return this.endLoading(),[7];case 6:return[2]}}))}))},this.addItemToStart=function(e,t){l.refs=l.refs.concat([t]),l.getItems.unshift(e)},this.addItem=function(e,t){l.refs.length===l.items.length&&(l.setItems=l.items.concat([e])),l.refs=l.refs.concat([t])},this.getItem=function(e){return r(l,void 0,void 0,(function(){var t,n,r;return o(this,(function(o){switch(o.label){case 0:return(t=this.refs.find((function(t){return t.id===e})))?[4,t.get()]:[3,2];case 1:return n=o.sent(),(r=n.data())?[2,this.creator(n.ref,r)]:[3,3];case 2:throw new Error("ref-not-found");case 3:return[2]}}))}))},this.limit>1e3)throw new Error("Limit cannot be greater than 1000");c&&this.fetchData(),(0,i.makeObservable)(this,{items:i.observable,refs:i.observable,loading:i.observable,error:i.observable,hasNextPage:i.observable})}return e.prototype.startLoading=function(){this.setLoading=!0},e.prototype.endLoading=function(){this.setLoading=!1},Object.defineProperty(e.prototype,"getError",{get:function(){return this.error},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getCurrentItems",{get:function(){return this.currentItems},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getItems",{get:function(){return this.items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getRefs",{get:function(){return this.refs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getHasNextPage",{get:function(){return this.hasNextPage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return this.loading},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getItemsCount",{get:function(){return this.refs.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInitialized",{get:function(){return this.initialized},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setItems",{set:function(e){this.items=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setLoading",{set:function(e){this.loading=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setCurrentItems",{set:function(e){this.currentItems=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setIsInitialized",{set:function(e){this.initialized=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"setError",{set:function(e){this.error=e},enumerable:!1,configurable:!0}),e}();t.RefsPagination=u},1645:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.polyfill=void 0,t.polyfill=function(){"object"==typeof window&&"object"==typeof document&&window.addEventListener("load",(function(){var e=document.createElement("script");e.src="https://polyfill.io/v3/polyfill.min.js?features=String.prototype.normalize",e.id="tivio-polyfill-string-prototype-normalize",document.head.appendChild(e)}))}},3690:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.PLATFORM=t.CUSTOMER_BUILD=void 0,function(e){e.OKTAGON="OKTAGON",e.JOJ="JOJ",e.MALL="MALL",e.GARAZ="GARAZ",e.U_KULATEHO_STOLU="U_KULATEHO_STOLU"}(n||(n={})),t.CUSTOMER_BUILD=n,function(e){e.MOBILE="MOBILE",e.WEB="WEB",e.TV="TV"}(r||(r={})),t.PLATFORM=r},9352:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(8757),t),o(n(3690),t)},8757:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6255:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.languages=t.Language=void 0,function(e){e.CS="cs",e.DE="de",e.EN="en",e.FR="fr",e.PL="pl",e.SK="sk",e.SP="sp"}(n=t.Language||(t.Language={})),t.languages=Object.values(n)},7245:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ASSET_PRESET_PLACEMENTS=t.AssetPresetPlacement=void 0,function(e){e.TV_CHANNEL="tvChannel",e.CHANNEL="channel",e.SECTION="section",e.VIDEO="video",e.TAG="tag"}(n=t.AssetPresetPlacement||(t.AssetPresetPlacement={})),t.ASSET_PRESET_PLACEMENTS=Object.values(n)},5761:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},543:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(7245),t),o(n(5761),t),o(n(1435),t),o(n(2778),t),o(n(8496),t),o(n(5925),t),o(n(2226),t),o(n(1281),t),o(n(7371),t),o(n(800),t),o(n(2062),t),o(n(557),t),o(n(4338),t),o(n(4757),t)},1435:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2778:function(e,t){"use strict";var n,r,o,i;Object.defineProperty(t,"__esModule",{value:!0}),t.AdProfileType=t.OnlineSkippability=t.StreamSkippability=t.MONETIZATION_FREQUENCY=void 0,(i=t.MONETIZATION_FREQUENCY||(t.MONETIZATION_FREQUENCY={})).ONE_TIME_PAYMENT="ONE_TIME_PAYMENT",i.DAILY="DAILY",i.WEEKLY="WEEKLY",i.MONTHLY="MONTHLY",i.ANNUALLY="ANNUALLY",(o=t.StreamSkippability||(t.StreamSkippability={})).SKIPPABLE="SKIPPABLE",o.NOT_SKIPPABLE="NOT_SKIPPABLE",o.AUTO_SKIP="AUTO_SKIP",(r=t.OnlineSkippability||(t.OnlineSkippability={})).SKIPPABLE="SKIPPABLE",r.NOT_SKIPPABLE="NOT_SKIPPABLE",r.VAST_BASED="VAST_BASED",(n=t.AdProfileType||(t.AdProfileType={})).ONLINE="ONLINE",n.STREAM="STREAM"},8496:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4757:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentGateway=t.PurchaseStatus=t.CURRENCIES=void 0,t.CURRENCIES=["CZK","EUR","USD"],(n=t.PurchaseStatus||(t.PurchaseStatus={})).NEW="NEW",n.PAID="PAID",n.CANCELLED="CANCELLED",n.ERROR="ERROR",(t.PaymentGateway||(t.PaymentGateway={})).QERKO="qerko"},557:function(e,t){"use strict";var n,r,o,i,a,s,u,c;Object.defineProperty(t,"__esModule",{value:!0}),t.ORDER_BY_FIELD_PATH=t.WHERE_FILTER_FIELD_PATH=t.WHERE_FILTER_OPERATOR=t.ORDER_BY_DIRECTION=t.ROW_TYPE=t.FILTER_COLLECTION=t.ROW_ITEM_COMPONENT=t.ROW_COMPONENT=void 0,function(e){e.ROW="ROW",e.BANNER="BANNER"}(n||(n={})),t.ROW_COMPONENT=n,function(e){e.ROW_ITEM_PORTRAIT="ROW_ITEM_PORTRAIT",e.ROW_ITEM_LANDSCAPE="ROW_ITEM_LANDSCAPE",e.ROW_ITEM_CIRCLED="ROW_ITEM_CIRCLED"}(r||(r={})),t.ROW_ITEM_COMPONENT=r,function(e){e.VIDEOS="videos",e.TAGS="tags"}(o||(o={})),t.ROW_TYPE=o,function(e){e.DESC="desc",e.ASC="asc"}(i||(i={})),t.ORDER_BY_DIRECTION=i,function(e){e.LESS="<",e.LESS_OR_EQUAL="<=",e.EQUAL="==",e.NOT_EQUAL="!=",e.GREATER_OR_EQUAL=">=",e.GREATER=">",e.ARRAY_CONTAINS="array-contains",e.IN="in",e.ARRAY_CONTAINS_ANY="array-contains-any",e.NOT_IN="not-in"}(a||(a={})),t.WHERE_FILTER_OPERATOR=a,function(e){e.CREATED="created",e.TAGS="tags",e.TAG_TYPE_REF="tagTypeRef"}(s||(s={})),t.WHERE_FILTER_FIELD_PATH=s,function(e){e.VIDEOS="videos",e.TAGS="tags",e.TV_CHANNELS="tvChannels"}(u||(u={})),t.FILTER_COLLECTION=u,function(e){e.CREATED="created"}(c||(c={})),t.ORDER_BY_FIELD_PATH=c},2062:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5925:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4338:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.TagMetadataFieldType=t.TagSimplicityType=void 0,(r=t.TagSimplicityType||(t.TagSimplicityType={})).SIMPLE="SIMPLE",r.COMPOSED="COMPOSED",(n=t.TagMetadataFieldType||(t.TagMetadataFieldType={})).STRING="STRING",n.TRANSLATION="TRANSLATION",n.NUMBER="NUMBER",n.BOOLEAN="BOOLEAN"},2226:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TvStream=void 0,(n=t.TvStream||(t.TvStream={})).STARTOVER="startover",n.TIMESHIFT="timeshift",n.LIVE="live",n.ALL="all"},1281:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7371:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.USER_TYPE=void 0,function(e){e.ORGANIZATION_USER="ORGANIZATION_USER",e.TIVIO_USER="TIVIO_USER"}(n||(n={})),t.USER_TYPE=n},800:function(e,t){"use strict";var n,r,o,i,a,s,u,c;Object.defineProperty(t,"__esModule",{value:!0}),t.NewVideoSourceCodec=t.NewVideoSourceEncrytion=t.NewVideoSourceProtocol=t.ELEMENT_TYPE=t.DATA_SOURCE=t.TRANSCODING_STATUS=t.PUBLISHED_STATUS=t.PlacementType=void 0,function(e){e.DRAFT="DRAFT",e.PUBLISHED="PUBLISHED"}(n||(n={})),t.PUBLISHED_STATUS=n,function(e){e.ON_HOLD="CREATED",e.IN_PROGRESS="ENCODING",e.DONE="ENCODING_DONE",e.ERROR="ERROR"}(r||(r={})),t.TRANSCODING_STATUS=r,function(e){e.MALL_TV="MALL_TV",e.TIVIO_ADMIN="TIVIO_ADMIN",e.EPG_IMPORT="EPG_IMPORT"}(o||(o={})),t.DATA_SOURCE=o,function(e){e.PLAYLIST="PLAYLIST",e.VIDEO="VIDEO",e.TV_PROGRAM="TV_PROGRAM"}(i||(i={})),t.ELEMENT_TYPE=i,(c=t.PlacementType||(t.PlacementType={})).VIDEO="video",c.SECTION="section",c.CHANNEL="channel",c.CONDITION="condition",function(e){e.HLS="hls",e.DASH="dash",e.MP4="mp4"}(a||(a={})),t.NewVideoSourceProtocol=a,function(e){e.NONE="none",e.WIDEVINE="widevine",e.FAIRPLAY="fairplay",e.PLAYREADY="playready"}(s||(s={})),t.NewVideoSourceEncrytion=s,function(e){e.H264="h264",e.H265="h265"}(u||(u={})),t.NewVideoSourceCodec=u},9396:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},786:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5129:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9786:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(9363),t),o(n(2635),t),o(n(786),t),o(n(3910),t),o(n(190),t),o(n(4906),t),o(n(3948),t),o(n(7535),t),o(n(3161),t),o(n(5656),t),o(n(9614),t),o(n(9396),t),o(n(1738),t),o(n(5129),t),o(n(3959),t),o(n(7605),t)},3959:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3910:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1738:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7535:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ROW_ITEM_TYPES=void 0,(n=t.ROW_ITEM_TYPES||(t.ROW_ITEM_TYPES={})).VIDEO="VIDEO",n.TAG="TAG",n.TV_CHANNEL="TV_CHANNEL"},3161:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7605:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ALGOLIA_INDEX_NAME=void 0,(n=t.ALGOLIA_INDEX_NAME||(t.ALGOLIA_INDEX_NAME={})).VIDEOS="videos",n.TAGS="tags",n.TV_CHANNELS="tvChannels"},190:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9614:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5656:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4906:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9363:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3948:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2635:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2010:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6895:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(2010),t),o(n(543),t),o(n(9786),t),o(n(9352),t),o(n(6255),t)},9075:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=void 0;var o=n(187),i=new(n(6222).Logger)("analytics"),a=function(){function e(){this.eventNames=null,this.gaMeasurementId=null}return e.prototype.init=function(e,t){this.gaMeasurementId=e,this.eventNames=t,(0,o.install)(e)},e.prototype.trackAnalytic=function(e,t,n){if(this.isInitialized()){var r=this.eventNames[e];r&&(i.info("Tracking analytic "+e+" under "+r,t,n),this.trackEvent(r,t,n))}else i.warn("Failed to track event, because analytics are not initialized yet",e,t)},e.prototype.isInitialized=function(){return null!=this.eventNames&&null!=this.gaMeasurementId},e.prototype.trackEvent=function(e,t,n){var i=r(r({},null!=t?t:{}),{send_to:this.gaMeasurementId});n?(0,o.gtag)("event",e,i,n):(0,o.gtag)("event",e,i)},e}();t.Analytics=a},4511:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceWithoutOverwritingValues=t.chunkArray=t.notEmptyFilter=void 0,t.notEmptyFilter=function(e){return!!e},t.chunkArray=function(e,t){var n,r=e.length,o=[];for(n=0;n<r;n+=t){var i=e.slice(n,n+t);o.push(i)}return o},t.replaceWithoutOverwritingValues=function(e,t,n){var r=[];return t.forEach((function(t){var o=e.find((function(e){return n(t,e)}));r.push(null!=o?o:t)})),r}},7607:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cache=void 0;var n=function(){function e(e){var t,n;this.enabled=!0,this.map=new Map,this.max=null!==(t=null==e?void 0:e.max)&&void 0!==t?t:1e3,this.convertKey=null!==(n=null==e?void 0:e.convertKey)&&void 0!==n?n:function(e){return e}}return e.prototype.set=function(e,t){this.enabled&&(this.map.size>this.max&&this.map.clear(),this.map.set(this.convertKey(e),t))},e.prototype.get=function(e){var t;return null!==(t=this.map.get(this.convertKey(e)))&&void 0!==t?t:null},e.prototype.has=function(e){return!!this.enabled&&this.map.has(this.convertKey(e))},e.prototype.getSize=function(){return this.map.size},e.prototype.disable=function(){this.enabled=!1},e}();t.Cache=n},3489:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.onceAsync=t.once=void 0,t.once=function(e){var t=!1;return function(){t||(e(),t=!0)}},t.onceAsync=function(e){var t=!1;return function(){return n(void 0,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return t?[3,2]:(t=!0,[4,e()]);case 1:n.sent(),n.label=2;case 2:return[2]}}))}))}}},7500:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.stringComparator=t.booleanComparator=t.numberComparator=t.SortDirection=void 0,function(e){e.ASC="ASC",e.DESC="DESC"}(n=t.SortDirection||(t.SortDirection={})),t.numberComparator=function(e,t,r){return r===n.ASC?e-t:t-e},t.booleanComparator=function(e,t){return e&&t?0:e&&!t?-1:!e&&t?1:0},t.stringComparator=function(e,t){return e<t?-1:1}},3854:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(7500),t),o(n(9153),t),o(n(9924),t)},9153:function(e,t,n){"use strict";var r,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.strategiesComparator=t.expirationComparator=t.placementTypeComparator=t.PLACEMENT_TYPE_PRIORITIES=void 0;var i=n(7500),a=n(6895),s=o(n(6160));t.PLACEMENT_TYPE_PRIORITIES=((r={})[a.PlacementType.VIDEO]=3,r[a.PlacementType.CONDITION]=2,r[a.PlacementType.SECTION]=1,r[a.PlacementType.CHANNEL]=0,r),t.placementTypeComparator=function(e,n,r){return void 0===r&&(r=i.SortDirection.DESC),(0,i.numberComparator)(t.PLACEMENT_TYPE_PRIORITIES[e.placementType],t.PLACEMENT_TYPE_PRIORITIES[n.placementType],r)},t.expirationComparator=function(e,t,n){var r,o;return void 0===n&&(n=i.SortDirection.ASC),(0,i.numberComparator)(null!==(r=e.expirationDaysSincePublished)&&void 0!==r?r:Number.MAX_VALUE,null!==(o=t.expirationDaysSincePublished)&&void 0!==o?o:Number.MAX_VALUE,n)},t.strategiesComparator=function(e,t){return(0,i.numberComparator)((0,s.default)(e.strategies)?0:1,(0,s.default)(t.strategies)?0:1,i.SortDirection.ASC)}},9924:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalsFirstRestAlphabeticallyComparator=t.alphabeticComparator=t.sortAlphabetically=void 0;var r=n(7500);t.sortAlphabetically=function(e){return e.sort((function(e,t){return(0,r.stringComparator)(e.name,t.name)}))},t.alphabeticComparator=function(e,t){return(0,r.stringComparator)(e.name,t.name)},t.globalsFirstRestAlphabeticallyComparator=function(e,t){var n,o;return(0,r.booleanComparator)(null!==(n=e.isGlobal)&&void 0!==n&&n,null!==(o=t.isGlobal)&&void 0!==o&&o)||(0,r.stringComparator)(e.name,t.name)}},3918:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIndexedDbSupported=t.isCookiesEnabled=t.isBrowser=void 0,t.isBrowser=function(){return"object"==typeof window&&"object"==typeof document},t.isCookiesEnabled=function(){if(!(0,t.isBrowser)()||"string"!=typeof document.cookie)return!1;document.cookie="tiviocookietest=1";var e=-1!=document.cookie.indexOf("tiviocookietest=");return document.cookie="tiviocookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e},t.isIndexedDbSupported=function(){return null!=window.indexedDB&&null!=window.IDBCursor&&null!=window.IDBCursorWithValue&&null!=window.IDBDatabase&&null!=window.IDBFactory&&null!=window.IDBIndex&&null!=window.IDBKeyRange&&null!=window.IDBObjectStore&&null!=window.IDBOpenDBRequest&&null!=window.IDBRequest&&null!=window.IDBTransaction&&null!=window.IDBVersionChangeEvent}},711:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeAsNewEventLoopJob=void 0,t.executeAsNewEventLoopJob=function(e){setTimeout(e)}},8399:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatCurrency=t.formatEpisode=t.toTwoPlaces=void 0,t.toTwoPlaces=function(e){return e<10?"0"+e:""+e},t.formatEpisode=function(e,n){return"S"+(0,t.toTwoPlaces)(e)+"E"+(0,t.toTwoPlaces)(n)},t.formatCurrency=function(e){switch(e){case"CZK":return"Kč";case"EUR":return"€";case"USD":return"$"}}},3434:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.preloadImages=t.preloadImage=void 0,t.preloadImage=function(e){return new Promise((function(t,n){var r=new Image;r.src=e,r.onload=t,r.onerror=function(){n("image failed to load (uri:"+e+")")}}))},t.preloadImages=function(e){return Promise.all(e.map(t.preloadImage))}},6797:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4511),t),o(n(9075),t),o(n(6222),t),o(n(8029),t),o(n(7607),t),o(n(3854),t),o(n(6845),t),o(n(3434),t),o(n(8399),t),o(n(2729),t),o(n(711),t),o(n(3489),t),o(n(3918),t),o(n(6971),t)},6222:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=t.Logger=void 0;var r=function(){function e(e){this.name=e,this.isEnabled=!0}return e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["error"],e,!1))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["info"],e,!1))},e.prototype.off=function(){this.isEnabled=!1},e.prototype.on=function(){this.isEnabled=!0},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.log.apply(this,n(["warn"],e,!1))},e.prototype.forceInfo=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];console.info.apply(console,n([e.prefix+":"+this.name],t,!1))},e.prototype.log=function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e.enabled&&this.isEnabled&&console[t].apply(console,n([e.prefix+":"+this.name],r,!1))},e.enabled=!0,e.prefix="tivio",e}();t.Logger=r,t.createLogger=function(e){return new r(e)}},6971:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.random=void 0,t.random=function(e){return Math.round(Math.random()*e)}},6845:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQueryByFilter=t.getQueryByWhereFilters=void 0;var n=function(e,t){return e.reduce((function(e,t){return Array.isArray(t.value)&&0===t.value.length?e:e.where(t.fieldPath,t.opStr,t.value)}),t)};t.getQueryByWhereFilters=n,t.getQueryByFilter=function(e,t){return n(e.where,t).orderBy(e.orderBy.fieldPath,e.orderBy.directionStr)}},2729:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeText=t.toKebabCase=t.toSnakeCase=t.removeAccents=void 0,t.removeAccents=function(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")},t.toSnakeCase=function(e){return e.trim().toLocaleLowerCase().replace(/\s+/g,"_")},t.toKebabCase=function(e){return e.trim().toLocaleLowerCase().replace(/\s+/g,"-")},t.normalizeText=function(e,n){void 0===n&&(n="snake-case");var r=(0,t.removeAccents)(e);return"snake-case"===n?(0,t.toSnakeCase)(r):(0,t.toKebabCase)(r)}},8029:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.getRelativeTime=t.getDuration=t.getMinsSecsHours=t.getMinsSecs=t.twoPlaces=t.getHours=t.getMins=t.getSecs=t.parseCzechDate=t.isInThePast=t.addSeconds=t.addMs=t.addMinutes=t.addHours=t.addDays=void 0;var a=i(n(2096));function s(e,t){return u(e,60*t)}function u(e,t){return l(e,60*t)}function c(e,t){return new Date(e.getTime()+t)}function l(e,t){return c(e,1e3*t)}function f(e,t){var n=null!=e?Math.floor(e/1e3):0;return t?n%60:n}function d(e,t){var n=null!=e?Math.floor(f(e)/60):0;return t?n%60:n}function p(e,t){var n=null!=e?Math.floor(d(e)/60):0;return t?n%24:n}function g(e){return e>=10?e:"0"+e}t.addDays=function(e,t){return s(e,24*t)},t.addHours=s,t.addMinutes=u,t.addMs=c,t.addSeconds=l,t.isInThePast=function(e){return e<new Date},t.parseCzechDate=function(e){var t=a.parse("dd.MM.yyyy hh:mm",e),n=1e3*t.getSeconds()+t.getMilliseconds();return new Date(t.getTime()-n)},t.getSecs=f,t.getMins=d,t.getHours=p,t.twoPlaces=g,t.getMinsSecs=function(e){if(e<0)return{mins:0,secs:0,text:"",textWordy:""};var t=d(e),n=f(e,!0),r="";return n&&(r=n+" s"),t&&(r=t+" min"+(r.length>0?" "+r:"")),{mins:t,secs:n,text:t+":"+g(n),textWordy:r}},t.getMinsSecsHours=function(e){var t=p(e),n=d(e,!0),r=f(e,!0),o=n+":"+g(r);return t>0&&(4===o.length&&(o="0"+o),o=t+":"+o),{hours:t,mins:n,secs:r,text:o}},t.getDuration=function(e){return null==e||e<0?null:Math.round(e/60)+" MIN"},t.getRelativeTime=function(e){if(null==e)return"";var t=((new Date).getTime()-e.getTime())/36e5,n=Math.floor(t);if(n<1)return"";if(n<24)return n+" HOURS AGO";var r=t/24,o=Math.floor(r);if(o<7)return o+" DAYS AGO";var i=r/7,a=Math.floor(i);if(a<5)return a+" WEEKS AGO";var s=r/30,u=Math.floor(s);if(u<12)return u+" MONTHS AGO";var c=r/365;return Math.ceil(c)+" YEARS AGO"}},259:function(e){"use strict";e.exports=r},8156:function(e){"use strict";e.exports=o}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n(1920)}())},320:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,s,u=o(e),c=1;c<arguments.length;c++){for(var l in a=Object(arguments[c]))n.call(a,l)&&(u[l]=a[l]);if(t){s=t(a);for(var f=0;f<s.length;f++)r.call(a,s[f])&&(u[s[f]]=a[s[f]])}}return u}},426:function(e,t,n){"use strict";var r=n(320),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,u=60112;t.Suspense=60113;var c=60115,l=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),s=f("react.context"),u=f("react.forward_ref"),t.Suspense=f("react.suspense"),c=f("react.memo"),l=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function p(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h={};function v(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||g}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(p(85));this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var m=b.prototype=new y;m.constructor=b,r(m,v.prototype),m.isPureReactComponent=!0;var O={current:null},_=Object.prototype.hasOwnProperty,P={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,i={},a=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,r)&&!P.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){for(var c=Array(u),l=0;l<u;l++)c[l]=arguments[l+2];i.children=c}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===i[r]&&(i[r]=u[r]);return{$$typeof:o,type:e,key:a,ref:s,props:i,_owner:O.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var w=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function x(e,t,n,r,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case i:u=!0}}if(u)return a=a(u=e),e=""===r?"."+j(u,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(w,"$&/")+"/"),x(a,t,n,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(w,"$&/")+"/")+e)),t.push(a)),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c<e.length;c++){var l=r+j(s=e[c],c);u+=x(s,t,n,l,a)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),c=0;!(s=e.next()).done;)u+=x(s=s.value,t,n,l=r+j(s,c++),a);else if("object"===s)throw t=""+e,Error(p(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return u}function T(e,t,n){if(null==e)return e;var r=[],o=0;return x(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function L(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var k={current:null};function C(){var e=k.current;if(null===e)throw Error(p(321));return e}var I={ReactCurrentDispatcher:k,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:O,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:T,forEach:function(e,t,n){T(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error(p(143));return e}},t.Component=v,t.PureComponent=b,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.cloneElement=function(e,t,n){if(null==e)throw Error(p(267,e));var i=r({},e.props),a=e.key,s=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,u=O.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)_.call(t,l)&&!P.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){c=Array(l);for(var f=0;f<l;f++)c[f]=arguments[f+2];i.children=c}return{$$typeof:o,type:e.type,key:a,ref:s,props:i,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:s,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:l,_payload:{_status:-1,_result:e},_init:L}},t.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return C().useCallback(e,t)},t.useContext=function(e,t){return C().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return C().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return C().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return C().useLayoutEffect(e,t)},t.useMemo=function(e,t){return C().useMemo(e,t)},t.useReducer=function(e,t,n){return C().useReducer(e,t,n)},t.useRef=function(e){return C().useRef(e)},t.useState=function(e){return C().useState(e)},t.version="17.0.2"},784:function(e,t,n){"use strict";e.exports=n(426)},992:function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerWrapperEventType=void 0,function(e){e.adMetadata="adMetadata"}(n||(n={})),t.PlayerWrapperEventType=n},958:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.createInternalConf=t.defaultConf=void 0;var o=n(782),i=n(373);t.defaultConf={resolverUrl:"https://tivio-resolver-production.tiv.io/serveBundle/resolver2.js",fetchPackage:i.fetchPackage},t.createInternalConf=function(e){return r(r(r({},t.defaultConf),e),{logger:void 0!==e.logger?e.logger:(0,o.createLogger)({isConsoleEnabled:!0}),sdkVersion:"1.1.0-alpha2"})}},920:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(643),t),o(n(173),t),o(n(992),t)},643:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.createTivio=t.createRemotePackageLoader=t.fetchBundleViaResolver=void 0;var i=n(194),a=n(958),s=n(229),u=n(614),c=new i.Logger("bundleLoader");t.fetchBundleViaResolver=function(e){return r(void 0,void 0,void 0,(function(){var t,n;return o(this,(function(r){return t=e.resolverUrl,n=e.fetchPackage,c.info("Fetching bundle via resolver"),[2,n(t).then((function(t){var n,r={},o={exports:r};try{new Function("require","module","exports",t)(s.resolveShared,o,r)}catch(e){throw new Error("Cannot load Tivio Resolver "+e)}if("function"!=typeof(null===(n=o.exports.tivio)||void 0===n?void 0:n.fetch))throw new Error("Invalid Tivio Resolver export");return o.exports.tivio.fetch(e.secret,e.sdkVersion)}))]}))}))},t.createRemotePackageLoader=function(){return function(e){return function(e){return r(void 0,void 0,void 0,(function(){var n;return o(this,(function(i){switch(i.label){case 0:return n="",[4,(a=e.secret,r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return c.info("Fetching bundle via cloudfn, because indexedDB is not supported"),[4,fetch("production"==="MISSING_ENV_VAR".ENV?"https://europe-west3-tivio-production.cloudfunctions.net/getRemoteBundle":"https://europe-west3-tivio-dev.cloudfunctions.net/getRemoteBundle",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({secret:a})})];case 1:return[4,t.sent().json()];case 2:return e=t.sent(),[2,(n=e.bundleUrl,r(void 0,void 0,void 0,(function(){var e;return o(this,(function(t){switch(t.label){case 0:return c.info("Fetching bundle by url",n),[4,fetch(n)];case 1:if(!((r=(e=t.sent()).status)>=200&&r<=400))throw new Error("Failed to fetch bundleUrlOverride "+n+", HTTP error status code: "+e.status);return[4,e.text()];case 2:return[2,t.sent()]}var r}))})))]}var n}))})))];case 1:return n=i.sent(),[3,4];case 2:return[4,(0,t.fetchBundleViaResolver)(e)];case 3:n=i.sent(),i.label=4;case 4:return[2,n]}var a}))}))}(e).then((function(e){var t={},n={exports:t};try{new Function("require","module","exports",e)(s.resolveShared,n,t)}catch(e){throw new Error("Cannot load module "+e)}if("object"!=typeof n.exports.Tivio)throw new Error('Tivio package does not export "Tivio" namespace');if("function"!=typeof n.exports.Tivio.setUser)throw new Error('Tivio namespace does not export "setUser" member');if("function"!=typeof n.exports.Tivio.init)throw new Error('Tivio namespace does not export "init" member');return n.exports.Tivio}))}},t.createTivio=function(){var e=(0,t.createRemotePackageLoader)(),n=!1;return function(t){return r(void 0,void 0,void 0,(function(){var i,s;return o(this,(function(c){return i=(0,a.createInternalConf)(t),s=(0,u.createSettings)(i),[2,e(i).then((function(e){return r(void 0,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return n?[3,2]:[4,e.init(i)];case 1:t.sent(),n=!0,t.label=2;case 2:return s.onSetUser(e.setUser),[2,{state:"ready",error:null,settings:s,conf:i,AdSource:e.AdSource,ChannelSource:e.ChannelSource,VodTivioSource:e.VodTivioSource,getChannelById:e.getChannelById,getPlayer:e.getPlayer,getSectionById:e.getSectionById,getVideoById:e.getVideoById,getWidgetById:e.getWidgetById,setLanguage:e.setLanguage,setUser:e.setUser,subscribeToWidget:e.subscribeToWidget,subscribeToChannel:e.subscribeToChannel,subscribeToSection:e.subscribeToSection,subscribeToVideo:e.subscribeToVideo,subscribeToVideosInSection:e.subscribeToVideosInSection,subscribeToSectionsInChannel:e.subscribeToSectionsInChannel,subscribeToChannelsInWidget:e.subscribeToChannelsInWidget,subscribeToScreen:e.subscribeToScreen,subscribeToItemsInRow:e.subscribeToItemsInRow,createUserWithEmailAndPassword:e.createUserWithEmailAndPassword,signInWithEmailAndPassword:e.signInWithEmailAndPassword,createPlayerWrapper:e.createPlayerWrapper}]}}))}))})).catch((function(e){var t;return null===(t=i.logger)||void 0===t||t.exception(e),{state:"error",error:""+e,conf:i,settings:s}}))]}))}))}}},229:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveShared=void 0;var s=a(n(937));n(703),n(462);var u=i(n(259)),c=i(n(970)),l={mobx:u,firebase:s.default,"firebase/app":s.default,"firebase/auth":null,"firebase/firestore":null,timers:c};t.resolveShared=function(e){if(!(e in l))throw new Error("Could not resolve shared dependency "+e);return l[e]}},782:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.createLogger=void 0;var a=i(n(356));t.createLogger=function(e){var t=!1!==e.isSentryEnabled&&!0;t&&(a.init({dsn:"https://f318b29129f84c459ea756907bc1a2e6@o507550.ingest.sentry.io/5600272",release:"@tivio/sdk-js@1.1.0-alpha2",tracesSampleRate:1}),window.sentry=a),console.info("Sentry "+(t?"on":"off"));var n=function(n,r){e.isConsoleEnabled&&console[n]("Tivio sdk-js "+r.join(" ")),t&&a.captureMessage(""+r,a.Severity.fromString(n))};return{error:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("error",e)},info:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("info",e)},warn:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("warn",e)},debug:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n("debug",e)},exception:function(n){e.isConsoleEnabled&&console.error(n),t&&a.captureException(n)}}}},373:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchPackage=void 0;var o={cache:"no-store"},i=function(e){var t=e.headers.get("content-type");return 200!==e.status?Promise.reject('Incorrect status "'+e.status+'" was obtained while fetching the module.'):t&&(t.includes("application/javascript")||t.includes("text/javascript"))?e.text():Promise.reject('Incorrect content "'+t+'" was obtained while fetching the module.')},a=function(e){return Promise.reject("Network failure: "+e)};t.fetchPackage=function(e){return n(void 0,void 0,void 0,(function(){return r(this,(function(t){return[2,fetch(e,o).then(i).catch(a)]}))}))}},614:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createSettings=void 0,t.createSettings=function(e){var t=null,n=null;return{onSetUser:function(r){var o;"function"!=typeof r?null===(o=e.logger)||void 0===o||o.exception("Tivio Bundle setUser handler must be a function"):(t=r,null!==n&&r(n.userId,n.userPayload))},setUser:function(e,r){"function"==typeof t?(n=null,t(e,r)):n={userId:e,userPayload:r}}}}},173:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},356:function(t){"use strict";t.exports=e},937:function(e){"use strict";e.exports=t},703:function(e){"use strict";e.exports=n},462:function(e){"use strict";e.exports=r},259:function(e){"use strict";e.exports=o},970:function(){}},a={},function e(t){var n=a[t];if(void 0!==n)return n.exports;var r=a[t]={exports:{}};return i[t].call(r.exports,r,r.exports,e),r.exports}(920);var i,a}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tivio/sdk-js",
3
- "version": "1.1.0-alpha",
3
+ "version": "1.1.0-alpha2",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
6
6
  "source": "src/index.ts",