fansunited-sdk-umd 1.113.0 → 1.113.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@react-native-async-storage/async-storage")):"function"==typeof define&&define.amd?define(["@react-native-async-storage/async-storage"],e):"object"==typeof exports?exports.FansUnitedSDK=e(require("@react-native-async-storage/async-storage")):t.FansUnitedSDK=e(t["@react-native-async-storage/async-storage"])}(self,(t=>(()=>{var e={16313:t=>{var e=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,r;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{r=Promise}catch(t){r=function(){}}function i(a,o,u,l,c){"object"==typeof o&&(u=o.depth,l=o.prototype,c=o.includeNonEnumerable,o=o.circular);var d=[],f=[],h="undefined"!=typeof Buffer;return void 0===o&&(o=!0),void 0===u&&(u=1/0),function a(u,p){if(null===u)return null;if(0===p)return u;var m,v;if("object"!=typeof u)return u;if(t(u,e))m=new e;else if(t(u,n))m=new n;else if(t(u,r))m=new r((function(t,e){u.then((function(e){t(a(e,p-1))}),(function(t){e(a(t,p-1))}))}));else if(i.__isArray(u))m=[];else if(i.__isRegExp(u))m=new RegExp(u.source,s(u)),u.lastIndex&&(m.lastIndex=u.lastIndex);else if(i.__isDate(u))m=new Date(u.getTime());else{if(h&&Buffer.isBuffer(u))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(u.length):new Buffer(u.length),u.copy(m),m;t(u,Error)?m=Object.create(u):void 0===l?(v=Object.getPrototypeOf(u),m=Object.create(v)):(m=Object.create(l),v=l)}if(o){var _=d.indexOf(u);if(-1!=_)return f[_];d.push(u),f.push(m)}for(var y in t(u,e)&&u.forEach((function(t,e){var n=a(e,p-1),r=a(t,p-1);m.set(n,r)})),t(u,n)&&u.forEach((function(t){var e=a(t,p-1);m.add(e)})),u){var g;v&&(g=Object.getOwnPropertyDescriptor(v,y)),g&&null==g.set||(m[y]=a(u[y],p-1))}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(u);for(y=0;y<b.length;y++){var w=b[y];(!(I=Object.getOwnPropertyDescriptor(u,w))||I.enumerable||c)&&(m[w]=a(u[w],p-1),I.enumerable||Object.defineProperty(m,w,{enumerable:!1}))}}if(c){var E=Object.getOwnPropertyNames(u);for(y=0;y<E.length;y++){var I,M=E[y];(I=Object.getOwnPropertyDescriptor(u,M))&&I.enumerable||(m[M]=a(u[M],p-1),Object.defineProperty(m,M,{enumerable:!1}))}}return m}(a,u)}function a(t){return Object.prototype.toString.call(t)}function s(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return i.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},i.__objToStr=a,i.__isDate=function(t){return"object"==typeof t&&"[object Date]"===a(t)},i.__isArray=function(t){return"object"==typeof t&&"[object Array]"===a(t)},i.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===a(t)},i.__getRegExpFlags=s,i}();t.exports&&(t.exports=e)},17187:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,a),r(n)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}m(t,e,a,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function o(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function l(t,e,n,r){var i,a,s,l;if(o(n),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),a=t._events),s=a[e]),void 0===s)s=a[e]=n,++t._eventsCount;else if("function"==typeof s?s=a[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function f(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):p(i,i.length)}function h(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function m(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(a){r.once&&t.removeEventListener(e,i),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i="error"===t,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var u=a[t];if(void 0===u)return!1;if("function"==typeof u)r(u,this,e);else{var l=u.length,c=p(u,l);for(n=0;n<l;++n)r(c[n],this,e)}return!0},a.prototype.addListener=function(t,e){return l(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return l(this,t,e,!0)},a.prototype.once=function(t,e){return o(e),this.on(t,d(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return o(e),this.prependListener(t,d(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,r,i,a,s;if(o(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===e||n[a].listener===e){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return f(this,t,!0)},a.prototype.rawListeners=function(t){return f(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},96245:(t,e,n)=>{"use strict";function r(t){this.message=t}n.r(e),n.d(e,{InvalidTokenError:()=>s,default:()=>o}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,a=0,s=0,o="";i=e.charAt(s++);~i&&(n=a%4?64*n+i:i,a++%4)?o+=String.fromCharCode(255&n>>(-2*a&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function a(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(i(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return i(e)}}function s(t){this.message=t}s.prototype=new Error,s.prototype.name="InvalidTokenError";const o=function(t,e){if("string"!=typeof t)throw new s("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(a(t.split(".")[n]))}catch(t){throw new s("Invalid token specified: "+t.message)}}},70321:function(t,e,n){(function(){(t.exports=n(35282)).version="5.1.2"}).call(this)},35282:function(t,e,n){(function(){var e,r,i=[].splice,a=function(t,e){if(!(t instanceof e))throw new Error("Bound instance method accessed before binding")},s=[].indexOf;r=n(16313),e=n(17187).EventEmitter,t.exports=function(){class t extends e{constructor(t={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=t,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach((t=>{var e;e=this[t],this[t]=function(...t){var n,r;if(r=t,[...t]=r,[n]=i.call(t,-1),"function"!=typeof n)return e(...t,n);try{n(null,e(...t))}catch(t){n(t)}}}))),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(e){var n;if(a(this,t),null!=(n=this._isInvalidKey(e)))throw n;return null!=this.data[e]&&this._check(e,this.data[e])?(this.stats.hits++,this._unwrap(this.data[e])):void this.stats.misses++}mget(e){var n,r,i,s,o;if(a(this,t),!Array.isArray(e))throw this._error("EKEYSTYPE");for(o={},r=0,s=e.length;r<s;r++){if(i=e[r],null!=(n=this._isInvalidKey(i)))throw n;null!=this.data[i]&&this._check(i,this.data[i])?(this.stats.hits++,o[i]=this._unwrap(this.data[i])):this.stats.misses++}return o}set(e,n,r){var i,s;if(a(this,t),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw this._error("ECACHEFULL");if(this.options.forceString,null==r&&(r=this.options.stdTTL),null!=(i=this._isInvalidKey(e)))throw i;return s=!1,this.data[e]&&(s=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[e],!1))),this.data[e]=this._wrap(n,r),this.stats.vsize+=this._getValLength(n),s||(this.stats.ksize+=this._getKeyLength(e),this.stats.keys++),this.emit("set",e,n),!0}mset(e){var n,r,i,s,o,u,l,c,d;if(a(this,t),this.options.maxKeys>-1&&this.stats.keys+e.length>=this.options.maxKeys)throw this._error("ECACHEFULL");for(r=0,u=e.length;r<u;r++){if(o=e[r],({key:s,val:d,ttl:c}=o),c&&"number"!=typeof c)throw this._error("ETTLTYPE");if(null!=(n=this._isInvalidKey(s)))throw n}for(i=0,l=e.length;i<l;i++)o=e[i],({key:s,val:d,ttl:c}=o),this.set(s,d,c);return!0}del(e){var n,r,i,s,o,u;for(a(this,t),Array.isArray(e)||(e=[e]),n=0,i=0,o=e.length;i<o;i++){if(s=e[i],null!=(r=this._isInvalidKey(s)))throw r;null!=this.data[s]&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[s],!1)),this.stats.ksize-=this._getKeyLength(s),this.stats.keys--,n++,u=this.data[s],delete this.data[s],this.emit("del",s,u.v))}return n}take(e){var n;return a(this,t),null!=(n=this.get(e))&&this.del(e),n}ttl(e,n){var r;if(a(this,t),n||(n=this.options.stdTTL),!e)return!1;if(null!=(r=this._isInvalidKey(e)))throw r;return!(null==this.data[e]||!this._check(e,this.data[e])||(n>=0?this.data[e]=this._wrap(this.data[e].v,n,!1):this.del(e),0))}getTtl(e){var n;if(a(this,t),e){if(null!=(n=this._isInvalidKey(e)))throw n;return null!=this.data[e]&&this._check(e,this.data[e])?this.data[e].t:void 0}}keys(){return a(this,t),Object.keys(this.data)}has(e){return a(this,t),null!=this.data[e]&&this._check(e,this.data[e])}getStats(){return a(this,t),this.stats}flushAll(e=!0){a(this,t),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(e),this.emit("flush")}flushStats(){a(this,t),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){a(this,t),this._killCheckPeriod()}_checkData(e=!0){var n,r,i;for(n in a(this,t),r=this.data)i=r[n],this._check(n,i);e&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,1e3*this.options.checkperiod,e),null!=this.checkTimeout&&null!=this.checkTimeout.unref&&this.checkTimeout.unref())}_killCheckPeriod(){if(null!=this.checkTimeout)return clearTimeout(this.checkTimeout)}_check(e,n){var r;return a(this,t),r=!0,0!==n.t&&n.t<Date.now()&&(this.options.deleteOnExpire&&(r=!1,this.del(e)),this.emit("expired",e,this._unwrap(n))),r}_isInvalidKey(e){var n;if(a(this,t),n=typeof e,s.call(this.validKeyTypes,n)<0)return this._error("EKEYTYPE",{type:typeof e})}_wrap(e,n,i=!0){var s;return a(this,t),this.options.useClones||(i=!1),s=Date.now(),{t:0===n?0:n?s+1e3*n:0===this.options.stdTTL?this.options.stdTTL:s+1e3*this.options.stdTTL,v:i?r(e):e}}_unwrap(t,e=!0){return this.options.useClones||(e=!1),null!=t.v?e?r(t.v):t.v:null}_getKeyLength(t){return t.toString().length}_getValLength(e){return a(this,t),"string"==typeof e?e.length:this.options.forceString?JSON.stringify(e).length:Array.isArray(e)?this.options.arrayValueSize*e.length:"number"==typeof e?8:"function"==typeof(null!=e?e.then:void 0)?this.options.promiseValueSize:("undefined"!=typeof Buffer&&null!==Buffer?Buffer.isBuffer(e):void 0)?e.length:null!=e&&"object"==typeof e?this.options.objectValueSize*Object.keys(e).length:"boolean"==typeof e?8:0}_error(e,n={}){var r;return a(this,t),(r=new Error).name=e,r.errorcode=e,r.message=null!=this.ERRORS[e]?this.ERRORS[e](n):"-",r.data=n,r}_initErrors(){var e,n,r;for(n in a(this,t),this.ERRORS={},r=this._ERRORS)e=r[n],this.ERRORS[n]=this.createErrorMessage(e)}createErrorMessage(t){return function(e){return t.replace("__key",e.type)}}}return t.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},t}.call(this)}).call(this)},46595:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(40682),a=n(62141),s=r(n(84241)),o=r(n(16391)),u=r(n(21512)),l=r(n(64392)),c=r(n(320)),d=r(n(17631)),f=r(n(96965)),h=r(n(89158)),p=r(n(17113)),m=r(n(5076));e.default=function(){var t=this;this.validate=function(e){var n=t.checkFieldsForValues(e);return n.isValid=t.containsErrorMessage(n),n},this.checkFieldsForValues=function(t){for(var e=new d.default,n={apiKey:new u.default,environment:new o.default,idSchema:new l.default,clientId:new f.default,lang:new s.default,errorHandlingMode:new h.default,authProvider:new c.default,cookieToken:new p.default,oddClient:new m.default},r=0,i=Object.entries(e);r<i.length;r++){var a=i[r],v=a[0];a[1],"isValid"!==v&&n[v].validate(t)}return Object.keys(n).forEach((function(r){e[r]=n[r].validate(t)})),e},this.containsErrorMessage=function(t){for(var e=!0,n=0,r=Object.entries(t);n<r.length;n++){var s=r[n],o=s[0],u=s[1];if(o!==i.ConfigFieldEnum.authProvider&&o!==i.ConfigFieldEnum.cookieToken&&o!==i.ConfigFieldEnum.oddClient){if("isValid"!==o&&u.message.type===a.LogEnum.ERROR)return!1;if("isValid"!==o&&u.message.type===a.LogEnum.WARNING)return!0}else{if(u.message.type===a.LogEnum.ERROR)return!1;if(o===i.ConfigFieldEnum.oddClient&&u.credentials.message.type===a.LogEnum.ERROR)return!1}}return e}}},40682:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigFieldEnum=void 0,(n=e.ConfigFieldEnum||(e.ConfigFieldEnum={})).apiKey="apiKey",n.environment="environment",n.idSchema="idSchema",n.clientId="clientId",n.lang="lang",n.oddClient="oddClient",n.authProvider="authProvider",n.cookieToken="cookieToken"},2671:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentEnum=void 0,(n=e.EnvironmentEnum||(e.EnvironmentEnum={})).DEV="dev",n.PROD="prod",n.STAGING="staging",n.WATG="watg",n.YOLO="yolo",n.CSKA="cska"},89580:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorHandlingModeEnum=void 0,(n=e.ErrorHandlingModeEnum||(e.ErrorHandlingModeEnum={})).DEFAULT="default",n.STANDARD="standard"},14946:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.IdSchemaEnum=void 0,(n=e.IdSchemaEnum||(e.IdSchemaEnum={})).NATIVE="native",n.ENETPULSE="enetpulse",n.SPORTRADAR="sportradar",n.SPORTAL_365="sportal365",n.API_FOOTBALL="api_football"},89377:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LangEnum=void 0,(n=e.LangEnum||(e.LangEnum={})).EN="en",n.BG="bg",n.RO="ro",n.EL="el",n.SK="sk",n.PT="pt",n.SR="sr",n.HU="hu",n.SV="sv",n.ES="es",n.FR="fr",n.NL="nl",n.DE="de",n.IT="it"},62141:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LogEnum=void 0,(n=e.LogEnum||(e.LogEnum={})).ERROR="error",n.WARNING="warning"},39028:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationMessageEnum=void 0,(n=e.ValidationMessageEnum||(e.ValidationMessageEnum={})).API_KEY="The field apiKey with valid value must be provided to use Fans United JS SDK",n.CLIENT_ID="The field clientId must be provided to use Fans United JS SDK",n.LANG_MISSING="If no lang is passed the default one will be set which is: en",n.LANG_INVALID="This lang value is not supported, the default one will be set which is: en",n.ID_SCHEMA_MISSING="If no idSchema is passed the default one will be set which is: native",n.ID_SCHEMA_INVALID="This idSchema value is not supported, the default one will be set which is: native",n.ENVIRONMENT_MISSING="If no environment is passed the default one will be set which is: prod",n.ENVIRONMENT_INVALID="This environment value is not supported, the default one will be set which is: prod",n.ERROR_HANDLING_MODE_MISSING="If no errorHandlingMode is passed the default one will be set which is: default",n.ERROR_HANDLING_MODE_INVALID="This errorHandlingMode value is not supported, the default one will be set which is: default",n.ODD_CLIENT_MISSING="If no oddClient is passed the Odds namespace will not work. For more information check our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk#/",n.ODD_CLIENT_INVALID="The oddClient object is not valid. For more information check our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk#/",n.ODD_CLIENT_CONFIG_INVALID_PROP="You have passed properties which are not supported for the odd client configuration property:",n.ODD_CLIENT_CREDENTIALS_INVALID="The odd client credentials object is not valid. The odd client will not work without credentials. For more information check our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk#/",n.ODD_CLIENT_CREDENTIALS_CONFIG_PROP_MISSING="The following property is missing from the odd client credentials object:",n.ODD_CLIENT_CREDENTIALS_CONFIG_INVALID_PROP="You have passed properties which are not supported for the odd client credentials configuration property:",n.ODD_CLIENT_CONFIG_MISSING_CONFIG="The field oddClient has missing properties. For more information check our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk#/",n.AUTH_PROVIDER_CONFIG_PROP_MISSING="The following property is missing from the authProvider object:",n.AUTH_PROVIDER_CONFIG_INVALID_PROP="You have passed a property which is not supported for the authentication provider:",n.AUTH_PROVIDER_CONFIG_MISSING="The field authProvider must be provided to use this SDK",n.AUTH_PROVIDER_CONFIG_MISSING_CONFIG="The field authProvider has missing properties",n.COOKIE_TOKEN_CONFIG_INVALID_PROP="You have passed properties which are not supported for the cookie token configuration property:",n.COOKIE_TOKEN_CONFIG_PROP_MISSING="The following property is missing from the cookieToken object:",n.COOKIE_TOKEN_CONFIG_MISSING_CONFIG="The field cookieToken has missing properties"},29627:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationResponseEnum=void 0,(n=e.ValidationResponseEnum||(e.ValidationResponseEnum={})).MISSING_VALUE="missing",n.INVALID_VALUE="invalid",n.VALID_VALUE="valid"},17070:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.getIdToken=null,this.logout=null}},52379:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(3220));e.default=function(){this.validation=null,this.message=new i.default,this.getIdToken={validation:null,message:new i.default},this.logout={validation:null,message:new i.default}}},17631:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(33074));e.default=function(){this.apiKey=null,this.environment=null,this.idSchema=null,this.clientId=null,this.lang=null,this.errorHandlingMode=null,this.cookieToken={name:new i.default,requestHeaders:new i.default},this.oddClient=null,this.authProvider={getIdToken:new i.default,logout:new i.default},this.isValid=!1}},38092:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(3220)),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name={validation:null,message:new s.default},e.requestHeaders={validation:null,message:new s.default},e}return i(e,t),e}(a(n(33074)).default);e.default=o},3220:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.text=null,this.type=null}},37541:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(3220)),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name={validation:null,message:new s.default},e.credentials={validation:null,message:new s.default},e}return i(e,t),e}(a(n(33074)).default);e.default=o},17563:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},33074:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},21512:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29627),i=n(39028),a=n(62141),s=function(){function t(){this.validateField=function(t){return null!=t&&t.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.ERROR;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.API_KEY),t===r.ValidationResponseEnum.VALID_VALUE&&(n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.apiKey);return{validation:e,message:this.generateMessage(e)}},t}();e.default=s},320:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(29627),a=n(39028),s=n(62141),o=r(n(17070)),u=r(n(52379)),l=function(){function t(){this.validateAuthProvider=function(t){var e=Object.keys(new o.default),n=new u.default;if(t){var r=Object.keys(t).filter((function(t){return!e.includes(t)}));r.length>0?(n.validation=i.ValidationResponseEnum.INVALID_VALUE,n.message.type=s.LogEnum.WARNING,n.message.text="".concat(a.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_INVALID_PROP," ").concat(r.join(","))):n.validation=i.ValidationResponseEnum.VALID_VALUE}else n.validation=i.ValidationResponseEnum.MISSING_VALUE,n.message.type=s.LogEnum.ERROR,n.message.text=a.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING;return n},this.validateAuthProviderConfigFields=function(t,e){return Object.keys(new o.default).forEach((function(n){t[n]?e[n].validation=i.ValidationResponseEnum.VALID_VALUE:e[n].validation=i.ValidationResponseEnum.MISSING_VALUE})),e},this.generateAuthProviderConfigMessages=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){var n=t[e];n.validation===i.ValidationResponseEnum.MISSING_VALUE&&(n.message.text="".concat(a.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_PROP_MISSING," ").concat(e),n.message.type=s.LogEnum.ERROR)})),t},this.checkAuthProviderConfigMessagesForErrors=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){t[e].validation===i.ValidationResponseEnum.MISSING_VALUE&&t.validation===i.ValidationResponseEnum.VALID_VALUE&&(t.validation=i.ValidationResponseEnum.INVALID_VALUE,t.message.type=s.LogEnum.ERROR,t.message.text=a.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING_CONFIG)})),t}}return t.prototype.validate=function(t){if(t.cookieToken)return new u.default;var e=this.validateAuthProvider(t.authProvider);return e.validation!==i.ValidationResponseEnum.MISSING_VALUE&&(e=this.validateAuthProviderConfigFields(t.authProvider,e),e=this.generateAuthProviderConfigMessages(e),e=this.checkAuthProviderConfigMessagesForErrors(e)),e},t}();e.default=l},96965:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29627),i=n(39028),a=n(62141),s=function(){function t(){this.validateField=function(t){return null!=t&&t.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.ERROR;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.CLIENT_ID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.clientId);return{validation:e,message:this.generateMessage(e)}},t}();e.default=s},17113:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(29627),a=n(39028),s=n(62141),o=r(n(38092)),u=function(){function t(){var t=this;this.keys=["name","requestHeaders"],this.isServerSide="undefined"==typeof document,this.validateCookieToken=function(e){var n=new o.default;n.message={type:null,text:null};var r=Object.keys(e).filter((function(e){return!t.keys.includes(e)}));return r.length>0?(n.validation=i.ValidationResponseEnum.INVALID_VALUE,n.message.type=s.LogEnum.WARNING,n.message.text="".concat(a.ValidationMessageEnum.COOKIE_TOKEN_CONFIG_INVALID_PROP," ").concat(r.join(","))):n.validation=i.ValidationResponseEnum.VALID_VALUE,n},this.validateCookieTokenConfigFields=function(e,n){return t.keys.forEach((function(r){e[r]?n[r].validation=i.ValidationResponseEnum.VALID_VALUE:"requestHeaders"!==r||t.isServerSide?n[r].validation=i.ValidationResponseEnum.MISSING_VALUE:n[r].validation=i.ValidationResponseEnum.VALID_VALUE})),n},this.generateCookieTokenConfigMessages=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){var n=t[e];n.validation===i.ValidationResponseEnum.MISSING_VALUE&&(n.message.text="".concat(a.ValidationMessageEnum.COOKIE_TOKEN_CONFIG_PROP_MISSING," ").concat(e),n.message.type=s.LogEnum.ERROR)})),t},this.checkCookieTokenConfigMessagesForErrors=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){t[e].validation===i.ValidationResponseEnum.MISSING_VALUE&&(t.validation=i.ValidationResponseEnum.INVALID_VALUE,t.message.type=s.LogEnum.ERROR,t.message.text=a.ValidationMessageEnum.COOKIE_TOKEN_CONFIG_MISSING_CONFIG)})),t}}return t.prototype.validate=function(t){if(!t.cookieToken){var e=new o.default;return e.message={type:null,text:null},e.validation=i.ValidationResponseEnum.VALID_VALUE,e}var n=this.validateCookieToken(t.cookieToken);return n=this.validateCookieTokenConfigFields(t.cookieToken,n),n=this.generateCookieTokenConfigMessages(n),this.checkCookieTokenConfigMessagesForErrors(n)},t}();e.default=u},16391:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29627),i=n(39028),a=n(62141),s=n(2671),o=function(){function t(){this.validateField=function(t){var e=Object.values(s.EnvironmentEnum);return null!=t&&t.length>0?e.includes(t)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.WARNING;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.ENVIRONMENT_MISSING),t===r.ValidationResponseEnum.INVALID_VALUE&&(e=i.ValidationMessageEnum.ENVIRONMENT_INVALID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.environment);return{validation:e,message:this.generateMessage(e)}},t}();e.default=o},89158:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(89580),i=n(62141),a=n(39028),s=n(29627);e.default=function(){var t=this;this.validate=function(e){var n=t.validateField(e.errorHandlingMode);return{validation:n,message:t.generateMessage(n)}},this.validateField=function(t){var e=[r.ErrorHandlingModeEnum.DEFAULT,r.ErrorHandlingModeEnum.STANDARD];return t?e.includes(t)?s.ValidationResponseEnum.VALID_VALUE:s.ValidationResponseEnum.INVALID_VALUE:s.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=i.LogEnum.WARNING;return t===s.ValidationResponseEnum.MISSING_VALUE&&(e=a.ValidationMessageEnum.ERROR_HANDLING_MODE_MISSING),t===s.ValidationResponseEnum.INVALID_VALUE&&(e=a.ValidationMessageEnum.ERROR_HANDLING_MODE_INVALID),t===s.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},64392:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29627),i=n(39028),a=n(62141),s=n(14946),o=function(){function t(){this.validateField=function(t){var e=Object.values(s.IdSchemaEnum);return null!=t&&t.length>0?e.includes(t)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.WARNING;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.ID_SCHEMA_MISSING),t===r.ValidationResponseEnum.INVALID_VALUE&&(e=i.ValidationMessageEnum.ID_SCHEMA_INVALID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.idSchema);return{validation:e,message:this.generateMessage(e)}},t}();e.default=o},84241:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(89377),i=n(29627),a=n(39028),s=n(62141);e.default=function(){var t=this;this.validate=function(e){var n=t.validateField(e.lang);return{validation:n,message:t.generateMessage(n)}},this.validateField=function(t){var e=Object.values(r.LangEnum);return null!=t&&t.length>0?e.includes(t)?i.ValidationResponseEnum.VALID_VALUE:i.ValidationResponseEnum.INVALID_VALUE:i.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.WARNING;return t===i.ValidationResponseEnum.MISSING_VALUE&&(e=a.ValidationMessageEnum.LANG_MISSING),t===i.ValidationResponseEnum.INVALID_VALUE&&(e=a.ValidationMessageEnum.LANG_INVALID),t===i.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},5076:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(62141),a=n(39028),s=n(29627),o=r(n(37541));e.default=function(){var t=this;this.keys=["name","credentials"],this.validate=function(e){if(!e.oddClient){var n=new o.default;return n.validation=s.ValidationResponseEnum.MISSING_VALUE,n.message={type:i.LogEnum.WARNING,text:a.ValidationMessageEnum.ODD_CLIENT_MISSING},n}var r=t.validateOddClient(e.oddClient);return r.message.type===i.LogEnum.ERROR?r:(r=t.validateOddClientConfigFields(e.oddClient,r),(r=t.checkOddClientMissingProperties(r)).message.type===i.LogEnum.ERROR?r:r=t.validateOddClientCredentials(e.oddClient.credentials,r))},this.validateOddClient=function(e){var n=new o.default;if(n.message={type:null,text:null},!(e instanceof Object))return n.validation=s.ValidationResponseEnum.INVALID_VALUE,n.message.type=i.LogEnum.ERROR,n.message.text=a.ValidationMessageEnum.ODD_CLIENT_INVALID,n;var r=Object.keys(e).filter((function(e){return!t.keys.includes(e)}));return r.length>0?(n.validation=s.ValidationResponseEnum.INVALID_VALUE,n.message.type=i.LogEnum.WARNING,n.message.text="".concat(a.ValidationMessageEnum.ODD_CLIENT_CONFIG_INVALID_PROP," ").concat(r.join(","))):n.validation=s.ValidationResponseEnum.VALID_VALUE,n},this.validateOddClientConfigFields=function(e,n){return t.keys.forEach((function(t){e[t]?n[t].validation=s.ValidationResponseEnum.VALID_VALUE:n[t].validation=s.ValidationResponseEnum.MISSING_VALUE})),n},this.validateOddClientCredentials=function(t,e){if(!(t instanceof Object))return e.credentials.validation=s.ValidationResponseEnum.INVALID_VALUE,e.credentials.message.type=i.LogEnum.ERROR,e.credentials.message.text=a.ValidationMessageEnum.ODD_CLIENT_CREDENTIALS_INVALID,e;var n=Object.keys(t),r=["username","password"],o=r.filter((function(t){return!n.includes(t)}));o.length>0&&(e.credentials.validation=s.ValidationResponseEnum.INVALID_VALUE,e.credentials.message.type=i.LogEnum.ERROR,e.credentials.message.text="".concat(a.ValidationMessageEnum.ODD_CLIENT_CREDENTIALS_CONFIG_PROP_MISSING," ").concat(o.join(", "))),n.length>0&&0===o.length&&(t.username&&t.password||(e.credentials.validation=s.ValidationResponseEnum.INVALID_VALUE,e.credentials.message.type=i.LogEnum.ERROR,e.credentials.message.text=a.ValidationMessageEnum.ODD_CLIENT_CREDENTIALS_INVALID));var u=n.filter((function(t){return!r.includes(t)}));return u.length>0&&(e.credentials.validation=s.ValidationResponseEnum.INVALID_VALUE,e.credentials.message.type=i.LogEnum.WARNING,e.credentials.message.text="".concat(a.ValidationMessageEnum.ODD_CLIENT_CREDENTIALS_CONFIG_INVALID_PROP," ").concat(u.join(", "))),e},this.checkOddClientMissingProperties=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){t[e].validation===s.ValidationResponseEnum.MISSING_VALUE&&(t.validation=s.ValidationResponseEnum.INVALID_VALUE,t.message.type=i.LogEnum.ERROR,t.message.text=a.ValidationMessageEnum.ODD_CLIENT_CONFIG_MISSING_CONFIG)})),t}}},4021:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorCodes=void 0,(n=e.ErrorCodes||(e.ErrorCodes={}))[n.BAD_METHOD_CALL=400]="BAD_METHOD_CALL",n[n.UNAUTHORIZED=401]="UNAUTHORIZED",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.PRECONDITION_FAILED=412]="PRECONDITION_FAILED"},94904:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorStatuses=void 0,(n=e.ErrorStatuses||(e.ErrorStatuses={})).INVALID_TEMPLATE="INVALID_TEMPLATE",n.INVALID_PREDICTION="INVALID_PREDICTION",n.INVALID_MARKET="INVALID_MARKET",n.INVALID_FIELD="INVALID_FIELD",n.INVALID_TYPE="INVALID_TYPE",n.EXCEEDED_LENGTH="EXCEEDED_LENGTH",n.INVALID_TOKEN="invalid_token",n.UNAUTHORIZED="unauthorized",n.INVALID_FILTERS="invalid_filters",n.INVALID_AVATAR="invalid_avatar",n.INVALID_METHOD_CALL="invalid_method_call",n.INVALID_LIMIT="invalid_limit",n.INVALID_TEMPLATE_GROUP_ID="invalid_template_group_id",n.INVALID_TEMPLATE_GROUP_FILTERS="invalid_template_group_filters",n.INVALID_PAGE_NUMBER="invalid_page_number",n.INVALID_DISCUSSION_IDS="invalid_discussion_ids",n.ID_MAPPING_NOT_FOUND="id_mapping_not_found",n.INVALID_COMPETITION_ID="invalid_competition_id",n.INVALID_TEAM_ID="invalid_team_id",n.INVALID_IDS="invalid_ids",n.INVALID_INPUT_PROVIDER="invalid_input_provider",n.INVALID_OUTPUT_PROVIDER="invalid_output_provider",n.INVALID_MATCH_SUMMARY="invalid_match_summary",n.INVALID_MATCH_SUMMARY_PREDICTIONS="invalid_match_summary_predictions",n.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS="invalid_match_summary_predictions_keys",n.ENTITY_IDS_NOT_FOUND="entity_ids_not_found",n.MATCH_IDS_NOT_FOUND="match_ids_not_found",n.INVALID_MATCH_IDS="invalid_match_ids",n.ODD_CLIENT_CONFIGURATION_NOT_FOUND="odd_client_configuration_not_found"},68097:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.code=0,i.status=null,i.message=null,i.errorMessage=function(){return i.message},i.code=e,i.status=n,i.message=r,i}return r(e,t),e}(Error);e.default=i},48712:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e){var n=this;this.data={error:{code:0,status:"",message:""}},this.status=0,this.statusText="",this.headers=null,this.errorMessage=function(){return n.data.error.message},this.data.error.code=e.code,this.data.error.status=e.status,this.data.error.message=e.message,this.status=t.status,this.statusText=t.statusText,this.headers=t.headers}},62535:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,n){this.error={code:0,status:"",message:""},this.error.code=t,this.error.status=e,this.error.message=n}},35092:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var l=n(91260),c="FansUnited",d={football:{ids:[],countries:[],competitions:[],expirations:{ids:0}},profile:{info:{},statistics:{},badges:null,countries:[],expirations:{profile:0,statistics:0,badges:0}},client:{features:{},expirations:{features:0}}},f=function(){function t(t){var e=this;this.idSchema="",this.storageInstance=null,this.expirationProfileTimeout=600,this.expirationBadgesTimeout=3600,this.expirationClientFeaturesTimeout=14400,this.expirationFootballIdsTimeout=604800,this.clearData=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.setData(d)];case 1:return t.sent(),[2]}}))}))},this.getCompetitions=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return e=n.sent(),t?[2,t.competitionSearchFilter(e.football.competitions)]:[2,e.football.competitions]}}))}))},this.setCompetitions=function(t){return s(e,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return e=r.sent(),(n=u([],e.football.competitions,!0)).push.apply(n,t),e.football.competitions=this.makeCompetitionsUnique(n),[4,this.setData(e)];case 2:return r.sent(),[2]}}))}))},this.getCompetitionsLength=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().football.competitions.length]}}))}))},this.getEntityById=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),s(e,void 0,void 0,(function(){var e=this;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return[2,r.sent().football.ids.find((function(r){var i=l.ID_TYPES[e.idSchema];return r&&"".concat(r[i])===n&&r.resource===t}))]}}))}))},this.getEntity=function(t,n,r){return s(e,void 0,void 0,(function(){var e;return o(this,(function(i){switch(i.label){case 0:return[4,this.getData()];case 1:return e=i.sent(),Array.isArray(t)?[2,e.football.ids.filter((function(e){var i=l.ID_TYPES[r];return e&&t.includes("".concat(e[i]))&&e.resource===n}))]:[2,e.football.ids.find((function(e){var i=l.ID_TYPES[r];return e&&"".concat(e[i])===t&&e.resource===n}))]}}))}))},this.checkForExistingIdObjs=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i,a,s,u,c;return o(this,(function(d){switch(d.label){case 0:e=l.ID_TYPES[n],r={},i=function(i){var s,u,l,c;return o(this,(function(o){switch(o.label){case 0:return s=t[i],[4,a.getEntity(s,i,n)];case 1:return u=o.sent(),l=u.map((function(t){return t[e]})),c=t[i].filter((function(t){return!l.includes(t)})),r[i]=s.map((function(t){return c.includes(t)?{id:t,exists:!1}:{id:t,exists:!0}})),[2]}}))},a=this,s=0,u=Object.keys(t),d.label=1;case 1:return s<u.length?(c=u[s],[5,i(c)]):[3,4];case 2:d.sent(),d.label=3;case 3:return s++,[3,1];case 4:return[2,r]}}))}))},this.getIdsByType=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a,s;return o(this,(function(o){switch(o.label){case 0:return[4,this.getData()];case 1:return e=o.sent(),i=l.ID_TYPES[r],a=l.ID_TYPES[n],s={},Object.keys(t).forEach((function(n){var r=t[n],o=[];e.football.ids.forEach((function(t){r.forEach((function(e,r){e===t[a]&&n===t.resource&&(o[r]=t[i])}))})),s[n]=o})),[2,s]}}))}))},this.addIdMapping=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).football.ids.push(t),[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.addIdMappings=function(t){return s(e,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return e=r.sent(),n=e.football.ids,n=u(u([],n,!0),t,!0),e.football.ids=n,[4,this.setData(e)];case 2:return r.sent(),[2]}}))}))},this.addTopIdMappings=function(t){return s(e,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return(e=r.sent()).football.ids.length?(n=(n=JSON.parse(JSON.stringify(e.football.ids))).filter((function(t){return"match"!==t.resource})),t=t.filter((function(t){return"match"===t.resource})),n=u(u([],n,!0),t,!0),e.football.ids=n):e.football.ids=t,e.football.expirations.ids=Math.floor(Date.now()/1e3)+this.expirationFootballIdsTimeout,[4,this.setData(e)];case 2:return r.sent(),[2]}}))}))},this.setOwnProfile=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).profile.info=t,e.profile.expirations.profile=Math.floor(Date.now()/1e3)+this.expirationProfileTimeout,[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getOwnProfile=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().profile.info]}}))}))},this.getProfileCountries=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().profile.countries]}}))}))},this.setProfileCountries=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).profile.countries=t,[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getProfileStats=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().profile.statistics]}}))}))},this.setProfileStats=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).profile.statistics=t,e.profile.expirations.statistics=Math.floor(Date.now()/1e3)+this.expirationProfileTimeout,[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getProfileBadges=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().profile.badges]}}))}))},this.setProfileBadges=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).profile.badges=t,e.profile.expirations.badges=Math.floor(Date.now()/1e3)+this.expirationBadgesTimeout,[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getFootballCountries=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().football.countries]}}))}))},this.setFootballCountries=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).football.countries=t,[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getClientFeatures=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().client.features]}}))}))},this.setClientFeatures=function(t){return s(e,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return e=r.sent(),n=JSON.parse(JSON.stringify(t)),e.client.expirations.features=Math.floor(Date.now()/1e3)+this.expirationClientFeaturesTimeout,e.client.features=n,[4,this.setData(e)];case 2:return r.sent(),[2]}}))}))},this.deleteClientFeatures=function(){return s(e,void 0,void 0,(function(){var t,e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return t=n.sent(),(e=JSON.parse(JSON.stringify(t))).client={features:{},expirations:{features:0}},[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getExpiration=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,this.initialNewSchema(t,"expirations")];case 1:return r.sent(),[4,this.getData()];case 2:switch(e=r.sent(),n){case"profile":return[2,e.profile.expirations.profile];case"statistics":return[2,e.profile.expirations.statistics];case"badges":return[2,e.profile.expirations.badges];case"features":return[2,e.client.expirations.features];case"ids":return[2,e.football.expirations.ids]}return[2]}}))}))},this.makeCompetitionsUnique=function(t){var e=new Set;return t.filter((function(t){var n=!e.has(t.id);return e.add(t.id),n}))},this.initialNewSchema=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return(e=r.sent())&&e[t]&&e[t][n]?[3,3]:[4,this.setData(d)];case 2:r.sent(),r.label=3;case 3:return[2]}}))}))},this.idSchema=t,this.getStorageInstance()}return t.getInstance=function(e){return t.instance||(t.instance=new t(e)),t.instance},t.prototype.getStorageInstance=function(){return s(this,void 0,void 0,(function(){var t,e;return o(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Promise.resolve().then((function(){return a(n(76878))}))];case 1:return t=r.sent(),this.storageInstance=t.default,[3,3];case 2:return e=r.sent(),console.error(e),[3,3];case 3:return[2]}}))}))},t.prototype.getData=function(){return s(this,void 0,void 0,(function(){var t,e;return o(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,this.storageInstance.getItem(c)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[3,2];case 2:return[4,this.storageInstance.setItem(c,JSON.stringify(d))];case 3:return n.sent(),[2,d];case 4:return[3,6];case 5:throw e=n.sent(),console.error("AsyncStorage error:",e),e;case 6:return[2]}}))}))},t.prototype.setData=function(t){return s(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.storageInstance.setItem(c,JSON.stringify(t))];case 1:return e.sent(),[2]}}))}))},t}();e.default=f},91260:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.marketToKeySummaryMap=e.validFixtureFields=e.documentationLinks=e.ID_TYPES=void 0,e.ID_TYPES={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id",api_football:"api_football_id"},e.documentationLinks={PREDICTOR_USER_RELATED_OPERATION:"https://docs.fansunitedmedia.com/docs/predictor-operations#user-related-operations"},e.validFixtureFields=["matchId","matchType","market","prediction"],e.marketToKeySummaryMap=(new Map).set("FT_1X2","fullTimeOneXTwo").set("HT_1X2","halfTimeOneXTwo").set("BOTH_TEAMS_SCORE","bothTeamsScore").set("DOUBLE_CHANCE","doubleChance").set("HT_FT","halfTimeFullTime").set("PLAYER_SCORE","playerScore").set("PLAYER_YELLOW_CARD","playerYellowCard").set("PLAYER_RED_CARD","playerRedCard").set("RED_CARD_MATCH","redCardMatch").set("PENALTY_MATCH","penaltyMatch").set("PLAYER_SCORE_FIRST_GOAL","playerScoreFirstGoal").set("CORNERS_MATCH","cornersMatch").set("CORRECT_SCORE","correctScore").set("CORRECT_SCORE_ADVANCED","correctScoreAdvanced").set("CORRECT_SCORE_HT","correctScoreHalfTime").set("PLAYER_SCORE_HATTRICK","playerScoreHattrick").set("PLAYER_SCORE_TWICE","playerScoreTwice").set("OVER_GOALS_0_5","overZeroPointFiveGoals").set("OVER_GOALS_1_5","overOnePointFiveGoals").set("OVER_GOALS_2_5","overTwoPointFiveGoals").set("OVER_GOALS_3_5","overThreePointFiveGoals").set("OVER_GOALS_4_5","overFourPointFiveGoals").set("OVER_GOALS_5_5","overFivePointFiveGoals").set("OVER_GOALS_6_5","overSixPointFiveGoals").set("OVER_CORNERS_6_5","overSixPointFiveCorners").set("OVER_CORNERS_7_5","overSevenPointFiveCorners").set("OVER_CORNERS_8_5","overEightPointFiveCorners").set("OVER_CORNERS_9_5","overNinePointFiveCorners").set("OVER_CORNERS_10_5","overTenPointFiveCorners").set("OVER_CORNERS_11_5","overElevenPointFiveCorners").set("OVER_CORNERS_12_5","overTwelvePointFiveCorners").set("OVER_CORNERS_13_5","overThirteenPointFiveCorners")},10817:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EntityTypeEnum=void 0,(n=e.EntityTypeEnum||(e.EntityTypeEnum={})).COMPETITION="competition",n.TEAM="team",n.PLAYER="player"},95409:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SportSourceEnum=void 0,(n=e.SportSourceEnum||(e.SportSourceEnum={})).FOOTBALL="FOOTBALL",n.CUSTOM="CUSTOM"},78358:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(35092)),a=r(n(15601)),s=r(n(9018));e.default=function(){this.createLocalCacheInstance=function(t){return"undefined"==typeof window?s.default.getInstance(t):"undefined"!=typeof __DEV__?i.default.getInstance(t):a.default.getInstance(t)}}},90712:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.constructStringArrayWithProvidedLength=e.sortArrayInAscOrder=e.initDisableCache=e.isDisabledCache=e.transformIdsToBeUnique=e.setBaseUrl=e.limitIds=e.requestChunkBuild=void 0;var r=n(2671);e.requestChunkBuild=function(t){var e=[],n=0;return e[n]=[],t.forEach((function(t){e[n].length<=199?e[n].push(t):(n++,e[n]=[t])})),e},e.limitIds=function(t,e){for(var n=[];t.length>e;){var r=t.splice(0,e);n.push(r)}return n.push(t),n},e.setBaseUrl=function(t,e){return t===r.EnvironmentEnum.PROD?{profile:"https://profile.fansunitedapi.com/v1",football:"https://football.fansunitedapi.com/v1",idMapping:"https://id-mapping.fansunitedapi.com/v1",predictor:"https://prediction.fansunitedapi.com/v1",client:"https://client.fansunitedapi.com/v1",loyalty:"https://loyalty.fansunitedapi.com/v1",miniGames:"https://mini-games.fansunitedapi.com/v1",discussions:"https://discussions.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.fansunitedapi.com/v1",voting:"https://voting.fansunitedapi.com/v1"}[e]:t===r.EnvironmentEnum.DEV?{profile:"http://localhost:8010/v1",football:"http://localhost:8080/v1",idMapping:"http://localhost:8030/v1",predictor:"http://localhost:8040/v1",client:"http://localhost:8070/v1",loyalty:"http://localhost:8060/v1",miniGames:"http://localhost:9040/v1",discussions:"http://localhost:9020/v1",privateLeagues:"http://localhost:9010/v1",voting:"http://localhost:9030/v1"}[e]:t===r.EnvironmentEnum.WATG?{profile:"https://profile.watg.fansunitedapi.com/v1",football:"https://football.watg.fansunitedapi.com/v1",idMapping:"https://id-mapping.watg.fansunitedapi.com/v1",predictor:"https://prediction.watg.fansunitedapi.com/v1",client:"https://client.watg.fansunitedapi.com/v1",loyalty:"https://loyalty.watg.fansunitedapi.com/v1",miniGames:"https://mini-games.watg.fansunitedapi.com/v1",discussions:"https://discussions.watg.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.watg.fansunitedapi.com/v1",voting:"https://voting.watg.fansunitedapi.com/v1"}[e]:t===r.EnvironmentEnum.YOLO?{profile:"https://profile.yolo.fansunitedapi.com/v1",football:"https://football.yolo.fansunitedapi.com/v1",idMapping:"https://id-mapping.yolo.fansunitedapi.com/v1",predictor:"https://prediction.yolo.fansunitedapi.com/v1",client:"https://client.yolo.fansunitedapi.com/v1",loyalty:"https://loyalty.yolo.fansunitedapi.com/v1",miniGames:"https://mini-games.yolo.fansunitedapi.com/v1",discussions:"https://discussions.yolo.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.yolo.fansunitedapi.com/v1",voting:"https://voting.yolo.fansunitedapi.com/v1"}[e]:t===r.EnvironmentEnum.CSKA?{profile:"https://profile.cska.fansunitedapi.com/v1",football:"https://football.cska.fansunitedapi.com/v1",idMapping:"https://id-mapping.cska.fansunitedapi.com/v1",predictor:"https://prediction.cska.fansunitedapi.com/v1",client:"https://client.cska.fansunitedapi.com/v1",loyalty:"https://loyalty.cska.fansunitedapi.com/v1",miniGames:"https://mini-games.cska.fansunitedapi.com/v1",discussions:"https://discussions.cska.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.cska.fansunitedapi.com/v1",voting:"https://voting.cska.fansunitedapi.com/v1"}[e]:{profile:"https://profile.fansunitedstagingapi.com/v1",football:"https://football.fansunitedstagingapi.com/v1",idMapping:"https://id-mapping.fansunitedstagingapi.com/v1",predictor:"https://prediction.fansunitedstagingapi.com/v1",client:"https://client.fansunitedstagingapi.com/v1",loyalty:"https://loyalty.fansunitedstagingapi.com/v1",miniGames:"https://mini-games.fansunitedstagingapi.com/v1",discussions:"https://discussions.fansunitedstagingapi.com/v1",privateLeagues:"https://private-leagues.fansunitedstagingapi.com/v1",voting:"https://voting.fansunitedstagingapi.com/v1"}[e]},e.transformIdsToBeUnique=function(t){return Array.from(new Set(t))},e.isDisabledCache=function(t){return t||!1},e.initDisableCache=function(){return"&disable_cache=".concat(Date.now())},e.sortArrayInAscOrder=function(t){return JSON.parse(JSON.stringify(t.sort((function(t,e){return t.localeCompare(e)}))))},e.constructStringArrayWithProvidedLength=function(t,e){for(var n=[],r=0;r<e;r++)n[r]=t;return n}},15601:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var s=n(91260),o="FansUnited",u={football:{ids:[],countries:[],competitions:[],expirations:{ids:0}},profile:{info:{},statistics:{},badges:null,countries:[],expirations:{profile:0,statistics:0,badges:0}},client:{features:{},expirations:{features:0}}},l=function(){function t(t){var e=this;this.idSchema="",this.expirationProfileTimeout=600,this.expirationBadgesTimeout=3600,this.expirationClientFeaturesTimeout=14400,this.expirationFootballIdsTimeout=604800,this.clearData=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){return this.setData(u),[2]}))}))},this.getEntityById=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),r(e,void 0,void 0,(function(){var e=this;return i(this,(function(r){return[2,this.getData().football.ids.find((function(r){var i=s.ID_TYPES[e.idSchema];return r&&"".concat(r[i])===n&&r.resource===t}))]}))}))},this.getEntity=function(t,n,r){return Array.isArray(t)?e.getData().football.ids.filter((function(e){var i=s.ID_TYPES[r];return e&&t.includes("".concat(e[i]))&&e.resource===n})):e.getData().football.ids.find((function(e){var i=s.ID_TYPES[r];return e&&"".concat(e[i])===t&&e.resource===n}))},this.getEntityByNativeId=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),e.getData().football.ids.find((function(e){return e&&"".concat(e.id)===n&&e.resource===t}))},this.checkForExistingIdObjs=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a=this;return i(this,(function(i){return e=s.ID_TYPES[n],r={},Object.keys(t).forEach((function(i){var s=t[i],o=a.getEntity(s,i,n).map((function(t){return t[e]})),u=t[i].filter((function(t){return!o.includes(t)}));r[i]=s.map((function(t){return u.includes(t)?{id:t,exists:!1}:{id:t,exists:!0}}))})),[2,r]}))}))},this.getIdsByType=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,o,u=this;return i(this,(function(i){return e=s.ID_TYPES[a],r=s.ID_TYPES[n],o={},Object.keys(t).forEach((function(n){var i=t[n],a=[];u.getData().football.ids.forEach((function(t){i.forEach((function(i,s){i===t[r]&&n===t.resource&&(a[s]=t[e])}))})),o[n]=a})),[2,o]}))}))},this.addIdMapping=function(t){var n=e.getData();n.football.ids.push(t),e.setData(n)},this.addIdMappings=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){return e=this.getData(),n=e.football.ids,n=a(a([],n,!0),t,!0),e.football.ids=n,this.setData(e),[2]}))}))},this.addTopIdMappings=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){return(e=this.getData()).football.ids.length?(n=(n=JSON.parse(JSON.stringify(e.football.ids))).filter((function(t){return"match"!==t.resource})),t=t.filter((function(t){return"match"===t.resource})),n=a(a([],n,!0),t,!0),e.football.ids=n):e.football.ids=t,e.football.expirations.ids=Math.floor(Date.now()/1e3)+this.expirationFootballIdsTimeout,this.setData(e),[2]}))}))},this.setOwnProfile=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getData()).profile.info=t,e.profile.expirations.profile=Math.floor(Date.now()/1e3)+this.expirationProfileTimeout,this.setData(e),[2]}))}))},this.getOwnProfile=function(){return e.getData().profile.info},this.getProfileCountries=function(){return e.getData().profile.countries},this.setProfileCountries=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getData()).profile.countries=t,this.setData(e),[2]}))}))},this.getProfileStats=function(){return e.getData().profile.statistics},this.setProfileStats=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getData()).profile.statistics=t,e.profile.expirations.statistics=Math.floor(Date.now()/1e3)+this.expirationProfileTimeout,this.setData(e),[2]}))}))},this.getProfileBadges=function(){return e.getData().profile.badges},this.setProfileBadges=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getData()).profile.badges=t,e.profile.expirations.badges=Math.floor(Date.now()/1e3)+this.expirationBadgesTimeout,this.setData(e),[2]}))}))},this.getFootballCountries=function(){return e.getData().football.countries},this.setFootballCountries=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getData()).football.countries=t,this.setData(e),[2]}))}))},this.getCompetitions=function(t){var n=e.getData();return t?t.competitionSearchFilter(n.football.competitions):n.football.competitions},this.setCompetitions=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){return e=this.getData(),(n=a([],e.football.competitions,!0)).push.apply(n,t),e.football.competitions=this.makeCompetitionsUnique(n),this.setData(e),[2]}))}))},this.getCompetitionsLength=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){return[2,this.getData().football.competitions.length]}))}))},this.getClientFeatures=function(){return e.getData().client.features},this.setClientFeatures=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){return e=this.getData(),n=JSON.parse(JSON.stringify(t)),e.client.expirations.features=Math.floor(Date.now()/1e3)+this.expirationClientFeaturesTimeout,e.client.features=n,this.setData(e),[2]}))}))},this.deleteClientFeatures=function(){return r(e,void 0,void 0,(function(){var t,e;return i(this,(function(n){return t=this.getData(),(e=JSON.parse(JSON.stringify(t))).client={features:{},expirations:{features:0}},this.setData(e),[2]}))}))},this.getExpiration=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(this.initialNewSchema(t,"expirations"),e=this.getData(),n){case"profile":return[2,e.profile.expirations.profile];case"statistics":return[2,e.profile.expirations.statistics];case"badges":return[2,e.profile.expirations.badges];case"features":return[2,e.client.expirations.features];case"ids":return[2,e.football.expirations.ids]}return[2]}))}))},this.makeCompetitionsUnique=function(t){var e=new Set;return t.filter((function(t){var n=!e.has(t.id);return e.add(t.id),n}))},this.getData=function(){return localStorage.getItem(o)||e.setData(u),JSON.parse(localStorage.getItem(o))},this.setData=function(t){localStorage.setItem(o,JSON.stringify(t))},this.initialNewSchema=function(t,n){var r=e.getData();r&&r[t]&&r[t][n]||e.setData(u)},this.idSchema=t}return t.getInstance=function(e){return t.instance||(t.instance=new t(e)),t.instance},t}();e.default=l},5318:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.invalidTypeMessage=e.missingFieldsMessage=e.invalidFieldMessage=e.invalidMarketTopXMessage=e.invalidMarketMessage=e.invalidPredictionMessage=e.WarningMessages=e.ErrorMessages=void 0;var r,i=n(91260);(r=e.ErrorMessages||(e.ErrorMessages={})).INVALID_MATCH_ID="Match id is invalid!",r.INVALID_PLAYER_ID="Player id is invalid!",r.QUERY_PARAM_MATCH_IDS_EXCEEDED="Maximum matchIds in PredictionFilters should be 10 or less.",r.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED="Maximum limit for filtering games is 50 or less.",r.INVALID_FIXTURES_FIELD="Fixtures field is invalid. For more information please visit our documentation",r.INVALID_TOKEN="Invalid JWT token is provided",r.EXPIRED_TOKEN="The provided JWT token is expired",r.ENTITIES_NEEDED="At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.",r.ENTITIES_FOLLOWS_FILTERS_EXCEEDED="Maximum length per entity should be 24 or less.",r.INVALID_TYPE="You have provided invalid type. The valid type is ",r.INVALID_VALUE="You have provided invalid value. The valid value is ",r.INVALID_AVATAR="Invalid URL syntax for avatar image.",r.INVALID_GET_PROFILES_METHOD_CALL="The method 'getByIds' from Profile namespace is not called correctly. You need to provide 'profileIds' OR 'search' parameters to the method, but you can't use both of them or neither of them.",r.INVALID_LIMIT="Invalid limit. The maximum limit is: ",r.INVALID_LIMIT_TYPE="Invalid limit type. The proper type is number.",r.FILTER_COMBINATION_ERROR="You need to use both 'entityIds' and 'entityType' filters together",r.INVALID_ENTITY_TYPE="Invalid 'entityType' filter. Please use one of the following valid options: competition, team, or player",r.INVALID_TEMPLATE_GROUP_ID="There is no group in this template with the provided groupId",r.INVALID_TEMPLATE_GROUP_FILTERS="The provided template group has no filters",r.INVALID_PAGE_NUMBER="Invalid page number provided. Use number between 1 and max number of pages.",r.INVALID_DISCUSSION_IDS="Invalid discussion ids argument. Please provide at least one discussion id in an array",r.EXCEEDED_DISCUSSION_IDS="Maximum number of discussion ids exceeded. The maximum number of discussion ids is 50. You can use 'getPostsCountExtended' method for more than 50 discussion ids.",r.EXCEEDED_EXTENDED_DISCUSSION_IDS="Maximum number of discussion ids exceeded. The maximum number of discussion ids is: ",r.ID_MAPPING_NOT_FOUND="No ID mappings are available for the provided ID. ID argument: ",r.INVALID_PARAM="Invalid parameter provided. Please check the following parameter: ",r.INVALID_COMPETITION_ID="Invalid competition ID provided. Please provide a valid competition ID.",r.INVALID_TEAM_ID="Invalid team ID provided. Please provide a valid team ID.",r.INVALID_OR_EMPTY_IDS="Invalid or empty IDs provided. Please provide at least one ID.",r.INVALID_PROVIDER="Invalid provider. The valid providers are: 'native', 'enetpulse', 'sportal365', 'sportradar' and 'api_football'.",r.INVALID_OUTPUT_PROVIDER="Invalid output provider. The output can not be the same as the input provider.",r.MATCH_SUMMARY_REQUIRED="Match summary is required.",r.MATCH_SUMMARY_PREDICTIONS_REQUIRED="Predictions in match summary are required.",r.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS="Keys in predictions in match summary are invalid. The valid ones are: ",r.INVALID_COLLECT_LEAD_METHOD_CALL="The method 'collectLead' from Profile namespace is not called correctly. You need to provide 'requestBody' parameter to the method.",r.REQUIRED_FIXTURES_FIELD="Fixtures field is required and should contain at least one fixtures object. For more information please visit our documentation",r.INVALID_TIEBREAKER_FIELD="Tiebreaker field is invalid. It should contain statTotal key with integer value. For more information please visit our documentation",r.ENTITY_IDS_NOT_FOUND="Some of the sport entity IDs were not found for the provided id schema",r.MATCH_IDS_NOT_FOUND="Some of the match IDs were not found for the provided id schema",r.INVALID_STANDING_PREDICTION_ARGUMENT="The prediction argument is invalid. For more information please visit our documentation",r.INVALID_MAP_PLAYERS_ROLES_KEYS="The keys in the players roles map are not part of the valid keys. The valid keys are: ",r.INVALID_MAP_PLAYERS_ROLES_VALUES="The values in the map are not valid. The valid ones are: ",r.INVALID_MATCH_IDS="Match IDs are invalid!",r.MISSING_ODD_CLIENT_CONFIGURATION="Odds namespace requires oddClient configuration to be set",e.WarningMessages={UNEXPECTED_STATUS_PROP:"Unexpected provided property 'status'. You can NOT use this property for this method. For more information visit our documentation: \n ".concat(i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION),UNEXPECTED_TYPE_PROP:"Unexpected provided property 'type'. You can NOT use this property for this method. For more information visit our documentation: \n ".concat(i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION)},e.invalidPredictionMessage=function(t,e){return"The prediction '".concat(t,"' is invalid for market '").concat(e,"'. Please check again have you passed appropriate prediction model. For more information please visit our documentation: https://docs.fansunitedmedia.com/sdks/js/match.quiz#gamerelatedoperations")},e.invalidMarketMessage=function(t){return"The market '".concat(t,"' is not supported from Fans United. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction")},e.invalidMarketTopXMessage=function(t){return"The market '".concat(t,"' is not valid for Top X game. The only available market is CORRECT_SCORE.")},e.invalidFieldMessage=function(t){return"The field/s '".concat(t.length>1?t.join(", "):t[0],"' is/are invalid. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk")},e.missingFieldsMessage=function(t,e){return"The following field/s is/are missing from ".concat(t,": '").concat(e.length>1?e.join(", "):e[0],"'. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction")},e.invalidTypeMessage=function(t,e){return"The field ".concat(t," has incorrect type. The correct type is ").concat(e)}},81282:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.primaryColor=null,this.secondaryColor=null,this.contentColor=null,this.backgroundColor=null,this.borderColor=null,this.additionalColor=null}},1997:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.mainLogo=null,this.mobileLogo=null,this.backgroundImage=null,this.mobileBackgroundImage=null,this.additionalImage=null}},6862:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.colors=null,this.urls=null,this.images=null}},12291:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.primaryUrl=null,this.secondaryUrl=null,this.privacyPolicyUrl=null,this.termsAndConditionsUrl=null,this.additionalUrl=null}},43529:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profile=null,this.football=null,this.predictor=null,this.loyalty=null,this.topX=null,this.matchQuiz=null,this.activity=null,this.miniGames=null,this.discussions=null,this.privateLeagues=null,this.challenges=null,this.progress=null,this.voting=null,this.fantasy=null,this.helpers=null,this.idMapping=null,this.bracketGame=null,this.lists=null,this.standingGame=null,this.eventGame=null,this.odds=null,this.getVersion=null}},64800:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=t&&t.limit?t.limit:null,this.startAfter=t&&t.startAfter?t.startAfter:null}return t.prototype.constructMainFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit=".concat(this.limit)),this.startAfter&&(t+="&",t+="start_after=".concat(this.startAfter)),t},t}();e.default=n},30439:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.main=null,this.cover=null,this.mobile=null}},38872:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(18902));e.default=function(){this.pagination=new i.default}},18902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.nextPageStartsAfter=null,this.itemsPerPage=null}},81553:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},53623:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.remapMetaData=function(t){var e=new i.default;return e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e.pagination.itemsPerPage=t.pagination.items_per_page,e}}},55955:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.preferenceId=""}},62475:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.preferenceId="",this.categories=[],this.source=""}},63483:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityId=null,this.entityType=null}},78923:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityId=null,this.entityType=null,this.entityRelationship=null}},16692:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(81282)),a=r(n(1997)),s=r(n(6862)),o=r(n(12291));e.default=function(){this.remapBranding=function(t){var e=new s.default;return t.colors&&(e.colors=new i.default,e.colors.primaryColor=t.colors.primary_color,e.colors.secondaryColor=t.colors.secondary_color,e.colors.contentColor=t.colors.content_color,e.colors.backgroundColor=t.colors.background_color,e.colors.borderColor=t.colors.border_color,e.colors.additionalColor=t.colors.additional_color),t.urls&&(e.urls=new o.default,e.urls.primaryUrl=t.urls.primary_url,e.urls.secondaryUrl=t.urls.secondary_url,e.urls.privacyPolicyUrl=t.urls.privacy_policy_url,e.urls.termsAndConditionsUrl=t.urls.terms_and_conditions_url,e.urls.additionalUrl=t.urls.additional_url),t.images&&(e.images=new a.default,e.images.mainLogo=t.images.main_logo,e.images.mobileLogo=t.images.mobile_logo,e.images.backgroundImage=t.images.background_image,e.images.mobileBackgroundImage=t.images.mobile_background_image,e.images.additionalImage=t.images.additional_image),e}}},9018:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o,u=s(n(70321)),l=n(91260);!function(t){t.PROFILE="profile",t.PROFILE_BADGES="profile_badges",t.PROFILE_STATS="profile_stats",t.PROFILE_COUNTRIES="profile_countries",t.IDS="ids",t.CLIENT="client",t.FOOTBALL_COMPETITIONS="football_competitions",t.FOOTBALL_COUNTIRES="football_countries"}(o||(o={}));var c=function(){function t(e){var n=this;this.profileTTL=600,this.clientTTL=14400,this.profileBadgesTTL=3600,this.idMappingsExpiration=0,this.idSchema="",this.clearData=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.flushAll()]}))}))},this.getEntityById=function(e,a){return r(n,void 0,void 0,(function(){var n,r=this;return i(this,(function(i){return(n=t.nodeCache.get(o.IDS))?[2,n.find((function(t){var n=l.ID_TYPES[r.idSchema];return t&&"".concat(t[n])===a&&t.resource===e}))]:[2,null]}))}))},this.getEntity=function(e,a,s){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){return(n=t.nodeCache.get(o.IDS))?[2,Array.isArray(e)?[]:null]:Array.isArray(e)?[2,n.filter((function(t){var n=l.ID_TYPES[s];return t&&e.includes("".concat(t[n]))&&t.resource===a}))]:[2,n.find((function(t){var n=l.ID_TYPES[s];return t&&"".concat(t[n])===e&&t.resource===a}))]}))}))},this.checkForExistingIdObjs=function(t,e){return r(n,void 0,void 0,(function(){var n,r,a,s,o,u,c;return i(this,(function(d){switch(d.label){case 0:n=l.ID_TYPES[e],r={},a=function(a){var o,u,l,c;return i(this,(function(i){switch(i.label){case 0:return o=t[a],[4,s.getEntity(o,a,e)];case 1:return u=i.sent(),l=u.map((function(t){return t[n]})),c=t[a].filter((function(t){return!l.includes(t)})),r[a]=o.map((function(t){return c.includes(t)?{id:t,exists:!1}:{id:t,exists:!0}})),[2]}}))},s=this,o=0,u=Object.keys(t),d.label=1;case 1:return o<u.length?(c=u[o],[5,a(c)]):[3,4];case 2:d.sent(),d.label=3;case 3:return o++,[3,1];case 4:return[2,r]}}))}))},this.getIdsByType=function(e,a,s){return r(n,void 0,void 0,(function(){var n,r,u,c;return i(this,(function(i){return n=l.ID_TYPES[s],r=l.ID_TYPES[a],u=t.nodeCache.get(o.IDS),c={},u?(Object.keys(e).forEach((function(t){var i=e[t],a=[];u.forEach((function(e){i.forEach((function(i,s){i===e[r]&&t===e.resource&&(a[s]=e[n])}))})),c[t]=a})),[2,c]):[2,null]}))}))},this.addIdMapping=function(e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){return(n=t.nodeCache.get(o.IDS)).push(e),t.nodeCache.set(o.IDS,n),[2]}))}))},this.addIdMappings=function(e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){return n=t.nodeCache.get(o.IDS),n=a(a([],n,!0),e,!0),t.nodeCache.set(o.IDS,n),[2]}))}))},this.addTopIdMappings=function(e){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){return(n=t.nodeCache.get(o.IDS))?(r=(r=JSON.parse(JSON.stringify(n))).filter((function(t){return"match"!==t.resource})),e=e.filter((function(t){return"match"===t.resource})),r=a(a([],r,!0),e,!0),t.nodeCache.set(o.IDS,r)):t.nodeCache.set(o.IDS,e),this.idMappingsExpiration=Math.floor(Date.now()/1e3)+604800,[2]}))}))},this.setOwnProfile=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.PROFILE,e,this.profileTTL),[2]}))}))},this.getOwnProfile=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.PROFILE)]}))}))},this.getProfileCountries=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.PROFILE_COUNTRIES)]}))}))},this.setProfileCountries=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.PROFILE_COUNTRIES,e),[2]}))}))},this.getProfileStats=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.PROFILE_STATS)]}))}))},this.setProfileStats=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.PROFILE_STATS,e,this.profileTTL),[2]}))}))},this.getProfileBadges=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.PROFILE_BADGES)]}))}))},this.setProfileBadges=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.PROFILE_BADGES,e,this.profileBadgesTTL),[2]}))}))},this.getFootballCountries=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.FOOTBALL_COUNTIRES)]}))}))},this.setFootballCountries=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.FOOTBALL_COUNTIRES,e),[2]}))}))},this.getCompetitions=function(e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){return(n=t.nodeCache.get(o.FOOTBALL_COMPETITIONS))?e?[2,e.competitionSearchFilter(n)]:[2,n]:[2,null]}))}))},this.setCompetitions=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.FOOTBALL_COMPETITIONS,e),[2]}))}))},this.getCompetitionsLength=function(){return r(n,void 0,void 0,(function(){var e;return i(this,(function(n){return[2,(e=t.nodeCache.get(o.FOOTBALL_COMPETITIONS))?e.length:0]}))}))},this.getClientFeatures=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.CLIENT)]}))}))},this.setClientFeatures=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.CLIENT,e,this.clientTTL),[2]}))}))},this.deleteClientFeatures=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return t.nodeCache.del(o.CLIENT),[2]}))}))},this.getExpiration=function(e,a){return r(n,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getKeyFromExpirationType(a))===o.IDS?[2,this.idMappingsExpiration]:[2,t.nodeCache.getTtl(e)]}))}))},this.getKeyFromExpirationType=function(t){switch(t){case"profile":return o.PROFILE;case"statistics":return o.PROFILE_STATS;case"badges":return o.PROFILE_BADGES;case"features":return o.CLIENT;case"ids":return o.IDS}}}return t.getInstance=function(e){return t.instance||(t.instance=new t(e),t.nodeCache.options.useClones=!1),t.instance},t.nodeCache=new u.default,t}();e.default=c},16198:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(68097)),a=r(n(62535));e.default=function(t){var e=this;this.errorHandlingModel=null,this.throwException=function(t,n,r){if("standard"===e.errorHandlingModel)throw new a.default(t,n,r);throw new i.default(t,n,r)},this.errorHandlingModel=t}},71022:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(92453)),c=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"loyalty"))||this;return n.activityRemapper=null,n.createActivity=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/activities".concat(this.apiSignInUrl),[4,this.fetchWithAuth(e,"There was a problem with creating activity","POST",t)];case 1:return n=r.sent(),[2,this.activityRemapper.remapSingleResponse(n)]}}))}))},n.deleteActivity=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/activities/".concat(t).concat(this.apiSignInUrl),n="There was a problem deleting the following activity: ".concat(t),[4,this.fetchWithAuth(e,n,"DELETE")];case 1:return r.sent(),[2,!0]}}))}))},n.getOwnActivities=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/activities".concat(this.apiSignInUrl),r=Date.now(),t&&(n+="".concat(t.constructFilterUrl())),e&&(n+="disable_cache=".concat(r)),[4,this.fetchWithAuth(n,"There was a problem with fetching own activities")];case 1:return i=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(i)]}}))}))},n.getActivitiesForUser=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/users/".concat(t,"/activities").concat(this.apiSignInUrl),i=Date.now(),a="There was a problem with fetching activities for user: ".concat(t),e&&(n+="".concat(e.constructFilterUrl())),r&&(n+="disable_cache=".concat(i)),[4,this.fetchWithoutAuth(n,a)];case 1:return o=s.sent(),[2,this.activityRemapper.remapActivitiesResponse(o)]}}))}))},n.getStats=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="",r="",i=null,t?(n+=(0,u.isDisabledCache)(e)?"/users/".concat(t,"/statistics").concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/users/".concat(t,"/statistics").concat(this.apiSignInUrl),r="There was a problem fetching statistics for profile: ".concat(t),[4,this.fetchWithoutAuth(n,r)]):[3,2];case 1:return i=a.sent(),[3,4];case 2:return n+="/statistics".concat(this.apiSignInUrl),r="There was a problem fetching profile`s statistics",[4,this.fetchWithAuth(n,r)];case 3:i=a.sent(),a.label=4;case 4:return[2,this.activityRemapper.remapStatsResponse(i.data)]}}))}))},n.activityRemapper=new l.default,n}return i(e,t),e}(o(n(47724)).default);e.default=c},47686:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureConfigEnum=void 0;var u,l=n(90712),c=o(n(60704)),d=o(n(47724)),f=o(n(78358)),h=o(n(56412));(u=e.FeatureConfigEnum||(e.FeatureConfigEnum={})).PREDICTOR="predictor",u.TOP_X="topX",u.MATCH_QUIZ="matchQuiz",u.LOYALTY="loyalty",u.DISCUSSIONS="discussions",u.FANTASY="fantasy";var p=function(t){function e(e){var n=t.call(this,e,(0,l.setBaseUrl)(e.environment,"client"))||this;return n.featureConfigRemapper=null,n.listContentRemapper=null,n.localStorage=null,n.clientId=null,n.getConfig=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return[4,this.getCachedFeatures()];case 1:return(e=s.sent())?[3,4]:(n="/clients/".concat(this.clientId,"/features"),r=this.apiSignInUrl.split("&")[0],i=n+r,[4,this.fetchWithoutAuth(i,"There was a problem fetching client features from Client API")]);case 2:return a=s.sent(),e=a.data,[4,this.localStorage.setClientFeatures(e)];case 3:s.sent(),s.label=4;case 4:switch(t){case"predictor":return[2,this.featureConfigRemapper.remapPredictorConfig(e.predictor)];case"topX":return[2,this.featureConfigRemapper.remapTopXConfig(e.top_x)];case"matchQuiz":return[2,this.featureConfigRemapper.remapMatchQuizConfig(e.match_quiz)];case"loyalty":return[2,this.featureConfigRemapper.remapLoyaltyConfig(e.loyalty)];case"discussions":return[2,this.featureConfigRemapper.remapDiscussionsConfig(e.discussions)];case"fantasy":return[2,this.featureConfigRemapper.remapFantasyConfig(e.football_fantasy)]}return[2]}}))}))},n.getNewLoyaltyConfig=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return e="/clients/".concat(this.clientId,"/features"),n=this.apiSignInUrl.split("&")[0],r="There was a problem fetching client features from Client API",t?(a=e+n+(0,l.initDisableCache)(),[4,this.fetchWithoutAuthAdditionalHeaders(a,r,{"x-api-version":"2"})]):[3,3];case 1:return o=s.sent(),[4,this.localStorage.setClientFeatures(o.data)];case 2:s.sent(),s.label=3;case 3:return[4,this.getCachedFeatures()];case 4:return(i=s.sent())?[3,7]:(a=e+n,[4,this.fetchWithoutAuthAdditionalHeaders(a,r,{"x-api-version":"2"})]);case 5:return o=s.sent(),i=o.data,[4,this.localStorage.setClientFeatures(i)];case 6:s.sent(),s.label=7;case 7:return[2,this.featureConfigRemapper.remapLoyaltyNewConfig(i.loyalty)]}}))}))},n.getListContent=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/clients/".concat(this.clientId,"/lists/").concat(t,"/content").concat(this.apiSignInUrl),e&&(n+=e.constructFiltersUrl()),(0,l.isDisabledCache)(r)&&(n+=(0,l.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem fetching client list content")];case 1:return i=a.sent(),[2,this.listContentRemapper.remapListContent(i)]}}))}))},n.getCachedFeatures=function(){return a(n,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return[4,this.getLocalStorageData()];case 1:return(t=e.sent())&&Object.keys(t).length?t.predictor.client_id&&t.predictor.client_id!==this.clientId?[4,this.localStorage.deleteClientFeatures()]:[3,3]:[2];case 2:return e.sent(),[2,null];case 3:return[2,t]}}))}))},n.getLocalStorageData=function(){return a(n,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t=Math.floor(Date.now()/1e3),[4,this.localStorage.getExpiration("client","features")];case 1:return e.sent()>t?[4,this.localStorage.getClientFeatures()]:[3,3];case 2:return[2,e.sent()];case 3:return[2,null]}}))}))},n.clientId=e.clientId,n.localStorage=(new f.default).createLocalCacheInstance(e.idSchema),n.featureConfigRemapper=new c.default,n.listContentRemapper=new h.default,n}return i(e,t),e}(d.default);e.default=p},91450:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(34227)),c=o(n(86075)),d=o(n(47724)),f=o(n(86827)),h={id:"",profile_id:"",total_points:null,game_points:null,bonus_points:null,position:null,status:"ACTIVE",game_id:"",fixtures:[],tiebreaker:{stat_total:0},updated_at:"",created_at:""},p=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"predictor"))||this;return n.bracketGameRemapper=null,n.standingGameRemapper=null,n.eventGameRemapper=null,n.getBracketGames=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n=t?"/custom/bracket".concat(this.apiSignInUrl).concat(t.constructMainFiltersUrl()):"/custom/bracket".concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching bracket games list")];case 1:return r=i.sent(),[2,this.bracketGameRemapper.remapBracketGames(r)]}}))}))},n.getBracketGameById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,u.isDisabledCache)(e)?"/custom/bracket/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/custom/bracket/".concat(t).concat(this.apiSignInUrl),r="There was a problem with fetching bracket game with the following ID: "+t,[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.bracketGameRemapper.remapBracketGameById(i)]}}))}))},n.makeBracketGamePrediction=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/custom/bracket/".concat(t,"/predictions").concat(this.apiSignInUrl),r="There was a problem with making prediction for bracket game with the following ID: "+t,(i=JSON.parse(JSON.stringify(e))).fixtures=this.bracketGameRemapper.remapPredictionToRequestBody(e.fixtures),e.tiebreaker&&(i.tiebreaker={stat_total:e.tiebreaker.statTotal}),[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return a=s.sent(),[2,this.bracketGameRemapper.remapPrediction(a)]}}))}))},n.updateBracketGamePrediction=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/custom/bracket/".concat(t,"/predictions/").concat(e).concat(this.apiSignInUrl),i="There was a problem with updating prediction for bracket game with the following ID: "+t,(a=JSON.parse(JSON.stringify(r))).fixtures=this.bracketGameRemapper.remapPredictionToRequestBody(r.fixtures),r.tiebreaker&&(a.tiebreaker={stat_total:r.tiebreaker.statTotal}),[4,this.fetchWithAuth(n,i,"PUT",a)];case 1:return o=s.sent(),[2,this.bracketGameRemapper.remapPrediction(o)]}}))}))},n.getBracketGamePredictionsForUser=function(t,e,r,i){return a(n,void 0,void 0,(function(){var n,a,o;return s(this,(function(s){switch(s.label){case 0:return n=r?"/custom/bracket/".concat(t,"/predictions").concat(this.apiSignInUrl,"&profile_id=").concat(e).concat(r.constructMainFiltersUrl()):"/custom/bracket/".concat(t,"/predictions").concat(this.apiSignInUrl,"&profile_id=").concat(e),(0,u.isDisabledCache)(i)&&(n+=(0,u.initDisableCache)()),a="There was a problem with getting all predictions for user with ID ".concat(e," for bracket game with ID ").concat(t),[4,this.fetchWithoutAuth(n,a)];case 1:return o=s.sent(),[2,this.bracketGameRemapper.remapPredictionsForUser(o)]}}))}))},n.getBracketGamePredictionById=function(t,e,r){return a(n,void 0,void 0,(function(){var n;return s(this,(function(i){return(0,u.isDisabledCache)(r)?"/custom/bracket/".concat(t,"/predictions/").concat(e,"/").concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/custom/bracket/".concat(t,"/predictions/").concat(e,"/").concat(this.apiSignInUrl),"There was a problem with getting prediction with ID ".concat(e," for bracket game with ID ").concat(t),(n=JSON.parse(JSON.stringify(h))).id=e,n.game_id=t,n.tiebreaker=null,[2,Promise.resolve(this.bracketGameRemapper.remapPrediction(n))]}))}))},n.getBracketGameRankings=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n=e?"/custom/bracket/".concat(t,"/ranking").concat(this.apiSignInUrl).concat(e.constructMainFiltersUrl()):"/custom/bracket/".concat(t,"/ranking").concat(this.apiSignInUrl),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),i="There was a problem with getting rankings for bracket game with ID ".concat(t),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.bracketGameRemapper.remapRankings(a)]}}))}))},n.getStandingsGames=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n=t?"/custom/standing".concat(this.apiSignInUrl).concat(t.constructMainFiltersUrl()):"/custom/standing".concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching standings games list")];case 1:return r=i.sent(),[2,this.standingGameRemapper.remapBracketGames(r)]}}))}))},n.getStandingGameById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,u.isDisabledCache)(e)?"/custom/standing/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/custom/standing/".concat(t).concat(this.apiSignInUrl),r="There was a problem with fetching standing game with the following ID: "+t,[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.standingGameRemapper.remapStandingGameById(i)]}}))}))},n.makeStandingGamePrediction=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/custom/standing/".concat(t,"/predictions").concat(this.apiSignInUrl),r="There was a problem with making prediction for standing game with the following ID: "+t,i={standing:e},[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return a=s.sent(),[2,this.standingGameRemapper.remapPrediction(a)]}}))}))},n.updateStandingGamePrediction=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/custom/standing/".concat(t,"/predictions/").concat(e).concat(this.apiSignInUrl),i="There was a problem with updating prediction for standing game with the following ID: "+t,a={standing:r},[4,this.fetchWithAuth(n,i,"PUT",a)];case 1:return o=s.sent(),[2,this.standingGameRemapper.remapPrediction(o)]}}))}))},n.getStandingGamePredictionsForUser=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/custom/standing/".concat(t,"/predictions").concat(this.apiSignInUrl,"&profile_id=").concat(e),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),i="There was a problem with getting prediction for user with ID ".concat(e," for standing game with ID ").concat(t),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.standingGameRemapper.remapPredictionsForUser(a)]}}))}))},n.getStandingGameRankings=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n=e?"/custom/standing/".concat(t,"/ranking").concat(this.apiSignInUrl).concat(e.constructMainFiltersUrl()):"/custom/standing/".concat(t,"/ranking").concat(this.apiSignInUrl),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),i="There was a problem with getting rankings for standing game with ID ".concat(t),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.standingGameRemapper.remapRankings(a)]}}))}))},n.getEventGames=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n=t?"/custom/event".concat(this.apiSignInUrl).concat(t.constructMainFiltersUrl()):"/custom/event".concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching event games list")];case 1:return r=i.sent(),[2,this.eventGameRemapper.remapEventGames(r)]}}))}))},n.getEventGameById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,u.isDisabledCache)(e)?"/custom/event/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/custom/event/".concat(t).concat(this.apiSignInUrl),r="There was a problem with fetching event game with the following ID: "+t,[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.eventGameRemapper.remapEventGameById(i)]}}))}))},n.makeEventGamePrediction=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/custom/event/".concat(t,"/predictions").concat(this.apiSignInUrl),r="There was a problem with making prediction for event game with the following ID: "+t,(i=JSON.parse(JSON.stringify(e))).fixtures=this.eventGameRemapper.remapPredictionToRequestBody(e.fixtures),e.tiebreaker&&(i.tiebreaker={stat_total:e.tiebreaker.statTotal}),[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return a=s.sent(),[2,this.eventGameRemapper.remapPrediction(a)]}}))}))},n.updateEventGamePrediction=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/custom/event/".concat(t,"/predictions/").concat(e).concat(this.apiSignInUrl),i="There was a problem with updating prediction for event game with the following ID: "+t,(a=JSON.parse(JSON.stringify(r))).fixtures=this.eventGameRemapper.remapPredictionToRequestBody(r.fixtures),r.tiebreaker&&(a.tiebreaker={stat_total:r.tiebreaker.statTotal}),[4,this.fetchWithAuth(n,i,"PUT",a)];case 1:return o=s.sent(),[2,this.eventGameRemapper.remapPrediction(o)]}}))}))},n.getEventGamePredictionsForUser=function(t,e,r,i){return a(n,void 0,void 0,(function(){var n,a,o;return s(this,(function(s){switch(s.label){case 0:return n=r?"/custom/event/".concat(t,"/predictions").concat(this.apiSignInUrl,"&profile_id=").concat(e).concat(r.constructMainFiltersUrl()):"/custom/event/".concat(t,"/predictions").concat(this.apiSignInUrl,"&profile_id=").concat(e),(0,u.isDisabledCache)(i)&&(n+=(0,u.initDisableCache)()),a="There was a problem with getting all predictions for user with ID ".concat(e," for event game with ID ").concat(t),[4,this.fetchWithoutAuth(n,a)];case 1:return o=s.sent(),[2,this.eventGameRemapper.remapPredictionsForUser(o)]}}))}))},n.getEventGameRankings=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n=e?"/custom/event/".concat(t,"/ranking").concat(this.apiSignInUrl).concat(e.constructMainFiltersUrl()):"/custom/event/".concat(t,"/ranking").concat(this.apiSignInUrl),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),i="There was a problem with getting rankings for event game with ID ".concat(t),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.eventGameRemapper.remapRankings(a)]}}))}))},n.bracketGameRemapper=new l.default,n.standingGameRemapper=new c.default,n.eventGameRemapper=new f.default,n}return i(e,t),e}(d.default);e.default=p},87945:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(43476)),c=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"discussions"))||this;return n.remapper=null,n.getAll=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/discussions"+this.apiSignInUrl,t&&(n+="".concat(t.constructMainFiltersUrl())),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem getting discussions")];case 1:return r=i.sent(),[2,this.remapper.remapToDiscussions(r)]}}))}))},n.getById=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/discussions/".concat(t)+this.apiSignInUrl,[4,this.fetchWithoutAuth(e,"There was a problem getting discussion")];case 1:return n=r.sent(),[2,this.remapper.remapToDiscussionById(n.data)]}}))}))},n.createPost=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/discussions/".concat(t,"/posts")+this.apiSignInUrl,[4,this.fetchWithAuth(n,"There was a problem creating post in discussion","POST",e)];case 1:return r=i.sent(),[2,this.remapper.remapToPostByIdBasic(r.data)]}}))}))},n.getPostById=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/posts/".concat(t)+this.apiSignInUrl,[4,this.fetchWithoutAuth(e,"There was a problem getting post by ID in discussion")];case 1:return n=r.sent(),[2,this.remapper.remapToPostByIdFull(n.data)]}}))}))},n.updatePost=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/posts/".concat(t)+this.apiSignInUrl,r={content:e},[4,this.fetchWithAuth(n,"There was a problem editing post in discussion","PUT",r)];case 1:return i=a.sent(),[2,this.remapper.remapToPostByIdBasic(i.data)]}}))}))},n.reactToPost=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/posts/".concat(t,"/reaction")+this.apiSignInUrl,r={reaction:e.toLocaleLowerCase()},[4,this.fetchWithAuth(n,"There was a problem reacting to post in discussion","PUT",r)];case 1:return i=a.sent(),[2,this.remapper.remapToPostByIdFull(i.data)]}}))}))},n.deletePost=function(t){return a(n,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/posts/".concat(t)+this.apiSignInUrl,[4,this.fetchWithAuth(e,"There was a problem deleting post in discussion","DELETE")];case 1:return n.sent(),[2,!0]}}))}))},n.getPosts=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/discussions/".concat(t,"/posts")+this.apiSignInUrl,e&&(n+="".concat(e.constructMainFiltersUrl())),[4,this.fetchWithoutAuth(n,"There was a problem getting posts in discussion")];case 1:return r=i.sent(),[2,this.remapper.remapToPostsForDiscussion(r,"full")]}}))}))},n.getPostReplies=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/posts/".concat(t,"/replies")+this.apiSignInUrl,e&&(n+="".concat(e.constructMainFiltersUrl())),[4,this.fetchWithoutAuth(n,"There was a problem getting post's replies in discussion")];case 1:return r=i.sent(),[2,this.remapper.remapToPostsForDiscussion(r,"full")]}}))}))},n.reportPost=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/posts/".concat(t,"/report")+this.apiSignInUrl,i={reason:e.toLocaleUpperCase(),reason_details:r||null},[4,this.fetchWithAuth(n,"There was a problem reporting post in discussion","POST",i)];case 1:return a=s.sent(),[2,this.remapper.remapToPostByIdBasic(a.data)]}}))}))},n.getOwnPosts=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/posts"+this.apiSignInUrl,t&&(e+="".concat(t.constructMainFiltersUrl())),[4,this.fetchWithAuth(e,"There was a problem getting own posts")];case 1:return n=r.sent(),[2,this.remapper.remapToPosts(n)]}}))}))},n.getUserPosts=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/posts/users/".concat(t)+this.apiSignInUrl,e&&(n+="".concat(e.constructMainFiltersUrl())),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem getting user's posts")];case 1:return i=a.sent(),[2,this.remapper.remapToPosts(i)]}}))}))},n.getPostsCount=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/discussions/posts/count"+this.apiSignInUrl+"&discussion_ids=".concat(t.join(",")),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem getting posts count for discussions")];case 1:return r=i.sent(),[2,this.remapper.remapToPostCount(r.data)]}}))}))},n.getTopDiscussions=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/discussions/top"+this.apiSignInUrl,t&&(n+="".concat(t.constructMainFiltersUrl())),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem getting top discussions")];case 1:return r=i.sent(),[2,this.remapper.remapToDiscussions(r)]}}))}))},n.getPostsCountExtended=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="/discussions/posts/count"+this.apiSignInUrl,n={discussion_ids:Array.from(t)},[4,this.fetchWithoutAuth(e,"There was a problem getting posts count extended for discussions","POST",n)];case 1:return r=i.sent(),[2,this.remapper.remapToPostCount(r.data)]}}))}))},n.remapper=new l.default,n}return i(e,t),e}(o(n(47724)).default);e.default=c},60595:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(90712),c=u(n(23430)),d=u(n(67316)),f=u(n(38758)),h=u(n(95827)),p=u(n(17821)),m=u(n(95284)),v=u(n(9330)),_=u(n(4729)),y=u(n(75157)),g=u(n(97943)),b=u(n(77287)),w=u(n(86134)),E=u(n(90753)),I=u(n(91925)),M=u(n(47724)),O=u(n(89582)),P=u(n(9260)),T=function(t){function e(e){var n=t.call(this,e,(0,l.setBaseUrl)(e.environment,"football"))||this;return n.limitIds=200,n.countryRemapper=null,n.competitionBasicRemapper=null,n.competitionFullRemapper=null,n.teamBasicRemapper=null,n.teamFullRemapper=null,n.matchBasicRemapper=null,n.matchFullRemapper=null,n.playerBasicRemapper=null,n.playerFullRemapper=null,n.topPlayerRemapper=null,n.searchRemapper=null,n.footballMetaRemapper=null,n.fantasyRemapper=null,n.footballService=null,n.getCountries=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return e="/countries".concat(this.apiSignInUrl),n=Date.now(),t&&(e+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(e,"There was a problem with the football countries request")];case 1:return r=i.sent(),[2,this.countryRemapper.countriesFromResponse(r.data)]}}))}))},n.getCompetitions=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,a,s,u,c,d,f,h=this;return o(this,(function(o){switch(o.label){case 0:if(n=Date.now(),r="There was a problem with football competitions request",e=e||!1,!(t&&t.competitionIds&&t.competitionIds.length>this.limitIds-1))return[3,5];i=[],a=(0,l.limitIds)(t.competitionIds,this.limitIds),s=0,u=a,o.label=1;case 1:return s<u.length?(c=u[s],t.competitionIds=c,d="/competitions".concat(this.apiSignInUrl).concat(t.constructFilterUrl()),e&&(d+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(d,r)]):[3,4];case 2:f=o.sent(),i.push(f.data.map((function(t){return h.competitionBasicRemapper.fromResponse(t)}))),o.label=3;case 3:return s++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d="/competitions".concat(this.apiSignInUrl),t&&(d+="".concat(t.constructFilterUrl())),e&&(d+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(d,r)];case 6:return[2,(f=o.sent()).data.map((function(t){return h.competitionBasicRemapper.fromResponse(t)}))]}}))}))},n.getCompetitionById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/competitions/".concat(t).concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with football competition by ID request")];case 1:return i=a.sent(),[2,this.competitionFullRemapper.fromResponse(i.data)]}}))}))},n.getTopCompetitions=function(t){return s(n,void 0,void 0,(function(){var e,n,r=this;return o(this,(function(i){switch(i.label){case 0:return e="/competitions/top".concat(this.apiSignInUrl),n=Date.now(),t&&(e+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(e,"There was a problem with top football competitions request")];case 1:return[2,i.sent().data.map((function(t){return r.competitionBasicRemapper.fromResponse(t)}))]}}))}))},n.getTeams=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,a,s,u,c,d,f,h,p=this;return o(this,(function(o){switch(o.label){case 0:if(n=Date.now(),r="There was a problem with football teams request",!(t&&t.teamIds&&t.teamIds.length>this.limitIds))return[3,5];i=[],a=(0,l.limitIds)(t.teamIds,this.limitIds),s=0,u=a,o.label=1;case 1:return s<u.length?(c=u[s],t.teamIds=c,t.limit=c.length,f="/teams".concat(this.apiSignInUrl).concat(t.constructFilterUrl()),e&&(f+="disable_cache=".concat(n)),[4,this.fetchWithoutAuth(f,r)]):[3,4];case 2:h=o.sent(),i.push(h.data.map((function(t){return p.teamBasicRemapper.fromResponse(t)}))),o.label=3;case 3:return s++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new E.default,f="/teams".concat(this.apiSignInUrl),t&&(f+="".concat(t.constructFilterUrl())),e&&(f+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(f,r)];case 6:return h=o.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(h.meta),d.data=h.data.map((function(t){return p.teamBasicRemapper.fromResponse(t)})),[2,d]}}))}))},n.getTeamById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/teams/".concat(t).concat(this.apiSignInUrl),r=Date.now(),e&&(n+="disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with football team by ID request")];case 1:return i=a.sent(),[2,this.teamFullRemapper.fromResponse(i.data)]}}))}))},n.getTopTeams=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i=this;return o(this,(function(a){switch(a.label){case 0:return e="/teams/top".concat(this.apiSignInUrl),n=Date.now(),t&&(e+="$disable_cache=".concat(n)),[4,this.fetchWithoutAuth(e,"There was a problem with top football teams request")];case 1:return[2,(r=a.sent()).data?r.data.map((function(t){return i.teamBasicRemapper.fromResponse(t)})):[]]}}))}))},n.getNextMatchForTeam=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/teams/".concat(t,"/next-match").concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with next match for team request")];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data)]}}))}))},n.getPrevMatchForTeam=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/teams/".concat(t,"/previous-match").concat(this.apiSignInUrl),r=Date.now(),e&&(n+="disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with previous match for team request")];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data)]}}))}))},n.getPlayers=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,a,s,u,c,d,f,h,p,m=this;return o(this,(function(o){switch(o.label){case 0:if(n=Date.now(),r="There was a problem with football players request",!(t&&t.playerIds&&t.playerIds.length>this.limitIds-1))return[3,5];i=[],a=(0,l.limitIds)(t.playerIds,this.limitIds),s=0,u=a,o.label=1;case 1:return s<u.length?(c=u[s],t.playerIds=c,t.limit=c.length,h="/players".concat(this.apiSignInUrl).concat(t.constructFilterUrl()),e&&(h+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(h,r)]):[3,4];case 2:p=o.sent(),i.push(p.data.map((function(t){return m.playerBasicRemapper.fromResponse(t)}))),o.label=3;case 3:return s++,[3,1];case 4:return d=Array.prototype.concat.apply([],i),(f=new E.default).data=d,[2,f];case 5:return f=new E.default,h="/players".concat(this.apiSignInUrl),t&&(h+="".concat(t.constructFilterUrl())),e&&(h+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(h,r)];case 6:return p=o.sent(),f.meta=this.footballMetaRemapper.remapMetaProp(p.meta),f.data=p.data.map((function(t){return m.playerBasicRemapper.fromResponse(t)})),[2,f]}}))}))},n.getPlayerById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/players/".concat(t).concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with football player by ID request")];case 1:return i=a.sent(),[2,this.playerFullRemapper.fromResponse(i.data)]}}))}))},n.getTopPlayers=function(t){return s(n,void 0,void 0,(function(){var e,n,r=this;return o(this,(function(i){switch(i.label){case 0:return e="/players/top".concat(this.apiSignInUrl),n=Date.now(),t&&(e+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(e,"There was a problem with top football players request")];case 1:return[2,i.sent().data.map((function(t){return r.topPlayerRemapper.fromResponse(t)}))]}}))}))},n.getNextMatchForPlayer=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/players/".concat(t,"/next-match").concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with next match for player request")];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data)]}}))}))},n.getPrevMatchForPlayer=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/players/".concat(t,"/previous-match").concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with previous match for player request")];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data)]}}))}))},n.getMatchById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/matches/".concat(t).concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with match by ID request")];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data)]}}))}))},n.getMatches=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,d,f,h,p,m,v=this;return o(this,(function(o){switch(o.label){case 0:if(n=new E.default,r="There was a problem with football matches request",!(t&&t.matchIds&&t.matchIds.length>this.limitIds))return[3,5];i=[],s=(0,l.limitIds)(t.matchIds,this.limitIds),u=0,c=s,o.label=1;case 1:return u<c.length?(d=c[u],f=new w.default(a(a({},t),{matchIds:d,limit:d.length})),p="/matches".concat(this.apiSignInUrl).concat(f.constructFilterUrl(!0),"&limit=").concat(d.length),e&&(p+=(0,l.initDisableCache)()),[4,this.fetchWithoutAuth(p,r)]):[3,4];case 2:m=o.sent(),i.push(m.data.map((function(t){return v.matchBasicRemapper.fromResponse(t)}))),o.label=3;case 3:return u++,[3,1];case 4:return h=Array.prototype.concat.apply([],i),n.meta=this.footballService.setMetaDataBatchRequest(h.length,t.limit||20,t.page||1),n.data=this.footballService.finalizeMatchesDataBatchRequest(h,t),[2,n];case 5:return p="/matches".concat(this.apiSignInUrl),t&&(p+="".concat(t.constructFilterUrl())),e&&(p+=(0,l.initDisableCache)()),[4,this.fetchWithoutAuth(p,r)];case 6:return m=o.sent(),n.meta=this.footballMetaRemapper.remapMetaProp(m.meta),n.data=m.data.map((function(t){return v.matchBasicRemapper.fromResponse(t)})),[2,n]}}))}))},n.search=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/search".concat(this.apiSignInUrl).concat(t.constructFilterUrl()),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with football search request")];case 1:return i=a.sent(),[2,this.searchRemapper.fromResponse(i.data)]}}))}))},n.getPlayersPoints=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,a;return o(this,(function(s){switch(s.label){case 0:return n="/players/points/".concat(t).concat(this.apiSignInUrl),i=Date.now(),e&&(n+="&position=".concat(e.toLocaleLowerCase())),r&&(n+="&disable_cache=".concat(i)),[4,this.fetchWithoutAuth(n,"There was a problem with players points request")];case 1:return a=s.sent(),[2,this.fantasyRemapper.remapPlayersPoints(a)]}}))}))},n.getPlayerDetailedStatistics=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,a;return o(this,(function(s){switch(s.label){case 0:return n="/players/".concat(e,"/points/").concat(t).concat(this.apiSignInUrl),i=Date.now(),r&&(n+="&disable_cache=".concat(i)),[4,this.fetchWithoutAuth(n,"There was a problem with detailed player points request")];case 1:return a=s.sent(),[2,this.fantasyRemapper.remapPlayerDetailedStats(a)]}}))}))},n.apiSignInUrl="en"!==e.lang?n.apiSignInUrl+"&lang=".concat(e.lang):n.apiSignInUrl,n.countryRemapper=new c.default,n.competitionBasicRemapper=new d.default,n.competitionFullRemapper=new f.default,n.teamBasicRemapper=new h.default,n.teamFullRemapper=new p.default,n.matchBasicRemapper=new m.default,n.matchFullRemapper=new v.default,n.playerBasicRemapper=new y.default,n.playerFullRemapper=new g.default,n.topPlayerRemapper=new _.default,n.searchRemapper=new b.default,n.footballMetaRemapper=new I.default,n.footballService=new O.default(e),n.fantasyRemapper=new P.default,n}return i(e,t),e}(M.default);e.default=T},47724:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=s(n(96245)),u=n(4021),l=n(94904),c=n(5318),d=s(n(48712)),f=s(n(62535));e.default=function(t,e){var n=this;this.baseUrl=null,this.apiSignInUrl=null,this.jwtToken=null,this.idSchema=null,this.retryRequest=!1,this.headers=null,this.authHeaders=null,this.errorHandlingMode=null,this.configuration=null,this.getJwtToken=function(){var t;if(n.configuration.cookieToken){var e=("undefined"==typeof document?(n.configuration.cookieToken.requestHeaders.get("cookie")||"").split(";"):document.cookie.split(";")).find((function(t){return t.trim().startsWith("".concat(n.configuration.cookieToken.name,"="))}));if(!e)return"";var r=e.split("=")[1].trim(),i=decodeURIComponent(r);try{var a=JSON.parse(i);return a.token||a||""}catch(t){return i}}return(null===(t=n.configuration.authProvider)||void 0===t?void 0:t.getIdToken())||""},this.getAuthHeaders=function(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(n.getJwtToken())}},this.fetchWithoutAuth=function(t,e,r,s){return i(n,void 0,void 0,(function(){var n,i,o;return a(this,(function(a){switch(a.label){case 0:return n=null,s?[4,fetch(this.baseUrl+t,{headers:this.headers,method:r||"GET",body:JSON.stringify(s)})]:[3,2];case 1:return n=a.sent(),[3,4];case 2:return[4,fetch(this.baseUrl+t,{headers:this.headers,method:r||"GET"})];case 3:n=a.sent(),a.label=4;case 4:return[4,n.json()];case 5:if(i=a.sent(),!n.ok)throw o=this.transformFetchException(n,i),console.warn(e,o),o;return[2,i]}}))}))},this.fetchWithoutAuthAdditionalHeaders=function(t,e,s){return i(n,void 0,void 0,(function(){var n,i,o;return a(this,(function(a){switch(a.label){case 0:return[4,fetch(this.baseUrl+t,{headers:r(r({},this.headers),s)})];case 1:return[4,(n=a.sent()).json()];case 2:if(i=a.sent(),!n.ok)throw o=this.transformFetchException(n,i),console.warn(e,o),o;return[2,i]}}))}))},this.fetchWithAuth=function(t,e,r,s){return i(n,void 0,void 0,(function(){var n,i,o,u,l,c;return a(this,(function(a){switch(a.label){case 0:return this.validateJWTToken(),n=null,i=null,r&&s?[4,fetch(this.baseUrl+t,{method:r,headers:this.getAuthHeaders(),body:JSON.stringify(s)})]:[3,2];case 1:return n=a.sent(),[3,6];case 2:return!r||s?[3,4]:[4,fetch(this.baseUrl+t,{method:r,headers:this.getAuthHeaders()})];case 3:return n=a.sent(),[3,6];case 4:return[4,fetch(this.baseUrl+t,{headers:this.getAuthHeaders()})];case 5:n=a.sent(),a.label=6;case 6:return"DELETE"===r?[3,8]:[4,n.json()];case 7:i=a.sent(),a.label=8;case 8:return n.ok?[3,14]:401!==n.status&&403!==n.status||this.retryRequest?[3,10]:(this.retryRequest=!0,[4,this.fetchWithAuth(t,e,r,s)]);case 9:a.sent(),a.label=10;case 10:return this.retryRequest=!1,u=this.transformFetchException,l=[n],i?(c=i,[3,13]):[3,11];case 11:return[4,n.json()];case 12:c=a.sent(),a.label=13;case 13:throw o=u.apply(this,l.concat([c])),console.warn(e,o),o;case 14:return this.retryRequest=!1,[2,i]}}))}))},this.fetchWithAuthNewBaseURL=function(t,e,r,s,o){return i(n,void 0,void 0,(function(){var n,i,u,l,c,d;return a(this,(function(a){switch(a.label){case 0:return this.validateJWTToken(),n=null,i=null,s&&o?[4,fetch(t+e,{method:s,headers:this.getAuthHeaders(),body:JSON.stringify(o)})]:[3,2];case 1:return n=a.sent(),[3,6];case 2:return!s||o?[3,4]:[4,fetch(t+e,{method:s,headers:this.getAuthHeaders()})];case 3:return n=a.sent(),[3,6];case 4:return[4,fetch(t+e,{headers:this.getAuthHeaders()})];case 5:n=a.sent(),a.label=6;case 6:return"DELETE"===s?[3,8]:[4,n.json()];case 7:i=a.sent(),a.label=8;case 8:return n.ok?[3,14]:401!==n.status&&403!==n.status||this.retryRequest?[3,10]:(this.retryRequest=!0,[4,this.fetchWithAuthNewBaseURL(t,e,r,s,o)]);case 9:a.sent(),a.label=10;case 10:return this.retryRequest=!1,l=this.transformFetchException,c=[n],i?(d=i,[3,13]):[3,11];case 11:return[4,n.json()];case 12:d=a.sent(),a.label=13;case 13:throw u=l.apply(this,c.concat([d])),console.warn(r,u),u;case 14:return this.retryRequest=!1,[2,i]}}))}))},this.transformFetchException=function(t,e){if(!e&&t.status===u.ErrorCodes.UNAUTHORIZED){if("standard"===n.errorHandlingMode)return new f.default(u.ErrorCodes.UNAUTHORIZED,l.ErrorStatuses.UNAUTHORIZED,c.ErrorMessages.INVALID_TOKEN);var r={code:u.ErrorCodes.UNAUTHORIZED,status:l.ErrorStatuses.UNAUTHORIZED,message:c.ErrorMessages.INVALID_TOKEN};return new d.default(t,r)}var i=e.error,a=i.code,s=i.status,o=i.message;return"standard"===n.errorHandlingMode?new f.default(a,s,o):new d.default(t,e.error)},this.validateJWTToken=function(){var t=null;try{t=(0,o.default)(n.getJwtToken())}catch(t){if("default"===n.errorHandlingMode){var e={status:u.ErrorCodes.UNAUTHORIZED,statusText:t.message,headers:{}},r={code:u.ErrorCodes.UNAUTHORIZED,status:l.ErrorStatuses.INVALID_TOKEN,message:c.ErrorMessages.INVALID_TOKEN};throw new d.default(e,r)}if("standard"===n.errorHandlingMode)throw new f.default(u.ErrorCodes.UNAUTHORIZED,l.ErrorStatuses.INVALID_TOKEN,c.ErrorMessages.INVALID_TOKEN)}if(Date.now()>1e3*t.exp){if("default"===n.errorHandlingMode)throw e={status:u.ErrorCodes.UNAUTHORIZED,statusText:"",headers:{}},r={code:u.ErrorCodes.UNAUTHORIZED,status:l.ErrorStatuses.INVALID_TOKEN,message:c.ErrorMessages.EXPIRED_TOKEN},new d.default(e,r);if("standard"===n.errorHandlingMode)throw new f.default(u.ErrorCodes.UNAUTHORIZED,l.ErrorStatuses.INVALID_TOKEN,c.ErrorMessages.EXPIRED_TOKEN)}},this.extractUserIdFromToken=function(){try{var t=(0,o.default)(n.getJwtToken());return(null==t?void 0:t.sub)||""}catch(t){return console.error(t),""}},this.baseUrl=e,this.configuration=t,this.apiSignInUrl="?key=".concat(t.apiKey,"&client_id=").concat(t.clientId),this.errorHandlingMode=t.errorHandlingMode,this.idSchema=t.idSchema,this.headers={"Content-Type":"application/json"}}},8539:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(90712),c=u(n(47724)),d={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"},f=function(t){function e(e){var n=t.call(this,e,(0,l.setBaseUrl)(e.environment,"idMapping"))||this;return n.getEntityById=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/football".concat(this.apiSignInUrl,"&input_provider=").concat(this.idSchema,"&").concat(d[t],"=").concat(e),r="There was a problem with id mapping request for the following id: ".concat(e),[4,this.fetchWithoutAuth(n,r)];case 1:return[2,i.sent()]}}))}))},n.getEntityByIdAndSchema=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/football".concat(this.apiSignInUrl,"&input_provider=").concat(r,"&").concat(d[t],"=").concat(e),i="There was a problem with id mapping request for the following id: ".concat(e),[4,this.fetchWithoutAuth(n,i)];case 1:return[2,a.sent()]}}))}))},n.getEntityIdsByIdsAndSchema=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/football".concat(this.apiSignInUrl,"&input_provider=").concat(r,"&").concat(d[t],"=").concat(e.join(",")),i="There was a problem with id mapping request for the following ids: ".concat(e.join(",")),[4,this.fetchWithoutAuth(n,i)];case 1:return[2,a.sent()]}}))}))},n.getEntitiesByIds=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,u,c,f,h,p;return s(this,(function(s){switch(s.label){case 0:e.sort((function(t,e){return t.localeCompare(e)})),n=(0,l.requestChunkBuild)(e),i=[],a=0,u=n,s.label=1;case 1:return a<u.length?(c=u[a],f="/football".concat(this.apiSignInUrl,"&input_provider=").concat(r,"&").concat(d[t],"=").concat(c.join(",")),h="There was a problem with id mapping request for the following ids :".concat(c.join(",")),[4,this.fetchWithoutAuth(f,h)]):[3,4];case 2:p=s.sent(),i=o(o([],i,!0),p.data,!0),s.label=3;case 3:return a++,[3,1];case 4:return[2,i]}}))}))},n.getEntitiesByIdObjs=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o,u,c,f,h,p;return s(this,(function(m){switch(m.label){case 0:n=[],r={},i=[],Object.keys(t).forEach((function(e){n.push.apply(n,t[e])})),a=(0,l.transformIdsToBeUnique)(n),o=(0,l.requestChunkBuild)(a),u=function(n){var a,o,u;return s(this,(function(s){switch(s.label){case 0:return a="",Object.keys(t).forEach((function(e){r[e]=[];var i=n.filter((function(n){return t[e].includes(n)}));i&&i.length>0&&(r[e]=i)})),Object.keys(r).forEach((function(t){r[t].length>0&&(r[t].sort((function(t,e){return t.localeCompare(e)})),a+="&",a+="".concat(d[t],"=").concat(r[t].join(",")))})),a&&a.length>0?(o="/football".concat(c.apiSignInUrl,"&input_provider=").concat(e||"native").concat(a),[4,c.fetchWithoutAuth(o,"There was a problem with id mapping request")]):[3,2];case 1:return u=s.sent(),i.push(u.data),[3,3];case 2:i.push([]),s.label=3;case 3:return[2]}}))},c=this,f=0,h=o,m.label=1;case 1:return f<h.length?(p=h[f],[5,u(p)]):[3,4];case 2:m.sent(),m.label=3;case 3:return f++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)]}}))}))},n.getTopEntities=function(){return a(n,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/football/top".concat(this.apiSignInUrl),[4,this.fetchWithoutAuth(t,"There was a problem with top id mappings request")];case 1:return[2,e.sent().data]}}))}))},n}return i(e,t),e}(c.default);e.default=f},87059:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(87419)),c=o(n(64533)),d=o(n(18899)),f=o(n(7746)),h=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"loyalty"))||this;return n.templateRemapper=null,n.leaderboardRemapper=null,n.rankingsRemapper=null,n.highestSuccessRateRemapper=null,n.getTemplates=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=t?"/leaderboard/templates/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()):"/leaderboard/templates/".concat(this.apiSignInUrl),n+=(0,u.isDisabledCache)(e)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem fetching the list of templates")];case 1:return r=a.sent(),(i=JSON.parse(JSON.stringify(r))).meta=this.templateRemapper.remapMeta(r.meta),i.data=this.templateRemapper.remapResponse(r.data),[2,i]}}))}))},n.getTemplateById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,u.isDisabledCache)(e)?"/leaderboard/templates/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/leaderboard/templates/".concat(t).concat(this.apiSignInUrl),r="There was a problem requesting the following template: ".concat(t),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.templateRemapper.remapResponseId(i.data)]}}))}))},n.getLeaderboard=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n=(0,u.isDisabledCache)(e)?"/leaderboard/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/leaderboard/".concat(t).concat(this.apiSignInUrl),i="There was a problem fetching the leaderboard for the following template: ".concat(t),r&&(n+="".concat(r.constructFiltersUrl())),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),o=JSON.parse(JSON.stringify(a)),[2,this.leaderboardRemapper.remapResponse(o)]}}))}))},n.getLeaderboardForGame=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n=(0,u.isDisabledCache)(e)?"/leaderboard/games/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/leaderboard/games/".concat(t).concat(this.apiSignInUrl),i="There was a problem fetching the leaderboard for the following game: ".concat(t),r&&(n+="".concat(r.constructFiltersUrl())),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),o=JSON.parse(JSON.stringify(a)),[2,this.leaderboardRemapper.remapResponse(o)]}}))}))},n.getLeaderboardForLeague=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/private-league/".concat(t).concat(this.apiSignInUrl),r="There was a problem fetching the leaderboard for the following league: ".concat(t),e&&(n+="".concat(e.constructFiltersUrl())),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.leaderboardRemapper.remapLeagueLeaderboardResponse(i)]}}))}))},n.getUserRankings=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/leaderboard/users/".concat(t,"/rankings").concat(this.apiSignInUrl),i="There was a problem fetching the rankings for the following user: ".concat(t),e&&(n+="".concat(e.constructFiltersUrl())),(0,u.isDisabledCache)(r)&&(n+="".concat((0,u.initDisableCache)())),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.rankingsRemapper.remapRankings(a)]}}))}))},n.getHighestSuccessRate=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/statistics/top".concat(this.apiSignInUrl),t&&(n+="".concat(t.constructFiltersUrl())),(0,u.isDisabledCache)(e)&&(n+="".concat((0,u.initDisableCache)())),[4,this.fetchWithoutAuth(n,"There was a problem fetching highest success rate")];case 1:return r=i.sent(),[2,this.highestSuccessRateRemapper.remapHighestSuccessRate(r.data)]}}))}))},n.getEntitiesFollows=function(t,e){return a(n,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return n=(0,u.isDisabledCache)(e)?"/statistics/follows".concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/statistics/follows".concat(this.apiSignInUrl),t.footballCompetitions&&(n+="&competitions=".concat(t.footballCompetitions.join(","))),t.footballTeams&&(n+="&teams=".concat(t.footballTeams.join(","))),t.footballPlayers&&(n+="&players=".concat(t.footballPlayers.join(","))),[4,this.fetchWithoutAuth(n,"There was a problem fetching follows for entities")];case 1:return[2,r.sent().data]}}))}))},n.getUserRankingsForPrivateLeagueAndChallenges=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/private-league/users/".concat(t,"/rankings").concat(this.apiSignInUrl,"&private_league_type=").concat("PRIVATE_LEAGUE"===e?"private":"one_vs_one"),i="There was a problem fetching user rankings for ".concat(e),r&&(n+="".concat(r.constructFiltersUrl())),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,"PRIVATE_LEAGUE"===e?this.rankingsRemapper.remapRankingsPrivateLeague(a):this.rankingsRemapper.remapRankingsChallenge(a)]}}))}))},n.getTemplateBreakdownPoints=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="/leaderboard/".concat(t,"/breakdown").concat(this.apiSignInUrl),n="There was a problem fetching template breakdown points for: ".concat(t),[4,this.fetchWithoutAuth(e,n)];case 1:return r=i.sent(),[2,this.leaderboardRemapper.remapTemplateBreakdown(r)]}}))}))},n.templateRemapper=new d.default,n.leaderboardRemapper=new l.default,n.rankingsRemapper=new c.default,n.highestSuccessRateRemapper=new f.default,n}return i(e,t),e}(o(n(47724)).default);e.default=h},13022:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(72239)),c=o(n(47724)),d=o(n(44688)),f=o(n(95783)),h=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"miniGames"))||this;return n.classicQuizRemapper=null,n.eitherOrRemapper=null,n.personalityQuizRemapper=null,n.getClassicQuizzes=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/classic-quizzes".concat(this.apiSignInUrl),t&&(n+=t.constructMainFiltersUrl()),n+=(0,u.isDisabledCache)(e)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem with fetching classic quizzes")];case 1:return r=i.sent(),[2,this.classicQuizRemapper.remapClassicQuizzes(r)]}}))}))},n.getClassicQuizById=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/classic-quizzes/".concat(t).concat(this.apiSignInUrl),e&&(n+="&include_correct_options=".concat(e)),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching classic quiz by ID")];case 1:return i=a.sent(),[2,this.classicQuizRemapper.remapClassicQuizById(i.data)]}}))}))},n.participateInClassicQuiz=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/classic-quizzes/".concat(t,"/participate").concat(this.apiSignInUrl),i="There was a problem with participating in the following classic quiz: ".concat(t),a={questions:this.classicQuizRemapper.remapClassicQuizParticipationBody(e),include_correct_options:!!r},[4,this.fetchWithAuth(n,i,"POST",a)];case 1:return o=s.sent(),[2,this.classicQuizRemapper.remapClassicQuizParticipation(o.data)]}}))}))},n.getMyClassicQuizParticipations=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/classic-quizzes/participations".concat(this.apiSignInUrl),t&&(e+="".concat(t.constructMainFiltersUrl())),[4,this.fetchWithAuth(e,"There was a problem with fetching user's own Classic Quiz participations")];case 1:return n=r.sent(),[2,this.classicQuizRemapper.remapUserClassicQuizParticipations(n.data)]}}))}))},n.getLeaderboardForClassicQuizzes=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/classic-quizzes/rank".concat(this.apiSignInUrl),t&&(n+="".concat(t.constructMainFiltersUrl())),n+=(0,u.isDisabledCache)(e)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem with fetching classic quizzes leaderboard")];case 1:return r=i.sent(),[2,this.classicQuizRemapper.remapClassicQuizzesLeaderboard(r)]}}))}))},n.getClassicQuizzesUserRanking=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/classic-quizzes/users/".concat(t,"/rank").concat(this.apiSignInUrl),e&&(n+="".concat(e.constructMainFiltersUrl())),n+=(0,u.isDisabledCache)(r)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem with fetching user's rankings for classic quizzes")];case 1:return i=a.sent(),[2,this.classicQuizRemapper.remapClassicQuizUserRankings(i)]}}))}))},n.getClassicQuizQuestionsReport=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="/classic-quizzes/".concat(t,"/questions-report").concat(this.apiSignInUrl),n="There was a problem with fetching questions report for quiz: ".concat(t),[4,this.fetchWithoutAuth(e,n)];case 1:return r=i.sent(),[2,this.classicQuizRemapper.remapClassicQuizQuestionsReport(r.data)]}}))}))},n.getClassicQuizResultsSummary=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/classic-quizzes/".concat(t,"/results-summary").concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching classic quiz results summary")];case 1:return r=i.sent(),[2,this.classicQuizRemapper.remapClassicQuizResultsSummary(r.data)]}}))}))},n.getEitherOrs=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/either-or".concat(this.apiSignInUrl),t&&(n+=t.constructMainFiltersUrl()),n+=(0,u.isDisabledCache)(e)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem with fetching list of Either/Ors")];case 1:return r=i.sent(),[2,this.eitherOrRemapper.remapEitherOrs(r)]}}))}))},n.getEitherOrById=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/either-or/".concat(t).concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching Either/Or by ID")];case 1:return r=i.sent(),[2,this.eitherOrRemapper.remapEitherOrById(r.data)]}}))}))},n.getMyEitherOrStats=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/either-or/".concat(t,"/own-stats").concat(this.apiSignInUrl),[4,this.fetchWithAuth(e,"There was a problem with fetching Either/Or own statistics")];case 1:return n=r.sent(),[2,this.eitherOrRemapper.remapEitherOrOwnStats(n.data)]}}))}))},n.getEitherOrResults=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/either-or/".concat(t,"/results").concat(this.apiSignInUrl).concat((0,u.isDisabledCache)(e)?(0,u.initDisableCache)():""),[4,this.fetchWithoutAuth(n,"There was a problem with fetching Either/Or results")];case 1:return r=i.sent(),[2,this.eitherOrRemapper.remapEitherOrResults(r.data)]}}))}))},n.participateInEitherOr=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/either-or/".concat(t,"/participate").concat(this.apiSignInUrl),[4,this.fetchWithAuth(n,"There was a problem with participating in Either/Or","POST",e)];case 1:return r=i.sent(),[2,this.eitherOrRemapper.remapEitherOrParticipation(r.data)]}}))}))},n.getPersonalityQuizzes=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/personality-quizzes".concat(this.apiSignInUrl),t&&(n+=t.constructMainFiltersUrl()),n+=(0,u.isDisabledCache)(e)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem with fetching personality quizzes")];case 1:return r=i.sent(),[2,this.personalityQuizRemapper.remapPersonalityQuizzes(r)]}}))}))},n.getPersonalityQuizById=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/personality-quizzes/".concat(t).concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching personality quiz by ID")];case 1:return r=i.sent(),[2,this.personalityQuizRemapper.remapPersonalityQuizById(r.data)]}}))}))},n.participateInPersonalityQuiz=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/personality-quizzes/".concat(t,"/participate").concat(this.apiSignInUrl),r="There was a problem with participating in the following personality quiz: ".concat(t),i={questions:this.personalityQuizRemapper.remapPersonalityQuizParticipationBody(e)},[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return a=s.sent(),[2,this.personalityQuizRemapper.remapPersonalityQuizParticipation(a.data)]}}))}))},n.getPersonalityQuizUserParticipation=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/personality-quizzes/".concat(t,"/participations/").concat(e).concat(this.apiSignInUrl),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching user personality quiz participation")];case 1:return i=a.sent(),[2,this.personalityQuizRemapper.remapPersonalityQuizParticipation(i.data)]}}))}))},n.classicQuizRemapper=new l.default,n.eitherOrRemapper=new d.default,n.personalityQuizRemapper=new f.default,n}return i(e,t),e}(c.default);e.default=h},52793:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=o(n(82726)),l=o(n(79679)),c=n(90712),d=o(n(4780)),f=o(n(88900)),h=o(n(81553)),p=o(n(53623)),m=function(t){function e(e){var n=t.call(this,e,(0,c.setBaseUrl)(e.environment,"predictor"))||this;return n.predictionRemapper=null,n.matchSummaryRemapper=null,n.gamesRemapper=null,n.metaRemapper=null,n.idMapping=null,n.makeFootballPrediction=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/predictions".concat(this.apiSignInUrl),[4,this.fetchWithAuth(e,"There was a problem making POST request","POST",this.predictionRemapper.remapRequestBody(t))];case 1:return n=r.sent(),[4,this.predictionRemapper.remapResponseObjBody(n)];case 2:return[2,r.sent()]}}))}))},n.getMatchSummary=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,c.isDisabledCache)(e)?"/predictions/summary/".concat(t).concat(this.apiSignInUrl).concat((0,c.initDisableCache)()):"/predictions/summary/".concat(t).concat(this.apiSignInUrl),r="There was a problem fetching predictions for match: ".concat(t),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.matchSummaryRemapper.remapResponse(i)]}}))}))},n.deleteFootballPrediction=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/predictions/".concat(t).concat(this.apiSignInUrl),n="There was a problem deleting your prediction: ".concat(t),[4,this.fetchWithAuth(e,n,"DELETE")];case 1:return r.sent(),[2,!0]}}))}))},n.getMyPredictions=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(a){switch(a.label){case 0:return e=new h.default,n="/predictions".concat(this.apiSignInUrl),t&&(n+="".concat(t.constructFiltersUrl())),[4,this.fetchWithAuth(n,"There was a problem fetching own predictions")];case 1:return r=a.sent(),e.meta=this.metaRemapper.remapMetaData(r.meta),i=e,[4,this.predictionRemapper.remapResponseArrayBody(r.data)];case 2:return i.data=a.sent(),[2,e]}}))}))},n.getMyPredictionsNoRemap=function(t){return a(n,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/predictions".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()),[4,this.fetchWithAuth(e,"There was a problem fetching own predictions")];case 1:return[2,n.sent()]}}))}))},n.getUserPredictions=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o,u;return s(this,(function(s){switch(s.label){case 0:return n=new h.default,i=(0,c.isDisabledCache)(e)?"/predictions/users/".concat(t).concat(this.apiSignInUrl).concat((0,c.initDisableCache)()):"/predictions/users/".concat(t).concat(this.apiSignInUrl),a="There was a problem fetching predictions for user: ".concat(t),r&&(i+="".concat(r.constructFiltersUrl())),[4,this.fetchWithoutAuth(i,a)];case 1:return o=s.sent(),n.meta=this.metaRemapper.remapMetaData(o.meta),u=n,[4,this.predictionRemapper.remapResponseArrayBody(o.data)];case 2:return u.data=s.sent(),[2,n]}}))}))},n.getUserPredictionsNoRemap=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/predictions/users/".concat(t).concat(this.apiSignInUrl).concat(e.constructFiltersUrl()),r="There was a problem fetching predictions for user: ".concat(t),[4,this.fetchWithoutAuth(n,r)];case 1:return[2,i.sent()]}}))}))},n.getGames=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n=(0,c.isDisabledCache)(e)?"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()).concat((0,c.initDisableCache)()):"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()),[4,this.fetchWithoutAuth(n,"There was a problem fetching the games list")];case 1:return r=i.sent(),[2,this.gamesRemapper.remapPaginatedGames(r)]}}))}))},n.getGamesNoRemap=function(t,e){return a(n,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return n=(0,c.isDisabledCache)(e)?"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()).concat((0,c.initDisableCache)()):"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()),[4,this.fetchWithoutAuth(n,"There was a problem fetching the games list")];case 1:return[2,r.sent()]}}))}))},n.getGameById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,c.isDisabledCache)(e)?"/games/".concat(t).concat(this.apiSignInUrl).concat((0,c.initDisableCache)()):"/games/".concat(t).concat(this.apiSignInUrl),r="There was a problem fetching the following game: ".concat(t),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapGameByIdResponse(i)]}}))}))},n.getGamePredictions=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o,u;return s(this,(function(s){switch(s.label){case 0:return n=new h.default,i=(0,c.isDisabledCache)(e)?"/games/".concat(t,"/predictions").concat(this.apiSignInUrl).concat((0,c.initDisableCache)()):"/games/".concat(t,"/predictions").concat(this.apiSignInUrl),a="There was a problem fetching the predictions for game: ".concat(t),r&&(i+="".concat(r.constructFiltersUrl())),[4,this.fetchWithoutAuth(i,a)];case 1:return o=s.sent(),n.meta=this.metaRemapper.remapMetaData(o.meta),u=n,[4,this.predictionRemapper.remapResponseArrayBody(o.data)];case 2:return u.data=s.sent(),[2,n]}}))}))},n.getUserGameEditions=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a=this;return s(this,(function(s){switch(s.label){case 0:return n=null,r=(0,c.isDisabledCache)(e)?"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()).concat((0,c.initDisableCache)()):"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()),[4,this.fetchWithoutAuth(r,"There was a problem fetching the games list")];case 1:return(i=s.sent()).data.forEach((function(t){"TOP_X"===t.type?n=a.gamesRemapper.remapPaginatedUserTopXEditions(i):"MATCH_QUIZ"===t.type&&(n=a.gamesRemapper.remapPaginatedUserMathQuizEditions(i))})),[2,n]}}))}))},n.getGameResults=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n=(0,c.isDisabledCache)(e)?"/games/".concat(t,"/results/").concat(this.apiSignInUrl).concat((0,c.initDisableCache)()):"/games/".concat(t,"/results/").concat(this.apiSignInUrl),i="There was a problem fetching the results for the following game: ".concat(t),r&&(n+="".concat(r.constructMainFiltersUrl())),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.gamesRemapper.remapPaginatedGameResults(a)]}}))}))},n.getMarketResultsForGame=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/games/".concat(t,"/correct-results/").concat(this.apiSignInUrl),r="There was a problem fetching the markets correct results for the following game: ".concat(t),(0,c.isDisabledCache)(e)&&(n+="".concat((0,c.initDisableCache)())),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapGameMarketsResults(i.data)]}}))}))},n.getContestWinners=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/winners/".concat(this.apiSignInUrl,"&contest_id=").concat(t),r="There was a problem fetching winners for the following game: ".concat(t),e&&(n+=(0,c.initDisableCache)()),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapContestWinners(i)]}}))}))},n.getPredictionById=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="/predictions/".concat(t).concat(this.apiSignInUrl),n="There was a problem fetching info for the following prediction: ".concat(t),[4,this.fetchWithoutAuth(e,n)];case 1:return r=i.sent(),[4,this.predictionRemapper.remapResponseArrayBody([r.data])];case 2:return[2,i.sent()[0]]}}))}))},n.getPredictionsByIds=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/predictions/by-ids".concat(this.apiSignInUrl,"&prediction_ids=").concat(t.join(",")),[4,this.fetchWithoutAuth(e,"There was a problem fetching predictions")];case 1:return n=r.sent(),[4,this.predictionRemapper.remapResponseArrayBody(n.data)];case 2:return[2,r.sent()]}}))}))},n.idMapping=new f.default(e),n.predictionRemapper=new u.default(e,n.idMapping),n.matchSummaryRemapper=new l.default(e,n.idMapping),n.gamesRemapper=new d.default,n.metaRemapper=new p.default,n}return i(e,t),e}(o(n(47724)).default);e.default=m},48863:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(84239)),c=o(n(47724)),d=o(n(43476)),f=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"privateLeagues"))||this;return n.remapper=null,n.discussionsRemapper=null,n.discussionsBaseURL=null,n.create=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/leagues"+this.apiSignInUrl,r="There was a problem ".concat("PRIVATE_LEAGUE"===e?"creating private league":"issuing challenge"),[4,this.fetchWithAuth(n,r,"POST",t)];case 1:return i=a.sent(),[2,this.remapper.remapToPrivateLeagueById(i.data)]}}))}))},n.update=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/leagues/".concat(t)+this.apiSignInUrl,i="There was a problem updating ".concat("PRIVATE_LEAGUE"===r?"private league":"challenge"),[4,this.fetchWithAuth(n,i,"PUT",e)];case 1:return a=s.sent(),[2,this.remapper.remapToPrivateLeagueById(a.data)]}}))}))},n.updateLeagueTemplate=function(t,e,r,i){return a(n,void 0,void 0,(function(){var n,a,o,u;return s(this,(function(s){switch(s.label){case 0:return n="/leagues/".concat(t,"/template")+this.apiSignInUrl,a="There was a problem updating template for the ".concat("PRIVATE_LEAGUE"===i?"private league":"challenge"),o={new_template_id:e,past_template_name:r},[4,this.fetchWithAuth(n,a,"POST",o)];case 1:return u=s.sent(),[2,this.remapper.remapToPrivateLeagueById(u.data)]}}))}))},n.getById=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/leagues/".concat(t)+this.apiSignInUrl,(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),i="There was a problem getting ".concat("PRIVATE_LEAGUE"===e?"private league":"challenge"),[4,this.fetchWithAuth(n,i)];case 1:return a=s.sent(),[2,this.remapper.remapToPrivateLeagueById(a.data)]}}))}))},n.getMyLeagues=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i=this;return s(this,(function(a){switch(a.label){case 0:return n="/leagues"+this.apiSignInUrl+t.constructFiltersUrl(),r="There was a problem getting user's ".concat("PRIVATE_LEAGUE"===e?"private leagues":"challenges"),[4,this.fetchWithAuth(n,r)];case 1:return[2,a.sent().data.map((function(t){return i.remapper.remapToMyPrivateLeagues(t)}))]}}))}))},n.delete=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/leagues/".concat(t)+this.apiSignInUrl,r="There was a problem deleting ".concat("PRIVATE_LEAGUE"===e?"private league":"challenge"),[4,this.fetchWithAuth(n,r,"DELETE")];case 1:return i.sent(),[2,!0]}}))}))},n.invite=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/membership/invite/".concat(t)+this.apiSignInUrl,r="There was a problem inviting the following users: ".concat(e.join(",")),i={profiles:e},[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return[2,a.sent().data]}}))}))},n.deleteInvitation=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/membership/invite/".concat(t)+this.apiSignInUrl,r="There was a problem deleting invitation for the following users: ".concat(e.join(",")),i={profiles:e},[4,this.fetchWithAuth(n,r,"DELETE",i)];case 1:return a.sent(),[2,!0]}}))}))},n.accept=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/membership/accept/".concat(t)+this.apiSignInUrl+"&accept=".concat(e?"ACCEPT":"REJECT"),i="PRIVATE_LEAGUE"===r?"private league":"challenge",a="There was a problem ".concat(e?"accepting":"rejecting"," invitation for ").concat(i,": ").concat(t),[4,this.fetchWithAuth(n,a,"POST")];case 1:return o=s.sent(),[2,"PRIVATE_LEAGUE"===r?this.remapper.remapToAcceptPrivateLeague(o.data):this.remapper.remapToAcceptChallenge(o.data)]}}))}))},n.ban=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/membership/ban/".concat(t)+this.apiSignInUrl,r="There was a problem banning the following users: ".concat(e.join(",")),i={profiles:e},[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return[2,a.sent().data]}}))}))},n.unban=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/membership/unban/".concat(t)+this.apiSignInUrl,r="There was a problem unbanning the following users: ".concat(e.join(",")),i={profiles:e},[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return[2,a.sent().data]}}))}))},n.join=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/membership/join"+this.apiSignInUrl+"&invitation_code=".concat(t),[4,this.fetchWithAuth(e,"There was a problem joining league","POST")];case 1:return n=r.sent(),[2,this.remapper.remapToAcceptPrivateLeague(n.data)]}}))}))},n.leave=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/membership/leave/".concat(t)+this.apiSignInUrl,r="There was a problem leaving the following ".concat("PRIVATE_LEAGUE"===e?"league":"challenge",": ").concat(t),[4,this.fetchWithAuth(n,r,"POST")];case 1:return[2,i.sent().data]}}))}))},n.getInvitations=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/membership/invitations"+this.apiSignInUrl+e.constructMainFiltersUrl(),r="There was a problem getting invitations for ".concat("PRIVATE_LEAGUE"===t?"leagues":"challenges"),[4,this.fetchWithAuth(n,r)];case 1:return i=a.sent(),[2,this.remapper.remapToPrivateLeagues(i)]}}))}))},n.getReportedPosts=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/discussions/".concat(t,"/posts/reported").concat(this.apiSignInUrl),r="There was a problem fetching posts for the following: ".concat(t),e&&(n+=e.constructMainFiltersUrl()),[4,this.fetchWithAuthNewBaseURL(this.discussionsBaseURL,n,r)];case 1:return i=a.sent(),[2,this.discussionsRemapper.remapToPostsForDiscussion(i,"full")]}}))}))},n.getPredictions=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/leagues/".concat(t,"/predictions")+this.apiSignInUrl,r="There was a problem getting predictions for private league: ".concat(t),e&&(n+=e.constructFiltersUrl()),[4,this.fetchWithAuth(n,r)];case 1:return i=a.sent(),[2,this.remapper.remapPredictions(i)]}}))}))},n.moderatePost=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/posts/".concat(t,"/admin/moderate").concat(this.apiSignInUrl),r="There was a problem moderating the following post: ".concat(t),i={moderation_reason:e},[4,this.fetchWithAuthNewBaseURL(this.discussionsBaseURL,n,r,"POST",i)];case 1:return a=s.sent(),[2,this.discussionsRemapper.remapToPostByIdBasic(a.data)]}}))}))},n.discussionsBaseURL=(0,u.setBaseUrl)(e.environment,"discussions"),n.remapper=new l.default,n.discussionsRemapper=new d.default,n}return i(e,t),e}(c.default);e.default=f},84275:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(441)),c=o(n(38673)),d=o(n(66277)),f=o(n(41712)),h=o(n(47724)),p=o(n(97627)),m="/profile",v="/profiles",_=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"profile"))||this;return n.profileRemapper=null,n.followingRemapper=null,n.followersRemapper=null,n.leadRemapper=null,n.lang=null,n.limitIds=100,n.getCountries=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="&lang=".concat(this.lang),n="".concat("/countries").concat(this.apiSignInUrl).concat(e),r=Date.now(),t&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem fetching profile countries")];case 1:return[2,i.sent().data]}}))}))},n.getProfile=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="".concat(m).concat(this.apiSignInUrl),n="",t?(e="".concat(v,"/").concat(t).concat(this.apiSignInUrl),n="There was a problem fetching the following profile: ".concat(t),[4,this.fetchWithoutAuth(e,n)]):[3,2];case 1:return r=i.sent(),[2,this.profileRemapper.publicProfileFromResponse(r.data)];case 2:return n="There was a problem fetching your profile from API",[4,this.fetchWithAuth(e,n)];case 3:return r=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data)]}}))}))},n.getProfiles=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o,l,c,d,f,h,p,m,_,y;return s(this,(function(s){switch(s.label){case 0:if(n=Date.now(),i="There was a problem fetching the following profiles: ".concat(t.join(",")),!t||!t.length)return[3,7];if(!(t.length>this.limitIds))return[3,5];a=[],o=(0,u.limitIds)(t,this.limitIds),l=0,c=o,s.label=1;case 1:return l<c.length?(d=c[l],f="".concat(v).concat(this.apiSignInUrl,"&profile_ids=").concat(d.join(",")),i="There was a problem fetching the following profiles: ".concat(d.join(",")),r&&(f+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(f,i)]):[3,4];case 2:h=s.sent(),a.push.apply(a,this.profileRemapper.profilesFromResponse(h.data)),s.label=3;case 3:return l++,[3,1];case 4:return[2,a];case 5:return p="".concat(v).concat(this.apiSignInUrl,"&profile_ids=").concat(t.join(",")),r&&(p+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(p,i)];case 6:return m=s.sent(),[2,this.profileRemapper.profilesFromResponse(m.data)];case 7:return _="".concat(v).concat(this.apiSignInUrl,"&search=").concat(e),r&&(_+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(_,i)];case 8:return y=s.sent(),[2,this.profileRemapper.profilesFromResponse(y.data)]}}))}))},n.getFollowers=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="".concat(m,"/followers").concat(this.apiSignInUrl),r="There was a problem fetching the followers for own profile",!t||e?[3,2]:(n="".concat(m,"/followers").concat(this.apiSignInUrl).concat(t.constructFilterUrl()),[4,this.fetchWithAuth(n,r)]);case 1:return i=s.sent(),[2,this.followersRemapper.followersFromResponse(i)];case 2:return t||e?[3,4]:[4,this.fetchWithAuth(n,r)];case 3:return a=s.sent(),[2,this.followersRemapper.followersFromResponse(a)];case 4:return t&&e?n="".concat(m,"/").concat(e,"/followers").concat(this.apiSignInUrl).concat(t.constructFilterUrl()):!t&&e&&(n="".concat(m,"/").concat(e,"/followers").concat(this.apiSignInUrl)),r="There was a problem fetching the followers for profile: ".concat(e),[4,this.fetchWithoutAuth(n,r)];case 5:return o=s.sent(),[2,this.followersRemapper.followersFromResponse(o)]}}))}))},n.getFollowing=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="".concat(m,"/following").concat(this.apiSignInUrl),r="There was a problem fetching the followers of own profile",!t||e?[3,2]:(n="".concat(m,"/following").concat(this.apiSignInUrl).concat(t.constructFilterUrl()),[4,this.fetchWithAuth(n,r)]);case 1:return i=s.sent(),[2,this.followingRemapper.followingFromResponse(i)];case 2:return t||e?[3,4]:[4,this.fetchWithAuth(n,r)];case 3:return a=s.sent(),[2,this.followingRemapper.followingFromResponse(a)];case 4:return t&&e?n="".concat(m,"/").concat(e,"/following").concat(this.apiSignInUrl).concat(t.constructFilterUrl()):!t&&e&&(n="".concat(m,"/").concat(e,"/following").concat(this.apiSignInUrl)),r="There was a problem fetching the followers of the following profile: ".concat(e),[4,this.fetchWithoutAuth(n,r)];case 5:return o=s.sent(),[2,this.followingRemapper.followingFromResponse(o)]}}))}))},n.follow=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(a){switch(a.label){case 0:return(e=new f.default).profile_ids=t,n=m+"/follow".concat(this.apiSignInUrl),r="There was a problem with following profiles: ".concat(t.join(",")),[4,this.fetchWithAuth(n,r,"POST",e)];case 1:return i=a.sent(),[2,this.followingRemapper.followResponse(i.data)]}}))}))},n.unfollow=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return(e=new f.default).profile_ids=t,n=m+"/follow".concat(this.apiSignInUrl),r="There was a problem with unfollowing profiles: ".concat(t.join(",")),[4,this.fetchWithAuth(n,r,"DELETE",e)];case 1:return i.sent(),[2,!0]}}))}))},n.getBadges=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="".concat(m,"/badges").concat(this.apiSignInUrl),n="There was a problem with fetching own badges",t?(e="".concat(m,"/").concat(t,"/badges").concat(this.apiSignInUrl),n="There was a problem with fetching the badges",[4,this.fetchWithoutAuth(e,n)]):[3,2];case 1:case 3:return[2,r.sent().data];case 2:return[4,this.fetchWithAuth(e,n)]}}))}))},n.updateProfile=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=m+this.apiSignInUrl,[4,this.fetchWithAuth(e,"There was a problem updating the own profile","PATCH",t)];case 1:return n=r.sent(),[2,this.profileRemapper.fullProfileFromResponse(n.data)]}}))}))},n.collectLead=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/leads".concat(this.apiSignInUrl),[4,this.fetchWithAuth(e,"There was a problem collecting lead","POST",this.leadRemapper.toRequest(t))];case 1:return n=r.sent(),[2,this.leadRemapper.fromResponse(n.data)]}}))}))},n.checkFollowStatus=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/profile/followers/check-follow-status".concat(this.apiSignInUrl,"&profile_ids=").concat(t.join(",")),[4,this.fetchWithAuth(e,"There was a problem checking follow status for profiles")];case 1:return n=r.sent(),[2,this.followersRemapper.followStatusFromResponse(n.data)]}}))}))},n.deleteOwnProfile=function(){return a(n,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/profile".concat(this.apiSignInUrl),[4,this.fetchWithAuth(t,"There was a problem deleting own profile","DELETE")];case 1:return e.sent(),[2]}}))}))},n.deleteUserData=function(){return a(n,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/user-data".concat(this.apiSignInUrl),[4,this.fetchWithAuth(t,"There was a problem deleting profile data","DELETE")];case 1:return e.sent(),[2]}}))}))},n.lang=e.lang,n.profileRemapper=new l.default,n.followingRemapper=new c.default,n.followersRemapper=new d.default,n.leadRemapper=new p.default,n}return i(e,t),e}(h.default);e.default=_},47876:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(8077));e.default=function(t){var e=this;this.footballBaseUrl="https://football.api.sportal365.com/",this.retryRequest=!1,this.oddClient=null,this.remapper=null,this.getMatchOdds=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,s;return i(this,(function(i){switch(i.label){case 0:return e="v2/matches/livescore?odd_client=".concat(this.oddClient.name,"&match_ids=").concat(t.join(",")).concat(n.constructFiltersUrl()),r="Error while fetching match odds for matchIds: ".concat(t.join(",")),[4,this.fetchWithAuth(e,r)];case 1:return a=i.sent(),s=n.marketTypes&&n.marketTypes.length>0?n.marketTypes.filter((function(t){return t.includes("OVER")})):[],[2,this.remapper.fromResponse(a,s)]}}))}))},this.getAuthHeaders=function(){var t="undefined"!=typeof window?window.btoa("".concat(e.oddClient.credentials.username,":").concat(e.oddClient.credentials.password)):Buffer.from("".concat(e.oddClient.credentials.username,":").concat(e.oddClient.credentials.password)).toString("base64");return{"Content-Type":"application/json",Authorization:"Basic ".concat(t)}},this.fetchWithAuth=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return[4,fetch(this.footballBaseUrl+t,{headers:this.getAuthHeaders()})];case 1:return[4,(e=i.sent()).json()];case 2:return r=i.sent(),e.ok?[3,5]:401!==e.status&&403!==e.status||this.retryRequest?[3,4]:(this.retryRequest=!0,[4,this.fetchWithAuth(t,n)]);case 3:i.sent(),i.label=4;case 4:throw this.retryRequest=!1,console.warn(n,r),r;case 5:return this.retryRequest=!1,[2,r]}}))}))},this.oddClient=t.oddClient,this.remapper=new s.default}},81613:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(93305)),c=o(n(6829)),d=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"voting"))||this;return n.pollRemapper=null,n.playerOfTheMatchRemapper=null,n.getPolls=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/polls".concat(this.apiSignInUrl),t&&(n+=t.constructMainFiltersUrl()),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem fetching polls")];case 1:return r=i.sent(),[2,this.pollRemapper.remapPolls(r)]}}))}))},n.getPollById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/polls/".concat(t).concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),r="There was a problem fetching the following poll: "+t,[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.pollRemapper.remapPollById(i.data)]}}))}))},n.voteForPoll=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/polls/".concat(t,"/votes").concat(this.apiSignInUrl),r={option_ids:e},i="There was a problem voting for the following poll: "+t,[4,this.fetchWithAuth(n,i,"PUT",r)];case 1:return a=s.sent(),[2,this.pollRemapper.remapUserVote(a.data)]}}))}))},n.deleteVoteForPoll=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/polls/".concat(t,"/votes").concat(this.apiSignInUrl),n="There was a problem deleting vote for the following poll: "+t,[4,this.fetchWithAuth(e,n,"DELETE")];case 1:return r.sent(),[2,!0]}}))}))},n.getMyPollVote=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="/polls/".concat(t,"/votes").concat(this.apiSignInUrl),n="There was a problem fetching user's own vote for the following poll: "+t,[4,this.fetchWithAuth(e,n)];case 1:return r=i.sent(),[2,this.pollRemapper.remapSinglePollVote(r.data)]}}))}))},n.getMyPollsVotes=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/polls/votes".concat(this.apiSignInUrl),t&&(e+=t.constructMainFiltersUrl()),[4,this.fetchWithAuth(e,"There was a problem fetching user's votes for polls")];case 1:return n=r.sent(),[2,this.pollRemapper.remapPollsVotes(n)]}}))}))},n.voteForPlayerOfTheMatch=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/football/potm/".concat(t).concat(this.apiSignInUrl),r={player_id:e},[4,this.fetchWithAuth(n,"There was a problem voting for 'Player of the match'","PUT",r)];case 1:return[2,{playerId:i.sent().data.player_id}]}}))}))},n.deleteVoteForPlayerOfTheMatch=function(t){return a(n,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/football/potm/".concat(t).concat(this.apiSignInUrl),[4,this.fetchWithAuth(e,"There was a problem with deleting vote for 'Player of the match'","DELETE")];case 1:return n.sent(),[2]}}))}))},n.getOwnVotesForPlayerOfTheMatch=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/football/potm".concat(this.apiSignInUrl),t&&(e+=t.constructFiltersUrl()),[4,this.fetchWithAuth(e,"There was a problem fetching user's own votes for 'Player of the match'")];case 1:return n=r.sent(),[2,this.playerOfTheMatchRemapper.remapUserVotes(n)]}}))}))},n.getResultsForPlayerOfTheMatch=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/football/potm/".concat(t).concat(this.apiSignInUrl).concat((0,u.isDisabledCache)(e)?(0,u.initDisableCache)():""),[4,this.fetchWithoutAuth(n,"There was a problem fetching results for 'Player of the match'")];case 1:return r=i.sent(),[2,this.playerOfTheMatchRemapper.remapResults(r)]}}))}))},n.pollRemapper=new c.default,n.playerOfTheMatchRemapper=new l.default,n}return i(e,t),e}(o(n(47724)).default);e.default=d},95792:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(8539)),o=a(n(78358));e.default=function(t){var e=this;this.localCache=null,this.https=null,this.getEntitiesByIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s,o;return i(this,(function(i){switch(i.label){case 0:return[4,this.setTopIdMappings()];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,7,,8]),[4,this.localCache.checkForExistingIdObjs(t,n)];case 3:return e=i.sent(),r=this.splitForRequestAndExisting(e),[4,this.https.getEntitiesByIdObjs(r.request,n)];case 4:return s=i.sent(),[4,this.localCache.addIdMappings(s)];case 5:return i.sent(),[4,this.localCache.getIdsByType(t,n,a)];case 6:return[2,i.sent()];case 7:return o=i.sent(),console.warn("There was a problem retrieving the entity ids ",o),[2,Promise.resolve([])];case 8:return[2]}}))}))},this.getEntitiesByIdsMap=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s,o,u,l,c;return i(this,(function(i){switch(i.label){case 0:return[4,this.setTopIdMappings()];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,7,,8]),e=JSON.parse(JSON.stringify(t)),[4,this.localCache.checkForExistingIdObjs(t,n)];case 3:return r=i.sent(),s=this.splitForRequestAndExisting(r),[4,this.https.getEntitiesByIdObjs(s.request,n)];case 4:return o=i.sent(),[4,this.localCache.addIdMappings(o)];case 5:return i.sent(),[4,this.localCache.getIdsByType(t,n,a)];case 6:return u=i.sent(),l=new Map,Object.keys(e).forEach((function(t){e[t].forEach((function(e,n){var r=u[t].length&&u[t][n]?u[t][n]:"";l.set(e,r)}))})),[2,l];case 7:return c=i.sent(),console.warn("There was a problem retrieving the entity ids ",c),[2,Promise.resolve(new Map)];case 8:return[2]}}))}))},this.getEntityById=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.localCache.getEntity(t,n,a)];case 1:return(e=i.sent())?[2,e]:[4,this.requestEntity(t,n,a)];case 2:return r=i.sent(),[4,this.localCache.addIdMappings(r)];case 3:return i.sent(),r&&r.length>0?[2,r[0]]:[2,null]}}))}))},this.splitForRequestAndExisting=function(t){var e={},n={};return Object.keys(t).forEach((function(r){e[r]=t[r].filter((function(t){return!t.exists})).map((function(t){return t.id})),n[r]=t[r].filter((function(t){return t.exists})).map((function(t){return t.id}))})),{existing:n,request:e}},this.requestEntity=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=Array.isArray(t)?t:[t],[4,this.https.getEntitiesByIds(n,t,a)];case 1:return[2,r.sent()];case 2:return e=r.sent(),console.warn("There was a problem retrieving the requested entity: ".concat(e)),[2,null];case 3:return[2]}}))}))},this.setTopIdMappings=function(){return r(e,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return t=Math.floor(Date.now()/1e3),[4,this.localCache.getExpiration("football","ids")];case 1:return n.sent()>t?[2,Promise.resolve()]:[4,this.https.getTopEntities()];case 2:return e=n.sent(),[4,this.localCache.addTopIdMappings(e)];case 3:return n.sent(),[2]}}))}))},this.localCache=(new o.default).createLocalCacheInstance(t.idSchema),this.https=new s.default(t)}},88900:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(14946),o=a(n(95792)),u=a(n(57611)),l=a(n(49052));e.default=function(t){var e=this;this.idSchema="",this.idMappingFacade=null,this.getEntityIdBySchemaId=function(t,n){return e.idMappingFacade.getEntityById(n,t,e.idSchema)},this.remapEntities=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){e=JSON.parse(JSON.stringify(t));try{return this.idSchema!==s.IdSchemaEnum.NATIVE?(r=new u.default,a=r.traverse(e,n),[2,this.idMappingFacade.getEntitiesByIds(a,"native",this.idSchema).then((function(t){return(new l.default).traverse(e,n,t)}))]):[2,t]}catch(t){return console.warn("There was a problem remapping entity: ".concat(n," with inner entity "),t),[2,[]]}return[2]}))}))},this.getEntityIdsBySchemaId=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return(e={})[n]=t,this.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:[4,this.idMappingFacade.getEntitiesByIds(e,this.idSchema,a)];case 1:return[2,r.sent()];case 2:return[2,e]}}))}))},this.idSchema=t.idSchema,this.idMappingFacade=new o.default(t)}},93845:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeConvert=void 0,e.typeConvert=function(t){switch(t){case"competitions":return"competition";case"players":case"relatedPlayer":case"squad":return"player";case"teams":case"participants":case"homeTeam":case"awayTeam":case"timeline":case"teamId":return"team";default:return t}}},57611:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(93845);e.default=function(){var t=this;this.extractedObjIds={},this.traverse=function(e,n){return n=(0,r.typeConvert)(n),Array.isArray(e)?t.traverseArrExtract(e,n):e&&"object"==typeof e&&t.traverseObjExtract(e,n),t.extractedObjIds},this.traverseArrExtract=function(e,n){e&&e.length>0&&e.forEach((function(e){t.traverseObjExtract(e,n)}))},this.traverseObjExtract=function(e,n){e&&Object.keys(e).length>0&&Object.keys(e).forEach((function(r){var i=e[r];"id"===r||"teamId"===r?(t.extractedObjIds.hasOwnProperty(n)||(t.extractedObjIds[n]=[]),i&&t.extractedObjIds[n].push(i)):e[r]&&t.traverse(e[r],r)}))}}},49052:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(93845);e.default=function(){var t=this;this.replaceObjIdsIndex=null,this.remappedIdsObj={},this.traverse=function(e,n,i){return n=(0,r.typeConvert)(n),null===t.replaceObjIdsIndex&&(t.initReplaceObjIdsIndex(i),t.remappedIdsObj=i),Array.isArray(e)?t.traverseArrReplace(e,n):e&&"object"==typeof e&&t.traverseObjReplace(e,n),e},this.initReplaceObjIdsIndex=function(e){t.replaceObjIdsIndex={},Object.keys(e).forEach((function(e){t.replaceObjIdsIndex[e]=0}))},this.traverseArrReplace=function(e,n){e&&e.length>0&&e.forEach((function(e){t.traverseObjReplace(e,n)}))},this.traverseObjReplace=function(e,n){e&&Object.keys(e).length>0&&Object.keys(e).forEach((function(r){"id"===r||"teamId"===r?e[r]&&(e[r]=t.remappedIdsObj[n][t.replaceObjIdsIndex[n]],t.replaceObjIdsIndex[n]=t.replaceObjIdsIndex[n]+1):e[r]&&t.traverse(e[r],r,t.remappedIdsObj)}))}}},87302:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(25936));e.default=function(t){var e=this;this.add=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.add(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.like(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.dislike=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.dislike(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addPageview=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addPageview(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addContentConsumed=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addContentConsumed(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addShare=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addShare(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addComment=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addComment(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addClickAd=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addClickAd(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addConvert=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addConvert(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getOwn=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.getOwn(t,n)];case 1:return[2,e.sent()]}}))}))},this.getForUser=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.getForUser(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.activityFacade=new s.default(t)}},71491:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ActionsEnum=void 0,(n=e.ActionsEnum||(e.ActionsEnum={})).LIKE="like",n.DISLIKE="dislike",n.PAGE_VIEW="page_view",n.CONTENT_CONSUMED="content_consumed",n.SHARE="share",n.COMMENT="comment",n.CLICK_AD="click_ad",n.PREDICTION_MADE="prediction_made",n.CONVERT="convert",n.MANAGE_INTERESTS="manage_interests",n.GAME_PARTICIPATION="game_participation",n.ARTICLE_CONSUMED="article_consumed",n.VIDEO_CONSUMED="video_consumed",n.SHORT_VIDEO_CONSUMED="short_video_consumed",n.LONG_VIDEO_CONSUMED="long_video_consumed",n.AUDIO_CONSUMED="audio_consumed",n.GALLERY_CONSUMED="gallery_consumed",n.IMAGE_CONSUMED="image_consumed",n.POLL_PARTICIPATION="poll_participation"},94964:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.UserActionsEnum=void 0,(n=e.UserActionsEnum||(e.UserActionsEnum={})).LIKE="like",n.DISLIKE="dislike",n.SHARE="share",n.COMMENT="comment",n.PREDICTION_MADE="prediction_made"},25936:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=s(n(71022)),l=n(71491),c=s(n(74630)),d=s(n(78261)),f=s(n(60629)),h=s(n(28636));e.default=function(t){var e=this;this.add=function(t,n,a,s){return r(e,void 0,void 0,(function(){var e,r,u,l,d;return i(this,(function(i){switch(i.label){case 0:return this.idSchema==o.IdSchemaEnum.NATIVE?[3,3]:(e=JSON.parse(JSON.stringify(n)),[4,this.activityService.remapTagsIds(n,this.idSchema,o.IdSchemaEnum.NATIVE)]);case 1:return r=i.sent(),u=new c.default(t,r,a,s),[4,this.activityHttps.createActivity(u)];case 2:return(l=i.sent()).context.tags=e,[2,l];case 3:return d=new c.default(t,n,a,s),[2,this.activityHttps.createActivity(d)]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityHttps.deleteActivity(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.LIKE,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.dislike=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.DISLIKE,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addPageview=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.PAGE_VIEW,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addContentConsumed=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.CONTENT_CONSUMED,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addShare=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.SHARE,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addComment=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.COMMENT,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addClickAd=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.CLICK_AD,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addConvert=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.CONVERT,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.getOwn=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,s;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,t&&(t=new f.default(t)),this.idSchema==o.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getOwnActivities(t,n)];case 1:e=i.sent(),r=0,a=e.data,i.label=2;case 2:return r<a.length?(s=a[r],[4,this.activityService.remapTagsIds(s.context.tags,o.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,e];case 6:return[4,this.activityHttps.getOwnActivities(t,n)];case 7:return[2,i.sent()]}}))}))},this.getForUser=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,u,l,c;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,n&&(n=new h.default(n)),this.idSchema==o.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getActivitiesForUser(t,n,s)];case 1:e=i.sent(),r=JSON.parse(JSON.stringify(e)),u=0,l=r.data,i.label=2;case 2:return u<l.length?(c=l[u],[4,this.activityService.remapTagsIds(a([],c.context.tags,!0),o.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return u++,[3,2];case 5:return[2,r];case 6:return[4,this.activityHttps.getActivitiesForUser(t,n,s)];case 7:return[2,i.sent()]}}))}))},this.idSchema=t.idSchema,this.activityHttps=new u.default(t),this.activityService=new d.default(t)}},80316:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.totalItems=0}},21517:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(72820));e.default=function(){this.id=null,this.profileId=null,this.property=null,this.value=null,this.action=null,this.context=new i.default,this.points=0}},82195:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){this.page=null,this.limit=null,this.page=t.page?t.page:null,this.limit=t.limit?t.limit:null}},60629:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.action=null,n.action=e.action?e.action:null,n}return i(e,t),e.prototype.constructFilterUrl=function(){var t="";return this.action&&(t+="&",t+="action=".concat(this.action)),this.page&&(t+="&",t+="page=".concat(this.page)),this.limit&&(t+="&",t+="limit=".concat(this.limit)),t},e}(a(n(82195)).default);e.default=s},28636:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.action=null,n.action=e.action?e.action:null,n}return i(e,t),e.prototype.constructFilterUrl=function(){var t="";return this.action&&(t+="&",t+="action=".concat(this.action)),this.page&&(t+="&",t+="page=".concat(this.page)),this.limit&&(t+="&",t+="limit=".concat(this.limit)),t},e}(a(n(82195)).default);e.default=s},16021:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569)),a=r(n(21517));e.default=function(){this.meta=new i.default,this.data=[new a.default]}},51382:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.label=null}},37976:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.id=null,this.label=null}},72820:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content=null,this.tags=[],this.campaign=null}},87060:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.source=null,this.type=null}},74630:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(72820));e.default=function(t,e,n,r){this.action=null,this.context=new i.default,this.action=t,this.context.tags=e,n&&(this.context.content=n),r&&(this.context.campaign=r)}},92453:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(10817),s=n(27974),o=i(n(61758)),u=i(n(86635)),l=i(n(13009)),c=i(n(57165)),d=i(n(5490)),f=i(n(81316)),h=i(n(53195)),p=i(n(81342)),m=i(n(9826)),v=i(n(63087)),_=i(n(21517)),y=i(n(16021));e.default=function(){var t=this;this.remapSingleResponse=function(t){var e=new _.default;return e.id=t.id,e.profileId=t.profile_id,e.property=t.property,e.value=t.value,e.action=t.action,e.context.content=t.context.content,e.context.tags=t.context.tags,e.context.campaign=t.context.campaign,e.points=t.points,e},this.remapActivitiesResponse=function(e){var n=new y.default;return n.meta.pagination.currentPage=e.meta.pagination.current_page,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.numberOfPages=e.meta.pagination.number_of_pages,n.meta.pagination.totalItems=e.meta.pagination.total_items,n.data=e.data.map((function(e){return t.remapSingleResponse(e)})),n},this.remapStatsResponse=function(e){var n=new f.default;return n.profileId=e.profile_id,n.tier=e.tier,n.points=e.points,n.predictionsMade=e.predictions_made,n.successRates.overallPercent=e.success_rates.overall_percent,n.successRates.byFootballCompetition=t.constructNewRecord(e.success_rates.by_competition),n.successRates.byFootballTeam=t.constructNewRecord(e.success_rates.by_team),n.successRates.byFootballMarket=t.constructNewRecord(e.success_rates.by_market),n.predictions=e.predictions?t.remapPredictionsStats(e.predictions):null,n.tiers=e.tiers?t.remapAchievementsStats(e.tiers):null,n.badges=e.badges?t.remapAchievementsStats(e.badges):null,n.discussions=e.discussions?t.remapDiscussionStats(e.discussions):null,n.classicQuizzes=e.classic_quizzes?t.remapClassicQuizStats(e.classic_quizzes):null,n.eitherOr=e.either_or?t.remapEitherOrStats(e.either_or):null,n},this.constructNewRecord=function(e){var n;return Object.entries(e).length?(Object.entries(e).forEach((function(e){var i,a=e[0],o=e[1];n=r(r({},n),((i={})[a]=t.remapSuccessRatePercent(o),i)),s.MarketEnum[a]&&delete n[a].model})),n):e},this.remapSuccessRatePercent=function(t){var e=new m.default;return e.successRatePercent=t.success_rate_percent,e},this.remapPredictionsStats=function(e){var n=new d.default;return n.single=t.remapSinglePredictionsStats(e.single),n.topX=e.top_x,n.matchQuiz=e.match_quiz,n},this.remapSinglePredictionsStats=function(e){var n=new p.default;return n.predictionsMade=e.predictions_made,n.correct=e.correct,n.points=e.points,n.breakdown=t.remapBreakdownSinglePredictionsStats(e.breakdown),n},this.remapBreakdownSinglePredictionsStats=function(t){if(t&&Object.keys(t).length){var e=new v.default,n=[],r=[];return Object.keys(t).forEach((function(e){var i=new h.default;i.entityId=e,i.entityType=t[e].entity_type,i.entitySource=t[e].entity_source,i.predictionsMade=t[e].predictions_made,i.correct=t[e].correct,i.points=t[e].points,i.entityType===a.EntityTypeEnum.COMPETITION?n.push(i):i.entityType===a.EntityTypeEnum.TEAM&&r.push(i)})),e.footballCompetitions=n,e.footballTeams=r,e}return new v.default},this.remapAchievementsStats=function(t){return t.map((function(t){var e=new o.default;return e.id=t.id,e.achievedAt=t.achieved_at,e}))},this.remapDiscussionStats=function(t){var e=new l.default;return e.totalPoints=t.total_points,e.postPoints=t.post_points,e.postsMade=t.posts_made,e.reactionPoints=t.reaction_points,e.reactionCount=t.reaction_count,e},this.remapClassicQuizStats=function(t){var e=new u.default;return e.participationCount=t.participation_count,e.points=t.points,e},this.remapEitherOrStats=function(t){var e=new c.default;return e.participationCount=t.participation_count,e}}},78261:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(88900));e.default=function(t){var e=this;this.remapTagsIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s,o,u,l,c,d,f,h;return i(this,(function(i){switch(i.label){case 0:return t&&t.length?(e={},r={},s=[],t.forEach((function(t){e.hasOwnProperty(t.type)||(e[t.type]=[],r[t.type]=[]),e[t.type].push(t.id),r[t.type].push(t)})),[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,n,a)]):[2,t];case 1:for(o=i.sent(),u=function(t,e){e.forEach((function(e,n){e.id=o[t][n],s.push(e)}))},l=0,c=Object.entries(r);l<c.length;l++)d=c[l],f=d[0],h=d[1],u(f,h);return[2,s]}}))}))},this.idSchema=t.idSchema,this.idMapping=new s.default(t)}},9201:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(87036));e.default=function(t){var e=this;this.facade=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.makePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.updatePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionsForUser=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGamePredictionsForUser(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionById=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGamePredictionById(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getRankings(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},87036:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(91450)),o=a(n(86409)),u=a(n(73253)),l=a(n(83685)),c=a(n(32156)),d=a(n(24705));e.default=function(t){var e=this;this.https=null,this.validator=null,this.profile=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t&&(t=new u.default(t)),[4,this.https.getBracketGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.getBracketGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(n),[4,this.https.makeBracketGamePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(a),[4,this.https.updateBracketGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionsForUser=function(t,n,a,s){return r(e,void 0,void 0,(function(){var e,r,o;return i(this,(function(i){switch(i.label){case 0:return a&&(a=new l.default(a)),[4,this.https.getBracketGamePredictionsForUser(t,n,a,s)];case 1:e=i.sent(),r=null,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.profile.getById(n).getInfo()];case 3:return r=i.sent(),[3,5];case 4:return o=i.sent(),console.error(o),[3,5];case 5:return e.data.forEach((function(t){t.profileModel=r})),[2,e]}}))}))},this.getGamePredictionById=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.getBracketGamePredictionById(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s;return i(this,(function(i){switch(i.label){case 0:return n&&(n=new c.default(n)),[4,this.https.getBracketGameRankings(t,n,a)];case 1:return e=i.sent(),r=e.data.map((function(t){return t.profileId})),s=[],r.length>0?[4,this.profile.getByIds(r)]:[3,3];case 2:s=i.sent(),e.data=e.data.map((function(t){return t.profileModel=s.find((function(e){return e.id===t.profileId}))||null,t})),i.label=3;case 3:return[2,e]}}))}))},this.https=new s.default(t),this.profile=new o.default(t),this.validator=new d.default(t.errorHandlingMode)}},73911:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participantOne=null,this.participantTwo=null}},18486:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73911));e.default=function(){this.matchId="",this.participantOne="",this.participantTwo="",this.winner="",this.homeParticipant="",this.startDate="",this.score=new i.default}},34971:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participants=[]}},29070:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.group=null,this.image=null,this.undecided=!1}},51922:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(34971));e.default=function(){this.id=null,this.title=null,this.description=null,this.rules=null,this.customFields=null,this.images=null,this.type="BRACKET",this.status=null,this.points=null,this.related=[],this.tiebreaker=null,this.predictionsCutoff=null,this.meta=new i.default,this.fixtures=[],this.createdAt=null,this.updatedAt=null}},46040:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},20594:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},49992:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},73253:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(64800)),o=n(40853),u=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.sortOrder=null,n.gameIds=null,n.status=(null==e?void 0:e.status)||null,n.sortOrder=(null==e?void 0:e.sortOrder)||null,n.gameIds=(null==e?void 0:e.gameIds)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.status&&Object.values(o.GameStatusEnum).includes(this.status)?(e+="&",e+="status=".concat(this.status)):null!==this.status&&console.warn("The filter 'status' has the following INVALID value: ".concat(this.status,". It will be not passed as a query param in the URL. For more information visit our documentation.")),!this.sortOrder||"asc"!==this.sortOrder&&"desc"!==this.sortOrder&&"ASC"!==this.sortOrder&&"DESC"!==this.sortOrder?null!==this.sortOrder&&console.warn("The filter 'sortOrder' has the following INVALID value: ".concat(this.sortOrder,". It will be not passed as a query param in the URL. For more information visit our documentation.")):(e+="&",e+="sort_order=".concat(this.sortOrder)),this.gameIds&&Array.isArray(this.gameIds)&&this.gameIds.length>0?(e+="&",e+="game_ids=".concat(this.gameIds)):null!==this.gameIds&&console.warn("The filter 'gameIds' has the following INVALID value: ".concat(this.gameIds,". It will be not passed as a query param in the URL. For more information visit our documentation.")),e},e}(s.default);e.default=u},83685:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64800)).default);e.default=s},32156:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64800)).default);e.default=s},33830:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId="",this.participantOne="",this.participantTwo="",this.correct=null}},96166:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BracketGamePredictionStatusEnum=void 0;var i,a=r(n(41198));!function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(i=e.BracketGamePredictionStatusEnum||(e.BracketGamePredictionStatusEnum={}));e.default=function(){this.id="",this.profileId="",this.profileModel=null,this.gameId="",this.totalPoints=null,this.gamePoints=null,this.bonusPoints=null,this.position=null,this.status=i.ACTIVE,this.fixtures=[],this.tiebreaker=new a.default,this.createdAt="",this.updatedAt=""}},41198:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.statTotal=0}},16187:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.BracketWinnerEnum=void 0,(n=e.BracketWinnerEnum||(e.BracketWinnerEnum={})).PARTICIPANT_ONE="PARTICIPANT_ONE",n.PARTICIPANT_TWO="PARTICIPANT_TWO",n.DRAW="DRAW"},15142:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16187);e.default=function(){this.matchId="",this.participantOne="",this.participantTwo="",this.winner=r.BracketWinnerEnum.PARTICIPANT_ONE}},7583:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.fixtures=[]}},6932:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},34227:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(78923)),a=r(n(73911)),s=r(n(18486)),o=r(n(34971)),u=r(n(29070)),l=r(n(51922)),c=r(n(46040)),d=r(n(49992)),f=r(n(20594)),h=r(n(33830)),p=r(n(96166)),m=r(n(41198)),v=r(n(6932));e.default=function(){var t=this;this.remapBracketGames=function(e){var n=new d.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapBracketGameById(e)})),n},this.remapBracketGameById=function(e){var n=new l.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.rules=e.rules,n.customFields=e.custom_fields,n.images=e.images,n.type=e.type,n.status=e.status,n.points=e.points,n.related=e.related?t.remapRelated(e.related):e.related,n.tiebreaker=e.tiebreaker?t.remapBracketGameTiebreaker(e.tiebreaker):e.tiebreaker,n.predictionsCutoff=e.predictions_cutoff,n.meta=e.meta&&e.meta.participants?t.remapBracketGameMeta(e.meta):e.meta,n.fixtures=e.fixtures?t.remapBracketGameFixtures(e.fixtures):e.fixtures,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapPredictionToRequestBody=function(t){return t.map((function(t){return{match_id:t.matchId,participant_one:t.participantOne,participant_two:t.participantTwo,winner:t.winner}}))},this.remapPrediction=function(e){var n=new p.default;return n.id=e.id,n.profileId=e.profile_id,n.gameId=e.game_id,n.totalPoints=e.total_points,n.gamePoints=e.game_points,n.bonusPoints=e.bonus_points,n.position=e.position,n.status=e.status,n.fixtures=t.remapPredictionFixtures(e.fixtures),n.tiebreaker=e.tiebreaker?t.remapPredictionTiebreaker(e.tiebreaker):e.tiebreaker,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapPredictionsForUser=function(e){var n=new c.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRankings=function(e){var n=new v.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRelated=function(t){return t.map((function(t){var e=new i.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},this.remapPredictionFixtures=function(t){return t.map((function(t){var e=new h.default;return e.matchId=t.match_id,e.participantOne=t.participant_one,e.participantTwo=t.participant_two,e.winner=t.winner,e.correct=t.correct,e}))},this.remapPredictionTiebreaker=function(t){var e=new m.default;return e.statTotal=t.stat_total,e},this.remapBracketGameMeta=function(t){var e=new o.default;return e.participants=t.participants.map((function(t){var e=new u.default;return e.id=t.id,e.name=t.name,e.group=t.group,e.image=t.image,e.undecided=t.undecided,e})),e},this.remapBracketGameFixtures=function(e){return e.map((function(e){var n=new s.default;return n.matchId=e.match_id,n.participantOne=e.participant_one,n.participantTwo=e.participant_two,n.winner=e.winner,n.homeParticipant=e.home_participant,n.startDate=e.start_date,n.score=e.score?t.remapBracketGameFixturesScore(e.score):e.score,n}))},this.remapBracketGameFixturesScore=function(t){var e=new a.default;return e.participantOne=t.participant_one,e.participantTwo=t.participant_two,e},this.remapBracketGameTiebreaker=function(t){var e=new f.default;return e.statTiebreakerEnabled=t.stat_tiebreaker_enabled,e.statTotal=t.stat_total,e}}},24705:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(67900),o=n(4021),u=n(94904),l=a(n(16198)),c=a(n(15142)),d=function(t){function e(e){var n=t.call(this,e)||this;return n.validatePrediction=function(t){t.fixtures&&Array.isArray(t.fixtures)&&0!==t.fixtures.length||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.REQUIRED_FIXTURES_FIELD);for(var e=Object.keys(new c.default),r=0,i=t.fixtures;r<i.length;r++){var a=i[r];(Object.keys(a).length!==e.length||Object.keys(a).some((function(t){return!e.includes(t)})))&&n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.INVALID_FIXTURES_FIELD)}!t.tiebreaker||t.tiebreaker.statTotal&&Number.isInteger(t.tiebreaker.statTotal)||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.INVALID_TIEBREAKER_FIELD)},n}return i(e,t),e}(l.default);e.default=d},94068:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(80123));e.default=function(t){var e=this;this.facade=null,this.issue=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.issue(t,n)];case 1:return[2,e.sent()]}}))}))},this.update=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.update(t,n)];case 1:return[2,e.sent()]}}))}))},this.updateTemplate=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.updateTemplate(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyChallenges=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyChallenges(t)];case 1:return[2,e.sent()]}}))}))},this.accept=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.accept(t)];case 1:return[2,e.sent()]}}))}))},this.reject=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.reject(t)];case 1:return[2,e.sent()]}}))}))},this.leave=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.leave(t)];case 1:return[2,e.sent()]}}))}))},this.getMyChallengesStandings=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyChallengesStandings(t)];case 1:return[2,e.sent()]}}))}))},this.getInvitations=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getInvitations(t)];case 1:return[2,e.sent()]}}))}))},this.getReportedPosts=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getReportedPosts(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPredictions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPredictions(t,n)];case 1:return[2,e.sent()]}}))}))},this.moderatePost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.moderatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},80123:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(87059)),o=a(n(48863)),u=a(n(45955)),l=a(n(73886)),c=a(n(49759)),d=n(4021),f=n(94904),h=a(n(62535)),p=n(5318),m=a(n(88247)),v=a(n(42590)),_=a(n(86409)),y=a(n(33820)),g=a(n(35230)),b=a(n(62388));e.default=function(t){var e=this;this.factory=null,this.https=null,this.loyaltyHttps=null,this.profile=null,this.service=null,this.discussionsService=null,this.issue=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){switch(i.label){case 0:return e=this.factory.createRequestBodyFromParam(t,"ONE_VS_ONE"),[4,this.https.create(e,"CHALLENGE")];case 1:return r=i.sent(),[4,this.service.setTemplateModels(r)];case 2:return i.sent(),[4,this.https.invite(r.id,[n])];case 3:return a=i.sent(),r.invites=[],r.invites.push(a[0]),[2,r]}}))}))},this.update=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return e=this.factory.createUpdateRequestBodyFromParam(n,"ONE_VS_ONE"),[4,this.https.update(t,e,"CHALLENGE")];case 1:return r=i.sent(),[4,this.service.setTemplateModels(r)];case 2:return i.sent(),[2,r]}}))}))},this.updateTemplate=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.https.updateLeagueTemplate(t,n,a,"CHALLENGE")];case 1:return e=r.sent(),[4,this.service.setTemplateModels(e)];case 2:return r.sent(),[2,e]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.delete(t,"CHALLENGE")];case 1:return[2,e.sent()]}}))}))},this.getById=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.https.getById(t,"CHALLENGE",n)];case 1:return e=r.sent(),[4,this.service.setTemplateModels(e)];case 2:return r.sent(),[2,e]}}))}))},this.getMyChallenges=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return t=new b.default(t),[4,this.https.getMyLeagues(t,"CHALLENGE")];case 1:return e=n.sent(),[4,this.service.setTemplateModelsInLeagues(e)];case 2:return n.sent(),[2,e]}}))}))},this.accept=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=!0,[4,this.https.accept(t,e,"CHALLENGE")];case 1:return n=r.sent(),[4,this.finalizeAcceptModel(n,e)];case 2:return[2,r.sent()]}}))}))},this.reject=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=!1,[4,this.https.accept(t,e,"CHALLENGE")];case 1:return n=r.sent(),[4,this.finalizeAcceptModel(n,e)];case 2:return[2,r.sent()]}}))}))},this.leave=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.leave(t,"CHALLENGE")];case 1:return[2,e.sent()]}}))}))},this.finalizeAcceptModel=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return n?[4,this.getById(t.challengeId)]:[3,2];case 1:e=r.sent(),t.challengeModel=e,r.label=2;case 2:return[4,this.service.setProfileModel(t)];case 3:return r.sent(),[2,t]}}))}))},this.getMyChallengesStandings=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s,o;return i(this,(function(i){switch(i.label){case 0:return t&&(t=new y.default(t)),[4,this.profile.getOwn().getInfo()];case 1:return e=i.sent(),[4,this.loyaltyHttps.getUserRankingsForPrivateLeagueAndChallenges(e.id,"CHALLENGE",t)];case 2:n=i.sent(),r=0,a=n.data,i.label=3;case 3:return r<a.length?(s=a[r],[4,this.getById(s.challengeId)]):[3,6];case 4:o=i.sent(),s.challengeModel=o,i.label=5;case 5:return r++,[3,3];case 6:return this.service.setTemplateModelsFromLeagueModels(n.data,"CHALLENGE"),[2,n]}}))}))},this.getInvitations=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(t=new l.default(t)).type="ONE_VS_ONE",[4,this.https.getInvitations("CHALLENGE",t)];case 1:return e=n.sent(),[4,this.service.setTemplateModelsInLeagues(e.data)];case 2:return n.sent(),[2,e]}}))}))},this.getReportedPosts=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return n&&(n=new c.default(n)),[4,this.https.getReportedPosts(t,n)];case 1:return e=i.sent(),r=e,[4,this.discussionsService.finalizePostFullModel(e.data)];case 2:return r.data=i.sent(),[2,e]}}))}))},this.getPredictions=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:if(n){if(n.limit&&n.limit>20)throw new h.default(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_LIMIT,p.ErrorMessages.INVALID_LIMIT+20..toString());n=new m.default(n)}return[4,this.https.getPredictions(t,n)];case 1:return e=r.sent(),[4,this.service.setModelsForPredictions(e)];case 2:return[2,r.sent()]}}))}))},this.moderatePost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.moderatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.factory=new u.default,this.https=new o.default(t),this.service=new v.default(t),this.loyaltyHttps=new s.default(t),this.profile=new _.default(t),this.discussionsService=new g.default(t)}},76085:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profileId="",this.profileModel=null,this.challengeId="",this.challengeModel=null,this.message=""}},95124:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ONE_VS_ONE",e}return i(e,t),e}(a(n(2167)).default);e.default=s},39845:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ONE_VS_ONE",e}return i(e,t),e}(a(n(64584)).default);e.default=s},33820:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=null,this.page=null,this.challengeId=null,this.templateId=null,this.sortOrder=null,this.constructFiltersUrl=function(){var t="";return e.limit&&(t+="&limit=".concat(e.limit)),e.page&&(t+="&page=".concat(e.page)),e.challengeId&&(t+="&league_id=".concat(e.challengeId)),e.templateId&&(t+="&template_id=".concat(e.templateId)),e.sortOrder&&(t+="&sort_order=".concat(e.sortOrder)),t},this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null,this.challengeId=t&&t.challengeId?t.challengeId:null,this.templateId=t&&t.templateId?t.templateId:null,this.sortOrder=t&&t.sortOrder?t.sortOrder:null}},62388:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.type="ONE_VS_ONE",this.userRole=null,this.constructFiltersUrl=function(){var t="&type=".concat(e.type);return e.userRole&&(t+="&user_role=".concat(e.userRole)),t},this.userRole=(null==t?void 0:t.userRole)||null}},11298:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.templateId="",this.templateModel=null,this.challengeId="",this.challengeModel=null,this.position="",this.points=0,this.type="challenge"}},20244:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(5645));e.default=function(t){var e=this;this.facade=null,this.getAll=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getAll(t,n)];case 1:return[2,e.sent()]}}))}))},this.getById=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getById(t)];case 1:return[2,e.sent()]}}))}))},this.createPost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.createPost(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPostById=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPostById(t)];case 1:return[2,e.sent()]}}))}))},this.updatePost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.updatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.deletePost=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.deletePost(t)];case 1:return[2,e.sent()]}}))}))},this.getPosts=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPosts(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPostReplies=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPostReplies(t,n)];case 1:return[2,e.sent()]}}))}))},this.react=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.reactToPost(t,n)];case 1:return[2,e.sent()]}}))}))},this.reportPost=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.reportPost(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getOwnPosts=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getOwnPosts(t)];case 1:return[2,e.sent()]}}))}))},this.getUserPosts=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getUserPosts(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.facade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getPostsCount=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPostsCount(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopDiscussions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getTopDiscussions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPostsCountExtended=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPostsCountExtended(t)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},5645:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(14946),c=n(4021),d=n(94904),f=u(n(68097)),h=u(n(62535)),p=n(5318),m=a(n(47686)),v=u(n(87945)),_=u(n(78261)),y=u(n(55383)),g=u(n(90505)),b=u(n(39209)),w=u(n(54804)),E=u(n(35230));e.default=function(t){var e=this;this.idSchema=null,this.errorHandlingMode=null,this.https=null,this.clientHttps=null,this.activityService=null,this.service=null,this.factory=null,this.LIMIT_POSTS_COUNT=50,this.LIMIT_POSTS_COUNT_EXTENDED=250,this.getAll=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i,a;return o(this,(function(s){switch(s.label){case 0:return t&&(t=new g.default(t)),[4,this.https.getAll(t,n)];case 1:e=s.sent(),r=0,i=e.data,s.label=2;case 2:return r<i.length?(a=i[r],[4,this.remapTags(a,l.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:s.sent(),s.label=4;case 4:return r++,[3,2];case 5:return[2,e]}}))}))},this.getById=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.https.getById(t)];case 1:return e=n.sent(),[4,this.remapTags(e,l.IdSchemaEnum.NATIVE,this.idSchema)];case 2:return n.sent(),[2,e]}}))}))},this.createPost=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return e=JSON.parse(JSON.stringify(n)),[4,this.remapTags(e,this.idSchema,l.IdSchemaEnum.NATIVE)];case 1:return i.sent(),r=this.factory.createRequestBodyFromParam(e),[4,this.https.createPost(t,r)];case 2:return[2,i.sent()]}}))}))},this.getPostById=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.https.getPostById(t)];case 1:return e=n.sent(),[4,this.service.finalizePostFullModel([e])];case 2:return[2,n.sent()[0]]}}))}))},this.updatePost=function(t,n){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.https.updatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.deletePost=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.https.deletePost(t)];case 1:return[2,e.sent()]}}))}))},this.getPosts=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return n&&(n=new b.default(n)),[4,this.https.getPosts(t,n)];case 1:return e=i.sent(),r=e,[4,this.service.finalizePostFullModel(e.data)];case 2:return r.data=i.sent(),[2,e]}}))}))},this.getPostReplies=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return n&&(n=new b.default(n)),[4,this.https.getPostReplies(t,n)];case 1:return e=i.sent(),r=e,[4,this.service.finalizePostFullModel(e.data)];case 2:return r.data=i.sent(),[2,e]}}))}))},this.reactToPost=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,this.https.reactToPost(t,n)];case 1:return e=r.sent(),[4,this.service.finalizePostFullModel([e])];case 2:return[2,r.sent()[0]]}}))}))},this.reportPost=function(t,n,r){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.https.reportPost(t,n,r)];case 1:return[2,e.sent()]}}))}))},this.getOwnPosts=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return t&&(t=new b.default(t)),[4,this.https.getOwnPosts(t)];case 1:return[2,e.sent()]}}))}))},this.getUserPosts=function(t,n,r){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return n&&(n=new b.default(n)),[4,this.https.getUserPosts(t,n,r)];case 1:return[2,e.sent()]}}))}))},this.getConfig=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(m.FeatureConfigEnum.DISCUSSIONS)];case 1:return[2,t.sent()]}}))}))},this.getPostsCount=function(t,n){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:if(!t||!Array.isArray(t)||!t.length){if("standard"===this.errorHandlingMode)throw new h.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.INVALID_DISCUSSION_IDS);throw new f.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.INVALID_DISCUSSION_IDS)}if(t.length>this.LIMIT_POSTS_COUNT){if("standard"===this.errorHandlingMode)throw new h.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.EXCEEDED_DISCUSSION_IDS);throw new f.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.EXCEEDED_DISCUSSION_IDS)}return[4,this.https.getPostsCount(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopDiscussions=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i,a;return o(this,(function(s){switch(s.label){case 0:return t?(t=new w.default(t),[4,this.service.finalizeTopDiscussionsFilters(t)]):[3,2];case 1:s.sent(),s.label=2;case 2:return[4,this.https.getTopDiscussions(t,n)];case 3:e=s.sent(),r=0,i=e.data,s.label=4;case 4:return r<i.length?(a=i[r],[4,this.remapTags(a,l.IdSchemaEnum.NATIVE,this.idSchema)]):[3,7];case 5:s.sent(),s.label=6;case 6:return r++,[3,4];case 7:return[2,e]}}))}))},this.getPostsCountExtended=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:if(!t||!Array.isArray(t)||!t.length){if("standard"===this.errorHandlingMode)throw new h.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.INVALID_DISCUSSION_IDS);throw new f.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.INVALID_DISCUSSION_IDS)}if(t.length>this.LIMIT_POSTS_COUNT_EXTENDED){if("standard"===this.errorHandlingMode)throw new h.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.EXCEEDED_EXTENDED_DISCUSSION_IDS+this.LIMIT_POSTS_COUNT_EXTENDED);throw new f.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.EXCEEDED_EXTENDED_DISCUSSION_IDS+this.LIMIT_POSTS_COUNT_EXTENDED)}return[4,this.https.getPostsCountExtended(t)];case 1:return[2,e.sent()]}}))}))},this.remapTags=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i;return o(this,(function(a){switch(a.label){case 0:return this.idSchema!=l.IdSchemaEnum.NATIVE&&t.context&&t.context.tags&&t.context.tags.length?(e=JSON.parse(JSON.stringify(t.context.tags)),[4,this.activityService.remapTagsIds(e,n,r)]):[3,2];case 1:i=a.sent(),t.context.tags=i,a.label=2;case 2:return[2]}}))}))},this.idSchema=t.idSchema,this.errorHandlingMode=t.errorHandlingMode,this.https=new v.default(t),this.clientHttps=new m.default(t),this.activityService=new _.default(t),this.service=new E.default(t),this.factory=new y.default}},55383:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(25678));e.default=function(){this.createRequestBodyFromParam=function(t){var e=new i.default;return e.content=t.content,e.reply_id=t.replyId,e.discussion_label=t.discussionLabel,e.discussion_url=t.discussionUrl,e.anonymous_nickname=t.userNickname,e.context=t.context,e}}},33949:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(61079));e.default=function(){this.enabled=!1,this.moderateLinks=!1,this.linksWhitelist=[],this.moderatorProfileId="",this.dictionary=new i.default}},61079:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.reason="",this.words=[]}},18543:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(33949));e.default=function(){this.enabled=!1,this.clientId=null,this.automaticModeration=new i.default}},39838:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content="",this.replyId="",this.discussionLabel="",this.discussionUrl="",this.userNickname="",this.context=null}},77897:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.label="",this.discussionType="LEAGUE",this.discussionUrl=null,this.moderationType="USER",this.postsCount=0,this.pinnedPosts=[],this.lastPostId="",this.status="",this.deleted=!1,this.deletedAt="",this.deletedBy="",this.customFields=null,this.context=null,this.createdAt="",this.updatedAt=""}},90505:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(64800)),o=["CREATED_AT_ASC","CREATED_AT_DESC","POSTS_COUNT_ASC","POSTS_COUNT_DESC"],u=["ACTIVE","INACTIVE"],l=function(t){function e(e){var n=t.call(this,e)||this;return n.discussionIds=e&&e.discussionIds?e.discussionIds:null,n.label=e&&e.label?e.label:null,n.discussionUrl=e&&e.discussionUrl?e.discussionUrl:null,n.fromDate=e&&e.fromDate?e.fromDate:null,n.toDate=e&&e.toDate?e.toDate:null,n.fromCount=e&&e.fromCount?e.fromCount:null,n.toCount=e&&e.toCount?e.toCount:null,n.sort=e&&e.sort?e.sort:null,n.status=(null==e?void 0:e.status)||null,n.skipDeleted=e&&void 0!==e.skipDeleted?e.skipDeleted:null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return null!==this.discussionIds&&(e+="&discussion_ids=".concat(this.discussionIds.join(","))),null!==this.label&&(e+="&label=".concat(this.label)),null!==this.discussionUrl&&(e+="&discussion_url=".concat(this.discussionUrl)),null!==this.fromDate&&(e+="&from_date=".concat(this.fromDate)),null!==this.toDate&&(e+="&to_date=".concat(this.toDate)),null!==this.fromCount&&(e+="&from_count=".concat(this.fromCount)),null!==this.toCount&&(e+="&to_count=".concat(this.toCount)),this.sort&&o.includes(this.sort.toUpperCase())&&(e+="&sort=".concat(this.sort.toUpperCase())),this.status&&u.includes(this.status.toUpperCase())&&(e+="&status=".concat(this.status.toUpperCase())),null!==this.skipDeleted&&(e+="&skip_deleted=".concat(this.skipDeleted)),e},e}(s.default);e.default=l},39209:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.skipDeleted=e&&void 0!==e.skipDeleted?e.skipDeleted:null,n.skipModerated=e&&void 0!==e.skipModerated?e.skipModerated:null,n.sort=e&&e.sort?e.sort.toLocaleLowerCase():null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return null!==this.skipDeleted&&(e+="&skip_deleted=".concat(this.skipDeleted)),null!==this.skipModerated&&(e+="&skip_moderated=".concat(this.skipModerated)),this.sort&&(e+="&sort=".concat(this.sort)),e},e}(a(n(64800)).default);e.default=s},54804:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.fromDate=(null==e?void 0:e.fromDate)||null,n.toDate=(null==e?void 0:e.toDate)||null,n.entityIds=(null==e?void 0:e.entityIds)||null,n.entityType=(null==e?void 0:e.entityType)||null,n.contentType=(null==e?void 0:e.contentType)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return null!==this.fromDate&&(e+="&from_date=".concat(this.fromDate)),null!==this.toDate&&(e+="&to_date=".concat(this.toDate)),null!==this.entityIds&&this.entityIds.length>0&&(e+="&entity_ids=".concat(this.entityIds)),null!==this.contentType&&(e+="&content_type=".concat(this.contentType)),e},e}(a(n(64800)).default);e.default=s},44071:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.userId="",this.discussionId="",this.content="",this.repliesCount=0,this.replyId="",this.anonymousNickname="",this.reactions=[],this.reactionsCount=0,this.reports=[],this.reportsCount=0,this.versions=null,this.privatePost=!1,this.deleted=!1,this.deletedAt="",this.deletedBy="",this.moderated=!1,this.moderatedAt="",this.moderatedBy="",this.moderatedReason="",this.createdAt="",this.updatedAt=""}},42528:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.userModel=null,e}return i(e,t),e}(a(n(44071)).default);e.default=s},25678:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content="",this.reply_id="",this.discussion_label="",this.discussion_url="",this.anonymous_nickname="",this.context=null}},70377:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.postsCount=0}},29331:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(19448));e.default=function(){this.meta=new i.default,this.data=[]}},64858:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(19448));e.default=function(){this.meta=new i.default,this.data=[]}},19448:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.pagination={totalItems:0,nextPageStartsAfter:"",lastCommentCreateTimestamp:""}}},84071:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},51579:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type="",this.userIds=[],this.reactionCount=0}},43476:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(77897)),a=r(n(19448)),s=r(n(44071)),o=r(n(29331)),u=r(n(51579)),l=r(n(85789)),c=r(n(83687)),d=r(n(42528)),f=r(n(64858)),h=r(n(38872)),p=r(n(84071)),m=r(n(70377));e.default=function(){var t=this;this.remapToDiscussions=function(e){return e.meta=t.remapToMeta(e.meta),e.data=e.data.map((function(e){return t.remapToDiscussionById(e)})),e},this.remapToDiscussionById=function(t){var e=new i.default;return e.id=t.id,e.label=t.label,e.status=t.status,e.deleted=t.deleted,e.deletedAt=t.deleted_at,e.deletedBy=t.deleted_by,e.discussionType=t.discussion_type,e.discussionUrl=t.discussion_url,e.moderationType=t.moderation_type,e.postsCount=t.posts_count,e.pinnedPosts=t.pinned_posts,e.lastPostId=t.last_post_id,e.customFields=t.custom_fields,e.context=t.context,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e},this.remapToPostsForDiscussion=function(e,n){var r=new o.default,i=new f.default;return r.meta=t.remapToPostMeta(e.meta),r.data=e.data.map((function(e){return t.remapToPostByIdBasic(e)})),i.meta=t.remapToPostMeta(e.meta),i.data=e.data.map((function(e){return t.remapToPostByIdFull(e)})),"basic"===n?r:i},this.remapToPosts=function(e){var n=new p.default;return n.meta=t.remapToMeta(e.meta),n.data=e.data.map((function(e){return t.remapToPostByIdBasic(e)})),n},this.remapToPostMeta=function(t){var e=new a.default;return e.pagination.totalItems=t.pagination.total_items,e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e.pagination.lastCommentCreateTimestamp=t.pagination.last_comment_create_timestamp,e},this.remapToMeta=function(t){var e=new h.default;return e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e},this.remapToPostByIdBasic=function(e){var n=new s.default;return n.id=e.id,n.userId=e.user_id,n.discussionId=e.discussion_id,n.content=e.content,n.anonymousNickname=e.anonymous_nickname,n.reactionsCount=e.reactions_count,n.replyId=e.reply_id,n.reactions=e.reactions.length?e.reactions.map((function(e){return t.remapReactionsPost(e)})):e.reactions,n.repliesCount=e.replies_count,n.reports=e.reports.length?e.reports.map((function(e){return t.remapReportPost(e)})):e.reports,n.reportsCount=e.reports_count,n.versions=e.versions.length?e.versions.map((function(e){return t.remapVersionsPost(e)})):e.versions,n.privatePost=e.private_post,n.deleted=e.deleted,n.deletedAt=e.deleted_at,n.deletedBy=e.deleted_by,n.moderated=e.moderated,n.moderatedAt=e.moderated_at,n.moderatedBy=e.moderated_by,n.moderatedReason=e.moderated_reason,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapToPostByIdFull=function(e){var n=new d.default;return n.id=e.id,n.userId=e.user_id,n.discussionId=e.discussion_id,n.content=e.content,n.anonymousNickname=e.anonymous_nickname,n.reactionsCount=e.reactions_count,n.replyId=e.reply_id,n.reactions=e.reactions.length?e.reactions.map((function(e){return t.remapReactionsPost(e)})):e.reactions,n.repliesCount=e.replies_count,n.reports=e.reports.length?e.reports.map((function(e){return t.remapReportPost(e)})):e.reports,n.reportsCount=e.reports_count,n.versions=e.versions.length?e.versions.map((function(e){return t.remapVersionsPost(e)})):e.versions,n.privatePost=e.private_post,n.deleted=e.deleted,n.deletedAt=e.deleted_at,n.deletedBy=e.deleted_by,n.moderated=e.moderated,n.moderatedAt=e.moderated_at,n.moderatedBy=e.moderated_by,n.moderatedReason=e.moderated_reason,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapToPostCount=function(t){return t.map((function(t){var e=new m.default;return e.id=t.id,e.postsCount=t.posts_count,e}))},this.remapReactionsPost=function(t){var e=new u.default;return e.type=t.type,e.userIds=t.user_ids,e.reactionCount=t.reaction_count,e},this.remapVersionsPost=function(t){var e=new l.default;return e.content=t.content,e.updatedAt=t.updated_at,e},this.remapReportPost=function(t){var e=new c.default;return e.userId=t.user_id,e.reason=t.reason,e.reasonDetails=t.reason_details,e}}},83687:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.userId=null,this.reason="AD",this.reasonDetails=null}},85789:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.updatedAt="",this.content=""}},35230:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(14946),o=a(n(88900)),u=a(n(19685)),l=a(n(86409));e.default=function(t){var e=this;this.idSchema=null,this.profile=null,this.validator=null,this.idMapping=null,this.finalizePostFullModel=function(t){return r(e,void 0,void 0,(function(){var e,n,r=this;return i(this,(function(i){switch(i.label){case 0:return e=t.map((function(t){return t.userId})),[4,this.profile.getByIds(e)];case 1:return n=i.sent(),[2,t.map((function(t){return t.userModel=r.extractModelById(n,t.userId),t}))]}}))}))},this.finalizeTopDiscussionsFilters=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.idSchema!==s.IdSchemaEnum.NATIVE&&t.entityIds&&t.entityIds.length>0?(this.validator.validateFilters(t),[4,this.idMapping.getEntityIdsBySchemaId(Array.from(t.entityIds),t.entityType,s.IdSchemaEnum.NATIVE)]):[3,2];case 1:e=n.sent(),t.entityIds=e[t.entityType],n.label=2;case 2:return[2]}}))}))},this.extractModelById=function(t,e){if(t.length){var n=t.find((function(t){return t.id===e}));return n?(delete n.interests,n):null}return null},this.idSchema=t.idSchema,this.profile=new l.default(t),this.validator=new u.default(t),this.idMapping=new o.default(t)}},79198:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(86028));e.default=function(t){var e=this;this.facade=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.makePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.updatePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionsForUser=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGamePredictionsForUser(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getRankings(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},86028:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(91450)),o=a(n(86409)),u=a(n(23737)),l=a(n(38651)),c=a(n(2431)),d=a(n(39185));e.default=function(t){var e=this;this.https=null,this.validator=null,this.profile=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t&&(t=new u.default(t)),[4,this.https.getEventGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.getEventGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(n),[4,this.https.makeEventGamePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(a),[4,this.https.updateEventGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionsForUser=function(t,n,a,s){return r(e,void 0,void 0,(function(){var e,r,o;return i(this,(function(i){switch(i.label){case 0:return a&&(a=new l.default(a)),[4,this.https.getEventGamePredictionsForUser(t,n,a,s)];case 1:e=i.sent(),r=null,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.profile.getById(n).getInfo()];case 3:return r=i.sent(),[3,5];case 4:return o=i.sent(),console.error(o),[3,5];case 5:return e.data.forEach((function(t){t.profileModel=r})),[2,e]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s;return i(this,(function(i){switch(i.label){case 0:return n&&(n=new c.default(n)),[4,this.https.getEventGameRankings(t,n,a)];case 1:return e=i.sent(),r=e.data.map((function(t){return t.profileId})),s=[],r.length>0?[4,this.profile.getByIds(r)]:[3,3];case 2:s=i.sent(),e.data=e.data.map((function(t){return t.profileModel=s.find((function(e){return e.id===t.profileId}))||null,t})),i.label=3;case 3:return[2,e]}}))}))},this.https=new s.default(t),this.profile=new o.default(t),this.validator=new d.default(t.errorHandlingMode)}},58012:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.options=[]}},2703:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.min=0,this.max=0}},95106:(t,e)=>{"use strict";var n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.EventGameFixtureStatusEnum=e.EventGameOutcomeTypeEnum=void 0,(r=e.EventGameOutcomeTypeEnum||(e.EventGameOutcomeTypeEnum={})).BOOLEAN="BOOLEAN",r.NUMBER="NUMBER",r.ENUM="ENUM",r.FREE_INPUT="FREE_INPUT",function(t){t.ACTIVE="ACTIVE",t.SETTLED="SETTLED",t.VOID="VOID"}(n=e.EventGameFixtureStatusEnum||(e.EventGameFixtureStatusEnum={}));e.default=function(){this.id="",this.question="",this.status=n.ACTIVE,this.voidReason=null,this.points=0,this.outcomeType=null,this.validOutcomes=null,this.outcome=null}},74809:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.title=null,this.description=null,this.images=null,this.rules=null,this.customFields=null,this.type="EVENT",this.status=null,this.points=null,this.related=[],this.tiebreaker=null,this.predictionsCutoff=null,this.fixtures=[],this.createdAt=null,this.updatedAt=null}},3868:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},62372:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},11407:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},23737:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(64800)),o=n(40853),u=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.sortOrder=null,n.gameIds=null,n.status=(null==e?void 0:e.status)||null,n.sortOrder=(null==e?void 0:e.sortOrder)||null,n.gameIds=(null==e?void 0:e.gameIds)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.status&&Object.values(o.GameStatusEnum).includes(this.status)?(e+="&",e+="status=".concat(this.status)):null===this.status&&void 0===this.status||console.warn("The filter 'status' has the following INVALID value: ".concat(this.status,". It will be not passed as a query param in the URL. For more information visit our documentation.")),!this.sortOrder||"asc"!==this.sortOrder&&"desc"!==this.sortOrder&&"ASC"!==this.sortOrder&&"DESC"!==this.sortOrder?null===this.sortOrder&&void 0===this.sortOrder||console.warn("The filter 'sortOrder' has the following INVALID value: ".concat(this.sortOrder,". It will be not passed as a query param in the URL. For more information visit our documentation.")):(e+="&",e+="sort_order=".concat(this.sortOrder)),this.gameIds&&Array.isArray(this.gameIds)&&this.gameIds.length>0?(e+="&",e+="game_ids=".concat(this.gameIds)):null===this.gameIds&&void 0===this.gameIds||console.warn("The filter 'gameIds' has the following INVALID value: ".concat(this.gameIds,". It will be not passed as a query param in the URL. For more information visit our documentation.")),e},e}(s.default);e.default=u},38651:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64800)).default);e.default=s},2431:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64800)).default);e.default=s},85:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.correct=null,this.points=0}},77618:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.EventGamePredictionStatusEnum=void 0;var i,a=r(n(31836));!function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(i=e.EventGamePredictionStatusEnum||(e.EventGamePredictionStatusEnum={}));e.default=function(){this.id="",this.profileId="",this.profileModel=null,this.gameId="",this.gamePoints=null,this.bonusPoints=null,this.totalPoints=null,this.position=null,this.status=i.ACTIVE,this.fixtures=[],this.tiebreaker=new a.default,this.createdAt="",this.updatedAt=""}},31836:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.statTotal=0}},12882:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=""}},50992:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.fixtures=[]}},58096:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},86827:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=s(n(78923)),u=s(n(11407)),l=s(n(62372)),c=s(n(77618)),d=s(n(31836)),f=s(n(58096)),h=s(n(74809)),p=a(n(95106)),m=s(n(85)),v=s(n(3868));e.default=function(){var t=this;this.remapEventGames=function(e){var n=new u.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapEventGameById(e)})),n},this.remapEventGameById=function(e){var n=new h.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.rules=e.rules,n.customFields=e.custom_fields,n.images=e.images,n.type=e.type,n.status=e.status,n.points=e.points,n.related=e.related?t.remapRelated(e.related):e.related,n.tiebreaker=e.tiebreaker?t.remapEventGameTiebreaker(e.tiebreaker):e.tiebreaker,n.predictionsCutoff=e.predictions_cutoff,n.fixtures=e.fixtures?t.remapEventGameFixtures(e.fixtures):e.fixtures,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapPredictionToRequestBody=function(t){return t.map((function(t){return{id:t.id,prediction_type:t.predictionType,prediction:t.prediction}}))},this.remapPrediction=function(e){var n=new c.default;return n.id=e.id,n.profileId=e.profile_id,n.gameId=e.game_id,n.totalPoints=e.total_points,n.gamePoints=e.game_points,n.bonusPoints=e.bonus_points,n.position=e.position,n.status=e.status,n.fixtures=t.remapPredictionFixtures(e.fixtures),n.tiebreaker=e.tiebreaker?t.remapPredictionTiebreaker(e.tiebreaker):e.tiebreaker,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapPredictionsForUser=function(e){var n=new v.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRankings=function(e){var n=new f.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRelated=function(t){return t.map((function(t){var e=new o.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},this.remapPredictionFixtures=function(t){return t.map((function(t){var e=new m.default;switch(t.prediction_type){case p.EventGameOutcomeTypeEnum.BOOLEAN:case p.EventGameOutcomeTypeEnum.NUMBER:case p.EventGameOutcomeTypeEnum.ENUM:case p.EventGameOutcomeTypeEnum.FREE_INPUT:e=new m.default}return e.id=t.id,e.predictionType=t.prediction_type,e.prediction=t.prediction,e.points=t.points,e.correct=t.correct,e}))},this.remapPredictionTiebreaker=function(t){var e=new d.default;return e.statTotal=t.stat_total,e},this.remapEventGameFixtures=function(t){return t.map((function(t){var e=new p.default;switch(t.outcome_type){case p.EventGameOutcomeTypeEnum.BOOLEAN:case p.EventGameOutcomeTypeEnum.NUMBER:case p.EventGameOutcomeTypeEnum.ENUM:case p.EventGameOutcomeTypeEnum.FREE_INPUT:e=new p.default}return e.id=t.id,e.question=t.question,e.status=t.status,e.voidReason=t.void_reason,e.points=t.points,e.outcomeType=t.outcome_type,e.validOutcomes=t.valid_outcomes,e.outcome=t.outcome,e}))},this.remapEventGameTiebreaker=function(t){var e=new l.default;return e.statTiebreakerEnabled=t.stat_tiebreaker_enabled,e.statTotal=t.stat_total,e}}},39185:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(67900),o=n(4021),u=n(94904),l=a(n(16198)),c=n(95106),d=function(t){function e(e){var n=t.call(this,e)||this;return n.validatePrediction=function(t){t.fixtures&&Array.isArray(t.fixtures)&&0!==t.fixtures.length||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.REQUIRED_FIXTURES_FIELD);for(var e=["id","predictionType","prediction"],r=0,i=t.fixtures;r<i.length;r++){var a=i[r];(Object.keys(a).length!==e.length||Object.keys(a).some((function(t){return!e.includes(t)})))&&n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.INVALID_FIXTURES_FIELD),n.validatePredictionType(a.predictionType,a.prediction)}!t.tiebreaker||t.tiebreaker.statTotal&&Number.isInteger(t.tiebreaker.statTotal)||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.INVALID_TIEBREAKER_FIELD)},n.validatePredictionType=function(t,e){switch(t){case c.EventGameOutcomeTypeEnum.BOOLEAN:"boolean"!=typeof e&&n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,"Prediction must be a boolean for prediction type ".concat(t));break;case c.EventGameOutcomeTypeEnum.NUMBER:"number"==typeof e&&Number.isFinite(e)||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,"Prediction must be a number for prediction type ".concat(t));break;case c.EventGameOutcomeTypeEnum.ENUM:case c.EventGameOutcomeTypeEnum.FREE_INPUT:"string"==typeof e&&""!==e.trim()||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,"Prediction must be a non-empty string for prediction type ".concat(t));break;default:n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,"Unknown prediction type: ".concat(t))}},n}return i(e,t),e}(l.default);e.default=d},18263:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var c=n(14946),d=n(4021),f=n(94904),h=n(5318),p=a(n(47686)),m=l(n(60595)),v=l(n(87059)),_=l(n(52793)),y=l(n(97782)),g=l(n(52061)),b=l(n(70946));e.default=function(t){var e=this;this.idSchema=null,this.clientHttps=null,this.footballHttps=null,this.predictorHttps=null,this.loyaltyHttps=null,this.service=null,this.getConfig=function(){return s(e,void 0,void 0,(function(){var t,e;return o(this,(function(n){switch(n.label){case 0:return[4,this.clientHttps.getConfig(p.FeatureConfigEnum.FANTASY)];case 1:return t=n.sent(),this.idSchema===c.IdSchemaEnum.NATIVE?[3,3]:(e=t,[4,this.service.remapCompetitions(u([],t.competitionsWhitelist,!0))]);case 2:e.competitionsWhitelist=n.sent(),n.label=3;case 3:return[2,t]}}))}))},this.getPlayersPoints=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i;return o(this,(function(a){switch(a.label){case 0:return[4,this.footballHttps.getPlayersPoints(t,n,r)];case 1:return e=a.sent(),i=e,[4,this.service.addPlayerModels(e.data)];case 2:return i.data=a.sent(),[2,e]}}))}))},this.getPlayerDetailedStatistics=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a;return o(this,(function(s){switch(s.label){case 0:return e="",this.idSchema===c.IdSchemaEnum.NATIVE?[3,2]:[4,this.service.remapPlayerIdToNative(n)];case 1:e=s.sent(),s.label=2;case 2:return[4,this.footballHttps.getPlayerDetailedStatistics(t,e||n,r)];case 3:return(i=s.sent()).meta.filters.playerId=n,a=i,[4,this.service.addMatchModels(i.data)];case 4:return a.data=s.sent(),[2,i]}}))}))},this.play=function(t,n,r,i){return s(e,void 0,void 0,(function(){var e,a,s,u,l,p;return o(this,(function(o){switch(o.label){case 0:return r&&Array.isArray(r)||this.service.throwException(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_METHOD_CALL,h.ErrorMessages.INVALID_PARAM+"playerIds"),i&&(e="playersRoles",i instanceof Map||this.service.throwException(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_METHOD_CALL,h.ErrorMessages.INVALID_PARAM+e),(a=Array.from(i.keys())).length||this.service.throwException(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_METHOD_CALL,h.ErrorMessages.INVALID_PARAM+e),a.every((function(t){return!r.includes(t)}))&&this.service.throwException(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_METHOD_CALL,h.ErrorMessages.INVALID_MAP_PLAYERS_ROLES_KEYS+r.join(",")),s=Array.from(i.values()),u=["CAPTAIN","VICE_CAPTAIN"],s.every((function(t){return u.includes(t.toLocaleUpperCase())}))||this.service.throwException(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_METHOD_CALL,h.ErrorMessages.INVALID_MAP_PLAYERS_ROLES_VALUES+u.join(",")+". Case insensitive.")),l=null,this.idSchema===c.IdSchemaEnum.NATIVE?[3,2]:[4,this.service.remapPlayers(r,this.idSchema,c.IdSchemaEnum.NATIVE,i)];case 1:return p=o.sent(),l=g.default.createFantasyPrediction(t,n,p,i),[3,3];case 2:l=g.default.createFantasyPrediction(t,n,r,i),o.label=3;case 3:return[4,this.predictorHttps.makeFootballPrediction(l)];case 4:return[2,o.sent()]}}))}))},this.getMyPrediction=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i;return o(this,(function(a){switch(a.label){case 0:return e="".concat(t,"_").concat(n),(r=new y.default(null)).gameIds=[e],[4,this.predictorHttps.getMyPredictions(r)];case 1:return 0===(i=a.sent()).data.length?[2,null]:[2,i.data[0]]}}))}))},this.getPlayerStatistics=function(t,n,r){return s(e,void 0,void 0,(function(){var e;return o(this,(function(i){switch(i.label){case 0:return[4,this.getPlayerDetailedStatistics(t,n,r)];case 1:return e=i.sent(),[2,g.default.createFantasyPlayerStats(e)]}}))}))},this.getGameWeekStatistics=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyHttps.getTemplateBreakdownPoints(t)];case 1:return[2,e.sent()]}}))}))},this.idSchema=t.idSchema,this.clientHttps=new p.default(t),this.footballHttps=new m.default(t),this.service=new b.default(t),this.predictorHttps=new _.default(t),this.loyaltyHttps=new v.default(t)}},52061:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(58152)),a=r(n(68031)),s=["minutesPlayed","cleanSheets","concededGoals","saves","penaltySaved","penaltyCommitted","yellowCards","redCards","assists","foulsCommitted","ownGoals","goals","tackles","shotsOn"],o=(new Map).set("minutesPlayed","Minutes Played").set("cleanSheets","Clean Sheets").set("concededGoals","Goals Conceded").set("saves","Saves").set("penaltySaved","Penalties Saved").set("penaltyCommitted","Penalties Committed").set("yellowCards","Yellow Cards").set("redCards","Red Cards").set("assists","Assists").set("foulsCommitted","Fouls Committed").set("ownGoals","Own Goals").set("goals","Goals").set("tackles","Tackles").set("shotsOn","Shots On Target"),u=function(){function t(){}return t.createFantasyPrediction=function(t,e,n,r){var i=new a.default;return i.template_id=t||null,i.group_id=e||null,i.fixtures=(null==n?void 0:n.map((function(t){var e;return{player_id:t,match_type:"FOOTBALL",market:"PLAYER_PERFORMANCE",role:(null===(e=null==r?void 0:r.get(t))||void 0===e?void 0:e.toLocaleUpperCase())||null}})))||[],i},t.createFantasyPlayerStats=function(t){return s.map((function(e){var n=new i.default,r=t.data.reduce((function(t,n){return t+n.stats[e]}),0);return n.key=e,n.label=o.get(e),n.value=r,n}))},t}();e.default=u},46139:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(18263));e.default=function(t){var e=this;this.facade=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.facade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getPlayersPoints=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPlayersPoints(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getPlayerDetailedStatistics=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPlayerDetailedStatistics(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.play=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.play(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getMyPrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyPrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayerStatistics=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPlayerStatistics(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGameWeekStatistics=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGameWeekStatistics(t)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},4339:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.assists=null,this.shots=null,this.offsides=null,this.tackles=null,this.saves=null,this.minutesEqualOrOver60=null,this.minutesUnder60=null,this.yellowCards=null,this.redCards=null,this.goalsGoalkeeper=null,this.goalsDefender=null,this.goalsMidfielder=null,this.goalsForwards=null,this.penaltyGoals=null,this.ownGoals=null,this.cleanSheetsGoalkeeper=null,this.cleanSheetsDefender=null,this.cleanSheetsMidfielder=null,this.cleanSheetsForwards=null,this.shotsOn=null,this.foulsCommitted=null,this.penaltyCommitted=null,this.penaltyWon=null,this.penaltyMissed=null,this.concededGoals=null,this.caughtBall=null}},60516:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(4339)),a=r(n(71002));e.default=function(){this.enabled=!1,this.clientId=null,this.addPointsToProfileTotal=!1,this.coefficients=new i.default,this.players=new a.default,this.multipliers=null,this.competitionsWhitelist=[]}},47626:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.captain=null,this.viceCaptain=null}},71002:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.total=null,this.minGoalkeepers=null,this.maxGoalkeepers=null,this.minDefenders=null,this.maxDefenders=null,this.minMidfielders=null,this.maxMidfielders=null,this.minStrikers=null,this.maxStrikers=null}},16808:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(63096));e.default=function(){this.meta=new i.default,this.data=[]}},58152:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.key=null,this.label=null,this.value=null}},55769:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(52158));e.default=function(){this.meta=new i.default,this.data=[]}},68031:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.template_id=null,this.group_id=null,this.fixtures=[]}},63096:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(54563));e.default=function(){this.filters=new i.default}},52158:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(21890));e.default=function(){this.filters=new i.default}},54563:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.templateId=null,this.playerId=null}},21890:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.templateId=null}},46472:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.total=null,this.minutesPlayed=null,this.yellowCards=null,this.redCards=null,this.goals=null,this.penaltyGoals=null,this.ownGoals=null,this.assists=null,this.cleanSheets=null,this.shots=null,this.shotsOn=null,this.offsides=null,this.foulsCommitted=null,this.penaltyCommitted=null,this.penaltyWon=null,this.penaltyMissed=null,this.tackles=null,this.concededGoals=null,this.caughtBall=null,this.saves=null}},69922:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(46472)),a=r(n(83327));e.default=function(){this.matchId=null,this.matchModel=null,this.points=new i.default,this.stats=new a.default}},98571:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.playerId=null,this.playerModel=null,this.points=null,this.rank=null}},83327:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.minutesPlayed=null,this.yellowCards=null,this.redCards=null,this.goals=null,this.penaltyGoals=null,this.penaltyCommitted=null,this.penaltyWon=null,this.penaltyMissed=null,this.penaltySaved=null,this.penaltyReceived=null,this.ownGoals=null,this.assists=null,this.cleanSheets=null,this.shots=null,this.shotsOn=null,this.shotsBlocked=null,this.offsides=null,this.foulsCommitted=null,this.foulsWon=null,this.tackles=null,this.tacklesBlocks=null,this.tacklesInterceptions=null,this.concededGoals=null,this.caughtBall=null,this.saves=null,this.passes=null,this.crosses=null,this.interceptions=null,this.keyPasses=null,this.passesAccuracy=null,this.duels=null,this.duelsWon=null,this.dribblesAttempts=null,this.dribblesSuccess=null,this.dribblesPast=null}},9260:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(16808)),a=r(n(55769)),s=r(n(46472)),o=r(n(69922)),u=r(n(98571)),l=r(n(83327));e.default=function(){var t=this;this.remapPlayersPoints=function(e){var n=new a.default;return n.meta.filters.templateId=e.meta.filters.template_id,n.data=e.data.map((function(e){return t.remapPlayersPointsData(e)})),n},this.remapPlayersPointsData=function(t){var e=new u.default;return e.playerId=t.player_id,e.points=t.points,e.rank=t.rank,e},this.remapPlayerDetailedStats=function(e){var n=new i.default;return n.meta.filters.templateId=e.meta.filters.template_id,n.meta.filters.playerId=e.meta.filters.player_id,n.data=e.data.map((function(e){return t.remapPlayerDetailedData(e)})),n},this.remapPlayerDetailedData=function(e){var n=new o.default;return n.matchId=e.match_id,n.points=e.points?t.remapPlayerDetailedPoints(e.points):null,n.stats=e.stats?t.remapPlayerDetailedStatsData(e.stats):null,n},this.remapPlayerDetailedPoints=function(t){var e=new s.default;return e.total=t.total,e.minutesPlayed=t.minutes_played,e.yellowCards=t.yellow_cards,e.redCards=t.red_cards,e.goals=t.goals,e.penaltyGoals=t.penalty_goals,e.ownGoals=t.own_goals,e.assists=t.assists,e.cleanSheets=t.clean_sheets,e.shots=t.shots,e.shotsOn=t.shots_on,e.offsides=t.offsides,e.foulsCommitted=t.fouls_committed,e.penaltyCommitted=t.penalty_committed,e.penaltyWon=t.penalty_won,e.penaltyMissed=t.penalty_missed,e.tackles=t.tackles,e.concededGoals=t.conceded_goals,e.caughtBall=t.caught_ball,e.saves=t.saves,e},this.remapPlayerDetailedStatsData=function(t){var e=new l.default;return e.minutesPlayed=t.minutes_played,e.yellowCards=t.yellow_cards,e.redCards=t.red_cards,e.goals=t.goals,e.penaltyGoals=t.penalty_goals,e.penaltyCommitted=t.penalty_committed,e.penaltyWon=t.penalty_won,e.penaltyMissed=t.penalty_missed,e.penaltySaved=t.penalty_saved,e.penaltyReceived=t.penalty_received,e.ownGoals=t.own_goals,e.assists=t.assists,e.cleanSheets=t.clean_sheets,e.shots=t.shots,e.shotsOn=t.shots_on,e.shotsBlocked=t.shots_blocked,e.offsides=t.offsides,e.foulsCommitted=t.fouls_committed,e.foulsWon=t.fouls_won,e.tackles=t.tackles,e.tacklesBlocks=t.tackles_blocks,e.tacklesInterceptions=t.tackles_interceptions,e.concededGoals=t.conceded_goals,e.caughtBall=t.caught_ball,e.saves=t.saves,e.passes=t.passes,e.crosses=t.crosses,e.interceptions=t.interceptions,e.keyPasses=t.key_passes,e.passesAccuracy=t.passes_accuracy,e.duels=t.duels,e.duelsWon=t.duels_won,e.dribblesAttempts=t.dribbles_attempts,e.dribblesSuccess=t.dribbles_success,e.dribblesPast=t.dribbles_past,e}}},70946:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(14946),o=n(4021),u=n(94904),l=a(n(68097)),c=a(n(62535)),d=n(5318),f=a(n(88900)),h=a(n(48808));e.default=function(t){var e=this;this.idMapping=null,this.idSchema=null,this.errorHandlingModel=null,this.football=null,this.remapCompetitions=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e={competition:t},[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,s.IdSchemaEnum.NATIVE,this.idSchema)];case 1:return[2,n.sent().competition]}}))}))},this.remapPlayers=function(t,n,a,s){return r(e,void 0,void 0,(function(){var e,r,o,u,l,c,d,f,h,p,m,v;return i(this,(function(i){switch(i.label){case 0:return e={player:Array.from(t)},[4,this.idMapping.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:if(r=i.sent(),s){for(o=new Map,u=0,l=Array.from(s.entries());u<l.length;u++)c=l[u],d=c[0],v=c[1],(m=r.get(d))&&o.set(m,v);for(s.clear(),f=0,h=Array.from(o.entries());f<h.length;f++)p=h[f],m=p[0],v=p[1],s.set(m,v)}return[2,Array.from(r.values())]}}))}))},this.addPlayerModels=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=t.map((function(t){return t.playerId})),[4,this.football.footballFacade.getPlayersMapWithNativeIds(e)];case 1:return n=r.sent(),t.forEach((function(t){var e;t.playerModel=Object.keys(n).length&&n[t.playerId]||null,t.playerId=(null===(e=t.playerModel)||void 0===e?void 0:e.id)||t.playerId})),[2,t]}}))}))},this.remapPlayerIdToNative=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.idMapping.getEntityIdBySchemaId("player",t)];case 1:return(e=n.sent())?[2,e.id]:(this.throwException(o.ErrorCodes.NOT_FOUND,u.ErrorStatuses.ID_MAPPING_NOT_FOUND,d.ErrorMessages.ID_MAPPING_NOT_FOUND+t),[2])}}))}))},this.addMatchModels=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=t.map((function(t){return t.matchId})),[4,this.football.footballFacade.getMatchesMapWithNativeIds(e)];case 1:return n=r.sent(),t.forEach((function(t){var e;t.matchModel=Object.keys(n).length&&n[t.matchId]||null,t.matchId=(null===(e=t.matchModel)||void 0===e?void 0:e.id)||t.matchId})),[2,t]}}))}))},this.throwException=function(t,n,r){if("standard"===e.errorHandlingModel)throw new c.default(t,n,r);throw new l.default(t,n,r)},this.idSchema=t.idSchema,this.errorHandlingModel=t.errorHandlingMode,this.football=new h.default(t),this.idMapping=new f.default(t)}},55815:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.FootballMatchStatusEnum=void 0,(n=e.FootballMatchStatusEnum||(e.FootballMatchStatusEnum={})).NONE="none",n.FINISHED="finished",n.CANCELLED="cancelled",n.POSTPONED="postponed",n.NOT_STARTED="not_started",n.FIRST_HALF="1st_half",n.SECOND_HALF="2nd_half",n.FINISHED_AFTER_AWARDED_WIN="finished_after_awarded_win",n.TO_FINISH="to_finish",n.FINISHED_AET="finished_aet",n.HALFTIME="halftime",n.FINISHED_AP="finished_ap",n.INTERRUPTED="interrupted",n.KICK_OFF_DELAYED="kick_off_delayed",n.ABANDONED="abandoned",n.WAITING_FOR_PENALTY="waiting_for_penalty",n.PENALTY="penalty",n.PAUSE="pause",n.EXTRA_TIME_1ST_HALF="extra_time_1st_half",n.EXTRA_TIME_END_OF_1ST_HALF="extra_time_end_of_1st_half",n.EXTRA_TIME_2ND_HALF="extra_time_2nd_half",n.WAITING_FOR_EXTRA_TIME="waiting_for_extra_time",n.NO_INFO_YET="no_info_yet",n.AWAITING_INFO="awaiting_info",n.FINISHED_ASG="finished_asg"},97e3:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(12754)),o=n(90712);e.default=function(t,e,n){var a=this;this.localStorage=null,this.https=null,this.idMapping=null,this.getCompetitionsIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,8,,9]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId(["".concat(t.countryId)],"country","native")]:[3,2]:[3,5];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),t.competitionIds=a.competition,i.label=4;case 4:if(n)return[2,[]];i.label=5;case 5:return[4,this.getCompetitions(t,e)];case 6:return o=i.sent(),[4,this.idMapping.remapEntities(o,"competition")];case 7:return[2,i.sent()];case 8:throw u=i.sent(),console.warn("There was a problem browsing all of the competitions",u),u;case 9:return[2]}}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(a,void 0,void 0,(function(){var e,n,r,a,u,l;return i(this,(function(i){switch(i.label){case 0:return e=new Map,n=t.length,r=new s.default({competitionIds:t,limit:n}),[4,this.getCompetitions(r)];case 1:return(a=i.sent()).sort((function(t,e){return t.id.localeCompare(e.id)})),u=(0,o.sortArrayInAscOrder)(t),[4,this.idMapping.remapEntities(a,"competition")];case 2:return l=i.sent(),u.forEach((function(t,n){return e.set(t,l[n])})),[2,e]}}))}))},this.getCompetitions=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return n=null,e=e||!1,[4,this.localStorage.getCompetitionsLength()];case 1:if(i.sent())return[3,7];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.https.getCompetitions()];case 3:return n=i.sent(),[3,5];case 4:throw r=i.sent(),console.warn("There was a problem retrieving all competitions",r),r;case 5:return[4,this.localStorage.setCompetitions(n)];case 6:i.sent(),i.label=7;case 7:return[4,this.localStorage.getCompetitions(t)];case 8:return[2,i.sent()]}}))}))},this.getCompetitionByIdIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"competition","native")];case 1:return n=i.sent(),r=n.competition[0],[4,this.getCompetitionById(r,e)];case 2:return a=i.sent(),[4,this.idMapping.remapEntities(a,"competition")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following competition:".concat(t),s),s;case 5:return[2]}}))}))},this.getCompetitionById=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getCompetitionById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the competition with the following id: ".concat(t),n),n;case 3:return[2]}}))}))},this.getTopCompetitionsIdMapping=function(t){return r(a,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopCompetitions(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"competition")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top competitions",n),n;case 4:return[2]}}))}))},this.getTopCompetitions=function(t){return r(a,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopCompetitions(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top competitions",e),e;case 3:return[2]}}))}))},this.localStorage=t,this.idMapping=n,this.https=e}},48350:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,i){var a=this;this.localCache=null,this.https=null,this.idMapping=null,this.getCountriesWithIdMapping=function(t){return n(a,void 0,void 0,(function(){var e,n;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getCountries(t)];case 1:return e=r.sent(),[2,this.idMapping.remapEntities(e,"country")];case 2:throw n=r.sent(),console.warn("There was a problem browsing countries as football entities",n),n;case 3:return[2]}}))}))},this.getCountries=function(t){return n(a,void 0,void 0,(function(){var e,n,i;return r(this,(function(r){switch(r.label){case 0:return t=t||!1,[4,this.localCache.getFootballCountries()];case 1:if((e=r.sent())&&e.length>0)return[2,e];r.label=2;case 2:return r.trys.push([2,5,,6]),[4,this.https.getCountries(t)];case 3:return n=r.sent(),[4,this.localCache.setFootballCountries(n)];case 4:return r.sent(),[2,n];case 5:throw i=r.sent(),console.warn("There was a problem retrieving countries as football entities",i),i;case 6:return[2]}}))}))},this.localCache=t,this.idMapping=i,this.https=e}},4289:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(48350)),o=a(n(97e3)),u=a(n(39693)),l=a(n(44272)),c=a(n(34545)),d=a(n(82140)),f=a(n(74410));e.default=function(t,e,n,a){var h=this;this.countriesFacade=null,this.competitionsFacade=null,this.teamsFacade=null,this.playerFacade=null,this.matchFacade=null,this.searchFacade=null,this.validator=null,this.getCountries=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.countriesFacade.getCountriesWithIdMapping(t)]}))}))},this.getCompetitions=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionsIdMapping(t,e)]}))}))},this.getCompetitionById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(t,e)]}))}))},this.getTopCompetitions=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.competitionsFacade.getTopCompetitionsIdMapping(t)]}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.competitionsFacade.getCompetitionsMapWithNativeIds(t)];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamsIdMapping(t,e)]}))}))},this.getTeamById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamByIdIdMapping(t,e)]}))}))},this.getTopTeams=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.teamsFacade.getTopTeamsIdMapping(t)]}))}))},this.getNextMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(t,e)]}))}))},this.getPrevMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(t,e)]}))}))},this.getTeamsMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.teamsFacade.getTeamsMapWithNativeIds(t)];case 1:return[2,e.sent()]}}))}))},this.getPlayers=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayersIdMapping(t,e)]}))}))},this.getPlayerById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayerIdMapping(t,e)]}))}))},this.getTopPlayers=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getTopPlayersIdMapping(t)]}))}))},this.getNextMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(t,e)]}))}))},this.getPrevMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(t,e)]}))}))},this.getPlayersMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getPlayersMapWithNativeIds(t)]}))}))},this.getMatches=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchesIdMapping(t,e)]}))}))},this.getMatchesMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.matchFacade.getMatchesMapWithNativeIds(t)]}))}))},this.getMatchById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchIdMapping(t,e)]}))}))},this.search=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.searchFacade.searchIdMapping(t,e)]}))}))},this.getTeamForm=function(t,e,n){return r(h,void 0,void 0,(function(){var r,a,s,o,u;return i(this,(function(i){switch(i.label){case 0:return this.validator.validateTeamFormArguments(t,e),r=(null==e?void 0:e.direction)||"ltr",a={teamIds:[t],competitionIds:e&&e.competitionId?[e.competitionId]:null,status:"finished",limit:(null==e?void 0:e.limit)||5,sortField:"date",sortOrder:"desc"},[4,this.matchFacade.getMatchesIdMapping(a,n)];case 1:return s=i.sent(),(o={teamId:t,matches:[]}).matches=s.data.map((function(e){var n,r,i=e.homeTeam.id===t,a=null!==(n=e.scores.ftScore.homeGoals)&&void 0!==n?n:0,s=null!==(r=e.scores.ftScore.awayGoals)&&void 0!==r?r:0;return{matchModel:e,isHomeGame:i,result:i?a>s?"W":a<s?"L":"D":s>a?"W":s<a?"L":"D"}})),"ltr"===r&&(u=Array.from(o.matches),o.matches=u.reverse()),[2,o]}}))}))},this.countriesFacade=new s.default(e,n,a),this.competitionsFacade=new o.default(e,n,a),this.teamsFacade=new u.default(t,n,a),this.playerFacade=new l.default(t,n,a),this.matchFacade=new c.default(t,n,a),this.searchFacade=new d.default(n,a),this.validator=new f.default(t)}},34545:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(90712),u=s(n(86134)),l=s(n(89582));e.default=function(t,e,n){var s=this;this.https=null,this.idMapping=null,this.footballService=null,this.getMatchesIdMapping=function(t,e){return r(s,void 0,void 0,(function(){var n,r,s,o,l,c,d,f;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,12,,13]),t?(t=new u.default(t)).countryIds&&t.countryIds.length>0?[4,this.idMapping.getEntityIdsBySchemaId(t.countryIds,"country","native")]:[3,2]:[3,8];case 1:n=i.sent(),t.countryIds=n.country,i.label=2;case 2:return t.competitionIds&&t.competitionIds.length>0?[4,this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native")]:[3,4];case 3:r=i.sent(),t.competitionIds=r.competition,i.label=4;case 4:return t.matchIds&&t.matchIds.length>0?[4,this.idMapping.getEntityIdsBySchemaId(t.matchIds,"match","native")]:[3,6];case 5:s=i.sent(),t.matchIds=s.match,i.label=6;case 6:return t.teamIds&&t.teamIds.length>0?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,8];case 7:o=i.sent(),t.teamIds=o.team,i.label=8;case 8:return[4,this.getMatches(t,e)];case 9:return l=i.sent(),c=l,[4,this.footballService.setAvailableMarketsForMatch(a([],l.data,!0))];case 10:return c.data=i.sent(),d=l,[4,this.idMapping.remapEntities(l.data,"match")];case 11:return d.data=i.sent(),[2,l];case 12:throw f=i.sent(),console.warn("There was a problem browsing the matches",f),f;case 13:return[2]}}))}))},this.getMatchesWithNativeIds=function(t){return r(s,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=t.length,n=new u.default({matchIds:t,limit:e}),[4,this.getMatches(n)];case 1:return(r=i.sent()).data.sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(r.data,"match")];case 2:return[2,i.sent()]}}))}))},this.getMatchesMapWithNativeIds=function(t){return r(s,void 0,void 0,(function(){var e,n,r,a,s,l;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,o.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getMatchesWithNativeIds(Array.from(n))];case 1:return r=i.sent(),n.length===r.length?[3,3]:(a=new u.default({matchIds:n,limit:n.length}),[4,this.getMatches(a)]);case 2:s=i.sent(),l=n.filter((function(t){if(s.data.every((function(e){return e.id!==t})))return t})),n=n.filter((function(t){if(!l.includes(t))return t})),i.label=3;case 3:return n.forEach((function(t,n){return e[t]=r[n]})),[2,e]}}))}))},this.getMatches=function(t,e){return r(s,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getMatches(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the matches",n),n;case 3:return[2]}}))}))},this.getMatchIdMapping=function(t,e){return r(s,void 0,void 0,(function(){var n,r,a,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),[4,this.idMapping.getEntityIdsBySchemaId([t],"match","native")];case 1:return n=i.sent(),[4,this.getMatchById(n.match[0],e)];case 2:return r=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(r)];case 3:return a=i.sent(),[4,this.idMapping.remapEntities(a,"match")];case 4:return[2,i.sent()];case 5:throw s=i.sent(),console.warn("There was a problem browsing the following match: ".concat(t),s),s;case 6:return[2]}}))}))},this.getMatchById=function(t,e){return r(s,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getMatchById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following match: ".concat(t),n),n;case 3:return[2]}}))}))},this.https=e,this.idMapping=n,this.footballService=new l.default(t)}},44272:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(26477)),o=n(90712),u=a(n(89582));e.default=function(t,e,n){var a=this;this.https=null,this.footballService=null,this.idMapping=null,this.getPlayersIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a,o,u,l,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([t.countryId],"country","native")]:[3,2]:[3,7];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.playerIds?[4,this.idMapping.getEntityIdsBySchemaId(t.playerIds,"player","native")]:[3,4];case 3:0===(a=i.sent()).player.length&&(n=!0),t.playerIds=a.player,i.label=4;case 4:return t.scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,6];case 5:0===(o=i.sent()).competition.length&&(n=!0),t.scope=o.competition,i.label=6;case 6:if(n)return[2,[]];i.label=7;case 7:return[4,this.getPlayers(t,e)];case 8:return u=i.sent(),l=u,[4,this.idMapping.remapEntities(u.data,"player")];case 9:return l.data=i.sent(),[2,u];case 10:throw c=i.sent(),console.warn("There was a problem browsing the players",c),c;case 11:return[2]}}))}))},this.getPlayersWithNativeIds=function(t){return r(a,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=t.length,n=new s.default({playerIds:t,limit:e}),[4,this.getPlayers(n)];case 1:return(r=i.sent()).data.sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(r.data,"player")];case 2:return[2,i.sent()]}}))}))},this.getPlayersMapWithNativeIds=function(t){return r(a,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,o.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getPlayersWithNativeIds(Array.from(n))];case 1:return r=i.sent(),n.forEach((function(t,n){return e[t]=r[n]})),[2,e]}}))}))},this.getPlayers=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getPlayers(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the players",n),n;case 3:return[2]}}))}))},this.getPlayerIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),[4,this.getPlayerById(n.player[0],e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"player")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following player:".concat(t),a),a;case 5:return[2]}}))}))},this.getPlayerById=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getPlayerById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following player: ".concat(t),n),n;case 3:return[2]}}))}))},this.getTopPlayersIdMapping=function(t){return r(a,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopPlayers(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"player")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top players",n),n;case 4:return[2]}}))}))},this.getTopPlayers=function(t){return r(a,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopPlayers(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top players",e),e;case 3:return[2]}}))}))},this.getNextMatchForPlayerIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),t=n.player[0],[4,this.getNextMatchForPlayer(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the next match for player:".concat(t),a),a;case 5:return[2]}}))}))},this.getNextMatchForPlayer=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getNextMatchForPlayer(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for player: ".concat(t),r),r;case 4:return[2]}}))}))},this.getPrevMatchForPlayerIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),t=n.player[0],[4,this.getPrevMatchForPlayer(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the previous match for player:".concat(t),a),a;case 5:return[2]}}))}))},this.getPrevMatchForPlayer=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getPrevMatchForPlayer(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for player: ".concat(t),r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new u.default(t)}},82140:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(40604));e.default=function(t,e){var n=this;this.https=null,this.idMapping=null,this.searchIdMapping=function(t,e){return r(n,void 0,void 0,(function(){var n,r,a,o,u,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),(t=new s.default(t)).scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,2];case 1:n=i.sent(),t.scope=n.competition,i.label=2;case 2:return[4,this.search(t,e)];case 3:return(r=i.sent()).teams&&r.teams.length>0?[4,this.idMapping.remapEntities(r.teams,"team")]:[3,5];case 4:a=i.sent(),r.teams=a,i.label=5;case 5:return r.players&&r.players.length>0?[4,this.idMapping.remapEntities(r.players,"player")]:[3,7];case 6:o=i.sent(),r.players=o,i.label=7;case 7:return r.competitions&&r.competitions.length>0?[4,this.idMapping.remapEntities(r.competitions,"competition")]:[3,9];case 8:u=i.sent(),r.competitions=u,i.label=9;case 9:return[2,r];case 10:throw l=i.sent(),console.warn("There was a problem with browsing the search result",l),l;case 11:return[2]}}))}))},this.search=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.https.search(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the search response",n),n;case 3:return[2]}}))}))},this.https=t,this.idMapping=e}},39693:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(59920)),o=a(n(89582)),u=n(90712);e.default=function(t,e,n){var a=this;this.footballService=null,this.https=null,this.idMapping=null,this.getTeamsIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a,o,u,l,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId(["".concat(t.countryId)],"country","native")]:[3,2]:[3,6];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),t.scope=a.competition,i.label=4;case 4:return t.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,6];case 5:0===(o=i.sent()).team.length&&(n=!0),t.teamIds=o.team,i.label=6;case 6:return n?[2,[]]:[4,this.getTeams(t,e)];case 7:return u=i.sent(),l=u,[4,this.idMapping.remapEntities(u.data,"team")];case 8:return l.data=i.sent(),[2,u];case 9:throw c=i.sent(),console.warn("There was a problem browsing all teams",c),c;case 10:return[2]}}))}))},this.getTeamsMapWithNativeIds=function(t){return r(a,void 0,void 0,(function(){var e,n,r,a,o,l;return i(this,(function(i){switch(i.label){case 0:return e=new Map,n=t.length,r=new s.default({teamIds:t,limit:n}),[4,this.getTeams(r)];case 1:return(a=i.sent().data).sort((function(t,e){return t.id.localeCompare(e.id)})),o=(0,u.sortArrayInAscOrder)(t),[4,this.idMapping.remapEntities(a,"team")];case 2:return l=i.sent(),o.forEach((function(t,n){return e.set(t,l[n])})),[2,e]}}))}))},this.getTeams=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTeams(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving all teams",n),n;case 3:return[2]}}))}))},this.getTeamByIdIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getTeamById(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"team")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following team:".concat(t),a),a;case 5:return[2]}}))}))},this.getTeamById=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTeamById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following team: ".concat(t),n),n;case 3:return[2]}}))}))},this.getTopTeamsIdMapping=function(t){return r(a,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopTeams(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"team")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top teams",n),n;case 4:return[2]}}))}))},this.getTopTeams=function(t){return r(a,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopTeams(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top teams",e),e;case 3:return[2]}}))}))},this.getNextMatchForTeamIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getNextMatchForTeam(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the next match for the following team:".concat(t),a),a;case 5:return[2]}}))}))},this.getNextMatchForTeam=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getNextMatchForTeam(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for the following team: ".concat(t),r),r;case 4:return[2]}}))}))},this.getPrevMatchForTeamIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getPrevMatchForTeam(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the previous match for the following team:".concat(t),a),a;case 5:return[2]}}))}))},this.getPrevMatchForTeam=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getPrevMatchForTeam(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for the following team: ".concat(t),r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new o.default(t)}},48808:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(88900)),o=a(n(60595)),u=a(n(4289)),l=a(n(78358)),c=a(n(93165)),d=function(){function t(t){var e=this;this.https=null,this.idMapping=null,this.localCache=null,this.footballFacade=null,this.getCountries=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCountries(t)];case 1:return[2,e.sent()]}}))}))},this.getCompetitions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCompetitions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getCompetitionById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCompetitionById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopCompetitions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopCompetitions(t)];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeams(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTeamById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeamById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopTeams=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopTeams(t)];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForTeam=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getNextMatchForTeam(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPrevMatchForTeam=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPrevMatchForTeam(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPlayers(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayerById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPlayerById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopPlayers=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopPlayers(t)];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForPlayer=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getNextMatchForPlayer(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPrevMatchForPlayer=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPrevMatchForPlayer(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMatches=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getMatches(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMatchById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getMatchById(t,n)];case 1:return[2,e.sent()]}}))}))},this.search=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.search(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTeamForm=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeamForm(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.https=new o.default(t),this.idMapping=new s.default(t),this.localCache=(new l.default).createLocalCacheInstance(t.idSchema),this.footballFacade=new u.default(t,this.localCache,this.https,this.idMapping),this.footballHelpers=new c.default}return Object.defineProperty(t.prototype,"helpers",{get:function(){return this.footballHelpers},enumerable:!1,configurable:!0}),t}();e.default=d},93165:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(71732)),a=function(){function t(){this.matchStatusHelper=new i.default}return t.prototype.getMatchStatusEnum=function(t){return this.matchStatusHelper.getMatchEventStatus(t)},t.prototype.isMatchUpcoming=function(t){return this.matchStatusHelper.isUpcoming(t)},t.prototype.isMatchLive=function(t){return this.matchStatusHelper.isLive(t)},t.prototype.isMatchFinished=function(t){return this.matchStatusHelper.isFinished(t)},t}();e.default=a},71732:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(55815),i=function(){function t(){this.ALL_FINISHED_STATUSES=[r.FootballMatchStatusEnum.FINISHED,r.FootballMatchStatusEnum.CANCELLED,r.FootballMatchStatusEnum.INTERRUPTED,r.FootballMatchStatusEnum.ABANDONED,r.FootballMatchStatusEnum.FINISHED_AFTER_AWARDED_WIN,r.FootballMatchStatusEnum.FINISHED_AET,r.FootballMatchStatusEnum.FINISHED_AP,r.FootballMatchStatusEnum.FINISHED_ASG,r.FootballMatchStatusEnum.TO_FINISH],this.ALL_UPCOMING_STATUSES=[r.FootballMatchStatusEnum.NOT_STARTED,r.FootballMatchStatusEnum.KICK_OFF_DELAYED],this.ALL_LIVE_STATUSES=[r.FootballMatchStatusEnum.FIRST_HALF,r.FootballMatchStatusEnum.SECOND_HALF,r.FootballMatchStatusEnum.HALFTIME,r.FootballMatchStatusEnum.WAITING_FOR_PENALTY,r.FootballMatchStatusEnum.WAITING_FOR_EXTRA_TIME,r.FootballMatchStatusEnum.PENALTY,r.FootballMatchStatusEnum.PAUSE,r.FootballMatchStatusEnum.EXTRA_TIME_1ST_HALF,r.FootballMatchStatusEnum.EXTRA_TIME_2ND_HALF,r.FootballMatchStatusEnum.EXTRA_TIME_END_OF_1ST_HALF,r.FootballMatchStatusEnum.AWAITING_INFO]}return t.prototype.getMatchEventStatus=function(t){if(!t||!t.type||!t.subType)return r.FootballMatchStatusEnum.NO_INFO_YET;var e=t.type.toLowerCase(),n=t.subType.toLowerCase();return"finished"===e?"awarded_win"===n?r.FootballMatchStatusEnum.FINISHED_AFTER_AWARDED_WIN:"aet"===n?r.FootballMatchStatusEnum.FINISHED_AET:"ap"===n?r.FootballMatchStatusEnum.FINISHED_AP:"asg"===n?r.FootballMatchStatusEnum.FINISHED_ASG:r.FootballMatchStatusEnum.FINISHED:"notstarted"===e?"postponed"===n?r.FootballMatchStatusEnum.POSTPONED:"delayed"===n?r.FootballMatchStatusEnum.KICK_OFF_DELAYED:r.FootballMatchStatusEnum.NOT_STARTED:"inprogress"===e?"1st_half"===n?r.FootballMatchStatusEnum.FIRST_HALF:"2nd_half"===n?r.FootballMatchStatusEnum.SECOND_HALF:"halftime"===n?r.FootballMatchStatusEnum.HALFTIME:"penalty"===n?r.FootballMatchStatusEnum.PENALTY:"waiting_penalty"===n?r.FootballMatchStatusEnum.WAITING_FOR_PENALTY:"pause"===n?r.FootballMatchStatusEnum.PAUSE:"extra_time_1st_half"===n?r.FootballMatchStatusEnum.EXTRA_TIME_1ST_HALF:"extra_time_2nd_half"===n?r.FootballMatchStatusEnum.EXTRA_TIME_2ND_HALF:"extra_time_halftime"===n?r.FootballMatchStatusEnum.EXTRA_TIME_END_OF_1ST_HALF:"waiting_extra_time"===n?r.FootballMatchStatusEnum.WAITING_FOR_EXTRA_TIME:r.FootballMatchStatusEnum.AWAITING_INFO:"interrupted"===e?"abandoned"===n?r.FootballMatchStatusEnum.ABANDONED:"to_finish"===n?r.FootballMatchStatusEnum.TO_FINISH:r.FootballMatchStatusEnum.INTERRUPTED:"cancelled"===e?r.FootballMatchStatusEnum.CANCELLED:r.FootballMatchStatusEnum.NO_INFO_YET},t.prototype.isUpcoming=function(t){if(!t)return!1;var e=this.getMatchEventStatus(t);return this.ALL_UPCOMING_STATUSES.includes(e)},t.prototype.isLive=function(t){if(!t)return!1;var e=this.getMatchEventStatus(t);return this.ALL_LIVE_STATUSES.includes(e)},t.prototype.isFinished=function(t){if(!t)return!1;var e=this.getMatchEventStatus(t);return this.ALL_FINISHED_STATUSES.includes(e)},t}();e.default=i},39188:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.logo=null}},96975:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name=""}},12754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryId=null,this.name=null,this.gender=null,this.type=null,this.sortField=null,this.sortOrder=null,this.competitionIds=null,this.constructFilterUrl=function(){var t="";return e.countryId&&(t+="&",t+="country_id=".concat(e.countryId)),e.gender&&(t+="&",t+="gender=".concat(e.gender)),e.type&&(t+="&",t+="type=".concat(e.type)),e.sortField&&(t+="&",t+="sort_field=".concat(e.sortField)),e.sortOrder&&(t+="&",t+="sort_order=".concat(e.sortOrder)),e.name&&(t+="&",t+="name=".concat(e.name)),e.competitionIds&&e.competitionIds.length>0&&(t+="&",t+="competition_ids=".concat(e.competitionIds.join(","))),t},this.competitionSearchFilter=function(t){try{var n=e.filter(t);return e.sortField||e.sortOrder?e.sort(n):n}catch(t){return console.warn("There was a problem filtering the local competitions",t),[]}},this.filter=function(t){var n=e.entitiesToSearchWith();return t.filter((function(t){var r=!0;return n.forEach((function(n){"sortOrder"!==n&&"sortField"!==n&&("countryId"===n?r&&(r=t.country.id===e[n]):"name"===n?r&&(r=t.name.toLocaleLowerCase().includes(e[n].toLocaleLowerCase())):"competitionIds"===n?r&&(r=e[n].some((function(e){return t.id===e}))):r&&(r=t[n].toLocaleLowerCase()===e[n].toLocaleLowerCase()))})),r}))},this.entitiesToSearchWith=function(){var t=[];return e.countryId&&t.push("countryId"),e.name&&t.push("name"),e.gender&&t.push("gender"),e.type&&t.push("type"),e.sortField&&t.push("sortField"),e.sortOrder&&t.push("sortOrder"),e.competitionIds&&t.push("competitionIds"),t},this.sort=function(t){var n=[];return"name"===e.sortField?n=t.sort((function(t,n){return e.sortOrder&&"desc"===e.sortOrder?n.name.localeCompare(t.name):t.name.localeCompare(n.name)})):"country"===e.sortField?n=t.sort((function(t,n){return e.sortOrder&&"desc"===e.sortOrder?n.country.name.localeCompare(t.country.name):t.country.name.localeCompare(n.country.name)})):"scope"===e.sortField?t.forEach((function(t){return n[e.competitionIds.indexOf(t.id)]=t})):e.sortField||"desc"!==e.sortOrder||(n=t.sort((function(t,e){return e.id.localeCompare(t.id)}))),n},this.countryId=t.countryId?"".concat(t.countryId):null,this.name=t.name?t.name:null,this.gender=t.gender?t.gender:null,this.type=t.type?t.type:null,this.sortField=t.sortField?"".concat(t.sortField):null,this.sortOrder=t.sortOrder?"".concat(t.sortOrder):null,this.competitionIds=t.competitionIds?t.competitionIds:null}},73321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name="",this.participants=[]}},67316:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(96975)),a=r(n(23430)),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new a.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.type=t.type,e.name=t.name,e}catch(t){throw console.warn("There was a problem remapping the competition response",t),t}},t}();e.default=s},38758:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73321)),a=r(n(23430)),s=r(n(95827)),o=function(){function t(){this.countryRemapper=null,this.teamBasicRemapper=null,this.countryRemapper=new a.default,this.teamBasicRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.country=this.countryRemapper.countryFromResponse(t.country),n.gender=t.gender,n.assets=t.assets,n.type=t.type,n.name=t.name,n.participants=t.participants.map((function(t){return e.teamBasicRemapper.fromResponse(t)})),n}catch(t){throw console.warn("There was a problem remapping the competition response",t),t}},t}();e.default=o},24427:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.alias="",this.countryCode="",this.assets=null,this.name=""}},23430:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(24427));e.default=function(){var t=this;this.countriesFromResponse=function(e){if(e)return e.map((function(e){return t.countryFromResponse(e)}))},this.countryFromResponse=function(t){try{if(t){var e=new i.default;return e.id=t.id,e.alias=t.alias,e.assets=t.assets,e.countryCode=t.country_code,e.name=t.name,e}}catch(t){throw t}return null}}},28470:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.homeTeam={players:[]},this.awayTeam={players:[]}}},63098:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(28470)),a=r(n(93550)),s=function(){function t(){this.playerRemapper=null,this.playerRemapper=new a.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.homeTeam.players=t.home_team&&t.home_team.players?t.home_team.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n.awayTeam.players=t.away_team&&t.away_team.players?t.away_team.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping the lineups",t),t}},t}();e.default=s},13572:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36899));e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.homeTeam=null,this.awayTeam=null,this.isDeleted=!1,this.undecided=!1,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.context={competition:null},this.status=new i.default}},86134:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryIds=null,this.competitionIds=null,this.matchIds=null,this.status=null,this.teamIds=null,this.fromDate=null,this.toDate=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(t){var n="";return e.countryIds&&(n+="&",n+="countries=".concat(e.countryIds.join(","))),e.competitionIds&&e.competitionIds.length>0&&(n+="&",n+="competitions=".concat(e.competitionIds.join(","))),e.matchIds&&e.matchIds.length>0&&(n+="&",n+="matches=".concat(e.matchIds.join(","))),e.status&&(n+="&",n+="status=".concat(e.status)),e.teamIds&&e.teamIds.length>0&&(n+="&",n+="teams=".concat(e.teamIds.join(","))),e.fromDate&&(n+="&",n+="from_date=".concat(e.fromDate)),e.toDate&&(n+="&",n+="to_date=".concat(e.toDate)),e.limit&&!t&&(n+="&",n+="limit=".concat(e.limit)),e.page&&!t&&(n+="&",n+="page=".concat(e.page)),e.sortField&&(n+="&",n+="sort_field=".concat(e.sortField)),e.sortOrder&&(n+="&",n+="sort_order=".concat(e.sortOrder)),n},this.countryIds=t.countryIds?t.countryIds:null,this.competitionIds=t.competitionIds?t.competitionIds:null,this.matchIds=t.matchIds?t.matchIds:null,this.status=t.status?t.status:null,this.teamIds=t.teamIds?t.teamIds:null,this.fromDate=t.fromDate?t.fromDate:null,this.toDate=t.toDate?t.toDate:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},79661:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36899));e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.isDeleted=!1,this.undecided=!1,this.homeTeam=null,this.awayTeam=null,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.stats=null,this.playerStats=[],this.context={competition:null},this.timeline=[],this.status=new i.default,this.lineups=null}},46780:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.playerId=null,this.position=null,this.minutesPlayed=null,this.yellowCards=null,this.redCards=null,this.goals=null,this.penaltyGoals=null,this.penaltyCommitted=null,this.penaltyWon=null,this.penaltyMissed=null,this.penaltySaved=null,this.penaltyReceived=null,this.ownGoals=null,this.assists=null,this.cleanSheets=null,this.shots=null,this.shotsOn=null,this.shotsBlocked=null,this.offsides=null,this.foulsCommitted=null,this.foulsWon=null,this.tackles=null,this.tacklesBlocks=null,this.tacklesInterceptions=null,this.concededGoals=null,this.caughtBall=null,this.saves=null,this.passes=null,this.crosses=null,this.interceptions=null,this.keyPasses=null,this.passesAccuracy=null,this.duels=null,this.duelsWon=null,this.dribblesAttempts=null,this.dribblesSuccess=null,this.dribblesPast=null,this.updatedAt=null}},94976:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(46780)),a=function(){function t(){}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.playerId=t.player_id,e.position=t.position,e.minutesPlayed=t.minutes_played,e.yellowCards=t.yellow_cards,e.redCards=t.red_cards,e.goals=t.goals,e.penaltyGoals=t.penalty_goals,e.penaltyCommitted=t.penalty_committed,e.penaltyWon=t.penalty_won,e.penaltyMissed=t.penalty_missed,e.penaltySaved=t.penalty_saved,e.penaltyReceived=t.penalty_received,e.ownGoals=t.own_goals,e.assists=t.assists,e.cleanSheets=t.clean_sheets,e.shots=t.shots,e.shotsOn=t.shots_on,e.shotsBlocked=t.shots_blocked,e.offsides=t.offsides,e.foulsCommitted=t.fouls_committed,e.foulsWon=t.fouls_won,e.tackles=t.tackles,e.tacklesBlocks=t.tackles_blocks,e.tacklesInterceptions=t.tackles_interceptions,e.concededGoals=t.conceded_goals,e.caughtBall=t.caught_ball,e.saves=t.saves,e.passes=t.passes,e.crosses=t.crosses,e.interceptions=t.interceptions,e.keyPasses=t.key_passes,e.passesAccuracy=t.passes_accuracy,e.duels=t.duels,e.duelsWon=t.duels_won,e.dribblesAttempts=t.dribbles_attempts,e.dribblesSuccess=t.dribbles_success,e.dribblesPast=t.dribbles_past,e.updatedAt=t.updated_at,e}catch(t){throw console.warn("There was a problem remapping the player stats",t),t}},t}();e.default=a},95284:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(13572)),a=r(n(95827)),s=r(n(67316)),o=r(n(83949)),u=function(){function t(){this.teamRemapper=null,this.competitionRemapper=null,this.scoresRemapper=null,this.teamRemapper=new a.default,this.competitionRemapper=new s.default,this.scoresRemapper=new o.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.kickoffAt=t.kickoff_at,e.finishedAt=t.finished_at,e.updatedAt=t.updated_at,e.isDeleted=t.is_deleted,e.undecided=t.undecided,e.homeTeam=this.teamRemapper.fromResponse(t.home_team),e.awayTeam=this.teamRemapper.fromResponse(t.away_team),e.lineupsConfirmed=t.lineups_confirmed,e.startedAt=t.started_at,e.minute=t.minute,e.scores=this.scoresRemapper.fromResponse(t.scores),e.context={competition:t.context.competition?this.competitionRemapper.fromResponse(t.context.competition):null},e.status={type:t.status.type,subType:t.status.sub_type},e}catch(t){throw console.warn("There was a problem remapping the match response",t),t}},t}();e.default=u},9330:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(79661)),a=r(n(95827)),s=r(n(67316)),o=r(n(7122)),u=r(n(83949)),l=r(n(63098)),c=r(n(28470)),d=r(n(90092)),f=r(n(94976)),h=function(){function t(){this.teamMapper=null,this.competitionsMapper=null,this.lineupsMapper=null,this.scoresMapper=null,this.statsMapper=null,this.timelineMapper=null,this.playerStatsMapper=null,this.teamMapper=new a.default,this.competitionsMapper=new s.default,this.lineupsMapper=new l.default,this.scoresMapper=new u.default,this.statsMapper=new o.default,this.timelineMapper=new d.default,this.playerStatsMapper=new f.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.kickoffAt=t.kickoff_at,n.finishedAt=t.finished_at,n.updatedAt=t.updated_at,n.isDeleted=t.is_deleted,n.undecided=t.undecided,n.homeTeam=t.home_team?this.teamMapper.fromResponse(t.home_team):null,n.awayTeam=t.away_team?this.teamMapper.fromResponse(t.away_team):null,n.lineupsConfirmed=t.lineups_confirmed,n.startedAt=t.started_at,n.minute=t.minute,n.scores=this.scoresMapper.fromResponse(t.scores),n.stats=this.statsMapper.fromResponse(t.stats),n.playerStats=t.player_stats?t.player_stats.map((function(t){return e.playerStatsMapper.fromResponse(t)})):t.player_stats,n.context={competition:this.competitionsMapper.fromResponse(t.context.competition)},n.timeline=t.timeline?t.timeline.map((function(t){return e.timelineMapper.fromResponse(t)})):[],n.status={type:t.status.type,subType:t.status.sub_type},n.lineups=t.lineups?this.lineupsMapper.fromResponse(t.lineups):new c.default,n}catch(t){throw console.warn("There was a problem remapping the match response",t),t}},t}();e.default=h},4652:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.ftScore=null,this.htScore=null,this.aetScore=null,this.aggScore=null,this.penScore=null}},83949:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(4652)),a=function(){function t(){this.statEntityFromResponse=function(t){return{homeGoals:t.home_goals,awayGoals:t.away_goals}}}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.ftScore=this.statEntityFromResponse(t.ft_score),e.htScore=this.statEntityFromResponse(t.ht_score),e.aetScore=this.statEntityFromResponse(t.aet_score),e.aggScore=this.statEntityFromResponse(t.agg_score),e.penScore=this.statEntityFromResponse(t.pen_score),e}catch(t){throw console.warn("There was a problem remapping the scores",t),t}},t}();e.default=a},77950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.corners=null,this.cornersFirstHalf=null,this.cornersSecondHalf=null,this.cornersExtraTime=null,this.crosses=null,this.crossesFirstHalf=null,this.crossesSecondHalf=null,this.crossesExtraTime=null,this.offside=null,this.offsideFirstHalf=null,this.offsideSecondHalf=null,this.offsideExtraTime=null,this.shotsOn=null,this.shotsOnFirstHalf=null,this.shotsOnSecondHalf=null,this.shotsOnExtraTime=null,this.throwIn=null,this.throwInFirstHalf=null,this.throwInSecondHalf=null,this.throwInExtraTime=null,this.redCards=null,this.redCardsFirstHalf=null,this.redCardsSecondHalf=null,this.redCardsExtraTime=null,this.shotsOff=null,this.shotsOffFirstHalf=null,this.shotsOffSecondHalf=null,this.shotsOffExtraTime=null,this.goalKicks=null,this.goalKicksFirstHalf=null,this.goalKicksSecondHalf=null,this.goalKicksExtraTime=null,this.possession=null,this.possessionFirstHalf=null,this.possessionSecondHalf=null,this.possessionExtraTime=null,this.treatments=null,this.treatmentsFirstHalf=null,this.treatmentsSecondHalf=null,this.treatmentsExtraTime=null,this.yellowCards=null,this.yellowCardsFirstHalf=null,this.yellowCardsSecondHalf=null,this.yellowCardsExtraTime=null,this.shotsBlocked=null,this.shotsBlockedFirstHalf=null,this.shotsBlockedSecondHalf=null,this.shotsBlockedExtraTime=null,this.substitutions=null,this.substitutionsFirstHalf=null,this.substitutionsSecondHalf=null,this.substitutionsExtraTime=null,this.counterAttacks=null,this.counterAttacksFirstHalf=null,this.counterAttacksSecondHalf=null,this.counterAttacksExtraTime=null,this.foulsCommitted=null,this.foulsCommittedFirstHalf=null,this.foulsCommittedSecondHalf=null,this.foulsCommittedExtraTime=null}},7122:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(77950)),a=function(){function t(){this.statEntityFromResponse=function(t){return{homeTeam:t?t.home_team:null,awayTeam:t?t.away_team:null}}}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.corners=this.statEntityFromResponse(t.corners),e.cornersFirstHalf=this.statEntityFromResponse(t.corners_1h),e.cornersSecondHalf=this.statEntityFromResponse(t.corners_2h),e.cornersExtraTime=this.statEntityFromResponse(t.corners_et),e.crosses=this.statEntityFromResponse(t.crosses),e.crossesFirstHalf=this.statEntityFromResponse(t.crosses_1h),e.crossesSecondHalf=this.statEntityFromResponse(t.crosses_2h),e.crossesExtraTime=this.statEntityFromResponse(t.crosses_et),e.offside=this.statEntityFromResponse(t.offside),e.offsideFirstHalf=this.statEntityFromResponse(t.offside_1h),e.offsideSecondHalf=this.statEntityFromResponse(t.offside_2h),e.offsideExtraTime=this.statEntityFromResponse(t.offside_et),e.shotsOn=this.statEntityFromResponse(t.shots_on),e.shotsOnFirstHalf=this.statEntityFromResponse(t.shots_on_1h),e.shotsOnSecondHalf=this.statEntityFromResponse(t.shots_on_2h),e.shotsOnExtraTime=this.statEntityFromResponse(t.shots_on_et),e.throwIn=this.statEntityFromResponse(t.throw_in),e.throwInFirstHalf=this.statEntityFromResponse(t.throw_in_1h),e.throwInSecondHalf=this.statEntityFromResponse(t.throw_in_2h),e.throwInExtraTime=this.statEntityFromResponse(t.throw_in_et),e.redCards=this.statEntityFromResponse(t.red_cards),e.redCardsFirstHalf=this.statEntityFromResponse(t.red_cards_1h),e.redCardsSecondHalf=this.statEntityFromResponse(t.red_cards_2h),e.redCardsExtraTime=this.statEntityFromResponse(t.red_cards_et),e.shotsOff=this.statEntityFromResponse(t.shots_off),e.shotsOffFirstHalf=this.statEntityFromResponse(t.shots_off_1h),e.shotsOffSecondHalf=this.statEntityFromResponse(t.shots_off_2h),e.shotsOffExtraTime=this.statEntityFromResponse(t.shots_off_et),e.goalKicks=this.statEntityFromResponse(t.goal_kicks),e.goalKicksFirstHalf=this.statEntityFromResponse(t.goal_kicks_1h),e.goalKicksSecondHalf=this.statEntityFromResponse(t.goal_kicks_2h),e.goalKicksExtraTime=this.statEntityFromResponse(t.goal_kicks_et),e.possession=this.statEntityFromResponse(t.possession),e.possessionFirstHalf=this.statEntityFromResponse(t.possession_1h),e.possessionSecondHalf=this.statEntityFromResponse(t.possession_2h),e.possessionExtraTime=this.statEntityFromResponse(t.possession_et),e.treatments=this.statEntityFromResponse(t.treatments),e.treatmentsFirstHalf=this.statEntityFromResponse(t.treatments_1h),e.treatmentsSecondHalf=this.statEntityFromResponse(t.treatments_2h),e.treatmentsExtraTime=this.statEntityFromResponse(t.treatments_et),e.yellowCards=this.statEntityFromResponse(t.yellow_cards),e.yellowCardsFirstHalf=this.statEntityFromResponse(t.yellow_cards_1h),e.yellowCardsSecondHalf=this.statEntityFromResponse(t.yellow_cards_2h),e.yellowCardsExtraTime=this.statEntityFromResponse(t.yellow_cards_et),e.shotsBlocked=this.statEntityFromResponse(t.shots_blocked),e.shotsBlockedFirstHalf=this.statEntityFromResponse(t.shots_blocked_1h),e.shotsBlockedSecondHalf=this.statEntityFromResponse(t.shots_blocked_2h),e.shotsBlockedExtraTime=this.statEntityFromResponse(t.shots_blocked_et),e.substitutions=this.statEntityFromResponse(t.substitutions),e.substitutionsFirstHalf=this.statEntityFromResponse(t.substitutions_1h),e.substitutionsSecondHalf=this.statEntityFromResponse(t.substitutions_2h),e.substitutionsExtraTime=this.statEntityFromResponse(t.substitutions_et),e.counterAttacks=this.statEntityFromResponse(t.counter_attacks),e.counterAttacksFirstHalf=this.statEntityFromResponse(t.counter_attacks_1h),e.counterAttacksSecondHalf=this.statEntityFromResponse(t.counter_attacks_2h),e.counterAttacksExtraTime=this.statEntityFromResponse(t.counter_attacks_et),e.foulsCommitted=this.statEntityFromResponse(t.fouls_committed),e.foulsCommittedFirstHalf=this.statEntityFromResponse(t.fouls_committed_1h),e.foulsCommittedSecondHalf=this.statEntityFromResponse(t.fouls_committed_2h),e.foulsCommittedExtraTime=this.statEntityFromResponse(t.fouls_committed_et),e}catch(t){throw console.warn("There was a problem remapping the stats",t),t}},t}();e.default=a},36899:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.subType=null}},59452:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.minute="",this.type="",this.teamId="",this.player=null,this.relatedPlayer=null,this.updatedAt=""}},90092:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(59452)),a=r(n(93550)),s=function(){function t(){this.playerRemapper=null,this.playerRemapper=new a.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.minute=t.minute,e.type=t.type,e.teamId=t.team_id,e.player=this.playerRemapper.fromResponse(t.player),e.relatedPlayer=t.related_player?this.playerRemapper.fromResponse(t.related_player):null,e.updatedAt=t.updated_at,e}catch(t){throw console.warn("There was a problem remapping timeline",t),t}},t}();e.default=s},90753:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569));e.default=function(){this.meta=new i.default,this.data=[]}},73569:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(10155));e.default=function(){this.pagination=new i.default}},10155:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.currentPage=null,this.itemsPerPage=null,this.totalItems=null,this.numberOfPages=null}},91925:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569));e.default=function(){this.remapMetaProp=function(t){var e=new i.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e}}},38632:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.headshot=null}},24426:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.isDeleted=!1,this.teams=[]}},26477:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryId=null,this.scope=null,this.name=null,this.playerIds=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(){var t="";return e.countryId&&(t+="&",t+="country_id=".concat(e.countryId)),e.scope&&e.scope.length>0&&(t+="&",t+="scope=".concat(e.scope.join(","))),e.name&&(t+="&",t+="name=".concat(e.name)),e.playerIds&&e.playerIds.length>0&&(t+="&",t+="player_ids=".concat(e.playerIds.join(","))),e.limit&&(t+="&",t+="limit=".concat(e.limit)),e.page&&(t+="&",t+="page=".concat(e.page)),e.sortField&&(t+="&",t+="sort_field=".concat(e.sortField)),e.sortOrder&&(t+="&",t+="sort_order=".concat(e.sortOrder)),t},this.countryId=t.countryId?t.countryId:null,this.scope=t.scope?t.scope:null,this.name=t.name?t.name:null,this.playerIds=t.playerIds?t.playerIds:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},21837:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.isDeleted=!1,this.competitions=[],this.teams=[]}},32858:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.country=null}},44803:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.name="",this.position="",this.assets=null,this.type=""}},59071:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.startDate="",this.endDate="",this.loan=!1,this.position="",this.country=null,this.name="",this.assets=null,this.birthDate=""}},75157:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(24426)),s=r(n(95827)),o=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.countryRemapper=new i.default,this.teamRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new a.default;return n.id=t.id,n.firstName=t.first_name?t.first_name:null,n.lastName=t.last_name?t.last_name:null,n.name=t.name?t.name:null,n.birthDate=t.birth_date,n.country=this.countryRemapper.countryFromResponse(t.country),n.assets=t.assets,n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.position=t.position,n.isDeleted=t.is_deleted,n}catch(t){throw console.warn("There was a problem remapping players response",t),t}},t}();e.default=o},97943:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(21837)),s=r(n(95827)),o=r(n(67316)),u=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.competitionRemapper=null,this.countryRemapper=new i.default,this.teamRemapper=new s.default,this.competitionRemapper=new o.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new a.default;return n.id=t.id,n.firstName=t.first_name?t.first_name:null,n.lastName=t.last_name?t.last_name:null,n.name=t.name?t.name:null,n.birthDate=t.birth_date,n.country=this.countryRemapper.countryFromResponse(t.country),n.assets=t.assets,n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.position=t.position,n.isDeleted=t.is_deleted,n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping player response",t),t}},t}();e.default=u},93550:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(44803)),a=function(){function t(){}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.name=t.name,e.position=t.position,e.shirtNumber=t.shirt_number,e.assets=t.assets,e.type=t.type,e}catch(t){throw console.warn("There was a problem remapping the player from timeline",t),t}},t}();e.default=a},14085:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(59071)),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new a.default;return e.id=t.id,e.startDate=t.start_date,e.endDate=t.end_date,e.shirtNumber=t.shirt_number,e.loan=t.loan,e.position=t.position,e.country=this.countryRemapper.countryFromResponse(t.country),e.name=t.name,e.assets=t.assets,e.birthDate=t.birth_date,e}catch(t){throw console.warn("There was a problem remapping the player from squad",t),t}},t}();e.default=s},4729:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(30056)),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new a.default;return e.id=t.id,e.firstName=t.first_name?t.first_name:null,e.lastName=t.last_name?t.last_name:null,e.name=t.name?t.name:null,e.birthDate=t.birth_date,e.country=this.countryRemapper.countryFromResponse(t.country),e.assets=t.assets,e.position=t.position,e}catch(t){throw console.warn("There was a problem remapping top player response",t),t}},t}();e.default=s},30056:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null}},40604:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.entities=null,this.query=null,this.scope=null,this.constructFilterUrl=function(){var t="";return e.entities&&(t+="&",t+="entities=".concat(e.entities.join(","))),e.query&&(t+="&",t+="q=".concat(e.query)),e.scope&&(t+="&",t+="scope=".concat(e.scope.join(","))),t},this.entities=t.entities?t.entities:null,this.query=t.query?t.query:null,this.scope=t.scope?t.scope:null}},36967:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.teams=null,this.players=null,this.competitions=null}},77287:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(95827)),a=r(n(75157)),s=r(n(67316)),o=r(n(36967)),u=function(){function t(){this.teamRemapper=null,this.playerRemapper=null,this.competitionremapper=null,this.teamRemapper=new i.default,this.playerRemapper=new a.default,this.competitionremapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new o.default;return n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.players=t.players?t.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionremapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping search response",t),t}},t}();e.default=u},95827:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(99314)),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new a.default;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.code=t.code,e.national=t.national,e.fullName=t.full_name,e.shortName=t.short_name,e.name=t.name,e.isDeleted=t.is_deleted,e.undecided=t.undecided,e}catch(t){throw console.warn("There was a problem remapping teams response",t),t}},t}();e.default=s},17821:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(57316)),s=r(n(14085)),o=r(n(67316)),u=function(){function t(){this.countryRemapper=null,this.competitionRemapper=null,this.playerRemapper=null,this.countryRemapper=new i.default,this.competitionRemapper=new o.default,this.playerRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new a.default;return n.id=t.id,n.country=this.countryRemapper.countryFromResponse(t.country),n.gender=t.gender,n.assets=t.assets,n.code=t.code,n.national=t.national,n.fullName=t.full_name,n.shortName=t.short_name,n.name=t.name,n.isDeleted=t.is_deleted,n.undecided=t.undecided,n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionRemapper.fromResponse(t)})):[],n.colors=t.colors?t.colors:n.colors,n.squad=t.squad?t.squad.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping team response",t),t}},t}();e.default=u},99314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.code="",this.national=!1,this.undecided=!1,this.fullName="",this.shortName="",this.isDeleted=!1}},33773:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.primary=null,this.secondary=null,this.tertiary=null}},59920:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.name=null,this.countryId=null,this.national=!1,this.gender=null,this.limit=null,this.page=null,this.scope=null,this.sortField=null,this.sortOrder=null,this.teamIds=null,this.constructFilterUrl=function(){var t="";return e.name&&(t+="&",t+="name=".concat(e.name)),e.countryId&&(t+="&",t+="country_id=".concat(e.countryId)),e.national&&(t+="&",t+="national=".concat(e.national)),e.gender&&(t+="&",t+="gender=".concat(e.gender)),e.limit&&(t+="&",t+="limit=".concat(e.limit)),e.scope&&e.scope.length>0&&(t+="&",t+="scope=".concat(e.scope.join(","))),e.page&&(t+="&",t+="page=".concat(e.page)),e.sortField&&(t+="&",t+="sort_field=".concat(e.sortField)),e.sortOrder&&(t+="&",t+="sort_order=".concat(e.sortOrder)),e.teamIds&&e.teamIds.length>0&&(t+="&",t+="team_ids=".concat(e.teamIds.join(","))),t},this.name=t.name?t.name:null,this.countryId=t.countryId?"".concat(t.countryId):null,this.national=!!t.national&&t.national,this.gender=t.gender?t.gender:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.scope=t.scope?t.scope:null,this.sortField=t.sortField?"".concat(t.sortField):null,this.sortOrder=t.sortOrder?"".concat(t.sortOrder):null,this.teamIds=t.teamIds?t.teamIds:null}},57316:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(33773));e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.competitions=[],this.code="",this.national=!1,this.fullName="",this.shortName="",this.isDeleted=!1,this.undecided=!1,this.colors=new i.default,this.squad=[]}},61284:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.teamId=null,this.matches=[]}},89582:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(4021),c=n(94904),d=u(n(68097)),f=u(n(62535)),h=n(5318),p=a(n(47686)),m=u(n(73569));e.default=function(t){var e=this;this.clientHttps=null,this.errorHandlingMode=null,this.setAvailableMarketsForMatch=function(t){return s(e,void 0,void 0,(function(){var e,n,r,i=this;return o(this,(function(a){switch(a.label){case 0:return[4,this.clientHttps.getConfig(p.FeatureConfigEnum.PREDICTOR)];case 1:return e=a.sent(),n=e.fullCoverageCompetitions,r=e.markets,Array.isArray(t)?[2,t.map((function(t){return i.setAvailableMarkets(t,n,r)}))]:"object"==typeof t&&Object.keys(t).length?[2,this.setAvailableMarkets(t,n,r)]:[2]}}))}))},this.setAvailableMarkets=function(t,n,r){var i,a=null===(i=t.context.competition)||void 0===i?void 0:i.id;return a&&e.isMatchInCoverageCompetition(a,n)?(t.availableMarkets=r.all,t):(t.availableMarkets=r.main,t)},this.setMetaDataBatchRequest=function(t,n,r){var i=new m.default;if(i.pagination.totalItems=t,i.pagination.itemsPerPage=n,i.pagination.numberOfPages=t?Math.ceil(t/n):0,i.pagination.currentPage=r,i.pagination.numberOfPages>0&&r>i.pagination.numberOfPages){if("standard"===e.errorHandlingMode)throw new f.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_PAGE_NUMBER,h.ErrorMessages.INVALID_PAGE_NUMBER);throw new d.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_PAGE_NUMBER,h.ErrorMessages.INVALID_PAGE_NUMBER)}return i},this.finalizeMatchesDataBatchRequest=function(t,e){t=t.sort((function(t,e){return new Date(t.kickoffAt).getTime()-new Date(e.kickoffAt).getTime()}));var n=e.limit||20;if(e.page){var r=e.page>1?n*(e.page-1):0;t=t.slice(r,r+n)}return!e.page&&t.length>n&&(t=t.slice(0,n)),t},this.isMatchInCoverageCompetition=function(t,e){var n=!1;return e.includes(t)?n=!0:n},this.clientHttps=new p.default(t),this.errorHandlingMode=t.errorHandlingMode}},74410:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4021),o=n(94904),u=n(5318),l=function(t){function e(e){var n=t.call(this,e.errorHandlingMode)||this;return n.limit=50,n.validateTeamFormArguments=function(t,e){t&&"string"==typeof t||n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_TEAM_ID,u.ErrorMessages.INVALID_TEAM_ID),e&&(e.competitionId&&"string"!=typeof e.competitionId&&n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_COMPETITION_ID,u.ErrorMessages.INVALID_COMPETITION_ID),e.limit&&"number"!=typeof e.limit&&n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_LIMIT,u.ErrorMessages.INVALID_LIMIT_TYPE),e.limit&&e.limit>n.limit&&n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_LIMIT,u.ErrorMessages.INVALID_LIMIT+n.limit.toString()))},n}return i(e,t),e}(a(n(16198)).default);e.default=l},21454:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.configuration=t}return t.prototype.getSDKConfiguration=function(){return this.configuration},t}();e.default=n},73650:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(95792)),o=a(n(64939)),u=a(n(52426));e.default=function(t){var e=this;this.validator=null,this.idMappingFacade=null,this.factory=new o.default,this.getMappedFootballCountryIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.validator.validate(t,n,a),e={country:Array.from(t)},[4,this.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:return r=i.sent(),[2,this.factory.remapToResponseModel(r,n,a)]}}))}))},this.getMappedFootballCompetitionIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.validator.validate(t,n,a),e={competition:Array.from(t)},[4,this.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:return r=i.sent(),[2,this.factory.remapToResponseModel(r,n,a)]}}))}))},this.getMappedFootballTeamIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.validator.validate(t,n,a),e={team:Array.from(t)},[4,this.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:return r=i.sent(),[2,this.factory.remapToResponseModel(r,n,a)]}}))}))},this.getMappedFootballPlayerIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.validator.validate(t,n,a),e={player:Array.from(t)},[4,this.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:return r=i.sent(),[2,this.factory.remapToResponseModel(r,n,a)]}}))}))},this.getFootballMappedMatchIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.validator.validate(t,n,a),e={match:Array.from(t)},[4,this.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:return r=i.sent(),[2,this.factory.remapToResponseModel(r,n,a)]}}))}))},this.validator=new u.default(t),this.idMappingFacade=new s.default(t)}},64939:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(47589));e.default=function(){this.remapToResponseModel=function(t,e,n){var r=new i.default;return r.meta.input=e,r.meta.output=n,0===t.size||(r.data=Array.from(t).map((function(t){return{input:t[0],output:t[1]}}))),r}}},99421:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(73650));e.default=function(t){var e=this;this.facade=null,this.getMappedFootballCountryIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMappedFootballCountryIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMappedFootballCompetitionIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMappedFootballCompetitionIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMappedFootballTeamIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMappedFootballTeamIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMappedFootballPlayerIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMappedFootballPlayerIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMappedFootballMatchIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getFootballMappedMatchIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},6448:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.input=null,this.output=null}},47589:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(6448));e.default=function(){this.meta=new i.default,this.data=[]}},52426:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(14946),a=n(4021),s=n(94904),o=r(n(68097)),u=r(n(62535)),l=n(5318);e.default=function(t){var e=this;this.errorHandlingModel=null,this.validate=function(t,n,r){t&&Array.isArray(t)&&0!==t.length||e.throwException(a.ErrorCodes.BAD_METHOD_CALL,s.ErrorStatuses.INVALID_IDS,l.ErrorMessages.INVALID_OR_EMPTY_IDS),(!n||n!==i.IdSchemaEnum.NATIVE&&n!==i.IdSchemaEnum.ENETPULSE&&n!==i.IdSchemaEnum.SPORTAL_365&&n!==i.IdSchemaEnum.SPORTRADAR&&n!==i.IdSchemaEnum.API_FOOTBALL)&&e.throwException(a.ErrorCodes.BAD_METHOD_CALL,s.ErrorStatuses.INVALID_INPUT_PROVIDER,l.ErrorMessages.INVALID_PROVIDER),(!r||r!==i.IdSchemaEnum.NATIVE&&r!==i.IdSchemaEnum.ENETPULSE&&r!==i.IdSchemaEnum.SPORTAL_365&&r!==i.IdSchemaEnum.SPORTRADAR&&r!==i.IdSchemaEnum.API_FOOTBALL)&&e.throwException(a.ErrorCodes.BAD_METHOD_CALL,s.ErrorStatuses.INVALID_OUTPUT_PROVIDER,l.ErrorMessages.INVALID_PROVIDER),n===r&&e.throwException(a.ErrorCodes.BAD_METHOD_CALL,s.ErrorStatuses.INVALID_OUTPUT_PROVIDER,l.ErrorMessages.INVALID_OUTPUT_PROVIDER)},this.throwException=function(t,n,r){if("standard"===e.errorHandlingModel)throw new u.default(t,n,r);throw new o.default(t,n,r)},this.errorHandlingModel=t.errorHandlingMode}},1161:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=s(n(47686)),u=s(n(92962)),l=s(n(40267)),c=s(n(91550)),d=s(n(29596)),f=s(n(73112)),h=s(n(9517));e.default=function(t){var e=this;this.clientHttps=null,this.topX=null,this.matchQuiz=null,this.loyalty=null,this.miniGames=null,this.voting=null,this.getListContent=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return n&&(n=new h.default(n)),[4,this.clientHttps.getListContent(t,n,a)];case 1:return e=r.sent(),[4,this.setModels(e.data)];case 2:return r.sent(),[2,e]}}))}))},this.setModels=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s,o,u,l,c,d,f,h;return i(this,(function(p){switch(p.label){case 0:e=!0,n=[],r=new Map,t.forEach((function(t){if(r.has(t.entityType)){var e=r.get(t.entityType);r.set(t.entityType,a(a([],e,!0),[t.entityId],!1))}else r.set(t.entityType,[t.entityId])})),p.label=1;case 1:p.trys.push([1,6,,7]),s=function(t,r){var s,u,l,c,d,f;return i(this,(function(i){switch(i.label){case 0:switch(t){case"TOP_X":return[3,1];case"MATCH_QUIZ":return[3,3];case"LEADERBOARD_TEMPLATES":return[3,5];case"CLASSIC_QUIZ":return[3,7];case"EITHER_OR":return[3,9];case"POLL":return[3,11]}return[3,13];case 1:return[4,o.topX.getGames({limit:r.length,gameIds:r},e)];case 2:return s=i.sent(),n=a(a([],n,!0),s.data,!0),[3,13];case 3:return[4,o.matchQuiz.getGames({limit:r.length,gameIds:r},e)];case 4:return u=i.sent(),n=a(a([],n,!0),u.data,!0),[3,13];case 5:return[4,o.loyalty.getTemplates(void 0,e)];case 6:return l=i.sent(),n=a(a([],n,!0),l.data.filter((function(t){return r.includes(t.id)})),!0),[3,13];case 7:return[4,o.miniGames.getClassicQuizzes({limit:r.length,classicQuizIds:r},!1,e)];case 8:return c=i.sent(),n=a(a([],n,!0),c.data,!0),[3,13];case 9:return[4,o.miniGames.getEitherOrs({limit:r.length,eitherOrIds:r},!1,e)];case 10:return d=i.sent(),n=a(a([],n,!0),d.data,!0),[3,13];case 11:return[4,o.voting.getPolls({limit:r.length,pollIds:r},e)];case 12:return f=i.sent(),n=a(a([],n,!0),f.data,!0),[3,13];case 13:return[2]}}))},o=this,u=0,l=Array.from(r.entries()),p.label=2;case 2:return u<l.length?(c=l[u],d=c[0],f=c[1],[5,s(d,f)]):[3,5];case 3:p.sent(),p.label=4;case 4:return u++,[3,2];case 5:return[3,7];case 6:throw h=p.sent(),console.error("An error occurred while trying to set models for list content entities",h),h;case 7:return t.forEach((function(t){var e=n.find((function(e){return e.id===t.entityId}))||null;t.entityModel=e})),[2]}}))}))},this.clientHttps=new o.default(t),this.topX=new d.default(t),this.matchQuiz=new l.default(t),this.loyalty=new u.default(t),this.miniGames=new c.default(t),this.voting=new f.default(t)}},78324:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(1161));e.default=function(t){var e=this;this.facade=null,this.getListContent=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getListContent(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},9517:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=null,this.page=null,this.constructFiltersUrl=function(){var t="";return e.limit&&(t+="&limit=".concat(e.limit)),e.page&&(t+="&page=".concat(e.page)),t},this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null}},97053:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityModel=null}},56412:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569)),a=r(n(97053)),s=r(n(80138));e.default=function(){var t=this;this.remapListContent=function(e){var n=new s.default;return n.meta=t.remapMeta(e.meta),n.data=e.data.map((function(t){var e=new a.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e})),n},this.remapMeta=function(t){var e=new i.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e}}},80138:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(91287);e.default=function(){this.meta=new r.MetaFootballModel,this.data=[]}},83822:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=n(47686),l=s(n(53142)),c=s(n(17232)),d=s(n(31139)),f=s(n(89502)),h=s(n(81859)),p=s(n(52793)),m=s(n(63247)),v=s(n(48061)),_=s(n(48808)),y=s(n(22544));e.default=function(t,e,n,s,g){var b=this;this.config=null,this.clientHttps=null,this.loyaltyHttps=null,this.loyaltyService=null,this.profileFacade=null,this.loyaltyValidator=null,this.topXFacade=null,this.matchQuizFacade=null,this.predictorHttps=null,this.errorHandlingMode=null,this.football=null,this.getConfig=function(){return r(b,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(u.FeatureConfigEnum.LOYALTY)];case 1:return[2,t.sent()]}}))}))},this.getConfigV2=function(t){return r(b,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.clientHttps.getNewLoyaltyConfig(t)];case 1:return e=n.sent(),[4,this.loyaltyService.addEntityModelToFootballBadges(e.rewards.badges)];case 2:return n.sent(),[4,this.loyaltyService.addGameModelToGamesBadges(e.rewards.badges)];case 3:return n.sent(),[2,e]}}))}))},this.getClientBadges=function(){return r(b,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getConfig()];case 1:return t=e.sent(),[2,this.loyaltyService.buildOldClientBadges(t.rewards.badges)]}}))}))},this.getClientBadgesV2=function(t){return r(b,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.clientHttps.getNewLoyaltyConfig(t)];case 1:return e=n.sent(),[2,this.loyaltyService.buildNewClientBadges(e.rewards.badges)]}}))}))},this.getTemplates=function(t,e){return r(b,void 0,void 0,(function(){var n,r,s,u,l;return i(this,(function(i){switch(i.label){case 0:return t&&(t=new v.default(t)),this.config.idSchema!==o.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyHttps.getTemplates(t,e)];case 1:return[2,i.sent()];case 2:return[4,this.loyaltyHttps.getTemplates(t,e)];case 3:return n=i.sent(),r=n,[4,this.loyaltyService.remapTemplatesIds(a([],n.data,!0))];case 4:r.data=i.sent(),s=0,u=n.data,i.label=5;case 5:return s<u.length?(l=u[s],[4,this.loyaltyService.remapTemplateGroupMatchIds(l.groups)]):[3,8];case 6:i.sent(),i.label=7;case 7:return s++,[3,5];case 8:return[2,n]}}))}))},this.getTemplateById=function(t,e){return r(b,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.loyaltyHttps.getTemplateById(t,e)];case 1:return n=i.sent(),this.config.idSchema===o.IdSchemaEnum.NATIVE?[2,n]:[4,this.loyaltyService.remapTemplatesIds([n])];case 2:return r=i.sent(),[4,this.loyaltyService.remapTemplateGroupMatchIds(r[0].groups)];case 3:return i.sent(),[2,r[0]]}}))}))},this.getLeaderboard=function(t,e,n){return r(b,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"loyalty"),[4,this.loyaltyHttps.getLeaderboard(t,n,e)];case 1:return r=i.sent(),a=r,[4,this.loyaltyService.addProfileModelToLeaderboard(r.data)];case 2:return a.data=i.sent(),[2,r]}}))}))},this.getLeaderboardForGame=function(t,e,n){return r(b,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return e&&(e=new y.default(e)),[4,this.loyaltyHttps.getLeaderboardForGame(t,n,e)];case 1:return r=i.sent(),a=r,[4,this.loyaltyService.addProfileModelToLeaderboard(r.data)];case 2:return a.data=i.sent(),[2,r]}}))}))},this.getLeaderboardForLeague=function(t,e){return r(b,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"league_leaderboard"),[4,this.loyaltyHttps.getLeaderboardForLeague(t,e)];case 1:return n=i.sent(),r=n,[4,this.loyaltyService.addProfileModelToLeaderboard(n.data)];case 2:return r.data=i.sent(),[2,n]}}))}))},this.getOwnRankings=function(t,e){return r(b,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.getOwn()];case 1:return n=r.sent().id,[2,this.getUserRankings(n,t,e)]}}))}))},this.getUserRankings=function(t,e,n){return r(b,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"rankings"),[4,this.loyaltyHttps.getUserRankings(t,e,n)];case 1:return r=i.sent(),[4,this.getModelsForUserRankings(r)];case 2:return[2,i.sent()]}}))}))},this.getHighestSuccessRate=function(t,e){return r(b,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t&&(t=new m.default(t),this.loyaltyValidator.validate(t,this.errorHandlingMode)),[4,this.loyaltyHttps.getHighestSuccessRate(t,e)];case 1:return n=r.sent(),[2,this.loyaltyService.addProfileModelToHighestSuccessRate(n)]}}))}))},this.getTemplateWinners=function(t,e){return r(b,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.predictorHttps.getContestWinners(t,e)];case 1:return n=i.sent(),[4,this.getTemplateById(t)];case 2:return r=i.sent(),n.contestModel=r,[2,this.loyaltyService.completeContestWinners(n)]}}))}))},this.getEntitiesFollows=function(t,e){return r(b,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.loyaltyService.validateEntitiesFollowsFilters(t),this.config.idSchema===o.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyService.remapEntitiesFollowsFilters(t)];case 1:t=r.sent(),r.label=2;case 2:return[4,this.loyaltyHttps.getEntitiesFollows(t,e)];case 3:return n=r.sent(),[4,this.loyaltyService.addModelsToEntitiesFollows(n)];case 4:return[2,r.sent()]}}))}))},this.getModelsForUserRankings=function(t){return r(b,void 0,void 0,(function(){var e,n,r,a,s,o,u,l,c,d,f,h;return i(this,(function(i){switch(i.label){case 0:return e=null,n=null,r=null,a=this.loyaltyService.extractRankingsIdsMap(t.data),s=a[0],o=a[1],(u=a[2]).length?[4,this.getTemplates()]:[3,2];case 1:l=i.sent(),e=l.data.filter((function(t){return u.includes(t.id)})),i.label=2;case 2:return s.length?(c={gameIds:s},[4,this.topXFacade.getGames(c)]):[3,4];case 3:d=i.sent(),n=d.data,i.label=4;case 4:return o.length?(f={gameIds:o},[4,this.matchQuizFacade.getGames(f)]):[3,6];case 5:h=i.sent(),r=h.data,i.label=6;case 6:return[2,this.loyaltyService.setModelsForUserRankings(n,r,e,t)]}}))}))},this.getTemplateMatches=function(t,e,n){return r(b,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return[4,this.getTemplateById(t,n)];case 1:return(r=i.sent()).competitionIds&&0!==r.competitionIds.length||r.teamIds&&0!==r.teamIds.length||r.matchIds&&0!==r.matchIds.length||r.gameIds&&0!==r.gameIds.length||r.gameTypes&&0!==r.gameTypes.length||r.groups&&0!==r.groups.length?[4,this.loyaltyService.initMatchFiltersForTemplates(r,e)]:[2,[]];case 2:return a=i.sent(),[4,this.football.getMatches(a,n)];case 3:return[2,i.sent().data]}}))}))},this.config=t,this.clientHttps=e,this.loyaltyHttps=n,this.profileFacade=new c.default(g,s),this.loyaltyService=new l.default(this.config),this.loyaltyValidator=new d.default,this.topXFacade=new f.default(t),this.matchQuizFacade=new h.default(t),this.predictorHttps=new p.default(t),this.errorHandlingMode=t.errorHandlingMode,this.football=new _.default(t)}},92962:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(47686)),o=a(n(87059)),u=a(n(83822)),l=a(n(84275)),c=a(n(78358));e.default=function(t){var e=this;this.clientHttps=null,this.profileHttps=null,this.loyaltyHttps=null,this.loyaltyFacade=null,this.localCache=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getConfigV2=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getConfigV2(t)];case 1:return[2,e.sent()]}}))}))},this.getClientBadges=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getClientBadges()];case 1:return[2,t.sent()]}}))}))},this.getClientBadgesV2=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getClientBadgesV2(t)];case 1:return[2,e.sent()]}}))}))},this.getTemplates=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplates(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTemplateById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboard=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboard(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboardForGame=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboardForGame(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboardForLeague=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboardForLeague(t,n)];case 1:return[2,e.sent()]}}))}))},this.getOwnRankings=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getOwnRankings(t,n)];case 1:return[2,e.sent()]}}))}))},this.getUserRankings=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getUserRankings(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getHighestSuccessRate=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getHighestSuccessRate(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTemplateWinners=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateWinners(t,n)];case 1:return[2,e.sent()]}}))}))},this.getEntitiesFollows=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getEntitiesFollows(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTemplateMatches=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateMatches(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.clientHttps=new s.default(t),this.profileHttps=new l.default(t),this.loyaltyHttps=new o.default(t),this.localCache=(new c.default).createLocalCacheInstance(t.idSchema),this.loyaltyFacade=new u.default(t,this.clientHttps,this.loyaltyHttps,this.profileHttps,this.localCache)}},78153:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},75111:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(78153));e.default=function(){this.value=[new i.default]}},38608:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=[],this.predictor=[],this.topX=[],this.matchQuiz=[]}},70246:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(51429));e.default=function(){this.assets={mainImageUrl:""},this.requirements=new i.default}},18687:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},77983:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(82354));e.default=function(){this.assets={mainImageUrl:""},this.requirements=new i.default}},82354:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.postPoints=null,e.postsCount=null,e.reactionsCount=null,e.totalDiscussionPoints=null,e}return i(e,t),e}(a(n(51429)).default);e.default=s},51429:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.gameParticipationCount=null,this.entityId=null,this.entityType=null,this.predictionsMade=null,this.correctPredictions=null}},49750:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(27978));e.default=function(){this.predictor=[],this.topX=[],this.matchQuiz=[],this.games=[],this.football=[],this.classicQuizzes=[],this.eitherOr=[],this.discussions=[],this.voting=new i.default}},99805:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.assets={mainImageUrl:""}}},63636:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},50075:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},33101:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(50075)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},11963:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityModel=null}},93035:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(11963)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},64270:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},68699:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(64270)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},33626:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},16268:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(33626)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},45643:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},38574:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(45643)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},63143:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},95793:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(63143)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},98743:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64646)).default);e.default=s},64646:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(21821)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},21821:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},27978:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.potm=[],this.poll=[]}},50515:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(75111)),a=r(n(94226));e.default=function(){this.enabled=!1,this.clientId=null,this.conditions={list:null},this.actions=new i.default,this.rewards=new a.default}},16866:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(75111)),a=r(n(66483));e.default=function(){this.enabled=!1,this.clientId=null,this.conditions={list:null},this.actions=new i.default,this.rewards=new a.default}},46480:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.count=0,this.breakdown=[]}},91634:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},22544:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=null,this.page=null,this.groupId=null,this.limit=(null==t?void 0:t.limit)||null,this.page=(null==t?void 0:t.page)||null,void 0!==(null==t?void 0:t.groupId)&&console.warn("Warning: groupId filter property is deprecated and no longer supported by the API. This property will be removed in a future version. Please update your code accordingly.")}return t.prototype.constructFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit=".concat(this.limit)),this.page&&(t+="&",t+="page=".concat(this.page)),t},t}();e.default=n},63247:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.market=t.market?t.market:null,this.fromDate=t.fromDate?t.fromDate:null,this.toDate=t.toDate?t.toDate:null,this.usersCount=t.usersCount?t.usersCount:null,this.minimumPredictions=t.minimumPredictions?t.minimumPredictions:null}return t.prototype.constructFiltersUrl=function(){var t="";return this.market&&(t+="&",t+="market=".concat(this.market)),this.fromDate&&(t+="&",t+="from_date=".concat(this.fromDate)),this.toDate&&(t+="&",t+="to_date=".concat(this.toDate)),this.usersCount&&(t+="&",t+="users_count=".concat(this.usersCount)),this.minimumPredictions&&(t+="&",t+="minimum_predictions=".concat(this.minimumPredictions)),t},t}();e.default=n},84169:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.templateId=null,this.limit=null,this.page=null,this.groupId=null,this.templateId=(null==t?void 0:t.templateId)||null,this.limit=(null==t?void 0:t.limit)||null,this.page=(null==t?void 0:t.page)||null,void 0!==(null==t?void 0:t.groupId)&&console.warn("Warning: groupId property is deprecated and no longer supported by the API. This property will be removed in a future version. Please update your code accordingly.")}return t.prototype.constructFiltersUrl=function(){var t="";return this.templateId&&(t+="&template_id=".concat(this.templateId)),this.limit&&(t+="&limit=".concat(this.limit)),this.page&&(t+="&page=".concat(this.page)),t},t}();e.default=n},97910:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.groupId=null,this.limit=null,this.page=null,this.groupId=t.groupId?t.groupId:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null}return t.prototype.constructFiltersUrl=function(){var t="";return this.groupId&&(t+="&",t+="group_id=".concat(this.groupId)),this.limit&&(t+="&",t+="limit=".concat(this.limit)),this.page&&(t+="&",t+="page=".concat(this.page)),t},t}();e.default=n},34996:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.sortOrder=null,this.rankType=null,this.leaderboardIds=null,this.gameType=null,this.limit=null,this.page=null,this.groupId=null,this.constructFiltersUrl=function(){var t="";return e.sortOrder&&(t+="&",t+="sort_order=".concat(e.sortOrder)),e.rankType&&(t+="&",t+="rank_type=".concat(e.rankType)),e.leaderboardIds&&(t+="&",t+="type_ids=".concat(e.leaderboardIds.join(","))),e.gameType&&(t+="&",t+="game_type=".concat(e.gameType)),e.limit&&(t+="&",t+="limit=".concat(e.limit)),e.page&&(t+="&",t+="page=".concat(e.page)),t},this.sortOrder=t.sortOrder,this.rankType=t.rankType,this.leaderboardIds=t.leaderboardIds,this.gameType=t.type&&"game"===t.type.toLowerCase()?t.gameType:null,this.limit=t.limit,this.page=t.page,void 0!==(null==t?void 0:t.groupId)&&console.warn("Warning: groupId property is deprecated and no longer supported by the API. This property will be removed in a future version. Please update your code accordingly.")}},48061:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.flags=null,this.status=null,this.type=null,this.activeFrom=null,this.activeTo=null,this.createdFrom=null,this.createdTo=null,this.updatedFrom=null,this.updatedTo=null,this.flags=t.flags?t.flags:null,this.status=t.status?t.status:null,this.type=t.type?t.type:null,this.activeFrom=t.activeFrom?t.activeFrom:null,this.activeTo=t.activeTo?t.activeTo:null,this.createdFrom=t.createdFrom?t.createdFrom:null,this.createdTo=t.createdTo?t.createdTo:null,this.updatedFrom=t.updatedFrom?t.updatedFrom:null,this.updatedTo=t.updatedTo?t.updatedTo:null}return t.prototype.constructFiltersUrl=function(){var t="";return this.flags&&this.flags.length>0&&(t+="&",t+="flags=".concat(this.flags.join(","))),this.status&&(t+="&",t+="status=".concat(this.status)),this.type&&(t+="&",t+="type=".concat(this.type)),this.activeFrom&&(t+="&",t+="active_from=".concat(this.activeFrom)),this.activeTo&&(t+="&",t+="active_to=".concat(this.activeTo)),this.createdFrom&&(t+="&",t+="created_from=".concat(this.createdFrom)),this.createdTo&&(t+="&",t+="created_to=".concat(this.createdTo)),this.updatedFrom&&(t+="&",t+="updated_from=".concat(this.updatedFrom)),this.updatedTo&&(t+="&",t+="updated_to=".concat(this.updatedTo)),t},t}();e.default=n},56507:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.points=null,this.predictionsMade=null,this.profileId=null,this.profileModel=null,this.successRatePercent=null}},7746:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(56507));e.default=function(){this.remapHighestSuccessRate=function(t){return t.map((function(t){var e=new i.default;return e.position=t.position,e.points=t.points,e.predictionsMade=t.predictions_made,e.profileId=t.profile_id,e.successRatePercent=t.success_rate_percent,e}))}}},91317:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(68988));e.default=function(){this.meta=new i.default,this.data=[]}},69642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.profileId=null,this.profileModel=null,this.points=null,this.predictionsMade=null}},87419:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(68988)),a=r(n(45828)),s=r(n(33224)),o=r(n(69642));e.default=function(){var t=this;this.remapResponse=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapData(e.data),e},this.remapLeagueLeaderboardResponse=function(e){return e.meta=t.remapLeagueLeaderboardMeta(e.meta),e.data=t.remapData(e.data),e},this.remapTemplateBreakdown=function(e){return e.meta=t.remapMeta(e.meta),e.data=e.data.map((function(e){return t.remapTemplatePoints(e)})),e},this.remapMeta=function(t){var e=new a.default;return e.rankType=t.rank_type,e.fromDate=t.from_date,e.toDate=t.to_date,e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e},this.remapLeagueLeaderboardMeta=function(t){var e=new i.default;return e.templateId=t.template_id,e.privateLeagueId=t.private_league_id,e.fromDate=t.from_date,e.toDate=t.to_date,e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e},this.remapData=function(t){var e=[];return t.forEach((function(t){var n=new o.default;n.position=t.position,n.profileId=t.profile_id,n.points=t.points,n.predictionsMade=t.predictions_made,e.push(n)})),e},this.remapTemplatePoints=function(t){var e=new s.default;return e.groupId=t.group_id,e.averagePoints=t.average_points,e.highestPoints=t.highest_points,e}}},27460:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(45828));e.default=function(){this.meta=new i.default,this.data=[]}},93409:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.flags="",this.status="",this.type="",this.activeFrom="",this.activeTo="",this.createdFrom="",this.createdTo="",this.updatedFrom="",this.updatedTo=""}},68988:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(10155));e.default=function(){this.templateId=null,this.privateLeagueId=null,this.fromDate=null,this.toDate=null,this.pagination=new i.default}},45828:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(10155));e.default=function(){this.rankType=null,this.fromDate=null,this.toDate=null,this.pagination=new i.default}},69012:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(10155)),a=r(n(93409));e.default=function(){this.pagination=new i.default,this.filters=new a.default}},5038:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.points=null}},4187:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=null,this.predictor=null,this.activity=null,this.topX=null,this.matchQuiz=null,this.discussionPost=null}},78072:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=t.call(this)||this;return delete e.weight,e}return i(e,t),e}(a(n(78153)).default);e.default=s},9013:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.id=null,e.rankType=null,e.model=null,e.gameType=null,e}return i(e,t),e}(a(n(69642)).default);e.default=s},64533:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(11298)),a=r(n(73569)),s=r(n(99659)),o=r(n(9013)),u=function(){function t(){var t=this;this.remapRankings=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapData(e.data),e},this.remapRankingsPrivateLeague=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapDataUserRankingPrivateLeague(e.data),e},this.remapRankingsChallenge=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapDataUserRankingChallenge(e.data),e},this.remapMeta=function(t){var e=new a.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.numberOfPages=t.pagination.number_of_pages,e.pagination.totalItems=t.pagination.total_items,e}}return t.prototype.remapData=function(t){var e=[];return t.forEach((function(t){var n=new o.default;n.id=t.id,n.rankType=t.rank_type,n.position=t.position,n.points=t.points,n.gameType=t.game_type,delete n.profileId,delete n.profileModel,delete n.predictionsMade,e.push(n)})),e},t.prototype.remapDataUserRankingPrivateLeague=function(t){var e=[];return t.forEach((function(t){var n=new s.default;n.templateId=t.template_id,n.privateLeagueId=t.private_league_id,n.position=t.position,n.points=t.points,e.push(n)})),e},t.prototype.remapDataUserRankingChallenge=function(t){var e=[];return t.forEach((function(t){var n=new i.default;n.templateId=t.template_id,n.challengeId=t.private_league_id,n.position=t.position,n.points=t.points,e.push(n)})),e},t}();e.default=u},94226:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.tiers=null,this.badges=null}},66483:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.tiers=null,this.badges=null}},36569:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(45828));e.default=function(){this.meta=new i.default,this.data=[]}},33224:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},44982:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.adContent=null,e}return i(e,t),e}(a(n(30194)).default);e.default=s},8587:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.fromDate=null,this.toDate=null,this.matchIds=[]}},49324:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.groupId=null,this.label=null,this.flags=[],this.filters=null}},30194:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id=null,this.name=null,this.description=null,this.type=null,this.fromDate=null,this.toDate=null,this.markets=[],this.teamIds=[],this.matchIds=[],this.groups=[],this.gameIds=[],this.gameTypes=[],this.competitionIds=[],this.excludedProfileIds=[],this.rules=null,this.labels=null,this.customFields=null,this.branding=null,this.flags=null,this.images=new i.default,this.status=null,this.automaticallyChangeStatus=!0,this.createdAt=null,this.updatedAt=null,this.related=null}},18899:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(63483)),o=a(n(16692)),u=a(n(69012)),l=a(n(44982)),c=a(n(8587)),d=a(n(49324)),f=a(n(30194)),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapResponse=function(t){var n=[];return t.forEach((function(t){var r=new f.default;r.id=t.id,r.name=t.name,r.description=t.description,r.type=t.type,r.fromDate=t.from_date,r.toDate=t.to_date,r.markets=t.markets?t.markets:null,r.teamIds=t.team_ids?t.team_ids:null,r.matchIds=t.match_ids?t.match_ids:null,r.groups=t.groups?e.remapGroups(t.groups):null,r.gameIds=t.game_ids?t.game_ids:null,r.gameTypes=t.game_types?t.game_types:null,r.competitionIds=t.competition_ids?t.competition_ids:null,r.excludedProfileIds=t.excluded_profile_ids?t.excluded_profile_ids:null,r.rules=t.rules?t.rules:null,r.labels=t.labels?t.labels:null,r.customFields=t.custom_fields?t.custom_fields:null,r.branding=t.branding?e.remapBranding(t.branding):null,r.flags=t.flags?t.flags:null,r.images=t.images?t.images:null,r.status=t.status?t.status:null,r.automaticallyChangeStatus=t.automatically_change_status,r.createdAt=t.created_at,r.updatedAt=t.updated_at,r.related=t.related?e.remapRelated(t.related):null,n.push(r)})),n},e.remapResponseId=function(t){var n=new l.default;return n.id=t.id,n.name=t.name,n.description=t.description,n.type=t.type,n.fromDate=t.from_date,n.toDate=t.to_date,n.markets=t.markets?t.markets:null,n.teamIds=t.team_ids?t.team_ids:null,n.matchIds=t.match_ids?t.match_ids:null,n.groups=t.groups?e.remapGroups(t.groups):null,n.gameIds=t.game_ids?t.game_ids:null,n.gameTypes=t.game_types?t.game_types:null,n.competitionIds=t.competition_ids?t.competition_ids:null,n.excludedProfileIds=t.excluded_profile_ids?t.excluded_profile_ids:null,n.rules=t.rules?t.rules:null,n.flags=t.flags?t.flags:null,n.images=t.images?t.images:null,n.status=t.status?t.status:null,n.automaticallyChangeStatus=t.automatically_change_status,n.related=t.related?e.remapRelated(t.related):null,n.labels=t.labels,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.adContent=t.ad_content,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapMeta=function(t){var e=new u.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e.filters.flags=t.filters.flags,e.filters.status=t.filters.status,e.filters.type=t.filters.type,e.filters.activeFrom=t.filters.active_from,e.filters.activeTo=t.filters.active_to,e.filters.createdFrom=t.filters.created_from,e.filters.createdTo=t.filters.created_to,e.filters.updatedFrom=t.filters.updated_from,e.filters.updatedTo=t.filters.updated_to,e},e.remapRelated=function(t){return t.map((function(t){var e=new s.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e}))},e.remapGroups=function(t){return t.map((function(t){var n=new d.default;return n.groupId=t.group_id,n.label=t.label,n.flags=t.flags,n.filters=e.remapGroupFilters(t.filters),n}))},e.remapGroupFilters=function(t){var e=new c.default;return e.fromDate=t.from_date,e.toDate=t.to_date,e.matchIds=t.match_ids,e},e}return i(e,t),e}(o.default);e.default=h},47478:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.id=null,this.label=null,this.points=null}},53142:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=n(4021),l=n(94904),c=s(n(68097)),d=s(n(62535)),f=n(90712),h=n(5318),p=s(n(88900)),m=s(n(48808)),v=s(n(86134)),_=s(n(81859)),y=s(n(91550)),g=s(n(86409)),b=s(n(89502)),w=s(n(18687)),E=s(n(63636)),I=s(n(84169)),M=s(n(97910)),O=s(n(34996));e.default=function(t){var e=this;this.idMappingService=null,this.profileNamespace=null,this.footballNamespace=null,this.topXFacade=null,this.matchQuizFacade=null,this.miniGamesNamespace=null,this.errorHandlingMode=null,this.remapTemplatesIds=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s,o;return i(this,(function(i){switch(i.label){case 0:return t.length>0?(e=[],n=[],r=[],t.forEach((function(t){t.teamIds&&t.teamIds.length>0&&(e=a(a([],e,!0),t.teamIds,!0)),t.matchIds&&t.matchIds.length>0&&(n=a(a([],n,!0),t.matchIds,!0)),t.competitionIds&&t.competitionIds.length>0&&(r=a(a([],r,!0),t.competitionIds,!0))})),s={team:e,match:n,competition:r},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(s,"native",this.idMappingService.idSchema)]):[3,2];case 1:return o=i.sent(),a([],o.team,!0),a([],o.match,!0),a([],o.competition,!0),t.forEach((function(t){t.teamIds&&t.teamIds.length>0&&(t.teamIds=t.teamIds.map((function(t){return o.team.shift()}))),t.matchIds&&t.matchIds.length>0&&(t.matchIds=t.matchIds.map((function(t){return o.match.shift()}))),t.competitionIds&&t.competitionIds.length>0&&(t.competitionIds=t.competitionIds.map((function(t){return o.competition.shift()})))})),[2,t];case 2:return[2,t]}}))}))},this.remapTemplateGroupMatchIds=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s;return i(this,(function(i){switch(i.label){case 0:if(!(t&&t.length>0))return[3,4];e=0,n=t,i.label=1;case 1:return e<n.length?(r=n[e]).filters.matchIds&&r.filters.matchIds.every((function(t){return t}))&&r.filters.matchIds.length>0?(a={match:Array.from(r.filters.matchIds)},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(a,"native",this.idMappingService.idSchema)]):[3,3]:[3,4];case 2:s=i.sent(),r.filters.matchIds=Array.from(s.match),i.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},this.addProfileModelToLeaderboard=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t.length>0?(e=[],(n=t.map((function(t){return t.profileId}))).length?[4,this.profileNamespace.getByIds(n)]:[2,t]):[3,2];case 1:return r=i.sent(),t.forEach((function(t){r.forEach((function(e){e.id===t.profileId&&(delete e.interests,t.profileModel=e)})),t.profileModel||(t.profileModel=null),e.push(t)})),[2,e];case 2:return[2,t]}}))}))},this.buildOldClientBadges=function(t){var n=new w.default;return n.general=e.extractEnabledBadgesId(t.general),n.predictor=e.extractEnabledBadgesId(t.predictor),n.topX=e.extractEnabledBadgesId(t.topX),n.matchQuiz=e.extractEnabledBadgesId(t.matchQuiz),n},this.buildNewClientBadges=function(t){var n=new E.default;return n.predictor=e.extractEnabledBadgesId(t.predictor),n.topX=e.extractEnabledBadgesId(t.topX),n.matchQuiz=e.extractEnabledBadgesId(t.matchQuiz),n.games=e.extractEnabledBadgesId(t.games),n.football=e.extractEnabledBadgesId(t.football),n.classicQuizzes=e.extractEnabledBadgesId(t.classicQuizzes),n.eitherOr=e.extractEnabledBadgesId(t.eitherOr),n.discussions=e.extractEnabledBadgesId(t.discussions),n.potm=e.extractEnabledBadgesId(t.voting.potm),n.poll=e.extractEnabledBadgesId(t.voting.poll),n},this.initFilters=function(t,e){switch(e){case"loyalty":t&&(t=new M.default(t));break;case"rankings":t&&(t=new O.default(t));break;case"league_leaderboard":t&&(t=new I.default(t))}return t},this.addProfileModelToHighestSuccessRate=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=t.map((function(t){return t.profileId}))).length?[4,this.profileNamespace.getByIds(e)]:[2,t];case 1:return n=r.sent(),[2,t.map((function(t){return n.forEach((function(e){e.id===t.profileId&&(delete e.interests,t.profileModel=e)})),t}))]}}))}))},this.extractRankingsIdsMap=function(t){var e=[],n=[],r=[];return t.forEach((function(t){"GAME"===t.rankType&&"TOP_X"===t.gameType?e.push(t.id):"GAME"===t.rankType&&"MATCH_QUIZ"===t.gameType?n.push(t.id):"TEMPLATE"===t.rankType&&r.push(t.id)})),[e,n,r]},this.setModelsForUserRankings=function(t,e,n,r){return r.data.forEach((function(r){"MATCH_QUIZ"===r.gameType&&e?r.model=e.filter((function(t){return t.id===r.id}))[0]:"TOP_X"===r.gameType&&t?r.model=t.filter((function(t){return t.id===r.id}))[0]:"TEMPLATE"===r.rankType&&n&&(r.model=n.filter((function(t){return t.id===r.id}))[0])})),r},this.completeContestWinners=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return t.userList&&t.userList.length?(e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)]):[3,2];case 1:n=r.sent(),t.userList.forEach((function(t){var e=n.filter((function(e){return e.id===t.profileId}))[0];delete e.interests,t.profileModel=e})),r.label=2;case 2:return[2,t]}}))}))},this.validateEntitiesFollowsFilters=function(t){if(!t||!(t.footballCompetitions&&t.footballCompetitions.length||t.footballTeams&&t.footballTeams.length||t.footballPlayers&&t.footballPlayers.length)){if("default"===e.errorHandlingMode)throw new c.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_FILTERS,h.ErrorMessages.ENTITIES_NEEDED);throw new d.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_FILTERS,h.ErrorMessages.ENTITIES_NEEDED)}if(t.footballCompetitions&&t.footballCompetitions.length>24||t.footballTeams&&t.footballTeams.length>24||t.footballPlayers&&t.footballPlayers.length>24){if("default"===e.errorHandlingMode)throw new c.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.EXCEEDED_LENGTH,h.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED);throw new d.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.EXCEEDED_LENGTH,h.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED)}},this.remapEntitiesFollowsFilters=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:return e=JSON.parse(JSON.stringify(t)),n={},r={},e.footballCompetitions&&e.footballCompetitions.length&&(r.competition=e.footballCompetitions),e.footballTeams&&e.footballTeams.length&&(r.team=e.footballTeams),e.footballPlayers&&e.footballPlayers.length&&(r.player=e.footballPlayers),[4,this.idMappingService.idMappingFacade.getEntitiesByIds(r,this.idMappingService.idSchema,o.IdSchemaEnum.NATIVE)];case 1:return a=i.sent(),Object.keys(a).forEach((function(t){"competition"===t?n.footballCompetitions=a[t]:"team"===t?n.footballTeams=a[t]:"player"===t&&(n.footballPlayers=a[t])})),[2,n]}}))}))},this.addModelsToEntitiesFollows=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s,o,u,l,c;return i(this,(function(i){switch(i.label){case 0:return e=[],n="fb:c:",r=new Map,a=[],s="fb:t:",o=new Map,u=[],l="fb:p:",c=null,t.breakdown.forEach((function(t){t.id.includes(n)?e.push(t.id):t.id.includes(s)?a.push(t.id):t.id.includes(l)&&u.push(t.id)})),e.length?[4,this.footballNamespace.footballFacade.competitionsFacade.getCompetitionsMapWithNativeIds(e)]:[3,2];case 1:r=i.sent(),i.label=2;case 2:return a.length?[4,this.footballNamespace.footballFacade.teamsFacade.getTeamsMapWithNativeIds(a)]:[3,4];case 3:o=i.sent(),i.label=4;case 4:return u.length?[4,this.footballNamespace.footballFacade.playerFacade.getPlayersMapWithNativeIds(u)]:[3,6];case 5:c=i.sent(),i.label=6;case 6:return t.breakdown.forEach((function(t){t.id.includes(n)?(t.model=r.get(t.id),t.id=t.model.id):t.id.includes(s)?(t.model=o.get(t.id),t.id=t.model.id):t.id.includes(l)&&(t.model=c[t.id],t.id=t.model.id)})),[2,t]}}))}))},this.getMatchIdsFromGamesInTemplates=function(t,n){return r(e,void 0,void 0,(function(){var e,r,s,o,u,l,c,d,h,p,m,v,_,y,g,b,w,E,I,M=this;return i(this,(function(i){switch(i.label){case 0:if(!(t&&t.length>0))return[3,12];if(e=(0,f.limitIds)(t,100),r=[],!n||1!==n.length)return[3,8];if(!n.includes("TOP_X"))return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,Promise.all(e.map((function(t){return M.topXFacade.getGamesNoRemap({gameIds:t,limit:t.length},!0)})))];case 2:return u=i.sent(),r=u.reduce((function(t,e){return a(a([],t,!0),e.data,!0)}),[]),[3,4];case 3:throw s=i.sent(),console.error("There was a problem fetching match IDs from Top X games",s),s;case 4:if(!n.includes("MATCH_QUIZ"))return[3,8];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,Promise.all(e.map((function(t){return M.matchQuizFacade.getGamesNoRemap({gameIds:t,limit:t.length},!0)})))];case 6:return u=i.sent(),r=u.reduce((function(t,e){return a(a([],t,!0),e.data,!0)}),[]),[3,8];case 7:throw o=i.sent(),console.error("There was a problem fetching match IDs from Match Quiz games",o),o;case 8:return i.trys.push([8,10,,11]),[4,Promise.all(e.map((function(t){var e=M.topXFacade.getGamesNoRemap({gameIds:t,limit:t.length},!0),n=M.matchQuizFacade.getGamesNoRemap({gameIds:t,limit:t.length},!0);return Promise.all([e,n])})))];case 9:return u=i.sent(),r=u.reduce((function(t,e){var n=e[0],r=e[1];return a(a(a([],t,!0),n.data,!0),r.data,!0)}),[]),[3,11];case 10:throw l=i.sent(),console.error("There was a problem fetching match IDs from both Top X and Match Quiz games",l),l;case 11:return c=new Set,r.forEach((function(t){t.fixtures.map((function(t){return t.match_id})).forEach((function(t){return c.add(t)}))})),[2,Array.from(c)];case 12:d=[],h=100,i.label=13;case 13:i.trys.push([13,22,,23]),p=0,m=n,i.label=14;case 14:if(!(p<m.length))return[3,21];v=m[p],_=!0,y="",g=0,i.label=15;case 15:return _?(b=void 0,w={limit:h,startAfter:y},"TOP_X"!==v?[3,17]:[4,this.topXFacade.getGamesNoRemap(w,!0)]):[3,20];case 16:return b=i.sent(),d=a(a([],d,!0),b.data,!0),y=b.meta.pagination.next_page_starts_after||null,[3,19];case 17:return"MATCH_QUIZ"!==v?[3,19]:[4,this.matchQuizFacade.getGamesNoRemap(w,!0)];case 18:b=i.sent(),d=a(a([],d,!0),b.data,!0),y=b.meta.pagination.next_page_starts_after||null,i.label=19;case 19:return _=!!y,++g>=5&&(_=!1),[3,15];case 20:return p++,[3,14];case 21:return E=new Set,d.forEach((function(t){t.fixtures.map((function(t){return t.match_id})).forEach((function(t){return E.add(t)}))})),[2,Array.from(E)];case 22:throw I=i.sent(),console.error("There was a problem fetching match IDs from games",I),I;case 23:return[2]}}))}))},this.initMatchFiltersForTemplates=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,s,o,f,p,m;return i(this,(function(i){switch(i.label){case 0:return e=[],r=[],a=[],s=t.fromDate?this.reformatDate(t.fromDate):null,o=t.toDate?this.reformatDate(t.toDate,!0):null,f=500,t.competitionIds&&t.competitionIds.length>0&&(e=Array.from(t.competitionIds)),t.teamIds&&t.teamIds.length>0&&(r=Array.from(t.teamIds)),t.matchIds&&t.matchIds.length>0&&(a=Array.from(t.matchIds)),t.gameIds&&t.gameIds.length>0||t.gameTypes&&t.gameTypes.length>0?[4,this.getMatchIdsFromGamesInTemplates(t.gameIds,t.gameTypes)]:[3,2];case 1:a=i.sent(),i.label=2;case 2:if(n){if(!(p=t.groups.find((function(t){return t.groupId===n})))){if("default"===this.errorHandlingMode)throw new c.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_TEMPLATE_GROUP_ID,h.ErrorMessages.INVALID_TEMPLATE_GROUP_ID);throw new d.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_TEMPLATE_GROUP_ID,h.ErrorMessages.INVALID_TEMPLATE_GROUP_ID)}if(!p.filters){if("default"===this.errorHandlingMode)throw new c.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_TEMPLATE_GROUP_FILTERS,h.ErrorMessages.INVALID_TEMPLATE_GROUP_FILTERS);throw new d.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_TEMPLATE_GROUP_FILTERS,h.ErrorMessages.INVALID_TEMPLATE_GROUP_FILTERS)}s=p.filters.fromDate?this.reformatDate(p.filters.fromDate):null,o=p.filters.toDate?this.reformatDate(p.filters.toDate,!0):null,m=p.filters.matchIds.every((function(t){return t})),p.filters.matchIds.length>0&&m&&(a=Array.from(p.filters.matchIds))}return[2,new v.default({competitionIds:e,teamIds:r,matchIds:a,fromDate:s,toDate:o,limit:f})]}}))}))},this.reformatDate=function(t,e){var n=new Date(t);e&&n.setUTCHours(23,59,59);var r=n.toISOString();return r.slice(0,-5)+"Z"},this.extractEnabledBadgesId=function(t){var e=[];return t.forEach((function(t){t.enabled&&e.push(t.id)})),e},this.addEntityModelToFootballBadges=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s,o,u,l,c,d,f,h=this;return i(this,(function(i){switch(i.label){case 0:return e=[],n=[],r=[],a=[],t.football&&t.football.length>0&&(e=t.football.filter((function(t){return"competition"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),n=t.football.filter((function(t){return"team"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),r=t.football.filter((function(t){return"player"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),a=t.football.filter((function(t){return"match"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId}))),t.voting&&t.voting.poll&&t.voting.poll.length>0&&(s=this.extractEntityIdsFromBadges(t.voting.poll),u=s[0],l=s[1],c=s[2],d=s[3],e=e.concat(u),e=Array.from(new Set(e)),n=n.concat(l),n=Array.from(new Set(n)),r=r.concat(c),r=Array.from(new Set(r)),a=a.concat(d),a=Array.from(new Set(a))),t.voting&&t.voting.potm&&t.voting.potm.length>0&&(o=this.extractEntityIdsFromBadges(t.voting.potm),u=o[0],l=o[1],c=o[2],d=o[3],e=e.concat(u),e=Array.from(new Set(e)),n=n.concat(l),n=Array.from(new Set(n)),r=r.concat(c),r=Array.from(new Set(r)),a=a.concat(d),a=Array.from(new Set(a))),[4,this.fetchFootballEntities(e,n,r,a)];case 1:return f=i.sent(),t.football&&t.football.length>0&&t.football.forEach((function(t){h.setEntityModelsFromMap(t.requirements,"competition",f.competitions),h.setEntityModelsFromMap(t.requirements,"team",f.teams),h.setEntityModelsFromObject(t.requirements,"player",f.players),h.setEntityModelsFromObject(t.requirements,"match",f.matches)})),t.voting&&t.voting.poll&&t.voting.poll.length>0&&t.voting.poll.forEach((function(t){h.setEntityModelsFromMap(t.requirements,"competition",f.competitions),h.setEntityModelsFromMap(t.requirements,"team",f.teams),h.setEntityModelsFromObject(t.requirements,"player",f.players),h.setEntityModelsFromObject(t.requirements,"match",f.matches)})),t.voting&&t.voting.potm&&t.voting.potm.length>0&&t.voting.potm.forEach((function(t){h.setEntityModelsFromMap(t.requirements,"competition",f.competitions),h.setEntityModelsFromMap(t.requirements,"team",f.teams),h.setEntityModelsFromObject(t.requirements,"player",f.players),h.setEntityModelsFromObject(t.requirements,"match",f.matches)})),[2]}}))}))},this.setEntityModelsFromMap=function(t,e,n){t.entityType===e&&(t.entityModel=n&&n.get(t.entityId)||null,t.entityModel&&(t.entityId=t.entityModel.id))},this.setEntityModelsFromObject=function(t,e,n){t.entityType===e&&(t.entityModel=n[t.entityId]?n[t.entityId]:null,t.entityModel&&(t.entityId=t.entityModel.id))},this.fetchFootballEntities=function(t,n,a,s){return r(e,void 0,void 0,(function(){var e,r,o,u,l;return i(this,(function(i){switch(i.label){case 0:return e={competitions:null,teams:null,players:null,matches:null},t.length?[4,this.footballNamespace.footballFacade.getCompetitionsMapWithNativeIds(t)]:[3,2];case 1:r=i.sent(),e.competitions=r,i.label=2;case 2:return n.length?[4,this.footballNamespace.footballFacade.getTeamsMapWithNativeIds(n)]:[3,4];case 3:o=i.sent(),e.teams=o,i.label=4;case 4:return a.length?[4,this.footballNamespace.footballFacade.getPlayersMapWithNativeIds(a)]:[3,6];case 5:u=i.sent(),e.players=u,i.label=6;case 6:return s.length?[4,this.footballNamespace.footballFacade.getMatchesMapWithNativeIds(s)]:[3,8];case 7:l=i.sent(),e.matches=l,i.label=8;case 8:return[2,e]}}))}))},this.extractEntityIdsFromBadges=function(t){return[t.filter((function(t){return t.requirements.entityType&&"competition"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),t.filter((function(t){return t.requirements.entityType&&"team"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),t.filter((function(t){return t.requirements.entityType&&"player"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),t.filter((function(t){return t.requirements.entityType&&"match"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId}))]},this.addGameModelToGamesBadges=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s;return i(this,(function(i){switch(i.label){case 0:return t.games&&0!==t.games.length?(e=this.getGameIdsFromGamesBadge(t.games,"top_x"),n=this.getGameIdsFromGamesBadge(t.games,"match_quiz"),r=this.getGameIdsFromGamesBadge(t.games,"classic_quiz"),a=this.getGameIdsFromGamesBadge(t.games,"either_or"),[4,this.fetchGamesEntities(e,n,r,a)]):[2];case 1:return s=i.sent(),t.games.forEach((function(t){t.requirements.specificGames&&t.requirements.specificGames.forEach((function(t){t.gameModel=s.find((function(e){return e.id===t.gameId}))||null}))})),[2]}}))}))},this.getGameIdsFromGamesBadge=function(t,e){var n=t.filter((function(t){return!!t.requirements.specificGames&&t.requirements.specificGames.some((function(t){return t.gameType.toLocaleLowerCase()===e}))})).map((function(t){return t.requirements.specificGames.map((function(t){return t.gameId}))}));return Array.prototype.concat.apply([],n)},this.fetchGamesEntities=function(t,n,s,o){return r(e,void 0,void 0,(function(){var e,r,u,l,c;return i(this,(function(i){switch(i.label){case 0:return e=[],t.length?[4,this.topXFacade.getGames({gameIds:t})]:[3,2];case 1:r=i.sent(),e=a(a([],e,!0),r.data,!0),i.label=2;case 2:return n.length?[4,this.matchQuizFacade.getGames({gameIds:n})]:[3,4];case 3:u=i.sent(),e=a(a([],e,!0),u.data,!0),i.label=4;case 4:return s.length?[4,this.miniGamesNamespace.getClassicQuizzes({classicQuizIds:s})]:[3,6];case 5:l=i.sent(),e=a(a([],e,!0),l.data,!0),i.label=6;case 6:return o.length?[4,this.miniGamesNamespace.getEitherOrs({eitherOrIds:o})]:[3,8];case 7:c=i.sent(),e=a(a([],e,!0),c.data,!0),i.label=8;case 8:return[2,e]}}))}))},this.idMappingService=new p.default(t),this.profileNamespace=new g.default(t),this.footballNamespace=new m.default(t),this.topXFacade=new b.default(t),this.matchQuizFacade=new _.default(t),this.miniGamesNamespace=new y.default(t),this.errorHandlingMode=t.errorHandlingMode}},31139:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(4021),a=n(94904),s=r(n(68097)),o=r(n(62535)),u=n(5318),l=n(27974);e.default=function(){var t=this;this.validate=function(e,n){e.market&&t.validateMarket(e.market,n),e.fromDate&&t.validateDate(e.fromDate,"fromDate",n),e.toDate&&t.validateDate(e.toDate,"toDate",n),e.usersCount&&t.validateNumberFilters(e.usersCount,"usersCount",n),e.minimumPredictions&&t.validateNumberFilters(e.minimumPredictions,"minimumPredictions",n)},this.validateMarket=function(t,e){if(!Object.keys(l.MarketEnum).includes(t)){var n=(0,u.invalidMarketMessage)(t);if("default"===e)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_MARKET,n);throw new o.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_MARKET,n)}},this.validateDate=function(t,e,n){if("string"!=typeof t){if("default"===n)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_TYPE+"string for ".concat(e," filter"));throw new o.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_TYPE+"string for ".concat(e," filter"))}if(!/^\d{4}-\d{2}-\d{2}$/.test(t)){if("default"===n)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_VALUE+"YYYY-MM-DD for ".concat(e));throw new o.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_VALUE+"YYYY-MM-DD for ".concat(e))}},this.validateNumberFilters=function(t,e,n){var r="usersCount"===e?1:0,l="usersCount"===e?1e3:1e6;if("number"!=typeof t){if("default"===n)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_TYPE+"number for ".concat(e," filter"));throw new o.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_TYPE+"number for ".concat(e," filter"))}if(t<r||t>l){if("default"===n)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_VALUE+"between ".concat(r," and ").concat(l));throw new o.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_VALUE+"between ".concat(r," and ").concat(l))}}}},81859:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(14946),c=u(n(81553)),d=a(n(47686)),f=u(n(52793)),h=u(n(88900)),p=u(n(81732)),m=u(n(97782)),v=u(n(25013)),_=n(40853),y=u(n(7299)),g=u(n(12310)),b=u(n(64800)),w=u(n(68097)),E=n(4021),I=n(94904),M=n(5318),O=u(n(62535));e.default=function(t){var e=this;this.predictorHttps=null,this.predictorService=null,this.idMapping=null,this.clientHttps=null,this.predictorValidator=null,this.errorHandlingMode=null,this.getConfig=function(){return s(e,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(d.FeatureConfigEnum.MATCH_QUIZ)];case 1:return t=e.sent(),this.idMapping.idSchema===l.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.play=function(t){return s(e,void 0,void 0,(function(){var e,n,r,i,a,s=this;return o(this,(function(o){switch(o.label){case 0:return t=this.predictorValidator.validateBodyFields("MATCH_QUIZ",t),(e=t.fixtures.map((function(t){return s.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value,t.prediction.playerId)})))&&e.length?this.idMapping.idSchema===l.IdSchemaEnum.NATIVE?[3,4]:(n=[],r=[],e.forEach((function(t){n.push(t.matchId),t instanceof p.default&&t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&r.push(t.prediction.playerId)})),[4,this.predictorService.remapMatchIdToNative(n)]):[3,4];case 1:return i=o.sent(),a={},r&&r.length>0?[4,this.predictorService.remapPlayerIdMapToNative(r)]:[3,3];case 2:a=o.sent(),o.label=3;case 3:e.forEach((function(t,e){t.matchId=i[e],t instanceof p.default&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=a[t.prediction.playerId])})),o.label=4;case 4:return t.fixtures=e,[4,this.predictorHttps.makeFootballPrediction(t)];case 5:return[2,o.sent()]}}))}))},this.delete=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("MATCH_QUIZ",t),[4,this.predictorHttps.getGames(e,n)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGamesNoRemap=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("MATCH_QUIZ",t),[4,this.predictorHttps.getGamesNoRemap(e,n)];case 1:return[2,r.sent()]}}))}))},this.getGameById=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return n=n||!1,[4,this.predictorHttps.getGameById(t,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,n,r){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return r=r||!1,n&&(n.type&&delete n.type,n.status&&delete n.status,n=new m.default(n)),[4,this.predictorHttps.getGamePredictions(t,r,n)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,r){return s(e,void 0,void 0,(function(){var e;return o(this,(function(i){switch(i.label){case 0:return r=r||!1,n&&(n=new b.default(n)),[4,this.predictorHttps.getGameResults(t,r,n)];case 1:return e=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,i.sent()]}}))}))},this.getCurrentGameResults=function(t){return s(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return t=t||!1,(e=new y.default(null)).status=_.GameStatusEnum.OPEN,e.type="MATCH_QUIZ",[4,this.predictorHttps.getGames(e,t)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,t)];case 2:return[2,i.sent().data[0]]}}))}))},this.getMyGameEditions=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i,a,s,u;return o(this,(function(o){switch(o.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),n=n||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(e)];case 1:return(i=o.sent()).data.length>0?(i.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),a=(null==t?void 0:t.limit)?{limit:t.limit}:null,s=this.predictorService.initGameFilters("MATCH_QUIZ",a,r),[4,this.predictorHttps.getUserGameEditions(s,n)]):[3,4];case 2:return u=o.sent(),[4,this.predictorService.addPredictionProp(i,u)];case 3:return[2,o.sent()];case 4:return[2,new c.default]}}))}))},this.getMyGamePrediction=function(t){return s(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return e=new m.default({gameIds:[t]}),[4,this.predictorHttps.getMyPredictions(e)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(e){return e.gameInstanceId===t}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a,s,u,l;return o(this,(function(o){switch(o.label){case 0:return n&&n.limit&&this.validateLimitFilterOnGames(n.limit),r=r||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",n),i=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,e)];case 1:return(a=o.sent()).data.length>0?(a.data.forEach((function(t){t.game_instance_id&&i.push(t.game_instance_id)})),s=(null==n?void 0:n.limit)?{limit:n.limit}:null,u=this.predictorService.initGameFilters("MATCH_QUIZ",s,i),[4,this.predictorHttps.getUserGameEditions(u,r)]):[3,4];case 2:return l=o.sent(),[4,this.predictorService.addPredictionProp(a,l)];case 3:return[2,o.sent()];case 4:return[2,new c.default]}}))}))},this.getUserGamePrediction=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a;return o(this,(function(s){switch(s.label){case 0:return r=r||!1,e=new m.default({gameIds:[n]}),[4,this.predictorHttps.getUserPredictions(t,r,e)];case 1:return(i=s.sent()).data.length>0?[2,(a=i.data.filter((function(t){return t.gameInstanceId===n}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,n)];case 1:return e=r.sent(),[4,this.predictorService.completeGameMarketResults(e,"MATCH_QUIZ")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return[4,this.predictorHttps.getContestWinners(t,n)];case 1:return e=i.sent(),[4,this.getGameById(t)];case 2:return r=i.sent(),e.contestModel=r,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===e.errorHandlingMode&&t>50)throw new w.default(E.ErrorCodes.BAD_METHOD_CALL,I.ErrorStatuses.EXCEEDED_LENGTH,M.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===e.errorHandlingMode&&t>50)throw new O.default(E.ErrorCodes.BAD_METHOD_CALL,I.ErrorStatuses.EXCEEDED_LENGTH,M.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED)},this.predictorValidator=new g.default(t.errorHandlingMode),this.idMapping=new h.default(t),this.predictorHttps=new f.default(t),this.predictorService=new v.default(t,this.idMapping),this.clientHttps=new d.default(t),this.errorHandlingMode=t.errorHandlingMode}},50018:function(t,e){"use strict";var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.findLastGame=function(t){if(!Array.isArray(t)||0===t.length)return null;var e=t.filter((function(t){return"SETTLED"===t.status})).sort((function(t,e){return new Date(e.predictionsCutoff).getTime()-new Date(t.predictionsCutoff).getTime()}));if(e.length>0)return e[0];var n=new Date,r=t.filter((function(t){return new Date(t.predictionsCutoff)<n})).sort((function(t,e){return new Date(e.predictionsCutoff).getTime()-new Date(t.predictionsCutoff).getTime()}));return r.length>0?r[0]:null},this.findNextGame=function(e){if(!Array.isArray(e)||0===e.length)return null;var r=t.findCurrentGame(e);if(!r)return null;var i=n([],e,!0).sort((function(t,e){return new Date(t.predictionsCutoff).getTime()-new Date(e.predictionsCutoff).getTime()})),a=new Date(r.predictionsCutoff).getTime();return i.find((function(t){return new Date(t.predictionsCutoff).getTime()>a}))||null},this.findCurrentGame=function(t){if(!Array.isArray(t)||0===t.length)return null;var e=t.find((function(t){return"LIVE"===t.status}));if(e)return e;var n=t.find((function(t){return"OPEN"===t.status}));if(n)return n;var r=new Date;return t.filter((function(t){return new Date(t.predictionsCutoff)>r})).sort((function(t,e){return new Date(t.predictionsCutoff).getTime()-new Date(e.predictionsCutoff).getTime()}))[0]||null}}},40267:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(81859)),o=a(n(50018));e.default=function(t){var e=this;this.matchQuizFacade=null,this.helpers=new o.default,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.play(t)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGamePredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameResults(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getCurrentGameResults(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMyGameEditions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMyGamePrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getUserGameEditions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getUserGameEditions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getUserGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMarketsResultsForGame(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameWinners=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameWinners(t,n)];case 1:return[2,e.sent()]}}))}))},this.matchQuizFacade=new s.default(t)}},45765:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.clientId=null,this.defaultMarkets=null,this.competitionsWhitelist=null,this.authRequirement=null}},38410:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36899)),a=r(n(68042));e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new i.default,this.prediction=new a.default}},30670:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameId=null,this.results=null,this.tieBreakers=null}},87243:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(64916));e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.authRequirement=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new i.default,this.predictionId=null,this.participantsCount=0,this.related=[],this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.predictionsUpdatedAt=null,this.images=null,this.scheduleOpenAt=null,this.branding=null}},68042:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.target=null,this.playerId=null,this.playerModel=null,this.result=null}},86390:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=s(n(13022)),l=s(n(78261)),c=s(n(28107)),d=s(n(32261)),f=s(n(63069)),h=s(n(80425)),p=s(n(67050)),m=s(n(33404)),v=s(n(95403));e.default=function(t){var e=this;this.https=null,this.service=null,this.activityService=null,this.idSchema=null,this.getClassicQuizzes=function(t,n,r){return i(e,void 0,void 0,(function(){var e,i,s,u;return a(this,(function(a){switch(a.label){case 0:return t?(t=new c.default(t),[4,this.service.finalizeMiniGamesFilters(t)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[4,this.https.getClassicQuizzes(t,r)];case 3:return e=a.sent(),n?[4,this.service.setContextTagsModels(e.data)]:[3,5];case 4:return a.sent(),[3,9];case 5:i=0,s=e.data,a.label=6;case 6:return i<s.length?(u=s[i],[4,this.remapTags(u,o.IdSchemaEnum.NATIVE,this.idSchema)]):[3,9];case 7:a.sent(),a.label=8;case 8:return i++,[3,6];case 9:return[2,e]}}))}))},this.getClassicQuizById=function(t,n,r){return i(e,void 0,void 0,(function(){var e;return a(this,(function(i){switch(i.label){case 0:return[4,this.https.getClassicQuizById(t,n,r)];case 1:return e=i.sent(),[4,this.service.setContextTagsModels([e])];case 2:return i.sent(),[2,e]}}))}))},this.participateInClassicQuiz=function(t,n,r){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.https.participateInClassicQuiz(t,n,r)];case 1:return[2,e.sent()]}}))}))},this.getMyClassicQuizParticipations=function(t){return i(e,void 0,void 0,(function(){var e,n,i;return a(this,(function(a){switch(a.label){case 0:return t&&(t=new f.default(t)),[4,this.https.getMyClassicQuizParticipations(t)];case 1:return e=a.sent(),n=e.map((function(t){return t.classicQuizId})),[4,this.getClassicQuizzes({classicQuizIds:n})];case 2:return i=a.sent(),[2,e.map((function(t){var e=i.data.find((function(e){return e.id===t.classicQuizId}))||null;return r(r({},t),{classicQuizModel:e})}))]}}))}))},this.getLeaderboardForClassicQuizzes=function(t,n){return i(e,void 0,void 0,(function(){var e,r;return a(this,(function(i){switch(i.label){case 0:return t&&(t=new d.default(t)),[4,this.https.getLeaderboardForClassicQuizzes(t,n)];case 1:return e=i.sent(),r=e,[4,this.service.setProfileModelsForClassicQuizLeaderboards(e.data)];case 2:return r.data=i.sent(),[2,e]}}))}))},this.getClassicQuizzesUserRanking=function(t,n,s){return i(e,void 0,void 0,(function(){var e,i,o;return a(this,(function(a){switch(a.label){case 0:return n&&(n=new h.default(n)),[4,this.https.getClassicQuizzesUserRanking(t,n,s)];case 1:return e=a.sent(),i=e.data.map((function(t){return t.classicQuizId})),[4,this.getClassicQuizzes({classicQuizIds:i})];case 2:return o=a.sent(),e.data=e.data.map((function(t){var e=o.data.find((function(e){return e.id===t.classicQuizId}))||null;return r(r({},t),{classicQuizModel:e})})),[2,e]}}))}))},this.getClassicQuizQuestionsReport=function(t,n){return i(e,void 0,void 0,(function(){var e,r;return a(this,(function(i){switch(i.label){case 0:return n=n||!1,[4,this.https.getClassicQuizQuestionsReport(t)];case 1:return e=i.sent(),[4,this.getClassicQuizById(t,n,!0)];case 2:return r=i.sent(),[2,this.service.setQuestionModelsInQuestionsReport(e,r)]}}))}))},this.getClassicQuizResultsSummary=function(t,n){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.https.getClassicQuizResultsSummary(t,n)];case 1:return[2,e.sent()]}}))}))},this.getEitherOrs=function(t,n,r){return i(e,void 0,void 0,(function(){var e,i,s,u;return a(this,(function(a){switch(a.label){case 0:return t?(t=new p.default(t),[4,this.service.finalizeMiniGamesFilters(t)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[4,this.https.getEitherOrs(t,r)];case 3:return e=a.sent(),n?[4,this.service.setContextTagsModels(e.data)]:[3,5];case 4:return a.sent(),[3,9];case 5:i=0,s=e.data,a.label=6;case 6:return i<s.length?(u=s[i],[4,this.remapTags(u,o.IdSchemaEnum.NATIVE,this.idSchema)]):[3,9];case 7:a.sent(),a.label=8;case 8:return i++,[3,6];case 9:return[2,e]}}))}))},this.getEitherOrById=function(t,n){return i(e,void 0,void 0,(function(){var e;return a(this,(function(r){switch(r.label){case 0:return[4,this.https.getEitherOrById(t,n)];case 1:return e=r.sent(),[4,this.service.setContextTagsModels([e])];case 2:return r.sent(),[2,e]}}))}))},this.getMyEitherOrStats=function(t){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.https.getMyEitherOrStats(t)];case 1:return[2,e.sent()]}}))}))},this.getEitherOrResults=function(t,n){return i(e,void 0,void 0,(function(){var e;return a(this,(function(r){switch(r.label){case 0:return[4,this.https.getEitherOrResults(t,n)];case 1:return e=r.sent(),[4,this.service.setProfileModelsForEitherOrStandings(e)];case 2:return[2,r.sent()]}}))}))},this.participateInEitherOr=function(t,n,r){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return r?[3,2]:[4,this.service.defaultEitherOrParticipation(t,n)];case 1:case 3:return[2,e.sent()];case 2:return[4,this.service.handleEitherOrParticipationWithCallback(t,n,r)]}}))}))},this.calculateEitherOrResultPercentile=function(t,n){return i(e,void 0,void 0,(function(){var e,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:return null==n||isNaN(n)||n<0?[2,null]:0===n?[2,n]:[4,this.getEitherOrResults(t,!0)];case 1:for(e=a.sent(),r=e.breakdown.reduce((function(t,e){return t+e.totalUsers}),0),i=0,s=0,o=e.breakdown;s<o.length;s++)if(u=o[s],i+=u.totalUsers,n>=u.rangeStartInclusive&&n<=u.rangeEndInclusive)return[2,parseFloat((i/r*100).toFixed(1))];return[2,null]}}))}))},this.getPersonalityQuizzes=function(t,n,r){return i(e,void 0,void 0,(function(){var e,i,s,u;return a(this,(function(a){switch(a.label){case 0:return t?(t=new v.default(t),[4,this.service.finalizeMiniGamesFilters(t)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[4,this.https.getPersonalityQuizzes(t,r)];case 3:return e=a.sent(),n?[4,this.service.setContextTagsModels(e.data)]:[3,5];case 4:return a.sent(),[3,9];case 5:i=0,s=e.data,a.label=6;case 6:return i<s.length?(u=s[i],[4,this.remapTags(u,o.IdSchemaEnum.NATIVE,this.idSchema)]):[3,9];case 7:a.sent(),a.label=8;case 8:return i++,[3,6];case 9:return[2,e]}}))}))},this.getPersonalityQuizById=function(t,n){return i(e,void 0,void 0,(function(){var e;return a(this,(function(r){switch(r.label){case 0:return[4,this.https.getPersonalityQuizById(t,n)];case 1:return e=r.sent(),[4,this.service.setContextTagsModels([e])];case 2:return r.sent(),[2,e]}}))}))},this.participateInPersonalityQuiz=function(t,n){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.https.participateInPersonalityQuiz(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPersonalityQuizUserParticipation=function(t,n,r){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.https.getPersonalityQuizUserParticipation(t,n,r)];case 1:return[2,e.sent()]}}))}))},this.remapTags=function(t,n,r){return i(e,void 0,void 0,(function(){var e,i;return a(this,(function(a){switch(a.label){case 0:return this.idSchema!=o.IdSchemaEnum.NATIVE&&t.context&&t.context.tags&&t.context.tags.length?(e=JSON.parse(JSON.stringify(t.context.tags)),[4,this.activityService.remapTagsIds(e,n,r)]):[3,2];case 1:i=a.sent(),t.context.tags=i,a.label=2;case 2:return[2]}}))}))},this.https=new u.default(t),this.service=new m.default(t),this.activityService=new l.default(t),this.idSchema=t.idSchema}},91550:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(86390));e.default=function(t){var e=this;this.facade=null,this.getClassicQuizzes=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getClassicQuizzes(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getClassicQuizById=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getClassicQuizById(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.participateInClassicQuiz=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.participateInClassicQuiz(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMyClassicQuizParticipations=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyClassicQuizParticipations(t)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboardForClassicQuizzes=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getLeaderboardForClassicQuizzes(t,n)];case 1:return[2,e.sent()]}}))}))},this.getClassicQuizzesUserRanking=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getClassicQuizzesUserRanking(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getClassicQuizQuestionsReport=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getClassicQuizQuestionsReport(t,n)];case 1:return[2,e.sent()]}}))}))},this.getClassicQuizResultsSummary=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getClassicQuizResultsSummary(t,n)];case 1:return[2,e.sent()]}}))}))},this.getEitherOrs=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getEitherOrs(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getEitherOrById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getEitherOrById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyEitherOrStats=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyEitherOrStats(t)];case 1:return[2,e.sent()]}}))}))},this.getEitherOrResults=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getEitherOrResults(t,n)];case 1:return[2,e.sent()]}}))}))},this.participateInEitherOr=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.participateInEitherOr(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.calculateEitherOrResultPercentile=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.calculateEitherOrResultPercentile(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPersonalityQuizzes=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPersonalityQuizzes(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getPersonalityQuizById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPersonalityQuizById(t,n)];case 1:return[2,e.sent()]}}))}))},this.participateInPersonalityQuiz=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.participateInPersonalityQuiz(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPersonalityQuizUserParticipation=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPersonalityQuizUserParticipation(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},65985:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id=null,this.title=null,this.alternativeTitle=null,this.description=null,this.type=null,this.images=new i.default,this.participationCount=null,this.questionsCount=null,this.status=null,this.language=null,this.authRequirement=null,this.flags=null,this.customFields=null,this.labels=null,this.branding=null,this.related=[],this.time=null,this.points=null,this.scored=!1,this.maxAttempts=null,this.averageScore=null,this.perfectScore=null,this.adContent=null,this.context=null,this.createdAt=null,this.updatedAt=null}},28107:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.classicQuizIds=null,n.classicQuizIds=e&&e.classicQuizIds?e.classicQuizIds:null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.classicQuizIds&&this.classicQuizIds.length>0&&(e+="&classic_quiz_ids=".concat(this.classicQuizIds.join(","))),e},e}(a(n(96021)).default);e.default=s},96235:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rules=null,e.questions=[],e}return i(e,t),e}(a(n(65985)).default);e.default=s},41154:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.optionId=null,this.option=null,this.images=null,this.correct=null}},13142:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=0,this.optionId=0}},68944:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.classicQuizId=null,this.userId=null,this.questions=[],this.correctOptions=null,this.personalBest=null,this.points=null,this.attempts=null}},47763:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=null,this.optionId=null,this.correct=null,this.correctOptionId=null}},63069:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.classicQuizIds=null,n.classicQuizIds=(null==e?void 0:e.classicQuizIds)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.classicQuizIds&&this.classicQuizIds.length>0&&(e+="&classic_quiz_ids=".concat(this.classicQuizIds.join(","))),e},e}(a(n(64800)).default);e.default=s},20772:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=null,this.question=null,this.images=null,this.embedCode=null,this.explanation=null,this.options=[]}},81124:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.classicQuizId=null,this.classicQuizModel=null,this.correct=null,this.classicQuizQuestions=null,this.personalBest=null,this.points=null,this.answers=[],this.attempts=0}},85657:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},91717:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=null,this.questionModel=null,this.wrong=null,this.correct=null,this.skipped=null,this.total=null}},19657:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.classicQuizIds=null}},32261:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.classicQuizIds=null,n.classicQuizIds=(null==e?void 0:e.classicQuizIds)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.classicQuizIds&&this.classicQuizIds.length>0&&(e+="&classic_quiz_ids=".concat(this.classicQuizIds.join(","))),e},e}(a(n(80425)).default);e.default=s},12702:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(10155)),a=r(n(19657));e.default=function(){this.pagination=new i.default,this.filters=new a.default}},80425:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=null,this.page=null,this.limit=(null==t?void 0:t.limit)||null,this.page=(null==t?void 0:t.page)||null}return t.prototype.constructMainFiltersUrl=function(){var t="";return this.limit&&(t+="&limit=".concat(this.limit)),this.page&&(t+="&page=".concat(this.page)),t},t}();e.default=n},75563:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.profileId=null,this.profileModel=null,this.points=null}},38967:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.classicQuizId=null,this.classicQuizModel=null,this.points=null}},12723:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569));e.default=function(){this.meta=new i.default,this.data=[]}},43238:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(12702));e.default=function(){this.meta=new i.default,this.data=[]}},64274:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questions=null,this.correctAnswers=null}},69619:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id="",this.title="",this.alternativeTitle="",this.description="",this.images=new i.default,this.flags=[],this.status="",this.language="",this.authRequirement=null,this.winningCondition="",this.lives=0,this.time=0,this.points=[],this.customFields=null,this.branding=null,this.labels=null,this.adContent="",this.context=null,this.type="",this.related=[],this.totalParticipationsCount=0,this.totalUsersCount=0,this.finishedParticipationsCount=0,this.averageStartedParticipationsCount=0,this.averageFinishedParticipationsCount=0,this.createdAt="",this.updatedAt=""}},67050:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.eitherOrIds=null,n.eitherOrIds=e&&e.eitherOrIds?e.eitherOrIds:null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.eitherOrIds&&this.eitherOrIds.length>0&&(e+="&either_or_ids=".concat(this.eitherOrIds.join(","))),e},e}(a(n(96021)).default);e.default=s},3167:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rules="",e}return i(e,t),e}(a(n(69619)).default);e.default=s},69146:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.correctSteps=0,this.score=0}},15367:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.eitherOrId="",this.personalBest=0,this.betterThan=0}},11969:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},55021:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.instanceId="",this.eitherOrId="",this.gameStartedAt="",this.currentStep=0,this.currentStreak=0,this.remainingSteps=0,this.currentLives=0,this.currentPoints=0,this.personalBest=0,this.participationCount=0,this.finishedParticipationsCount=0,this.steps=[]}},70850:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.expired=!1,e.time=0,e}return i(e,t),e}(a(n(55990)).default);e.default=s},55990:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.pair="",this.answer=""}},12557:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(56140));e.default=function(){this.pairId="",this.userSelection="",this.correct=null,this.played=null,this.timestamp="",this.optionOne=new i.default,this.optionTwo=new i.default}},56140:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(55253));e.default=function(){this.id="",this.label="",this.images=new i.default,this.value=null}},12699:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.rangeStartInclusive=0,this.rangeEndInclusive=0,this.totalUsers=0}},8590:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.standings=[],this.breakdown=[]}},45289:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.userId="",this.userModel=null,this.personalBest=""}},96021:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.flags=null,n.status=null,n.entityIds=null,n.entityType=null,n.sort=null,n.groupByStatus=null,n.language=null,n.title=null,n.flags=e&&e.flags?e.flags:null,n.status=e&&e.status?e.status:null,n.entityIds=e&&e.entityIds?e.entityIds:null,n.entityType=e&&e.entityType?e.entityType:null,n.sort=e&&e.sort?e.sort:null,n.groupByStatus=e&&void 0!==e.groupByStatus?e.groupByStatus:null,n.language=e&&e.language?e.language:null,n.title=e&&e.title?e.title:null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.flags&&this.flags.length>0&&(e+="&flags=".concat(this.flags.join(","))),this.status&&(e+="&status=".concat(this.status)),this.entityIds&&this.entityIds.length>0&&(e+="&entity_ids=".concat(this.entityIds)),this.sort&&(e+="&sort=".concat(this.sort)),null!==this.groupByStatus&&(e+="&group_by_status=".concat(this.groupByStatus)),null!==this.language&&(e+="&language=".concat(this.language)),null!==this.title&&(e+="&title=".concat(this.title)),e},e}(a(n(64800)).default);e.default=s},55253:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},76282:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content=null,this.tags=[],this.campaign=null}},43323:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.model=null,this.source=null,this.type=null}},23648:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=0,this.optionId=0}},82682:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.personalityQuizId=null,this.userId=null,this.questions=[],this.personas=[],this.attempts=null}},94663:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=null,this.optionId=null}},73806:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.personaId=null,this.percent=null}},23130:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id=null,this.title=null,this.alternativeTitle=null,this.description=null,this.images=new i.default,this.participationCount=null,this.status=null,this.language=null,this.authRequirement=null,this.flags=null,this.customFields=null,this.labels=null,this.branding=null,this.related=[],this.time=null,this.maxAttempts=null,this.adContent=null,this.context=null,this.createdAt=null,this.updatedAt=null}},95403:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.personalityQuizIds=null,n.personalityQuizIds=e&&e.personalityQuizIds?e.personalityQuizIds:null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.personalityQuizIds&&this.personalityQuizIds.length>0&&(e+="&personality_quiz_ids=".concat(this.personalityQuizIds.join(","))),e},e}(a(n(96021)).default);e.default=s},65880:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rules=null,e.questions=[],e.personaResults=[],e}return i(e,t),e}(a(n(23130)).default);e.default=s},67283:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.optionId=null,this.option=null,this.images=null,this.personaPoints=[],this.preferenceMapping=[]}},65666:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.personaId=null,this.points=null}},48930:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=null,this.question=null,this.images=null,this.explanation=null,this.options=[]}},92314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.personaId=null,this.title=null,this.description=null,this.images=null}},53279:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},72239:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(18902)),o=a(n(65985)),u=a(n(96235)),l=a(n(20772)),c=a(n(41154)),d=a(n(68944)),f=a(n(47763)),h=a(n(81124)),p=a(n(76282)),m=a(n(43323)),v=a(n(16692)),_=a(n(12702)),y=a(n(10155)),g=a(n(19657)),b=a(n(75563)),w=a(n(38967)),E=a(n(91717)),I=a(n(64274)),M=a(n(78923)),O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapClassicQuizzes=function(t){return t.meta.pagination=e.remapMetaPagination(t.meta.pagination),t.data=t.data.map((function(t){return e.remapBasicClassicQuiz(t)})),t},e.remapClassicQuizById=function(t){var n=new u.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.participationCount=t.participation_count,n.questionsCount=t.questions_count,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.adContent=t.ad_content,n.rules=t.rules,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.points=t.points,n.related=t.related?e.remapRelated(t.related):[],n.scored=t.scored,n.maxAttempts=t.max_attempts,n.context=t.context?e.remapContext(t.context):t.context,n.averageScore=t.average_score,n.perfectScore=t.perfect_score,n.questions=t.questions.map((function(t){return e.remapQuestions(t)})),n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapClassicQuizParticipation=function(t){var n=new d.default;return n.classicQuizId=t.classic_quiz_id,n.userId=t.user_id,n.questions=t.questions?t.questions.map((function(t){return e.remapParticipationQuestions(t)})):null,n.correctOptions=t.correct_options,n.personalBest=t.personal_best,n.points=t.points,n.attempts=t.attempts,n},e.remapClassicQuizParticipationBody=function(t){return t.map((function(t){return{question_id:t.questionId,option_id:t.optionId}}))},e.remapUserClassicQuizParticipations=function(t){return t.map((function(t){var n=new h.default;return n.classicQuizId=t.classic_quiz_id,n.correct=t.correct,n.classicQuizQuestions=t.classic_quiz_questions,n.personalBest=t.personal_best,n.points=t.points,n.attempts=t.attempts,n.answers=t.answers?t.answers.map((function(t){return e.remapParticipationQuestions(t)})):t.answers,n}))},e.remapClassicQuizzesLeaderboard=function(t){return t.meta=e.remapClassicQuizLeaderboardMeta(t.meta),t.data=t.data.map((function(t){return e.remapClassicQuizLeaderboard(t)})),t},e.remapClassicQuizUserRankings=function(t){return t.meta.pagination=e.remapMetaPaginationRank(t.meta.pagination),t.data=t.data.map((function(t){return e.remapClassicQuizUserRanking(t)})),t},e.remapClassicQuizQuestionsReport=function(t){return t.map((function(t){var e=new E.default;return e.questionId=t.question_id,e.correct=t.correct,e.wrong=t.wrong,e.skipped=t.skipped,e.total=t.total,e}))},e.remapClassicQuizResultsSummary=function(t){return t.map((function(t){var e=new I.default;return e.questions=t.questions,e.correctAnswers=t.correct_answers,e}))},e.remapMetaPagination=function(t){var e=new s.default;return e.itemsPerPage=t.items_per_page,e.nextPageStartsAfter=t.next_page_starts_after,e},e.remapClassicQuizLeaderboardMeta=function(t){var n=new _.default;return n.pagination=e.remapMetaPaginationRank(t.pagination),n.filters=e.remapLeaderboardMetaFilters(t.filters),n},e.remapMetaPaginationRank=function(t){var e=new y.default;return e.currentPage=t.current_page,e.itemsPerPage=t.items_per_page,e.numberOfPages=t.number_of_pages,e.totalItems=t.total_items,e},e.remapLeaderboardMetaFilters=function(t){var e=new g.default;return e.classicQuizIds=(null==t?void 0:t.classic_quiz_ids)||null,e},e.remapClassicQuizUserRanking=function(t){var e=new w.default;return e.position=t.position,e.classicQuizId=t.classic_quiz_id,e.points=t.points,e},e.remapBasicClassicQuiz=function(t){var n=new o.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.participationCount=t.participation_count,n.questionsCount=t.questions_count,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.related=t.related?e.remapRelated(t.related):[],n.averageScore=t.average_score,n.perfectScore=t.perfect_score,n.points=t.points,n.scored=t.scored,n.maxAttempts=t.max_attempts,n.context=t.context?e.remapContext(t.context):t.context,n.adContent=t.ad_content,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapQuestions=function(t){var n=new l.default;return n.questionId=t.question_id,n.question=t.question,n.images=t.images,n.embedCode=t.embed_code,n.explanation=t.explanation,n.options=t.options.map((function(t){return e.remapOptions(t)})),n},e.remapOptions=function(t){var e=new c.default;return e.optionId=t.option_id,e.option=t.option,e.images=t.images,e.correct=t.correct,e},e.remapParticipationQuestions=function(t){var e=new f.default;return e.questionId=t.question_id,e.optionId=t.option_id,e.correct=t.correct,e.correctOptionId=t.correct_option_id,e},e.remapClassicQuizLeaderboard=function(t){var e=new b.default;return e.position=t.position,e.profileId=t.profile_id,e.points=t.points,e},e.remapContext=function(t){var e=new p.default;return e.content=t.content,e.tags=t.tags?t.tags.map((function(t){var e=new m.default;return e.id=t.id,e.type=t.type,e.source=t.source,e})):null,e.campaign=t.campaign,e},e.remapRelated=function(t){return t.map((function(t){var e=new M.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},e}return i(e,t),e}(v.default);e.default=O},44688:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(18902)),o=a(n(69619)),u=a(n(3167)),l=a(n(69146)),c=a(n(15367)),d=a(n(55021)),f=a(n(12557)),h=a(n(12699)),p=a(n(8590)),m=a(n(45289)),v=a(n(76282)),_=a(n(43323)),y=a(n(16692)),g=a(n(78923)),b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapEitherOrs=function(t){return t.meta.pagination=e.remapMetaPagination(t.meta.pagination),t.data=t.data.map((function(t){return e.remapBasicEitherOr(t)})),t},e.remapEitherOrById=function(t){var n=new u.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.winningCondition=t.winning_condition,n.lives=t.lives,n.flags=t.flags,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.related=t.related?e.remapRelated(t.related):[],n.context=t.context?e.remapContext(t.context):t.context,n.points=t.points?t.points.map((function(t){return e.remapPoints(t)})):t.points,n.rules=t.rules,n.adContent=t.ad_content,n.totalParticipationsCount=t.total_participations_count,n.totalUsersCount=t.total_users_count,n.finishedParticipationsCount=t.finished_participations_count,n.averageStartedParticipationsCount=t.average_started_participations_count,n.averageFinishedParticipationsCount=t.average_finished_participations_count,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapEitherOrOwnStats=function(t){var e=new c.default;return e.eitherOrId=t.either_or_id,e.personalBest=t.personal_best,e.betterThan=t.better_than,e},e.remapEitherOrResults=function(t){var n=new p.default;return n.standings=t.standings?t.standings.map((function(t){return e.remapResultsStandings(t)})):t.standings,n.breakdown=t.breakdown?t.breakdown.map((function(t){return e.remapResultsBreakdown(t)})):t.breakdown,n},e.remapEitherOrParticipation=function(t){var n=new d.default;return n.instanceId=t.instance_id,n.eitherOrId=t.either_or_id,n.gameStartedAt=t.game_started_at,n.currentStep=t.current_step,n.currentStreak=t.current_streak,n.remainingSteps=t.remaining_steps,n.currentLives=t.current_lives,n.currentPoints=t.current_points,n.personalBest=t.personal_best,n.participationCount=t.participation_count,n.finishedParticipationsCount=t.finished_participations_count,n.steps=t.steps?t.steps.map((function(t){return e.remapParticipationSteps(t)})):t.steps,n},e.remapBasicEitherOr=function(t){var n=new o.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.status=t.status,n.language=t.language,n.winningCondition=t.winning_condition,n.authRequirement=t.auth_requirement,n.lives=t.lives,n.flags=t.flags,n.related=t.related?e.remapRelated(t.related):[],n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.adContent=t.ad_content,n.context=t.context?e.remapContext(t.context):t.context,n.time=t.time,n.points=t.points?t.points.map((function(t){return e.remapPoints(t)})):t.points,n.totalParticipationsCount=t.total_participations_count,n.totalUsersCount=t.total_users_count,n.finishedParticipationsCount=t.finished_participations_count,n.averageStartedParticipationsCount=t.average_started_participations_count,n.averageFinishedParticipationsCount=t.average_finished_participations_count,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapMetaPagination=function(t){var e=new s.default;return e.itemsPerPage=t.items_per_page,e.nextPageStartsAfter=t.next_page_starts_after,e},e.remapPoints=function(t){var e=new l.default;return e.correctSteps=t.correct_steps,e.score=t.score,e},e.remapResultsStandings=function(t){var e=new m.default;return e.userId=t.user_id,e.personalBest=t.personal_best,e},e.remapResultsBreakdown=function(t){var e=new h.default;return e.rangeStartInclusive=t.range_start_inclusive,e.rangeEndInclusive=t.range_end_inclusive,e.totalUsers=t.total_users,e},e.remapParticipationSteps=function(t){var e=new f.default;return e.pairId=t.pair_id,e.userSelection=t.user_selection,e.correct=t.correct,e.played=t.played,e.timestamp=t.timestamp,e.optionOne=t.option_one,e.optionTwo=t.option_two,e},e.remapContext=function(t){var e=new v.default;return e.content=t.content,e.tags=t.tags?t.tags.map((function(t){var e=new _.default;return e.id=t.id,e.type=t.type,e.source=t.source,e})):null,e.campaign=t.campaign,e},e.remapRelated=function(t){return t.map((function(t){var e=new g.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},e}return i(e,t),e}(y.default);e.default=b},95783:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(18902)),o=a(n(76282)),u=a(n(43323)),l=a(n(16692)),c=a(n(78923)),d=a(n(65880)),f=a(n(92314)),h=a(n(48930)),p=a(n(67283)),m=a(n(55955)),v=a(n(65666)),_=a(n(23130)),y=a(n(82682)),g=a(n(94663)),b=a(n(73806)),w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapPersonalityQuizzes=function(t){return t.meta.pagination=e.remapMetaPagination(t.meta.pagination),t.data=t.data.map((function(t){return e.remapBasicPersonalityQuiz(t)})),t},e.remapPersonalityQuizById=function(t){var n=new d.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.images=t.images,n.participationCount=t.participation_count,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.adContent=t.ad_content,n.rules=t.rules||null,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.related=t.related?e.remapRelated(t.related):[],n.maxAttempts=t.max_attempts,n.context=t.context?e.remapContext(t.context):t.context,n.questions=t.questions?t.questions.map((function(t){return e.remapQuestions(t)})):[],n.personaResults=t.persona_results?t.persona_results.map((function(t){return e.remapPersonaResults(t)})):[],n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapPersonalityQuizParticipation=function(t){var n=new y.default;return n.personalityQuizId=t.personality_quiz_id,n.userId=t.user_id,n.questions=t.questions?e.remapParticipationQuestions(t.questions):[],n.personas=t.personas?e.remapParticipationPersonas(t.personas):[],n.attempts=t.attempts,n},e.remapParticipationQuestions=function(t){return t.map((function(t){var e=new g.default;return e.questionId=t.question_id,e.optionId=t.option_id,e}))},e.remapParticipationPersonas=function(t){return t.map((function(t){var e=new b.default;return e.personaId=t.persona_id,e.percent=t.percent,e}))},e.remapPersonalityQuizParticipationBody=function(t){return t.map((function(t){return{question_id:t.questionId,option_id:t.optionId}}))},e.remapPersonalityQuizUserParticipation=function(t){var n=new d.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.images=t.images,n.participationCount=t.participation_count,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.adContent=t.ad_content,n.rules=t.rules,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.related=t.related?e.remapRelated(t.related):[],n.maxAttempts=t.max_attempts,n.context=t.context?e.remapContext(t.context):t.context,n.questions=t.questions.map((function(t){return e.remapQuestions(t)})),n.personaResults=t.persona_results?t.persona_results.map((function(t){return e.remapPersonaResults(t)})):[],n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapMetaPagination=function(t){var e=new s.default;return e.itemsPerPage=t.items_per_page,e.nextPageStartsAfter=t.next_page_starts_after,e},e.remapBasicPersonalityQuiz=function(t){var n=new _.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.images=t.images,n.participationCount=t.participation_count,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.related=t.related?e.remapRelated(t.related):[],n.maxAttempts=t.max_attempts,n.context=t.context?e.remapContext(t.context):t.context,n.adContent=t.ad_content,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapPersonaResults=function(t){var e=new f.default;return e.personaId=t.persona_id,e.title=t.title,e.description=t.description,e.images=t.images,e},e.remapQuestions=function(t){var n=new h.default;return n.questionId=t.question_id,n.question=t.question,n.images=t.images,n.explanation=t.explanation,n.options=t.options.map((function(t){return e.remapOptions(t)})),n},e.remapOptions=function(t){var n=new p.default;return n.optionId=t.option_id,n.option=t.option,n.images=t.images,n.preferenceMapping=t.preference_mapping?e.remapPreferencesMapping(t.preference_mapping):[],n.personaPoints=t.persona_points?e.remapPersonaPoints(t.persona_points):[],n},e.remapPreferencesMapping=function(t){return t.map((function(t){var e=new m.default;return e.preferenceId=t.preference_id,e}))},e.remapPersonaPoints=function(t){return t.map((function(t){var e=new v.default;return e.personaId=t.persona_id,e.points=t.points,e}))},e.remapContext=function(t){var e=new o.default;return e.content=t.content,e.tags=t.tags?t.tags.map((function(t){var e=new u.default;return e.id=t.id,e.type=t.type,e.source=t.source,e})):null,e.campaign=t.campaign,e},e.remapRelated=function(t){return t.map((function(t){var e=new c.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},e}return i(e,t),e}(l.default);e.default=w},33404:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=s(n(13022)),l=s(n(88900)),c=s(n(48808)),d=s(n(86409)),f=s(n(70850)),h=s(n(19685));e.default=function(t){var e=this;this.idSchema=null,this.idMapping=null,this.validator=null,this.https=null,this.entityTypes=["competition","team","player"],this.profile=null,this.football=null,this.eitherOrTime=0,this.participationStartTimestamp=0,this.countdownTimer=0,this.intervalId=null,this.currentPairId="",this.finalizeMiniGamesFilters=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.idSchema!==o.IdSchemaEnum.NATIVE&&t.entityIds&&t.entityIds.length>0?(this.validator.validateFilters(t),[4,this.idMapping.getEntityIdsBySchemaId(Array.from(t.entityIds),t.entityType,o.IdSchemaEnum.NATIVE)]):[3,2];case 1:e=n.sent(),t.entityIds=e[t.entityType],n.label=2;case 2:return[2]}}))}))},this.setProfileModelsForEitherOrStandings=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=t.standings.map((function(t){return t.userId}))).length?[4,this.profile.getByIds(e)]:[2,t];case 1:return n=r.sent(),t.standings.forEach((function(t){return t.userModel=n.find((function(e){return e.id===t.userId}))||null})),[2,t]}}))}))},this.setProfileModelsForClassicQuizLeaderboards=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=t.map((function(t){return t.profileId}))).length?[4,this.profile.getByIds(e)]:[2,t];case 1:return n=r.sent(),t.forEach((function(t){return t.profileModel=n.find((function(e){return e.id===t.profileId}))||null})),[2,t]}}))}))},this.defaultEitherOrParticipation=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,s,o;return i(this,(function(i){switch(i.label){case 0:return this.eitherOrTime||n?[3,3]:[4,this.https.getEitherOrById(t,!0)];case 1:return r=i.sent(),this.eitherOrTime=r.time,[4,this.https.participateInEitherOr(t,null)];case 2:return s=i.sent(),this.participationStartTimestamp=Date.now(),[2,s];case 3:return e=0,this.participationStartTimestamp?[3,6]:this.eitherOrTime?[3,5]:[4,this.https.getEitherOrById(t,!0)];case 4:r=i.sent(),this.eitherOrTime=r.time,i.label=5;case 5:return e=this.eitherOrTime+1,[3,7];case 6:e=(Date.now()-this.participationStartTimestamp)/1e3,i.label=7;case 7:a=this.createNewParticipation(e,n),i.label=8;case 8:return i.trys.push([8,10,,11]),[4,this.https.participateInEitherOr(t,a)];case 9:return(s=i.sent()).currentLives&&s.remainingSteps?this.participationStartTimestamp=Date.now():this.resetDefaultParticipationTimers(),[2,s];case 10:throw o=i.sent(),this.resetDefaultParticipationTimers(),o;case 11:return[2]}}))}))},this.handleEitherOrParticipationWithCallback=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return n?[3,2]:[4,this.initialEitherOrParticipationWithCallback(t,a)];case 1:case 3:return[2,e.sent()];case 2:return[4,this.eitherOrParticipationWithCallback(t,n,a)]}}))}))},this.initialEitherOrParticipationWithCallback=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.https.getEitherOrById(t,!0)];case 1:return e=i.sent(),this.eitherOrTime=e.time,[4,this.https.participateInEitherOr(t,null)];case 2:return r=i.sent(),this.participationStartTimestamp=Date.now(),this.countdownTimer=this.eitherOrTime,this.setCurrentPairId(r),[4,this.handleEitherOrParticipationCallbackInterface(t,n)];case 3:return i.sent(),[2,r]}}))}))},this.eitherOrParticipationWithCallback=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return this.intervalId&&clearInterval(this.intervalId),e=0,this.participationStartTimestamp?[3,3]:this.eitherOrTime?[3,2]:[4,this.https.getEitherOrById(t,!0)];case 1:r=i.sent(),this.eitherOrTime=r.time,i.label=2;case 2:return e=this.eitherOrTime+1,[3,4];case 3:e=(Date.now()-this.participationStartTimestamp)/1e3,i.label=4;case 4:s=this.createNewParticipation(e,n),i.label=5;case 5:return i.trys.push([5,10,,11]),[4,this.https.participateInEitherOr(t,s)];case 6:return(o=i.sent()).currentLives&&o.remainingSteps?[3,7]:(this.resetCallbackParticipationTimers(),a.onElapsedResponse(o),clearInterval(this.intervalId),[3,9]);case 7:return this.participationStartTimestamp=Date.now(),this.countdownTimer=this.eitherOrTime,this.setCurrentPairId(o),[4,this.handleEitherOrParticipationCallbackInterface(t,a)];case 8:i.sent(),i.label=9;case 9:return[2,o];case 10:throw u=i.sent(),this.resetCallbackParticipationTimers(),clearInterval(this.intervalId),u;case 11:return[2]}}))}))},this.setCurrentPairId=function(t){e.currentPairId=t.steps.find((function(t){return!t.played})).pairId||""},this.handleEitherOrParticipationCallbackInterface=function(t,n){return r(e,void 0,void 0,(function(){var e=this;return i(this,(function(a){return this.intervalId=setInterval((function(){return r(e,void 0,void 0,(function(){var e,r,a,s;return i(this,(function(i){switch(i.label){case 0:return this.countdownTimer>0?(this.countdownTimer--,n.onTimerTick(this.countdownTimer),[3,3]):[3,1];case 1:return clearInterval(this.intervalId),e=(Date.now()-this.participationStartTimestamp)/1e3,r={pair:this.currentPairId,answer:this.currentPairId.split("_")[0]},a=this.createNewParticipation(e,r),[4,this.eitherOrParticipationWithCallback(t,a,n)];case 2:s=i.sent(),n.onElapsedResponse(s),i.label=3;case 3:return[2]}}))}))}),1e3),[2]}))}))},this.createNewParticipation=function(t,n){var r=new f.default;return r.expired=t>e.eitherOrTime,r.time=Number(t.toFixed(3)),r.pair=n.pair,r.answer=n.answer,r},this.resetCallbackParticipationTimers=function(){e.resetDefaultParticipationTimers(),e.countdownTimer=0,e.currentPairId=""},this.resetDefaultParticipationTimers=function(){e.eitherOrTime=0,e.participationStartTimestamp=0},this.setContextTagsModels=function(t){return r(e,void 0,void 0,(function(){var e,n,r=this;return i(this,(function(i){switch(i.label){case 0:return e={competitions:[],teams:[],players:[]},t.forEach((function(t){t.context&&t.context.tags&&t.context.tags.length>0&&(e.competitions=a(a([],e.competitions,!0),r.extractEntityIdsFromTags(t.context.tags,"competition"),!0),e.competitions=Array.from(new Set(e.competitions)),e.teams=a(a([],e.teams,!0),r.extractEntityIdsFromTags(t.context.tags,"team"),!0),e.teams=Array.from(new Set(e.teams)),e.players=a(a([],e.players,!0),r.extractEntityIdsFromTags(t.context.tags,"player"),!0),e.players=Array.from(new Set(e.players)))})),e.competitions.length?[4,this.football.footballFacade.getCompetitionsMapWithNativeIds(e.competitions)]:[3,2];case 1:n=i.sent(),this.setModelsForContextTags(t,n,"competition"),i.label=2;case 2:return e.teams.length?[4,this.football.footballFacade.getTeamsMapWithNativeIds(e.teams)]:[3,4];case 3:n=i.sent(),this.setModelsForContextTags(t,n,"team"),i.label=4;case 4:return e.players.length?[4,this.football.footballFacade.getPlayersMapWithNativeIds(e.players)]:[3,6];case 5:n=i.sent(),this.setModelsForContextTags(t,n,"player"),i.label=6;case 6:return[2]}}))}))},this.extractEntityIdsFromTags=function(t,e){return t.filter((function(t){return t.type===e})).map((function(t){return t.id}))},this.setModelsForContextTags=function(t,e,n){t.forEach((function(t){t.context&&t.context.tags&&t.context.tags.length>0&&t.context.tags.forEach((function(t){t.type===n&&(t.model="player"===n?e[t.id]:e.get(t.id),t.id=t.model.id)}))}))},this.setQuestionModelsInQuestionsReport=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){return[2,t.map((function(t){return t.questionModel=n.questions.find((function(e){return e.questionId.toString()===t.questionId})),t}))]}))}))},this.idSchema=t.idSchema,this.idMapping=new l.default(t),this.validator=new h.default(t),this.profile=new d.default(t),this.football=new c.default(t),this.https=new u.default(t)}},19685:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4021),o=n(94904),u=n(5318),l=function(t){function e(e){var n=t.call(this,e.errorHandlingMode)||this;return n.entityTypes=["competition","team","player"],n.validateFilters=function(t){(t.entityIds||t.entityType)&&(t.entityIds&&!t.entityType&&n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.FILTER_COMBINATION_ERROR),!t.entityIds&&t.entityType&&n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.FILTER_COMBINATION_ERROR),n.entityTypes.includes(t.entityType)||n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_ENTITY_TYPE))},n}return i(e,t),e}(a(n(16198)).default);e.default=l},77361:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(67900),o=a(n(16198)),u=a(n(47876)),l=a(n(88900)),c=a(n(69196));e.default=function(t){var e=this;this.idMapping=null,this.getByMatchIds=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,o,u,l;return i(this,(function(i){switch(i.label){case 0:return this.validateOddClient(),t&&Array.isArray(t)&&0!==t.length||this.validator.throwException(s.ErrorCodes.BAD_METHOD_CALL,s.ErrorStatuses.INVALID_MATCH_IDS,s.ErrorMessages.INVALID_MATCH_IDS),e=Array.from(t),this.idSchema===s.IdSchemaEnum.SPORTAL_365?[3,2]:[4,this.idMapping.idMappingFacade.getEntitiesByIds({match:Array.from(t)},this.idSchema,s.IdSchemaEnum.SPORTAL_365)];case 1:r=i.sent(),e=r.match,i.label=2;case 2:return a=new c.default(n),[4,this.https.getMatchOdds(e,a)];case 3:return o=i.sent(),this.idSchema===s.IdSchemaEnum.SPORTAL_365?[3,5]:[4,this.idMapping.idMappingFacade.getEntitiesByIdsMap({match:Array.from(o.keys())},s.IdSchemaEnum.SPORTAL_365,this.idSchema)];case 4:return u=i.sent(),l=new Map,Array.from(o.entries()).forEach((function(t){var e=t[0],n=t[1];l.set(u.get(e),n)})),[2,l];case 5:return[2,o]}}))}))},this.validateOddClient=function(){e.oddClient||e.validator.throwException(s.ErrorCodes.PRECONDITION_FAILED,s.ErrorStatuses.ODD_CLIENT_CONFIGURATION_NOT_FOUND,s.ErrorMessages.MISSING_ODD_CLIENT_CONFIGURATION)},this.idSchema=t.idSchema,this.oddClient=t.oddClient,this.https=new u.default(t),this.validator=new o.default(t.errorHandlingMode),this.idMapping=new l.default(t)}},20660:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.logo=null,this.type=null,this.transparentBackgroundUrl=null,this.backgroundColor=null}},98446:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.backgroundColor=null,this.textColor=null}},44875:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.appType=null,this.selectionTemplateUrl=null,this.eventTemplateUrl=null,this.homepageUrl=null}},37104:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.url=null,this.assets=[],this.links=[],this.branding=null,this.eventUrls=[],this.stakesDisclaimer=null,this.domainName=null}},48287:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.url=null,this.appType=null}},69196:(t,e)=>{"use strict";var n,r,i,a,s,o;Object.defineProperty(e,"__esModule",{value:!0}),e.MatchOddsMarketEnum=e.OddFormatEnum=e.ScopeTypeEnum=e.OddTypeEnum=void 0,function(t){t.PRE_EVENT="PRE_EVENT",t.LIVE="LIVE",t.ALL="ALL"}(r=e.OddTypeEnum||(e.OddTypeEnum={})),function(t){t.ORDINARY_TIME="ORDINARY_TIME",t.FULL_TIME="FULL_TIME"}(i=e.ScopeTypeEnum||(e.ScopeTypeEnum={})),function(t){t.DECIMAL="DECIMAL",t.MONEYLINE="MONEYLINE",t.FRACTIONAL="FRACTIONAL"}(a=e.OddFormatEnum||(e.OddFormatEnum={})),function(t){t.ONE_X_TWO="1x2",t.OVER_UNDER="OVER_UNDER",t.DOUBLE_CHANCE="DOUBLE_CHANCE",t.BOTH_TO_SCORE="BOTH_TO_SCORE",t.CORRECT_SCORE="CORRECT_SCORE",t.FIRST_HALF_AND_FINAL_RESULT="FIRST_HALF_AND_FINAL_RESULT",t.FIRST_PLAYER_TO_SCORE="FIRST_PLAYER_TO_SCORE",t.PLAYER_TO_SCORE_DURING_GAME="PLAYER_TO_SCORE_DURING_GAME",t.PLAYER_TO_RECEIVE_CARD="PLAYER_TO_RECEIVE_CARD"}(s||(s={})),function(t){t.FT_1X2="FT_1X2",t.DOUBLE_CHANCE="DOUBLE_CHANCE",t.HT_FT="HT_FT",t.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",t.CORRECT_SCORE="CORRECT_SCORE",t.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",t.PLAYER_SCORE="PLAYER_SCORE",t.PLAYER_RED_CARD="PLAYER_RED_CARD",t.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",t.OVER_GOALS_0_5="OVER_GOALS_0_5",t.OVER_GOALS_1_5="OVER_GOALS_1_5",t.OVER_GOALS_2_5="OVER_GOALS_2_5",t.OVER_GOALS_3_5="OVER_GOALS_3_5",t.OVER_GOALS_4_5="OVER_GOALS_4_5",t.OVER_GOALS_5_5="OVER_GOALS_5_5"}(o=e.MatchOddsMarketEnum||(e.MatchOddsMarketEnum={}));var u=((n={})[o.FT_1X2]=s.ONE_X_TWO,n[o.DOUBLE_CHANCE]=s.DOUBLE_CHANCE,n[o.HT_FT]=s.FIRST_HALF_AND_FINAL_RESULT,n[o.BOTH_TEAMS_SCORE]=s.BOTH_TO_SCORE,n[o.CORRECT_SCORE]=s.CORRECT_SCORE,n[o.PLAYER_SCORE_FIRST_GOAL]=s.FIRST_PLAYER_TO_SCORE,n[o.PLAYER_SCORE]=s.PLAYER_TO_SCORE_DURING_GAME,n[o.PLAYER_RED_CARD]=s.PLAYER_TO_RECEIVE_CARD,n[o.PLAYER_YELLOW_CARD]=s.PLAYER_TO_RECEIVE_CARD,n),l=function(){function t(t){this.oddType=r.PRE_EVENT,this.scopeType=i.ORDINARY_TIME,this.oddFormat=a.DECIMAL,this.marketTypes=[o.FT_1X2],this.validateFilters(t)}return t.prototype.constructFiltersUrl=function(){var t=this,e=this.marketTypes.map((function(e){return t.mapToSportal365Market(e)}));return"&odd_type=".concat(this.oddType,"&scope_type=").concat(this.scopeType,"&odd_format=").concat(this.oddFormat,"&market_types=").concat(e.join(","))},t.prototype.validateFilters=function(t){var e=Object.values(r),n=Object.values(i),s=Object.values(a),u=Object.values(o);(null==t?void 0:t.oddType)&&(e.includes(t.oddType)?this.oddType=t.oddType:console.warn('The filter "oddType" is NOT valid and therefore it will be set to PRE_EVENT. The VALID values are : '.concat(e.join(", ")))),(null==t?void 0:t.scopeType)&&(n.includes(t.scopeType)?this.scopeType=t.scopeType:console.warn('The filter "scopeType" is NOT valid and therefore it will be set to ORDINARY_TIME. The VALID values are : '.concat(n.join(", ")))),(null==t?void 0:t.oddFormat)&&(s.includes(t.oddFormat)?this.oddFormat=t.oddFormat:console.warn('The filter "oddFormat" is NOT valid and therefore it will be set to DECIMAL. The VALID values are : '.concat(s.join(", ")))),(null==t?void 0:t.marketTypes)&&Array.isArray(null==t?void 0:t.marketTypes)&&(null==t?void 0:t.marketTypes.length)>0&&(t.marketTypes.every((function(t){return u.includes(t)}))?this.marketTypes=t.marketTypes:console.warn('The filter "marketTypes" is NOT valid and therefore it will be set to FT_1X2. The VALID values are : '.concat(u.join(", "))))},t.prototype.mapToSportal365Market=function(t){return t.startsWith("OVER_GOALS_")?s.OVER_UNDER:u[t]},t}();e.default=l},62641:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.scope=null,this.selections=[]}},71115:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.type=null,this.name=null,this.entityType=null}},42218:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.code=null,this.value=null,this.odds=null,this.urls=[],this.movement=null,this.oddsOld=null,this.entityType=null,this.additionalInfo=null,this.providerInfo=null}},47951:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.code=null,this.entityType=null}},97935:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.selectionId=null,this.eventId=null,this.marketId=null,this.competitionId=null}},3002:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.bookmaker=null,this.type=null,this.markets=[]}},8077:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(20660)),a=r(n(98446)),s=r(n(37104)),o=r(n(48287)),u=r(n(62641)),l=r(n(71115)),c=r(n(42218)),d=r(n(47951)),f=r(n(97935)),h=r(n(3002)),p=function(){function t(){var t=this;this.remapMarketType=function(t){var e=new d.default;return e.id=t.id,e.name=t.name,e.code=t.code,e.entityType=t.entity_type,e},this.remapMarketScope=function(t){var e=new l.default;return e.id=t.id,e.name=t.name,e.type=t.type,e.entityType=t.entity_type,e},this.remapMarketSelections=function(e,n,r){var i=Array.from(e);return r.length>0&&"OVER_UNDER"===n&&(i=i.filter((function(t){return"over"===t.code&&r.some((function(e){switch(e){case"OVER_GOALS_0_5":return"0.5"===t.value;case"OVER_GOALS_1_5":return"1.5"===t.value;case"OVER_GOALS_2_5":return"2.5"===t.value;case"OVER_GOALS_3_5":return"3.5"===t.value;case"OVER_GOALS_4_5":return"4.5"===t.value;case"OVER_GOALS_5_5":return"5.5"===t.value;default:return!1}}))}))),i.map((function(e){var n=new c.default;return n.id=e.id,n.name=e.name,n.code=e.code,n.value=e.value,n.odds=e.odds,n.urls=e.urls?t.remapEventUrls(e.urls):[],n.movement=e.movement,n.oddsOld=e.odds_old,n.entityType=e.entity_type,n.additionalInfo=e.additional_info,n.providerInfo=e.provider_info?t.remapProviderInfo(e.provider_info):null,n}))},this.remapProviderInfo=function(t){var e=new f.default;return e.selectionId=t.selection_id,e.eventId=t.event_id,e.marketId=t.market_id,e.competitionId=t.competition_id,e}}return t.prototype.fromResponse=function(t,e){var n=this,r=new Map;return t.matches.forEach((function(t){var i=t.odds.map((function(t){var r=new h.default;return r.bookmaker=t.bookmaker?n.remapBookmaker(t.bookmaker):null,r.type=t.type,r.markets=t.markets?n.remapMarkets(t.markets,e):[],r}));r.set(t.id,i)})),r},t.prototype.remapBookmaker=function(t){var e=new s.default;return e.id=t.id,e.name=t.name,e.assets=t.assets?this.remapAssets(t.assets):[],e.links=t.links||[],e.branding=t.branding?this.remapBranding(t.branding):null,e.eventUrls=t.event_urls?this.remapEventUrls(t.event_urls):[],e.stakesDisclaimer=t.stakes_disclaimer,e.domainName=t.domain_name,e},t.prototype.remapMarkets=function(t,e){var n=this;return t.map((function(t){var r=new u.default;return r.type=t.type?n.remapMarketType(t.type):null,r.scope=t.scope?n.remapMarketScope(t.scope):null,r.selections=t.selections?n.remapMarketSelections(t.selections,r.type.code,e):[],r}))},t.prototype.remapEventUrls=function(t){return t.map((function(t){var e=new o.default;return e.url=t.url,e.appType=t.app_type,e}))},t.prototype.remapBranding=function(t){var e=new a.default;return e.backgroundColor=t.background_color,e.textColor=t.text_color,e},t.prototype.remapAssets=function(t){return t.map((function(t){var e=new i.default;return e.logo=t.logo,e.type=t.type,e.transparentBackgroundUrl=t.transparent_background_url,e.backgroundColor=t.background_color,e}))},t}();e.default=p},74168:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(77361));e.default=function(t){var e=this;this.getByMatchIds=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getByMatchIds(t,n)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},27974:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.playerMarketNobodyPrediction=e.endMarkMarkets=e.playerMarkets=e.MarketsOverCorners=e.MarketsOverGoals=e.MarketEnum=void 0,function(t){t.FT_1X2="FT_1X2",t.HT_1X2="HT_1X2",t.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",t.DOUBLE_CHANCE="DOUBLE_CHANCE",t.HT_FT="HT_FT",t.PLAYER_SCORE="PLAYER_SCORE",t.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",t.PLAYER_RED_CARD="PLAYER_RED_CARD",t.RED_CARD_MATCH="RED_CARD_MATCH",t.PENALTY_MATCH="PENALTY_MATCH",t.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",t.CORNERS_MATCH="CORNERS_MATCH",t.CORRECT_SCORE="CORRECT_SCORE",t.CORRECT_SCORE_ADVANCED="CORRECT_SCORE_ADVANCED",t.CORRECT_SCORE_HT="CORRECT_SCORE_HT",t.PLAYER_SCORE_HATTRICK="PLAYER_SCORE_HATTRICK",t.PLAYER_SCORE_TWICE="PLAYER_SCORE_TWICE",t.OVER_GOALS_0_5="OVER_GOALS_0_5",t.OVER_GOALS_1_5="OVER_GOALS_1_5",t.OVER_GOALS_2_5="OVER_GOALS_2_5",t.OVER_GOALS_3_5="OVER_GOALS_3_5",t.OVER_GOALS_4_5="OVER_GOALS_4_5",t.OVER_GOALS_5_5="OVER_GOALS_5_5",t.OVER_GOALS_6_5="OVER_GOALS_6_5",t.OVER_CORNERS_6_5="OVER_CORNERS_6_5",t.OVER_CORNERS_7_5="OVER_CORNERS_7_5",t.OVER_CORNERS_8_5="OVER_CORNERS_8_5",t.OVER_CORNERS_9_5="OVER_CORNERS_9_5",t.OVER_CORNERS_10_5="OVER_CORNERS_10_5",t.OVER_CORNERS_11_5="OVER_CORNERS_11_5",t.OVER_CORNERS_12_5="OVER_CORNERS_12_5",t.OVER_CORNERS_13_5="OVER_CORNERS_13_5"}(n=e.MarketEnum||(e.MarketEnum={})),e.MarketsOverGoals=[n.OVER_GOALS_0_5,n.OVER_GOALS_1_5,n.OVER_GOALS_2_5,n.OVER_GOALS_3_5,n.OVER_GOALS_4_5,n.OVER_GOALS_5_5,n.OVER_GOALS_6_5],e.MarketsOverCorners=[n.OVER_CORNERS_6_5,n.OVER_CORNERS_7_5,n.OVER_CORNERS_8_5,n.OVER_CORNERS_9_5,n.OVER_CORNERS_10_5,n.OVER_CORNERS_11_5,n.OVER_CORNERS_12_5,n.OVER_CORNERS_13_5],e.playerMarkets=[n.PLAYER_RED_CARD,n.PLAYER_SCORE,n.PLAYER_SCORE_FIRST_GOAL,n.PLAYER_SCORE_HATTRICK,n.PLAYER_SCORE_TWICE,n.PLAYER_YELLOW_CARD],e.endMarkMarkets=[n.FT_1X2,n.HT_1X2,n.HT_FT,n.DOUBLE_CHANCE,n.CORNERS_MATCH,n.CORRECT_SCORE,n.CORRECT_SCORE_HT,n.CORRECT_SCORE_ADVANCED],e.playerMarketNobodyPrediction=n.PLAYER_SCORE_FIRST_GOAL},51113:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeEnum=void 0,(n=e.OutcomeEnum||(e.OutcomeEnum={})).CORRECT="CORRECT",n.INCORRECT="INCORRECT",n.PARTIALLY_CORRECT="PARTIALLY_CORRECT",n.NOT_VERIFIED="NOT_VERIFIED"},66147:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.pastStatuses=e.StatusEnum=void 0,function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(n=e.StatusEnum||(e.StatusEnum={})),e.pastStatuses=[n.WON,n.LOST,n.PARTIALLY_WON,n.CANCELED]},1976:(t,e)=>{"use strict";var n,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.HalfTimeFullTimeEnum=e.DoubleChanceEnum=e.OneXTwoEnum=void 0,(i=e.OneXTwoEnum||(e.OneXTwoEnum={})).ONE="1",i.X="x",i.TWO="2",(r=e.DoubleChanceEnum||(e.DoubleChanceEnum={})).ONE_X="1x",r.X_TWO="x2",r.ONE_TWO="12",(n=e.HalfTimeFullTimeEnum||(e.HalfTimeFullTimeEnum={})).ONE_ONE="1/1",n.ONE_X="1/x",n.ONE_TWO="1/2",n.X_ONE="x/1",n.X_X="x/x",n.X_TWO="x/2",n.TWO_ONE="2/1",n.TWO_X="2/x",n.TWO_TWO="2/2"},62929:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=n(27974),l=n(47686),c=s(n(25013)),d=s(n(53950)),f=s(n(81732)),h=s(n(12310)),p=s(n(68097)),m=n(4021),v=n(94904),_=n(5318),y=s(n(62535));e.default=function(t,e,n,s){var g=this;this.predictorHttps=null,this.clientHttps=null,this.idMapping=null,this.predictorService=null,this.predictorValidator=null,this.errorHandlingMode=null,this.makeFootballPrediction=function(t,e,n,a){return r(g,void 0,void 0,(function(){var r,s,l,c,h,g,b;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorValidator.validateFixture(t,e,n,a),s=new d.default,this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,6]:(l=r.matchId,c="",[4,this.predictorService.remapMatchIdToNative([l])]);case 1:if(h=i.sent(),r.matchId=h[0],"default"===this.errorHandlingMode&&!r.matchId)throw new p.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.INVALID_FIELD,_.ErrorMessages.INVALID_MATCH_ID).errorMessage();if("standard"===this.errorHandlingMode&&!r.matchId)throw new y.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.INVALID_FIELD,_.ErrorMessages.INVALID_MATCH_ID);return r instanceof f.default&&"OWN_GOAL"!==r.prediction.playerId?r.prediction.playerId?(c=r.prediction.playerId,g=r.prediction,[4,this.predictorService.remapPlayerIdToNative([c])]):[3,3]:[3,4];case 2:g.playerId=i.sent(),i.label=3;case 3:if("default"===this.errorHandlingMode&&r.market!==u.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new p.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.INVALID_FIELD,_.ErrorMessages.INVALID_PLAYER_ID).errorMessage();if("standard"===this.errorHandlingMode&&r.market!==u.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new y.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.INVALID_FIELD,_.ErrorMessages.INVALID_PLAYER_ID);i.label=4;case 4:return s.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(s)];case 5:return(b=i.sent()).fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=c),t.matchId=l})),[2,b];case 6:return s.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(s)];case 7:return[2,i.sent()]}}))}))},this.getMatchSummary=function(t,e){return r(g,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return[4,this.getMatchSummaryBase(t,e)];case 1:return n=i.sent(),r=JSON.parse(JSON.stringify(n.predictions)),[4,this.predictorService.remapPlayerIdToIdSchema(r)];case 2:return a=i.sent(),n.predictions=a,[2,n]}}))}))},this.getMarketSummary=function(t,e,n,a){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.getMatchSummaryBase(t,a)];case 1:return r=i.sent(),[4,this.predictorService.getMarketSummary(r,e,n)];case 2:return[2,i.sent()];case 3:throw i.sent();case 4:return[2]}}))}))},this.getMatchSummaryBase=function(t,e){return r(g,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapMatchIdToNative([t])];case 1:return n=i.sent(),r=n[0],[4,this.predictorHttps.getMatchSummary(r,e)];case 2:return(a=i.sent()).matchId=t,[2,a];case 3:return[4,this.predictorHttps.getMatchSummary(t,e)];case 4:return[2,i.sent()]}}))}))},this.getConfig=function(){return r(g,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(l.FeatureConfigEnum.PREDICTOR)];case 1:return t=e.sent(),this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.deleteFootballPrediction=function(t){return r(g,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictions=function(t){return r(g,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"user"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPredictionsForMatches=function(t,e){return r(g,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new p.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,_.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new y.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,_.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED);return this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(a([],t,!0))];case 1:t=r.sent(),r.label=2;case 2:return n=this.predictorService.initPredictionsFilters(e,"matches",t),[4,this.predictorHttps.getMyPredictions(n)];case 3:return[2,r.sent()]}}))}))},this.getMyCurrentPredictions=function(t){return r(g,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"current"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPastPredictions=function(t){return r(g,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"past"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getUserPredictions=function(t,e,n){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"user"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserCurrentPredictions=function(t,e,n){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"current"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPastPredictions=function(t,e,n){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"past"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,e,n,s){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new p.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,_.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new y.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,_.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED);return this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(a([],e,!0))];case 1:e=i.sent(),i.label=2;case 2:return r=this.predictorService.initPredictionsFilters(n,"matches",e),[4,this.predictorHttps.getUserPredictions(t,s,r)];case 3:return[2,i.sent()]}}))}))},this.getPredictionById=function(t){return r(g,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.getPredictionById(t)];case 1:return[2,e.sent()]}}))}))},this.getPredictionsByIds=function(t){return r(g,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.getPredictionsByIds(t)];case 1:return[2,e.sent()]}}))}))},this.getMatchMarketsResults=function(t){return r(g,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative([t])];case 1:e=n.sent(),t=e[0],n.label=2;case 2:return[4,this.predictorService.getMatchMarketsResults(t)];case 3:return[2,n.sent()]}}))}))},this.predictorHttps=e,this.idMapping=s,this.clientHttps=n,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new h.default(t.errorHandlingMode),this.predictorService=new c.default(t,s)}},49297:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(38173));e.default=function(t){var e=this;this.validator=null,this.calculateOneXTwoFromScores=function(t){e.validator.validateMatchSummary(t);var n=t.predictions,i=n.correctScore,a=n.correctScoreAdvanced,s=r(r({},i),a),o=0,u=0,l=0,c=0;return Object.entries(s).forEach((function(t){var e=t[0],n=t[1];if(0!==n){var r=n;o+=r;var i=e.split(":").map(Number),a=i[0],s=i[1];a>s?u+=r:a===s?l+=r:c+=r}})),{home:o?Math.round(u/o*100):0,draw:o?Math.round(l/o*100):0,away:o?Math.round(c/o*100):0}},this.getTopCorrectScores=function(t){e.validator.validateMatchSummary(t);var n=t.predictions,i=n.correctScore,a=n.correctScoreAdvanced,s=r(r({},i),a),o=0;return Object.values(s).forEach((function(t){o+=t})),Object.entries(s).filter((function(t){return t[0],t[1]>0})).map((function(t){var e=t[0],n=t[1];return{score:e,percentage:Math.round(n/o*100)}})).sort((function(t,e){return e.percentage-t.percentage})).slice(0,3)},this.validator=new a.default(t)}},38173:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4021),o=n(94904),u=n(5318),l=function(t){function e(e){var n=t.call(this,e.errorHandlingMode)||this;return n.validateMatchSummary=function(t){t||n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_MATCH_SUMMARY,u.ErrorMessages.MATCH_SUMMARY_REQUIRED),t.predictions||n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_MATCH_SUMMARY_PREDICTIONS,u.ErrorMessages.MATCH_SUMMARY_PREDICTIONS_REQUIRED),t.predictions.correctScore&&t.predictions.correctScoreAdvanced||n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS,u.ErrorMessages.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS+"correctScore and correctScoreAdvanced")},n}return i(e,t),e}(a(n(16198)).default);e.default=l},60704:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(33949)),a=r(n(18543)),s=r(n(51429)),o=r(n(50515)),u=r(n(4187)),l=r(n(94226)),c=r(n(45765)),d=r(n(91180)),f=r(n(58452)),h=r(n(28824)),p=r(n(49750)),m=r(n(95793)),v=r(n(68699)),_=r(n(16268)),y=r(n(93035)),g=r(n(38574)),b=r(n(33101)),w=r(n(64646)),E=r(n(66483)),I=r(n(16866)),M=r(n(38608)),O=r(n(70246)),P=r(n(77983)),T=r(n(82354)),S=r(n(60516)),A=r(n(71002)),C=r(n(4339)),R=r(n(47626));e.default=function(){var t=this;this.remapPredictorConfig=function(e){var n=new f.default;return n.enabled=e.enabled,n.clientId=e.client_id,n.fullCoverageCompetitions=e.full_coverage_competitions,n.markets=e.markets,n.successRateScopes=e.success_rate_scopes,n.userDataConfig=e.user_data_config?t.remapUserDataConfig(e.user_data_config):null,n},this.remapTopXConfig=function(t){var e=new d.default;return e.enabled=t.enabled,e.clientId=t.client_id,e.minFixtures=t.min_fixtures,e.maxFixtures=t.max_fixtures,e.competitionsWhitelist=t.competitions_whitelist,e.authRequirement=t.auth_requirement,e},this.remapMatchQuizConfig=function(t){var e=new c.default;return e.enabled=t.enabled,e.clientId=t.client_id,e.defaultMarkets=t.default_markets,e.competitionsWhitelist=t.competitions_whitelist,e.authRequirement=t.auth_requirement,e},this.remapLoyaltyConfig=function(e){var n=new o.default;return n.enabled=e.enabled,n.clientId=e.client_id,n.conditions.list=e.conditions.list,n.actions.value=e.actions.value,n.rewards=t.remapRewards(e.rewards),n},this.remapLoyaltyNewConfig=function(e){var n=new I.default;return n.enabled=e.enabled,n.clientId=e.client_id,n.conditions.list=e.conditions.list,n.actions.value=e.actions.value,n.rewards=t.remapNewRewards(e.rewards),n},this.remapDiscussionsConfig=function(e){var n=new a.default;return n.enabled=e.enabled,n.clientId=e.client_id,n.automaticModeration=e.automatic_moderation?t.remapAutomaticModeration(e.automatic_moderation):null,n},this.remapFantasyConfig=function(e){var n=new S.default;return n.enabled=e.enabled,n.clientId=e.client_id,n.addPointsToProfileTotal=e.add_points_to_profile_total,n.competitionsWhitelist=e.competitions_whitelist,n.multipliers=e.multipliers?t.remapMultipliers(e.multipliers):null,n.players=t.remapFantasyPlayers(e.players),n.coefficients=t.remapFantasyCoefficients(e.coefficients),n},this.remapFantasyPlayers=function(t){var e=new A.default;return e.total=t.total,e.minGoalkeepers=t.min_goalkeepers,e.maxGoalkeepers=t.max_goalkeepers,e.minDefenders=t.min_defenders,e.maxDefenders=t.max_defenders,e.minMidfielders=t.min_midfielders,e.maxMidfielders=t.max_midfielders,e.minStrikers=t.min_strikers,e.maxStrikers=t.max_strikers,e},this.remapFantasyCoefficients=function(t){var e=new C.default;return e.assists=t.assists,e.shots=t.shots,e.offsides=t.offsides,e.tackles=t.tackles,e.saves=t.saves,e.minutesEqualOrOver60=t.minutes_equal_or_over_60,e.minutesUnder60=t.minutes_under_60,e.yellowCards=t.yellow_cards,e.redCards=t.red_cards,e.goalsGoalkeeper=t.goals_goalkeeper,e.goalsDefender=t.goals_defender,e.goalsMidfielder=t.goals_midfielder,e.goalsForwards=t.goals_forwards,e.penaltyGoals=t.penalty_goals,e.ownGoals=t.own_goals,e.cleanSheetsGoalkeeper=t.clean_sheets_goalkeeper,e.cleanSheetsDefender=t.clean_sheets_defender,e.cleanSheetsMidfielder=t.clean_sheets_midfielder,e.cleanSheetsForwards=t.clean_sheets_forwards,e.shotsOn=t.shots_on,e.foulsCommitted=t.fouls_committed,e.penaltyCommitted=t.penalty_committed,e.penaltyWon=t.penalty_won,e.penaltyMissed=t.penalty_missed,e.concededGoals=t.conceded_goals,e.caughtBall=t.caught_ball,e},this.remapAutomaticModeration=function(t){var e=new i.default;return e.enabled=t.enabled,e.moderateLinks=t.moderate_links,e.linksWhitelist=t.links_whitelist,e.moderatorProfileId=t.moderator_profile_id,e.dictionary=t.dictionary,e},this.remapNewRewards=function(e){var n=new E.default;return n.points=t.remapPoints(e.points),n.tiers=e.tiers,n.badges=t.remapNewBadges(e.badges),n},this.remapRewards=function(e){var n=new l.default;return n.points=t.remapPoints(e.points),n.tiers=e.tiers,n.badges=t.remapBadges(e.badges),n},this.remapPoints=function(t){var e=new u.default;return e.general=t.general,e.discussionPost=t.discussion_post,e.predictor=t.predictor,e.activity=t.activity,e.topX=t.top_x,e.matchQuiz=t.match_quiz,e},this.remapBadges=function(e){var n=new M.default;return n.general=e.general?t.remapGeneralBadgeValues(e.general):[],n.predictor=t.remapBadgeValues(e.predictor),n.topX=t.remapBadgeValues(e.top_x),n.matchQuiz=t.remapBadgeValues(e.match_quiz),n},this.remapNewBadges=function(e){var n=new p.default;return n.predictor=t.remapBadgeValuesPredictor(e.predictor),n.topX=t.remapBadgeValuesGame(e.top_x),n.matchQuiz=t.remapBadgeValuesGame(e.match_quiz),e.games&&(n.games=t.remapBadgeValuesGames(e.games)),e.football&&(n.football=t.remapBadgeValuesFootball(e.football)),e.classic_quizzes&&(n.classicQuizzes=t.remapBadgeValuesMiniGames(e.classic_quizzes)),e.either_or&&(n.eitherOr=t.remapBadgeValuesMiniGames(e.either_or)),e.discussions&&(n.discussions=t.remapBadgeValuesDiscussions(e.discussions)),e.voting&&e.voting.potm&&(n.voting.potm=t.remapBadgeValuesVoting(e.voting.potm)),e.voting&&e.voting.poll&&(n.voting.poll=t.remapBadgeValuesVoting(e.voting.poll)),n},this.remapBadgeValuesPredictor=function(t){return t.map((function(t){var e=new m.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.predictionsNumber=t.requirements.predictions_number,e.requirements.correctPredictions=t.requirements.correct_predictions,e.requirements.points=t.requirements.points,e.requirements.fromDate=t.requirements.from_date,e.requirements.toDate=t.requirements.to_date),e}))},this.remapBadgeValuesGame=function(t){return t.map((function(t){var e=new v.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.participationCount=t.requirements.participation_count,e.requirements.points=t.requirements.points,e.requirements.fromDate=t.requirements.from_date,e.requirements.toDate=t.requirements.to_date),e}))},this.remapBadgeValuesGames=function(e){return e.map((function(e){var n=new _.default;return n.id=e.id,n.enabled=e.enabled,n.label=e.label,n.description=e.description,n.flags=e.flags,e.assets?n.assets.mainImageUrl=e.assets.main_image_url:n.assets=e.assets,e.requirements&&(n.requirements.participationCount=e.requirements.participation_count,n.requirements.points=e.requirements.points,n.requirements.fromDate=e.requirements.from_date,n.requirements.toDate=e.requirements.to_date,n.requirements.specificGames=e.requirements.specific_games?t.remapSpecificGamesRequirement(e.requirements.specific_games):null),n}))},this.remapSpecificGamesRequirement=function(t){return t.map((function(t){return{gameId:t.game_id,gameType:t.game_type,gameModel:null}}))},this.remapBadgeValuesFootball=function(t){return t.map((function(t){var e=new y.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.predictionsNumber=t.requirements.predictions_number,e.requirements.correctPredictions=t.requirements.correct_predictions,e.requirements.points=t.requirements.points,e.requirements.entityId=t.requirements.entity_id,e.requirements.entityType=t.requirements.entity_type),e}))},this.remapBadgeValuesMiniGames=function(t){return t.map((function(t){var e=new g.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.participationCount=t.requirements.participation_count,e.requirements.fromDate=t.requirements.from_date,e.requirements.toDate=t.requirements.to_date),e}))},this.remapBadgeValuesDiscussions=function(t){return t.map((function(t){var e=new b.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.totalDiscussionPoints=t.requirements.total_discussion_points,e.requirements.postsCount=t.requirements.posts_count,e.requirements.postPoints=t.requirements.post_points,e.requirements.reactionsCount=t.requirements.reactions_count),e}))},this.remapBadgeValuesVoting=function(t){return t.map((function(t){var e=new w.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.points=t.requirements.points,e.requirements.voteCount=t.requirements.vote_count,e.requirements.entityId=t.requirements.entity_id,e.requirements.entityType=t.requirements.entity_type),e}))},this.remapBadgeValues=function(e){return e.map((function(e){var n=new O.default;return n.id=e.id,n.label=e.label,n.enabled=e.enabled,e.assets?n.assets.mainImageUrl=e.assets.main_image_url:n.assets=e.assets,n.requirements=t.remapRequirements(e.requirements),n}))},this.remapRequirements=function(t){var e=new s.default;return e.points=t.points,e.gameParticipationCount=t.game_participation_count,e.entityId=t.entity_id,e.entityType=t.entity_type,e.predictionsMade=t.predictions_made,e.correctPredictions=t.correct_predictions,e},this.remapUserDataConfig=function(t){var e=new h.default;return e.storeIp=t.store_ip,e.storeDeviceId=t.store_device_id,e.storeAgent=t.store_agent,e},this.remapGeneralBadgeValues=function(e){return e.map((function(e){var n=new P.default;return n.id=e.id,n.label=e.label,n.enabled=e.enabled,e.assets?n.assets.mainImageUrl=e.assets.main_image_url:n.assets=e.assets,n.requirements=t.remapGeneralRequirements(e.requirements),n}))},this.remapGeneralRequirements=function(t){var e=new T.default;return e.points=t.points,e.gameParticipationCount=t.game_participation_count,e.entityId=t.entity_id,e.entityType=t.entity_type,e.predictionsMade=t.predictions_made,e.correctPredictions=t.correct_predictions,e.postPoints=t.post_points,e.postsCount=t.posts_count,e.reactionsCount=t.reactions_count,e.totalDiscussionPoints=t.total_discussion_points,e},this.remapMultipliers=function(t){var e=new R.default;return e.captain=t.captain,e.viceCaptain=t.vice_captain,e}}},83918:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.main=null,this.all=null}},58452:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(40442));e.default=function(){this.enabled=!1,this.clientId=null,this.fullCoverageCompetitions=null,this.markets=null,this.successRateScopes=new i.default,this.userDataConfig=null}},40442:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.competitions=[],this.teams=[],this.markets=[]}},28824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.storeIp=!1,this.storeDeviceId=!1,this.storeAgent=!1}},78364:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1976),i=function(){function t(){}var e;return t.createMatchMarketsResultsModel=function(t,e){var n,r,i,a,s,o,u,l,c,d,f,h,p,m,v,_,y,g,b,w,E,I,M,O,P,T,S,A,C,R,D,F,L,k,j,N;return{FT_1X2:this.createOneXTwoResult(t.scores,"full_time"),HT_1X2:this.createOneXTwoResult(t.scores,"half_time"),BOTH_TEAMS_SCORE:t.scores.ftScore.homeGoals>0&&t.scores.ftScore.awayGoals>0,DOUBLE_CHANCE:this.createDoubleChanceResult(t.scores),HT_FT:this.createHalfTimeFullTimeResult(t.scores),RED_CARD_MATCH:this.createMarketResultByCriteria(t,"red_card"),PENALTY_MATCH:this.createMarketResultByCriteria(t,"penalty"),CORNERS_MATCH:isNaN((null===(r=null===(n=t.stats)||void 0===n?void 0:n.corners)||void 0===r?void 0:r.homeTeam)+(null===(a=null===(i=t.stats)||void 0===i?void 0:i.corners)||void 0===a?void 0:a.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam,PLAYER_YELLOW_CARD:this.createPlayersMarketsResults(t,e,"yellow_card"),PLAYER_RED_CARD:this.createPlayersMarketsResults(t,e,"red_card"),PLAYER_SCORE_FIRST_GOAL:this.createPlayersMarketsResults(t,e,"first_goal"),PLAYER_SCORE:this.createPlayersMarketsResults(t,e,"one_goal"),PLAYER_SCORE_TWICE:this.createPlayersMarketsResults(t,e,"two_goals"),PLAYER_SCORE_HATTRICK:this.createPlayersMarketsResults(t,e,"hattrick"),CORRECT_SCORE:{homeGoals:t.scores.ftScore.homeGoals,awayGoals:t.scores.ftScore.awayGoals},CORRECT_SCORE_ADVANCED:{homeGoals:t.scores.ftScore.homeGoals,awayGoals:t.scores.ftScore.awayGoals},CORRECT_SCORE_HT:{homeGoals:t.scores.htScore.homeGoals,awayGoals:t.scores.htScore.awayGoals},OVER_GOALS_0_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>0,OVER_GOALS_1_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>1,OVER_GOALS_2_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>2,OVER_GOALS_3_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>3,OVER_GOALS_4_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>4,OVER_GOALS_5_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>5,OVER_GOALS_6_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>6,OVER_CORNERS_6_5:isNaN((null===(o=null===(s=t.stats)||void 0===s?void 0:s.corners)||void 0===o?void 0:o.homeTeam)+(null===(l=null===(u=t.stats)||void 0===u?void 0:u.corners)||void 0===l?void 0:l.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>6,OVER_CORNERS_7_5:isNaN((null===(d=null===(c=t.stats)||void 0===c?void 0:c.corners)||void 0===d?void 0:d.homeTeam)+(null===(h=null===(f=t.stats)||void 0===f?void 0:f.corners)||void 0===h?void 0:h.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>7,OVER_CORNERS_8_5:isNaN((null===(m=null===(p=t.stats)||void 0===p?void 0:p.corners)||void 0===m?void 0:m.homeTeam)+(null===(_=null===(v=t.stats)||void 0===v?void 0:v.corners)||void 0===_?void 0:_.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>8,OVER_CORNERS_9_5:isNaN((null===(g=null===(y=t.stats)||void 0===y?void 0:y.corners)||void 0===g?void 0:g.homeTeam)+(null===(w=null===(b=t.stats)||void 0===b?void 0:b.corners)||void 0===w?void 0:w.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>9,OVER_CORNERS_10_5:isNaN((null===(I=null===(E=t.stats)||void 0===E?void 0:E.corners)||void 0===I?void 0:I.homeTeam)+(null===(O=null===(M=t.stats)||void 0===M?void 0:M.corners)||void 0===O?void 0:O.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>10,OVER_CORNERS_11_5:isNaN((null===(T=null===(P=t.stats)||void 0===P?void 0:P.corners)||void 0===T?void 0:T.homeTeam)+(null===(A=null===(S=t.stats)||void 0===S?void 0:S.corners)||void 0===A?void 0:A.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>11,OVER_CORNERS_12_5:isNaN((null===(R=null===(C=t.stats)||void 0===C?void 0:C.corners)||void 0===R?void 0:R.homeTeam)+(null===(F=null===(D=t.stats)||void 0===D?void 0:D.corners)||void 0===F?void 0:F.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>12,OVER_CORNERS_13_5:isNaN((null===(k=null===(L=t.stats)||void 0===L?void 0:L.corners)||void 0===k?void 0:k.homeTeam)+(null===(N=null===(j=t.stats)||void 0===j?void 0:j.corners)||void 0===N?void 0:N.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>13}},e=t,t.createOneXTwoResult=function(t,e){var n,i,a,s;return"full_time"===e?t.ftScore.homeGoals>t.ftScore.awayGoals?r.OneXTwoEnum.ONE:t.ftScore.homeGoals===t.ftScore.awayGoals?r.OneXTwoEnum.X:r.OneXTwoEnum.TWO:(null===(n=null==t?void 0:t.htScore)||void 0===n?void 0:n.homeGoals)>(null===(i=null==t?void 0:t.htScore)||void 0===i?void 0:i.awayGoals)?r.OneXTwoEnum.ONE:(null===(a=null==t?void 0:t.htScore)||void 0===a?void 0:a.homeGoals)===(null===(s=null==t?void 0:t.htScore)||void 0===s?void 0:s.awayGoals)?r.OneXTwoEnum.X:r.OneXTwoEnum.TWO},t.createDoubleChanceResult=function(t){var e,n,i,a;return(null===(e=null==t?void 0:t.ftScore)||void 0===e?void 0:e.homeGoals)>(null===(n=null==t?void 0:t.ftScore)||void 0===n?void 0:n.awayGoals)?[r.DoubleChanceEnum.ONE_X,r.DoubleChanceEnum.ONE_TWO]:(null===(i=null==t?void 0:t.ftScore)||void 0===i?void 0:i.homeGoals)===(null===(a=null==t?void 0:t.ftScore)||void 0===a?void 0:a.awayGoals)?[r.DoubleChanceEnum.ONE_X,r.DoubleChanceEnum.X_TWO]:[r.DoubleChanceEnum.X_TWO,r.DoubleChanceEnum.ONE_TWO]},t.createHalfTimeFullTimeResult=function(t){var e,n,i,a,s,o,u,l,c,d,f,h,p,m,v,_,y,g,b,w,E,I,M,O;if((null===(e=null==t?void 0:t.htScore)||void 0===e?void 0:e.homeGoals)>(null===(n=null==t?void 0:t.htScore)||void 0===n?void 0:n.awayGoals)){if((null===(i=null==t?void 0:t.ftScore)||void 0===i?void 0:i.homeGoals)>(null===(a=null==t?void 0:t.ftScore)||void 0===a?void 0:a.awayGoals))return r.HalfTimeFullTimeEnum.ONE_ONE;if((null===(s=null==t?void 0:t.ftScore)||void 0===s?void 0:s.homeGoals)===(null===(o=null==t?void 0:t.ftScore)||void 0===o?void 0:o.awayGoals))return r.HalfTimeFullTimeEnum.ONE_X;if((null===(u=null==t?void 0:t.ftScore)||void 0===u?void 0:u.homeGoals)<(null===(l=null==t?void 0:t.ftScore)||void 0===l?void 0:l.awayGoals))return r.HalfTimeFullTimeEnum.ONE_TWO}if((null===(c=null==t?void 0:t.htScore)||void 0===c?void 0:c.homeGoals)===(null===(d=null==t?void 0:t.htScore)||void 0===d?void 0:d.awayGoals)){if((null===(f=null==t?void 0:t.ftScore)||void 0===f?void 0:f.homeGoals)>(null===(h=null==t?void 0:t.ftScore)||void 0===h?void 0:h.awayGoals))return r.HalfTimeFullTimeEnum.X_ONE;if((null===(p=null==t?void 0:t.ftScore)||void 0===p?void 0:p.homeGoals)===(null===(m=null==t?void 0:t.ftScore)||void 0===m?void 0:m.awayGoals))return r.HalfTimeFullTimeEnum.X_X;if((null===(v=null==t?void 0:t.ftScore)||void 0===v?void 0:v.homeGoals)<(null===(_=null==t?void 0:t.ftScore)||void 0===_?void 0:_.awayGoals))return r.HalfTimeFullTimeEnum.X_TWO}if((null===(y=null==t?void 0:t.htScore)||void 0===y?void 0:y.homeGoals)<(null===(g=null==t?void 0:t.htScore)||void 0===g?void 0:g.awayGoals)){if((null===(b=null==t?void 0:t.ftScore)||void 0===b?void 0:b.homeGoals)>(null===(w=null==t?void 0:t.ftScore)||void 0===w?void 0:w.awayGoals))return r.HalfTimeFullTimeEnum.TWO_ONE;if((null===(E=null==t?void 0:t.ftScore)||void 0===E?void 0:E.homeGoals)===(null===(I=null==t?void 0:t.ftScore)||void 0===I?void 0:I.awayGoals))return r.HalfTimeFullTimeEnum.TWO_X;if((null===(M=null==t?void 0:t.ftScore)||void 0===M?void 0:M.homeGoals)<(null===(O=null==t?void 0:t.ftScore)||void 0===O?void 0:O.awayGoals))return r.HalfTimeFullTimeEnum.TWO_TWO}},t.createMarketResultByCriteria=function(t,e){return t.timeline&&t.timeline.length?"red_card"===e?t.timeline.filter((function(t){return Number(t.minute)<=90})).some((function(t){return"red_card"===t.type})):t.timeline.filter((function(t){return Number(t.minute)<=90})).some((function(t){return t.type.startsWith(e)})):null},t.createPlayersMarketsResults=function(t,n,r){if(!t.timeline||!t.timeline.length)return"first_goal"===r?null:[];if("first_goal"===r){var i=t.timeline.find((function(t){return"goal"===t.type||"penalty_goal"===t.type||"own_goal"===t.type}))||null;if(i){var a=n[i.player.id];return{playerId:"goal"===i.type||"penalty_goal"===i.type?i.player.id:"OWN_GOAL",playerModel:a}}return null}if("yellow_card"===r||"red_card"===r)return e.transformPlayerMarketResult(t.timeline.filter((function(t){return Number(t.minute)<=90})).filter((function(t){return t.type===r})).map((function(t){return n[t.player.id]})));var s=new Map,o="one_goal"===r?1:"two_goals"===r?2:3,u=[];return t.timeline.filter((function(t){return Number(t.minute)<=90})).filter((function(t){return"goal"===t.type||"penalty_goal"===t.type})).forEach((function(t){var e=n[t.player.id];if(s.has(t.player.id)){var r=s.get(t.player.id);r.push(e),s.set(t.player.id,r)}else s.set(t.player.id,[e])})),s.forEach((function(t){t.length>=o&&u.push(t[0])})),e.transformPlayerMarketResult(u)},t.transformPlayerMarketResult=function(t){return t.map((function(t){return{playerId:t.id,playerModel:t}}))},t}();e.default=i},46367:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.playerId=null,this.playerModel=null}},61406:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(22524)),o=a(n(81732)),u=a(n(54119)),l=a(n(91465)),c=a(n(85132)),d=a(n(87344));e.default=function(t,e,n){var a=this;this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapFixturesRequest=function(t){var e={};if(e.match_id=t.matchId,e.match_type="FOOTBALL",t instanceof o.default)e.market=t.market,e.prediction=t.prediction.value,e.player_id=t.prediction.playerId;else if(t instanceof c.default||t instanceof d.default)e.market=t.market,e.prediction=t.prediction.value;else if(t instanceof l.default){e.market=t.market;var n=t.prediction.value.split(":");e.goals_home=Number(n[0]),e.goals_away=Number(n[1])}else e.market=t.market,e.prediction=t.prediction.value;return e},this.remapFixturesResponse=function(t){return r(a,void 0,void 0,(function(){var e,n,r,a,o,u,l,c,d,f,h,p;return i(this,(function(i){switch(i.label){case 0:for(e="OWN_GOAL",n=[],r=[],a=null,o=[],t.length>1&&t.sort((function(t,e){return t.match_id.localeCompare(e.match_id)})),u=0,l=t;u<l.length;u++)h=l[u],n.push(h.match_id),h.player_id&&!r.includes(h.player_id)&&r.push(h.player_id);return[4,this.matchFacade.getMatchesMapWithNativeIds(n)];case 1:return c=i.sent(),r.sort((function(t,e){return t.localeCompare(e)})),r&&r.length>0&&!r.includes(e)?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:for(d=0,f=t;d<f.length;d++)h=f[d],p=new s.default,h.target?p.market=this.predictorService.convertMarketForResponseModel(h.market,h.target):p.market=h.market,p.matchId=c[h.match_id].id,p.matchType=h.match_type,p.matchModel=c?c[h.match_id]:null,delete p.matchModel.availableMarkets,void 0!==h.prediction?p.prediction.value=h.prediction:void 0!==h.goals_home&&void 0!==h.goals_away&&(p.prediction.value=h.goals_home.toString()+":"+h.goals_away.toString()),p.prediction.playerId=h.player_id?h.player_id:null,"PLAYER_PERFORMANCE"===h.market&&(p.prediction.playerRole=h.role),p.prediction.playerId&&p.prediction.playerId!==e&&(p.prediction.playerModel=a[h.player_id],p.prediction.playerId=a[h.player_id].id),p.result=this.remapResult(h.result),o.push(p);return[2,o]}}))}))},this.remapResult=function(t){var e=new u.default;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e},this.matchFacade=t,this.playerFacade=e,this.predictorService=n}},22524:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(46367));e.default=function(){this.market=null,this.matchId=null,this.matchType=null,this.matchModel=null,this.prediction=new i.default,this.result=null}},61206:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(89883));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.BOTH_TEAMS_SCORE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},45274:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(78038));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.CORNERS_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},91465:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(3125));e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new i.default,this.prediction.value=n}},47535:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(56902));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.DOUBLE_CHANCE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},27307:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(66642));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.HT_FT,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},91718:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(12782));e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new i.default,this.prediction.value=n}},85132:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(89883));e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new i.default,this.prediction.value=n}},87344:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(89883));e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new i.default,this.prediction.value=n}},71855:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(89883));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.PENALTY_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},81732:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(77321));e.default=function(t,e,n,r){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new i.default,this.prediction.value=n,this.prediction.playerId=r}},45814:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(89883));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.RED_CARD_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},54119:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.settledAt=null,this.resettledAt=null,this.status=null,this.outcome=null,this.points=0}},2155:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.home=null,this.draw=null,this.away=null}},88821:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.score=null,this.percentage=null}},18430:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.homeGoals=null,this.awayGoals=null}},12449:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(18430)),a=r(n(59506));e.default=function(){this.FT_1X2=null,this.HT_1X2=null,this.BOTH_TEAMS_SCORE=null,this.DOUBLE_CHANCE=null,this.HT_FT=null,this.RED_CARD_MATCH=null,this.PENALTY_MATCH=null,this.CORNERS_MATCH=null,this.PLAYER_YELLOW_CARD=[],this.PLAYER_RED_CARD=[],this.PLAYER_SCORE_FIRST_GOAL=new a.default,this.PLAYER_SCORE=[],this.PLAYER_SCORE_TWICE=[],this.PLAYER_SCORE_HATTRICK=[],this.CORRECT_SCORE=new i.default,this.CORRECT_SCORE_ADVANCED=new i.default,this.CORRECT_SCORE_HT=new i.default,this.OVER_GOALS_0_5=null,this.OVER_GOALS_1_5=null,this.OVER_GOALS_2_5=null,this.OVER_GOALS_3_5=null,this.OVER_GOALS_4_5=null,this.OVER_GOALS_5_5=null,this.OVER_GOALS_6_5=null,this.OVER_CORNERS_6_5=null,this.OVER_CORNERS_7_5=null,this.OVER_CORNERS_8_5=null,this.OVER_CORNERS_9_5=null,this.OVER_CORNERS_10_5=null,this.OVER_CORNERS_11_5=null,this.OVER_CORNERS_12_5=null,this.OVER_CORNERS_13_5=null}},59506:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.playerId=null,this.playerModel=null}},45908:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.no=0,this.yes=0}},82726:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(61406)),o=a(n(12532)),u=a(n(13792)),l=a(n(60595)),c=a(n(34545)),d=a(n(44272)),f=a(n(22524)),h=a(n(25013)),p=a(n(1399)),m=a(n(68031));e.default=function(t,e){var n=this;this.fixturesRemapper=null,this.footballHttps=null,this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapRequestBody=function(t){if(t instanceof m.default)return t;var e={};return e.game_instance_id=t.gameInstanceId,e.fixtures=t.fixtures.map((function(t){return n.fixturesRemapper.remapFixturesRequest(t)})),t instanceof p.default&&t.tiebreaker&&(e.tiebreaker={},e.tiebreaker.golden_goal=t.tiebreaker.goldenGoal?t.tiebreaker.goldenGoal:null),e},this.remapResponseArrayBody=function(t){return r(n,void 0,void 0,(function(){var e,n,r,a,s,u,l=this;return i(this,(function(i){switch(i.label){case 0:return t.length?(e="OWN_GOAL",n=[],r=[],a={},s=[],t.forEach((function(t){t.fixtures.forEach((function(t){n.push(t.match_id),t.player_id&&t.player_id!==e&&r.push(t.player_id)}))})),[4,this.matchFacade.getMatchesMapWithNativeIds(n)]):[3,4];case 1:return u=i.sent(),r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:return t.forEach((function(t){var n=new o.default,r=[];n.id=t.id,n.gameInstanceId=t.game_instance_id,n.gameType=t.game_type,n.wager=t.wager,n.totalFixtures=t.total_fixtures,n.settledFixtures=t.settled_fixtures,n.userId=t.user_id,n.templateId=t.template_id,n.groupId=t.group_id,n.profileLastUpdatedAt=t.profile_last_updated_at,t.fixtures.forEach((function(t){var n=new f.default;t.target?n.market=l.predictorService.convertMarketForResponseModel(t.market,t.target):n.market=t.market,n.matchId=u[t.match_id].id,n.matchType=t.match_type,n.matchModel=u[t.match_id],delete n.matchModel.availableMarkets,void 0!==t.prediction?n.prediction.value=t.prediction:void 0!==t.goals_home&&void 0!==t.goals_away&&(n.prediction.value=t.goals_home.toString()+":"+t.goals_away.toString()),n.prediction.playerId=t.player_id?t.player_id:null,n.prediction.playerId&&n.prediction.playerId!==e&&(n.prediction.playerModel=a[n.prediction.playerId],n.prediction.playerId=a[n.prediction.playerId].id),"PLAYER_PERFORMANCE"===t.market&&(n.prediction.playerRole=t.role),n.result=l.fixturesRemapper.remapResult(t.result),r.push(n)})),n.fixtures=r,n.status=t.status,t.tiebreaker?n.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:n.tiebreaker=null,n.points=t.points,n.createdAt=t.created_at,n.updatedAt=t.updated_at,s.push(n)})),[2,s];case 4:return[2,t]}}))}))},this.remapResponseObjBody=function(t){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=new o.default).id=t.id,e.gameInstanceId=t.game_instance_id,e.gameType=t.game_type,e.wager=t.wager,e.totalFixtures=t.total_fixtures,e.settledFixtures=t.settled_fixtures,e.userId=t.user_id,e.templateId=t.template_id,e.groupId=t.group_id,e.profileLastUpdatedAt=t.profile_last_updated_at,n=e,[4,this.fixturesRemapper.remapFixturesResponse(t.fixtures)];case 1:return n.fixtures=r.sent(),e.status=t.status,t.tiebreaker?e.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:e.tiebreaker=null,e.points=t.points,e.createdAt=t.created_at,e.updatedAt=t.updated_at,[2,e]}}))}))},this.remapPredictionModel=function(t){var e=new u.default;return e.fullTimeOneXTwo=t.FT_1X2,e.halfTimeOneXTwo=t.HT_1X2,e.bothTeamsScore=t.BOTH_TEAMS_SCORE,e.overZeroPointFiveGoals=t.OVER_GOALS_0_5,e.overOnePointFiveGoals=t.OVER_GOALS_1_5,e.overTwoPointFiveGoals=t.OVER_GOALS_2_5,e.overThreePointFiveGoals=t.OVER_GOALS_3_5,e.overFourPointFiveGoals=t.OVER_GOALS_4_5,e.overFivePointFiveGoals=t.OVER_GOALS_5_5,e.overSixPointFiveGoals=t.OVER_GOALS_6_5,e.overSixPointFiveCorners=t.OVER_CORNERS_6_5,e.overSevenPointFiveCorners=t.OVER_CORNERS_7_5,e.overEightPointFiveCorners=t.OVER_CORNERS_8_5,e.overNinePointFiveCorners=t.OVER_CORNERS_9_5,e.overTenPointFiveCorners=t.OVER_CORNERS_10_5,e.overElevenPointFiveCorners=t.OVER_CORNERS_11_5,e.overTwelvePointFiveCorners=t.OVER_CORNERS_12_5,e.overThirteenPointFiveCorners=t.OVER_CORNERS_13_5,e.doubleChance=t.DOUBLE_CHANCE,e.halfTimeFullTime=t.HT_FT,e.playerScore=t.PLAYER_SCORE,e.playerYellowCard=t.PLAYER_YELLOW_CARD,e.playerRedCard=t.PLAYER_RED_CARD,e.redCardMatch=t.RED_CARD_MATCH,e.penaltyMatch=t.PENALTY_MATCH,e.playerScoreFirstGoal=t.PLAYER_SCORE_FIRST_GOAL,e.cornersMatch=t.CORNERS_MATCH,e.correctScore=t.CORRECT_SCORE,e.correctScoreHalfTime=t.CORRECT_SCORE_HT,e.correctScoreAdvanced=t.CORRECT_SCORE_ADVANCED,e.playerScoreHattrick=t.PLAYER_SCORE_HATTRICK,e.playerScoreTwice=t.PLAYER_SCORE_TWICE,e},this.footballHttps=new l.default(t),this.matchFacade=new c.default(t,this.footballHttps,e),this.playerFacade=new d.default(t,this.footballHttps,e),this.predictorService=new h.default(t,e),this.fixturesRemapper=new s.default(this.matchFacade,this.playerFacade,this.predictorService)}},53950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameInstanceId=null,this.fixtures=null}},12532:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(97640));e.default=function(){this.id=null,this.gameInstanceId=null,this.gameType=null,this.wager=null,this.totalFixtures=null,this.settledFixtures=null,this.userId=null,this.fixtures=[],this.status=null,this.tiebreaker=new i.default,this.points=null,this.templateId=null,this.groupId=null,this.profileLastUpdatedAt=null,this.createdAt=null,this.updatedAt=null}},97782:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(66147);e.default=function(t){var e=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.matchIds=null,this.gameIds=null,this.constructFiltersUrl=function(){var t="",n=!1;return e.status&&(n=Object.values(r.StatusEnum).some((function(t){return e.status.includes(t)}))),e.limit&&(t+="&",t+="limit=".concat(e.limit)),e.startAfter&&(t+="&",t+="start_after=".concat(e.startAfter)),e.status&&n&&(t+="&",t+="status=".concat(e.status.join(","))),e.type&&(t+="&",t+="game_types=".concat(e.type)),e.matchIds&&e.matchIds.length>0&&(t+="&",t+="match_ids=".concat(e.matchIds.join(","))),e.gameIds&&e.gameIds.length>0&&(t+="&",t+="game_ids=".concat(e.gameIds.join(","))),t},this.limit=(null==t?void 0:t.limit)||null,this.startAfter=(null==t?void 0:t.startAfter)||null,this.status=(null==t?void 0:t.status)||null,this.type=(null==t?void 0:t.type)||null,this.matchIds=(null==t?void 0:t.matchIds)||null,this.gameIds=(null==t?void 0:t.gameIds)||null}},13792:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(45908));e.default=function(){this.fullTimeOneXTwo={},this.halfTimeOneXTwo={},this.bothTeamsScore=new i.default,this.doubleChance={},this.halfTimeFullTime={},this.playerScore={},this.playerYellowCard={},this.playerRedCard={},this.redCardMatch=new i.default,this.penaltyMatch=new i.default,this.playerScoreFirstGoal={},this.cornersMatch={},this.correctScore={},this.correctScoreHalfTime={},this.correctScoreAdvanced={},this.playerScoreHattrick={},this.playerScoreTwice={},this.overZeroPointFiveGoals=new i.default,this.overOnePointFiveGoals=new i.default,this.overTwoPointFiveGoals=new i.default,this.overThreePointFiveGoals=new i.default,this.overFourPointFiveGoals=new i.default,this.overFivePointFiveGoals=new i.default,this.overSixPointFiveGoals=new i.default,this.overSixPointFiveCorners=new i.default,this.overSevenPointFiveCorners=new i.default,this.overEightPointFiveCorners=new i.default,this.overNinePointFiveCorners=new i.default,this.overTenPointFiveCorners=new i.default,this.overElevenPointFiveCorners=new i.default,this.overTwelvePointFiveCorners=new i.default,this.overThirteenPointFiveCorners=new i.default}},19378:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchType=null,this.predictions=null}},79679:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(82726)),a=r(n(19378));e.default=function(t,e){var n=this;this.remapPredictions=null,this.remapResponse=function(t){var e=new a.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.predictions=n.remapPredictions.remapPredictionModel(t.predictions),e},this.remapPredictions=new i.default(t,e)}},77321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1,this.playerId=null}},89883:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1}},78038:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},3125:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},56902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},66642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},12782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},71259:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(52793)),o=a(n(88900)),u=a(n(62929)),l=a(n(47686)),c=a(n(49297));e.default=function(t){var e=this;this.predictorHttps=null,this.clientHttps=null,this.predictorFacade=null,this.idMapping=null,this.helpers=null,this.makeFootballPrediction=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.makeFootballPrediction(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getMatchSummary=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMatchSummary(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMarketSummary=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMarketSummary(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.deleteFootballPrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyCurrentPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyCurrentPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPastPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPastPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictionsForMatches=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPredictionsForMatches(t,n)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserCurrentPredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserCurrentPredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserPastPredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPastPredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPredictionsForMatches(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getPredictionById=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getPredictionById(t)];case 1:return[2,e.sent()]}}))}))},this.getPredictionsByIds=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getPredictionsByIds(t)];case 1:return[2,e.sent()]}}))}))},this.getMatchMarketsResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMatchMarketsResults(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new o.default(t),this.predictorHttps=new s.default(t),this.clientHttps=new l.default(t),this.predictorFacade=new u.default(t,this.predictorHttps,this.clientHttps,this.idMapping),this.helpers=new c.default(t)}},25013:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(27974),l=o(n(58452)),c=o(n(45908)),d=o(n(68950)),f=o(n(36890)),h=o(n(60595)),p=o(n(34545)),m=o(n(97782)),v=o(n(7299)),_=n(90712),y=o(n(54119)),g=o(n(63751)),b=o(n(87243)),w=o(n(44272)),E=o(n(91180)),I=o(n(45765)),M=n(66147),O=n(5318),P=n(14946),T=o(n(86409)),S=n(91260),A=o(n(66247)),C=o(n(12449)),R=o(n(78364));e.default=function(t,e){var n=this;this.footballHttps=null,this.idMapping=null,this.matchFacade=null,this.playerFacade=null,this.profileNamespace=null,this.remapMatchIdToNative=function(t){return i(n,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(t,"match","native")];case 1:return[2,e.sent().match]}}))}))},this.remapPlayerIdToNative=function(t){return i(n,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(t,"player","native")];case 1:return[2,e.sent().player[0]]}}))}))},this.remapPlayerIdMapToNative=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(a){switch(a.label){case 0:return e={},n=(0,_.transformIdsToBeUnique)(t),[4,this.idMapping.getEntityIdsBySchemaId(n,"player","native")];case 1:return r=a.sent(),i=r.player,n.forEach((function(t,n){return e[t]=i[n]})),[2,e]}}))}))},this.remapPlayerIdToIdSchema=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,s,o,u,l,c,d,f,h,p,m,v,_,y,g,b;return a(this,(function(a){switch(a.label){case 0:for(e=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=[],r=0,i=Object.entries(t);r<i.length;r++)if(s=i[r],o=s[0],u=s[1],e.includes(o))for(l=0,c=Object.keys(u);l<c.length;l++)"NOBODY"!==(d=c[l])&&"OWN_GOAL"!==d&&n.push(d);return n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[2,t];case 1:for(f=a.sent(),h=0,p=Object.entries(t);h<p.length;h++)if(m=p[h],v=m[0],_=m[1],e.includes(v))for(y=0,g=Object.keys(_);y<g.length;y++)"NOBODY"!==(b=g[y])&&"OWN_GOAL"!==b&&(_[f[b].id]=_[b],_[f[b].id].model=f[b],this.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&delete _[b]);return[2,t]}}))}))},this.convertMarketForResponseModel=function(t,e){return t+"_"+e.toString()},this.getMarketSummary=function(t,e,r){return i(n,void 0,void 0,(function(){var n,i,s,o,l,d,f,h,p=this;return a(this,(function(a){switch(a.label){case 0:if(n=S.marketToKeySummaryMap.get(e),(i={}).matchId=t.matchId,i.matchType=t.matchType,!Object.keys(t.predictions).includes(n))throw new Error("You have passed invalid market");return i[n]=t.predictions[n],u.playerMarkets.includes(e)&&r?(s="","OWN_GOAL"===r||"NOBODY"===r?[3,2]:[4,this.idMapping.idMappingFacade.getEntitiesByIds({player:[r]},this.idMapping.idSchema,"native")]):[3,6];case 1:o=a.sent(),s=o.player[0],a.label=2;case 2:return s&&i[n][s]?[4,this.playerFacade.getPlayersMapWithNativeIds([s])]:[3,4];case 3:return l=a.sent(),i[n][s].model=l[s],[2,i[n][s]];case 4:return s?(i[n][s]=new c.default,[2,i[n][s]]):[2,i[n][r]];case 5:return[3,10];case 6:return!u.playerMarkets.includes(e)||r?[3,10]:(d=Object.keys(i[n]).filter((function(t){return"NOBODY"!==t&&"OWN_GOAL"!==t}))).length?[4,this.playerFacade.getPlayersMapWithNativeIds(d)]:[3,8];case 7:return h=a.sent(),[3,9];case 8:h={},a.label=9;case 9:f=h,Object.keys(f).length&&Object.keys(i[n]).forEach((function(t){"NOBODY"!==t&&"OWN_GOAL"!==t&&(i[n][f[t].id]=i[n][t],i[n][f[t].id].model=f[t],p.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&delete i[n][t])})),a.label=10;case 10:return[2,i]}}))}))},this.remapCompetitionsFromConfig=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,s,o,u,c;return a(this,(function(a){switch(a.label){case 0:return t instanceof l.default?(e={competition:t.fullCoverageCompetitions},n={competition:t.successRateScopes.competitions},r={team:t.successRateScopes.teams},[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,"native",this.idMapping.idSchema)]):[3,4];case 1:return i=a.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",this.idMapping.idSchema)];case 2:return s=a.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(r,"native",this.idMapping.idSchema)];case 3:return o=a.sent(),t.fullCoverageCompetitions=i.competition,t.successRateScopes.competitions=s.competition,t.successRateScopes.teams=o.team,[2,t];case 4:return t instanceof E.default||t instanceof I.default?(u={competition:t.competitionsWhitelist},[4,this.idMapping.idMappingFacade.getEntitiesByIds(u,"native",this.idMapping.idSchema)]):[3,6];case 5:return c=a.sent(),t.competitionsWhitelist=c.competition,[2,t];case 6:return[2]}}))}))},this.remapMatchIdsFixtures=function(t){return i(n,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return Array.isArray(t.data)?t.data.length>0?(e=[],n=[],t.data.forEach((function(t){t instanceof g.default||t instanceof d.default||t instanceof b.default||t instanceof A.default?(t.fixtures.forEach((function(t){return e.push(t.matchId)})),t instanceof b.default&&t.fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&n.push(t.prediction.playerId)}))):t instanceof f.default&&t.results.forEach((function(t){return e.push(t.matchId)}))})),[4,this.refactorResponseArrModel(t,e,n)]):[3,2]:[3,4];case 1:case 5:return[2,r.sent()];case 2:return[2,t];case 3:return[3,6];case 4:return[4,this.refactorResponseObjModel(t)];case 6:return[2]}}))}))},this.refactorResponseArrModel=function(t,e,r){return i(n,void 0,void 0,(function(){var n,i,s,o=this;return a(this,(function(a){switch(a.label){case 0:return n=[],[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return i=a.sent(),s={},r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:s=a.sent(),a.label=3;case 3:return t.data.forEach((function(t){t instanceof g.default||t instanceof d.default||t instanceof b.default?(t.fixtures.forEach((function(e){o.handleMatchModel(i,e),t instanceof b.default&&e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&(e.prediction.playerModel=s[e.prediction.playerId],e.prediction.playerId=s[e.prediction.playerId].id)})),n.push(t)):t instanceof f.default&&(t.results.forEach((function(t){t.matchModel=i[t.matchId],delete t.matchModel.availableMarkets,t.matchId=t.matchModel.id})),n.push(t))})),t.data=n,[2,t]}}))}))},this.refactorResponseObjModel=function(t){return i(n,void 0,void 0,(function(){var e,n,r=this;return a(this,(function(i){switch(i.label){case 0:return e=[],t.fixtures.forEach((function(t){return e.push(t.matchId)})),[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return n=i.sent(),t.fixtures.forEach((function(t){return r.handleMatchModel(n,t)})),[2,t]}}))}))},this.getCurrentGameId=function(t){var e=new Date;if(t.data.length>1){var n=[];return t.data.forEach((function(t){return n.push(t.predictionsCutoff)})),t.data.sort((function(t,n){var r=[t.predictionsCutoff,n.predictionsCutoff].map((function(t){return Math.abs(new Date(t)-e)}));return r[0]-r[1]}))[0].id}return t.data[0].id},this.initGameTypePredictions=function(t,e){var n={type:t,limit:null,startAfter:null};return e&&(n=r(r({},n),{limit:e.limit,startAfter:e.startAfter})),new m.default(n)},this.initGameFilters=function(t,e,n){if(e&&n)return e.type=t,e.gameIds=n,new v.default(e);if(e&&!n)return e.type=t,new v.default(e);if(!e&&n){var r={type:t,gameIds:n};return new v.default(r)}return r={type:t},new v.default(r)},this.addPredictionProp=function(t,e){return i(n,void 0,void 0,(function(){var n=this;return a(this,(function(r){switch(r.label){case 0:return e.data.forEach((function(e){var r=e.fixtures.map((function(t){return t.matchId}));t.data.forEach((function(t){e.id===t.game_instance_id&&(e.fixtures.sort((function(t,e){return t.matchId.localeCompare(e.matchId)})),t.fixtures.sort((function(t,e){return t.match_id.localeCompare(e.match_id)})),e.predictionId=t.id,e.outcome=t.status,e.fixtures.forEach((function(e,r){void 0!==t.fixtures[r].goals_home&&void 0!==t.fixtures[r].goals_away?e.prediction.value=t.fixtures[r].goals_home+":"+t.fixtures[r].goals_away:e.prediction.value=t.fixtures[r].prediction,t.fixtures[r].player_id?e.prediction.playerId=t.fixtures[r].player_id:t.fixtures[r].target&&(e.prediction.target=t.fixtures[r].target),e.prediction.result=n.remapResult(t.fixtures[r].result)})),e.predictionsMadeAt=t.created_at,e.predictionsUpdatedAt=t.profile_last_updated_at,e.points=t.points,e instanceof d.default&&(t.tiebreaker?e.predictionTiebreaker.goldenGoal=t.tiebreaker.golden_goal:e.predictionTiebreaker=t.tiebreaker))})),e.fixtures.sort((function(t,e){return r.indexOf(t.matchId)-r.indexOf(e.matchId)}))})),e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,[4,this.remapMatchIdsFixtures(e)];case 1:return[2,r.sent()]}}))}))},this.remapResult=function(t){var e=new y.default;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e},this.areIdsExceeded=function(t){return t.length>10},this.initPredictionsFilters=function(t,e,r){switch(e){case"user":t&&(t=new m.default(t));break;case"current":if(t)n.deleteUnexpectedProperties(t),t.status=[M.StatusEnum.ACTIVE],t=new m.default(t);else{var i={status:[M.StatusEnum.ACTIVE]};t=new m.default(i)}break;case"past":t?(n.deleteUnexpectedProperties(t),t.status=M.pastStatuses,t=new m.default(t)):(i={status:M.pastStatuses},t=new m.default(i));break;case"matches":t?(n.deleteUnexpectedProperties(t),t.matchIds=r,t=new m.default(t)):(i={matchIds:r},t=new m.default(i))}return t},this.completeGameMarketResults=function(t,e){return i(n,void 0,void 0,(function(){var n,r,i,o,l,c,d,f,h=this;return a(this,(function(a){switch(a.label){case 0:switch(e){case"MATCH_QUIZ":return[3,1];case"TOP_X":return[3,5]}return[3,9];case 1:return n={},r=t.results[0].matchId,i=t.results.map((function(t){return u.playerMarkets.includes(t.market)&&!t.result.includes("OWN_GOAL")?s([],t.result,!0):[]})).flat(),[4,this.matchFacade.getMatchesMapWithNativeIds([r])];case 2:return o=a.sent(),i.length?[4,this.playerFacade.getPlayersMapWithNativeIds(i)]:[3,4];case 3:n=a.sent(),a.label=4;case 4:return t.results=t.results.map((function(t){if(t.matchModel=o[t.matchId]?o[t.matchId]:null,t.playerModels&&Object.keys(n).length&&(e=t.result).forEach((function(e){var r=n[e];t.playerModels.push(r)})),h.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&(h.remapMatchIdForResultsMarkets(o,t),t.playerModels&&Object.keys(n).length)){var e=t.result;t.result=e.map((function(t){return n[t].id}))}return t})),[2,t];case 5:return l=t.results.map((function(t){return t.matchId})),[4,this.matchFacade.getMatchesMapWithNativeIds(l)];case 6:return c=a.sent(),t.results=t.results.map((function(t){return t.matchModel=c[t.matchId]?c[t.matchId]:null,h.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&h.remapMatchIdForResultsMarkets(c,t),t})),t.tieBreakers.goldenGoals.length?(d=t.tieBreakers.goldenGoals.map((function(t){return t.playerId})),[4,this.playerFacade.getPlayersMapWithNativeIds(d)]):[3,8];case 7:f=a.sent(),t.tieBreakers.goldenGoals=t.tieBreakers.goldenGoals.map((function(t){return t.matchModel=c[t.matchId],t.playerModel=f[t.playerId],h.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&(t.matchId=c[t.matchId].id,t.playerId=f[t.playerId].id),t})),a.label=8;case 8:return[2,t];case 9:return[2]}}))}))},this.completeContestWinners=function(t){return i(n,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return t.userList&&t.userList.length?(e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)]):[3,2];case 1:n=r.sent(),t.userList.forEach((function(t){var e=n.filter((function(e){return e.id===t.profileId}))[0];delete e.interests,t.profileModel=e})),r.label=2;case 2:return[2,t]}}))}))},this.handleMatchModel=function(t,e){t[e.matchId]?(e.matchModel=t[e.matchId],delete e.matchModel.availableMarkets,e.matchId=e.matchModel.id):(e.matchModel=null,n.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&n.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then((function(t){e.matchId=t[S.ID_TYPES[n.idMapping.idSchema]]})))},this.remapMatchIdForResultsMarkets=function(t,e){t[e.matchId]?e.matchId=t[e.matchId].id:n.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then((function(t){e.matchId=t[S.ID_TYPES[n.idMapping.idSchema]]}))},this.deleteUnexpectedProperties=function(t){return t.status&&(console.warn(O.WarningMessages.UNEXPECTED_STATUS_PROP),delete t.status),t.type&&(console.warn(O.WarningMessages.UNEXPECTED_TYPE_PROP),delete t.type),t},this.getMatchMarketsResults=function(t){return i(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.footballHttps.getMatchById(t,!0)];case 1:return"finished"===(e=i.sent()).status.type&&e.finishedAt?(n=[],e.timeline.filter((function(t){return Number(t.minute)<=90})).filter((function(t){return"goal"===t.type||"penalty_goal"===t.type||"yellow_card"===t.type||"red_card"===t.type})).forEach((function(t){n.push(t.player.id)})),r={},n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[3,3]):[2,new C.default];case 2:r=i.sent(),i.label=3;case 3:return[2,R.default.createMatchMarketsResultsModel(e,r)]}}))}))},this.footballHttps=new h.default(t),this.idMapping=e,this.matchFacade=new p.default(t,this.footballHttps,e),this.playerFacade=new w.default(t,this.footballHttps,e),this.profileNamespace=new T.default(t)}},12310:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(4021),a=n(94904),s=r(n(68097)),o=n(5318),u=n(27974),l=n(1976),c=r(n(61206)),d=r(n(45274)),f=r(n(91465)),h=r(n(47535)),p=r(n(91718)),m=r(n(27307)),v=r(n(85132)),_=r(n(87344)),y=r(n(71855)),g=r(n(81732)),b=r(n(45814)),w=r(n(53950)),E=n(91260),I=r(n(97640)),M=r(n(62535));e.default=function(t){var e=this;this.errorHandlingMode=null,this.validateBodyFields=function(t,n){var r=Object.keys(n),i=Object.keys(new w.default);switch(t){case"MATCH_QUIZ":r.forEach((function(t){i.includes(t)||e.throwInvalidParamException([t])}));break;case"TOP_X":var a=n;a.fixtures.forEach((function(t){return e.validateMarketTopX(t.market)})),r.includes("tiebreaker")&&a.tiebreaker&&e.validateTiebreaker(a.tiebreaker),r.forEach((function(t){"tiebreaker"===t||i.includes(t)||e.throwInvalidParamException([t])}))}var s=i.filter((function(t){return!r.includes(t)}));return s.length&&e.throwMissingFieldsException("game prediction body",s),n.fixtures.forEach((function(t){e.validateFixtureFields(t)})),n},this.validateFixture=function(t,n,r,i){e.validateMarket(n);var a=Object.values(l.OneXTwoEnum),s=Object.values(l.HalfTimeFullTimeEnum),o=Object.values(l.DoubleChanceEnum);if(n===u.MarketEnum.FT_1X2||n===u.MarketEnum.HT_1X2){if(a.includes(r))return new p.default(t,n,r)}else if(n===u.MarketEnum.HT_FT){if(s.includes(r))return new m.default(t,r)}else if(n===u.MarketEnum.DOUBLE_CHANCE){if(o.includes(r))return new h.default(t,r)}else if(n===u.MarketEnum.CORRECT_SCORE||n===u.MarketEnum.CORRECT_SCORE_ADVANCED||n===u.MarketEnum.CORRECT_SCORE_HT){if("string"==typeof r&&/\d+:\d+/.test(r))return new f.default(t,n,r)}else if(n===u.MarketEnum.CORNERS_MATCH){if("number"==typeof r)return new d.default(t,r)}else if(n===u.MarketEnum.BOTH_TEAMS_SCORE){if(e.isPredictionBoolean(r))return new c.default(t,r)}else if(n===u.MarketEnum.RED_CARD_MATCH){if(e.isPredictionBoolean(r))return new b.default(t,r)}else if(n===u.MarketEnum.PENALTY_MATCH){if(e.isPredictionBoolean(r))return new y.default(t,r)}else if(u.playerMarkets.includes(n)){var w="OWN_GOAL";if(e.validatePlayerId(n,i),n===u.playerMarketNobodyPrediction&&e.isPredictionBoolean(r)){var E=i&&i===w?w:i;return new g.default(t,n,r,E)}if(i&&e.isPredictionBoolean(r))return new g.default(t,n,r,i)}else if(u.MarketsOverGoals.includes(n)){if(e.isPredictionBoolean(r))return new _.default(t,n,r)}else if(u.MarketsOverCorners.includes(n)&&e.isPredictionBoolean(r))return new v.default(t,n,r);e.throwInvalidPredictionException(r,n)},this.validateFixtureFields=function(t){var n=Object.keys(t);n.forEach((function(t){E.validFixtureFields.includes(t)||e.throwInvalidParamException([t])}));var r=E.validFixtureFields.filter((function(t){if("matchType"!==t&&!n.includes(t))return t}));r.length&&e.throwMissingFieldsException("fixtures",r),e.validatePredictionKey(t.market,t.prediction)},this.validateTiebreaker=function(t){var n=Object.keys(t);n.length&&"object"==typeof t||e.throwInvalidType("tiebreaker","object");var r=Object.keys(new I.default)[0];n.forEach((function(t){r!==t&&e.throwInvalidParamException([t])})),n.includes(r)||e.throwMissingFieldsException("tiebreaker",[r]),"number"!=typeof t.goldenGoal&&e.throwInvalidType("goldenGoal","number")},this.validatePredictionKey=function(t,n){if("object"==typeof n){var r=Object.keys(n),i=["value"];if(r.length||e.throwMissingFieldsException("prediction",i),1!==r.length||r.includes(i[0])||e.throwInvalidParamException(r),r.length>1){u.playerMarkets.includes(t)&&i.push("playerId");var a=r.filter((function(t){return!i.includes(t)}));a.length&&e.throwInvalidParamException(a)}}else e.throwInvalidType("prediction","object")},this.validatePlayerId=function(t,n){var r="playerId";t!==u.playerMarketNobodyPrediction&&(n||e.throwInvalidParamException([r]),"string"!=typeof n&&e.throwInvalidType(r,"string"))},this.validateMarket=function(t){Object.values(u.MarketEnum).includes(t)||e.throwInvalidMarketException(t)},this.validateMarketTopX=function(t){t!==u.MarketEnum.CORRECT_SCORE&&t!==u.MarketEnum.CORRECT_SCORE_ADVANCED&&e.throwInvalidMarketException(t,"TOP_X")},this.isPredictionBoolean=function(t){return"boolean"==typeof t},this.throwInvalidPredictionException=function(t,n){var r=(0,o.invalidPredictionMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_PREDICTION,r);throw new M.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,r)},this.throwInvalidMarketException=function(t,n){var r;if(r=n&&"TOP_X"===n?(0,o.invalidMarketTopXMessage)(t):(0,o.invalidMarketMessage)(t),"default"===e.errorHandlingMode)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_MARKET,r);throw new M.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,r)},this.throwInvalidParamException=function(t){var n=(0,o.invalidFieldMessage)(t);if("default"===e.errorHandlingMode)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FIELD,n);throw new M.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,n)},this.throwMissingFieldsException=function(t,n){var r=(0,o.missingFieldsMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FIELD,r);throw new M.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,r)},this.throwInvalidType=function(t,n){var r=(0,o.invalidTypeMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,r);throw new M.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,r)},this.errorHandlingMode=t}},84306:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4021),o=n(94904),u=a(n(62535)),l=n(5318),c=a(n(87059)),d=a(n(48863)),f=a(n(35230)),h=a(n(86409)),p=a(n(45955)),m=a(n(73886)),v=a(n(54121)),_=a(n(31461)),y=a(n(49759)),g=a(n(88247)),b=a(n(42590));e.default=function(t){var e=this;this.factory=null,this.privateLeagueHttps=null,this.loyaltyHttps=null,this.profile=null,this.service=null,this.discussionsService=null,this.create=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=this.factory.createRequestBodyFromParam(t,"PRIVATE"),[4,this.privateLeagueHttps.create(e,"PRIVATE_LEAGUE")];case 1:return n=r.sent(),[4,this.service.setTemplateModels(n)];case 2:return r.sent(),[2,n]}}))}))},this.getById=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.privateLeagueHttps.getById(t,"PRIVATE_LEAGUE",n)];case 1:return e=r.sent(),[4,this.service.setTemplateModels(e)];case 2:return r.sent(),[2,e]}}))}))},this.getMyLeagues=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return t=new v.default(t),[4,this.privateLeagueHttps.getMyLeagues(t,"PRIVATE_LEAGUE")];case 1:return e=n.sent(),[4,this.service.setTemplateModelsInLeagues(e)];case 2:return n.sent(),[2,e]}}))}))},this.update=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return e=this.factory.createUpdateRequestBodyFromParam(n,"PRIVATE"),[4,this.privateLeagueHttps.update(t,e,"PRIVATE_LEAGUE")];case 1:return r=i.sent(),[4,this.service.setTemplateModels(r)];case 2:return i.sent(),[2,r]}}))}))},this.updateTemplate=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.privateLeagueHttps.updateLeagueTemplate(t,n,a,"PRIVATE_LEAGUE")];case 1:return e=r.sent(),[4,this.service.setTemplateModels(e)];case 2:return r.sent(),[2,e]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.delete(t,"PRIVATE_LEAGUE")];case 1:return[2,e.sent()]}}))}))},this.invite=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.invite(t,n)];case 1:return[2,e.sent()]}}))}))},this.deleteInvitation=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.deleteInvitation(t,n)];case 1:return[2,e.sent()]}}))}))},this.accept=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=!0,[4,this.privateLeagueHttps.accept(t,e,"PRIVATE_LEAGUE")];case 1:return n=r.sent(),[4,this.finalizeAcceptModel(n,e)];case 2:return[2,r.sent()]}}))}))},this.reject=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=!1,[4,this.privateLeagueHttps.accept(t,e,"PRIVATE_LEAGUE")];case 1:return n=r.sent(),[4,this.finalizeAcceptModel(n,e)];case 2:return[2,r.sent()]}}))}))},this.banUsers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.ban(t,n)];case 1:return[2,e.sent()]}}))}))},this.unbanUsers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.unban(t,n)];case 1:return[2,e.sent()]}}))}))},this.join=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.privateLeagueHttps.join(t)];case 1:return e=n.sent(),[4,this.finalizeAcceptModel(e,!0)];case 2:return[2,n.sent()]}}))}))},this.leave=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.leave(t,"PRIVATE_LEAGUE")];case 1:return[2,e.sent()]}}))}))},this.finalizeAcceptModel=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return n?[4,this.getById(t.leagueId)]:[3,2];case 1:e=r.sent(),t.leagueModel=e,r.label=2;case 2:return[4,this.service.setProfileModel(t)];case 3:return r.sent(),[2,t]}}))}))},this.getMyLeaguesStandings=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s,o;return i(this,(function(i){switch(i.label){case 0:return t&&(t=new _.default(t)),[4,this.profile.getOwn().getInfo()];case 1:return e=i.sent(),[4,this.loyaltyHttps.getUserRankingsForPrivateLeagueAndChallenges(e.id,"PRIVATE_LEAGUE",t)];case 2:n=i.sent(),r=0,a=n.data,i.label=3;case 3:return r<a.length?(s=a[r],[4,this.getById(s.privateLeagueId)]):[3,6];case 4:o=i.sent(),s.privateLeagueModel=o,i.label=5;case 5:return r++,[3,3];case 6:return this.service.setTemplateModelsFromLeagueModels(n.data,"PRIVATE_LEAGUE"),[2,n]}}))}))},this.getInvitations=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(t=new m.default(t)).type="PRIVATE",[4,this.privateLeagueHttps.getInvitations("PRIVATE_LEAGUE",t)];case 1:return e=n.sent(),[4,this.service.setTemplateModelsInLeagues(e.data)];case 2:return n.sent(),[2,e]}}))}))},this.getReportedPosts=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return n&&(n=new y.default(n)),[4,this.privateLeagueHttps.getReportedPosts(t,n)];case 1:return e=i.sent(),r=e,[4,this.discussionsService.finalizePostFullModel(e.data)];case 2:return r.data=i.sent(),[2,e]}}))}))},this.getPredictions=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:if(n){if(n.limit&&n.limit>20)throw new u.default(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_LIMIT,l.ErrorMessages.INVALID_LIMIT+20..toString());n=new g.default(n)}return[4,this.privateLeagueHttps.getPredictions(t,n)];case 1:return e=r.sent(),[4,this.service.setModelsForPredictions(e)];case 2:return[2,r.sent()]}}))}))},this.moderatePost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.moderatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.factory=new p.default,this.privateLeagueHttps=new d.default(t),this.loyaltyHttps=new c.default(t),this.profile=new h.default(t),this.service=new b.default(t),this.discussionsService=new f.default(t)}},45955:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(95124)),a=r(n(91796)),s=r(n(44823)),o=r(n(39845));e.default=function(){this.createRequestBodyFromParam=function(t,e){var n="PRIVATE"===e?new a.default:new i.default;return n.name=t.name,n.description=t.description,n.invitation_code=t.invitationCode,n.template_id=t.templateId,n.users_can_invite_users=t.usersCanInviteUsers,t.administrators?n.administrators=t.administrators:delete n.administrators,t.scoringStartsAt?n.scoring_starts_at=t.scoringStartsAt:delete n.scoring_starts_at,n},this.createUpdateRequestBodyFromParam=function(t,e){var n="PRIVATE"===e?new s.default:new o.default;return n.name=t.name,n.description=t.description,n.invitation_code=t.invitationCode,n.template_id=t.templateId,n.users_can_invite_users=t.usersCanInviteUsers,n.administrators=t.administrators,n.pinned_posts=t.pinnedPosts,n.scoring_starts_at=t.scoringStartsAt,n}}},73958:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profileId="",this.profileModel=null,this.leagueId="",this.leagueModel=null,this.message=""}},73886:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.type=null,n.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(n);return n.type&&(e+="&type=".concat(n.type)),e},n.type=e&&e.type?e.type:null,n}return i(e,t),e}(a(n(64800)).default);e.default=s},54121:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.type="PRIVATE",this.userRole=null,this.constructFiltersUrl=function(){var t="&type=".concat(e.type);return e.userRole&&(t+="&user_role=".concat(e.userRole)),t},this.userRole=(null==t?void 0:t.userRole)||null}},31461:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=null,this.page=null,this.leagueId=null,this.templateId=null,this.sortOrder=null,this.constructFiltersUrl=function(){var t="";return e.limit&&(t+="&limit=".concat(e.limit)),e.page&&(t+="&page=".concat(e.page)),e.leagueId&&(t+="&league_id=".concat(e.leagueId)),e.templateId&&(t+="&template_id=".concat(e.templateId)),e.sortOrder&&(t+="&sort_order=".concat(e.sortOrder)),t},this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null,this.leagueId=t&&t.leagueId?t.leagueId:null,this.templateId=t&&t.templateId?t.templateId:null,this.sortOrder=t&&t.sortOrder?t.sortOrder:null}},49759:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.reportsCount=null,n.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(n);return n.reportsCount&&(e+="&reports_count=".concat(n.reportsCount)),e},n.reportsCount=e.reportsCount?e.reportsCount:null,n}return i(e,t),e}(a(n(64800)).default);e.default=s},88247:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=null,this.page=null,this.profileIds=null,this.constructFiltersUrl=function(){var t="";return e.limit&&(t+="&limit=".concat(e.limit)),e.page&&(t+="&page=".concat(e.page)),e.profileIds&&(t+="&profile_ids=".concat(e.profileIds.join(","))),t},this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null,this.profileIds=t&&t.profileIds?t.leagueId:null}},72690:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30194));e.default=function(){this.id=null,this.name=null,this.model=new i.default}},78383:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.members=[],e}return i(e,t),e}(a(n(82446)).default);e.default=s},82446:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.name="",this.description="",this.type="",this.banned=[],this.invites=[],this.administrators=[],this.membersCount=0,this.invitationCode="",this.templateId="",this.templateModel=null,this.pastTemplates=[],this.usersCanInviteUsers=!1,this.scoringStartsAt="",this.pinnedPosts=[]}},98796:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.name="",this.description="",this.invitationCode="",this.templateId="",this.usersCanInviteUsers=!1,this.administrators=[],this.scoringStartsAt=""}},24225:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.name="",this.description="",this.invitationCode="",this.templateId="",this.usersCanInviteUsers=!1,this.administrators=[],this.pinnedPosts=[],this.scoringStartsAt=""}},52663:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.predictionId=null,this.predictionModel=null,this.profileId=null,this.profileModel=null}},16361:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569));e.default=function(){this.meta=new i.default,this.data=[]}},30494:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},99659:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.templateId="",this.templateModel=null,this.privateLeagueId="",this.privateLeagueModel=null,this.position="",this.points=0,this.type="private_league"}},84239:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872)),a=r(n(76085)),s=r(n(73569)),o=r(n(73958)),u=r(n(78383)),l=r(n(82446)),c=r(n(52663));e.default=function(){var t=this;this.remapToPrivateLeagues=function(e){return e.meta=t.remapMetaPrivateLeagues(e.meta.pagination),e.data=e.data.map((function(e){return t.remapToPrivateLeagueById(e)})),e},this.remapMetaPrivateLeagues=function(t){var e=new i.default;return e.pagination.itemsPerPage=t.items_per_page,e.pagination.nextPageStartsAfter=t.next_page_starts_after,e},this.remapToPrivateLeagueById=function(t){var e=new u.default;return e.id=t.id,e.name=t.name,e.description=t.description,e.type=t.type,e.members=t.members,e.administrators=t.administrators,e.banned=t.banned,e.invites=t.invites,e.membersCount=t.members_count,e.usersCanInviteUsers=t.users_can_invite_users,e.invitationCode=t.invitation_code,e.templateId=t.template_id,e.pastTemplates=t.past_templates,e.pinnedPosts=t.pinned_posts,e.scoringStartsAt=t.scoring_starts_at,e},this.remapToMyPrivateLeagues=function(t){var e=new l.default;return e.id=t.id,e.name=t.name,e.description=t.description,e.type=t.type,e.administrators=t.administrators,e.banned=t.banned,e.invites=t.invites,e.membersCount=t.members_count,e.usersCanInviteUsers=t.users_can_invite_users,e.invitationCode=t.invitation_code,e.templateId=t.template_id,e.pastTemplates=t.past_templates,e.pinnedPosts=t.pinned_posts,e.scoringStartsAt=t.scoring_starts_at,e},this.remapToAcceptPrivateLeague=function(t){var e=new o.default;return e.profileId=t.profile_id,e.leagueId=t.league_id,e.message=t.message,e},this.remapToAcceptChallenge=function(t){var e=new a.default;return e.profileId=t.profile_id,e.challengeId=t.league_id,e.message=t.message,e},this.remapPredictions=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapPredictionsData(e.data),e},this.remapMeta=function(t){var e=new s.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.numberOfPages=t.pagination.number_of_pages,e.pagination.totalItems=t.pagination.total_items,e},this.remapPredictionsData=function(t){return t.map((function(t){var e=new c.default;return e.predictionId=t.prediction_id,e.profileId=t.profile_id,e}))}}},2167:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.name="",this.description="",this.invitation_code="",this.template_id="",this.users_can_invite_users=!1,this.administrators=[],this.scoring_starts_at=""}},91796:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="PRIVATE",e}return i(e,t),e}(a(n(2167)).default);e.default=s},64584:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.name="",this.description="",this.invitation_code="",this.template_id="",this.users_can_invite_users=!1,this.administrators=[],this.pinned_posts=[],this.scoring_starts_at=""}},44823:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="PRIVATE",e}return i(e,t),e}(a(n(64584)).default);e.default=s},83281:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(84306));e.default=function(t){var e=this;this.privateLeaguesFacade=null,this.create=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.create(t)];case 1:return[2,e.sent()]}}))}))},this.update=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.update(t,n)];case 1:return[2,e.sent()]}}))}))},this.updateTemplate=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.updateTemplate(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyLeagues=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getMyLeagues(t)];case 1:return[2,e.sent()]}}))}))},this.invite=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.invite(t,n)];case 1:return[2,e.sent()]}}))}))},this.deleteInvitation=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.deleteInvitation(t,n)];case 1:return[2,e.sent()]}}))}))},this.accept=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.accept(t)];case 1:return[2,e.sent()]}}))}))},this.reject=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.reject(t)];case 1:return[2,e.sent()]}}))}))},this.banUsers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.banUsers(t,n)];case 1:return[2,e.sent()]}}))}))},this.unbanUsers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.unbanUsers(t,n)];case 1:return[2,e.sent()]}}))}))},this.join=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.join(t)];case 1:return[2,e.sent()]}}))}))},this.leave=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.leave(t)];case 1:return[2,e.sent()]}}))}))},this.getMyLeaguesStandings=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getMyLeaguesStandings(t)];case 1:return[2,e.sent()]}}))}))},this.getInvitations=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getInvitations(t)];case 1:return[2,e.sent()]}}))}))},this.getReportedPosts=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getReportedPosts(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPredictions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getPredictions(t,n)];case 1:return[2,e.sent()]}}))}))},this.moderatePost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.moderatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.privateLeaguesFacade=new s.default(t)}},42590:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(92962)),o=a(n(86409)),u=a(n(71259));e.default=function(t){var e=this;this.loyalty=null,this.profile=null,this.predictor=null,this.setTemplateModels=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.loyalty.getTemplates()];case 1:return e=n.sent(),t.templateModel=e.data.find((function(e){return e.id===t.templateId})),t.pastTemplates&&t.pastTemplates.length>0&&t.pastTemplates.forEach((function(t){t.model=e.data.find((function(e){return e.id===t.id}))})),[2]}}))}))},this.setTemplateModelsInLeagues=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return t.length?[4,this.loyalty.getTemplates()]:[2];case 1:return e=n.sent(),t.forEach((function(t){t.templateModel=e.data.find((function(e){return e.id===t.templateId})),t.pastTemplates&&t.pastTemplates.length>0&&t.pastTemplates.forEach((function(t){t.model=e.data.find((function(e){return e.id===t.id}))}))})),[2]}}))}))},this.setTemplateModelsFromLeagueModels=function(t,e){"PRIVATE_LEAGUE"!==e?t.forEach((function(t){t.templateModel=t.templateId===t.challengeModel.templateId?t.challengeModel.templateModel:t.challengeModel.pastTemplates.find((function(e){return e.id===t.templateId})).model})):t.forEach((function(t){t.templateModel=t.templateId===t.privateLeagueModel.templateId?t.privateLeagueModel.templateModel:t.privateLeagueModel.pastTemplates.find((function(e){return e.id===t.templateId})).model}))},this.setProfileModel=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.profile.getById(t.profileId).getInfo()];case 1:return e=n.sent(),t.profileModel=e,[2]}}))}))},this.setModelsForPredictions=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:return t.data.length?(e=t.data.map((function(t){return t.profileId})),n=t.data.map((function(t){return t.predictionId})),[4,this.getProfileModels(e)]):[3,3];case 1:return r=i.sent(),[4,this.getPredictionModels(n)];case 2:a=i.sent(),t.data.forEach((function(t){t.profileModel=r.find((function(e){return e.id===t.profileId})),t.predictionModel=a.find((function(e){return e.id===t.predictionId}))})),i.label=3;case 3:return[2,t]}}))}))},this.getProfileModels=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profile.getByIds(t)];case 1:return[2,e.sent()]}}))}))},this.getPredictionModels=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictor.getPredictionsByIds(t)];case 1:return[2,e.sent()]}}))}))},this.loyalty=new s.default(t),this.profile=new o.default(t),this.predictor=new u.default(t)}},64831:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=o(n(79072)),l=o(n(17232)),c=o(n(94268)),d=o(n(68097)),f=o(n(62535)),h=n(4021),p=n(94904),m=n(5318);e.default=function(t,e,n,o,v){var _=this;this.idsRemapper=null,this.profileHttps=null,this.profileService=null,this.localCache=null,this.profileFacade=null,this.ownProfile=null,this.modified=!1,this.expireAt=0,this.promises=[],this.isFetching=!1,this.configuration=null,this.getOwnProfile=function(){return i(_,void 0,void 0,(function(){var t,e,n;return a(this,(function(r){switch(r.label){case 0:return this.isFetching?(console.log("Another thread is fetching profile..."),[4,this.delay(100)]):[3,2];case 1:return r.sent(),[3,0];case 2:if(this.modified&&this.ownProfile)return console.log("Timestamp is less than 10 minutes OR profile is modifying "),[2,this.ownProfile];if(t=Math.floor(Date.now()/1e3),this.ownProfile&&!(this.expireAt<t))return[3,8];this.isFetching=!0,this.expireAt=Math.floor(Date.now()/1e3)+600,r.label=3;case 3:return r.trys.push([3,6,,7]),[4,this.clearAllProfileData()];case 4:return r.sent(),[4,this.profileFacade.getOwn()];case 5:return e=r.sent(),this.setOwnProfile(e),[3,7];case 6:throw n=r.sent(),this.isFetching=!1,n;case 7:return this.modified=!1,this.isFetching=!1,[2,this.ownProfile];case 8:return[2,this.ownProfile]}}))}))},this.delay=function(t){return new Promise((function(e){setTimeout(e,t)}))},this.setOwnProfile=function(t){_.ownProfile=t},this.getInfo=function(){return i(_,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),delete(e=JSON.parse(JSON.stringify(t))).interests,[2,e]}}))}))},this.showInterests=function(){return i(_,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.remapInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return i(_,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.showFullInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowers(t)];case 1:return[2,e.sent()]}}))}))},this.getFollowing=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowing(t)];case 1:return[2,e.sent()]}}))}))},this.follow=function(t){return i(_,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.follow(t)];case 1:return e=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,e]}}))}))},this.unfollow=function(t){return i(_,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.unfollow(t)];case 1:return e=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,e]}}))}))},this.getStats=function(){return i(_,void 0,void 0,(function(){var t;return a(this,(function(e){switch(e.label){case 0:return[4,this.clearAllProfileData()];case 1:return e.sent(),[4,this.profileFacade.getStats()];case 2:return t=e.sent(),[4,this.idsRemapper.remapProfileStats(t)];case 3:return[2,e.sent()]}}))}))},this.getBadges=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.clearAllProfileData()];case 1:return e.sent(),[4,this.profileFacade.getBadges(t)];case 2:return[2,e.sent()]}}))}))},this.addInterestPromise=function(t){return i(_,void 0,void 0,(function(){var e,n,i;return a(this,(function(a){switch(a.label){case 0:return this.modified=!0,e=r({},t),[4,this.getOwnProfile()];case 1:return a.sent(),n=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(e)];case 2:return n=a.sent(),[3,4];case 3:n=e,a.label=4;case 4:return i=this.ownProfile.interests.filter((function(t){return t.id!==n.id||t.type!==n.type||t.source!==n.source})),this.ownProfile.interests=s([],i,!0),this.ownProfile.interests.push(n),[2,this]}}))}))},this.addInterest=function(t){return _.promises.push(_.addInterestPromise(t)),_},this.removeInterestPromise=function(t){return i(_,void 0,void 0,(function(){var e,n;return a(this,(function(i){switch(i.label){case 0:return this.modified=!0,e=r({},t),[4,this.getOwnProfile()];case 1:return i.sent(),n=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(e)];case 2:return n=i.sent(),[3,4];case 3:n=e,i.label=4;case 4:return this.ownProfile.interests=this.ownProfile.interests.filter((function(t){return t.id!==n.id||t.type!==n.type||t.source!==n.source})),[2,this]}}))}))},this.removeInterest=function(t){return _.promises.push(_.removeInterestPromise(t)),_},this.setBirthdatePromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.birthDate=t||null,[2,this]}}))}))},this.setBirthdate=function(t){return _.promises.push(_.setBirthdatePromise(t)),_},this.setGenderPromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.gender="male"===t||"female"===t?t:"unspecified",[2,this]}}))}))},this.setGender=function(t){return _.promises.push(_.setGenderPromise(t)),_},this.setNicknamePromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.nickname=t,[2,this]}}))}))},this.setNickname=function(t){return _.promises.push(_.setNicknamePromise(t)),_},this.setNamePromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.name=t,[2,this]}}))}))},this.setName=function(t){return _.promises.push(_.setNamePromise(t)),_},this.setCountryPromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),t&&!this.ownProfile.country?(this.ownProfile.country=new u.default,this.ownProfile.country.id=t):t&&this.ownProfile.country?this.ownProfile.country.id=t:this.ownProfile.country=null,[2,this]}}))}))},this.setCountry=function(t){return _.promises.push(_.setCountryPromise(t)),_},this.showFullnessProfile=function(){return i(_,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[2,this.profileFacade.showFullnessProfile(e)]}}))}))},this.setAvatarPromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:if(e.sent(),this.profileService.isAvatarValidURL(t))this.ownProfile.avatar=t;else{if("default"===this.configuration.errorHandlingMode)throw new d.default(h.ErrorCodes.BAD_METHOD_CALL,p.ErrorStatuses.INVALID_AVATAR,m.ErrorMessages.INVALID_AVATAR);if("standard"===this.configuration.errorHandlingMode)throw new f.default(h.ErrorCodes.BAD_METHOD_CALL,p.ErrorStatuses.INVALID_AVATAR,m.ErrorMessages.INVALID_AVATAR)}return[2,this]}}))}))},this.setAvatar=function(t){return _.promises.push(_.setAvatarPromise(t)),_},this.delete=function(){return i(_,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.profileHttps.deleteOwnProfile()];case 1:return t.sent(),[4,this.profileFacade.clearLocalStorageData()];case 2:return t.sent(),[2,!0]}}))}))},this.deleteData=function(){return i(_,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.profileHttps.deleteUserData()];case 1:return t.sent(),[4,this.profileFacade.clearLocalStorageData()];case 2:return t.sent(),[2,!0]}}))}))},this.setEmailPromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),"string"==typeof t&&t?this.ownProfile.email=t:console.warn("Wrong email argument: ".concat(t,". Will be ignored when updating profile")),[2,this]}}))}))},this.setEmail=function(t){return _.promises.push(_.setEmailPromise(t)),_},this.setPhoneCountryCodePromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),null===t||"string"==typeof t&&t?this.ownProfile.phoneCountryCode=t:console.warn("Wrong phoneCountryCode argument: ".concat(t,". Will be ignored when updating profile")),[2,this]}}))}))},this.setPhoneCountryCode=function(t){return _.promises.push(_.setPhoneCountryCodePromise(t)),_},this.setPhoneNumberPromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),null===t||"string"==typeof t&&t?this.ownProfile.phoneNumber=t:console.warn("Wrong phoneNumber argument: ".concat(t,". Will be ignored when updating profile")),[2,this]}}))}))},this.setPhoneNumber=function(t){return _.promises.push(_.setPhoneNumberPromise(t)),_},this.update=function(){return i(_,void 0,void 0,(function(){var t,e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return 0===this.promises.length?[2,this.ownProfile]:[4,Promise.all(this.promises)];case 1:return a.sent(),[4,this.profileFacade.getOwn()];case 2:return t=a.sent(),[4,this.getOwnProfile()];case 3:return e=a.sent(),n=this.profileService.extractUpdatedProps(t,e),this.modified=!1,this.expireAt=0,Object.keys(n).length?[4,this.profileHttps.updateProfile(n)]:[3,6];case 4:return r=a.sent(),i=JSON.parse(JSON.stringify(r)),this.setOwnProfile(i),[4,this.localCache.setOwnProfile(i)];case 5:return a.sent(),delete r.interests,[2,r];case 6:return delete(s=JSON.parse(JSON.stringify(this.ownProfile))).interests,[2,s]}}))}))},this.clearAllProfileData=function(){return i(_,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.isNewProfileRequested()];case 1:return t.sent()?[4,this.profileFacade.clearLocalStorageData()]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},this.isNewProfileRequested=function(){return i(_,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return(t=this.profileHttps.extractUserIdFromToken())?this.ownProfile?[3,2]:[4,this.profileFacade.getOwnProfileFromCache()]:[2,!1];case 1:return(e=n.sent())&&Object.keys(e).length&&e.id!==t?[2,!0]:[2,!1];case 2:return this.ownProfile.id!==t?[2,!0]:[2,!1]}}))}))},this.configuration=t,this.idsRemapper=e,this.localCache=n,this.profileHttps=o,this.profileService=new c.default,this.profileFacade=new l.default(n,o,v)}},90642:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(17232));e.default=function t(e,n,a,o){var u=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.profileFacade=null,this.profileId="",this.localCache=null,this.getById=function(e){return new t(u.idsRemapper,u.localCache,u.profileHttps,u.activityHttps).setId(e)},this.setId=function(t){return u.profileId=t,u},this.getProfile=function(){return r(u,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getById(this.profileId)];case 1:return[2,t.sent()]}}))}))},this.getInfo=function(){return r(u,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getProfile()];case 1:return delete(t=e.sent()).interests,[2,t]}}))}))},this.showInterests=function(){return r(u,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.remapInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(u,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.showFullInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(t){return r(u,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowers(t,this.profileId)];case 1:return[2,e.sent()]}}))}))},this.getFollowing=function(t){return r(u,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowing(t,this.profileId)];case 1:return[2,e.sent()]}}))}))},this.showFullnessProfile=function(){return r(u,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getProfile()];case 1:return t=e.sent(),[2,this.profileFacade.showFullnessProfile(t)]}}))}))},this.getStats=function(t){return r(u,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.activityHttps.getStats(this.profileId,t)];case 1:return e=n.sent(),[4,this.idsRemapper.remapProfileStats(e)];case 2:return[2,n.sent()]}}))}))},this.getBadges=function(){return r(u,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileHttps.getBadges(this.profileId)];case 1:return[2,t.sent()]}}))}))},this.idsRemapper=e,this.profileHttps=a,this.activityHttps=o,this.localCache=n,this.profileFacade=new s.default(n,a,o)}},17232:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99037)),o=a(n(69523)),u=a(n(62535)),l=n(4021),c=n(94904),d=n(5318),f=a(n(68097));e.default=function(t,e,n,a){var h=this;this.profileHttps=null,this.activityHttps=null,this.errorHandlingMode=null,this.getOwn=function(){return r(h,void 0,void 0,(function(){var t,e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.getLocalStorageData("profile")];case 1:if((t=r.sent())&&Object.keys(t).length)return[2,JSON.parse(JSON.stringify(t))];r.label=2;case 2:return r.trys.push([2,5,,6]),[4,this.profileHttps.getProfile()];case 3:return e=r.sent(),[4,this.localCache.setOwnProfile(e)];case 4:return r.sent(),[2,e];case 5:throw n=r.sent(),console.warn("There was a problem retrieving your profile: ",n),n;case 6:return[2]}}))}))},this.getOwnProfileFromCache=function(){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.localCache.getOwnProfile()];case 1:return[2,t.sent()]}}))}))},this.updateOwnProfile=function(){return r(h,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.profileHttps.getProfile()];case 1:return t=n.sent(),[4,this.localCache.setOwnProfile(t)];case 2:return n.sent(),[2,t];case 3:throw e=n.sent(),console.warn("There was a problem retrieving your profile: ",e),e;case 4:return[2]}}))}))},this.getByIds=function(t,e,n){return r(h,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:if(t&&t.length>0&&e||!t&&0===t.length&&!e)throw new u.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_METHOD_CALL,d.ErrorMessages.INVALID_GET_PROFILES_METHOD_CALL);i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getProfiles(t,e,n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the selected profiles: ".concat(t.join(",")," "),r),r;case 4:return[2]}}))}))},this.getById=function(t){return r(h,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the selected profile: ".concat(t," "),e),e;case 3:return[2]}}))}))},this.getCountries=function(t){return r(h,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,[4,this.localCache.getProfileCountries()];case 1:if((e=i.sent())&&e.length>0)return[2,e];i.label=2;case 2:return i.trys.push([2,5,,6]),[4,this.profileHttps.getCountries(t)];case 3:return n=i.sent(),[4,this.localCache.setProfileCountries(n)];case 4:return i.sent(),[2,n];case 5:throw r=i.sent(),console.warn("There was a problem retrieving profile countries: ",r),r;case 6:return[2]}}))}))},this.getFollowers=function(t,e){return r(h,void 0,void 0,(function(){var n,r,a,s,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new o.default(t)),[4,this.profileHttps.getFollowers(t,e)];case 1:return n=i.sent(),(r=n.data.map((function(t){return t.followerId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return a=i.sent(),s=n.data.map((function(t){return a.forEach((function(e){t.followerId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=s,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your followers: ",u),u;case 5:return[2]}}))}))},this.getFollowing=function(t,e){return r(h,void 0,void 0,(function(){var n,r,a,s,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new o.default(t)),[4,this.profileHttps.getFollowing(t,e)];case 1:return n=i.sent(),(r=n.data.map((function(t){return t.followingId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return a=i.sent(),s=n.data.map((function(t){return a.forEach((function(e){t.followingId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=s,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your following profiles: ",u),u;case 5:return[2]}}))}))},this.follow=function(t){return r(h,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.follow(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem following profiles: ".concat(t.join(",")," "),e),e;case 3:return[2]}}))}))},this.unfollow=function(t){return r(h,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.unfollow(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem unfollowing profiles: ".concat(t.join(",")," "),e),e;case 3:return[2]}}))}))},this.showFullnessProfile=function(t){var e=new s.default,n=0;return t.avatar&&(e.breakdown.addedAvatar.completed=!0,n+=e.breakdown.addedAvatar.percentage),t.birthDate&&(e.breakdown.addedBirthdate.completed=!0,n+=e.breakdown.addedBirthdate.percentage),t.country&&(e.breakdown.addedCountry.completed=!0,n+=e.breakdown.addedCountry.percentage),t.gender&&(e.breakdown.addedGender.completed=!0,n+=e.breakdown.addedGender.percentage),t.interests&&t.interests.length>0&&(t.interests.find((function(t){return"team"===t.type&&t.favourite}))&&(e.breakdown.teamFavourite.completed=!0,n+=e.breakdown.teamFavourite.percentage),t.interests.find((function(t){return"team"===t.type}))&&(e.breakdown.teamFollowed.completed=!0,n+=e.breakdown.teamFollowed.percentage),t.interests.find((function(t){return"player"===t.type&&t.favourite}))&&(e.breakdown.playerFavourite.completed=!0,n+=e.breakdown.playerFavourite.percentage),t.interests.find((function(t){return"player"===t.type}))&&(e.breakdown.playerFollowed.completed=!0,n+=e.breakdown.playerFollowed.percentage),t.interests.find((function(t){return"competition"===t.type&&t.favourite}))&&(e.breakdown.competitionFavourite.completed=!0,n+=e.breakdown.competitionFavourite.percentage),t.interests.find((function(t){return"competition"===t.type}))&&(e.breakdown.competitionFollowed.completed=!0,n+=e.breakdown.competitionFollowed.percentage)),e.totalPercentage=n,e},this.getStats=function(){return r(h,void 0,void 0,(function(){var t,e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.getLocalStorageData("statistics")];case 1:if((t=r.sent())&&Object.keys(t).length)return[2,JSON.parse(JSON.stringify(t))];r.label=2;case 2:return r.trys.push([2,5,,6]),[4,this.activityHttps.getStats()];case 3:return e=r.sent(),[4,this.localCache.setProfileStats(e)];case 4:return r.sent(),[2,e];case 5:throw n=r.sent(),console.warn("There was a problem retrieving own profile statistics: ",n),n;case 6:return[2]}}))}))},this.getBadges=function(t){return r(h,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:if(!t)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getBadges()];case 2:return[2,i.sent()];case 3:throw e=i.sent(),console.warn("There was a problem retrieving own profile badges: ",e),e;case 4:return[4,this.getLocalStorageData("badges")];case 5:if(n=i.sent())return[2,n];i.label=6;case 6:return i.trys.push([6,9,,10]),[4,this.profileHttps.getBadges()];case 7:return r=i.sent(),[4,this.localCache.setProfileBadges(r)];case 8:return i.sent(),[2,r];case 9:throw a=i.sent(),console.warn("There was a problem retrieving own profile badges: ",a),a;case 10:return[2]}}))}))},this.clearLocalStorageData=function(){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.localCache.setOwnProfile({})];case 1:return t.sent(),[4,this.localCache.setProfileStats({})];case 2:return t.sent(),[4,this.localCache.setProfileBadges(null)];case 3:return t.sent(),[2]}}))}))},this.collectLead=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(this.errorHandlingMode&&!t){if("standard"===this.errorHandlingMode)throw new u.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_METHOD_CALL,d.ErrorMessages.INVALID_COLLECT_LEAD_METHOD_CALL);throw new f.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_METHOD_CALL,d.ErrorMessages.INVALID_COLLECT_LEAD_METHOD_CALL)}return[4,this.profileHttps.collectLead(t)];case 1:return[2,e.sent()]}}))}))},this.checkFollowStatus=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(!t||!Array.isArray(t)||0===t.length){if("standard"===this.errorHandlingMode)throw new u.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_METHOD_CALL,d.ErrorMessages.INVALID_OR_EMPTY_IDS);throw new f.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_METHOD_CALL,d.ErrorMessages.INVALID_OR_EMPTY_IDS)}return[4,this.profileHttps.checkFollowStatus(t)];case 1:return[2,e.sent()]}}))}))},this.getLocalStorageData=function(t){return r(h,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=Math.floor(Date.now()/1e3),[4,this.localCache.getExpiration("profile",t)];case 1:switch(n=r.sent(),t){case"profile":return[3,2];case"statistics":return[3,4];case"badges":return[3,6]}return[3,8];case 2:return n>e?[4,this.localCache.getOwnProfile()]:[3,4];case 3:case 5:case 7:return[2,r.sent()];case 4:return n>e?[4,this.localCache.getProfileStats()]:[3,6];case 6:return n>e?[4,this.localCache.getProfileBadges()]:[3,8];case 8:return[2,null]}}))}))},this.localCache=t,this.profileHttps=e,this.activityHttps=n,this.errorHandlingMode=a}},90133:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.email=null,e.phoneNumber=null,e.phoneCountryCode=null,e.preferences=null,e}return i(e,t),e}(a(n(23546)).default);e.default=s},69523:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=0,this.startAfter=null,this.constructFilterUrl=function(){var t="";return e.limit&&(t+="&",t+="limit=".concat(e.limit)),e.startAfter&&(t+="&",t+="start_after=".concat(e.startAfter)),t},this.limit=t.limit?t.limit:20,this.startAfter=t.startAfter?t.startAfter:null}},28212:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.followsMe=[],this.iFollow=[],this.followsMeBack=[]}},54782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.avatar=null,this.followerId=null,this.name=null,this.nickname=null,this.profileId=null}},41712:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profile_ids=[]}},93106:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.avatar=null,this.followingId=null,this.name=null,this.nickname=null,this.profileId=null}},25156:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.model=null,e}return i(e,t),e}(a(n(45867)).default);e.default=s},76620:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(47312));e.default=function(){this.teamFollowed=new i.default(10),this.teamFavourite=new i.default(15),this.playerFollowed=new i.default(10),this.playerFavourite=new i.default(10),this.competitionFollowed=new i.default(10),this.competitionFavourite=new i.default(5),this.addedBirthdate=new i.default(10),this.addedGender=new i.default(10),this.addedCountry=new i.default(10),this.addedAvatar=new i.default(10)}},47312:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){this.completed=!1,this.percentage=t}},99037:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(76620));e.default=function(){this.breakdown=new i.default}},45867:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.source="",this.type="",this.favourite=!1}},84440:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.leadId=null,this.profileId=null,this.firstName=null,this.lastName=null,this.fullName=null,this.email=null,this.gender=null,this.country=null,this.phoneCountryCode=null,this.phoneNumber=null,this.campaignId=null,this.campaignName=null,this.contentType=null,this.contentId=null,this.contentName=null,this.customFields=null}},31488:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.firstName=null,this.lastName=null,this.fullName=null,this.email=null,this.gender=null,this.country=null,this.phoneCountryCode=null,this.phoneNumber=null,this.campaignId=null,this.campaignName=null,this.contentType=null,this.contentId=null,this.contentName=null,this.customFields=null}},79072:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.assets=null}},23546:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.nickname=null,this.avatar=null,this.gender=null,this.country=null,this.birthDate=null,this.verified=!1,this.staffMember=!1,this.anonymous=!1,this.disabled=!1,this.interests=[],this.followingCount=0,this.followersCount=0}},66277:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(81553)),a=r(n(54782)),s=r(n(28212));e.default=function(){var t=this;this.followersFromResponse=function(e){var n=new i.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapResponse(e)})),n},this.followStatusFromResponse=function(t){var e=new s.default;return e.iFollow=t.i_follow,e.followsMe=t.follows_me,e.followsMeBack=t.follows_me_back,e},this.remapResponse=function(t){var e=new a.default;return e.avatar=t.avatar,e.followerId=t.follower_id,e.name=t.name,e.profileId=t.profile_id,e}}},38673:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(81553)),a=r(n(93106));e.default=function(){var t=this;this.followResponse=function(e){return e.map((function(e){return t.remapResponse(e)}))},this.followingFromResponse=function(e){var n=new i.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapResponse(e)})),n},this.remapResponse=function(t){var e=new a.default;return e.avatar=t.avatar,e.followingId=t.following_id,e.name=t.name,e.profileId=t.profile_id,e.nickname=t.nickname,e}}},97627:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(84440)),a=function(){function t(){}return t.prototype.toRequest=function(t){return{first_name:t.firstName||null,last_name:t.lastName||null,full_name:t.fullName||null,email:t.email||null,gender:t.gender||null,country:t.country||null,phone_country_code:t.phoneCountryCode||null,phone_number:t.phoneNumber||null,campaign_id:t.campaignId||null,campaign_name:t.campaignName||null,content_type:t.contentType||null,content_id:t.contentId||null,content_name:t.contentName||null,custom_fields:t.customFields||null}},t.prototype.fromResponse=function(t){var e=new i.default;return e.leadId=t.lead_id,e.profileId=t.profile_id,e.firstName=t.first_name,e.lastName=t.last_name,e.fullName=t.full_name,e.email=t.email,e.gender=t.gender,e.country=t.country,e.phoneCountryCode=t.phone_country_code,e.phoneNumber=t.phone_number,e.campaignId=t.campaign_id,e.campaignName=t.campaign_name,e.contentId=t.content_id,e.contentType=t.content_type,e.contentName=t.content_name,e.customFields=t.custom_fields,e},t}();e.default=a},441:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23546)),a=r(n(90133));e.default=function(){var t=this;this.profilesFromResponse=function(e){return e?e.map((function(e){return t.publicProfileFromResponse(e)})):null},this.fullProfileFromResponse=function(e){var n=new a.default;return n.id=e.id,n.name=e.name,n.email=e.email,n.nickname=e.nickname,n.avatar=e.avatar,n.gender=e.gender,n.country=e.country,n.birthDate=e.birth_date,n.phoneCountryCode=e.phone_country_code,n.phoneNumber=e.phone_number,n.verified=e.verified,n.staffMember=e.staff_member,n.anonymous=e.anonymous,n.disabled=e.disabled,n.interests=e.interests?e.interests:[],n.preferences=e.preferences?t.remapPreferences(e.preferences):[],n.followingCount=e.following_count,n.followersCount=e.followers_count,n},this.publicProfileFromResponse=function(t){var e=new i.default;return e.id=t.id,e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar,e.gender=t.gender,e.country=t.country,e.birthDate=t.birth_date,e.verified=t.verified,e.staffMember=t.staff_member,e.anonymous=t.anonymous,e.disabled=t.disabled,e.interests=t.interests?t.interests:[],e.followingCount=t.following_count,e.followersCount=t.followers_count,e},this.remapPreferences=function(t){return t.map((function(t){return{preferenceId:t.preference_id,categories:t.categories,source:t.source}}))}}},61758:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.achievedAt=""}},86635:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participationCount=null,this.points=null}},13009:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.totalPoints=null,this.postPoints=null,this.postsMade=null,this.reactionPoints=null,this.reactionCount=null}},57165:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participationCount=null}},3621:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participations=0,this.points=0}},5490:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(3621)),a=r(n(81342));e.default=function(){this.single=new a.default,this.topX=new i.default,this.matchQuiz=new i.default}},81316:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(86635)),a=r(n(13009)),s=r(n(57165)),o=r(n(5490)),u=r(n(75123));e.default=function(){this.successRates=new u.default,this.predictions=new o.default,this.tiers=[],this.badges=[],this.discussions=new a.default,this.classicQuizzes=new i.default,this.eitherOr=new s.default}},53195:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityId="",this.entityType="",this.entitySource="",this.model=null,this.predictionsMade=0,this.correct=0,this.points=0}},81342:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(63087));e.default=function(){this.predictionsMade=0,this.correct=0,this.points=0,this.breakdown=new i.default}},9826:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.model=null}},75123:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},63087:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.footballCompetitions=[],this.footballTeams=[]}},86409:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(84275)),o=a(n(88900)),u=a(n(17232)),l=a(n(64831)),c=a(n(90642)),d=a(n(4289)),f=a(n(60595)),h=a(n(71022)),p=a(n(14912)),m=a(n(78358));e.default=function(t){var e=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.footballHttps=null,this.footballFacade=null,this.idMapping=null,this.localCache=null,this.profileFacade=null,this.ownProfileBuilder=null,this.profileBuilder=null,this.getOwn=function(){return e.ownProfileBuilder},this.getById=function(t){return e.profileBuilder.getById(t)},this.getCountries=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getCountries(t)];case 1:return[2,e.sent()]}}))}))},this.getByIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getByIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.collectLead=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.collectLead(t)];case 1:return[2,e.sent()]}}))}))},this.checkFollowStatus=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.checkFollowStatus(t)];case 1:return[2,e.sent()]}}))}))},this.getOwnStats=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.ownProfileBuilder.getStats()];case 1:return[2,t.sent()]}}))}))},this.getStats=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileBuilder.getById(t).getStats(n)];case 1:return[2,e.sent()]}}))}))},this.getOwnBadges=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.ownProfileBuilder.getBadges()];case 1:return[2,t.sent()]}}))}))},this.getBadges=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileBuilder.getById(t).getBadges()];case 1:return[2,e.sent()]}}))}))},this.profileHttps=new s.default(t),this.activityHttps=new h.default(t),this.footballHttps=new f.default(t),this.idMapping=new o.default(t),this.localCache=(new m.default).createLocalCacheInstance(t.idSchema),this.footballFacade=new d.default(t,this.localCache,this.footballHttps,this.idMapping),this.profileFacade=new u.default(this.localCache,this.profileHttps,this.activityHttps,t.errorHandlingMode),this.idsRemapper=new p.default(t,this.footballFacade),this.ownProfileBuilder=new l.default(t,this.idsRemapper,this.localCache,this.profileHttps,this.activityHttps),this.profileBuilder=new c.default(this.idsRemapper,this.localCache,this.profileHttps,this.activityHttps)}},94268:function(t,e){"use strict";var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.extractUpdatedProps=function(e,n){var r=["name","nickname","gender","avatar","email"],i={};return Object.keys(e).forEach((function(a){if(r.includes(a)&&e[a]!==n[a])i[a]=n[a];else if("phoneCountryCode"===a)e[a]&&null===n[a]?i.phone_country_code=null:(null===e[a]&&n[a]||e[a]!==n[a])&&(i.phone_country_code=n[a]);else if("phoneNumber"===a)(e[a]&&null===n[a]||null===e[a]&&n[a]||e[a]!==n[a])&&(i.phone_number=n[a]);else if("birthDate"===a)(null===n[a]||null===e[a]&&n[a]||e[a]!==n[a])&&(i.birth_date=n[a]);else if("country"===a)null===n[a]?i.country_id=n[a]:(null===e[a]&&n[a]||e[a].id!==n[a].id)&&(i.country_id=n[a].id);else if("interests"===a){var s=e[a],o=n[a];o.length&&t.isNewInterest(s,o)?i[a]=t.updateInterests(s,o):!o.length&&s.length?i[a]=o:s.length===o.length||t.isNewInterest(s,o)||(i[a]=o)}})),i},this.updateInterests=function(e,r){if(e.length===r.length){var i=t.extractSameAndNewInterests(e,r),a=i[0],s=i[1];return n(n([],s,!0),a,!0)}return r},this.isNewInterest=function(e,n){var r=!1;return t.extractSameAndNewInterests(e,n)[0].length?r=!0:r},this.extractSameAndNewInterests=function(t,e){var n=e.filter((function(e){return t.some((function(t){return e.id===t.id&&e.type===t.type&&e.source===t.source&&e.favourite===t.favourite}))}));return[e.filter((function(e){return!t.some((function(t){return e.id===t.id&&e.type===t.type&&e.source===t.source&&e.favourite===t.favourite}))})),n]},this.isAvatarValidURL=function(t){try{return new URL(t),!0}catch(t){return!1}}}},31267:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.KEY_PREFIX="fu-progress-",this.get=function(e,n){var r=localStorage.getItem("".concat(t.KEY_PREFIX).concat(e,"-").concat(n));return r?JSON.parse(r):r},this.set=function(e,n,r){return localStorage.setItem("".concat(t.KEY_PREFIX).concat(e,"-").concat(n),JSON.stringify(r)),JSON.stringify(r)},this.delete=function(e,n){localStorage.removeItem("".concat(t.KEY_PREFIX).concat(e,"-").concat(n))}}},58298:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(91450)),o=a(n(86409)),u=a(n(46914)),l=a(n(1117)),c=a(n(95018));e.default=function(t){var e=this;this.https=null,this.profile=null,this.validator=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t&&(t=new u.default(t)),[4,this.https.getStandingsGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.getStandingGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(n),[4,this.https.makeStandingGamePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(a),[4,this.https.updateStandingGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionForUser=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.https.getStandingGamePredictionsForUser(t,n,a)];case 1:e=i.sent(),r=null,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.profile.getById(n).getInfo()];case 3:return r=i.sent(),[3,5];case 4:return s=i.sent(),console.error(s),[3,5];case 5:return e.data.forEach((function(t){t.profileModel=r})),[2,e]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s;return i(this,(function(i){switch(i.label){case 0:return n&&(n=new l.default(n)),[4,this.https.getStandingGameRankings(t,n,a)];case 1:return e=i.sent(),r=e.data.map((function(t){return t.profileId})),s=[],r.length>0?[4,this.profile.getByIds(r)]:[3,3];case 2:s=i.sent(),e.data=e.data.map((function(t){return t.profileModel=s.find((function(e){return e.id===t.profileId}))||null,t})),i.label=3;case 3:return[2,e]}}))}))},this.https=new s.default(t),this.profile=new o.default(t),this.validator=new c.default(t.errorHandlingMode)}},1117:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64800)).default);e.default=s},46914:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(64800)),o=n(40853),u=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.sortOrder=null,n.gameIds=null,n.status=(null==e?void 0:e.status)||null,n.sortOrder=(null==e?void 0:e.sortOrder)||null,n.gameIds=(null==e?void 0:e.gameIds)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.status&&Object.values(o.GameStatusEnum).includes(this.status)?(e+="&",e+="status=".concat(this.status)):null!==this.status&&console.warn("The filter 'status' has the following INVALID value: ".concat(this.status,". It will be not passed as a query param in the URL. For more information visit our documentation.")),!this.sortOrder||"asc"!==this.sortOrder&&"desc"!==this.sortOrder&&"ASC"!==this.sortOrder&&"DESC"!==this.sortOrder?null!==this.sortOrder&&console.warn("The filter 'sortOrder' has the following INVALID value: ".concat(this.sortOrder,". It will be not passed as a query param in the URL. For more information visit our documentation.")):(e+="&",e+="sort_order=".concat(this.sortOrder)),this.gameIds&&Array.isArray(this.gameIds)&&this.gameIds.length>0?(e+="&",e+="game_ids=".concat(this.gameIds.join(","))):null!==this.gameIds&&console.warn("The filter 'gameIds' has the following INVALID value: ".concat(this.gameIds,". It will be not passed as a query param in the URL. For more information visit our documentation.")),e},e}(s.default);e.default=u},83201:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.StandingGamePredictionStatusEnum=void 0,function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(n=e.StandingGamePredictionStatusEnum||(e.StandingGamePredictionStatusEnum={}));e.default=function(){this.id="",this.profileId="",this.profileModel=null,this.total=0,this.gameId="",this.totalPoints=null,this.gamePoints=null,this.bonusPoints=null,this.position=null,this.status=n.ACTIVE,this.standing=[],this.createdAt="",this.updatedAt=""}},14148:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},86075:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(78923)),a=r(n(12934)),s=r(n(27909)),o=r(n(7451)),u=r(n(43807)),l=r(n(83201)),c=r(n(72911)),d=r(n(14148));e.default=function(){var t=this;this.remapBracketGames=function(e){var n=new s.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapStandingGameById(e)})),n},this.remapStandingGameById=function(e){var n=new a.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.rules=e.rules,n.customFields=e.custom_fields,n.images=e.images,n.type=e.type,n.status=e.status,n.points=e.points,n.related=e.related?t.remapRelated(e.related):e.related,n.predictionsCutoff=e.predictions_cutoff,n.meta=e.meta&&e.meta.participants?t.remapStandingGameMeta(e.meta):e.meta,n.outcomeCount=e.outcome_count,n.outcome=e.outcome,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapPrediction=function(t){var e=new l.default;return e.id=t.id,e.profileId=t.profile_id,e.gameId=t.game_id,e.totalPoints=t.total_points,e.gamePoints=t.game_points,e.bonusPoints=t.bonus_points,e.position=t.position,e.status=t.status,e.standing=t.standing,e.total=t.total,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e},this.remapPredictionsForUser=function(e){var n=new c.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRankings=function(e){var n=new d.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRelated=function(t){return t.map((function(t){var e=new i.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},this.remapStandingGameMeta=function(t){var e=new o.default;return e.participants=t.participants.map((function(t){var e=new u.default;return e.id=t.id,e.name=t.name,e.group=t.group,e.image=t.image,e.undecided=t.undecided,e})),e}}},7451:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participants=[]}},43807:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.group=null,this.image=null,this.undecided=!1}},12934:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(7451));e.default=function(){this.id=null,this.title=null,this.description=null,this.rules=null,this.customFields=null,this.images=null,this.type="STANDING",this.status=null,this.points=null,this.related=[],this.predictionsCutoff="",this.meta=new i.default,this.outcomeCount=null,this.outcome=[],this.createdAt=null,this.updatedAt=null}},72911:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},27909:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},50808:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(58298));e.default=function(t){var e=this;this.facade=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.makePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.updatePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionForUser=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGamePredictionForUser(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getRankings(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},95018:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4021),o=n(94904),u=n(5318),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.validatePrediction=function(t){t&&Array.isArray(t)&&0!==t.length&&!t.some((function(t){return!t}))||e.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_METHOD_CALL,u.ErrorMessages.INVALID_STANDING_PREDICTION_ARGUMENT)},e}return i(e,t),e}(a(n(16198)).default);e.default=l},40853:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.GameStatusEnum=void 0,(n=e.GameStatusEnum||(e.GameStatusEnum={})).OPEN="OPEN",n.LIVE="LIVE",n.PENDING="PENDING",n.CANCELED="CANCELED",n.CLOSED="CLOSED",n.SETTLED="SETTLED"},89502:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(14946),c=u(n(52793)),d=u(n(88900)),f=u(n(25013)),h=n(40853),p=u(n(7299)),m=u(n(81553)),v=u(n(1399)),_=u(n(97782)),y=a(n(47686)),g=u(n(12310)),b=u(n(68097)),w=n(94904),E=n(5318),I=n(4021),M=u(n(62535));e.default=function(t){var e=this;this.idMapping=null,this.predictorHttps=null,this.predictorService=null,this.predictorValidator=null,this.clientHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return s(e,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(y.FeatureConfigEnum.TOP_X)];case 1:return t=e.sent(),this.idMapping.idSchema===l.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.getGames=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("TOP_X",t),[4,this.predictorHttps.getGames(e,n)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGamesNoRemap=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("TOP_X",t),[4,this.predictorHttps.getGamesNoRemap(e,n)];case 1:return[2,r.sent()]}}))}))},this.getGameById=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return n=n||!1,[4,this.predictorHttps.getGameById(t,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,n,r){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return r=r||!1,n&&(n.type&&delete n.type,n.status&&delete n.status,n=new _.default(n)),[4,this.predictorHttps.getGamePredictions(t,r,n)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,r){return s(e,void 0,void 0,(function(){var e;return o(this,(function(i){switch(i.label){case 0:return r=r||!1,n&&(n=new p.default(n)),[4,this.predictorHttps.getGameResults(t,r,n)];case 1:return e=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,i.sent()]}}))}))},this.getCurrentGameResults=function(t){return s(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return t=t||!1,(e=new p.default(null)).status=h.GameStatusEnum.OPEN,e.type="TOP_X",[4,this.predictorHttps.getGames(e,t)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,t)];case 2:return[2,i.sent().data[0]]}}))}))},this.play=function(t){return s(e,void 0,void 0,(function(){var e,n,r,i,a=this;return o(this,(function(s){switch(s.label){case 0:return e=new v.default(t),(e=this.predictorValidator.validateBodyFields("TOP_X",e)).fixtures=e.fixtures.map((function(t){return a.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value)})),this.idMapping.idSchema===l.IdSchemaEnum.NATIVE?[3,2]:(n=[],e.fixtures.forEach((function(t){return n.push(t.matchId)})),[4,this.predictorService.remapMatchIdToNative(n)]);case 1:r=s.sent(),e.fixtures.forEach((function(t){return t.matchId=r.shift()})),s.label=2;case 2:return[4,this.predictorHttps.makeFootballPrediction(e)];case 3:return(i=s.sent()).fixtures.forEach((function(t){t.matchId=t.matchModel.id})),[2,i]}}))}))},this.delete=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i,a,s,u;return o(this,(function(o){switch(o.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),n=n||!1,e=this.predictorService.initGameTypePredictions("TOP_X",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(e)];case 1:return(i=o.sent()).data.length>0?(i.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),a=(null==t?void 0:t.limit)?{limit:t.limit}:null,s=this.predictorService.initGameFilters("TOP_X",a,r),[4,this.predictorHttps.getUserGameEditions(s,n)]):[3,4];case 2:return u=o.sent(),[4,this.predictorService.addPredictionProp(i,u)];case 3:return[2,o.sent()];case 4:return[2,new m.default]}}))}))},this.getMyGamePrediction=function(t){return s(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return e=new _.default({gameIds:[t]}),[4,this.predictorHttps.getMyPredictions(e)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(e){return e.gameInstanceId===t}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a,s,u,l;return o(this,(function(o){switch(o.label){case 0:return n&&n.limit&&this.validateLimitFilterOnGames(n.limit),r=r||!1,e=this.predictorService.initGameTypePredictions("TOP_X",n),i=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,e)];case 1:return(a=o.sent()).data.length>0?(a.data.forEach((function(t){t.game_instance_id&&i.push(t.game_instance_id)})),s=(null==n?void 0:n.limit)?{limit:n.limit}:null,u=this.predictorService.initGameFilters("TOP_X",s,i),[4,this.predictorHttps.getUserGameEditions(u,r)]):[3,4];case 2:return l=o.sent(),[4,this.predictorService.addPredictionProp(a,l)];case 3:return[2,o.sent()];case 4:return[2,new m.default]}}))}))},this.getUserGamePrediction=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a;return o(this,(function(s){switch(s.label){case 0:return r=r||!1,e=new _.default({gameIds:[n]}),[4,this.predictorHttps.getUserPredictions(t,r,e)];case 1:return(i=s.sent()).data.length>0?[2,(a=i.data.filter((function(t){return t.gameInstanceId===n}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,n)];case 1:return e=r.sent(),[4,this.predictorService.completeGameMarketResults(e,"TOP_X")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return[4,this.predictorHttps.getContestWinners(t,n)];case 1:return e=i.sent(),[4,this.getGameById(t)];case 2:return r=i.sent(),e.contestModel=r,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===e.errorHandlingMode&&t>50)throw new b.default(I.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,E.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===e.errorHandlingMode&&t>50)throw new M.default(I.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,E.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED)},this.idMapping=new d.default(t),this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new g.default(t.errorHandlingMode),this.predictorHttps=new c.default(t),this.predictorService=new f.default(t,this.idMapping),this.clientHttps=new y.default(t)}},19013:function(t,e){"use strict";var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.findLastGame=function(t){if(!Array.isArray(t)||0===t.length)return null;var e=t.filter((function(t){return"SETTLED"===t.status})).sort((function(t,e){return new Date(e.predictionsCutoff).getTime()-new Date(t.predictionsCutoff).getTime()}));if(e.length>0)return e[0];var n=new Date,r=t.filter((function(t){return new Date(t.predictionsCutoff)<n})).sort((function(t,e){return new Date(e.predictionsCutoff).getTime()-new Date(t.predictionsCutoff).getTime()}));return r.length>0?r[0]:null},this.findNextGame=function(e){if(!Array.isArray(e)||0===e.length)return null;var r=t.findCurrentGame(e);if(!r)return null;var i=n([],e,!0).sort((function(t,e){return new Date(t.predictionsCutoff).getTime()-new Date(e.predictionsCutoff).getTime()})),a=new Date(r.predictionsCutoff).getTime();return i.find((function(t){return new Date(t.predictionsCutoff).getTime()>a}))||null},this.findCurrentGame=function(t){if(!Array.isArray(t)||0===t.length)return null;var e=t.find((function(t){return"LIVE"===t.status}));if(e)return e;var n=t.find((function(t){return"OPEN"===t.status}));if(n)return n;var r=new Date;return t.filter((function(t){return new Date(t.predictionsCutoff)>r})).sort((function(t,e){return new Date(t.predictionsCutoff).getTime()-new Date(e.predictionsCutoff).getTime()}))[0]||null}}},91180:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.clientId=null,this.minFixtures=null,this.maxFixtures=null,this.competitionsWhitelist=null,this.authRequirement=null}},7482:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36899));e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new i.default}},15967:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36899)),a=r(n(13381));e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new i.default,this.prediction=new a.default}},66247:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.adContent=null,e}return i(e,t),e}(a(n(63751)).default);e.default=s},36890:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.userId=null,this.points=null,this.results=[],this.tiebreaker=null}},56160:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchModel=null,this.outcome=null}},7299:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(64800)),o=n(40853),u=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.type=null,n.gameIds=null,n.sortOrder=null,n.constructFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(n);return n.status&&Object.values(o.GameStatusEnum).includes(n.status)&&(e+="&",e+="status=".concat(n.status)),n.type&&(e+="&",e+="type=".concat(n.type)),n.gameIds&&n.gameIds.length>0&&(e+="&",e+="game_ids=".concat(n.gameIds.join(","))),n.sortOrder&&(e+="&",e+="sort_order=".concat(n.sortOrder)),e},n.status=(null==e?void 0:e.status)||null,n.type=(null==e?void 0:e.type)||null,n.gameIds=(null==e?void 0:e.gameIds)||null,n.sortOrder=(null==e?void 0:e.sortOrder)||null,n}return i(e,t),e}(s.default);e.default=u},63751:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439)),a=r(n(64916));e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.authRequirement=null,this.scheduleOpenAt=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new a.default,this.participantsCount=0,this.related=[],this.excludedProfileIds=null,this.rules=null,this.labels=null,this.customFields=null,this.branding=null,this.flags=null,this.images=new i.default,this.createdAt=null,this.updatedAt=null}},4780:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(7482)),o=a(n(38410)),u=a(n(15967)),l=a(n(36890)),c=a(n(56160)),d=a(n(63751)),f=a(n(87243)),h=a(n(68950)),p=a(n(97640)),m=a(n(81553)),v=a(n(30670)),_=n(27974),y=a(n(64916)),g=a(n(21784)),b=a(n(60824)),w=a(n(36899)),E=a(n(66247)),I=a(n(16692)),M=n(91287),O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapPaginatedGames=function(t){var n=new m.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapGamesListResponse(t)})),n},e.remapGamesListResponse=function(t){var n=new d.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.authRequirement=t.auth_requirement||null,n.scheduleOpenAt=t.schedule_open_at,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):[],n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.labels=t.labels,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.flags=t.flags,n.images=t.images,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapGameByIdResponse=function(t){var n=new E.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.authRequirement=t.auth_requirement||null,n.scheduleOpenAt=t.schedule_open_at,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):[],n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.adContent=t.ad_content,n.labels=t.labels,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.images=t.images,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapFixturesResponse=function(t){var e=new s.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status?t.match_status.type:null,e.matchStatus.subType=t.match_status?t.match_status.sub_type:null,e},e.remapPaginatedUserTopXEditions=function(t){var n=new m.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapUserTopXEditionsResponse(t)})),n},e.remapUserTopXEditionsResponse=function(t){var n=new h.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.authRequirement=t.auth_requirement||null,n.predictionsCutoff=t.predictions_cutoff,n.scheduleOpenAt=t.schedule_open_at,n.fixtures=t.fixtures.map((function(t){return e.remapTopXFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):[],n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.images=t.images,n.branding=t.branding?e.remapBranding(t.branding):null,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapTopXFixturesResponse=function(t){var e=new u.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status?t.match_status.type:null,e.matchStatus.subType=t.match_status?t.match_status.sub_type:null,e},e.remapPaginatedUserMathQuizEditions=function(t){var n=new m.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapUserMatchQuizEditionsResponse(t)})),n},e.remapUserMatchQuizEditionsResponse=function(t){var n=new f.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.authRequirement=t.auth_requirement||null,n.predictionsCutoff=t.predictions_cutoff,n.scheduleOpenAt=t.schedule_open_at,n.fixtures=t.fixtures.map((function(t){return e.remapMatchQuizFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):[],n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.images=t.images,n.branding=t.branding?e.remapBranding(t.branding):null,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapMatchQuizFixturesResponse=function(t){var e=new o.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status?t.match_status.type:null,e.matchStatus.subType=t.match_status?t.match_status.sub_type:null,e},e.remapPaginatedGameResults=function(t){var n=new m.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapGameResults(t)})),n},e.remapGameResults=function(t){var n=new l.default;return n.userId=t.user_id,n.points=t.points?t.points:0,n.results=t.results.map((function(t){return e.remapResults(t)})),n.tiebreaker=t.tiebreaker?e.remapTiebreaker(t.tiebreaker):null,n},e.remapGameMarketsResults=function(t){var n=new v.default;return n.gameId=t.game_id,n.results=e.remapMarketsResults(t.results),n.tieBreakers=t.tie_breakers?e.remapTieBreakers(t.tie_breakers):null,n},e.remapContestWinners=function(t){var n=new g.default;return n.contestId=t.contest_id,n.contestType=t.contest_type,n.description=t.description,n.userList=t.user_list?t.user_list.map((function(t){return e.remapUserListWinners(t)})):null,n},e.remapUserListWinners=function(t){var e=new b.default;return e.position=t.position,e.profileId=t.profile_id,e.note=t.note,e.tags=t.tags,e},e.remapTieBreakers=function(t){var e={goldenGoals:[]};return e.goldenGoals=t.golden_goals.map((function(t){return{minute:t.minute,matchId:t.match_id,matchModel:null,playerId:t.player_id,playerModel:null,goalType:t.goal_type}})),e},e.remapMarketsResults=function(t){var n=[];return t.forEach((function(t){var r={matchId:t.match_id,market:t.market,result:e.remapMarketResult(t.market,t.result),matchModel:null,playerModels:[],matchStatus:e.remapMarketsResultsMatchStatus(t.match_status)};n.push(e.deleteUnusefulField(r))})),n},e.remapMarketsResultsMatchStatus=function(t){var e=new w.default;return t&&(e.type=t.type,e.subType=t.sub_type),e},e.remapMarketResult=function(t,e){return _.endMarkMarkets.includes(t)?e[0]:_.playerMarkets.includes(t)?e:"true"===e[0]||"false"!==e[0]&&void 0},e.deleteUnusefulField=function(t){return _.playerMarkets.includes(t.market)&&!e.isPlayerMarketWithNoResult(t.market,t.result)||delete t.playerModels,t},e.isPlayerMarketWithNoResult=function(t,e){return _.playerMarkets.includes(t)&&0===e.length},e.remapResults=function(t){var e=new c.default;return e.matchId=t.match_id,e.outcome=t.outcome,e},e.remapTiebreaker=function(t){var e=new p.default;return e.goldenGoal=t.golden_goal,e},e.remapTimeTiebreaker=function(t){var e=new y.default;return e.timeTiebreaker=t,e},e.remapRelated=function(t){return t.map((function(t){var e=new M.RelatedEntityRelationship;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},e}return i(e,t),e}(I.default);e.default=O},68950:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(64916)),a=r(n(97640));e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.authRequirement=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new i.default,this.predictionId=null,this.participantsCount=0,this.related=[],this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.predictionsUpdatedAt=null,this.scheduleOpenAt=null,this.images=null,this.predictionTiebreaker=new a.default,this.branding=null}},97640:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.goldenGoal=null}},64916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.timeTiebreaker=!1}},21784:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.contestId="",this.contestType="GAME",this.contestModel=null,this.description="",this.userList=[]}},60824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position="",this.profileId="",this.profileModel=null,this.note="",this.tags=[]}},13381:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.result=null}},1399:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(91465));e.default=function(t){var e=this;this.gameInstanceId=null,this.fixtures=[],this.tiebreaker=null,this.gameInstanceId=t.gameInstanceId,t.fixtures.forEach((function(t){return e.fixtures.push(new i.default(t.matchId,t.market,t.prediction.value))})),this.tiebreaker=t.tiebreaker?t.tiebreaker:null}},29596:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(89502)),o=a(n(19013));e.default=function(t){var e=this;this.topXFacade=null,this.helpers=new o.default,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGamePredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameResults(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getCurrentGameResults(t)];case 1:return[2,e.sent()]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.play(t)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMyGameEditions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMyGamePrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getUserGameEditions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getUserGameEditions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getUserGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMarketsResultsForGame(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameWinners=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameWinners(t,n)];case 1:return[2,e.sent()]}}))}))},this.topXFacade=new s.default(t)}},7323:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(14946),o=a(n(64800)),u=a(n(81613)),l=a(n(58742)),c=a(n(84790)),d=a(n(84874));e.default=function(t){var e=this;this.https=null,this.service=null,this.idSchema=null,this.getPolls=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,o;return i(this,(function(i){switch(i.label){case 0:return t?(t=new c.default(t),[4,this.service.finalizePollsFilters(t)]):[3,2];case 1:i.sent(),i.label=2;case 2:return[4,this.https.getPolls(t,n)];case 3:e=i.sent(),r=0,a=e.data,i.label=4;case 4:return r<a.length?(o=a[r],[4,this.service.remapTags(o,s.IdSchemaEnum.NATIVE,this.idSchema)]):[3,7];case 5:i.sent(),i.label=6;case 6:return r++,[3,4];case 7:return[2,e]}}))}))},this.getPollById=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.https.getPollById(t,n)];case 1:return e=r.sent(),[4,this.service.remapTags(e,s.IdSchemaEnum.NATIVE,this.idSchema)];case 2:return r.sent(),[2,e]}}))}))},this.voteForPoll=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return"string"==typeof n&&(console.warn("Passing a single optionId as a string will be deprecated. Please pass it as an array."),n=[n]),[4,this.https.voteForPoll(t,n)];case 1:return[2,e.sent()]}}))}))},this.deleteVoteForPoll=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.deleteVoteForPoll(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPollVote=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.https.getMyPollVote(t)];case 1:return e=i.sent(),n?[4,this.getPolls(new c.default({pollIds:[t]}),!0)]:[3,3];case 2:r=i.sent(),e.pollModel=r.data.find((function(e){return e.id===t}))||null,e.optionModel=(null===(a=r.data.find((function(e){return e.id===t})))||void 0===a?void 0:a.options.find((function(t){return t.id===e.optionId})))||null,e.optionsModels=e.optionIds&&(null===(s=r.data.find((function(e){return e.id===t})))||void 0===s?void 0:s.options.filter((function(t){return e.optionIds.includes(t.id)})))||[],e.previousVotes.forEach((function(t){var e;t.optionsModels=(null===(e=r.data.find((function(e){return e.id===t.pollId})))||void 0===e?void 0:e.options.filter((function(e){return t.optionIds.includes(e.id)})))||[]})),i.label=3;case 3:return[2,e]}}))}))},this.getMyPollsVotes=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t&&(t=new o.default(t)),[4,this.https.getMyPollsVotes(t)];case 1:return e=i.sent(),n=e.data.map((function(t){return t.id})),[4,this.getPolls(new c.default({pollIds:n}),!0)];case 2:return r=i.sent(),e.data=e.data.map((function(t){var e,n;return t.pollModel=r.data.find((function(e){return e.id===t.pollId}))||null,t.optionModel=(null===(e=t.pollModel)||void 0===e?void 0:e.options.find((function(e){return e.id===t.optionId})))||null,t.optionsModels=t.optionIds&&(null===(n=t.pollModel)||void 0===n?void 0:n.options.filter((function(e){return t.optionIds.includes(e.id)})))||[],t})),[2,e]}}))}))},this.voteForPlayerOfTheMatch=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){switch(i.label){case 0:return this.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.service.remapMatchAndPlayerIds(t,n,this.idSchema,s.IdSchemaEnum.NATIVE)];case 1:return e=i.sent(),r=e[0],a=e[1],[4,this.https.voteForPlayerOfTheMatch(r,a)];case 2:return i.sent(),[2,{playerId:n}];case 3:return[4,this.https.voteForPlayerOfTheMatch(t,n)];case 4:return[2,i.sent()]}}))}))},this.deleteVoteForPlayerOfTheMatch=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.service.remapMatchIds([t],this.idSchema,s.IdSchemaEnum.NATIVE)];case 1:return e=n.sent(),[4,this.https.deleteVoteForPlayerOfTheMatch(e[0])];case 2:case 4:return n.sent(),[2,!0];case 3:return[4,this.https.deleteVoteForPlayerOfTheMatch(t)]}}))}))},this.getOwnVotesForPlayerOfTheMatch=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return t&&(t=new l.default(t)),t&&t.matchIds&&t.matchIds.length>0&&this.idSchema!==s.IdSchemaEnum.NATIVE?[4,this.service.remapMatchIds(t.matchIds,this.idSchema,s.IdSchemaEnum.NATIVE)]:[3,2];case 1:e=r.sent(),t.matchIds=e,r.label=2;case 2:return[4,this.https.getOwnVotesForPlayerOfTheMatch(t)];case 3:return n=r.sent(),[4,this.service.setModelsForUserVotes(n)];case 4:return[2,r.sent()]}}))}))},this.getResultsForPlayerOfTheMatch=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){switch(i.label){case 0:return this.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:[4,this.service.remapMatchIds([t],this.idSchema,s.IdSchemaEnum.NATIVE)];case 1:return e=i.sent(),[4,this.https.getResultsForPlayerOfTheMatch(e[0],n)];case 2:return r=i.sent(),[4,this.service.setModelsForPotmResults(r.data)];case 3:return i.sent(),[2,r];case 4:return[4,this.https.getResultsForPlayerOfTheMatch(t,n)];case 5:return a=i.sent(),[4,this.service.setModelsForPotmResults(a.data)];case 6:return i.sent(),[2,a]}}))}))},this.idSchema=t.idSchema,this.https=new u.default(t),this.service=new d.default(t)}},58742:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.matchIds=null,n.matchIds=e&&e.matchIds?e.matchIds:null,n}return i(e,t),e.prototype.constructFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.matchIds&&this.matchIds.length>0&&(e+="&",e+="match_ids=".concat(this.matchIds.join(","))),e},e}(a(n(64800)).default);e.default=s},19379:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},93285:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.teamId=null,this.teamModel=null,this.playerId=null,this.playerModel=null,this.votes=null,this.winner=null}},10862:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(19379));e.default=function(){this.meta=new i.default,this.data=[]}},92379:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchModel=null,this.playerId=null,this.playerModel=null,this.createdAt=null}},34824:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},84790:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.flags=null,n.status=null,n.entityIds=null,n.entityType=null,n.pollIds=null,n.sortOrder=null,n.minVotes=null,n.language=null,n.flags=(null==e?void 0:e.flags)||null,n.status=(null==e?void 0:e.status)||null,n.entityIds=(null==e?void 0:e.entityIds)||null,n.entityType=(null==e?void 0:e.entityType)||null,n.pollIds=(null==e?void 0:e.pollIds)||null,n.sortOrder=(null==e?void 0:e.sortOrder)||null,n.minVotes=e&&void 0!==e.minVotes?e.minVotes:null,n.language=(null==e?void 0:e.language)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.flags&&this.flags.length>0&&(e+="&flags=".concat(this.flags.join(","))),this.status&&(e+="&status=".concat(this.status)),this.entityIds&&this.entityIds.length>0&&(e+="&entity_ids=".concat(this.entityIds.join(","))),this.pollIds&&this.pollIds.length>0&&(e+="&poll_ids=".concat(this.pollIds.join(","))),this.sortOrder&&(e+="&sort_order=".concat(this.sortOrder)),this.minVotes&&(e+="&min_votes=".concat(this.minVotes)),this.language&&(e+="&language=".concat(this.language)),e},e}(a(n(64800)).default);e.default=s},81770:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id=null,this.title=null,this.alternativeTitle=null,this.description=null,this.type=null,this.images=new i.default,this.status=null,this.language=null,this.authRequirement=null,this.totalVotes=null,this.flags=[],this.customFields=null,this.branding=null,this.embedCode=null,this.labels=null,this.adContent=null,this.context=null,this.options=[],this.related=[],this.preferencesEnabled=!1,this.multipleChoice=!1,this.maxMultipleChoiceOptions=null,this.participationCount=0,this.maxAttempts=0,this.createdAt=null,this.updatedAt=null}},1126:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rules=null,e}return i(e,t),e}(a(n(81770)).default);e.default=s},70890:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id=null,this.title=null,this.description=null,this.images=new i.default,this.votes=null,this.embedCode=null,this.preferencesMapping=[]}},358:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.pollId=null,this.optionId=null,this.optionIds=[],this.userId=null,this.createdAt=null}},15390:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pollModel=null,e.optionModel=null,e.optionsModels=[],e.previousVotes=[],e.attempts=null,e}return i(e,t),e}(a(n(358)).default);e.default=s},71812:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},62160:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},88593:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.pollId=null,this.optionIds=[],this.optionsModels=[],this.userId=null,this.createdAt=null}},67377:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.previousVotes=[],e.attempts=null,e}return i(e,t),e}(a(n(358)).default);e.default=s},93305:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872)),a=r(n(93285)),s=r(n(10862)),o=r(n(92379)),u=r(n(34824));e.default=function(){var t=this;this.remapUserVotes=function(e){var n=new u.default;return n.meta=t.remapMeta(e.meta.pagination),n.data=e.data.map((function(e){return t.remapUserVoteModel(e)})),n},this.remapResults=function(e){var n=new s.default;return n.meta=e.meta,n.data=e.data.map((function(e){return t.remapResultsModel(e)})),n},this.remapMeta=function(t){var e=new i.default;return e.pagination.itemsPerPage=t.items_per_page,e.pagination.nextPageStartsAfter=t.next_page_starts_after,e},this.remapUserVoteModel=function(t){var e=new o.default;return e.matchId=t.match_id,e.playerId=t.player_id,e.createdAt=t.created_at,e},this.remapResultsModel=function(t){var e=new a.default;return e.teamId=t.team_id,e.playerId=t.player_id,e.votes=t.votes,e.winner=t.winner,e}}},6829:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(18902)),o=a(n(78923)),u=a(n(16692)),l=a(n(72820)),c=a(n(87060)),d=a(n(81770)),f=a(n(1126)),h=a(n(70890)),p=a(n(15390)),m=a(n(71812)),v=a(n(62160)),_=a(n(55955)),y=a(n(88593)),g=a(n(67377)),b=a(n(358)),w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapPolls=function(t){var n=new m.default;return n.meta.pagination=e.remapMetaPagination(t.meta.pagination),n.data=t.data.map((function(t){return e.remapPoll(t)})),n},e.remapPollById=function(t){var n=new f.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.totalVotes=t.total_votes,n.customFields=t.custom_fields,n.related=t.related?e.remapRelated(t.related):[],n.branding=t.branding?e.remapBranding(t.branding):null,n.embedCode=t.embed_code,n.labels=t.labels,n.rules=t.rules,n.adContent=t.ad_content,n.options=t.options?e.remapOptions(t.options):[],n.context=t.context?e.remapContext(t.context):t.context,n.preferencesEnabled=t.preferences_enabled,n.multipleChoice=t.multiple_choice,n.maxMultipleChoiceOptions=t.max_multiple_choice_options,n.participationCount=t.participation_count,n.maxAttempts=t.max_attempts,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapUserVote=function(t){var n=new g.default;return n.id=t.id,n.pollId=t.poll_id,n.optionId=t.option_id,n.optionIds=t.option_ids,n.userId=t.user_id,n.attempts=t.attempts||null,n.previousVotes=t.previous_votes?t.previous_votes.map((function(t){return e.remapPreviousVotes(t)})):[],n.createdAt=t.created_at,n},e.remapPreviousVotes=function(t){var e=new y.default;return e.id=t.id,e.pollId=t.poll_id,e.optionIds=t.option_ids,e.userId=t.user_id,e.createdAt=t.created_at,e},e.remapPollsVotes=function(t){var n=new v.default;return n.meta.pagination=e.remapMetaPagination(t.meta.pagination),n.data=t.data.map((function(t){return e.remapAllPollsVotes(t)})),n},e.remapAllPollsVotes=function(t){var e=new b.default;return e.id=t.id,e.pollId=t.poll_id,e.optionId=t.option_id,e.optionIds=t.option_ids,e.userId=t.user_id,e.createdAt=t.created_at,e},e.remapSinglePollVote=function(t){var n=new p.default;return n.id=t.id,n.pollId=t.poll_id,n.optionId=t.option_id,n.optionIds=t.option_ids,n.userId=t.user_id,n.attempts=t.attempts||null,n.createdAt=t.created_at,n.previousVotes=t.previous_votes?t.previous_votes.map((function(t){return e.remapPreviousVotes(t)})):[],n},e.remapMetaPagination=function(t){var e=new s.default;return e.itemsPerPage=t.items_per_page,e.nextPageStartsAfter=t.next_page_starts_after,e},e.remapPoll=function(t){var n=new d.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.totalVotes=t.total_votes,n.customFields=t.custom_fields,n.related=t.related?e.remapRelated(t.related):[],n.branding=t.branding?e.remapBranding(t.branding):null,n.embedCode=t.embed_code,n.labels=t.labels,n.adContent=t.ad_content,n.options=t.options?e.remapOptions(t.options):[],n.context=t.context?e.remapContext(t.context):t.context,n.preferencesEnabled=t.preferences_enabled,n.multipleChoice=t.multiple_choice,n.maxMultipleChoiceOptions=t.max_multiple_choice_options,n.participationCount=t.participation_count,n.maxAttempts=t.max_attempts,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapContext=function(t){var e=new l.default;return e.content=t.content,e.tags=t.tags?t.tags.map((function(t){var e=new c.default;return e.id=t.id,e.type=t.type,e.source=t.source,e})):null,e.campaign=t.campaign,e},e.remapRelated=function(t){return t.map((function(t){var e=new o.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},e.remapOptions=function(t){return t.map((function(t){var n=new h.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.images=t.images,n.votes=t.votes,n.embedCode=t.embed_code,n.preferencesMapping=t.preferences_mapping?e.remapPreferencesMapping(t.preferences_mapping):[],n}))},e.remapPreferencesMapping=function(t){return t.map((function(t){var e=new _.default;return e.preferenceId=t.preference_id,e}))},e}return i(e,t),e}(u.default);e.default=w},84874:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(67900),o=n(14946),u=n(4021),l=n(94904),c=a(n(68097)),d=a(n(62535)),f=a(n(88900)),h=a(n(78261)),p=a(n(48808)),m=a(n(19685));e.default=function(t){var e=this;this.idMappingService=null,this.idSchema=null,this.errorHandlingMode=null,this.validator=null,this.activityService=null,this.football=null,this.finalizePollsFilters=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.idSchema!==o.IdSchemaEnum.NATIVE&&t.entityIds&&t.entityIds.length>0?(this.validator.validateFilters(t),[4,this.idMappingService.getEntityIdsBySchemaId(Array.from(t.entityIds),t.entityType,o.IdSchemaEnum.NATIVE)]):[3,2];case 1:e=n.sent(),t.entityIds=e[t.entityType],n.label=2;case 2:return[2]}}))}))},this.remapTags=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.idSchema!=o.IdSchemaEnum.NATIVE&&t.context&&t.context.tags&&t.context.tags.length?(e=JSON.parse(JSON.stringify(t.context.tags)),[4,this.activityService.remapTagsIds(e,n,a)]):[3,2];case 1:r=i.sent(),t.context.tags=r,i.label=2;case 2:return[2]}}))}))},this.remapMatchAndPlayerIds=function(t,n,a,o){return r(e,void 0,void 0,(function(){var e,r,f,h;return i(this,(function(i){switch(i.label){case 0:return e={match:[t],player:[n]},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(e,a,o)];case 1:if((r=i.sent()).match.length>0&&r.player.length>0)return f=r.match[0],h=r.player[0],[2,[f,h]];if("default"===this.errorHandlingMode)throw new c.default(u.ErrorCodes.NOT_FOUND,l.ErrorStatuses.ENTITY_IDS_NOT_FOUND,s.ErrorMessages.ENTITY_IDS_NOT_FOUND);throw new d.default(u.ErrorCodes.NOT_FOUND,l.ErrorStatuses.ENTITY_IDS_NOT_FOUND,s.ErrorMessages.ENTITY_IDS_NOT_FOUND)}}))}))},this.remapMatchIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,o;return i(this,(function(i){switch(i.label){case 0:return e=Array.from(t),r={match:t},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(r,n,a)];case 1:if((o=i.sent()).match.length>0&&o.match.length===e.length)return[2,o.match];if("default"===this.errorHandlingMode)throw new c.default(u.ErrorCodes.NOT_FOUND,l.ErrorStatuses.MATCH_IDS_NOT_FOUND,s.ErrorMessages.MATCH_IDS_NOT_FOUND);throw new d.default(u.ErrorCodes.NOT_FOUND,l.ErrorStatuses.MATCH_IDS_NOT_FOUND,s.ErrorMessages.MATCH_IDS_NOT_FOUND)}}))}))},this.setModelsForUserVotes=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:return e=t.data.map((function(t){return t.matchId})),n=t.data.map((function(t){return t.playerId})),e.length>0&&n.length>0?[4,this.football.footballFacade.getMatchesMapWithNativeIds(e)]:[3,3];case 1:return r=i.sent(),[4,this.football.footballFacade.getPlayersMapWithNativeIds(n)];case 2:a=i.sent(),t.data.forEach((function(t){t.matchModel=r[t.matchId]||null,t.playerModel=a[t.playerId]||null,t.matchId=t.matchModel?t.matchModel.id:t.matchId,t.playerId=t.playerModel?t.playerModel.id:t.playerId})),t.meta.pagination.nextPageStartsAfter&&(t.meta.pagination.nextPageStartsAfter=t.data[t.data.length-1].matchId),i.label=3;case 3:return[2,t]}}))}))},this.setModelsForPotmResults=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:return e=t.map((function(t){return t.teamId})),n=t.map((function(t){return t.playerId})),e.length>0&&n.length>0?[4,this.football.footballFacade.getTeamsMapWithNativeIds(e)]:[3,3];case 1:return r=i.sent(),[4,this.football.footballFacade.getPlayersMapWithNativeIds(n)];case 2:a=i.sent(),t.forEach((function(t){t.teamModel=r.get(t.teamId)||null,t.playerModel=a[t.playerId]||null,t.teamId=t.teamModel?t.teamModel.id:t.teamId,t.playerId=t.playerModel?t.playerModel.id:t.playerId})),i.label=3;case 3:return[2]}}))}))},this.idSchema=t.idSchema,this.errorHandlingMode=t.errorHandlingMode,this.idMappingService=new f.default(t),this.validator=new m.default(t),this.activityService=new h.default(t),this.football=new p.default(t)}},73112:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(7323));e.default=function(t){var e=this;this.facade=null,this.getPolls=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPolls(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPollById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPollById(t,n)];case 1:return[2,e.sent()]}}))}))},this.voteForPoll=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.voteForPoll(t,n)];case 1:return[2,e.sent()]}}))}))},this.deleteVoteForPoll=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.deleteVoteForPoll(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPollVote=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyPollVote(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyPollsVotes=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyPollsVotes(t)];case 1:return[2,e.sent()]}}))}))},this.voteForPlayerOfTheMatch=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.voteForPlayerOfTheMatch(t,n)];case 1:return[2,e.sent()]}}))}))},this.deleteVoteForPlayerOfTheMatch=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.deleteVoteForPlayerOfTheMatch(t)];case 1:return[2,e.sent()]}}))}))},this.getOwnVotesForPlayerOfTheMatch=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getOwnVotesForPlayerOfTheMatch(t)];case 1:return[2,e.sent()]}}))}))},this.getResultsForPlayerOfTheMatch=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getResultsForPlayerOfTheMatch(t,n)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},34806:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(14946),l=n(10817),c=n(95409),d=o(n(25156));e.default=function(t,e,n){var o=this;this.idMapping=null,this.idSchema=null,this.native=u.IdSchemaEnum.NATIVE,this.footballFacade=null,this.remapProfileStats=function(t){return i(o,void 0,void 0,(function(){var e,n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:return t.predictions?(e=t.successRates,n=t.predictions,r={competition:this.getIdsKeys(e.byFootballCompetition,n.single.breakdown.footballCompetitions),team:this.getIdsKeys(e.byFootballTeam,n.single.breakdown.footballTeams)},Object.values(r.competition).length?(i=JSON.parse(JSON.stringify(t.successRates.byFootballCompetition)),[4,this.getEntitiesMap(r.competition,l.EntityTypeEnum.COMPETITION)]):[3,3]):[2,t];case 1:return o=a.sent(),[4,this.setSuccessRatesModels(i,o)];case 2:u=a.sent(),t.successRates.byFootballCompetition=u,n.single.breakdown.footballCompetitions=this.reconstructBreakdown(n.single.breakdown.footballCompetitions,o),a.label=3;case 3:return Object.values(r.team).length?(s=JSON.parse(JSON.stringify(t.successRates.byFootballTeam)),[4,this.getEntitiesMap(r.team,l.EntityTypeEnum.TEAM)]):[3,6];case 4:return o=a.sent(),[4,this.setSuccessRatesModels(s,o)];case 5:u=a.sent(),t.successRates.byFootballTeam=u,n.single.breakdown.footballTeams=this.reconstructBreakdown(n.single.breakdown.footballTeams,o),a.label=6;case 6:return[2,t]}}))}))},this.setSuccessRatesModels=function(t,e){return i(o,void 0,void 0,(function(){return a(this,(function(n){return[2,this.reconstructRecords(t,void 0,e)]}))}))},this.getEntitiesMap=function(t,e){return i(o,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:switch(e){case"competition":return[3,1];case"team":return[3,3]}return[3,5];case 1:return[4,this.footballFacade.getCompetitionsMapWithNativeIds(t)];case 2:case 4:return[2,n.sent()];case 3:return[4,this.footballFacade.getTeamsMapWithNativeIds(t)];case 5:return[2]}}))}))},this.reconstructRecords=function(t,e,n){return t&&Object.keys(t).length?(Object.keys(t).forEach((function(i){var a,s=n.get(i);(e=r(r({},e),((a={})[s.id]=t[i],a)))[s.id].model=s})),e):t},this.reconstructBreakdown=function(t,e){return t.length?t.map((function(t){var n=e.get(t.entityId);return t.entityId=n.id,t.model=n,t})):t},this.getIdsKeys=function(t,e){var n=Object.keys(t);if(e.length){var r=e.map((function(t){return t.entityId}));return Array.from(new Set(s(s([],n,!0),r,!0)))}return n},this.remapInterestsToIdSchema=function(t){return i(o,void 0,void 0,(function(){var e,n,r,i,s,o,u,l,d,f,h,p;return a(this,(function(a){switch(a.label){case 0:return this.idSchema===this.native?[3,3]:t&&t.length>0?(e={},n={},r=t.filter((function(t){return t.source.toLocaleUpperCase()===c.SportSourceEnum.FOOTBALL})),i=t.filter((function(t){return t.source.toLocaleUpperCase()!==c.SportSourceEnum.FOOTBALL})),r.forEach((function(t){e.hasOwnProperty(t.type)||(e[t.type]=[],n[t.type]=[]),e[t.type].push(t.id),n[t.type].push(t)})),[4,this.remapIdsObj(e,this.native,this.idSchema)]):[3,2];case 1:for(s=a.sent(),o=[],u=function(t,e){e.forEach((function(e,n){e.id=s[t][n],o.push(e)}))},l=0,d=Object.entries(n);l<d.length;l++)f=d[l],h=f[0],p=f[1],u(h,p);return[2,o.concat(i)];case 2:case 3:return[2,t]}}))}))},this.remapInterestToNative=function(t){return i(o,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(a){switch(a.label){case 0:return this.idSchema===this.native||t.source.toLocaleUpperCase()!==c.SportSourceEnum.FOOTBALL?[3,2]:(e={},n=t.id,r=t.type,e[r]=[n],[4,this.remapIdsObj(e,this.idSchema,this.native)]);case 1:return i=a.sent(),t.id=i[r][0],[2,t];case 2:return[2,t]}}))}))},this.inquiryCustomInterests=function(t,e){var n=[];return t&&t.length>0&&(n=t.filter((function(t){return t.source.toLocaleUpperCase()===c.SportSourceEnum.CUSTOM})),e)?n.map((function(t){var e=new d.default;return e.id=t.id,e.type=t.type,e.source=t.source,e.favourite=t.favourite,e})):n},this.remapInterests=function(t){return i(o,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return(e=this.inquiryCustomInterests(t,!1))&&e.length>0?(n=t.filter((function(t){return t.source.toLocaleUpperCase()!==c.SportSourceEnum.CUSTOM})),[4,this.remapInterestsToIdSchema(n)]):[3,2];case 1:return r=i.sent(),e.forEach((function(t){return r.push(t)})),[2,r];case 2:return[4,this.remapInterestsToIdSchema(t)];case 3:return[2,i.sent()]}}))}))},this.showFullInterests=function(t){return i(o,void 0,void 0,(function(){var e,n,r,i,s,o,u,d;return a(this,(function(a){switch(a.label){case 0:return e=[],t&&t.length>0?(n=this.inquiryCustomInterests(t,!0),e.push(n),r=t.filter((function(t){return t.source.toLocaleUpperCase()!==c.SportSourceEnum.CUSTOM})),[4,this.getInterestsEntitiesMap(r)]):[3,2];case 1:return i=a.sent(),s=i.competitionsMap,o=i.teamsMap,u=i.playersMap,d=r.map((function(t){var e=null;return t.source.toLocaleUpperCase()!==c.SportSourceEnum.FOOTBALL?(t.model=e,t):t.type===l.EntityTypeEnum.COMPETITION?((e=s.get(t.id))&&(t.id=e.id),t.model=e,t):t.type===l.EntityTypeEnum.TEAM?((e=o.get(t.id))&&(t.id=e.id),t.model=e,t):t.type===l.EntityTypeEnum.PLAYER?(u?(t.model=u[t.id],t.id=u[t.id].id):t.model=e,t):void 0})),e.push(d),[2,e.flat()];case 2:return[2,e]}}))}))},this.getInterestsEntitiesMap=function(t){return i(o,void 0,void 0,(function(){var e,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return e=[],n=[],r=[],i=new Map,s=new Map,o=null,t.forEach((function(t){t.type===l.EntityTypeEnum.COMPETITION&&t.source.toLocaleUpperCase()===c.SportSourceEnum.FOOTBALL?e.push(t.id):t.type===l.EntityTypeEnum.TEAM&&t.source.toLocaleUpperCase()===c.SportSourceEnum.FOOTBALL?n.push(t.id):t.type===l.EntityTypeEnum.PLAYER&&t.source.toLocaleUpperCase()===c.SportSourceEnum.FOOTBALL&&r.push(t.id)})),e.length?[4,this.footballFacade.getCompetitionsMapWithNativeIds(e)]:[3,2];case 1:i=a.sent(),a.label=2;case 2:return n.length?[4,this.footballFacade.getTeamsMapWithNativeIds(n)]:[3,4];case 3:s=a.sent(),a.label=4;case 4:return r.length?[4,this.footballFacade.getPlayersMapWithNativeIds(r)]:[3,6];case 5:o=a.sent(),a.label=6;case 6:return[2,{competitionsMap:i,teamsMap:s,playersMap:o}]}}))}))},this.remapIdsObj=function(t,e,n){return i(o,void 0,void 0,(function(){return a(this,(function(r){switch(r.label){case 0:return[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,e,n)];case 1:return[2,r.sent()]}}))}))},this.idMapping=n,this.idSchema=t.idSchema,this.footballFacade=e}},14912:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(88900)),o=a(n(34806));e.default=function(t,e){var n=this;this.idMapping=null,this.profileOperations=null,this.remapProfileStats=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapProfileStats(t)];case 1:return[2,e.sent()]}}))}))},this.remapInterestToNative=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapInterestToNative(t)];case 1:return[2,e.sent()]}}))}))},this.remapInterests=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapInterests(t)];case 1:return[2,e.sent()]}}))}))},this.showFullInterests=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.showFullInterests(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new s.default(t),this.profileOperations=new o.default(t,e,this.idMapping)}},82506:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVersion=void 0,e.getVersion=function(){var t=n(49829),e=null,r=t.version.split("."),i=Number(r[0]),a=Number(r[1]),s=r[2];if(s.includes("-RC")){var o=s.split("-RC");s=Number(o[0]),e=Number(o[1])}else s=Number(s);return{version:t.version,major:i,minor:a,patch:s,releaseCandidate:e}}},67900:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FootballMatchStatusEnum=e.MatchOddsMarketEnum=e.OddFormatEnum=e.ScopeTypeEnum=e.OddTypeEnum=e.EventGamePredictionStatusEnum=e.EventGameOutcomeTypeEnum=e.BracketGamePredictionStatusEnum=e.BracketWinnerEnum=e.GameStatusEnum=e.HalfTimeFullTimeEnum=e.DoubleChanceEnum=e.OneXTwoEnum=e.StatusEnum=e.OutcomeEnum=e.MarketEnum=e.UserActionsEnum=e.ActionsEnum=e.ErrorMessages=e.ErrorStatuses=e.ErrorCodes=e.LangEnum=e.IdSchemaEnum=e.ErrorHandlingModeEnum=e.EnvironmentEnum=void 0;var r=n(2671);Object.defineProperty(e,"EnvironmentEnum",{enumerable:!0,get:function(){return r.EnvironmentEnum}});var i=n(89580);Object.defineProperty(e,"ErrorHandlingModeEnum",{enumerable:!0,get:function(){return i.ErrorHandlingModeEnum}});var a=n(14946);Object.defineProperty(e,"IdSchemaEnum",{enumerable:!0,get:function(){return a.IdSchemaEnum}});var s=n(89377);Object.defineProperty(e,"LangEnum",{enumerable:!0,get:function(){return s.LangEnum}});var o=n(4021);Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:function(){return o.ErrorCodes}});var u=n(94904);Object.defineProperty(e,"ErrorStatuses",{enumerable:!0,get:function(){return u.ErrorStatuses}});var l=n(5318);Object.defineProperty(e,"ErrorMessages",{enumerable:!0,get:function(){return l.ErrorMessages}});var c=n(71491);Object.defineProperty(e,"ActionsEnum",{enumerable:!0,get:function(){return c.ActionsEnum}});var d=n(94964);Object.defineProperty(e,"UserActionsEnum",{enumerable:!0,get:function(){return d.UserActionsEnum}});var f=n(27974);Object.defineProperty(e,"MarketEnum",{enumerable:!0,get:function(){return f.MarketEnum}});var h=n(51113);Object.defineProperty(e,"OutcomeEnum",{enumerable:!0,get:function(){return h.OutcomeEnum}});var p=n(66147);Object.defineProperty(e,"StatusEnum",{enumerable:!0,get:function(){return p.StatusEnum}});var m=n(1976);Object.defineProperty(e,"OneXTwoEnum",{enumerable:!0,get:function(){return m.OneXTwoEnum}});var v=n(1976);Object.defineProperty(e,"DoubleChanceEnum",{enumerable:!0,get:function(){return v.DoubleChanceEnum}});var _=n(1976);Object.defineProperty(e,"HalfTimeFullTimeEnum",{enumerable:!0,get:function(){return _.HalfTimeFullTimeEnum}});var y=n(40853);Object.defineProperty(e,"GameStatusEnum",{enumerable:!0,get:function(){return y.GameStatusEnum}});var g=n(16187);Object.defineProperty(e,"BracketWinnerEnum",{enumerable:!0,get:function(){return g.BracketWinnerEnum}});var b=n(96166);Object.defineProperty(e,"BracketGamePredictionStatusEnum",{enumerable:!0,get:function(){return b.BracketGamePredictionStatusEnum}});var w=n(95106);Object.defineProperty(e,"EventGameOutcomeTypeEnum",{enumerable:!0,get:function(){return w.EventGameOutcomeTypeEnum}});var E=n(77618);Object.defineProperty(e,"EventGamePredictionStatusEnum",{enumerable:!0,get:function(){return E.EventGamePredictionStatusEnum}});var I=n(69196);Object.defineProperty(e,"OddTypeEnum",{enumerable:!0,get:function(){return I.OddTypeEnum}});var M=n(69196);Object.defineProperty(e,"ScopeTypeEnum",{enumerable:!0,get:function(){return M.ScopeTypeEnum}});var O=n(69196);Object.defineProperty(e,"OddFormatEnum",{enumerable:!0,get:function(){return O.OddFormatEnum}});var P=n(69196);Object.defineProperty(e,"MatchOddsMarketEnum",{enumerable:!0,get:function(){return P.MatchOddsMarketEnum}});var T=n(55815);Object.defineProperty(e,"FootballMatchStatusEnum",{enumerable:!0,get:function(){return T.FootballMatchStatusEnum}})},63607:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.FansUnitedSDK=void 0;var a=n(48519);Object.defineProperty(e,"FansUnitedSDK",{enumerable:!0,get:function(){return a.FansUnitedSDK}}),i(n(67900),e),i(n(29679),e),i(n(91287),e)},29679:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},48519:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.FansUnitedSDK=void 0;var a=i(n(46595)),s=n(40682),o=n(2671),u=n(89580),l=n(14946),c=n(89377),d=n(62141),f=n(29627),h=i(n(17070)),p=i(n(87302)),m=i(n(9201)),v=i(n(94068)),_=i(n(20244)),y=i(n(79198)),g=i(n(46139)),b=i(n(48808)),w=i(n(21454)),E=i(n(99421)),I=i(n(78324)),M=i(n(92962)),O=i(n(40267)),P=i(n(91550)),T=i(n(74168)),S=i(n(71259)),A=i(n(83281)),C=i(n(86409)),R=i(n(31267)),D=i(n(50808)),F=i(n(29596)),L=i(n(73112)),k=n(82506),j=null,N=null;e.FansUnitedSDK=function(t){if(x(t)){var e=G(t);if(e.isValid)return j={profile:new C.default(t),football:new b.default(t),predictor:new S.default(t),loyalty:new M.default(t),topX:new F.default(t),matchQuiz:new O.default(t),activity:new p.default(t),miniGames:new P.default(t),discussions:new _.default(t),privateLeagues:new A.default(t),challenges:new v.default(t),progress:new R.default,voting:new L.default(t),fantasy:new g.default(t),helpers:new w.default(t),idMapping:new E.default(t),bracketGame:new m.default(t),lists:new I.default(t),standingGame:new D.default(t),eventGame:new y.default(t),odds:new T.default(t),getVersion:k.getVersion},N=r({},t),j;U(e)}return j};var x=function(t){var e,n;return!j||JSON.stringify(t)!==JSON.stringify(N)||(null===(e=t.authProvider)||void 0===e?void 0:e.getIdToken())!==(null===(n=N.authProvider)||void 0===n?void 0:n.getIdToken())},G=function(t){var e=(new a.default).validate(t);return e.idSchema.validation!==f.ValidationResponseEnum.MISSING_VALUE&&e.idSchema.validation!==f.ValidationResponseEnum.INVALID_VALUE||(console.warn(e.idSchema.message.text),t.idSchema=l.IdSchemaEnum.NATIVE),e.environment.validation!==f.ValidationResponseEnum.MISSING_VALUE&&e.environment.validation!==f.ValidationResponseEnum.INVALID_VALUE||(console.warn(e.environment.message.text),t.environment=o.EnvironmentEnum.PROD),e.lang.validation!==f.ValidationResponseEnum.MISSING_VALUE&&e.lang.validation!==f.ValidationResponseEnum.INVALID_VALUE||(console.warn(e.lang.message.text),t.lang=c.LangEnum.EN),e.errorHandlingMode.validation!==f.ValidationResponseEnum.MISSING_VALUE&&e.errorHandlingMode.validation!==f.ValidationResponseEnum.INVALID_VALUE||(console.warn(e.errorHandlingMode.message.text),t.errorHandlingMode=u.ErrorHandlingModeEnum.DEFAULT),e.authProvider.validation===f.ValidationResponseEnum.INVALID_VALUE&&console.warn(e.authProvider.message.text),e.oddClient.message.type!==d.LogEnum.WARNING&&e.oddClient.credentials.message.type!==d.LogEnum.WARNING||console.warn(e.oddClient.message.text||e.oddClient.credentials.message.text),e},U=function(t){var e="isValid";Object.keys(t).forEach((function(n){var r=t[n];if(n!==e&&n!==s.ConfigFieldEnum.authProvider){if(r.message.type===d.LogEnum.ERROR)throw new Error(r.message.text)}else if(n!==e&&n===s.ConfigFieldEnum.authProvider){if((null==r?void 0:r.message.type)===d.LogEnum.ERROR)throw new Error(r.message.text);Object.keys(new h.default).forEach((function(t){if(r[t].message.type===d.LogEnum.ERROR)throw new Error(r[t].message.text)}))}if(n!==e&&n===s.ConfigFieldEnum.oddClient){if((null==r?void 0:r.message.type)===d.LogEnum.ERROR)throw new Error(r.message.text);var i=r;if(i.credentials.message.type===d.LogEnum.ERROR)throw new Error(i.credentials.message.text)}}))}},91287:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DiscussionsFilters=e.DiscussionsConfigModel=e.DictionaryModel=e.AutomaticModerationModel=e.VersionsModel=e.ReportModel=e.ReactionModel=e.PostsModel=e.PostsMetaModel=e.PostsFullModel=e.PostsDiscussionBasicModel=e.PostsCountDiscussionModel=e.PostCreateModel=e.PostByIdFullModel=e.PostByIdBasicModel=e.CreatePostParamBody=e.DiscussionModel=e.ChallengeRankingsModel=e.MyChallengesFilters=e.ChallengeFilters=e.ChallengeUpdateModel=e.ChallengeCreateModel=e.AcceptChallengeModel=e.BracketGameRankingsModel=e.BracketGamesModel=e.BracketGameFilters=e.BracketGamePredictionsModel=e.BracketGameFixtures=e.BracketGamePredictionRequestBody=e.BracketGameTiebreaker=e.BracketGamePredictionFixturesModel=e.BracketGamePredictionModel=e.BracketGamePredictionsFilters=e.BracketGameFixtureScoreModel=e.BracketGameFixturesModel=e.BracketGameMetaParticipantsModel=e.BracketGameMetaModel=e.BracketGameTiebreakerModel=e.BracketGameModel=e.TagsModel=e.ContextModel=e.ContentModel=e.CampaignModel=e.CreateActivityRequestBody=e.UserActivityFilters=e.OwnActivityFilters=e.ActivityFilters=e.PaginationActivities=e.ActivityResponseBody=e.ActivityMeta=void 0,e.PlayerBasicModel=e.PlayerStatsModel=e.TimelineModel=e.LineupsModel=e.ScoresModel=e.StatsModel=e.MatchStatus=e.MatchFilters=e.MatchFullModel=e.MatchBasicModel=e.FootballCountryModel=e.CompetitionFullModel=e.CompetitionFilters=e.CompetitionBasicModel=e.PlayersPointsFilters=e.PlayerDetailedStatsFilters=e.FantasyPlayersMetaModel=e.FantasyPlayerDetailedStatsMetaModel=e.FantasyMultipliersModel=e.FantasyPlayersModel=e.FantasyConfigModel=e.FantasyCoefficientsModel=e.PlayerStatsMatchModel=e.PlayerPointsModel=e.PlayerDetailedStatsModel=e.PlayerDetailedPointsModel=e.FantasyPredictionRequestBody=e.FantasyPlayersPointsModel=e.FantasyPlayerStatsModel=e.FantasyPlayerDetailedStatsModel=e.FansUnitedSdkFetchException=e.StandardFansUnitedException=e.EventGameFixtureNumberModel=e.EventGameFixtureEnumModel=e.EventGameRankingsModel=e.EventGamePredictionsModel=e.EventGamePredictionRequestBody=e.EventGameFixtures=e.EventGameTiebreaker=e.EventGamePredictionFixturesModel=e.EventGamePredictionModel=e.EventGameRankingsFilters=e.EventGamePredictionsFilters=e.EventGameFilters=e.EventGameTiebreakerModel=e.EventGameFixturesModel=e.EventGamesModel=e.EventGameModel=e.TopDiscussionsFilters=e.PostsFilters=void 0,e.GamesBadgeRequirements=e.GameBadgesValue=e.GameBadgeRequirements=e.FootballBadgesValue=e.FootballBadgeRequirements=e.DiscussionsBadgesValue=e.DiscussionsBadgeRequirements=e.ClientBadgesV2=e.BadgesValueV2=e.BadgesModelV2=e.RequirementModel=e.GeneralRequirementModel=e.GeneralBadgesValue=e.ClientBadges=e.BadgesValue=e.BadgesModel=e.ActionsModel=e.ActionValueModel=e.ListContentFilters=e.ListContentModel=e.ListContentResponseModel=e.MappingModel=e.MappingResponseModel=e.PreferenceModel=e.BrandingImagesModel=e.BrandingUrlsModel=e.BrandingColorsModel=e.BrandingModel=e.RelatedEntityRelationship=e.ImagesModel=e.SDKConfiguraitonModel=e.FansUnitedSDKModel=e.AssetsModel=e.PaginationFootballProperties=e.MetaFootballModel=e.FootballPaginationModel=e.SearchFilters=e.SearchModel=e.TeamFormModel=e.TeamColors=e.TeamFilters=e.TeamFullModel=e.TeamBasicModel=e.PlayerShortModel=e.PlayerMarketResultModel=e.PlayerAssetsModel=e.PlayerFilters=e.TopPlayerModel=e.PlayerSquadModel=e.PlayerFullModel=void 0,e.ClassicQuizParticipationBodyModel=e.ClassicQuizOptionModel=e.ClassicQuizQuestionModel=e.ClassicQuizFullModel=e.ClassicQuizFilters=e.ClassicQuizBasicModel=e.PredictionMatchQuizModel=e.GamesMatchQuizListModel=e.GameMarketsResults=e.FixturesMatchQuizModel=e.MatchQuizConfigModel=e.TiersModel=e.TemplateGroupFilter=e.TemplateGroups=e.TemplateByIdModel=e.TemplateModel=e.TemplateBreakdownPointsModel=e.TemplateBreakdownModel=e.RewardsModelV2=e.RewardsModel=e.RankingsModel=e.PointsValueModel=e.PointsModel=e.Points=e.TemplateMeta=e.LoyaltyMeta=e.LeagueLeaderboardMetaModel=e.FiltersMetaModel=e.LeaderboardModel=e.LeaderboardResponseModel=e.LeaderboardLeagueResponse=e.HighestSuccessRateModel=e.TemplateFilters=e.RankingsFilters=e.LoyaltyFilters=e.LeagueLeaderboardFilters=e.HighestSuccessRateFilters=e.EntitiesFollowsFilters=e.EntitiesFollows=e.LoyaltyConfigModelV2=e.LoyaltyConfigModel=e.VotingBadgesValue=e.PotmBadgesValue=e.VotingBadgeRequirements=e.PollBadgesValue=e.PredictorBadgesValue=e.PredictorBadgeRequirements=e.MiniGamesBadgesValue=e.MiniGamesBadgeRequirements=e.GamesBadgesValue=void 0,e.BookmakerUrlModel=e.BookmakerAssetModel=e.BookmakerLinkModel=e.BookmakerBrandingModel=e.BookmakerModel=e.PersonalityQuizPersonaPercentsModel=e.PersonalityQuizParticipationQuestionModel=e.PersonalityQuizParticipationModel=e.PersonalityQuizParticipationBodyModel=e.PersonalityQuizFilters=e.PersonalityQuizFullModel=e.PersonalityQuizOptionModel=e.PersonalityQuizPersonaPointsModel=e.PersonalityQuizQuestionModel=e.PersonalityQuizResultsModel=e.PersonalityQuizzesModel=e.PersonalityQuizBasicModel=e.ResultsSummaryModel=e.MiniGamesFilters=e.MiniGamesContextTag=e.MiniGamesContext=e.MiniGameImages=e.EitherOrResultsStandingsModel=e.EitherOrResultsModel=e.EitherOrResultsBreakdownModel=e.EitherOrParticipationStepsOptionModel=e.EitherOrParticipationStepsModel=e.EitherOrParticipationRequestModel=e.EitherOrParticipationRequestFullModel=e.EitherOrParticipationModel=e.EitherOrStatsModel=e.EitherOrsModel=e.EitherOrPointsModel=e.EitherOrFullModel=e.EitherOrFilters=e.EitherOrBasicModel=e.ClassicQuizzesLeaderboardModel=e.ClassicQuizUserRankModel=e.ClassicQuizUserRank=e.ClassicQuizRankModel=e.ClassicQuizRankFilters=e.ClassicQuizLeaderboardMeta=e.ClassicQuizLeaderboardFilters=e.ClassicQuizFiltersMeta=e.ClassicQuizQuestionsReportModel=e.ClassicQuizzesModel=e.ClassicQuizUserParticipationModel=e.ClassicQuizParticipationsFilters=e.ClassicQuizParticipationQuestionModel=e.ClassicQuizParticipationModel=void 0,e.PrivateLeagueModel=e.PrivateLeaguePredictionModel=e.PrivateLeagueParamUpdateBody=e.PrivateLeagueParamCreateBody=e.PrivateLeagueFullModel=e.PastTemplateModel=e.AcceptPrivateLeagueModel=e.ValueOneXTwo=e.ValueHalfTimeFullTime=e.ValueDoubleChance=e.ValueCorrectScore=e.ValueCorners=e.ValueBoolean=e.ValueAndPlayerId=e.MatchSummaryModel=e.PredictionsModel=e.PredictionsFilters=e.PredictionResponseModel=e.PredictionRequestModel=e.NoYesModel=e.MatchPlayerMarketResultModel=e.MatchMarketsResultsModel=e.MatchCorrectScoreMarketResultModel=e.TopCorrectScoresModel=e.CalculatedOneXTwoFromScoresModel=e.RedCardFixtureModel=e.PlayerFixtureModel=e.PenaltyMatchFixtureModel=e.OverGoalsFixtureModel=e.OverCornersFixtureModel=e.OneXTwoFixtureModel=e.HalfTimeFullTimeFixtureModel=e.DoubleChanceFixtureModel=e.CorrectScoreFixtureModel=e.CornersFixtureModel=e.BothTeamsFixtureModel=e.ResultModel=e.FixturesResponseModel=e.FixturesPredictionModel=e.UserDataConfigModel=e.SuccessRateScopeModel=e.PredictorConfigModel=e.MarketsConfigModel=e.MatchOddsModel=e.SelectionProviderInfoModel=e.MatchOddsMarketTypeModel=e.MatchOddsMarketSelectionModel=e.MatchOddsMarketScopeModel=e.MatchOddsMarketModel=e.MatchOddsFilters=void 0,e.FixturesGamesModel=e.TopXConfigModel=e.StandingGameRankingsModel=e.StandingGamePredictionModel=e.StandingGameRankingsFilters=e.StandingGamesFilters=e.StandingGamePredictionsModel=e.StandingGameMetaParticipantsModel=e.StandingGameMetaModel=e.StandingGameModel=e.StandingGamesModel=e.FollowStatusModel=e.LeadModel=e.LeadRequestBody=e.SummarizedBreakdown=e.SuccessRates=e.SuccessRatePercent=e.SinglePredictionsStats=e.SinglePredictionsBreakdown=e.ProfileStatsModel=e.PredictionsStats=e.GamePredictionsStats=e.EitherOrStats=e.DiscussionStats=e.ClassicQuizzesStats=e.AchievementsStats=e.FullnessProfile=e.CompletedModel=e.BreakdownModel=e.FollowModel=e.FollowingModel=e.FollowersModel=e.FollowFilters=e.FullInterestModel=e.InterestModel=e.ProfileCountryModel=e.DetailedProfileModel=e.ProfileModel=e.PrivateLeagueUpdateModel=e.PrivateLeagueBasicUpdateRequestBody=e.PrivateLeagueCreateModel=e.PrivateLeagueBasicCreateModel=e.PrivateLeagueRankingsModel=e.PrivateLeaguePredictionsFilters=e.PrivateLeaguePostsFilters=e.PrivateLeagueFilters=e.MyLeaguesFilters=e.InvitationFilters=e.PrivateLeaguesModel=e.PrivateLeaguePredictionsModel=void 0,e.PotmResultsMetaModel=e.PotmResultsModel=e.PotmResultsResponseModel=e.PotmUserVotesModel=e.PotmUserVotesResponseModel=e.PotmUserVotesFilters=e.PollsUserVotesModel=e.PollsModel=e.SinglePollVoteModel=e.PollVoteFullModel=e.PollVoteBasicModel=e.PreferenceMappingModel=e.PollOptionModel=e.PollFullModel=e.PollBasicModel=e.PollsFilters=e.TopXPredictionRequestModel=e.PredictionTopXModel=e.UserListWinners=e.ContestWinners=e.TimeTiebreaker=e.TiebreakerModel=e.GamesTopXListModel=e.GamesListModel=e.GamesFilters=e.GameResultsModel=e.GameModel=e.GameByIdModel=e.FixturesTopXModel=void 0;var i=n(80316);Object.defineProperty(e,"ActivityMeta",{enumerable:!0,get:function(){return r(i).default}});var a=n(21517);Object.defineProperty(e,"ActivityResponseBody",{enumerable:!0,get:function(){return r(a).default}});var s=n(16021);Object.defineProperty(e,"PaginationActivities",{enumerable:!0,get:function(){return r(s).default}});var o=n(82195);Object.defineProperty(e,"ActivityFilters",{enumerable:!0,get:function(){return r(o).default}});var u=n(60629);Object.defineProperty(e,"OwnActivityFilters",{enumerable:!0,get:function(){return r(u).default}});var l=n(28636);Object.defineProperty(e,"UserActivityFilters",{enumerable:!0,get:function(){return r(l).default}});var c=n(74630);Object.defineProperty(e,"CreateActivityRequestBody",{enumerable:!0,get:function(){return r(c).default}});var d=n(51382);Object.defineProperty(e,"CampaignModel",{enumerable:!0,get:function(){return r(d).default}});var f=n(37976);Object.defineProperty(e,"ContentModel",{enumerable:!0,get:function(){return r(f).default}});var h=n(72820);Object.defineProperty(e,"ContextModel",{enumerable:!0,get:function(){return r(h).default}});var p=n(87060);Object.defineProperty(e,"TagsModel",{enumerable:!0,get:function(){return r(p).default}});var m=n(51922);Object.defineProperty(e,"BracketGameModel",{enumerable:!0,get:function(){return r(m).default}});var v=n(20594);Object.defineProperty(e,"BracketGameTiebreakerModel",{enumerable:!0,get:function(){return r(v).default}});var _=n(34971);Object.defineProperty(e,"BracketGameMetaModel",{enumerable:!0,get:function(){return r(_).default}});var y=n(29070);Object.defineProperty(e,"BracketGameMetaParticipantsModel",{enumerable:!0,get:function(){return r(y).default}});var g=n(18486);Object.defineProperty(e,"BracketGameFixturesModel",{enumerable:!0,get:function(){return r(g).default}});var b=n(73911);Object.defineProperty(e,"BracketGameFixtureScoreModel",{enumerable:!0,get:function(){return r(b).default}});var w=n(83685);Object.defineProperty(e,"BracketGamePredictionsFilters",{enumerable:!0,get:function(){return r(w).default}});var E=n(96166);Object.defineProperty(e,"BracketGamePredictionModel",{enumerable:!0,get:function(){return r(E).default}});var I=n(33830);Object.defineProperty(e,"BracketGamePredictionFixturesModel",{enumerable:!0,get:function(){return r(I).default}});var M=n(41198);Object.defineProperty(e,"BracketGameTiebreaker",{enumerable:!0,get:function(){return r(M).default}});var O=n(7583);Object.defineProperty(e,"BracketGamePredictionRequestBody",{enumerable:!0,get:function(){return r(O).default}});var P=n(15142);Object.defineProperty(e,"BracketGameFixtures",{enumerable:!0,get:function(){return r(P).default}});var T=n(46040);Object.defineProperty(e,"BracketGamePredictionsModel",{enumerable:!0,get:function(){return r(T).default}});var S=n(73253);Object.defineProperty(e,"BracketGameFilters",{enumerable:!0,get:function(){return r(S).default}});var A=n(49992);Object.defineProperty(e,"BracketGamesModel",{enumerable:!0,get:function(){return r(A).default}});var C=n(6932);Object.defineProperty(e,"BracketGameRankingsModel",{enumerable:!0,get:function(){return r(C).default}});var R=n(76085);Object.defineProperty(e,"AcceptChallengeModel",{enumerable:!0,get:function(){return r(R).default}});var D=n(95124);Object.defineProperty(e,"ChallengeCreateModel",{enumerable:!0,get:function(){return r(D).default}});var F=n(39845);Object.defineProperty(e,"ChallengeUpdateModel",{enumerable:!0,get:function(){return r(F).default}});var L=n(33820);Object.defineProperty(e,"ChallengeFilters",{enumerable:!0,get:function(){return r(L).default}});var k=n(62388);Object.defineProperty(e,"MyChallengesFilters",{enumerable:!0,get:function(){return r(k).default}});var j=n(11298);Object.defineProperty(e,"ChallengeRankingsModel",{enumerable:!0,get:function(){return r(j).default}});var N=n(77897);Object.defineProperty(e,"DiscussionModel",{enumerable:!0,get:function(){return r(N).default}});var x=n(39838);Object.defineProperty(e,"CreatePostParamBody",{enumerable:!0,get:function(){return r(x).default}});var G=n(44071);Object.defineProperty(e,"PostByIdBasicModel",{enumerable:!0,get:function(){return r(G).default}});var U=n(42528);Object.defineProperty(e,"PostByIdFullModel",{enumerable:!0,get:function(){return r(U).default}});var B=n(25678);Object.defineProperty(e,"PostCreateModel",{enumerable:!0,get:function(){return r(B).default}});var V=n(70377);Object.defineProperty(e,"PostsCountDiscussionModel",{enumerable:!0,get:function(){return r(V).default}});var H=n(29331);Object.defineProperty(e,"PostsDiscussionBasicModel",{enumerable:!0,get:function(){return r(H).default}});var z=n(64858);Object.defineProperty(e,"PostsFullModel",{enumerable:!0,get:function(){return r(z).default}});var q=n(19448);Object.defineProperty(e,"PostsMetaModel",{enumerable:!0,get:function(){return r(q).default}});var W=n(84071);Object.defineProperty(e,"PostsModel",{enumerable:!0,get:function(){return r(W).default}});var Q=n(51579);Object.defineProperty(e,"ReactionModel",{enumerable:!0,get:function(){return r(Q).default}});var Y=n(83687);Object.defineProperty(e,"ReportModel",{enumerable:!0,get:function(){return r(Y).default}});var X=n(85789);Object.defineProperty(e,"VersionsModel",{enumerable:!0,get:function(){return r(X).default}});var K=n(33949);Object.defineProperty(e,"AutomaticModerationModel",{enumerable:!0,get:function(){return r(K).default}});var J=n(61079);Object.defineProperty(e,"DictionaryModel",{enumerable:!0,get:function(){return r(J).default}});var Z=n(18543);Object.defineProperty(e,"DiscussionsConfigModel",{enumerable:!0,get:function(){return r(Z).default}});var $=n(90505);Object.defineProperty(e,"DiscussionsFilters",{enumerable:!0,get:function(){return r($).default}});var tt=n(39209);Object.defineProperty(e,"PostsFilters",{enumerable:!0,get:function(){return r(tt).default}});var et=n(54804);Object.defineProperty(e,"TopDiscussionsFilters",{enumerable:!0,get:function(){return r(et).default}});var nt=n(74809);Object.defineProperty(e,"EventGameModel",{enumerable:!0,get:function(){return r(nt).default}});var rt=n(11407);Object.defineProperty(e,"EventGamesModel",{enumerable:!0,get:function(){return r(rt).default}});var it=n(95106);Object.defineProperty(e,"EventGameFixturesModel",{enumerable:!0,get:function(){return r(it).default}});var at=n(62372);Object.defineProperty(e,"EventGameTiebreakerModel",{enumerable:!0,get:function(){return r(at).default}});var st=n(23737);Object.defineProperty(e,"EventGameFilters",{enumerable:!0,get:function(){return r(st).default}});var ot=n(38651);Object.defineProperty(e,"EventGamePredictionsFilters",{enumerable:!0,get:function(){return r(ot).default}});var ut=n(2431);Object.defineProperty(e,"EventGameRankingsFilters",{enumerable:!0,get:function(){return r(ut).default}});var lt=n(77618);Object.defineProperty(e,"EventGamePredictionModel",{enumerable:!0,get:function(){return r(lt).default}});var ct=n(85);Object.defineProperty(e,"EventGamePredictionFixturesModel",{enumerable:!0,get:function(){return r(ct).default}});var dt=n(31836);Object.defineProperty(e,"EventGameTiebreaker",{enumerable:!0,get:function(){return r(dt).default}});var ft=n(12882);Object.defineProperty(e,"EventGameFixtures",{enumerable:!0,get:function(){return r(ft).default}});var ht=n(50992);Object.defineProperty(e,"EventGamePredictionRequestBody",{enumerable:!0,get:function(){return r(ht).default}});var pt=n(3868);Object.defineProperty(e,"EventGamePredictionsModel",{enumerable:!0,get:function(){return r(pt).default}});var mt=n(58096);Object.defineProperty(e,"EventGameRankingsModel",{enumerable:!0,get:function(){return r(mt).default}});var vt=n(58012);Object.defineProperty(e,"EventGameFixtureEnumModel",{enumerable:!0,get:function(){return r(vt).default}});var _t=n(2703);Object.defineProperty(e,"EventGameFixtureNumberModel",{enumerable:!0,get:function(){return r(_t).default}});var yt=n(62535);Object.defineProperty(e,"StandardFansUnitedException",{enumerable:!0,get:function(){return r(yt).default}});var gt=n(48712);Object.defineProperty(e,"FansUnitedSdkFetchException",{enumerable:!0,get:function(){return r(gt).default}});var bt=n(16808);Object.defineProperty(e,"FantasyPlayerDetailedStatsModel",{enumerable:!0,get:function(){return r(bt).default}});var wt=n(58152);Object.defineProperty(e,"FantasyPlayerStatsModel",{enumerable:!0,get:function(){return r(wt).default}});var Et=n(55769);Object.defineProperty(e,"FantasyPlayersPointsModel",{enumerable:!0,get:function(){return r(Et).default}});var It=n(68031);Object.defineProperty(e,"FantasyPredictionRequestBody",{enumerable:!0,get:function(){return r(It).default}});var Mt=n(46472);Object.defineProperty(e,"PlayerDetailedPointsModel",{enumerable:!0,get:function(){return r(Mt).default}});var Ot=n(69922);Object.defineProperty(e,"PlayerDetailedStatsModel",{enumerable:!0,get:function(){return r(Ot).default}});var Pt=n(98571);Object.defineProperty(e,"PlayerPointsModel",{enumerable:!0,get:function(){return r(Pt).default}});var Tt=n(83327);Object.defineProperty(e,"PlayerStatsMatchModel",{enumerable:!0,get:function(){return r(Tt).default}});var St=n(4339);Object.defineProperty(e,"FantasyCoefficientsModel",{enumerable:!0,get:function(){return r(St).default}});var At=n(60516);Object.defineProperty(e,"FantasyConfigModel",{enumerable:!0,get:function(){return r(At).default}});var Ct=n(71002);Object.defineProperty(e,"FantasyPlayersModel",{enumerable:!0,get:function(){return r(Ct).default}});var Rt=n(47626);Object.defineProperty(e,"FantasyMultipliersModel",{enumerable:!0,get:function(){return r(Rt).default}});var Dt=n(63096);Object.defineProperty(e,"FantasyPlayerDetailedStatsMetaModel",{enumerable:!0,get:function(){return r(Dt).default}});var Ft=n(52158);Object.defineProperty(e,"FantasyPlayersMetaModel",{enumerable:!0,get:function(){return r(Ft).default}});var Lt=n(54563);Object.defineProperty(e,"PlayerDetailedStatsFilters",{enumerable:!0,get:function(){return r(Lt).default}});var kt=n(21890);Object.defineProperty(e,"PlayersPointsFilters",{enumerable:!0,get:function(){return r(kt).default}});var jt=n(96975);Object.defineProperty(e,"CompetitionBasicModel",{enumerable:!0,get:function(){return r(jt).default}});var Nt=n(12754);Object.defineProperty(e,"CompetitionFilters",{enumerable:!0,get:function(){return r(Nt).default}});var xt=n(73321);Object.defineProperty(e,"CompetitionFullModel",{enumerable:!0,get:function(){return r(xt).default}});var Gt=n(24427);Object.defineProperty(e,"FootballCountryModel",{enumerable:!0,get:function(){return r(Gt).default}});var Ut=n(13572);Object.defineProperty(e,"MatchBasicModel",{enumerable:!0,get:function(){return r(Ut).default}});var Bt=n(79661);Object.defineProperty(e,"MatchFullModel",{enumerable:!0,get:function(){return r(Bt).default}});var Vt=n(86134);Object.defineProperty(e,"MatchFilters",{enumerable:!0,get:function(){return r(Vt).default}});var Ht=n(36899);Object.defineProperty(e,"MatchStatus",{enumerable:!0,get:function(){return r(Ht).default}});var zt=n(77950);Object.defineProperty(e,"StatsModel",{enumerable:!0,get:function(){return r(zt).default}});var qt=n(4652);Object.defineProperty(e,"ScoresModel",{enumerable:!0,get:function(){return r(qt).default}});var Wt=n(28470);Object.defineProperty(e,"LineupsModel",{enumerable:!0,get:function(){return r(Wt).default}});var Qt=n(59452);Object.defineProperty(e,"TimelineModel",{enumerable:!0,get:function(){return r(Qt).default}});var Yt=n(46780);Object.defineProperty(e,"PlayerStatsModel",{enumerable:!0,get:function(){return r(Yt).default}});var Xt=n(24426);Object.defineProperty(e,"PlayerBasicModel",{enumerable:!0,get:function(){return r(Xt).default}});var Kt=n(21837);Object.defineProperty(e,"PlayerFullModel",{enumerable:!0,get:function(){return r(Kt).default}});var Jt=n(59071);Object.defineProperty(e,"PlayerSquadModel",{enumerable:!0,get:function(){return r(Jt).default}});var Zt=n(30056);Object.defineProperty(e,"TopPlayerModel",{enumerable:!0,get:function(){return r(Zt).default}});var $t=n(26477);Object.defineProperty(e,"PlayerFilters",{enumerable:!0,get:function(){return r($t).default}});var te=n(38632);Object.defineProperty(e,"PlayerAssetsModel",{enumerable:!0,get:function(){return r(te).default}});var ee=n(32858);Object.defineProperty(e,"PlayerMarketResultModel",{enumerable:!0,get:function(){return r(ee).default}});var ne=n(44803);Object.defineProperty(e,"PlayerShortModel",{enumerable:!0,get:function(){return r(ne).default}});var re=n(99314);Object.defineProperty(e,"TeamBasicModel",{enumerable:!0,get:function(){return r(re).default}});var ie=n(57316);Object.defineProperty(e,"TeamFullModel",{enumerable:!0,get:function(){return r(ie).default}});var ae=n(59920);Object.defineProperty(e,"TeamFilters",{enumerable:!0,get:function(){return r(ae).default}});var se=n(33773);Object.defineProperty(e,"TeamColors",{enumerable:!0,get:function(){return r(se).default}});var oe=n(61284);Object.defineProperty(e,"TeamFormModel",{enumerable:!0,get:function(){return r(oe).default}});var ue=n(36967);Object.defineProperty(e,"SearchModel",{enumerable:!0,get:function(){return r(ue).default}});var le=n(40604);Object.defineProperty(e,"SearchFilters",{enumerable:!0,get:function(){return r(le).default}});var ce=n(90753);Object.defineProperty(e,"FootballPaginationModel",{enumerable:!0,get:function(){return r(ce).default}});var de=n(73569);Object.defineProperty(e,"MetaFootballModel",{enumerable:!0,get:function(){return r(de).default}});var fe=n(10155);Object.defineProperty(e,"PaginationFootballProperties",{enumerable:!0,get:function(){return r(fe).default}});var he=n(39188);Object.defineProperty(e,"AssetsModel",{enumerable:!0,get:function(){return r(he).default}});var pe=n(43529);Object.defineProperty(e,"FansUnitedSDKModel",{enumerable:!0,get:function(){return r(pe).default}});var me=n(17563);Object.defineProperty(e,"SDKConfiguraitonModel",{enumerable:!0,get:function(){return r(me).default}});var ve=n(30439);Object.defineProperty(e,"ImagesModel",{enumerable:!0,get:function(){return r(ve).default}});var _e=n(78923);Object.defineProperty(e,"RelatedEntityRelationship",{enumerable:!0,get:function(){return r(_e).default}});var ye=n(6862);Object.defineProperty(e,"BrandingModel",{enumerable:!0,get:function(){return r(ye).default}});var ge=n(81282);Object.defineProperty(e,"BrandingColorsModel",{enumerable:!0,get:function(){return r(ge).default}});var be=n(12291);Object.defineProperty(e,"BrandingUrlsModel",{enumerable:!0,get:function(){return r(be).default}});var we=n(1997);Object.defineProperty(e,"BrandingImagesModel",{enumerable:!0,get:function(){return r(we).default}});var Ee=n(62475);Object.defineProperty(e,"PreferenceModel",{enumerable:!0,get:function(){return r(Ee).default}});var Ie=n(47589);Object.defineProperty(e,"MappingResponseModel",{enumerable:!0,get:function(){return r(Ie).default}});var Me=n(6448);Object.defineProperty(e,"MappingModel",{enumerable:!0,get:function(){return r(Me).default}});var Oe=n(80138);Object.defineProperty(e,"ListContentResponseModel",{enumerable:!0,get:function(){return r(Oe).default}});var Pe=n(97053);Object.defineProperty(e,"ListContentModel",{enumerable:!0,get:function(){return r(Pe).default}});var Te=n(9517);Object.defineProperty(e,"ListContentFilters",{enumerable:!0,get:function(){return r(Te).default}});var Se=n(78153);Object.defineProperty(e,"ActionValueModel",{enumerable:!0,get:function(){return r(Se).default}});var Ae=n(75111);Object.defineProperty(e,"ActionsModel",{enumerable:!0,get:function(){return r(Ae).default}});var Ce=n(38608);Object.defineProperty(e,"BadgesModel",{enumerable:!0,get:function(){return r(Ce).default}});var Re=n(70246);Object.defineProperty(e,"BadgesValue",{enumerable:!0,get:function(){return r(Re).default}});var De=n(18687);Object.defineProperty(e,"ClientBadges",{enumerable:!0,get:function(){return r(De).default}});var Fe=n(77983);Object.defineProperty(e,"GeneralBadgesValue",{enumerable:!0,get:function(){return r(Fe).default}});var Le=n(82354);Object.defineProperty(e,"GeneralRequirementModel",{enumerable:!0,get:function(){return r(Le).default}});var ke=n(51429);Object.defineProperty(e,"RequirementModel",{enumerable:!0,get:function(){return r(ke).default}});var je=n(49750);Object.defineProperty(e,"BadgesModelV2",{enumerable:!0,get:function(){return r(je).default}});var Ne=n(99805);Object.defineProperty(e,"BadgesValueV2",{enumerable:!0,get:function(){return r(Ne).default}});var xe=n(63636);Object.defineProperty(e,"ClientBadgesV2",{enumerable:!0,get:function(){return r(xe).default}});var Ge=n(50075);Object.defineProperty(e,"DiscussionsBadgeRequirements",{enumerable:!0,get:function(){return r(Ge).default}});var Ue=n(33101);Object.defineProperty(e,"DiscussionsBadgesValue",{enumerable:!0,get:function(){return r(Ue).default}});var Be=n(11963);Object.defineProperty(e,"FootballBadgeRequirements",{enumerable:!0,get:function(){return r(Be).default}});var Ve=n(93035);Object.defineProperty(e,"FootballBadgesValue",{enumerable:!0,get:function(){return r(Ve).default}});var He=n(64270);Object.defineProperty(e,"GameBadgeRequirements",{enumerable:!0,get:function(){return r(He).default}});var ze=n(68699);Object.defineProperty(e,"GameBadgesValue",{enumerable:!0,get:function(){return r(ze).default}});var qe=n(33626);Object.defineProperty(e,"GamesBadgeRequirements",{enumerable:!0,get:function(){return r(qe).default}});var We=n(16268);Object.defineProperty(e,"GamesBadgesValue",{enumerable:!0,get:function(){return r(We).default}});var Qe=n(45643);Object.defineProperty(e,"MiniGamesBadgeRequirements",{enumerable:!0,get:function(){return r(Qe).default}});var Ye=n(38574);Object.defineProperty(e,"MiniGamesBadgesValue",{enumerable:!0,get:function(){return r(Ye).default}});var Xe=n(63143);Object.defineProperty(e,"PredictorBadgeRequirements",{enumerable:!0,get:function(){return r(Xe).default}});var Ke=n(95793);Object.defineProperty(e,"PredictorBadgesValue",{enumerable:!0,get:function(){return r(Ke).default}});var Je=n(98743);Object.defineProperty(e,"PollBadgesValue",{enumerable:!0,get:function(){return r(Je).default}});var Ze=n(21821);Object.defineProperty(e,"VotingBadgeRequirements",{enumerable:!0,get:function(){return r(Ze).default}});var $e=n(64646);Object.defineProperty(e,"PotmBadgesValue",{enumerable:!0,get:function(){return r($e).default}});var tn=n(27978);Object.defineProperty(e,"VotingBadgesValue",{enumerable:!0,get:function(){return r(tn).default}});var en=n(50515);Object.defineProperty(e,"LoyaltyConfigModel",{enumerable:!0,get:function(){return r(en).default}});var nn=n(16866);Object.defineProperty(e,"LoyaltyConfigModelV2",{enumerable:!0,get:function(){return r(nn).default}});var rn=n(46480);Object.defineProperty(e,"EntitiesFollows",{enumerable:!0,get:function(){return r(rn).default}});var an=n(91634);Object.defineProperty(e,"EntitiesFollowsFilters",{enumerable:!0,get:function(){return r(an).default}});var sn=n(63247);Object.defineProperty(e,"HighestSuccessRateFilters",{enumerable:!0,get:function(){return r(sn).default}});var on=n(84169);Object.defineProperty(e,"LeagueLeaderboardFilters",{enumerable:!0,get:function(){return r(on).default}});var un=n(97910);Object.defineProperty(e,"LoyaltyFilters",{enumerable:!0,get:function(){return r(un).default}});var ln=n(34996);Object.defineProperty(e,"RankingsFilters",{enumerable:!0,get:function(){return r(ln).default}});var cn=n(48061);Object.defineProperty(e,"TemplateFilters",{enumerable:!0,get:function(){return r(cn).default}});var dn=n(56507);Object.defineProperty(e,"HighestSuccessRateModel",{enumerable:!0,get:function(){return r(dn).default}});var fn=n(91317);Object.defineProperty(e,"LeaderboardLeagueResponse",{enumerable:!0,get:function(){return r(fn).default}});var hn=n(27460);Object.defineProperty(e,"LeaderboardResponseModel",{enumerable:!0,get:function(){return r(hn).default}});var pn=n(69642);Object.defineProperty(e,"LeaderboardModel",{enumerable:!0,get:function(){return r(pn).default}});var mn=n(93409);Object.defineProperty(e,"FiltersMetaModel",{enumerable:!0,get:function(){return r(mn).default}});var vn=n(68988);Object.defineProperty(e,"LeagueLeaderboardMetaModel",{enumerable:!0,get:function(){return r(vn).default}});var _n=n(45828);Object.defineProperty(e,"LoyaltyMeta",{enumerable:!0,get:function(){return r(_n).default}});var yn=n(69012);Object.defineProperty(e,"TemplateMeta",{enumerable:!0,get:function(){return r(yn).default}});var gn=n(5038);Object.defineProperty(e,"Points",{enumerable:!0,get:function(){return r(gn).default}});var bn=n(4187);Object.defineProperty(e,"PointsModel",{enumerable:!0,get:function(){return r(bn).default}});var wn=n(78072);Object.defineProperty(e,"PointsValueModel",{enumerable:!0,get:function(){return r(wn).default}});var En=n(9013);Object.defineProperty(e,"RankingsModel",{enumerable:!0,get:function(){return r(En).default}});var In=n(94226);Object.defineProperty(e,"RewardsModel",{enumerable:!0,get:function(){return r(In).default}});var Mn=n(66483);Object.defineProperty(e,"RewardsModelV2",{enumerable:!0,get:function(){return r(Mn).default}});var On=n(36569);Object.defineProperty(e,"TemplateBreakdownModel",{enumerable:!0,get:function(){return r(On).default}});var Pn=n(33224);Object.defineProperty(e,"TemplateBreakdownPointsModel",{enumerable:!0,get:function(){return r(Pn).default}});var Tn=n(30194);Object.defineProperty(e,"TemplateModel",{enumerable:!0,get:function(){return r(Tn).default}});var Sn=n(44982);Object.defineProperty(e,"TemplateByIdModel",{enumerable:!0,get:function(){return r(Sn).default}});var An=n(49324);Object.defineProperty(e,"TemplateGroups",{enumerable:!0,get:function(){return r(An).default}});var Cn=n(8587);Object.defineProperty(e,"TemplateGroupFilter",{enumerable:!0,get:function(){return r(Cn).default}});var Rn=n(47478);Object.defineProperty(e,"TiersModel",{enumerable:!0,get:function(){return r(Rn).default}});var Dn=n(45765);Object.defineProperty(e,"MatchQuizConfigModel",{enumerable:!0,get:function(){return r(Dn).default}});var Fn=n(38410);Object.defineProperty(e,"FixturesMatchQuizModel",{enumerable:!0,get:function(){return r(Fn).default}});var Ln=n(30670);Object.defineProperty(e,"GameMarketsResults",{enumerable:!0,get:function(){return r(Ln).default}});var kn=n(87243);Object.defineProperty(e,"GamesMatchQuizListModel",{enumerable:!0,get:function(){return r(kn).default}});var jn=n(68042);Object.defineProperty(e,"PredictionMatchQuizModel",{enumerable:!0,get:function(){return r(jn).default}});var Nn=n(65985);Object.defineProperty(e,"ClassicQuizBasicModel",{enumerable:!0,get:function(){return r(Nn).default}});var xn=n(28107);Object.defineProperty(e,"ClassicQuizFilters",{enumerable:!0,get:function(){return r(xn).default}});var Gn=n(96235);Object.defineProperty(e,"ClassicQuizFullModel",{enumerable:!0,get:function(){return r(Gn).default}});var Un=n(20772);Object.defineProperty(e,"ClassicQuizQuestionModel",{enumerable:!0,get:function(){return r(Un).default}});var Bn=n(41154);Object.defineProperty(e,"ClassicQuizOptionModel",{enumerable:!0,get:function(){return r(Bn).default}});var Vn=n(13142);Object.defineProperty(e,"ClassicQuizParticipationBodyModel",{enumerable:!0,get:function(){return r(Vn).default}});var Hn=n(68944);Object.defineProperty(e,"ClassicQuizParticipationModel",{enumerable:!0,get:function(){return r(Hn).default}});var zn=n(47763);Object.defineProperty(e,"ClassicQuizParticipationQuestionModel",{enumerable:!0,get:function(){return r(zn).default}});var qn=n(63069);Object.defineProperty(e,"ClassicQuizParticipationsFilters",{enumerable:!0,get:function(){return r(qn).default}});var Wn=n(81124);Object.defineProperty(e,"ClassicQuizUserParticipationModel",{enumerable:!0,get:function(){return r(Wn).default}});var Qn=n(85657);Object.defineProperty(e,"ClassicQuizzesModel",{enumerable:!0,get:function(){return r(Qn).default}});var Yn=n(91717);Object.defineProperty(e,"ClassicQuizQuestionsReportModel",{enumerable:!0,get:function(){return r(Yn).default}});var Xn=n(19657);Object.defineProperty(e,"ClassicQuizFiltersMeta",{enumerable:!0,get:function(){return r(Xn).default}});var Kn=n(32261);Object.defineProperty(e,"ClassicQuizLeaderboardFilters",{enumerable:!0,get:function(){return r(Kn).default}});var Jn=n(12702);Object.defineProperty(e,"ClassicQuizLeaderboardMeta",{enumerable:!0,get:function(){return r(Jn).default}});var Zn=n(80425);Object.defineProperty(e,"ClassicQuizRankFilters",{enumerable:!0,get:function(){return r(Zn).default}});var $n=n(75563);Object.defineProperty(e,"ClassicQuizRankModel",{enumerable:!0,get:function(){return r($n).default}});var tr=n(38967);Object.defineProperty(e,"ClassicQuizUserRank",{enumerable:!0,get:function(){return r(tr).default}});var er=n(12723);Object.defineProperty(e,"ClassicQuizUserRankModel",{enumerable:!0,get:function(){return r(er).default}});var nr=n(43238);Object.defineProperty(e,"ClassicQuizzesLeaderboardModel",{enumerable:!0,get:function(){return r(nr).default}});var rr=n(69619);Object.defineProperty(e,"EitherOrBasicModel",{enumerable:!0,get:function(){return r(rr).default}});var ir=n(67050);Object.defineProperty(e,"EitherOrFilters",{enumerable:!0,get:function(){return r(ir).default}});var ar=n(3167);Object.defineProperty(e,"EitherOrFullModel",{enumerable:!0,get:function(){return r(ar).default}});var sr=n(69146);Object.defineProperty(e,"EitherOrPointsModel",{enumerable:!0,get:function(){return r(sr).default}});var or=n(11969);Object.defineProperty(e,"EitherOrsModel",{enumerable:!0,get:function(){return r(or).default}});var ur=n(15367);Object.defineProperty(e,"EitherOrStatsModel",{enumerable:!0,get:function(){return r(ur).default}});var lr=n(55021);Object.defineProperty(e,"EitherOrParticipationModel",{enumerable:!0,get:function(){return r(lr).default}});var cr=n(70850);Object.defineProperty(e,"EitherOrParticipationRequestFullModel",{enumerable:!0,get:function(){return r(cr).default}});var dr=n(55990);Object.defineProperty(e,"EitherOrParticipationRequestModel",{enumerable:!0,get:function(){return r(dr).default}});var fr=n(12557);Object.defineProperty(e,"EitherOrParticipationStepsModel",{enumerable:!0,get:function(){return r(fr).default}});var hr=n(56140);Object.defineProperty(e,"EitherOrParticipationStepsOptionModel",{enumerable:!0,get:function(){return r(hr).default}});var pr=n(12699);Object.defineProperty(e,"EitherOrResultsBreakdownModel",{enumerable:!0,get:function(){return r(pr).default}});var mr=n(8590);Object.defineProperty(e,"EitherOrResultsModel",{enumerable:!0,get:function(){return r(mr).default}});var vr=n(45289);Object.defineProperty(e,"EitherOrResultsStandingsModel",{enumerable:!0,get:function(){return r(vr).default}});var _r=n(55253);Object.defineProperty(e,"MiniGameImages",{enumerable:!0,get:function(){return r(_r).default}});var yr=n(76282);Object.defineProperty(e,"MiniGamesContext",{enumerable:!0,get:function(){return r(yr).default}});var gr=n(43323);Object.defineProperty(e,"MiniGamesContextTag",{enumerable:!0,get:function(){return r(gr).default}});var br=n(96021);Object.defineProperty(e,"MiniGamesFilters",{enumerable:!0,get:function(){return r(br).default}});var wr=n(64274);Object.defineProperty(e,"ResultsSummaryModel",{enumerable:!0,get:function(){return r(wr).default}});var Er=n(23130);Object.defineProperty(e,"PersonalityQuizBasicModel",{enumerable:!0,get:function(){return r(Er).default}});var Ir=n(53279);Object.defineProperty(e,"PersonalityQuizzesModel",{enumerable:!0,get:function(){return r(Ir).default}});var Mr=n(92314);Object.defineProperty(e,"PersonalityQuizResultsModel",{enumerable:!0,get:function(){return r(Mr).default}});var Or=n(48930);Object.defineProperty(e,"PersonalityQuizQuestionModel",{enumerable:!0,get:function(){return r(Or).default}});var Pr=n(65666);Object.defineProperty(e,"PersonalityQuizPersonaPointsModel",{enumerable:!0,get:function(){return r(Pr).default}});var Tr=n(67283);Object.defineProperty(e,"PersonalityQuizOptionModel",{enumerable:!0,get:function(){return r(Tr).default}});var Sr=n(65880);Object.defineProperty(e,"PersonalityQuizFullModel",{enumerable:!0,get:function(){return r(Sr).default}});var Ar=n(95403);Object.defineProperty(e,"PersonalityQuizFilters",{enumerable:!0,get:function(){return r(Ar).default}});var Cr=n(23648);Object.defineProperty(e,"PersonalityQuizParticipationBodyModel",{enumerable:!0,get:function(){return r(Cr).default}});var Rr=n(82682);Object.defineProperty(e,"PersonalityQuizParticipationModel",{enumerable:!0,get:function(){return r(Rr).default}});var Dr=n(94663);Object.defineProperty(e,"PersonalityQuizParticipationQuestionModel",{enumerable:!0,get:function(){return r(Dr).default}});var Fr=n(73806);Object.defineProperty(e,"PersonalityQuizPersonaPercentsModel",{enumerable:!0,get:function(){return r(Fr).default}});var Lr=n(37104);Object.defineProperty(e,"BookmakerModel",{enumerable:!0,get:function(){return r(Lr).default}});var kr=n(98446);Object.defineProperty(e,"BookmakerBrandingModel",{enumerable:!0,get:function(){return r(kr).default}});var jr=n(44875);Object.defineProperty(e,"BookmakerLinkModel",{enumerable:!0,get:function(){return r(jr).default}});var Nr=n(20660);Object.defineProperty(e,"BookmakerAssetModel",{enumerable:!0,get:function(){return r(Nr).default}});var xr=n(48287);Object.defineProperty(e,"BookmakerUrlModel",{enumerable:!0,get:function(){return r(xr).default}});var Gr=n(69196);Object.defineProperty(e,"MatchOddsFilters",{enumerable:!0,get:function(){return r(Gr).default}});var Ur=n(62641);Object.defineProperty(e,"MatchOddsMarketModel",{enumerable:!0,get:function(){return r(Ur).default}});var Br=n(71115);Object.defineProperty(e,"MatchOddsMarketScopeModel",{enumerable:!0,get:function(){return r(Br).default}});var Vr=n(42218);Object.defineProperty(e,"MatchOddsMarketSelectionModel",{enumerable:!0,get:function(){return r(Vr).default}});var Hr=n(47951);Object.defineProperty(e,"MatchOddsMarketTypeModel",{enumerable:!0,get:function(){return r(Hr).default}});var zr=n(97935);Object.defineProperty(e,"SelectionProviderInfoModel",{enumerable:!0,get:function(){return r(zr).default}});var qr=n(3002);Object.defineProperty(e,"MatchOddsModel",{enumerable:!0,get:function(){return r(qr).default}});var Wr=n(83918);Object.defineProperty(e,"MarketsConfigModel",{enumerable:!0,get:function(){return r(Wr).default}});var Qr=n(58452);Object.defineProperty(e,"PredictorConfigModel",{enumerable:!0,get:function(){return r(Qr).default}});var Yr=n(40442);Object.defineProperty(e,"SuccessRateScopeModel",{enumerable:!0,get:function(){return r(Yr).default}});var Xr=n(28824);Object.defineProperty(e,"UserDataConfigModel",{enumerable:!0,get:function(){return r(Xr).default}});var Kr=n(46367);Object.defineProperty(e,"FixturesPredictionModel",{enumerable:!0,get:function(){return r(Kr).default}});var Jr=n(22524);Object.defineProperty(e,"FixturesResponseModel",{enumerable:!0,get:function(){return r(Jr).default}});var Zr=n(54119);Object.defineProperty(e,"ResultModel",{enumerable:!0,get:function(){return r(Zr).default}});var $r=n(61206);Object.defineProperty(e,"BothTeamsFixtureModel",{enumerable:!0,get:function(){return r($r).default}});var ti=n(45274);Object.defineProperty(e,"CornersFixtureModel",{enumerable:!0,get:function(){return r(ti).default}});var ei=n(91465);Object.defineProperty(e,"CorrectScoreFixtureModel",{enumerable:!0,get:function(){return r(ei).default}});var ni=n(47535);Object.defineProperty(e,"DoubleChanceFixtureModel",{enumerable:!0,get:function(){return r(ni).default}});var ri=n(27307);Object.defineProperty(e,"HalfTimeFullTimeFixtureModel",{enumerable:!0,get:function(){return r(ri).default}});var ii=n(91718);Object.defineProperty(e,"OneXTwoFixtureModel",{enumerable:!0,get:function(){return r(ii).default}});var ai=n(85132);Object.defineProperty(e,"OverCornersFixtureModel",{enumerable:!0,get:function(){return r(ai).default}});var si=n(87344);Object.defineProperty(e,"OverGoalsFixtureModel",{enumerable:!0,get:function(){return r(si).default}});var oi=n(71855);Object.defineProperty(e,"PenaltyMatchFixtureModel",{enumerable:!0,get:function(){return r(oi).default}});var ui=n(81732);Object.defineProperty(e,"PlayerFixtureModel",{enumerable:!0,get:function(){return r(ui).default}});var li=n(45814);Object.defineProperty(e,"RedCardFixtureModel",{enumerable:!0,get:function(){return r(li).default}});var ci=n(2155);Object.defineProperty(e,"CalculatedOneXTwoFromScoresModel",{enumerable:!0,get:function(){return r(ci).default}});var di=n(88821);Object.defineProperty(e,"TopCorrectScoresModel",{enumerable:!0,get:function(){return r(di).default}});var fi=n(18430);Object.defineProperty(e,"MatchCorrectScoreMarketResultModel",{enumerable:!0,get:function(){return r(fi).default}});var hi=n(12449);Object.defineProperty(e,"MatchMarketsResultsModel",{enumerable:!0,get:function(){return r(hi).default}});var pi=n(59506);Object.defineProperty(e,"MatchPlayerMarketResultModel",{enumerable:!0,get:function(){return r(pi).default}});var mi=n(45908);Object.defineProperty(e,"NoYesModel",{enumerable:!0,get:function(){return r(mi).default}});var vi=n(53950);Object.defineProperty(e,"PredictionRequestModel",{enumerable:!0,get:function(){return r(vi).default}});var _i=n(12532);Object.defineProperty(e,"PredictionResponseModel",{enumerable:!0,get:function(){return r(_i).default}});var yi=n(97782);Object.defineProperty(e,"PredictionsFilters",{enumerable:!0,get:function(){return r(yi).default}});var gi=n(13792);Object.defineProperty(e,"PredictionsModel",{enumerable:!0,get:function(){return r(gi).default}});var bi=n(19378);Object.defineProperty(e,"MatchSummaryModel",{enumerable:!0,get:function(){return r(bi).default}});var wi=n(77321);Object.defineProperty(e,"ValueAndPlayerId",{enumerable:!0,get:function(){return r(wi).default}});var Ei=n(89883);Object.defineProperty(e,"ValueBoolean",{enumerable:!0,get:function(){return r(Ei).default}});var Ii=n(78038);Object.defineProperty(e,"ValueCorners",{enumerable:!0,get:function(){return r(Ii).default}});var Mi=n(3125);Object.defineProperty(e,"ValueCorrectScore",{enumerable:!0,get:function(){return r(Mi).default}});var Oi=n(56902);Object.defineProperty(e,"ValueDoubleChance",{enumerable:!0,get:function(){return r(Oi).default}});var Pi=n(66642);Object.defineProperty(e,"ValueHalfTimeFullTime",{enumerable:!0,get:function(){return r(Pi).default}});var Ti=n(12782);Object.defineProperty(e,"ValueOneXTwo",{enumerable:!0,get:function(){return r(Ti).default}});var Si=n(73958);Object.defineProperty(e,"AcceptPrivateLeagueModel",{enumerable:!0,get:function(){return r(Si).default}});var Ai=n(72690);Object.defineProperty(e,"PastTemplateModel",{enumerable:!0,get:function(){return r(Ai).default}});var Ci=n(78383);Object.defineProperty(e,"PrivateLeagueFullModel",{enumerable:!0,get:function(){return r(Ci).default}});var Ri=n(98796);Object.defineProperty(e,"PrivateLeagueParamCreateBody",{enumerable:!0,get:function(){return r(Ri).default}});var Di=n(24225);Object.defineProperty(e,"PrivateLeagueParamUpdateBody",{enumerable:!0,get:function(){return r(Di).default}});var Fi=n(52663);Object.defineProperty(e,"PrivateLeaguePredictionModel",{enumerable:!0,get:function(){return r(Fi).default}});var Li=n(82446);Object.defineProperty(e,"PrivateLeagueModel",{enumerable:!0,get:function(){return r(Li).default}});var ki=n(16361);Object.defineProperty(e,"PrivateLeaguePredictionsModel",{enumerable:!0,get:function(){return r(ki).default}});var ji=n(30494);Object.defineProperty(e,"PrivateLeaguesModel",{enumerable:!0,get:function(){return r(ji).default}});var Ni=n(73886);Object.defineProperty(e,"InvitationFilters",{enumerable:!0,get:function(){return r(Ni).default}});var xi=n(54121);Object.defineProperty(e,"MyLeaguesFilters",{enumerable:!0,get:function(){return r(xi).default}});var Gi=n(31461);Object.defineProperty(e,"PrivateLeagueFilters",{enumerable:!0,get:function(){return r(Gi).default}});var Ui=n(49759);Object.defineProperty(e,"PrivateLeaguePostsFilters",{enumerable:!0,get:function(){return r(Ui).default}});var Bi=n(88247);Object.defineProperty(e,"PrivateLeaguePredictionsFilters",{enumerable:!0,get:function(){return r(Bi).default}});var Vi=n(99659);Object.defineProperty(e,"PrivateLeagueRankingsModel",{enumerable:!0,get:function(){return r(Vi).default}});var Hi=n(2167);Object.defineProperty(e,"PrivateLeagueBasicCreateModel",{enumerable:!0,get:function(){return r(Hi).default}});var zi=n(91796);Object.defineProperty(e,"PrivateLeagueCreateModel",{enumerable:!0,get:function(){return r(zi).default}});var qi=n(64584);Object.defineProperty(e,"PrivateLeagueBasicUpdateRequestBody",{enumerable:!0,get:function(){return r(qi).default}});var Wi=n(44823);Object.defineProperty(e,"PrivateLeagueUpdateModel",{enumerable:!0,get:function(){return r(Wi).default}});var Qi=n(23546);Object.defineProperty(e,"ProfileModel",{enumerable:!0,get:function(){return r(Qi).default}});var Yi=n(90133);Object.defineProperty(e,"DetailedProfileModel",{enumerable:!0,get:function(){return r(Yi).default}});var Xi=n(79072);Object.defineProperty(e,"ProfileCountryModel",{enumerable:!0,get:function(){return r(Xi).default}});var Ki=n(45867);Object.defineProperty(e,"InterestModel",{enumerable:!0,get:function(){return r(Ki).default}});var Ji=n(25156);Object.defineProperty(e,"FullInterestModel",{enumerable:!0,get:function(){return r(Ji).default}});var Zi=n(69523);Object.defineProperty(e,"FollowFilters",{enumerable:!0,get:function(){return r(Zi).default}});var $i=n(54782);Object.defineProperty(e,"FollowersModel",{enumerable:!0,get:function(){return r($i).default}});var ta=n(93106);Object.defineProperty(e,"FollowingModel",{enumerable:!0,get:function(){return r(ta).default}});var ea=n(41712);Object.defineProperty(e,"FollowModel",{enumerable:!0,get:function(){return r(ea).default}});var na=n(76620);Object.defineProperty(e,"BreakdownModel",{enumerable:!0,get:function(){return r(na).default}});var ra=n(47312);Object.defineProperty(e,"CompletedModel",{enumerable:!0,get:function(){return r(ra).default}});var ia=n(99037);Object.defineProperty(e,"FullnessProfile",{enumerable:!0,get:function(){return r(ia).default}});var aa=n(61758);Object.defineProperty(e,"AchievementsStats",{enumerable:!0,get:function(){return r(aa).default}});var sa=n(86635);Object.defineProperty(e,"ClassicQuizzesStats",{enumerable:!0,get:function(){return r(sa).default}});var oa=n(13009);Object.defineProperty(e,"DiscussionStats",{enumerable:!0,get:function(){return r(oa).default}});var ua=n(57165);Object.defineProperty(e,"EitherOrStats",{enumerable:!0,get:function(){return r(ua).default}});var la=n(3621);Object.defineProperty(e,"GamePredictionsStats",{enumerable:!0,get:function(){return r(la).default}});var ca=n(5490);Object.defineProperty(e,"PredictionsStats",{enumerable:!0,get:function(){return r(ca).default}});var da=n(81316);Object.defineProperty(e,"ProfileStatsModel",{enumerable:!0,get:function(){return r(da).default}});var fa=n(53195);Object.defineProperty(e,"SinglePredictionsBreakdown",{enumerable:!0,get:function(){return r(fa).default}});var ha=n(81342);Object.defineProperty(e,"SinglePredictionsStats",{enumerable:!0,get:function(){return r(ha).default}});var pa=n(9826);Object.defineProperty(e,"SuccessRatePercent",{enumerable:!0,get:function(){return r(pa).default}});var ma=n(75123);Object.defineProperty(e,"SuccessRates",{enumerable:!0,get:function(){return r(ma).default}});var va=n(63087);Object.defineProperty(e,"SummarizedBreakdown",{enumerable:!0,get:function(){return r(va).default}});var _a=n(31488);Object.defineProperty(e,"LeadRequestBody",{enumerable:!0,get:function(){return r(_a).default}});var ya=n(84440);Object.defineProperty(e,"LeadModel",{enumerable:!0,get:function(){return r(ya).default}});var ga=n(28212);Object.defineProperty(e,"FollowStatusModel",{enumerable:!0,get:function(){return r(ga).default}});var ba=n(27909);Object.defineProperty(e,"StandingGamesModel",{enumerable:!0,get:function(){return r(ba).default}});var wa=n(12934);Object.defineProperty(e,"StandingGameModel",{enumerable:!0,get:function(){return r(wa).default}});var Ea=n(7451);Object.defineProperty(e,"StandingGameMetaModel",{enumerable:!0,get:function(){return r(Ea).default}});var Ia=n(43807);Object.defineProperty(e,"StandingGameMetaParticipantsModel",{enumerable:!0,get:function(){return r(Ia).default}});var Ma=n(72911);Object.defineProperty(e,"StandingGamePredictionsModel",{enumerable:!0,get:function(){return r(Ma).default}});var Oa=n(46914);Object.defineProperty(e,"StandingGamesFilters",{enumerable:!0,get:function(){return r(Oa).default}});var Pa=n(1117);Object.defineProperty(e,"StandingGameRankingsFilters",{enumerable:!0,get:function(){return r(Pa).default}});var Ta=n(83201);Object.defineProperty(e,"StandingGamePredictionModel",{enumerable:!0,get:function(){return r(Ta).default}});var Sa=n(14148);Object.defineProperty(e,"StandingGameRankingsModel",{enumerable:!0,get:function(){return r(Sa).default}});var Aa=n(91180);Object.defineProperty(e,"TopXConfigModel",{enumerable:!0,get:function(){return r(Aa).default}});var Ca=n(7482);Object.defineProperty(e,"FixturesGamesModel",{enumerable:!0,get:function(){return r(Ca).default}});var Ra=n(15967);Object.defineProperty(e,"FixturesTopXModel",{enumerable:!0,get:function(){return r(Ra).default}});var Da=n(66247);Object.defineProperty(e,"GameByIdModel",{enumerable:!0,get:function(){return r(Da).default}});var Fa=n(36890);Object.defineProperty(e,"GameModel",{enumerable:!0,get:function(){return r(Fa).default}});var La=n(56160);Object.defineProperty(e,"GameResultsModel",{enumerable:!0,get:function(){return r(La).default}});var ka=n(7299);Object.defineProperty(e,"GamesFilters",{enumerable:!0,get:function(){return r(ka).default}});var ja=n(63751);Object.defineProperty(e,"GamesListModel",{enumerable:!0,get:function(){return r(ja).default}});var Na=n(68950);Object.defineProperty(e,"GamesTopXListModel",{enumerable:!0,get:function(){return r(Na).default}});var xa=n(97640);Object.defineProperty(e,"TiebreakerModel",{enumerable:!0,get:function(){return r(xa).default}});var Ga=n(64916);Object.defineProperty(e,"TimeTiebreaker",{enumerable:!0,get:function(){return r(Ga).default}});var Ua=n(21784);Object.defineProperty(e,"ContestWinners",{enumerable:!0,get:function(){return r(Ua).default}});var Ba=n(60824);Object.defineProperty(e,"UserListWinners",{enumerable:!0,get:function(){return r(Ba).default}});var Va=n(13381);Object.defineProperty(e,"PredictionTopXModel",{enumerable:!0,get:function(){return r(Va).default}});var Ha=n(1399);Object.defineProperty(e,"TopXPredictionRequestModel",{enumerable:!0,get:function(){return r(Ha).default}});var za=n(84790);Object.defineProperty(e,"PollsFilters",{enumerable:!0,get:function(){return r(za).default}});var qa=n(81770);Object.defineProperty(e,"PollBasicModel",{enumerable:!0,get:function(){return r(qa).default}});var Wa=n(1126);Object.defineProperty(e,"PollFullModel",{enumerable:!0,get:function(){return r(Wa).default}});var Qa=n(70890);Object.defineProperty(e,"PollOptionModel",{enumerable:!0,get:function(){return r(Qa).default}});var Ya=n(55955);Object.defineProperty(e,"PreferenceMappingModel",{enumerable:!0,get:function(){return r(Ya).default}});var Xa=n(358);Object.defineProperty(e,"PollVoteBasicModel",{enumerable:!0,get:function(){return r(Xa).default}});var Ka=n(15390);Object.defineProperty(e,"PollVoteFullModel",{enumerable:!0,get:function(){return r(Ka).default}});var Ja=n(67377);Object.defineProperty(e,"SinglePollVoteModel",{enumerable:!0,get:function(){return r(Ja).default}});var Za=n(71812);Object.defineProperty(e,"PollsModel",{enumerable:!0,get:function(){return r(Za).default}});var $a=n(62160);Object.defineProperty(e,"PollsUserVotesModel",{enumerable:!0,get:function(){return r($a).default}});var ts=n(58742);Object.defineProperty(e,"PotmUserVotesFilters",{enumerable:!0,get:function(){return r(ts).default}});var es=n(34824);Object.defineProperty(e,"PotmUserVotesResponseModel",{enumerable:!0,get:function(){return r(es).default}});var ns=n(92379);Object.defineProperty(e,"PotmUserVotesModel",{enumerable:!0,get:function(){return r(ns).default}});var rs=n(10862);Object.defineProperty(e,"PotmResultsResponseModel",{enumerable:!0,get:function(){return r(rs).default}});var is=n(93285);Object.defineProperty(e,"PotmResultsModel",{enumerable:!0,get:function(){return r(is).default}});var as=n(19379);Object.defineProperty(e,"PotmResultsMetaModel",{enumerable:!0,get:function(){return r(as).default}})},76878:e=>{"use strict";e.exports=t},49829:t=>{"use strict";t.exports=JSON.parse('{"name":"fansunited-sdk-esm","version":"1.113.0","description":"Javascript SDK implemented as a standard module system","author":"fansunited","license":"ISC","homepage":"https://fansunitedmedia.com/","type":"module","exports":{".":{"import":"./index.js","types":"./types/index.d.ts"},"./Core/*":{"import":"./Core/*.js","types":"./types/Core/*.d.ts"}},"typesVersions":{"*":{"*":["./types/*"],"Core/*":["./types/Core/*"]}},"files":["*.js","*.d.ts","types/**/*.d.ts","types/Core/**/*.js","types/Core/**/*.d.ts"],"sideEffects":false}')}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var a=n[t]={exports:{}};return e[t].call(a.exports,a,a.exports,r),a.exports}return r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(63607)})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@react-native-async-storage/async-storage")):"function"==typeof define&&define.amd?define(["@react-native-async-storage/async-storage"],e):"object"==typeof exports?exports.FansUnitedSDK=e(require("@react-native-async-storage/async-storage")):t.FansUnitedSDK=e(t["@react-native-async-storage/async-storage"])}(self,(t=>(()=>{var e={16313:t=>{var e=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,r;try{e=Map}catch(t){e=function(){}}try{n=Set}catch(t){n=function(){}}try{r=Promise}catch(t){r=function(){}}function i(a,o,u,l,c){"object"==typeof o&&(u=o.depth,l=o.prototype,c=o.includeNonEnumerable,o=o.circular);var d=[],f=[],h="undefined"!=typeof Buffer;return void 0===o&&(o=!0),void 0===u&&(u=1/0),function a(u,p){if(null===u)return null;if(0===p)return u;var m,v;if("object"!=typeof u)return u;if(t(u,e))m=new e;else if(t(u,n))m=new n;else if(t(u,r))m=new r((function(t,e){u.then((function(e){t(a(e,p-1))}),(function(t){e(a(t,p-1))}))}));else if(i.__isArray(u))m=[];else if(i.__isRegExp(u))m=new RegExp(u.source,s(u)),u.lastIndex&&(m.lastIndex=u.lastIndex);else if(i.__isDate(u))m=new Date(u.getTime());else{if(h&&Buffer.isBuffer(u))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(u.length):new Buffer(u.length),u.copy(m),m;t(u,Error)?m=Object.create(u):void 0===l?(v=Object.getPrototypeOf(u),m=Object.create(v)):(m=Object.create(l),v=l)}if(o){var _=d.indexOf(u);if(-1!=_)return f[_];d.push(u),f.push(m)}for(var y in t(u,e)&&u.forEach((function(t,e){var n=a(e,p-1),r=a(t,p-1);m.set(n,r)})),t(u,n)&&u.forEach((function(t){var e=a(t,p-1);m.add(e)})),u){var g;v&&(g=Object.getOwnPropertyDescriptor(v,y)),g&&null==g.set||(m[y]=a(u[y],p-1))}if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(u);for(y=0;y<b.length;y++){var w=b[y];(!(I=Object.getOwnPropertyDescriptor(u,w))||I.enumerable||c)&&(m[w]=a(u[w],p-1),I.enumerable||Object.defineProperty(m,w,{enumerable:!1}))}}if(c){var E=Object.getOwnPropertyNames(u);for(y=0;y<E.length;y++){var I,M=E[y];(I=Object.getOwnPropertyDescriptor(u,M))&&I.enumerable||(m[M]=a(u[M],p-1),Object.defineProperty(m,M,{enumerable:!1}))}}return m}(a,u)}function a(t){return Object.prototype.toString.call(t)}function s(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return i.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},i.__objToStr=a,i.__isDate=function(t){return"object"==typeof t&&"[object Date]"===a(t)},i.__isArray=function(t){return"object"==typeof t&&"[object Array]"===a(t)},i.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===a(t)},i.__getRegExpFlags=s,i}();t.exports&&(t.exports=e)},17187:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(n,r){function i(n){t.removeListener(e,a),r(n)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}m(t,e,a,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(t,"error",e,{once:!0})}(t,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function o(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function l(t,e,n,r){var i,a,s,l;if(o(n),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),a=t._events),s=a[e]),void 0===s)s=a[e]=n,++t._eventsCount;else if("function"==typeof s?s=a[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function f(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):p(i,i.length)}function h(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function m(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(a){r.once&&t.removeEventListener(e,i),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var i="error"===t,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var u=a[t];if(void 0===u)return!1;if("function"==typeof u)r(u,this,e);else{var l=u.length,c=p(u,l);for(n=0;n<l;++n)r(c[n],this,e)}return!0},a.prototype.addListener=function(t,e){return l(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return l(this,t,e,!0)},a.prototype.once=function(t,e){return o(e),this.on(t,d(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return o(e),this.prependListener(t,d(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,r,i,a,s;if(o(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===e||n[a].listener===e){s=n[a].listener,i=a;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(i=a[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return f(this,t,!0)},a.prototype.rawListeners=function(t){return f(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},96245:(t,e,n)=>{"use strict";function r(t){this.message=t}n.r(e),n.d(e,{InvalidTokenError:()=>s,default:()=>o}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,a=0,s=0,o="";i=e.charAt(s++);~i&&(n=a%4?64*n+i:i,a++%4)?o+=String.fromCharCode(255&n>>(-2*a&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function a(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(i(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return i(e)}}function s(t){this.message=t}s.prototype=new Error,s.prototype.name="InvalidTokenError";const o=function(t,e){if("string"!=typeof t)throw new s("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(a(t.split(".")[n]))}catch(t){throw new s("Invalid token specified: "+t.message)}}},70321:function(t,e,n){(function(){(t.exports=n(35282)).version="5.1.2"}).call(this)},35282:function(t,e,n){(function(){var e,r,i=[].splice,a=function(t,e){if(!(t instanceof e))throw new Error("Bound instance method accessed before binding")},s=[].indexOf;r=n(16313),e=n(17187).EventEmitter,t.exports=function(){class t extends e{constructor(t={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=t,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach((t=>{var e;e=this[t],this[t]=function(...t){var n,r;if(r=t,[...t]=r,[n]=i.call(t,-1),"function"!=typeof n)return e(...t,n);try{n(null,e(...t))}catch(t){n(t)}}}))),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData()}get(e){var n;if(a(this,t),null!=(n=this._isInvalidKey(e)))throw n;return null!=this.data[e]&&this._check(e,this.data[e])?(this.stats.hits++,this._unwrap(this.data[e])):void this.stats.misses++}mget(e){var n,r,i,s,o;if(a(this,t),!Array.isArray(e))throw this._error("EKEYSTYPE");for(o={},r=0,s=e.length;r<s;r++){if(i=e[r],null!=(n=this._isInvalidKey(i)))throw n;null!=this.data[i]&&this._check(i,this.data[i])?(this.stats.hits++,o[i]=this._unwrap(this.data[i])):this.stats.misses++}return o}set(e,n,r){var i,s;if(a(this,t),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw this._error("ECACHEFULL");if(this.options.forceString,null==r&&(r=this.options.stdTTL),null!=(i=this._isInvalidKey(e)))throw i;return s=!1,this.data[e]&&(s=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[e],!1))),this.data[e]=this._wrap(n,r),this.stats.vsize+=this._getValLength(n),s||(this.stats.ksize+=this._getKeyLength(e),this.stats.keys++),this.emit("set",e,n),!0}mset(e){var n,r,i,s,o,u,l,c,d;if(a(this,t),this.options.maxKeys>-1&&this.stats.keys+e.length>=this.options.maxKeys)throw this._error("ECACHEFULL");for(r=0,u=e.length;r<u;r++){if(o=e[r],({key:s,val:d,ttl:c}=o),c&&"number"!=typeof c)throw this._error("ETTLTYPE");if(null!=(n=this._isInvalidKey(s)))throw n}for(i=0,l=e.length;i<l;i++)o=e[i],({key:s,val:d,ttl:c}=o),this.set(s,d,c);return!0}del(e){var n,r,i,s,o,u;for(a(this,t),Array.isArray(e)||(e=[e]),n=0,i=0,o=e.length;i<o;i++){if(s=e[i],null!=(r=this._isInvalidKey(s)))throw r;null!=this.data[s]&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[s],!1)),this.stats.ksize-=this._getKeyLength(s),this.stats.keys--,n++,u=this.data[s],delete this.data[s],this.emit("del",s,u.v))}return n}take(e){var n;return a(this,t),null!=(n=this.get(e))&&this.del(e),n}ttl(e,n){var r;if(a(this,t),n||(n=this.options.stdTTL),!e)return!1;if(null!=(r=this._isInvalidKey(e)))throw r;return!(null==this.data[e]||!this._check(e,this.data[e])||(n>=0?this.data[e]=this._wrap(this.data[e].v,n,!1):this.del(e),0))}getTtl(e){var n;if(a(this,t),e){if(null!=(n=this._isInvalidKey(e)))throw n;return null!=this.data[e]&&this._check(e,this.data[e])?this.data[e].t:void 0}}keys(){return a(this,t),Object.keys(this.data)}has(e){return a(this,t),null!=this.data[e]&&this._check(e,this.data[e])}getStats(){return a(this,t),this.stats}flushAll(e=!0){a(this,t),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(e),this.emit("flush")}flushStats(){a(this,t),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){a(this,t),this._killCheckPeriod()}_checkData(e=!0){var n,r,i;for(n in a(this,t),r=this.data)i=r[n],this._check(n,i);e&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,1e3*this.options.checkperiod,e),null!=this.checkTimeout&&null!=this.checkTimeout.unref&&this.checkTimeout.unref())}_killCheckPeriod(){if(null!=this.checkTimeout)return clearTimeout(this.checkTimeout)}_check(e,n){var r;return a(this,t),r=!0,0!==n.t&&n.t<Date.now()&&(this.options.deleteOnExpire&&(r=!1,this.del(e)),this.emit("expired",e,this._unwrap(n))),r}_isInvalidKey(e){var n;if(a(this,t),n=typeof e,s.call(this.validKeyTypes,n)<0)return this._error("EKEYTYPE",{type:typeof e})}_wrap(e,n,i=!0){var s;return a(this,t),this.options.useClones||(i=!1),s=Date.now(),{t:0===n?0:n?s+1e3*n:0===this.options.stdTTL?this.options.stdTTL:s+1e3*this.options.stdTTL,v:i?r(e):e}}_unwrap(t,e=!0){return this.options.useClones||(e=!1),null!=t.v?e?r(t.v):t.v:null}_getKeyLength(t){return t.toString().length}_getValLength(e){return a(this,t),"string"==typeof e?e.length:this.options.forceString?JSON.stringify(e).length:Array.isArray(e)?this.options.arrayValueSize*e.length:"number"==typeof e?8:"function"==typeof(null!=e?e.then:void 0)?this.options.promiseValueSize:("undefined"!=typeof Buffer&&null!==Buffer?Buffer.isBuffer(e):void 0)?e.length:null!=e&&"object"==typeof e?this.options.objectValueSize*Object.keys(e).length:"boolean"==typeof e?8:0}_error(e,n={}){var r;return a(this,t),(r=new Error).name=e,r.errorcode=e,r.message=null!=this.ERRORS[e]?this.ERRORS[e](n):"-",r.data=n,r}_initErrors(){var e,n,r;for(n in a(this,t),this.ERRORS={},r=this._ERRORS)e=r[n],this.ERRORS[n]=this.createErrorMessage(e)}createErrorMessage(t){return function(e){return t.replace("__key",e.type)}}}return t.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},t}.call(this)}).call(this)},46595:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(40682),a=n(62141),s=r(n(84241)),o=r(n(16391)),u=r(n(21512)),l=r(n(64392)),c=r(n(320)),d=r(n(17631)),f=r(n(96965)),h=r(n(89158)),p=r(n(17113)),m=r(n(5076));e.default=function(){var t=this;this.validate=function(e){var n=t.checkFieldsForValues(e);return n.isValid=t.containsErrorMessage(n),n},this.checkFieldsForValues=function(t){for(var e=new d.default,n={apiKey:new u.default,environment:new o.default,idSchema:new l.default,clientId:new f.default,lang:new s.default,errorHandlingMode:new h.default,authProvider:new c.default,cookieToken:new p.default,oddClient:new m.default},r=0,i=Object.entries(e);r<i.length;r++){var a=i[r],v=a[0];a[1],"isValid"!==v&&n[v].validate(t)}return Object.keys(n).forEach((function(r){e[r]=n[r].validate(t)})),e},this.containsErrorMessage=function(t){for(var e=!0,n=0,r=Object.entries(t);n<r.length;n++){var s=r[n],o=s[0],u=s[1];if(o!==i.ConfigFieldEnum.authProvider&&o!==i.ConfigFieldEnum.cookieToken&&o!==i.ConfigFieldEnum.oddClient){if("isValid"!==o&&u.message.type===a.LogEnum.ERROR)return!1;if("isValid"!==o&&u.message.type===a.LogEnum.WARNING)return!0}else{if(u.message.type===a.LogEnum.ERROR)return!1;if(o===i.ConfigFieldEnum.oddClient&&u.credentials.message.type===a.LogEnum.ERROR)return!1}}return e}}},40682:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigFieldEnum=void 0,(n=e.ConfigFieldEnum||(e.ConfigFieldEnum={})).apiKey="apiKey",n.environment="environment",n.idSchema="idSchema",n.clientId="clientId",n.lang="lang",n.oddClient="oddClient",n.authProvider="authProvider",n.cookieToken="cookieToken"},2671:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentEnum=void 0,(n=e.EnvironmentEnum||(e.EnvironmentEnum={})).DEV="dev",n.PROD="prod",n.STAGING="staging",n.WATG="watg",n.YOLO="yolo",n.CSKA="cska"},89580:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorHandlingModeEnum=void 0,(n=e.ErrorHandlingModeEnum||(e.ErrorHandlingModeEnum={})).DEFAULT="default",n.STANDARD="standard"},14946:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.IdSchemaEnum=void 0,(n=e.IdSchemaEnum||(e.IdSchemaEnum={})).NATIVE="native",n.ENETPULSE="enetpulse",n.SPORTRADAR="sportradar",n.SPORTAL_365="sportal365",n.API_FOOTBALL="api_football"},89377:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LangEnum=void 0,(n=e.LangEnum||(e.LangEnum={})).EN="en",n.BG="bg",n.RO="ro",n.EL="el",n.SK="sk",n.PT="pt",n.SR="sr",n.HU="hu",n.SV="sv",n.ES="es",n.FR="fr",n.NL="nl",n.DE="de",n.IT="it"},62141:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.LogEnum=void 0,(n=e.LogEnum||(e.LogEnum={})).ERROR="error",n.WARNING="warning"},39028:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationMessageEnum=void 0,(n=e.ValidationMessageEnum||(e.ValidationMessageEnum={})).API_KEY="The field apiKey with valid value must be provided to use Fans United JS SDK",n.CLIENT_ID="The field clientId must be provided to use Fans United JS SDK",n.LANG_MISSING="If no lang is passed the default one will be set which is: en",n.LANG_INVALID="This lang value is not supported, the default one will be set which is: en",n.ID_SCHEMA_MISSING="If no idSchema is passed the default one will be set which is: native",n.ID_SCHEMA_INVALID="This idSchema value is not supported, the default one will be set which is: native",n.ENVIRONMENT_MISSING="If no environment is passed the default one will be set which is: prod",n.ENVIRONMENT_INVALID="This environment value is not supported, the default one will be set which is: prod",n.ERROR_HANDLING_MODE_MISSING="If no errorHandlingMode is passed the default one will be set which is: default",n.ERROR_HANDLING_MODE_INVALID="This errorHandlingMode value is not supported, the default one will be set which is: default",n.ODD_CLIENT_MISSING="If no oddClient is passed the Odds namespace will not work. For more information check our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk#/",n.ODD_CLIENT_INVALID="The oddClient object is not valid. For more information check our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk#/",n.ODD_CLIENT_CONFIG_INVALID_PROP="You have passed properties which are not supported for the odd client configuration property:",n.ODD_CLIENT_CREDENTIALS_INVALID="The odd client credentials object is not valid. The odd client will not work without credentials. For more information check our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk#/",n.ODD_CLIENT_CREDENTIALS_CONFIG_PROP_MISSING="The following property is missing from the odd client credentials object:",n.ODD_CLIENT_CREDENTIALS_CONFIG_INVALID_PROP="You have passed properties which are not supported for the odd client credentials configuration property:",n.ODD_CLIENT_CONFIG_MISSING_CONFIG="The field oddClient has missing properties. For more information check our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk#/",n.AUTH_PROVIDER_CONFIG_PROP_MISSING="The following property is missing from the authProvider object:",n.AUTH_PROVIDER_CONFIG_INVALID_PROP="You have passed a property which is not supported for the authentication provider:",n.AUTH_PROVIDER_CONFIG_MISSING="The field authProvider must be provided to use this SDK",n.AUTH_PROVIDER_CONFIG_MISSING_CONFIG="The field authProvider has missing properties",n.COOKIE_TOKEN_CONFIG_INVALID_PROP="You have passed properties which are not supported for the cookie token configuration property:",n.COOKIE_TOKEN_CONFIG_PROP_MISSING="The following property is missing from the cookieToken object:",n.COOKIE_TOKEN_CONFIG_MISSING_CONFIG="The field cookieToken has missing properties"},29627:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationResponseEnum=void 0,(n=e.ValidationResponseEnum||(e.ValidationResponseEnum={})).MISSING_VALUE="missing",n.INVALID_VALUE="invalid",n.VALID_VALUE="valid"},17070:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.getIdToken=null,this.logout=null}},52379:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(3220));e.default=function(){this.validation=null,this.message=new i.default,this.getIdToken={validation:null,message:new i.default},this.logout={validation:null,message:new i.default}}},17631:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(33074));e.default=function(){this.apiKey=null,this.environment=null,this.idSchema=null,this.clientId=null,this.lang=null,this.errorHandlingMode=null,this.cookieToken={name:new i.default,requestHeaders:new i.default},this.oddClient=null,this.authProvider={getIdToken:new i.default,logout:new i.default},this.isValid=!1}},38092:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(3220)),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name={validation:null,message:new s.default},e.requestHeaders={validation:null,message:new s.default},e}return i(e,t),e}(a(n(33074)).default);e.default=o},3220:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.text=null,this.type=null}},37541:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(3220)),o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name={validation:null,message:new s.default},e.credentials={validation:null,message:new s.default},e}return i(e,t),e}(a(n(33074)).default);e.default=o},17563:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},33074:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},21512:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29627),i=n(39028),a=n(62141),s=function(){function t(){this.validateField=function(t){return null!=t&&t.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.ERROR;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.API_KEY),t===r.ValidationResponseEnum.VALID_VALUE&&(n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.apiKey);return{validation:e,message:this.generateMessage(e)}},t}();e.default=s},320:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(29627),a=n(39028),s=n(62141),o=r(n(17070)),u=r(n(52379)),l=function(){function t(){this.validateAuthProvider=function(t){var e=Object.keys(new o.default),n=new u.default;if(t){var r=Object.keys(t).filter((function(t){return!e.includes(t)}));r.length>0?(n.validation=i.ValidationResponseEnum.INVALID_VALUE,n.message.type=s.LogEnum.WARNING,n.message.text="".concat(a.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_INVALID_PROP," ").concat(r.join(","))):n.validation=i.ValidationResponseEnum.VALID_VALUE}else n.validation=i.ValidationResponseEnum.MISSING_VALUE,n.message.type=s.LogEnum.ERROR,n.message.text=a.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING;return n},this.validateAuthProviderConfigFields=function(t,e){return Object.keys(new o.default).forEach((function(n){t[n]?e[n].validation=i.ValidationResponseEnum.VALID_VALUE:e[n].validation=i.ValidationResponseEnum.MISSING_VALUE})),e},this.generateAuthProviderConfigMessages=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){var n=t[e];n.validation===i.ValidationResponseEnum.MISSING_VALUE&&(n.message.text="".concat(a.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_PROP_MISSING," ").concat(e),n.message.type=s.LogEnum.ERROR)})),t},this.checkAuthProviderConfigMessagesForErrors=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){t[e].validation===i.ValidationResponseEnum.MISSING_VALUE&&t.validation===i.ValidationResponseEnum.VALID_VALUE&&(t.validation=i.ValidationResponseEnum.INVALID_VALUE,t.message.type=s.LogEnum.ERROR,t.message.text=a.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING_CONFIG)})),t}}return t.prototype.validate=function(t){if(t.cookieToken)return new u.default;var e=this.validateAuthProvider(t.authProvider);return e.validation!==i.ValidationResponseEnum.MISSING_VALUE&&(e=this.validateAuthProviderConfigFields(t.authProvider,e),e=this.generateAuthProviderConfigMessages(e),e=this.checkAuthProviderConfigMessagesForErrors(e)),e},t}();e.default=l},96965:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29627),i=n(39028),a=n(62141),s=function(){function t(){this.validateField=function(t){return null!=t&&t.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.ERROR;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.CLIENT_ID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.clientId);return{validation:e,message:this.generateMessage(e)}},t}();e.default=s},17113:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(29627),a=n(39028),s=n(62141),o=r(n(38092)),u=function(){function t(){var t=this;this.keys=["name","requestHeaders"],this.isServerSide="undefined"==typeof document,this.validateCookieToken=function(e){var n=new o.default;n.message={type:null,text:null};var r=Object.keys(e).filter((function(e){return!t.keys.includes(e)}));return r.length>0?(n.validation=i.ValidationResponseEnum.INVALID_VALUE,n.message.type=s.LogEnum.WARNING,n.message.text="".concat(a.ValidationMessageEnum.COOKIE_TOKEN_CONFIG_INVALID_PROP," ").concat(r.join(","))):n.validation=i.ValidationResponseEnum.VALID_VALUE,n},this.validateCookieTokenConfigFields=function(e,n){return t.keys.forEach((function(r){e[r]?n[r].validation=i.ValidationResponseEnum.VALID_VALUE:"requestHeaders"!==r||t.isServerSide?n[r].validation=i.ValidationResponseEnum.MISSING_VALUE:n[r].validation=i.ValidationResponseEnum.VALID_VALUE})),n},this.generateCookieTokenConfigMessages=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){var n=t[e];n.validation===i.ValidationResponseEnum.MISSING_VALUE&&(n.message.text="".concat(a.ValidationMessageEnum.COOKIE_TOKEN_CONFIG_PROP_MISSING," ").concat(e),n.message.type=s.LogEnum.ERROR)})),t},this.checkCookieTokenConfigMessagesForErrors=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){t[e].validation===i.ValidationResponseEnum.MISSING_VALUE&&(t.validation=i.ValidationResponseEnum.INVALID_VALUE,t.message.type=s.LogEnum.ERROR,t.message.text=a.ValidationMessageEnum.COOKIE_TOKEN_CONFIG_MISSING_CONFIG)})),t}}return t.prototype.validate=function(t){if(!t.cookieToken){var e=new o.default;return e.message={type:null,text:null},e.validation=i.ValidationResponseEnum.VALID_VALUE,e}var n=this.validateCookieToken(t.cookieToken);return n=this.validateCookieTokenConfigFields(t.cookieToken,n),n=this.generateCookieTokenConfigMessages(n),this.checkCookieTokenConfigMessagesForErrors(n)},t}();e.default=u},16391:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29627),i=n(39028),a=n(62141),s=n(2671),o=function(){function t(){this.validateField=function(t){var e=Object.values(s.EnvironmentEnum);return null!=t&&t.length>0?e.includes(t)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.WARNING;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.ENVIRONMENT_MISSING),t===r.ValidationResponseEnum.INVALID_VALUE&&(e=i.ValidationMessageEnum.ENVIRONMENT_INVALID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.environment);return{validation:e,message:this.generateMessage(e)}},t}();e.default=o},89158:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(89580),i=n(62141),a=n(39028),s=n(29627);e.default=function(){var t=this;this.validate=function(e){var n=t.validateField(e.errorHandlingMode);return{validation:n,message:t.generateMessage(n)}},this.validateField=function(t){var e=[r.ErrorHandlingModeEnum.DEFAULT,r.ErrorHandlingModeEnum.STANDARD];return t?e.includes(t)?s.ValidationResponseEnum.VALID_VALUE:s.ValidationResponseEnum.INVALID_VALUE:s.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=i.LogEnum.WARNING;return t===s.ValidationResponseEnum.MISSING_VALUE&&(e=a.ValidationMessageEnum.ERROR_HANDLING_MODE_MISSING),t===s.ValidationResponseEnum.INVALID_VALUE&&(e=a.ValidationMessageEnum.ERROR_HANDLING_MODE_INVALID),t===s.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},64392:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29627),i=n(39028),a=n(62141),s=n(14946),o=function(){function t(){this.validateField=function(t){var e=Object.values(s.IdSchemaEnum);return null!=t&&t.length>0?e.includes(t)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=a.LogEnum.WARNING;return t===r.ValidationResponseEnum.MISSING_VALUE&&(e=i.ValidationMessageEnum.ID_SCHEMA_MISSING),t===r.ValidationResponseEnum.INVALID_VALUE&&(e=i.ValidationMessageEnum.ID_SCHEMA_INVALID),t===r.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}return t.prototype.validate=function(t){var e=this.validateField(t.idSchema);return{validation:e,message:this.generateMessage(e)}},t}();e.default=o},84241:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(89377),i=n(29627),a=n(39028),s=n(62141);e.default=function(){var t=this;this.validate=function(e){var n=t.validateField(e.lang);return{validation:n,message:t.generateMessage(n)}},this.validateField=function(t){var e=Object.values(r.LangEnum);return null!=t&&t.length>0?e.includes(t)?i.ValidationResponseEnum.VALID_VALUE:i.ValidationResponseEnum.INVALID_VALUE:i.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=s.LogEnum.WARNING;return t===i.ValidationResponseEnum.MISSING_VALUE&&(e=a.ValidationMessageEnum.LANG_MISSING),t===i.ValidationResponseEnum.INVALID_VALUE&&(e=a.ValidationMessageEnum.LANG_INVALID),t===i.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},5076:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(62141),a=n(39028),s=n(29627),o=r(n(37541));e.default=function(){var t=this;this.keys=["name","credentials"],this.validate=function(e){if(!e.oddClient){var n=new o.default;return n.validation=s.ValidationResponseEnum.MISSING_VALUE,n.message={type:i.LogEnum.WARNING,text:a.ValidationMessageEnum.ODD_CLIENT_MISSING},n}var r=t.validateOddClient(e.oddClient);return r.message.type===i.LogEnum.ERROR?r:(r=t.validateOddClientConfigFields(e.oddClient,r),(r=t.checkOddClientMissingProperties(r)).message.type===i.LogEnum.ERROR?r:r=t.validateOddClientCredentials(e.oddClient.credentials,r))},this.validateOddClient=function(e){var n=new o.default;if(n.message={type:null,text:null},!(e instanceof Object))return n.validation=s.ValidationResponseEnum.INVALID_VALUE,n.message.type=i.LogEnum.ERROR,n.message.text=a.ValidationMessageEnum.ODD_CLIENT_INVALID,n;var r=Object.keys(e).filter((function(e){return!t.keys.includes(e)}));return r.length>0?(n.validation=s.ValidationResponseEnum.INVALID_VALUE,n.message.type=i.LogEnum.WARNING,n.message.text="".concat(a.ValidationMessageEnum.ODD_CLIENT_CONFIG_INVALID_PROP," ").concat(r.join(","))):n.validation=s.ValidationResponseEnum.VALID_VALUE,n},this.validateOddClientConfigFields=function(e,n){return t.keys.forEach((function(t){e[t]?n[t].validation=s.ValidationResponseEnum.VALID_VALUE:n[t].validation=s.ValidationResponseEnum.MISSING_VALUE})),n},this.validateOddClientCredentials=function(t,e){if(!(t instanceof Object))return e.credentials.validation=s.ValidationResponseEnum.INVALID_VALUE,e.credentials.message.type=i.LogEnum.ERROR,e.credentials.message.text=a.ValidationMessageEnum.ODD_CLIENT_CREDENTIALS_INVALID,e;var n=Object.keys(t),r=["username","password"],o=r.filter((function(t){return!n.includes(t)}));o.length>0&&(e.credentials.validation=s.ValidationResponseEnum.INVALID_VALUE,e.credentials.message.type=i.LogEnum.ERROR,e.credentials.message.text="".concat(a.ValidationMessageEnum.ODD_CLIENT_CREDENTIALS_CONFIG_PROP_MISSING," ").concat(o.join(", "))),n.length>0&&0===o.length&&(t.username&&t.password||(e.credentials.validation=s.ValidationResponseEnum.INVALID_VALUE,e.credentials.message.type=i.LogEnum.ERROR,e.credentials.message.text=a.ValidationMessageEnum.ODD_CLIENT_CREDENTIALS_INVALID));var u=n.filter((function(t){return!r.includes(t)}));return u.length>0&&(e.credentials.validation=s.ValidationResponseEnum.INVALID_VALUE,e.credentials.message.type=i.LogEnum.WARNING,e.credentials.message.text="".concat(a.ValidationMessageEnum.ODD_CLIENT_CREDENTIALS_CONFIG_INVALID_PROP," ").concat(u.join(", "))),e},this.checkOddClientMissingProperties=function(t){return Object.keys(t).filter((function(t){return"validation"!==t&&"message"!==t})).forEach((function(e){t[e].validation===s.ValidationResponseEnum.MISSING_VALUE&&(t.validation=s.ValidationResponseEnum.INVALID_VALUE,t.message.type=i.LogEnum.ERROR,t.message.text=a.ValidationMessageEnum.ODD_CLIENT_CONFIG_MISSING_CONFIG)})),t}}},4021:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorCodes=void 0,(n=e.ErrorCodes||(e.ErrorCodes={}))[n.BAD_METHOD_CALL=400]="BAD_METHOD_CALL",n[n.UNAUTHORIZED=401]="UNAUTHORIZED",n[n.NOT_FOUND=404]="NOT_FOUND",n[n.PRECONDITION_FAILED=412]="PRECONDITION_FAILED"},94904:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorStatuses=void 0,(n=e.ErrorStatuses||(e.ErrorStatuses={})).INVALID_TEMPLATE="INVALID_TEMPLATE",n.INVALID_PREDICTION="INVALID_PREDICTION",n.INVALID_MARKET="INVALID_MARKET",n.INVALID_FIELD="INVALID_FIELD",n.INVALID_TYPE="INVALID_TYPE",n.EXCEEDED_LENGTH="EXCEEDED_LENGTH",n.INVALID_TOKEN="invalid_token",n.UNAUTHORIZED="unauthorized",n.INVALID_FILTERS="invalid_filters",n.INVALID_AVATAR="invalid_avatar",n.INVALID_METHOD_CALL="invalid_method_call",n.INVALID_LIMIT="invalid_limit",n.INVALID_TEMPLATE_GROUP_ID="invalid_template_group_id",n.INVALID_TEMPLATE_GROUP_FILTERS="invalid_template_group_filters",n.INVALID_PAGE_NUMBER="invalid_page_number",n.INVALID_DISCUSSION_IDS="invalid_discussion_ids",n.ID_MAPPING_NOT_FOUND="id_mapping_not_found",n.INVALID_COMPETITION_ID="invalid_competition_id",n.INVALID_TEAM_ID="invalid_team_id",n.INVALID_IDS="invalid_ids",n.INVALID_INPUT_PROVIDER="invalid_input_provider",n.INVALID_OUTPUT_PROVIDER="invalid_output_provider",n.INVALID_MATCH_SUMMARY="invalid_match_summary",n.INVALID_MATCH_SUMMARY_PREDICTIONS="invalid_match_summary_predictions",n.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS="invalid_match_summary_predictions_keys",n.ENTITY_IDS_NOT_FOUND="entity_ids_not_found",n.MATCH_IDS_NOT_FOUND="match_ids_not_found",n.INVALID_MATCH_IDS="invalid_match_ids",n.ODD_CLIENT_CONFIGURATION_NOT_FOUND="odd_client_configuration_not_found"},68097:function(t,e){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.code=0,i.status=null,i.message=null,i.errorMessage=function(){return i.message},i.code=e,i.status=n,i.message=r,i}return r(e,t),e}(Error);e.default=i},48712:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e){var n=this;this.data={error:{code:0,status:"",message:""}},this.status=0,this.statusText="",this.headers=null,this.errorMessage=function(){return n.data.error.message},this.data.error.code=e.code,this.data.error.status=e.status,this.data.error.message=e.message,this.status=t.status,this.statusText=t.statusText,this.headers=t.headers}},62535:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,n){this.error={code:0,status:"",message:""},this.error.code=t,this.error.status=e,this.error.message=n}},35092:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var l=n(91260),c="FansUnited",d={football:{ids:[],countries:[],competitions:[],expirations:{ids:0}},profile:{info:{},statistics:{},badges:null,countries:[],expirations:{profile:0,statistics:0,badges:0}},client:{features:{},expirations:{features:0}}},f=function(){function t(t){var e=this;this.idSchema="",this.storageInstance=null,this.expirationProfileTimeout=600,this.expirationBadgesTimeout=3600,this.expirationClientFeaturesTimeout=14400,this.expirationFootballIdsTimeout=604800,this.clearData=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.setData(d)];case 1:return t.sent(),[2]}}))}))},this.getCompetitions=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return e=n.sent(),t?[2,t.competitionSearchFilter(e.football.competitions)]:[2,e.football.competitions]}}))}))},this.setCompetitions=function(t){return s(e,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return e=r.sent(),(n=u([],e.football.competitions,!0)).push.apply(n,t),e.football.competitions=this.makeCompetitionsUnique(n),[4,this.setData(e)];case 2:return r.sent(),[2]}}))}))},this.getCompetitionsLength=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().football.competitions.length]}}))}))},this.getEntityById=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),s(e,void 0,void 0,(function(){var e=this;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return[2,r.sent().football.ids.find((function(r){var i=l.ID_TYPES[e.idSchema];return r&&"".concat(r[i])===n&&r.resource===t}))]}}))}))},this.getEntity=function(t,n,r){return s(e,void 0,void 0,(function(){var e;return o(this,(function(i){switch(i.label){case 0:return[4,this.getData()];case 1:return e=i.sent(),Array.isArray(t)?[2,e.football.ids.filter((function(e){var i=l.ID_TYPES[r];return e&&t.includes("".concat(e[i]))&&e.resource===n}))]:[2,e.football.ids.find((function(e){var i=l.ID_TYPES[r];return e&&"".concat(e[i])===t&&e.resource===n}))]}}))}))},this.checkForExistingIdObjs=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i,a,s,u,c;return o(this,(function(d){switch(d.label){case 0:e=l.ID_TYPES[n],r={},i=function(i){var s,u,l,c;return o(this,(function(o){switch(o.label){case 0:return s=t[i],[4,a.getEntity(s,i,n)];case 1:return u=o.sent(),l=u.map((function(t){return t[e]})),c=t[i].filter((function(t){return!l.includes(t)})),r[i]=s.map((function(t){return c.includes(t)?{id:t,exists:!1}:{id:t,exists:!0}})),[2]}}))},a=this,s=0,u=Object.keys(t),d.label=1;case 1:return s<u.length?(c=u[s],[5,i(c)]):[3,4];case 2:d.sent(),d.label=3;case 3:return s++,[3,1];case 4:return[2,r]}}))}))},this.getIdsByType=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a,s;return o(this,(function(o){switch(o.label){case 0:return[4,this.getData()];case 1:return e=o.sent(),i=l.ID_TYPES[r],a=l.ID_TYPES[n],s={},Object.keys(t).forEach((function(n){var r=t[n],o=[];e.football.ids.forEach((function(t){r.forEach((function(e,r){e===t[a]&&n===t.resource&&(o[r]=t[i])}))})),s[n]=o})),[2,s]}}))}))},this.addIdMapping=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).football.ids.push(t),[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.addIdMappings=function(t){return s(e,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return e=r.sent(),n=e.football.ids,n=u(u([],n,!0),t,!0),e.football.ids=n,[4,this.setData(e)];case 2:return r.sent(),[2]}}))}))},this.addTopIdMappings=function(t){return s(e,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return(e=r.sent()).football.ids.length?(n=(n=JSON.parse(JSON.stringify(e.football.ids))).filter((function(t){return"match"!==t.resource})),t=t.filter((function(t){return"match"===t.resource})),n=u(u([],n,!0),t,!0),e.football.ids=n):e.football.ids=t,e.football.expirations.ids=Math.floor(Date.now()/1e3)+this.expirationFootballIdsTimeout,[4,this.setData(e)];case 2:return r.sent(),[2]}}))}))},this.setOwnProfile=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).profile.info=t,e.profile.expirations.profile=Math.floor(Date.now()/1e3)+this.expirationProfileTimeout,[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getOwnProfile=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().profile.info]}}))}))},this.getProfileCountries=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().profile.countries]}}))}))},this.setProfileCountries=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).profile.countries=t,[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getProfileStats=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().profile.statistics]}}))}))},this.setProfileStats=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).profile.statistics=t,e.profile.expirations.statistics=Math.floor(Date.now()/1e3)+this.expirationProfileTimeout,[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getProfileBadges=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().profile.badges]}}))}))},this.setProfileBadges=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).profile.badges=t,e.profile.expirations.badges=Math.floor(Date.now()/1e3)+this.expirationBadgesTimeout,[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getFootballCountries=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().football.countries]}}))}))},this.setFootballCountries=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return(e=n.sent()).football.countries=t,[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getClientFeatures=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.getData()];case 1:return[2,t.sent().client.features]}}))}))},this.setClientFeatures=function(t){return s(e,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return e=r.sent(),n=JSON.parse(JSON.stringify(t)),e.client.expirations.features=Math.floor(Date.now()/1e3)+this.expirationClientFeaturesTimeout,e.client.features=n,[4,this.setData(e)];case 2:return r.sent(),[2]}}))}))},this.deleteClientFeatures=function(){return s(e,void 0,void 0,(function(){var t,e;return o(this,(function(n){switch(n.label){case 0:return[4,this.getData()];case 1:return t=n.sent(),(e=JSON.parse(JSON.stringify(t))).client={features:{},expirations:{features:0}},[4,this.setData(e)];case 2:return n.sent(),[2]}}))}))},this.getExpiration=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,this.initialNewSchema(t,"expirations")];case 1:return r.sent(),[4,this.getData()];case 2:switch(e=r.sent(),n){case"profile":return[2,e.profile.expirations.profile];case"statistics":return[2,e.profile.expirations.statistics];case"badges":return[2,e.profile.expirations.badges];case"features":return[2,e.client.expirations.features];case"ids":return[2,e.football.expirations.ids]}return[2]}}))}))},this.makeCompetitionsUnique=function(t){var e=new Set;return t.filter((function(t){var n=!e.has(t.id);return e.add(t.id),n}))},this.initialNewSchema=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,this.getData()];case 1:return(e=r.sent())&&e[t]&&e[t][n]?[3,3]:[4,this.setData(d)];case 2:r.sent(),r.label=3;case 3:return[2]}}))}))},this.idSchema=t,this.getStorageInstance()}return t.getInstance=function(e){return t.instance||(t.instance=new t(e)),t.instance},t.prototype.getStorageInstance=function(){return s(this,void 0,void 0,(function(){var t,e;return o(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Promise.resolve().then((function(){return a(n(76878))}))];case 1:return t=r.sent(),this.storageInstance=t.default,[3,3];case 2:return e=r.sent(),console.error(e),[3,3];case 3:return[2]}}))}))},t.prototype.getData=function(){return s(this,void 0,void 0,(function(){var t,e;return o(this,(function(n){switch(n.label){case 0:return n.trys.push([0,5,,6]),[4,this.storageInstance.getItem(c)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[3,2];case 2:return[4,this.storageInstance.setItem(c,JSON.stringify(d))];case 3:return n.sent(),[2,d];case 4:return[3,6];case 5:throw e=n.sent(),console.error("AsyncStorage error:",e),e;case 6:return[2]}}))}))},t.prototype.setData=function(t){return s(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.storageInstance.setItem(c,JSON.stringify(t))];case 1:return e.sent(),[2]}}))}))},t}();e.default=f},91260:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.marketToKeySummaryMap=e.validFixtureFields=e.documentationLinks=e.ID_TYPES=void 0,e.ID_TYPES={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id",api_football:"api_football_id"},e.documentationLinks={PREDICTOR_USER_RELATED_OPERATION:"https://docs.fansunitedmedia.com/docs/predictor-operations#user-related-operations"},e.validFixtureFields=["matchId","matchType","market","prediction"],e.marketToKeySummaryMap=(new Map).set("FT_1X2","fullTimeOneXTwo").set("HT_1X2","halfTimeOneXTwo").set("BOTH_TEAMS_SCORE","bothTeamsScore").set("DOUBLE_CHANCE","doubleChance").set("HT_FT","halfTimeFullTime").set("PLAYER_SCORE","playerScore").set("PLAYER_YELLOW_CARD","playerYellowCard").set("PLAYER_RED_CARD","playerRedCard").set("RED_CARD_MATCH","redCardMatch").set("PENALTY_MATCH","penaltyMatch").set("PLAYER_SCORE_FIRST_GOAL","playerScoreFirstGoal").set("CORNERS_MATCH","cornersMatch").set("CORRECT_SCORE","correctScore").set("CORRECT_SCORE_ADVANCED","correctScoreAdvanced").set("CORRECT_SCORE_HT","correctScoreHalfTime").set("PLAYER_SCORE_HATTRICK","playerScoreHattrick").set("PLAYER_SCORE_TWICE","playerScoreTwice").set("OVER_GOALS_0_5","overZeroPointFiveGoals").set("OVER_GOALS_1_5","overOnePointFiveGoals").set("OVER_GOALS_2_5","overTwoPointFiveGoals").set("OVER_GOALS_3_5","overThreePointFiveGoals").set("OVER_GOALS_4_5","overFourPointFiveGoals").set("OVER_GOALS_5_5","overFivePointFiveGoals").set("OVER_GOALS_6_5","overSixPointFiveGoals").set("OVER_CORNERS_6_5","overSixPointFiveCorners").set("OVER_CORNERS_7_5","overSevenPointFiveCorners").set("OVER_CORNERS_8_5","overEightPointFiveCorners").set("OVER_CORNERS_9_5","overNinePointFiveCorners").set("OVER_CORNERS_10_5","overTenPointFiveCorners").set("OVER_CORNERS_11_5","overElevenPointFiveCorners").set("OVER_CORNERS_12_5","overTwelvePointFiveCorners").set("OVER_CORNERS_13_5","overThirteenPointFiveCorners")},10817:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.EntityTypeEnum=void 0,(n=e.EntityTypeEnum||(e.EntityTypeEnum={})).COMPETITION="competition",n.TEAM="team",n.PLAYER="player"},95409:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.SportSourceEnum=void 0,(n=e.SportSourceEnum||(e.SportSourceEnum={})).FOOTBALL="FOOTBALL",n.CUSTOM="CUSTOM"},78358:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(35092)),a=r(n(15601)),s=r(n(9018));e.default=function(){this.createLocalCacheInstance=function(t){return"undefined"==typeof window?s.default.getInstance(t):"undefined"!=typeof __DEV__?i.default.getInstance(t):a.default.getInstance(t)}}},90712:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.constructStringArrayWithProvidedLength=e.sortArrayInAscOrder=e.initDisableCache=e.isDisabledCache=e.transformIdsToBeUnique=e.setBaseUrl=e.limitIds=e.requestChunkBuild=void 0;var r=n(2671);e.requestChunkBuild=function(t){var e=[],n=0;return e[n]=[],t.forEach((function(t){e[n].length<=199?e[n].push(t):(n++,e[n]=[t])})),e},e.limitIds=function(t,e){for(var n=[];t.length>e;){var r=t.splice(0,e);n.push(r)}return n.push(t),n},e.setBaseUrl=function(t,e){return t===r.EnvironmentEnum.PROD?{profile:"https://profile.fansunitedapi.com/v1",football:"https://football.fansunitedapi.com/v1",idMapping:"https://id-mapping.fansunitedapi.com/v1",predictor:"https://prediction.fansunitedapi.com/v1",client:"https://client.fansunitedapi.com/v1",loyalty:"https://loyalty.fansunitedapi.com/v1",miniGames:"https://mini-games.fansunitedapi.com/v1",discussions:"https://discussions.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.fansunitedapi.com/v1",voting:"https://voting.fansunitedapi.com/v1"}[e]:t===r.EnvironmentEnum.DEV?{profile:"http://localhost:8010/v1",football:"http://localhost:8080/v1",idMapping:"http://localhost:8030/v1",predictor:"http://localhost:8040/v1",client:"http://localhost:8070/v1",loyalty:"http://localhost:8060/v1",miniGames:"http://localhost:9040/v1",discussions:"http://localhost:9020/v1",privateLeagues:"http://localhost:9010/v1",voting:"http://localhost:9030/v1"}[e]:t===r.EnvironmentEnum.WATG?{profile:"https://profile.watg.fansunitedapi.com/v1",football:"https://football.watg.fansunitedapi.com/v1",idMapping:"https://id-mapping.watg.fansunitedapi.com/v1",predictor:"https://prediction.watg.fansunitedapi.com/v1",client:"https://client.watg.fansunitedapi.com/v1",loyalty:"https://loyalty.watg.fansunitedapi.com/v1",miniGames:"https://mini-games.watg.fansunitedapi.com/v1",discussions:"https://discussions.watg.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.watg.fansunitedapi.com/v1",voting:"https://voting.watg.fansunitedapi.com/v1"}[e]:t===r.EnvironmentEnum.YOLO?{profile:"https://profile.yolo.fansunitedapi.com/v1",football:"https://football.yolo.fansunitedapi.com/v1",idMapping:"https://id-mapping.yolo.fansunitedapi.com/v1",predictor:"https://prediction.yolo.fansunitedapi.com/v1",client:"https://client.yolo.fansunitedapi.com/v1",loyalty:"https://loyalty.yolo.fansunitedapi.com/v1",miniGames:"https://mini-games.yolo.fansunitedapi.com/v1",discussions:"https://discussions.yolo.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.yolo.fansunitedapi.com/v1",voting:"https://voting.yolo.fansunitedapi.com/v1"}[e]:t===r.EnvironmentEnum.CSKA?{profile:"https://profile.cska.fansunitedapi.com/v1",football:"https://football.cska.fansunitedapi.com/v1",idMapping:"https://id-mapping.cska.fansunitedapi.com/v1",predictor:"https://prediction.cska.fansunitedapi.com/v1",client:"https://client.cska.fansunitedapi.com/v1",loyalty:"https://loyalty.cska.fansunitedapi.com/v1",miniGames:"https://mini-games.cska.fansunitedapi.com/v1",discussions:"https://discussions.cska.fansunitedapi.com/v1",privateLeagues:"https://private-leagues.cska.fansunitedapi.com/v1",voting:"https://voting.cska.fansunitedapi.com/v1"}[e]:{profile:"https://profile.fansunitedstagingapi.com/v1",football:"https://football.fansunitedstagingapi.com/v1",idMapping:"https://id-mapping.fansunitedstagingapi.com/v1",predictor:"https://prediction.fansunitedstagingapi.com/v1",client:"https://client.fansunitedstagingapi.com/v1",loyalty:"https://loyalty.fansunitedstagingapi.com/v1",miniGames:"https://mini-games.fansunitedstagingapi.com/v1",discussions:"https://discussions.fansunitedstagingapi.com/v1",privateLeagues:"https://private-leagues.fansunitedstagingapi.com/v1",voting:"https://voting.fansunitedstagingapi.com/v1"}[e]},e.transformIdsToBeUnique=function(t){return Array.from(new Set(t))},e.isDisabledCache=function(t){return t||!1},e.initDisableCache=function(){return"&disable_cache=".concat(Date.now())},e.sortArrayInAscOrder=function(t){return JSON.parse(JSON.stringify(t.sort((function(t,e){return t.localeCompare(e)}))))},e.constructStringArrayWithProvidedLength=function(t,e){for(var n=[],r=0;r<e;r++)n[r]=t;return n}},15601:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});var s=n(91260),o="FansUnited",u={football:{ids:[],countries:[],competitions:[],expirations:{ids:0}},profile:{info:{},statistics:{},badges:null,countries:[],expirations:{profile:0,statistics:0,badges:0}},client:{features:{},expirations:{features:0}}},l=function(){function t(t){var e=this;this.idSchema="",this.expirationProfileTimeout=600,this.expirationBadgesTimeout=3600,this.expirationClientFeaturesTimeout=14400,this.expirationFootballIdsTimeout=604800,this.clearData=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){return this.setData(u),[2]}))}))},this.getEntityById=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),r(e,void 0,void 0,(function(){var e=this;return i(this,(function(r){return[2,this.getData().football.ids.find((function(r){var i=s.ID_TYPES[e.idSchema];return r&&"".concat(r[i])===n&&r.resource===t}))]}))}))},this.getEntity=function(t,n,r){return Array.isArray(t)?e.getData().football.ids.filter((function(e){var i=s.ID_TYPES[r];return e&&t.includes("".concat(e[i]))&&e.resource===n})):e.getData().football.ids.find((function(e){var i=s.ID_TYPES[r];return e&&"".concat(e[i])===t&&e.resource===n}))},this.getEntityByNativeId=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),e.getData().football.ids.find((function(e){return e&&"".concat(e.id)===n&&e.resource===t}))},this.checkForExistingIdObjs=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a=this;return i(this,(function(i){return e=s.ID_TYPES[n],r={},Object.keys(t).forEach((function(i){var s=t[i],o=a.getEntity(s,i,n).map((function(t){return t[e]})),u=t[i].filter((function(t){return!o.includes(t)}));r[i]=s.map((function(t){return u.includes(t)?{id:t,exists:!1}:{id:t,exists:!0}}))})),[2,r]}))}))},this.getIdsByType=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,o,u=this;return i(this,(function(i){return e=s.ID_TYPES[a],r=s.ID_TYPES[n],o={},Object.keys(t).forEach((function(n){var i=t[n],a=[];u.getData().football.ids.forEach((function(t){i.forEach((function(i,s){i===t[r]&&n===t.resource&&(a[s]=t[e])}))})),o[n]=a})),[2,o]}))}))},this.addIdMapping=function(t){var n=e.getData();n.football.ids.push(t),e.setData(n)},this.addIdMappings=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){return e=this.getData(),n=e.football.ids,n=a(a([],n,!0),t,!0),e.football.ids=n,this.setData(e),[2]}))}))},this.addTopIdMappings=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){return(e=this.getData()).football.ids.length?(n=(n=JSON.parse(JSON.stringify(e.football.ids))).filter((function(t){return"match"!==t.resource})),t=t.filter((function(t){return"match"===t.resource})),n=a(a([],n,!0),t,!0),e.football.ids=n):e.football.ids=t,e.football.expirations.ids=Math.floor(Date.now()/1e3)+this.expirationFootballIdsTimeout,this.setData(e),[2]}))}))},this.setOwnProfile=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getData()).profile.info=t,e.profile.expirations.profile=Math.floor(Date.now()/1e3)+this.expirationProfileTimeout,this.setData(e),[2]}))}))},this.getOwnProfile=function(){return e.getData().profile.info},this.getProfileCountries=function(){return e.getData().profile.countries},this.setProfileCountries=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getData()).profile.countries=t,this.setData(e),[2]}))}))},this.getProfileStats=function(){return e.getData().profile.statistics},this.setProfileStats=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getData()).profile.statistics=t,e.profile.expirations.statistics=Math.floor(Date.now()/1e3)+this.expirationProfileTimeout,this.setData(e),[2]}))}))},this.getProfileBadges=function(){return e.getData().profile.badges},this.setProfileBadges=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getData()).profile.badges=t,e.profile.expirations.badges=Math.floor(Date.now()/1e3)+this.expirationBadgesTimeout,this.setData(e),[2]}))}))},this.getFootballCountries=function(){return e.getData().football.countries},this.setFootballCountries=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getData()).football.countries=t,this.setData(e),[2]}))}))},this.getCompetitions=function(t){var n=e.getData();return t?t.competitionSearchFilter(n.football.competitions):n.football.competitions},this.setCompetitions=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){return e=this.getData(),(n=a([],e.football.competitions,!0)).push.apply(n,t),e.football.competitions=this.makeCompetitionsUnique(n),this.setData(e),[2]}))}))},this.getCompetitionsLength=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){return[2,this.getData().football.competitions.length]}))}))},this.getClientFeatures=function(){return e.getData().client.features},this.setClientFeatures=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){return e=this.getData(),n=JSON.parse(JSON.stringify(t)),e.client.expirations.features=Math.floor(Date.now()/1e3)+this.expirationClientFeaturesTimeout,e.client.features=n,this.setData(e),[2]}))}))},this.deleteClientFeatures=function(){return r(e,void 0,void 0,(function(){var t,e;return i(this,(function(n){return t=this.getData(),(e=JSON.parse(JSON.stringify(t))).client={features:{},expirations:{features:0}},this.setData(e),[2]}))}))},this.getExpiration=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(this.initialNewSchema(t,"expirations"),e=this.getData(),n){case"profile":return[2,e.profile.expirations.profile];case"statistics":return[2,e.profile.expirations.statistics];case"badges":return[2,e.profile.expirations.badges];case"features":return[2,e.client.expirations.features];case"ids":return[2,e.football.expirations.ids]}return[2]}))}))},this.makeCompetitionsUnique=function(t){var e=new Set;return t.filter((function(t){var n=!e.has(t.id);return e.add(t.id),n}))},this.getData=function(){return localStorage.getItem(o)||e.setData(u),JSON.parse(localStorage.getItem(o))},this.setData=function(t){localStorage.setItem(o,JSON.stringify(t))},this.initialNewSchema=function(t,n){var r=e.getData();r&&r[t]&&r[t][n]||e.setData(u)},this.idSchema=t}return t.getInstance=function(e){return t.instance||(t.instance=new t(e)),t.instance},t}();e.default=l},5318:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.invalidTypeMessage=e.missingFieldsMessage=e.invalidFieldMessage=e.invalidMarketTopXMessage=e.invalidMarketMessage=e.invalidPredictionMessage=e.WarningMessages=e.ErrorMessages=void 0;var r,i=n(91260);(r=e.ErrorMessages||(e.ErrorMessages={})).INVALID_MATCH_ID="Match id is invalid!",r.INVALID_PLAYER_ID="Player id is invalid!",r.QUERY_PARAM_MATCH_IDS_EXCEEDED="Maximum matchIds in PredictionFilters should be 10 or less.",r.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED="Maximum limit for filtering games is 50 or less.",r.INVALID_FIXTURES_FIELD="Fixtures field is invalid. For more information please visit our documentation",r.INVALID_TOKEN="Invalid JWT token is provided",r.EXPIRED_TOKEN="The provided JWT token is expired",r.ENTITIES_NEEDED="At least one of footballCompetitions, footballTeams or footballPlayers properties should be provided for filters.",r.ENTITIES_FOLLOWS_FILTERS_EXCEEDED="Maximum length per entity should be 24 or less.",r.INVALID_TYPE="You have provided invalid type. The valid type is ",r.INVALID_VALUE="You have provided invalid value. The valid value is ",r.INVALID_AVATAR="Invalid URL syntax for avatar image.",r.INVALID_GET_PROFILES_METHOD_CALL="The method 'getByIds' from Profile namespace is not called correctly. You need to provide 'profileIds' OR 'search' parameters to the method, but you can't use both of them or neither of them.",r.INVALID_LIMIT="Invalid limit. The maximum limit is: ",r.INVALID_LIMIT_TYPE="Invalid limit type. The proper type is number.",r.FILTER_COMBINATION_ERROR="You need to use both 'entityIds' and 'entityType' filters together",r.INVALID_ENTITY_TYPE="Invalid 'entityType' filter. Please use one of the following valid options: competition, team, or player",r.INVALID_TEMPLATE_GROUP_ID="There is no group in this template with the provided groupId",r.INVALID_TEMPLATE_GROUP_FILTERS="The provided template group has no filters",r.INVALID_PAGE_NUMBER="Invalid page number provided. Use number between 1 and max number of pages.",r.INVALID_DISCUSSION_IDS="Invalid discussion ids argument. Please provide at least one discussion id in an array",r.EXCEEDED_DISCUSSION_IDS="Maximum number of discussion ids exceeded. The maximum number of discussion ids is 50. You can use 'getPostsCountExtended' method for more than 50 discussion ids.",r.EXCEEDED_EXTENDED_DISCUSSION_IDS="Maximum number of discussion ids exceeded. The maximum number of discussion ids is: ",r.ID_MAPPING_NOT_FOUND="No ID mappings are available for the provided ID. ID argument: ",r.INVALID_PARAM="Invalid parameter provided. Please check the following parameter: ",r.INVALID_COMPETITION_ID="Invalid competition ID provided. Please provide a valid competition ID.",r.INVALID_TEAM_ID="Invalid team ID provided. Please provide a valid team ID.",r.INVALID_OR_EMPTY_IDS="Invalid or empty IDs provided. Please provide at least one ID.",r.INVALID_PROVIDER="Invalid provider. The valid providers are: 'native', 'enetpulse', 'sportal365', 'sportradar' and 'api_football'.",r.INVALID_OUTPUT_PROVIDER="Invalid output provider. The output can not be the same as the input provider.",r.MATCH_SUMMARY_REQUIRED="Match summary is required.",r.MATCH_SUMMARY_PREDICTIONS_REQUIRED="Predictions in match summary are required.",r.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS="Keys in predictions in match summary are invalid. The valid ones are: ",r.INVALID_COLLECT_LEAD_METHOD_CALL="The method 'collectLead' from Profile namespace is not called correctly. You need to provide 'requestBody' parameter to the method.",r.REQUIRED_FIXTURES_FIELD="Fixtures field is required and should contain at least one fixtures object. For more information please visit our documentation",r.INVALID_TIEBREAKER_FIELD="Tiebreaker field is invalid. It should contain statTotal key with integer value. For more information please visit our documentation",r.ENTITY_IDS_NOT_FOUND="Some of the sport entity IDs were not found for the provided id schema",r.MATCH_IDS_NOT_FOUND="Some of the match IDs were not found for the provided id schema",r.INVALID_STANDING_PREDICTION_ARGUMENT="The prediction argument is invalid. For more information please visit our documentation",r.INVALID_MAP_PLAYERS_ROLES_KEYS="The keys in the players roles map are not part of the valid keys. The valid keys are: ",r.INVALID_MAP_PLAYERS_ROLES_VALUES="The values in the map are not valid. The valid ones are: ",r.INVALID_MATCH_IDS="Match IDs are invalid!",r.MISSING_ODD_CLIENT_CONFIGURATION="Odds namespace requires oddClient configuration to be set",e.WarningMessages={UNEXPECTED_STATUS_PROP:"Unexpected provided property 'status'. You can NOT use this property for this method. For more information visit our documentation: \n ".concat(i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION),UNEXPECTED_TYPE_PROP:"Unexpected provided property 'type'. You can NOT use this property for this method. For more information visit our documentation: \n ".concat(i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION)},e.invalidPredictionMessage=function(t,e){return"The prediction '".concat(t,"' is invalid for market '").concat(e,"'. Please check again have you passed appropriate prediction model. For more information please visit our documentation: https://docs.fansunitedmedia.com/sdks/js/match.quiz#gamerelatedoperations")},e.invalidMarketMessage=function(t){return"The market '".concat(t,"' is not supported from Fans United. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction")},e.invalidMarketTopXMessage=function(t){return"The market '".concat(t,"' is not valid for Top X game. The only available market is CORRECT_SCORE.")},e.invalidFieldMessage=function(t){return"The field/s '".concat(t.length>1?t.join(", "):t[0],"' is/are invalid. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk")},e.missingFieldsMessage=function(t,e){return"The following field/s is/are missing from ".concat(t,": '").concat(e.length>1?e.join(", "):e[0],"'. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction")},e.invalidTypeMessage=function(t,e){return"The field ".concat(t," has incorrect type. The correct type is ").concat(e)}},81282:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.primaryColor=null,this.secondaryColor=null,this.contentColor=null,this.backgroundColor=null,this.borderColor=null,this.additionalColor=null}},1997:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.mainLogo=null,this.mobileLogo=null,this.backgroundImage=null,this.mobileBackgroundImage=null,this.additionalImage=null}},6862:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.colors=null,this.urls=null,this.images=null}},12291:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.primaryUrl=null,this.secondaryUrl=null,this.privacyPolicyUrl=null,this.termsAndConditionsUrl=null,this.additionalUrl=null}},43529:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profile=null,this.football=null,this.predictor=null,this.loyalty=null,this.topX=null,this.matchQuiz=null,this.activity=null,this.miniGames=null,this.discussions=null,this.privateLeagues=null,this.challenges=null,this.progress=null,this.voting=null,this.fantasy=null,this.helpers=null,this.idMapping=null,this.bracketGame=null,this.lists=null,this.standingGame=null,this.eventGame=null,this.odds=null,this.getVersion=null}},64800:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=t&&t.limit?t.limit:null,this.startAfter=t&&t.startAfter?t.startAfter:null}return t.prototype.constructMainFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit=".concat(this.limit)),this.startAfter&&(t+="&",t+="start_after=".concat(this.startAfter)),t},t}();e.default=n},30439:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.main=null,this.cover=null,this.mobile=null}},38872:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(18902));e.default=function(){this.pagination=new i.default}},18902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.nextPageStartsAfter=null,this.itemsPerPage=null}},81553:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},53623:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.remapMetaData=function(t){var e=new i.default;return e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e.pagination.itemsPerPage=t.pagination.items_per_page,e}}},55955:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.preferenceId=""}},62475:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.preferenceId="",this.categories=[],this.source=""}},63483:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityId=null,this.entityType=null}},78923:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityId=null,this.entityType=null,this.entityRelationship=null}},16692:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(81282)),a=r(n(1997)),s=r(n(6862)),o=r(n(12291));e.default=function(){this.remapBranding=function(t){var e=new s.default;return t.colors&&(e.colors=new i.default,e.colors.primaryColor=t.colors.primary_color,e.colors.secondaryColor=t.colors.secondary_color,e.colors.contentColor=t.colors.content_color,e.colors.backgroundColor=t.colors.background_color,e.colors.borderColor=t.colors.border_color,e.colors.additionalColor=t.colors.additional_color),t.urls&&(e.urls=new o.default,e.urls.primaryUrl=t.urls.primary_url,e.urls.secondaryUrl=t.urls.secondary_url,e.urls.privacyPolicyUrl=t.urls.privacy_policy_url,e.urls.termsAndConditionsUrl=t.urls.terms_and_conditions_url,e.urls.additionalUrl=t.urls.additional_url),t.images&&(e.images=new a.default,e.images.mainLogo=t.images.main_logo,e.images.mobileLogo=t.images.mobile_logo,e.images.backgroundImage=t.images.background_image,e.images.mobileBackgroundImage=t.images.mobile_background_image,e.images.additionalImage=t.images.additional_image),e}}},9018:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o,u=s(n(70321)),l=n(91260);!function(t){t.PROFILE="profile",t.PROFILE_BADGES="profile_badges",t.PROFILE_STATS="profile_stats",t.PROFILE_COUNTRIES="profile_countries",t.IDS="ids",t.CLIENT="client",t.FOOTBALL_COMPETITIONS="football_competitions",t.FOOTBALL_COUNTIRES="football_countries"}(o||(o={}));var c=function(){function t(e){var n=this;this.profileTTL=600,this.clientTTL=14400,this.profileBadgesTTL=3600,this.idMappingsExpiration=0,this.idSchema="",this.clearData=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.flushAll()]}))}))},this.getEntityById=function(e,a){return r(n,void 0,void 0,(function(){var n,r=this;return i(this,(function(i){return(n=t.nodeCache.get(o.IDS))?[2,n.find((function(t){var n=l.ID_TYPES[r.idSchema];return t&&"".concat(t[n])===a&&t.resource===e}))]:[2,null]}))}))},this.getEntity=function(e,a,s){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){return(n=t.nodeCache.get(o.IDS))?[2,Array.isArray(e)?[]:null]:Array.isArray(e)?[2,n.filter((function(t){var n=l.ID_TYPES[s];return t&&e.includes("".concat(t[n]))&&t.resource===a}))]:[2,n.find((function(t){var n=l.ID_TYPES[s];return t&&"".concat(t[n])===e&&t.resource===a}))]}))}))},this.checkForExistingIdObjs=function(t,e){return r(n,void 0,void 0,(function(){var n,r,a,s,o,u,c;return i(this,(function(d){switch(d.label){case 0:n=l.ID_TYPES[e],r={},a=function(a){var o,u,l,c;return i(this,(function(i){switch(i.label){case 0:return o=t[a],[4,s.getEntity(o,a,e)];case 1:return u=i.sent(),l=u.map((function(t){return t[n]})),c=t[a].filter((function(t){return!l.includes(t)})),r[a]=o.map((function(t){return c.includes(t)?{id:t,exists:!1}:{id:t,exists:!0}})),[2]}}))},s=this,o=0,u=Object.keys(t),d.label=1;case 1:return o<u.length?(c=u[o],[5,a(c)]):[3,4];case 2:d.sent(),d.label=3;case 3:return o++,[3,1];case 4:return[2,r]}}))}))},this.getIdsByType=function(e,a,s){return r(n,void 0,void 0,(function(){var n,r,u,c;return i(this,(function(i){return n=l.ID_TYPES[s],r=l.ID_TYPES[a],u=t.nodeCache.get(o.IDS),c={},u?(Object.keys(e).forEach((function(t){var i=e[t],a=[];u.forEach((function(e){i.forEach((function(i,s){i===e[r]&&t===e.resource&&(a[s]=e[n])}))})),c[t]=a})),[2,c]):[2,null]}))}))},this.addIdMapping=function(e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){return(n=t.nodeCache.get(o.IDS)).push(e),t.nodeCache.set(o.IDS,n),[2]}))}))},this.addIdMappings=function(e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){return n=t.nodeCache.get(o.IDS),n=a(a([],n,!0),e,!0),t.nodeCache.set(o.IDS,n),[2]}))}))},this.addTopIdMappings=function(e){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){return(n=t.nodeCache.get(o.IDS))?(r=(r=JSON.parse(JSON.stringify(n))).filter((function(t){return"match"!==t.resource})),e=e.filter((function(t){return"match"===t.resource})),r=a(a([],r,!0),e,!0),t.nodeCache.set(o.IDS,r)):t.nodeCache.set(o.IDS,e),this.idMappingsExpiration=Math.floor(Date.now()/1e3)+604800,[2]}))}))},this.setOwnProfile=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.PROFILE,e,this.profileTTL),[2]}))}))},this.getOwnProfile=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.PROFILE)]}))}))},this.getProfileCountries=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.PROFILE_COUNTRIES)]}))}))},this.setProfileCountries=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.PROFILE_COUNTRIES,e),[2]}))}))},this.getProfileStats=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.PROFILE_STATS)]}))}))},this.setProfileStats=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.PROFILE_STATS,e,this.profileTTL),[2]}))}))},this.getProfileBadges=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.PROFILE_BADGES)]}))}))},this.setProfileBadges=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.PROFILE_BADGES,e,this.profileBadgesTTL),[2]}))}))},this.getFootballCountries=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.FOOTBALL_COUNTIRES)]}))}))},this.setFootballCountries=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.FOOTBALL_COUNTIRES,e),[2]}))}))},this.getCompetitions=function(e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){return(n=t.nodeCache.get(o.FOOTBALL_COMPETITIONS))?e?[2,e.competitionSearchFilter(n)]:[2,n]:[2,null]}))}))},this.setCompetitions=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.FOOTBALL_COMPETITIONS,e),[2]}))}))},this.getCompetitionsLength=function(){return r(n,void 0,void 0,(function(){var e;return i(this,(function(n){return[2,(e=t.nodeCache.get(o.FOOTBALL_COMPETITIONS))?e.length:0]}))}))},this.getClientFeatures=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return[2,t.nodeCache.get(o.CLIENT)]}))}))},this.setClientFeatures=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){return t.nodeCache.set(o.CLIENT,e,this.clientTTL),[2]}))}))},this.deleteClientFeatures=function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){return t.nodeCache.del(o.CLIENT),[2]}))}))},this.getExpiration=function(e,a){return r(n,void 0,void 0,(function(){var e;return i(this,(function(n){return(e=this.getKeyFromExpirationType(a))===o.IDS?[2,this.idMappingsExpiration]:[2,t.nodeCache.getTtl(e)]}))}))},this.getKeyFromExpirationType=function(t){switch(t){case"profile":return o.PROFILE;case"statistics":return o.PROFILE_STATS;case"badges":return o.PROFILE_BADGES;case"features":return o.CLIENT;case"ids":return o.IDS}}}return t.getInstance=function(e){return t.instance||(t.instance=new t(e),t.nodeCache.options.useClones=!1),t.instance},t.nodeCache=new u.default,t}();e.default=c},16198:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(68097)),a=r(n(62535));e.default=function(t){var e=this;this.errorHandlingModel=null,this.throwException=function(t,n,r){if("standard"===e.errorHandlingModel)throw new a.default(t,n,r);throw new i.default(t,n,r)},this.errorHandlingModel=t}},71022:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(92453)),c=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"loyalty"))||this;return n.activityRemapper=null,n.createActivity=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/activities".concat(this.apiSignInUrl),[4,this.fetchWithAuth(e,"There was a problem with creating activity","POST",t)];case 1:return n=r.sent(),[2,this.activityRemapper.remapSingleResponse(n)]}}))}))},n.deleteActivity=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/activities/".concat(t).concat(this.apiSignInUrl),n="There was a problem deleting the following activity: ".concat(t),[4,this.fetchWithAuth(e,n,"DELETE")];case 1:return r.sent(),[2,!0]}}))}))},n.getOwnActivities=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/activities".concat(this.apiSignInUrl),r=Date.now(),t&&(n+="".concat(t.constructFilterUrl())),e&&(n+="disable_cache=".concat(r)),[4,this.fetchWithAuth(n,"There was a problem with fetching own activities")];case 1:return i=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(i)]}}))}))},n.getActivitiesForUser=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/users/".concat(t,"/activities").concat(this.apiSignInUrl),i=Date.now(),a="There was a problem with fetching activities for user: ".concat(t),e&&(n+="".concat(e.constructFilterUrl())),r&&(n+="disable_cache=".concat(i)),[4,this.fetchWithoutAuth(n,a)];case 1:return o=s.sent(),[2,this.activityRemapper.remapActivitiesResponse(o)]}}))}))},n.getStats=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="",r="",i=null,t?(n+=(0,u.isDisabledCache)(e)?"/users/".concat(t,"/statistics").concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/users/".concat(t,"/statistics").concat(this.apiSignInUrl),r="There was a problem fetching statistics for profile: ".concat(t),[4,this.fetchWithoutAuth(n,r)]):[3,2];case 1:return i=a.sent(),[3,4];case 2:return n+="/statistics".concat(this.apiSignInUrl),r="There was a problem fetching profile`s statistics",[4,this.fetchWithAuth(n,r)];case 3:i=a.sent(),a.label=4;case 4:return[2,this.activityRemapper.remapStatsResponse(i.data)]}}))}))},n.activityRemapper=new l.default,n}return i(e,t),e}(o(n(47724)).default);e.default=c},47686:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureConfigEnum=void 0;var u,l=n(90712),c=o(n(60704)),d=o(n(47724)),f=o(n(78358)),h=o(n(56412));(u=e.FeatureConfigEnum||(e.FeatureConfigEnum={})).PREDICTOR="predictor",u.TOP_X="topX",u.MATCH_QUIZ="matchQuiz",u.LOYALTY="loyalty",u.DISCUSSIONS="discussions",u.FANTASY="fantasy";var p=function(t){function e(e){var n=t.call(this,e,(0,l.setBaseUrl)(e.environment,"client"))||this;return n.featureConfigRemapper=null,n.listContentRemapper=null,n.localStorage=null,n.clientId=null,n.getConfig=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return[4,this.getCachedFeatures()];case 1:return(e=s.sent())?[3,4]:(n="/clients/".concat(this.clientId,"/features"),r=this.apiSignInUrl.split("&")[0],i=n+r,[4,this.fetchWithoutAuth(i,"There was a problem fetching client features from Client API")]);case 2:return a=s.sent(),e=a.data,[4,this.localStorage.setClientFeatures(e)];case 3:s.sent(),s.label=4;case 4:switch(t){case"predictor":return[2,this.featureConfigRemapper.remapPredictorConfig(e.predictor)];case"topX":return[2,this.featureConfigRemapper.remapTopXConfig(e.top_x)];case"matchQuiz":return[2,this.featureConfigRemapper.remapMatchQuizConfig(e.match_quiz)];case"loyalty":return[2,this.featureConfigRemapper.remapLoyaltyConfig(e.loyalty)];case"discussions":return[2,this.featureConfigRemapper.remapDiscussionsConfig(e.discussions)];case"fantasy":return[2,this.featureConfigRemapper.remapFantasyConfig(e.football_fantasy)]}return[2]}}))}))},n.getNewLoyaltyConfig=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return e="/clients/".concat(this.clientId,"/features"),n=this.apiSignInUrl.split("&")[0],r="There was a problem fetching client features from Client API",t?(a=e+n+(0,l.initDisableCache)(),[4,this.fetchWithoutAuthAdditionalHeaders(a,r,{"x-api-version":"2"})]):[3,3];case 1:return o=s.sent(),[4,this.localStorage.setClientFeatures(o.data)];case 2:s.sent(),s.label=3;case 3:return[4,this.getCachedFeatures()];case 4:return(i=s.sent())?[3,7]:(a=e+n,[4,this.fetchWithoutAuthAdditionalHeaders(a,r,{"x-api-version":"2"})]);case 5:return o=s.sent(),i=o.data,[4,this.localStorage.setClientFeatures(i)];case 6:s.sent(),s.label=7;case 7:return[2,this.featureConfigRemapper.remapLoyaltyNewConfig(i.loyalty)]}}))}))},n.getListContent=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/clients/".concat(this.clientId,"/lists/").concat(t,"/content").concat(this.apiSignInUrl),e&&(n+=e.constructFiltersUrl()),(0,l.isDisabledCache)(r)&&(n+=(0,l.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem fetching client list content")];case 1:return i=a.sent(),[2,this.listContentRemapper.remapListContent(i)]}}))}))},n.getCachedFeatures=function(){return a(n,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return[4,this.getLocalStorageData()];case 1:return(t=e.sent())&&Object.keys(t).length?t.predictor.client_id&&t.predictor.client_id!==this.clientId?[4,this.localStorage.deleteClientFeatures()]:[3,3]:[2];case 2:return e.sent(),[2,null];case 3:return[2,t]}}))}))},n.getLocalStorageData=function(){return a(n,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t=Math.floor(Date.now()/1e3),[4,this.localStorage.getExpiration("client","features")];case 1:return e.sent()>t?[4,this.localStorage.getClientFeatures()]:[3,3];case 2:return[2,e.sent()];case 3:return[2,null]}}))}))},n.clientId=e.clientId,n.localStorage=(new f.default).createLocalCacheInstance(e.idSchema),n.featureConfigRemapper=new c.default,n.listContentRemapper=new h.default,n}return i(e,t),e}(d.default);e.default=p},91450:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(34227)),c=o(n(86075)),d=o(n(47724)),f=o(n(86827)),h={id:"",profile_id:"",total_points:null,game_points:null,bonus_points:null,position:null,status:"ACTIVE",game_id:"",fixtures:[],tiebreaker:{stat_total:0},updated_at:"",created_at:""},p=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"predictor"))||this;return n.bracketGameRemapper=null,n.standingGameRemapper=null,n.eventGameRemapper=null,n.getBracketGames=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n=t?"/custom/bracket".concat(this.apiSignInUrl).concat(t.constructMainFiltersUrl()):"/custom/bracket".concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching bracket games list")];case 1:return r=i.sent(),[2,this.bracketGameRemapper.remapBracketGames(r)]}}))}))},n.getBracketGameById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,u.isDisabledCache)(e)?"/custom/bracket/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/custom/bracket/".concat(t).concat(this.apiSignInUrl),r="There was a problem with fetching bracket game with the following ID: "+t,[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.bracketGameRemapper.remapBracketGameById(i)]}}))}))},n.makeBracketGamePrediction=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/custom/bracket/".concat(t,"/predictions").concat(this.apiSignInUrl),r="There was a problem with making prediction for bracket game with the following ID: "+t,(i=JSON.parse(JSON.stringify(e))).fixtures=this.bracketGameRemapper.remapPredictionToRequestBody(e.fixtures),e.tiebreaker&&(i.tiebreaker={stat_total:e.tiebreaker.statTotal}),[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return a=s.sent(),[2,this.bracketGameRemapper.remapPrediction(a)]}}))}))},n.updateBracketGamePrediction=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/custom/bracket/".concat(t,"/predictions/").concat(e).concat(this.apiSignInUrl),i="There was a problem with updating prediction for bracket game with the following ID: "+t,(a=JSON.parse(JSON.stringify(r))).fixtures=this.bracketGameRemapper.remapPredictionToRequestBody(r.fixtures),r.tiebreaker&&(a.tiebreaker={stat_total:r.tiebreaker.statTotal}),[4,this.fetchWithAuth(n,i,"PUT",a)];case 1:return o=s.sent(),[2,this.bracketGameRemapper.remapPrediction(o)]}}))}))},n.getBracketGamePredictionsForUser=function(t,e,r,i){return a(n,void 0,void 0,(function(){var n,a,o;return s(this,(function(s){switch(s.label){case 0:return n=r?"/custom/bracket/".concat(t,"/predictions").concat(this.apiSignInUrl,"&profile_id=").concat(e).concat(r.constructMainFiltersUrl()):"/custom/bracket/".concat(t,"/predictions").concat(this.apiSignInUrl,"&profile_id=").concat(e),(0,u.isDisabledCache)(i)&&(n+=(0,u.initDisableCache)()),a="There was a problem with getting all predictions for user with ID ".concat(e," for bracket game with ID ").concat(t),[4,this.fetchWithoutAuth(n,a)];case 1:return o=s.sent(),[2,this.bracketGameRemapper.remapPredictionsForUser(o)]}}))}))},n.getBracketGamePredictionById=function(t,e,r){return a(n,void 0,void 0,(function(){var n;return s(this,(function(i){return(0,u.isDisabledCache)(r)?"/custom/bracket/".concat(t,"/predictions/").concat(e,"/").concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/custom/bracket/".concat(t,"/predictions/").concat(e,"/").concat(this.apiSignInUrl),"There was a problem with getting prediction with ID ".concat(e," for bracket game with ID ").concat(t),(n=JSON.parse(JSON.stringify(h))).id=e,n.game_id=t,n.tiebreaker=null,[2,Promise.resolve(this.bracketGameRemapper.remapPrediction(n))]}))}))},n.getBracketGameRankings=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n=e?"/custom/bracket/".concat(t,"/ranking").concat(this.apiSignInUrl).concat(e.constructMainFiltersUrl()):"/custom/bracket/".concat(t,"/ranking").concat(this.apiSignInUrl),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),i="There was a problem with getting rankings for bracket game with ID ".concat(t),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.bracketGameRemapper.remapRankings(a)]}}))}))},n.getStandingsGames=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n=t?"/custom/standing".concat(this.apiSignInUrl).concat(t.constructMainFiltersUrl()):"/custom/standing".concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching standings games list")];case 1:return r=i.sent(),[2,this.standingGameRemapper.remapBracketGames(r)]}}))}))},n.getStandingGameById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,u.isDisabledCache)(e)?"/custom/standing/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/custom/standing/".concat(t).concat(this.apiSignInUrl),r="There was a problem with fetching standing game with the following ID: "+t,[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.standingGameRemapper.remapStandingGameById(i)]}}))}))},n.makeStandingGamePrediction=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/custom/standing/".concat(t,"/predictions").concat(this.apiSignInUrl),r="There was a problem with making prediction for standing game with the following ID: "+t,i={standing:e},[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return a=s.sent(),[2,this.standingGameRemapper.remapPrediction(a)]}}))}))},n.updateStandingGamePrediction=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/custom/standing/".concat(t,"/predictions/").concat(e).concat(this.apiSignInUrl),i="There was a problem with updating prediction for standing game with the following ID: "+t,a={standing:r},[4,this.fetchWithAuth(n,i,"PUT",a)];case 1:return o=s.sent(),[2,this.standingGameRemapper.remapPrediction(o)]}}))}))},n.getStandingGamePredictionsForUser=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/custom/standing/".concat(t,"/predictions").concat(this.apiSignInUrl,"&profile_id=").concat(e),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),i="There was a problem with getting prediction for user with ID ".concat(e," for standing game with ID ").concat(t),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.standingGameRemapper.remapPredictionsForUser(a)]}}))}))},n.getStandingGameRankings=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n=e?"/custom/standing/".concat(t,"/ranking").concat(this.apiSignInUrl).concat(e.constructMainFiltersUrl()):"/custom/standing/".concat(t,"/ranking").concat(this.apiSignInUrl),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),i="There was a problem with getting rankings for standing game with ID ".concat(t),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.standingGameRemapper.remapRankings(a)]}}))}))},n.getEventGames=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n=t?"/custom/event".concat(this.apiSignInUrl).concat(t.constructMainFiltersUrl()):"/custom/event".concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching event games list")];case 1:return r=i.sent(),[2,this.eventGameRemapper.remapEventGames(r)]}}))}))},n.getEventGameById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,u.isDisabledCache)(e)?"/custom/event/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/custom/event/".concat(t).concat(this.apiSignInUrl),r="There was a problem with fetching event game with the following ID: "+t,[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.eventGameRemapper.remapEventGameById(i)]}}))}))},n.makeEventGamePrediction=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/custom/event/".concat(t,"/predictions").concat(this.apiSignInUrl),r="There was a problem with making prediction for event game with the following ID: "+t,(i=JSON.parse(JSON.stringify(e))).fixtures=this.eventGameRemapper.remapPredictionToRequestBody(e.fixtures),e.tiebreaker&&(i.tiebreaker={stat_total:e.tiebreaker.statTotal}),[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return a=s.sent(),[2,this.eventGameRemapper.remapPrediction(a)]}}))}))},n.updateEventGamePrediction=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/custom/event/".concat(t,"/predictions/").concat(e).concat(this.apiSignInUrl),i="There was a problem with updating prediction for event game with the following ID: "+t,(a=JSON.parse(JSON.stringify(r))).fixtures=this.eventGameRemapper.remapPredictionToRequestBody(r.fixtures),r.tiebreaker&&(a.tiebreaker={stat_total:r.tiebreaker.statTotal}),[4,this.fetchWithAuth(n,i,"PUT",a)];case 1:return o=s.sent(),[2,this.eventGameRemapper.remapPrediction(o)]}}))}))},n.getEventGamePredictionsForUser=function(t,e,r,i){return a(n,void 0,void 0,(function(){var n,a,o;return s(this,(function(s){switch(s.label){case 0:return n=r?"/custom/event/".concat(t,"/predictions").concat(this.apiSignInUrl,"&profile_id=").concat(e).concat(r.constructMainFiltersUrl()):"/custom/event/".concat(t,"/predictions").concat(this.apiSignInUrl,"&profile_id=").concat(e),(0,u.isDisabledCache)(i)&&(n+=(0,u.initDisableCache)()),a="There was a problem with getting all predictions for user with ID ".concat(e," for event game with ID ").concat(t),[4,this.fetchWithoutAuth(n,a)];case 1:return o=s.sent(),[2,this.eventGameRemapper.remapPredictionsForUser(o)]}}))}))},n.getEventGameRankings=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n=e?"/custom/event/".concat(t,"/ranking").concat(this.apiSignInUrl).concat(e.constructMainFiltersUrl()):"/custom/event/".concat(t,"/ranking").concat(this.apiSignInUrl),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),i="There was a problem with getting rankings for event game with ID ".concat(t),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.eventGameRemapper.remapRankings(a)]}}))}))},n.bracketGameRemapper=new l.default,n.standingGameRemapper=new c.default,n.eventGameRemapper=new f.default,n}return i(e,t),e}(d.default);e.default=p},87945:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(43476)),c=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"discussions"))||this;return n.remapper=null,n.getAll=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/discussions"+this.apiSignInUrl,t&&(n+="".concat(t.constructMainFiltersUrl())),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem getting discussions")];case 1:return r=i.sent(),[2,this.remapper.remapToDiscussions(r)]}}))}))},n.getById=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/discussions/".concat(t)+this.apiSignInUrl,[4,this.fetchWithoutAuth(e,"There was a problem getting discussion")];case 1:return n=r.sent(),[2,this.remapper.remapToDiscussionById(n.data)]}}))}))},n.createPost=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/discussions/".concat(t,"/posts")+this.apiSignInUrl,[4,this.fetchWithAuth(n,"There was a problem creating post in discussion","POST",e)];case 1:return r=i.sent(),[2,this.remapper.remapToPostByIdBasic(r.data)]}}))}))},n.getPostById=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/posts/".concat(t)+this.apiSignInUrl,[4,this.fetchWithoutAuth(e,"There was a problem getting post by ID in discussion")];case 1:return n=r.sent(),[2,this.remapper.remapToPostByIdFull(n.data)]}}))}))},n.updatePost=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/posts/".concat(t)+this.apiSignInUrl,r={content:e},[4,this.fetchWithAuth(n,"There was a problem editing post in discussion","PUT",r)];case 1:return i=a.sent(),[2,this.remapper.remapToPostByIdBasic(i.data)]}}))}))},n.reactToPost=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/posts/".concat(t,"/reaction")+this.apiSignInUrl,r={reaction:e.toLocaleLowerCase()},[4,this.fetchWithAuth(n,"There was a problem reacting to post in discussion","PUT",r)];case 1:return i=a.sent(),[2,this.remapper.remapToPostByIdFull(i.data)]}}))}))},n.deletePost=function(t){return a(n,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/posts/".concat(t)+this.apiSignInUrl,[4,this.fetchWithAuth(e,"There was a problem deleting post in discussion","DELETE")];case 1:return n.sent(),[2,!0]}}))}))},n.getPosts=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/discussions/".concat(t,"/posts")+this.apiSignInUrl,e&&(n+="".concat(e.constructMainFiltersUrl())),[4,this.fetchWithoutAuth(n,"There was a problem getting posts in discussion")];case 1:return r=i.sent(),[2,this.remapper.remapToPostsForDiscussion(r,"full")]}}))}))},n.getPostReplies=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/posts/".concat(t,"/replies")+this.apiSignInUrl,e&&(n+="".concat(e.constructMainFiltersUrl())),[4,this.fetchWithoutAuth(n,"There was a problem getting post's replies in discussion")];case 1:return r=i.sent(),[2,this.remapper.remapToPostsForDiscussion(r,"full")]}}))}))},n.reportPost=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/posts/".concat(t,"/report")+this.apiSignInUrl,i={reason:e.toLocaleUpperCase(),reason_details:r||null},[4,this.fetchWithAuth(n,"There was a problem reporting post in discussion","POST",i)];case 1:return a=s.sent(),[2,this.remapper.remapToPostByIdBasic(a.data)]}}))}))},n.getOwnPosts=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/posts"+this.apiSignInUrl,t&&(e+="".concat(t.constructMainFiltersUrl())),[4,this.fetchWithAuth(e,"There was a problem getting own posts")];case 1:return n=r.sent(),[2,this.remapper.remapToPosts(n)]}}))}))},n.getUserPosts=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/posts/users/".concat(t)+this.apiSignInUrl,e&&(n+="".concat(e.constructMainFiltersUrl())),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem getting user's posts")];case 1:return i=a.sent(),[2,this.remapper.remapToPosts(i)]}}))}))},n.getPostsCount=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/discussions/posts/count"+this.apiSignInUrl+"&discussion_ids=".concat(t.join(",")),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem getting posts count for discussions")];case 1:return r=i.sent(),[2,this.remapper.remapToPostCount(r.data)]}}))}))},n.getTopDiscussions=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/discussions/top"+this.apiSignInUrl,t&&(n+="".concat(t.constructMainFiltersUrl())),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem getting top discussions")];case 1:return r=i.sent(),[2,this.remapper.remapToDiscussions(r)]}}))}))},n.getPostsCountExtended=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="/discussions/posts/count"+this.apiSignInUrl,n={discussion_ids:Array.from(t)},[4,this.fetchWithoutAuth(e,"There was a problem getting posts count extended for discussions","POST",n)];case 1:return r=i.sent(),[2,this.remapper.remapToPostCount(r.data)]}}))}))},n.remapper=new l.default,n}return i(e,t),e}(o(n(47724)).default);e.default=c},60595:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},a.apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(90712),c=u(n(23430)),d=u(n(67316)),f=u(n(38758)),h=u(n(95827)),p=u(n(17821)),m=u(n(95284)),v=u(n(9330)),_=u(n(4729)),y=u(n(75157)),g=u(n(97943)),b=u(n(77287)),w=u(n(86134)),E=u(n(90753)),I=u(n(91925)),M=u(n(47724)),O=u(n(89582)),P=u(n(9260)),T=function(t){function e(e){var n=t.call(this,e,(0,l.setBaseUrl)(e.environment,"football"))||this;return n.limitIds=200,n.countryRemapper=null,n.competitionBasicRemapper=null,n.competitionFullRemapper=null,n.teamBasicRemapper=null,n.teamFullRemapper=null,n.matchBasicRemapper=null,n.matchFullRemapper=null,n.playerBasicRemapper=null,n.playerFullRemapper=null,n.topPlayerRemapper=null,n.searchRemapper=null,n.footballMetaRemapper=null,n.fantasyRemapper=null,n.footballService=null,n.getCountries=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return e="/countries".concat(this.apiSignInUrl),n=Date.now(),t&&(e+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(e,"There was a problem with the football countries request")];case 1:return r=i.sent(),[2,this.countryRemapper.countriesFromResponse(r.data)]}}))}))},n.getCompetitions=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,a,s,u,c,d,f,h=this;return o(this,(function(o){switch(o.label){case 0:if(n=Date.now(),r="There was a problem with football competitions request",e=e||!1,!(t&&t.competitionIds&&t.competitionIds.length>this.limitIds-1))return[3,5];i=[],a=(0,l.limitIds)(t.competitionIds,this.limitIds),s=0,u=a,o.label=1;case 1:return s<u.length?(c=u[s],t.competitionIds=c,d="/competitions".concat(this.apiSignInUrl).concat(t.constructFilterUrl()),e&&(d+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(d,r)]):[3,4];case 2:f=o.sent(),i.push(f.data.map((function(t){return h.competitionBasicRemapper.fromResponse(t)}))),o.label=3;case 3:return s++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d="/competitions".concat(this.apiSignInUrl),t&&(d+="".concat(t.constructFilterUrl())),e&&(d+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(d,r)];case 6:return[2,(f=o.sent()).data.map((function(t){return h.competitionBasicRemapper.fromResponse(t)}))]}}))}))},n.getCompetitionById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/competitions/".concat(t).concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with football competition by ID request")];case 1:return i=a.sent(),[2,this.competitionFullRemapper.fromResponse(i.data)]}}))}))},n.getTopCompetitions=function(t){return s(n,void 0,void 0,(function(){var e,n,r=this;return o(this,(function(i){switch(i.label){case 0:return e="/competitions/top".concat(this.apiSignInUrl),n=Date.now(),t&&(e+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(e,"There was a problem with top football competitions request")];case 1:return[2,i.sent().data.map((function(t){return r.competitionBasicRemapper.fromResponse(t)}))]}}))}))},n.getTeams=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,a,s,u,c,d,f,h,p=this;return o(this,(function(o){switch(o.label){case 0:if(n=Date.now(),r="There was a problem with football teams request",!(t&&t.teamIds&&t.teamIds.length>this.limitIds))return[3,5];i=[],a=(0,l.limitIds)(t.teamIds,this.limitIds),s=0,u=a,o.label=1;case 1:return s<u.length?(c=u[s],t.teamIds=c,t.limit=c.length,f="/teams".concat(this.apiSignInUrl).concat(t.constructFilterUrl()),e&&(f+="disable_cache=".concat(n)),[4,this.fetchWithoutAuth(f,r)]):[3,4];case 2:h=o.sent(),i.push(h.data.map((function(t){return p.teamBasicRemapper.fromResponse(t)}))),o.label=3;case 3:return s++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new E.default,f="/teams".concat(this.apiSignInUrl),t&&(f+="".concat(t.constructFilterUrl())),e&&(f+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(f,r)];case 6:return h=o.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(h.meta),d.data=h.data.map((function(t){return p.teamBasicRemapper.fromResponse(t)})),[2,d]}}))}))},n.getTeamById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/teams/".concat(t).concat(this.apiSignInUrl),r=Date.now(),e&&(n+="disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with football team by ID request")];case 1:return i=a.sent(),[2,this.teamFullRemapper.fromResponse(i.data)]}}))}))},n.getTopTeams=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i=this;return o(this,(function(a){switch(a.label){case 0:return e="/teams/top".concat(this.apiSignInUrl),n=Date.now(),t&&(e+="$disable_cache=".concat(n)),[4,this.fetchWithoutAuth(e,"There was a problem with top football teams request")];case 1:return[2,(r=a.sent()).data?r.data.map((function(t){return i.teamBasicRemapper.fromResponse(t)})):[]]}}))}))},n.getNextMatchForTeam=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/teams/".concat(t,"/next-match").concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with next match for team request")];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data)]}}))}))},n.getPrevMatchForTeam=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/teams/".concat(t,"/previous-match").concat(this.apiSignInUrl),r=Date.now(),e&&(n+="disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with previous match for team request")];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data)]}}))}))},n.getPlayers=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,a,s,u,c,d,f,h,p,m=this;return o(this,(function(o){switch(o.label){case 0:if(n=Date.now(),r="There was a problem with football players request",!(t&&t.playerIds&&t.playerIds.length>this.limitIds-1))return[3,5];i=[],a=(0,l.limitIds)(t.playerIds,this.limitIds),s=0,u=a,o.label=1;case 1:return s<u.length?(c=u[s],t.playerIds=c,t.limit=c.length,h="/players".concat(this.apiSignInUrl).concat(t.constructFilterUrl()),e&&(h+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(h,r)]):[3,4];case 2:p=o.sent(),i.push(p.data.map((function(t){return m.playerBasicRemapper.fromResponse(t)}))),o.label=3;case 3:return s++,[3,1];case 4:return d=Array.prototype.concat.apply([],i),(f=new E.default).data=d,[2,f];case 5:return f=new E.default,h="/players".concat(this.apiSignInUrl),t&&(h+="".concat(t.constructFilterUrl())),e&&(h+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(h,r)];case 6:return p=o.sent(),f.meta=this.footballMetaRemapper.remapMetaProp(p.meta),f.data=p.data.map((function(t){return m.playerBasicRemapper.fromResponse(t)})),[2,f]}}))}))},n.getPlayerById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/players/".concat(t).concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with football player by ID request")];case 1:return i=a.sent(),[2,this.playerFullRemapper.fromResponse(i.data)]}}))}))},n.getTopPlayers=function(t){return s(n,void 0,void 0,(function(){var e,n,r=this;return o(this,(function(i){switch(i.label){case 0:return e="/players/top".concat(this.apiSignInUrl),n=Date.now(),t&&(e+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(e,"There was a problem with top football players request")];case 1:return[2,i.sent().data.map((function(t){return r.topPlayerRemapper.fromResponse(t)}))]}}))}))},n.getNextMatchForPlayer=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/players/".concat(t,"/next-match").concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with next match for player request")];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data)]}}))}))},n.getPrevMatchForPlayer=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/players/".concat(t,"/previous-match").concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with previous match for player request")];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data)]}}))}))},n.getMatchById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/matches/".concat(t).concat(this.apiSignInUrl),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with match by ID request")];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data)]}}))}))},n.getMatches=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,d,f,h,p,m,v=this;return o(this,(function(o){switch(o.label){case 0:if(n=new E.default,r="There was a problem with football matches request",!(t&&t.matchIds&&t.matchIds.length>this.limitIds))return[3,5];i=[],s=(0,l.limitIds)(t.matchIds,this.limitIds),u=0,c=s,o.label=1;case 1:return u<c.length?(d=c[u],f=new w.default(a(a({},t),{matchIds:d,limit:d.length})),p="/matches".concat(this.apiSignInUrl).concat(f.constructFilterUrl(!0),"&limit=").concat(d.length),e&&(p+=(0,l.initDisableCache)()),[4,this.fetchWithoutAuth(p,r)]):[3,4];case 2:m=o.sent(),i.push(m.data.map((function(t){return v.matchBasicRemapper.fromResponse(t)}))),o.label=3;case 3:return u++,[3,1];case 4:return h=Array.prototype.concat.apply([],i),n.meta=this.footballService.setMetaDataBatchRequest(h.length,t.limit||20,t.page||1),n.data=this.footballService.finalizeMatchesDataBatchRequest(h,t),[2,n];case 5:return p="/matches".concat(this.apiSignInUrl),t&&(p+="".concat(t.constructFilterUrl())),e&&(p+=(0,l.initDisableCache)()),[4,this.fetchWithoutAuth(p,r)];case 6:return m=o.sent(),n.meta=this.footballMetaRemapper.remapMetaProp(m.meta),n.data=m.data.map((function(t){return v.matchBasicRemapper.fromResponse(t)})),[2,n]}}))}))},n.search=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return o(this,(function(a){switch(a.label){case 0:return n="/search".concat(this.apiSignInUrl).concat(t.constructFilterUrl()),r=Date.now(),e&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem with football search request")];case 1:return i=a.sent(),[2,this.searchRemapper.fromResponse(i.data)]}}))}))},n.getPlayersPoints=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,a;return o(this,(function(s){switch(s.label){case 0:return n="/players/points/".concat(t).concat(this.apiSignInUrl),i=Date.now(),e&&(n+="&position=".concat(e.toLocaleLowerCase())),r&&(n+="&disable_cache=".concat(i)),[4,this.fetchWithoutAuth(n,"There was a problem with players points request")];case 1:return a=s.sent(),[2,this.fantasyRemapper.remapPlayersPoints(a)]}}))}))},n.getPlayerDetailedStatistics=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,a;return o(this,(function(s){switch(s.label){case 0:return n="/players/".concat(e,"/points/").concat(t).concat(this.apiSignInUrl),i=Date.now(),r&&(n+="&disable_cache=".concat(i)),[4,this.fetchWithoutAuth(n,"There was a problem with detailed player points request")];case 1:return a=s.sent(),[2,this.fantasyRemapper.remapPlayerDetailedStats(a)]}}))}))},n.apiSignInUrl="en"!==e.lang?n.apiSignInUrl+"&lang=".concat(e.lang):n.apiSignInUrl,n.countryRemapper=new c.default,n.competitionBasicRemapper=new d.default,n.competitionFullRemapper=new f.default,n.teamBasicRemapper=new h.default,n.teamFullRemapper=new p.default,n.matchBasicRemapper=new m.default,n.matchFullRemapper=new v.default,n.playerBasicRemapper=new y.default,n.playerFullRemapper=new g.default,n.topPlayerRemapper=new _.default,n.searchRemapper=new b.default,n.footballMetaRemapper=new I.default,n.footballService=new O.default(e),n.fantasyRemapper=new P.default,n}return i(e,t),e}(M.default);e.default=T},47724:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=s(n(96245)),u=n(4021),l=n(94904),c=n(5318),d=s(n(48712)),f=s(n(62535));e.default=function(t,e){var n=this;this.baseUrl=null,this.apiSignInUrl=null,this.jwtToken=null,this.idSchema=null,this.retryRequest=!1,this.headers=null,this.authHeaders=null,this.errorHandlingMode=null,this.configuration=null,this.getJwtToken=function(){var t;if(n.configuration.cookieToken){var e=("undefined"==typeof document?(n.configuration.cookieToken.requestHeaders.get("cookie")||"").split(";"):document.cookie.split(";")).find((function(t){return t.trim().startsWith("".concat(n.configuration.cookieToken.name,"="))}));if(!e)return"";var r=e.split("=")[1].trim(),i=decodeURIComponent(r);try{var a=JSON.parse(i);return a.token||a||""}catch(t){return i}}return(null===(t=n.configuration.authProvider)||void 0===t?void 0:t.getIdToken())||""},this.getAuthHeaders=function(){return{"Content-Type":"application/json",Authorization:"Bearer ".concat(n.getJwtToken())}},this.fetchWithoutAuth=function(t,e,r,s){return i(n,void 0,void 0,(function(){var n,i,o;return a(this,(function(a){switch(a.label){case 0:return n=null,s?[4,fetch(this.baseUrl+t,{headers:this.headers,method:r||"GET",body:JSON.stringify(s)})]:[3,2];case 1:return n=a.sent(),[3,4];case 2:return[4,fetch(this.baseUrl+t,{headers:this.headers,method:r||"GET"})];case 3:n=a.sent(),a.label=4;case 4:return[4,n.json()];case 5:if(i=a.sent(),!n.ok)throw o=this.transformFetchException(n,i),console.warn(e,o),o;return[2,i]}}))}))},this.fetchWithoutAuthAdditionalHeaders=function(t,e,s){return i(n,void 0,void 0,(function(){var n,i,o;return a(this,(function(a){switch(a.label){case 0:return[4,fetch(this.baseUrl+t,{headers:r(r({},this.headers),s)})];case 1:return[4,(n=a.sent()).json()];case 2:if(i=a.sent(),!n.ok)throw o=this.transformFetchException(n,i),console.warn(e,o),o;return[2,i]}}))}))},this.fetchWithAuth=function(t,e,r,s){return i(n,void 0,void 0,(function(){var n,i,o,u,l,c;return a(this,(function(a){switch(a.label){case 0:return this.validateJWTToken(),n=null,i=null,r&&s?[4,fetch(this.baseUrl+t,{method:r,headers:this.getAuthHeaders(),body:JSON.stringify(s)})]:[3,2];case 1:return n=a.sent(),[3,6];case 2:return!r||s?[3,4]:[4,fetch(this.baseUrl+t,{method:r,headers:this.getAuthHeaders()})];case 3:return n=a.sent(),[3,6];case 4:return[4,fetch(this.baseUrl+t,{headers:this.getAuthHeaders()})];case 5:n=a.sent(),a.label=6;case 6:return"DELETE"===r?[3,8]:[4,n.json()];case 7:i=a.sent(),a.label=8;case 8:return n.ok?[3,14]:401!==n.status&&403!==n.status||this.retryRequest?[3,10]:(this.retryRequest=!0,[4,this.fetchWithAuth(t,e,r,s)]);case 9:a.sent(),a.label=10;case 10:return this.retryRequest=!1,u=this.transformFetchException,l=[n],i?(c=i,[3,13]):[3,11];case 11:return[4,n.json()];case 12:c=a.sent(),a.label=13;case 13:throw o=u.apply(this,l.concat([c])),console.warn(e,o),o;case 14:return this.retryRequest=!1,[2,i]}}))}))},this.fetchWithAuthNewBaseURL=function(t,e,r,s,o){return i(n,void 0,void 0,(function(){var n,i,u,l,c,d;return a(this,(function(a){switch(a.label){case 0:return this.validateJWTToken(),n=null,i=null,s&&o?[4,fetch(t+e,{method:s,headers:this.getAuthHeaders(),body:JSON.stringify(o)})]:[3,2];case 1:return n=a.sent(),[3,6];case 2:return!s||o?[3,4]:[4,fetch(t+e,{method:s,headers:this.getAuthHeaders()})];case 3:return n=a.sent(),[3,6];case 4:return[4,fetch(t+e,{headers:this.getAuthHeaders()})];case 5:n=a.sent(),a.label=6;case 6:return"DELETE"===s?[3,8]:[4,n.json()];case 7:i=a.sent(),a.label=8;case 8:return n.ok?[3,14]:401!==n.status&&403!==n.status||this.retryRequest?[3,10]:(this.retryRequest=!0,[4,this.fetchWithAuthNewBaseURL(t,e,r,s,o)]);case 9:a.sent(),a.label=10;case 10:return this.retryRequest=!1,l=this.transformFetchException,c=[n],i?(d=i,[3,13]):[3,11];case 11:return[4,n.json()];case 12:d=a.sent(),a.label=13;case 13:throw u=l.apply(this,c.concat([d])),console.warn(r,u),u;case 14:return this.retryRequest=!1,[2,i]}}))}))},this.transformFetchException=function(t,e){if(!e&&t.status===u.ErrorCodes.UNAUTHORIZED){if("standard"===n.errorHandlingMode)return new f.default(u.ErrorCodes.UNAUTHORIZED,l.ErrorStatuses.UNAUTHORIZED,c.ErrorMessages.INVALID_TOKEN);var r={code:u.ErrorCodes.UNAUTHORIZED,status:l.ErrorStatuses.UNAUTHORIZED,message:c.ErrorMessages.INVALID_TOKEN};return new d.default(t,r)}var i=e.error,a=i.code,s=i.status,o=i.message;return"standard"===n.errorHandlingMode?new f.default(a,s,o):new d.default(t,e.error)},this.validateJWTToken=function(){var t=null;try{t=(0,o.default)(n.getJwtToken())}catch(t){if("default"===n.errorHandlingMode){var e={status:u.ErrorCodes.UNAUTHORIZED,statusText:t.message,headers:{}},r={code:u.ErrorCodes.UNAUTHORIZED,status:l.ErrorStatuses.INVALID_TOKEN,message:c.ErrorMessages.INVALID_TOKEN};throw new d.default(e,r)}if("standard"===n.errorHandlingMode)throw new f.default(u.ErrorCodes.UNAUTHORIZED,l.ErrorStatuses.INVALID_TOKEN,c.ErrorMessages.INVALID_TOKEN)}if(Date.now()>1e3*t.exp){if("default"===n.errorHandlingMode)throw e={status:u.ErrorCodes.UNAUTHORIZED,statusText:"",headers:{}},r={code:u.ErrorCodes.UNAUTHORIZED,status:l.ErrorStatuses.INVALID_TOKEN,message:c.ErrorMessages.EXPIRED_TOKEN},new d.default(e,r);if("standard"===n.errorHandlingMode)throw new f.default(u.ErrorCodes.UNAUTHORIZED,l.ErrorStatuses.INVALID_TOKEN,c.ErrorMessages.EXPIRED_TOKEN)}},this.extractUserIdFromToken=function(){try{var t=(0,o.default)(n.getJwtToken());return(null==t?void 0:t.sub)||""}catch(t){return console.error(t),""}},this.baseUrl=e,this.configuration=t,this.apiSignInUrl="?key=".concat(t.apiKey,"&client_id=").concat(t.clientId),this.errorHandlingMode=t.errorHandlingMode,this.idSchema=t.idSchema,this.headers={"Content-Type":"application/json"}}},8539:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(90712),c=u(n(47724)),d={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"},f=function(t){function e(e){var n=t.call(this,e,(0,l.setBaseUrl)(e.environment,"idMapping"))||this;return n.getEntityById=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/football".concat(this.apiSignInUrl,"&input_provider=").concat(this.idSchema,"&").concat(d[t],"=").concat(e),r="There was a problem with id mapping request for the following id: ".concat(e),[4,this.fetchWithoutAuth(n,r)];case 1:return[2,i.sent()]}}))}))},n.getEntityByIdAndSchema=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/football".concat(this.apiSignInUrl,"&input_provider=").concat(r,"&").concat(d[t],"=").concat(e),i="There was a problem with id mapping request for the following id: ".concat(e),[4,this.fetchWithoutAuth(n,i)];case 1:return[2,a.sent()]}}))}))},n.getEntityIdsByIdsAndSchema=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/football".concat(this.apiSignInUrl,"&input_provider=").concat(r,"&").concat(d[t],"=").concat(e.join(",")),i="There was a problem with id mapping request for the following ids: ".concat(e.join(",")),[4,this.fetchWithoutAuth(n,i)];case 1:return[2,a.sent()]}}))}))},n.getEntitiesByIds=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,u,c,f,h,p;return s(this,(function(s){switch(s.label){case 0:e.sort((function(t,e){return t.localeCompare(e)})),n=(0,l.requestChunkBuild)(e),i=[],a=0,u=n,s.label=1;case 1:return a<u.length?(c=u[a],f="/football".concat(this.apiSignInUrl,"&input_provider=").concat(r,"&").concat(d[t],"=").concat(c.join(",")),h="There was a problem with id mapping request for the following ids :".concat(c.join(",")),[4,this.fetchWithoutAuth(f,h)]):[3,4];case 2:p=s.sent(),i=o(o([],i,!0),p.data,!0),s.label=3;case 3:return a++,[3,1];case 4:return[2,i]}}))}))},n.getEntitiesByIdObjs=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o,u,c,f,h,p;return s(this,(function(m){switch(m.label){case 0:n=[],r={},i=[],Object.keys(t).forEach((function(e){n.push.apply(n,t[e])})),a=(0,l.transformIdsToBeUnique)(n),o=(0,l.requestChunkBuild)(a),u=function(n){var a,o,u;return s(this,(function(s){switch(s.label){case 0:return a="",Object.keys(t).forEach((function(e){r[e]=[];var i=n.filter((function(n){return t[e].includes(n)}));i&&i.length>0&&(r[e]=i)})),Object.keys(r).forEach((function(t){r[t].length>0&&(r[t].sort((function(t,e){return t.localeCompare(e)})),a+="&",a+="".concat(d[t],"=").concat(r[t].join(",")))})),a&&a.length>0?(o="/football".concat(c.apiSignInUrl,"&input_provider=").concat(e||"native").concat(a),[4,c.fetchWithoutAuth(o,"There was a problem with id mapping request")]):[3,2];case 1:return u=s.sent(),i.push(u.data),[3,3];case 2:i.push([]),s.label=3;case 3:return[2]}}))},c=this,f=0,h=o,m.label=1;case 1:return f<h.length?(p=h[f],[5,u(p)]):[3,4];case 2:m.sent(),m.label=3;case 3:return f++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)]}}))}))},n.getTopEntities=function(){return a(n,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/football/top".concat(this.apiSignInUrl),[4,this.fetchWithoutAuth(t,"There was a problem with top id mappings request")];case 1:return[2,e.sent().data]}}))}))},n}return i(e,t),e}(c.default);e.default=f},87059:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(87419)),c=o(n(64533)),d=o(n(18899)),f=o(n(7746)),h=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"loyalty"))||this;return n.templateRemapper=null,n.leaderboardRemapper=null,n.rankingsRemapper=null,n.highestSuccessRateRemapper=null,n.getTemplates=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=t?"/leaderboard/templates/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()):"/leaderboard/templates/".concat(this.apiSignInUrl),n+=(0,u.isDisabledCache)(e)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem fetching the list of templates")];case 1:return r=a.sent(),(i=JSON.parse(JSON.stringify(r))).meta=this.templateRemapper.remapMeta(r.meta),i.data=this.templateRemapper.remapResponse(r.data),[2,i]}}))}))},n.getTemplateById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,u.isDisabledCache)(e)?"/leaderboard/templates/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/leaderboard/templates/".concat(t).concat(this.apiSignInUrl),r="There was a problem requesting the following template: ".concat(t),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.templateRemapper.remapResponseId(i.data)]}}))}))},n.getLeaderboard=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n=(0,u.isDisabledCache)(e)?"/leaderboard/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/leaderboard/".concat(t).concat(this.apiSignInUrl),i="There was a problem fetching the leaderboard for the following template: ".concat(t),r&&(n+="".concat(r.constructFiltersUrl())),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),o=JSON.parse(JSON.stringify(a)),[2,this.leaderboardRemapper.remapResponse(o)]}}))}))},n.getLeaderboardForGame=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n=(0,u.isDisabledCache)(e)?"/leaderboard/games/".concat(t).concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/leaderboard/games/".concat(t).concat(this.apiSignInUrl),i="There was a problem fetching the leaderboard for the following game: ".concat(t),r&&(n+="".concat(r.constructFiltersUrl())),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),o=JSON.parse(JSON.stringify(a)),[2,this.leaderboardRemapper.remapResponse(o)]}}))}))},n.getLeaderboardForLeague=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/private-league/".concat(t).concat(this.apiSignInUrl),r="There was a problem fetching the leaderboard for the following league: ".concat(t),e&&(n+="".concat(e.constructFiltersUrl())),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.leaderboardRemapper.remapLeagueLeaderboardResponse(i)]}}))}))},n.getUserRankings=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/leaderboard/users/".concat(t,"/rankings").concat(this.apiSignInUrl),i="There was a problem fetching the rankings for the following user: ".concat(t),e&&(n+="".concat(e.constructFiltersUrl())),(0,u.isDisabledCache)(r)&&(n+="".concat((0,u.initDisableCache)())),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.rankingsRemapper.remapRankings(a)]}}))}))},n.getHighestSuccessRate=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/statistics/top".concat(this.apiSignInUrl),t&&(n+="".concat(t.constructFiltersUrl())),(0,u.isDisabledCache)(e)&&(n+="".concat((0,u.initDisableCache)())),[4,this.fetchWithoutAuth(n,"There was a problem fetching highest success rate")];case 1:return r=i.sent(),[2,this.highestSuccessRateRemapper.remapHighestSuccessRate(r.data)]}}))}))},n.getEntitiesFollows=function(t,e){return a(n,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return n=(0,u.isDisabledCache)(e)?"/statistics/follows".concat(this.apiSignInUrl).concat((0,u.initDisableCache)()):"/statistics/follows".concat(this.apiSignInUrl),t.footballCompetitions&&(n+="&competitions=".concat(t.footballCompetitions.join(","))),t.footballTeams&&(n+="&teams=".concat(t.footballTeams.join(","))),t.footballPlayers&&(n+="&players=".concat(t.footballPlayers.join(","))),[4,this.fetchWithoutAuth(n,"There was a problem fetching follows for entities")];case 1:return[2,r.sent().data]}}))}))},n.getUserRankingsForPrivateLeagueAndChallenges=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/private-league/users/".concat(t,"/rankings").concat(this.apiSignInUrl,"&private_league_type=").concat("PRIVATE_LEAGUE"===e?"private":"one_vs_one"),i="There was a problem fetching user rankings for ".concat(e),r&&(n+="".concat(r.constructFiltersUrl())),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,"PRIVATE_LEAGUE"===e?this.rankingsRemapper.remapRankingsPrivateLeague(a):this.rankingsRemapper.remapRankingsChallenge(a)]}}))}))},n.getTemplateBreakdownPoints=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="/leaderboard/".concat(t,"/breakdown").concat(this.apiSignInUrl),n="There was a problem fetching template breakdown points for: ".concat(t),[4,this.fetchWithoutAuth(e,n)];case 1:return r=i.sent(),[2,this.leaderboardRemapper.remapTemplateBreakdown(r)]}}))}))},n.templateRemapper=new d.default,n.leaderboardRemapper=new l.default,n.rankingsRemapper=new c.default,n.highestSuccessRateRemapper=new f.default,n}return i(e,t),e}(o(n(47724)).default);e.default=h},13022:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(72239)),c=o(n(47724)),d=o(n(44688)),f=o(n(95783)),h=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"miniGames"))||this;return n.classicQuizRemapper=null,n.eitherOrRemapper=null,n.personalityQuizRemapper=null,n.getClassicQuizzes=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/classic-quizzes".concat(this.apiSignInUrl),t&&(n+=t.constructMainFiltersUrl()),n+=(0,u.isDisabledCache)(e)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem with fetching classic quizzes")];case 1:return r=i.sent(),[2,this.classicQuizRemapper.remapClassicQuizzes(r)]}}))}))},n.getClassicQuizById=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/classic-quizzes/".concat(t).concat(this.apiSignInUrl),e&&(n+="&include_correct_options=".concat(e)),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching classic quiz by ID")];case 1:return i=a.sent(),[2,this.classicQuizRemapper.remapClassicQuizById(i.data)]}}))}))},n.participateInClassicQuiz=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/classic-quizzes/".concat(t,"/participate").concat(this.apiSignInUrl),i="There was a problem with participating in the following classic quiz: ".concat(t),a={questions:this.classicQuizRemapper.remapClassicQuizParticipationBody(e),include_correct_options:!!r},[4,this.fetchWithAuth(n,i,"POST",a)];case 1:return o=s.sent(),[2,this.classicQuizRemapper.remapClassicQuizParticipation(o.data)]}}))}))},n.getMyClassicQuizParticipations=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/classic-quizzes/participations".concat(this.apiSignInUrl),t&&(e+="".concat(t.constructMainFiltersUrl())),[4,this.fetchWithAuth(e,"There was a problem with fetching user's own Classic Quiz participations")];case 1:return n=r.sent(),[2,this.classicQuizRemapper.remapUserClassicQuizParticipations(n.data)]}}))}))},n.getLeaderboardForClassicQuizzes=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/classic-quizzes/rank".concat(this.apiSignInUrl),t&&(n+="".concat(t.constructMainFiltersUrl())),n+=(0,u.isDisabledCache)(e)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem with fetching classic quizzes leaderboard")];case 1:return r=i.sent(),[2,this.classicQuizRemapper.remapClassicQuizzesLeaderboard(r)]}}))}))},n.getClassicQuizzesUserRanking=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/classic-quizzes/users/".concat(t,"/rank").concat(this.apiSignInUrl),e&&(n+="".concat(e.constructMainFiltersUrl())),n+=(0,u.isDisabledCache)(r)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem with fetching user's rankings for classic quizzes")];case 1:return i=a.sent(),[2,this.classicQuizRemapper.remapClassicQuizUserRankings(i)]}}))}))},n.getClassicQuizQuestionsReport=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="/classic-quizzes/".concat(t,"/questions-report").concat(this.apiSignInUrl),n="There was a problem with fetching questions report for quiz: ".concat(t),[4,this.fetchWithoutAuth(e,n)];case 1:return r=i.sent(),[2,this.classicQuizRemapper.remapClassicQuizQuestionsReport(r.data)]}}))}))},n.getClassicQuizResultsSummary=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/classic-quizzes/".concat(t,"/results-summary").concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching classic quiz results summary")];case 1:return r=i.sent(),[2,this.classicQuizRemapper.remapClassicQuizResultsSummary(r.data)]}}))}))},n.getEitherOrs=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/either-or".concat(this.apiSignInUrl),t&&(n+=t.constructMainFiltersUrl()),n+=(0,u.isDisabledCache)(e)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem with fetching list of Either/Ors")];case 1:return r=i.sent(),[2,this.eitherOrRemapper.remapEitherOrs(r)]}}))}))},n.getEitherOrById=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/either-or/".concat(t).concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching Either/Or by ID")];case 1:return r=i.sent(),[2,this.eitherOrRemapper.remapEitherOrById(r.data)]}}))}))},n.getMyEitherOrStats=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/either-or/".concat(t,"/own-stats").concat(this.apiSignInUrl),[4,this.fetchWithAuth(e,"There was a problem with fetching Either/Or own statistics")];case 1:return n=r.sent(),[2,this.eitherOrRemapper.remapEitherOrOwnStats(n.data)]}}))}))},n.getEitherOrResults=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/either-or/".concat(t,"/results").concat(this.apiSignInUrl).concat((0,u.isDisabledCache)(e)?(0,u.initDisableCache)():""),[4,this.fetchWithoutAuth(n,"There was a problem with fetching Either/Or results")];case 1:return r=i.sent(),[2,this.eitherOrRemapper.remapEitherOrResults(r.data)]}}))}))},n.participateInEitherOr=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/either-or/".concat(t,"/participate").concat(this.apiSignInUrl),[4,this.fetchWithAuth(n,"There was a problem with participating in Either/Or","POST",e)];case 1:return r=i.sent(),[2,this.eitherOrRemapper.remapEitherOrParticipation(r.data)]}}))}))},n.getPersonalityQuizzes=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/personality-quizzes".concat(this.apiSignInUrl),t&&(n+=t.constructMainFiltersUrl()),n+=(0,u.isDisabledCache)(e)?(0,u.initDisableCache)():"",[4,this.fetchWithoutAuth(n,"There was a problem with fetching personality quizzes")];case 1:return r=i.sent(),[2,this.personalityQuizRemapper.remapPersonalityQuizzes(r)]}}))}))},n.getPersonalityQuizById=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/personality-quizzes/".concat(t).concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching personality quiz by ID")];case 1:return r=i.sent(),[2,this.personalityQuizRemapper.remapPersonalityQuizById(r.data)]}}))}))},n.participateInPersonalityQuiz=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/personality-quizzes/".concat(t,"/participate").concat(this.apiSignInUrl),r="There was a problem with participating in the following personality quiz: ".concat(t),i={questions:this.personalityQuizRemapper.remapPersonalityQuizParticipationBody(e)},[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return a=s.sent(),[2,this.personalityQuizRemapper.remapPersonalityQuizParticipation(a.data)]}}))}))},n.getPersonalityQuizUserParticipation=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i;return s(this,(function(a){switch(a.label){case 0:return n="/personality-quizzes/".concat(t,"/participations/").concat(e).concat(this.apiSignInUrl),(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem with fetching user personality quiz participation")];case 1:return i=a.sent(),[2,this.personalityQuizRemapper.remapPersonalityQuizParticipation(i.data)]}}))}))},n.classicQuizRemapper=new l.default,n.eitherOrRemapper=new d.default,n.personalityQuizRemapper=new f.default,n}return i(e,t),e}(c.default);e.default=h},52793:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=o(n(82726)),l=o(n(79679)),c=n(90712),d=o(n(4780)),f=o(n(88900)),h=o(n(81553)),p=o(n(53623)),m=function(t){function e(e){var n=t.call(this,e,(0,c.setBaseUrl)(e.environment,"predictor"))||this;return n.predictionRemapper=null,n.matchSummaryRemapper=null,n.gamesRemapper=null,n.metaRemapper=null,n.idMapping=null,n.makeFootballPrediction=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/predictions".concat(this.apiSignInUrl),[4,this.fetchWithAuth(e,"There was a problem making POST request","POST",this.predictionRemapper.remapRequestBody(t))];case 1:return n=r.sent(),[4,this.predictionRemapper.remapResponseObjBody(n)];case 2:return[2,r.sent()]}}))}))},n.getMatchSummary=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,c.isDisabledCache)(e)?"/predictions/summary/".concat(t).concat(this.apiSignInUrl).concat((0,c.initDisableCache)()):"/predictions/summary/".concat(t).concat(this.apiSignInUrl),r="There was a problem fetching predictions for match: ".concat(t),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.matchSummaryRemapper.remapResponse(i)]}}))}))},n.deleteFootballPrediction=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/predictions/".concat(t).concat(this.apiSignInUrl),n="There was a problem deleting your prediction: ".concat(t),[4,this.fetchWithAuth(e,n,"DELETE")];case 1:return r.sent(),[2,!0]}}))}))},n.getMyPredictions=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(a){switch(a.label){case 0:return e=new h.default,n="/predictions".concat(this.apiSignInUrl),t&&(n+="".concat(t.constructFiltersUrl())),[4,this.fetchWithAuth(n,"There was a problem fetching own predictions")];case 1:return r=a.sent(),e.meta=this.metaRemapper.remapMetaData(r.meta),i=e,[4,this.predictionRemapper.remapResponseArrayBody(r.data)];case 2:return i.data=a.sent(),[2,e]}}))}))},n.getMyPredictionsNoRemap=function(t){return a(n,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/predictions".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()),[4,this.fetchWithAuth(e,"There was a problem fetching own predictions")];case 1:return[2,n.sent()]}}))}))},n.getUserPredictions=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o,u;return s(this,(function(s){switch(s.label){case 0:return n=new h.default,i=(0,c.isDisabledCache)(e)?"/predictions/users/".concat(t).concat(this.apiSignInUrl).concat((0,c.initDisableCache)()):"/predictions/users/".concat(t).concat(this.apiSignInUrl),a="There was a problem fetching predictions for user: ".concat(t),r&&(i+="".concat(r.constructFiltersUrl())),[4,this.fetchWithoutAuth(i,a)];case 1:return o=s.sent(),n.meta=this.metaRemapper.remapMetaData(o.meta),u=n,[4,this.predictionRemapper.remapResponseArrayBody(o.data)];case 2:return u.data=s.sent(),[2,n]}}))}))},n.getUserPredictionsNoRemap=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/predictions/users/".concat(t).concat(this.apiSignInUrl).concat(e.constructFiltersUrl()),r="There was a problem fetching predictions for user: ".concat(t),[4,this.fetchWithoutAuth(n,r)];case 1:return[2,i.sent()]}}))}))},n.getGames=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n=(0,c.isDisabledCache)(e)?"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()).concat((0,c.initDisableCache)()):"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()),[4,this.fetchWithoutAuth(n,"There was a problem fetching the games list")];case 1:return r=i.sent(),[2,this.gamesRemapper.remapPaginatedGames(r)]}}))}))},n.getGamesNoRemap=function(t,e){return a(n,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return n=(0,c.isDisabledCache)(e)?"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()).concat((0,c.initDisableCache)()):"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()),[4,this.fetchWithoutAuth(n,"There was a problem fetching the games list")];case 1:return[2,r.sent()]}}))}))},n.getGameById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n=(0,c.isDisabledCache)(e)?"/games/".concat(t).concat(this.apiSignInUrl).concat((0,c.initDisableCache)()):"/games/".concat(t).concat(this.apiSignInUrl),r="There was a problem fetching the following game: ".concat(t),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapGameByIdResponse(i)]}}))}))},n.getGamePredictions=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o,u;return s(this,(function(s){switch(s.label){case 0:return n=new h.default,i=(0,c.isDisabledCache)(e)?"/games/".concat(t,"/predictions").concat(this.apiSignInUrl).concat((0,c.initDisableCache)()):"/games/".concat(t,"/predictions").concat(this.apiSignInUrl),a="There was a problem fetching the predictions for game: ".concat(t),r&&(i+="".concat(r.constructFiltersUrl())),[4,this.fetchWithoutAuth(i,a)];case 1:return o=s.sent(),n.meta=this.metaRemapper.remapMetaData(o.meta),u=n,[4,this.predictionRemapper.remapResponseArrayBody(o.data)];case 2:return u.data=s.sent(),[2,n]}}))}))},n.getUserGameEditions=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a=this;return s(this,(function(s){switch(s.label){case 0:return n=null,r=(0,c.isDisabledCache)(e)?"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()).concat((0,c.initDisableCache)()):"/games/".concat(this.apiSignInUrl).concat(t.constructFiltersUrl()),[4,this.fetchWithoutAuth(r,"There was a problem fetching the games list")];case 1:return(i=s.sent()).data.forEach((function(t){"TOP_X"===t.type?n=a.gamesRemapper.remapPaginatedUserTopXEditions(i):"MATCH_QUIZ"===t.type&&(n=a.gamesRemapper.remapPaginatedUserMathQuizEditions(i))})),[2,n]}}))}))},n.getGameResults=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n=(0,c.isDisabledCache)(e)?"/games/".concat(t,"/results/").concat(this.apiSignInUrl).concat((0,c.initDisableCache)()):"/games/".concat(t,"/results/").concat(this.apiSignInUrl),i="There was a problem fetching the results for the following game: ".concat(t),r&&(n+="".concat(r.constructMainFiltersUrl())),[4,this.fetchWithoutAuth(n,i)];case 1:return a=s.sent(),[2,this.gamesRemapper.remapPaginatedGameResults(a)]}}))}))},n.getMarketResultsForGame=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/games/".concat(t,"/correct-results/").concat(this.apiSignInUrl),r="There was a problem fetching the markets correct results for the following game: ".concat(t),(0,c.isDisabledCache)(e)&&(n+="".concat((0,c.initDisableCache)())),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapGameMarketsResults(i.data)]}}))}))},n.getContestWinners=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/winners/".concat(this.apiSignInUrl,"&contest_id=").concat(t),r="There was a problem fetching winners for the following game: ".concat(t),e&&(n+=(0,c.initDisableCache)()),[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapContestWinners(i)]}}))}))},n.getPredictionById=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="/predictions/".concat(t).concat(this.apiSignInUrl),n="There was a problem fetching info for the following prediction: ".concat(t),[4,this.fetchWithoutAuth(e,n)];case 1:return r=i.sent(),[4,this.predictionRemapper.remapResponseArrayBody([r.data])];case 2:return[2,i.sent()[0]]}}))}))},n.getPredictionsByIds=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/predictions/by-ids".concat(this.apiSignInUrl,"&prediction_ids=").concat(t.join(",")),[4,this.fetchWithoutAuth(e,"There was a problem fetching predictions")];case 1:return n=r.sent(),[4,this.predictionRemapper.remapResponseArrayBody(n.data)];case 2:return[2,r.sent()]}}))}))},n.idMapping=new f.default(e),n.predictionRemapper=new u.default(e,n.idMapping),n.matchSummaryRemapper=new l.default(e,n.idMapping),n.gamesRemapper=new d.default,n.metaRemapper=new p.default,n}return i(e,t),e}(o(n(47724)).default);e.default=m},48863:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(84239)),c=o(n(47724)),d=o(n(43476)),f=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"privateLeagues"))||this;return n.remapper=null,n.discussionsRemapper=null,n.discussionsBaseURL=null,n.create=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/leagues"+this.apiSignInUrl,r="There was a problem ".concat("PRIVATE_LEAGUE"===e?"creating private league":"issuing challenge"),[4,this.fetchWithAuth(n,r,"POST",t)];case 1:return i=a.sent(),[2,this.remapper.remapToPrivateLeagueById(i.data)]}}))}))},n.update=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/leagues/".concat(t)+this.apiSignInUrl,i="There was a problem updating ".concat("PRIVATE_LEAGUE"===r?"private league":"challenge"),[4,this.fetchWithAuth(n,i,"PUT",e)];case 1:return a=s.sent(),[2,this.remapper.remapToPrivateLeagueById(a.data)]}}))}))},n.updateLeagueTemplate=function(t,e,r,i){return a(n,void 0,void 0,(function(){var n,a,o,u;return s(this,(function(s){switch(s.label){case 0:return n="/leagues/".concat(t,"/template")+this.apiSignInUrl,a="There was a problem updating template for the ".concat("PRIVATE_LEAGUE"===i?"private league":"challenge"),o={new_template_id:e,past_template_name:r},[4,this.fetchWithAuth(n,a,"POST",o)];case 1:return u=s.sent(),[2,this.remapper.remapToPrivateLeagueById(u.data)]}}))}))},n.getById=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/leagues/".concat(t)+this.apiSignInUrl,(0,u.isDisabledCache)(r)&&(n+=(0,u.initDisableCache)()),i="There was a problem getting ".concat("PRIVATE_LEAGUE"===e?"private league":"challenge"),[4,this.fetchWithAuth(n,i)];case 1:return a=s.sent(),[2,this.remapper.remapToPrivateLeagueById(a.data)]}}))}))},n.getMyLeagues=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i=this;return s(this,(function(a){switch(a.label){case 0:return n="/leagues"+this.apiSignInUrl+t.constructFiltersUrl(),r="There was a problem getting user's ".concat("PRIVATE_LEAGUE"===e?"private leagues":"challenges"),[4,this.fetchWithAuth(n,r)];case 1:return[2,a.sent().data.map((function(t){return i.remapper.remapToMyPrivateLeagues(t)}))]}}))}))},n.delete=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/leagues/".concat(t)+this.apiSignInUrl,r="There was a problem deleting ".concat("PRIVATE_LEAGUE"===e?"private league":"challenge"),[4,this.fetchWithAuth(n,r,"DELETE")];case 1:return i.sent(),[2,!0]}}))}))},n.invite=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/membership/invite/".concat(t)+this.apiSignInUrl,r="There was a problem inviting the following users: ".concat(e.join(",")),i={profiles:e},[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return[2,a.sent().data]}}))}))},n.deleteInvitation=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/membership/invite/".concat(t)+this.apiSignInUrl,r="There was a problem deleting invitation for the following users: ".concat(e.join(",")),i={profiles:e},[4,this.fetchWithAuth(n,r,"DELETE",i)];case 1:return a.sent(),[2,!0]}}))}))},n.accept=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="/membership/accept/".concat(t)+this.apiSignInUrl+"&accept=".concat(e?"ACCEPT":"REJECT"),i="PRIVATE_LEAGUE"===r?"private league":"challenge",a="There was a problem ".concat(e?"accepting":"rejecting"," invitation for ").concat(i,": ").concat(t),[4,this.fetchWithAuth(n,a,"POST")];case 1:return o=s.sent(),[2,"PRIVATE_LEAGUE"===r?this.remapper.remapToAcceptPrivateLeague(o.data):this.remapper.remapToAcceptChallenge(o.data)]}}))}))},n.ban=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/membership/ban/".concat(t)+this.apiSignInUrl,r="There was a problem banning the following users: ".concat(e.join(",")),i={profiles:e},[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return[2,a.sent().data]}}))}))},n.unban=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/membership/unban/".concat(t)+this.apiSignInUrl,r="There was a problem unbanning the following users: ".concat(e.join(",")),i={profiles:e},[4,this.fetchWithAuth(n,r,"POST",i)];case 1:return[2,a.sent().data]}}))}))},n.join=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/membership/join"+this.apiSignInUrl+"&invitation_code=".concat(t),[4,this.fetchWithAuth(e,"There was a problem joining league","POST")];case 1:return n=r.sent(),[2,this.remapper.remapToAcceptPrivateLeague(n.data)]}}))}))},n.leave=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/membership/leave/".concat(t)+this.apiSignInUrl,r="There was a problem leaving the following ".concat("PRIVATE_LEAGUE"===e?"league":"challenge",": ").concat(t),[4,this.fetchWithAuth(n,r,"POST")];case 1:return[2,i.sent().data]}}))}))},n.getInvitations=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/membership/invitations"+this.apiSignInUrl+e.constructMainFiltersUrl(),r="There was a problem getting invitations for ".concat("PRIVATE_LEAGUE"===t?"leagues":"challenges"),[4,this.fetchWithAuth(n,r)];case 1:return i=a.sent(),[2,this.remapper.remapToPrivateLeagues(i)]}}))}))},n.getReportedPosts=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/discussions/".concat(t,"/posts/reported").concat(this.apiSignInUrl),r="There was a problem fetching posts for the following: ".concat(t),e&&(n+=e.constructMainFiltersUrl()),[4,this.fetchWithAuthNewBaseURL(this.discussionsBaseURL,n,r)];case 1:return i=a.sent(),[2,this.discussionsRemapper.remapToPostsForDiscussion(i,"full")]}}))}))},n.getPredictions=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/leagues/".concat(t,"/predictions")+this.apiSignInUrl,r="There was a problem getting predictions for private league: ".concat(t),e&&(n+=e.constructFiltersUrl()),[4,this.fetchWithAuth(n,r)];case 1:return i=a.sent(),[2,this.remapper.remapPredictions(i)]}}))}))},n.moderatePost=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/posts/".concat(t,"/admin/moderate").concat(this.apiSignInUrl),r="There was a problem moderating the following post: ".concat(t),i={moderation_reason:e},[4,this.fetchWithAuthNewBaseURL(this.discussionsBaseURL,n,r,"POST",i)];case 1:return a=s.sent(),[2,this.discussionsRemapper.remapToPostByIdBasic(a.data)]}}))}))},n.discussionsBaseURL=(0,u.setBaseUrl)(e.environment,"discussions"),n.remapper=new l.default,n.discussionsRemapper=new d.default,n}return i(e,t),e}(c.default);e.default=f},84275:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(441)),c=o(n(38673)),d=o(n(66277)),f=o(n(41712)),h=o(n(47724)),p=o(n(97627)),m="/profile",v="/profiles",_=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"profile"))||this;return n.profileRemapper=null,n.followingRemapper=null,n.followersRemapper=null,n.leadRemapper=null,n.lang=null,n.limitIds=100,n.getCountries=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="&lang=".concat(this.lang),n="".concat("/countries").concat(this.apiSignInUrl).concat(e),r=Date.now(),t&&(n+="&disable_cache=".concat(r)),[4,this.fetchWithoutAuth(n,"There was a problem fetching profile countries")];case 1:return[2,i.sent().data]}}))}))},n.getProfile=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="".concat(m).concat(this.apiSignInUrl),n="",t?(e="".concat(v,"/").concat(t).concat(this.apiSignInUrl),n="There was a problem fetching the following profile: ".concat(t),[4,this.fetchWithoutAuth(e,n)]):[3,2];case 1:return r=i.sent(),[2,this.profileRemapper.publicProfileFromResponse(r.data)];case 2:return n="There was a problem fetching your profile from API",[4,this.fetchWithAuth(e,n)];case 3:return r=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data)]}}))}))},n.getProfiles=function(t,e,r){return a(n,void 0,void 0,(function(){var n,i,a,o,l,c,d,f,h,p,m,_,y;return s(this,(function(s){switch(s.label){case 0:if(n=Date.now(),i="There was a problem fetching the following profiles: ".concat(t.join(",")),!t||!t.length)return[3,7];if(!(t.length>this.limitIds))return[3,5];a=[],o=(0,u.limitIds)(t,this.limitIds),l=0,c=o,s.label=1;case 1:return l<c.length?(d=c[l],f="".concat(v).concat(this.apiSignInUrl,"&profile_ids=").concat(d.join(",")),i="There was a problem fetching the following profiles: ".concat(d.join(",")),r&&(f+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(f,i)]):[3,4];case 2:h=s.sent(),a.push.apply(a,this.profileRemapper.profilesFromResponse(h.data)),s.label=3;case 3:return l++,[3,1];case 4:return[2,a];case 5:return p="".concat(v).concat(this.apiSignInUrl,"&profile_ids=").concat(t.join(",")),r&&(p+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(p,i)];case 6:return m=s.sent(),[2,this.profileRemapper.profilesFromResponse(m.data)];case 7:return _="".concat(v).concat(this.apiSignInUrl,"&search=").concat(e),r&&(_+="&disable_cache=".concat(n)),[4,this.fetchWithoutAuth(_,i)];case 8:return y=s.sent(),[2,this.profileRemapper.profilesFromResponse(y.data)]}}))}))},n.getFollowers=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="".concat(m,"/followers").concat(this.apiSignInUrl),r="There was a problem fetching the followers for own profile",!t||e?[3,2]:(n="".concat(m,"/followers").concat(this.apiSignInUrl).concat(t.constructFilterUrl()),[4,this.fetchWithAuth(n,r)]);case 1:return i=s.sent(),[2,this.followersRemapper.followersFromResponse(i)];case 2:return t||e?[3,4]:[4,this.fetchWithAuth(n,r)];case 3:return a=s.sent(),[2,this.followersRemapper.followersFromResponse(a)];case 4:return t&&e?n="".concat(m,"/").concat(e,"/followers").concat(this.apiSignInUrl).concat(t.constructFilterUrl()):!t&&e&&(n="".concat(m,"/").concat(e,"/followers").concat(this.apiSignInUrl)),r="There was a problem fetching the followers for profile: ".concat(e),[4,this.fetchWithoutAuth(n,r)];case 5:return o=s.sent(),[2,this.followersRemapper.followersFromResponse(o)]}}))}))},n.getFollowing=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return n="".concat(m,"/following").concat(this.apiSignInUrl),r="There was a problem fetching the followers of own profile",!t||e?[3,2]:(n="".concat(m,"/following").concat(this.apiSignInUrl).concat(t.constructFilterUrl()),[4,this.fetchWithAuth(n,r)]);case 1:return i=s.sent(),[2,this.followingRemapper.followingFromResponse(i)];case 2:return t||e?[3,4]:[4,this.fetchWithAuth(n,r)];case 3:return a=s.sent(),[2,this.followingRemapper.followingFromResponse(a)];case 4:return t&&e?n="".concat(m,"/").concat(e,"/following").concat(this.apiSignInUrl).concat(t.constructFilterUrl()):!t&&e&&(n="".concat(m,"/").concat(e,"/following").concat(this.apiSignInUrl)),r="There was a problem fetching the followers of the following profile: ".concat(e),[4,this.fetchWithoutAuth(n,r)];case 5:return o=s.sent(),[2,this.followingRemapper.followingFromResponse(o)]}}))}))},n.follow=function(t){return a(n,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(a){switch(a.label){case 0:return(e=new f.default).profile_ids=t,n=m+"/follow".concat(this.apiSignInUrl),r="There was a problem with following profiles: ".concat(t.join(",")),[4,this.fetchWithAuth(n,r,"POST",e)];case 1:return i=a.sent(),[2,this.followingRemapper.followResponse(i.data)]}}))}))},n.unfollow=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return(e=new f.default).profile_ids=t,n=m+"/follow".concat(this.apiSignInUrl),r="There was a problem with unfollowing profiles: ".concat(t.join(",")),[4,this.fetchWithAuth(n,r,"DELETE",e)];case 1:return i.sent(),[2,!0]}}))}))},n.getBadges=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="".concat(m,"/badges").concat(this.apiSignInUrl),n="There was a problem with fetching own badges",t?(e="".concat(m,"/").concat(t,"/badges").concat(this.apiSignInUrl),n="There was a problem with fetching the badges",[4,this.fetchWithoutAuth(e,n)]):[3,2];case 1:case 3:return[2,r.sent().data];case 2:return[4,this.fetchWithAuth(e,n)]}}))}))},n.updateProfile=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=m+this.apiSignInUrl,[4,this.fetchWithAuth(e,"There was a problem updating the own profile","PATCH",t)];case 1:return n=r.sent(),[2,this.profileRemapper.fullProfileFromResponse(n.data)]}}))}))},n.collectLead=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/leads".concat(this.apiSignInUrl),[4,this.fetchWithAuth(e,"There was a problem collecting lead","POST",this.leadRemapper.toRequest(t))];case 1:return n=r.sent(),[2,this.leadRemapper.fromResponse(n.data)]}}))}))},n.checkFollowStatus=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/profile/followers/check-follow-status".concat(this.apiSignInUrl,"&profile_ids=").concat(t.join(",")),[4,this.fetchWithAuth(e,"There was a problem checking follow status for profiles")];case 1:return n=r.sent(),[2,this.followersRemapper.followStatusFromResponse(n.data)]}}))}))},n.deleteOwnProfile=function(){return a(n,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/profile".concat(this.apiSignInUrl),[4,this.fetchWithAuth(t,"There was a problem deleting own profile","DELETE")];case 1:return e.sent(),[2]}}))}))},n.deleteUserData=function(){return a(n,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t="/user-data".concat(this.apiSignInUrl),[4,this.fetchWithAuth(t,"There was a problem deleting profile data","DELETE")];case 1:return e.sent(),[2]}}))}))},n.lang=e.lang,n.profileRemapper=new l.default,n.followingRemapper=new c.default,n.followersRemapper=new d.default,n.leadRemapper=new p.default,n}return i(e,t),e}(h.default);e.default=_},47876:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(8077));e.default=function(t){var e=this;this.footballBaseUrl="https://football.api.sportal365.com/",this.retryRequest=!1,this.oddClient=null,this.remapper=null,this.getMatchOdds=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,s;return i(this,(function(i){switch(i.label){case 0:return e="v2/matches/livescore?odd_client=".concat(this.oddClient.name,"&match_ids=").concat(t.join(",")).concat(n.constructFiltersUrl()),r="Error while fetching match odds for matchIds: ".concat(t.join(",")),[4,this.fetchWithAuth(e,r)];case 1:return a=i.sent(),s=n.marketTypes&&n.marketTypes.length>0?n.marketTypes.filter((function(t){return t.includes("OVER")})):[],[2,this.remapper.fromResponse(a,s)]}}))}))},this.getAuthHeaders=function(){var t="undefined"!=typeof window?window.btoa("".concat(e.oddClient.credentials.username,":").concat(e.oddClient.credentials.password)):Buffer.from("".concat(e.oddClient.credentials.username,":").concat(e.oddClient.credentials.password)).toString("base64");return{"Content-Type":"application/json",Authorization:"Basic ".concat(t)}},this.fetchWithAuth=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return[4,fetch(this.footballBaseUrl+t,{headers:this.getAuthHeaders()})];case 1:return[4,(e=i.sent()).json()];case 2:return r=i.sent(),e.ok?[3,5]:401!==e.status&&403!==e.status||this.retryRequest?[3,4]:(this.retryRequest=!0,[4,this.fetchWithAuth(t,n)]);case 3:i.sent(),i.label=4;case 4:throw this.retryRequest=!1,console.warn(n,r),r;case 5:return this.retryRequest=!1,[2,r]}}))}))},this.oddClient=t.oddClient,this.remapper=new s.default}},81613:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(90712),l=o(n(93305)),c=o(n(6829)),d=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"voting"))||this;return n.pollRemapper=null,n.playerOfTheMatchRemapper=null,n.getPolls=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/polls".concat(this.apiSignInUrl),t&&(n+=t.constructMainFiltersUrl()),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),[4,this.fetchWithoutAuth(n,"There was a problem fetching polls")];case 1:return r=i.sent(),[2,this.pollRemapper.remapPolls(r)]}}))}))},n.getPollById=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i;return s(this,(function(a){switch(a.label){case 0:return n="/polls/".concat(t).concat(this.apiSignInUrl),(0,u.isDisabledCache)(e)&&(n+=(0,u.initDisableCache)()),r="There was a problem fetching the following poll: "+t,[4,this.fetchWithoutAuth(n,r)];case 1:return i=a.sent(),[2,this.pollRemapper.remapPollById(i.data)]}}))}))},n.voteForPoll=function(t,e){return a(n,void 0,void 0,(function(){var n,r,i,a;return s(this,(function(s){switch(s.label){case 0:return n="/polls/".concat(t,"/votes").concat(this.apiSignInUrl),r={option_ids:e},i="There was a problem voting for the following poll: "+t,[4,this.fetchWithAuth(n,i,"PUT",r)];case 1:return a=s.sent(),[2,this.pollRemapper.remapUserVote(a.data)]}}))}))},n.deleteVoteForPoll=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/polls/".concat(t,"/votes").concat(this.apiSignInUrl),n="There was a problem deleting vote for the following poll: "+t,[4,this.fetchWithAuth(e,n,"DELETE")];case 1:return r.sent(),[2,!0]}}))}))},n.getMyPollVote=function(t){return a(n,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return e="/polls/".concat(t,"/votes").concat(this.apiSignInUrl),n="There was a problem fetching user's own vote for the following poll: "+t,[4,this.fetchWithAuth(e,n)];case 1:return r=i.sent(),[2,this.pollRemapper.remapSinglePollVote(r.data)]}}))}))},n.getMyPollsVotes=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/polls/votes".concat(this.apiSignInUrl),t&&(e+=t.constructMainFiltersUrl()),[4,this.fetchWithAuth(e,"There was a problem fetching user's votes for polls")];case 1:return n=r.sent(),[2,this.pollRemapper.remapPollsVotes(n)]}}))}))},n.voteForPlayerOfTheMatch=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/football/potm/".concat(t).concat(this.apiSignInUrl),r={player_id:e},[4,this.fetchWithAuth(n,"There was a problem voting for 'Player of the match'","PUT",r)];case 1:return[2,{playerId:i.sent().data.player_id}]}}))}))},n.deleteVoteForPlayerOfTheMatch=function(t){return a(n,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e="/football/potm/".concat(t).concat(this.apiSignInUrl),[4,this.fetchWithAuth(e,"There was a problem with deleting vote for 'Player of the match'","DELETE")];case 1:return n.sent(),[2]}}))}))},n.getOwnVotesForPlayerOfTheMatch=function(t){return a(n,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="/football/potm".concat(this.apiSignInUrl),t&&(e+=t.constructFiltersUrl()),[4,this.fetchWithAuth(e,"There was a problem fetching user's own votes for 'Player of the match'")];case 1:return n=r.sent(),[2,this.playerOfTheMatchRemapper.remapUserVotes(n)]}}))}))},n.getResultsForPlayerOfTheMatch=function(t,e){return a(n,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="/football/potm/".concat(t).concat(this.apiSignInUrl).concat((0,u.isDisabledCache)(e)?(0,u.initDisableCache)():""),[4,this.fetchWithoutAuth(n,"There was a problem fetching results for 'Player of the match'")];case 1:return r=i.sent(),[2,this.playerOfTheMatchRemapper.remapResults(r)]}}))}))},n.pollRemapper=new c.default,n.playerOfTheMatchRemapper=new l.default,n}return i(e,t),e}(o(n(47724)).default);e.default=d},95792:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(8539)),o=a(n(78358));e.default=function(t){var e=this;this.localCache=null,this.https=null,this.getEntitiesByIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s,o;return i(this,(function(i){switch(i.label){case 0:return[4,this.setTopIdMappings()];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,7,,8]),[4,this.localCache.checkForExistingIdObjs(t,n)];case 3:return e=i.sent(),r=this.splitForRequestAndExisting(e),[4,this.https.getEntitiesByIdObjs(r.request,n)];case 4:return s=i.sent(),[4,this.localCache.addIdMappings(s)];case 5:return i.sent(),[4,this.localCache.getIdsByType(t,n,a)];case 6:return[2,i.sent()];case 7:return o=i.sent(),console.warn("There was a problem retrieving the entity ids ",o),[2,Promise.resolve([])];case 8:return[2]}}))}))},this.getEntitiesByIdsMap=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s,o,u,l,c;return i(this,(function(i){switch(i.label){case 0:return[4,this.setTopIdMappings()];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,7,,8]),e=JSON.parse(JSON.stringify(t)),[4,this.localCache.checkForExistingIdObjs(t,n)];case 3:return r=i.sent(),s=this.splitForRequestAndExisting(r),[4,this.https.getEntitiesByIdObjs(s.request,n)];case 4:return o=i.sent(),[4,this.localCache.addIdMappings(o)];case 5:return i.sent(),[4,this.localCache.getIdsByType(t,n,a)];case 6:return u=i.sent(),l=new Map,Object.keys(e).forEach((function(t){e[t].forEach((function(e,n){var r=u[t].length&&u[t][n]?u[t][n]:"";l.set(e,r)}))})),[2,l];case 7:return c=i.sent(),console.warn("There was a problem retrieving the entity ids ",c),[2,Promise.resolve(new Map)];case 8:return[2]}}))}))},this.getEntityById=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.localCache.getEntity(t,n,a)];case 1:return(e=i.sent())?[2,e]:[4,this.requestEntity(t,n,a)];case 2:return r=i.sent(),[4,this.localCache.addIdMappings(r)];case 3:return i.sent(),r&&r.length>0?[2,r[0]]:[2,null]}}))}))},this.splitForRequestAndExisting=function(t){var e={},n={};return Object.keys(t).forEach((function(r){e[r]=t[r].filter((function(t){return!t.exists})).map((function(t){return t.id})),n[r]=t[r].filter((function(t){return t.exists})).map((function(t){return t.id}))})),{existing:n,request:e}},this.requestEntity=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=Array.isArray(t)?t:[t],[4,this.https.getEntitiesByIds(n,t,a)];case 1:return[2,r.sent()];case 2:return e=r.sent(),console.warn("There was a problem retrieving the requested entity: ".concat(e)),[2,null];case 3:return[2]}}))}))},this.setTopIdMappings=function(){return r(e,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return t=Math.floor(Date.now()/1e3),[4,this.localCache.getExpiration("football","ids")];case 1:return n.sent()>t?[2,Promise.resolve()]:[4,this.https.getTopEntities()];case 2:return e=n.sent(),[4,this.localCache.addTopIdMappings(e)];case 3:return n.sent(),[2]}}))}))},this.localCache=(new o.default).createLocalCacheInstance(t.idSchema),this.https=new s.default(t)}},88900:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(14946),o=a(n(95792)),u=a(n(57611)),l=a(n(49052));e.default=function(t){var e=this;this.idSchema="",this.idMappingFacade=null,this.getEntityIdBySchemaId=function(t,n){return e.idMappingFacade.getEntityById(n,t,e.idSchema)},this.remapEntities=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){e=JSON.parse(JSON.stringify(t));try{return this.idSchema!==s.IdSchemaEnum.NATIVE?(r=new u.default,a=r.traverse(e,n),[2,this.idMappingFacade.getEntitiesByIds(a,"native",this.idSchema).then((function(t){return(new l.default).traverse(e,n,t)}))]):[2,t]}catch(t){return console.warn("There was a problem remapping entity: ".concat(n," with inner entity "),t),[2,[]]}return[2]}))}))},this.getEntityIdsBySchemaId=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return(e={})[n]=t,this.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:[4,this.idMappingFacade.getEntitiesByIds(e,this.idSchema,a)];case 1:return[2,r.sent()];case 2:return[2,e]}}))}))},this.idSchema=t.idSchema,this.idMappingFacade=new o.default(t)}},93845:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.typeConvert=void 0,e.typeConvert=function(t){switch(t){case"competitions":return"competition";case"players":case"relatedPlayer":case"squad":return"player";case"teams":case"participants":case"homeTeam":case"awayTeam":case"timeline":case"teamId":return"team";default:return t}}},57611:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(93845);e.default=function(){var t=this;this.extractedObjIds={},this.traverse=function(e,n){return n=(0,r.typeConvert)(n),Array.isArray(e)?t.traverseArrExtract(e,n):e&&"object"==typeof e&&t.traverseObjExtract(e,n),t.extractedObjIds},this.traverseArrExtract=function(e,n){e&&e.length>0&&e.forEach((function(e){t.traverseObjExtract(e,n)}))},this.traverseObjExtract=function(e,n){e&&Object.keys(e).length>0&&Object.keys(e).forEach((function(r){var i=e[r];"id"===r||"teamId"===r?(t.extractedObjIds.hasOwnProperty(n)||(t.extractedObjIds[n]=[]),i&&t.extractedObjIds[n].push(i)):e[r]&&t.traverse(e[r],r)}))}}},49052:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(93845);e.default=function(){var t=this;this.replaceObjIdsIndex=null,this.remappedIdsObj={},this.traverse=function(e,n,i){return n=(0,r.typeConvert)(n),null===t.replaceObjIdsIndex&&(t.initReplaceObjIdsIndex(i),t.remappedIdsObj=i),Array.isArray(e)?t.traverseArrReplace(e,n):e&&"object"==typeof e&&t.traverseObjReplace(e,n),e},this.initReplaceObjIdsIndex=function(e){t.replaceObjIdsIndex={},Object.keys(e).forEach((function(e){t.replaceObjIdsIndex[e]=0}))},this.traverseArrReplace=function(e,n){e&&e.length>0&&e.forEach((function(e){t.traverseObjReplace(e,n)}))},this.traverseObjReplace=function(e,n){e&&Object.keys(e).length>0&&Object.keys(e).forEach((function(r){"id"===r||"teamId"===r?e[r]&&(e[r]=t.remappedIdsObj[n][t.replaceObjIdsIndex[n]],t.replaceObjIdsIndex[n]=t.replaceObjIdsIndex[n]+1):e[r]&&t.traverse(e[r],r,t.remappedIdsObj)}))}}},87302:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(25936));e.default=function(t){var e=this;this.add=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.add(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.like(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.dislike=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.dislike(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addPageview=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addPageview(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addContentConsumed=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addContentConsumed(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addShare=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addShare(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addComment=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addComment(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addClickAd=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addClickAd(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.addConvert=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addConvert(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getOwn=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.getOwn(t,n)];case 1:return[2,e.sent()]}}))}))},this.getForUser=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.getForUser(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.activityFacade=new s.default(t)}},71491:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.ActionsEnum=void 0,(n=e.ActionsEnum||(e.ActionsEnum={})).LIKE="like",n.DISLIKE="dislike",n.PAGE_VIEW="page_view",n.CONTENT_CONSUMED="content_consumed",n.SHARE="share",n.COMMENT="comment",n.CLICK_AD="click_ad",n.PREDICTION_MADE="prediction_made",n.CONVERT="convert",n.MANAGE_INTERESTS="manage_interests",n.GAME_PARTICIPATION="game_participation",n.ARTICLE_CONSUMED="article_consumed",n.VIDEO_CONSUMED="video_consumed",n.SHORT_VIDEO_CONSUMED="short_video_consumed",n.LONG_VIDEO_CONSUMED="long_video_consumed",n.AUDIO_CONSUMED="audio_consumed",n.GALLERY_CONSUMED="gallery_consumed",n.IMAGE_CONSUMED="image_consumed",n.POLL_PARTICIPATION="poll_participation"},94964:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.UserActionsEnum=void 0,(n=e.UserActionsEnum||(e.UserActionsEnum={})).LIKE="like",n.DISLIKE="dislike",n.SHARE="share",n.COMMENT="comment",n.PREDICTION_MADE="prediction_made"},25936:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=s(n(71022)),l=n(71491),c=s(n(74630)),d=s(n(78261)),f=s(n(60629)),h=s(n(28636));e.default=function(t){var e=this;this.add=function(t,n,a,s){return r(e,void 0,void 0,(function(){var e,r,u,l,d;return i(this,(function(i){switch(i.label){case 0:return this.idSchema==o.IdSchemaEnum.NATIVE?[3,3]:(e=JSON.parse(JSON.stringify(n)),[4,this.activityService.remapTagsIds(n,this.idSchema,o.IdSchemaEnum.NATIVE)]);case 1:return r=i.sent(),u=new c.default(t,r,a,s),[4,this.activityHttps.createActivity(u)];case 2:return(l=i.sent()).context.tags=e,[2,l];case 3:return d=new c.default(t,n,a,s),[2,this.activityHttps.createActivity(d)]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityHttps.deleteActivity(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.LIKE,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.dislike=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.DISLIKE,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addPageview=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.PAGE_VIEW,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addContentConsumed=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.CONTENT_CONSUMED,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addShare=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.SHARE,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addComment=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.COMMENT,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addClickAd=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.CLICK_AD,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.addConvert=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=l.ActionsEnum.CONVERT,[4,this.add(e,t,n,a)];case 1:return[2,r.sent()]}}))}))},this.getOwn=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,s;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,t&&(t=new f.default(t)),this.idSchema==o.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getOwnActivities(t,n)];case 1:e=i.sent(),r=0,a=e.data,i.label=2;case 2:return r<a.length?(s=a[r],[4,this.activityService.remapTagsIds(s.context.tags,o.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,e];case 6:return[4,this.activityHttps.getOwnActivities(t,n)];case 7:return[2,i.sent()]}}))}))},this.getForUser=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,u,l,c;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,n&&(n=new h.default(n)),this.idSchema==o.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getActivitiesForUser(t,n,s)];case 1:e=i.sent(),r=JSON.parse(JSON.stringify(e)),u=0,l=r.data,i.label=2;case 2:return u<l.length?(c=l[u],[4,this.activityService.remapTagsIds(a([],c.context.tags,!0),o.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return u++,[3,2];case 5:return[2,r];case 6:return[4,this.activityHttps.getActivitiesForUser(t,n,s)];case 7:return[2,i.sent()]}}))}))},this.idSchema=t.idSchema,this.activityHttps=new u.default(t),this.activityService=new d.default(t)}},80316:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.totalItems=0}},21517:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(72820));e.default=function(){this.id=null,this.profileId=null,this.property=null,this.value=null,this.action=null,this.context=new i.default,this.points=0}},82195:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){this.page=null,this.limit=null,this.page=t.page?t.page:null,this.limit=t.limit?t.limit:null}},60629:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.action=null,n.action=e.action?e.action:null,n}return i(e,t),e.prototype.constructFilterUrl=function(){var t="";return this.action&&(t+="&",t+="action=".concat(this.action)),this.page&&(t+="&",t+="page=".concat(this.page)),this.limit&&(t+="&",t+="limit=".concat(this.limit)),t},e}(a(n(82195)).default);e.default=s},28636:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.action=null,n.action=e.action?e.action:null,n}return i(e,t),e.prototype.constructFilterUrl=function(){var t="";return this.action&&(t+="&",t+="action=".concat(this.action)),this.page&&(t+="&",t+="page=".concat(this.page)),this.limit&&(t+="&",t+="limit=".concat(this.limit)),t},e}(a(n(82195)).default);e.default=s},16021:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569)),a=r(n(21517));e.default=function(){this.meta=new i.default,this.data=[new a.default]}},51382:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.label=null}},37976:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.id=null,this.label=null}},72820:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content=null,this.tags=[],this.campaign=null}},87060:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.source=null,this.type=null}},74630:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(72820));e.default=function(t,e,n,r){this.action=null,this.context=new i.default,this.action=t,this.context.tags=e,n&&(this.context.content=n),r&&(this.context.campaign=r)}},92453:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(10817),s=n(27974),o=i(n(61758)),u=i(n(86635)),l=i(n(13009)),c=i(n(57165)),d=i(n(5490)),f=i(n(81316)),h=i(n(53195)),p=i(n(81342)),m=i(n(9826)),v=i(n(63087)),_=i(n(21517)),y=i(n(16021));e.default=function(){var t=this;this.remapSingleResponse=function(t){var e=new _.default;return e.id=t.id,e.profileId=t.profile_id,e.property=t.property,e.value=t.value,e.action=t.action,e.context.content=t.context.content,e.context.tags=t.context.tags,e.context.campaign=t.context.campaign,e.points=t.points,e},this.remapActivitiesResponse=function(e){var n=new y.default;return n.meta.pagination.currentPage=e.meta.pagination.current_page,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.numberOfPages=e.meta.pagination.number_of_pages,n.meta.pagination.totalItems=e.meta.pagination.total_items,n.data=e.data.map((function(e){return t.remapSingleResponse(e)})),n},this.remapStatsResponse=function(e){var n=new f.default;return n.profileId=e.profile_id,n.tier=e.tier,n.points=e.points,n.predictionsMade=e.predictions_made,n.successRates.overallPercent=e.success_rates.overall_percent,n.successRates.byFootballCompetition=t.constructNewRecord(e.success_rates.by_competition),n.successRates.byFootballTeam=t.constructNewRecord(e.success_rates.by_team),n.successRates.byFootballMarket=t.constructNewRecord(e.success_rates.by_market),n.predictions=e.predictions?t.remapPredictionsStats(e.predictions):null,n.tiers=e.tiers?t.remapAchievementsStats(e.tiers):null,n.badges=e.badges?t.remapAchievementsStats(e.badges):null,n.discussions=e.discussions?t.remapDiscussionStats(e.discussions):null,n.classicQuizzes=e.classic_quizzes?t.remapClassicQuizStats(e.classic_quizzes):null,n.eitherOr=e.either_or?t.remapEitherOrStats(e.either_or):null,n},this.constructNewRecord=function(e){var n;return Object.entries(e).length?(Object.entries(e).forEach((function(e){var i,a=e[0],o=e[1];n=r(r({},n),((i={})[a]=t.remapSuccessRatePercent(o),i)),s.MarketEnum[a]&&delete n[a].model})),n):e},this.remapSuccessRatePercent=function(t){var e=new m.default;return e.successRatePercent=t.success_rate_percent,e},this.remapPredictionsStats=function(e){var n=new d.default;return n.single=t.remapSinglePredictionsStats(e.single),n.topX=e.top_x,n.matchQuiz=e.match_quiz,n},this.remapSinglePredictionsStats=function(e){var n=new p.default;return n.predictionsMade=e.predictions_made,n.correct=e.correct,n.points=e.points,n.breakdown=t.remapBreakdownSinglePredictionsStats(e.breakdown),n},this.remapBreakdownSinglePredictionsStats=function(t){if(t&&Object.keys(t).length){var e=new v.default,n=[],r=[];return Object.keys(t).forEach((function(e){var i=new h.default;i.entityId=e,i.entityType=t[e].entity_type,i.entitySource=t[e].entity_source,i.predictionsMade=t[e].predictions_made,i.correct=t[e].correct,i.points=t[e].points,i.entityType===a.EntityTypeEnum.COMPETITION?n.push(i):i.entityType===a.EntityTypeEnum.TEAM&&r.push(i)})),e.footballCompetitions=n,e.footballTeams=r,e}return new v.default},this.remapAchievementsStats=function(t){return t.map((function(t){var e=new o.default;return e.id=t.id,e.achievedAt=t.achieved_at,e}))},this.remapDiscussionStats=function(t){var e=new l.default;return e.totalPoints=t.total_points,e.postPoints=t.post_points,e.postsMade=t.posts_made,e.reactionPoints=t.reaction_points,e.reactionCount=t.reaction_count,e},this.remapClassicQuizStats=function(t){var e=new u.default;return e.participationCount=t.participation_count,e.points=t.points,e},this.remapEitherOrStats=function(t){var e=new c.default;return e.participationCount=t.participation_count,e}}},78261:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(88900));e.default=function(t){var e=this;this.remapTagsIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s,o,u,l,c,d,f,h;return i(this,(function(i){switch(i.label){case 0:return t&&t.length?(e={},r={},s=[],t.forEach((function(t){e.hasOwnProperty(t.type)||(e[t.type]=[],r[t.type]=[]),e[t.type].push(t.id),r[t.type].push(t)})),[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,n,a)]):[2,t];case 1:for(o=i.sent(),u=function(t,e){e.forEach((function(e,n){e.id=o[t][n],s.push(e)}))},l=0,c=Object.entries(r);l<c.length;l++)d=c[l],f=d[0],h=d[1],u(f,h);return[2,s]}}))}))},this.idSchema=t.idSchema,this.idMapping=new s.default(t)}},9201:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(87036));e.default=function(t){var e=this;this.facade=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.makePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.updatePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionsForUser=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGamePredictionsForUser(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionById=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGamePredictionById(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getRankings(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},87036:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(91450)),o=a(n(86409)),u=a(n(73253)),l=a(n(83685)),c=a(n(32156)),d=a(n(24705));e.default=function(t){var e=this;this.https=null,this.validator=null,this.profile=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t&&(t=new u.default(t)),[4,this.https.getBracketGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.getBracketGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(n),[4,this.https.makeBracketGamePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(a),[4,this.https.updateBracketGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionsForUser=function(t,n,a,s){return r(e,void 0,void 0,(function(){var e,r,o;return i(this,(function(i){switch(i.label){case 0:return a&&(a=new l.default(a)),[4,this.https.getBracketGamePredictionsForUser(t,n,a,s)];case 1:e=i.sent(),r=null,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.profile.getById(n).getInfo()];case 3:return r=i.sent(),[3,5];case 4:return o=i.sent(),console.error(o),[3,5];case 5:return e.data.forEach((function(t){t.profileModel=r})),[2,e]}}))}))},this.getGamePredictionById=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.getBracketGamePredictionById(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s;return i(this,(function(i){switch(i.label){case 0:return n&&(n=new c.default(n)),[4,this.https.getBracketGameRankings(t,n,a)];case 1:return e=i.sent(),r=e.data.map((function(t){return t.profileId})),s=[],r.length>0?[4,this.profile.getByIds(r)]:[3,3];case 2:s=i.sent(),e.data=e.data.map((function(t){return t.profileModel=s.find((function(e){return e.id===t.profileId}))||null,t})),i.label=3;case 3:return[2,e]}}))}))},this.https=new s.default(t),this.profile=new o.default(t),this.validator=new d.default(t.errorHandlingMode)}},73911:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participantOne=null,this.participantTwo=null}},18486:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73911));e.default=function(){this.matchId="",this.participantOne="",this.participantTwo="",this.winner="",this.homeParticipant="",this.startDate="",this.score=new i.default}},34971:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participants=[]}},29070:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.group=null,this.image=null,this.undecided=!1}},51922:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(34971));e.default=function(){this.id=null,this.title=null,this.description=null,this.rules=null,this.customFields=null,this.images=null,this.type="BRACKET",this.status=null,this.points=null,this.related=[],this.tiebreaker=null,this.predictionsCutoff=null,this.meta=new i.default,this.fixtures=[],this.createdAt=null,this.updatedAt=null}},46040:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},20594:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},49992:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},73253:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(64800)),o=n(40853),u=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.sortOrder=null,n.gameIds=null,n.status=(null==e?void 0:e.status)||null,n.sortOrder=(null==e?void 0:e.sortOrder)||null,n.gameIds=(null==e?void 0:e.gameIds)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.status&&Object.values(o.GameStatusEnum).includes(this.status)?(e+="&",e+="status=".concat(this.status)):null!==this.status&&console.warn("The filter 'status' has the following INVALID value: ".concat(this.status,". It will be not passed as a query param in the URL. For more information visit our documentation.")),!this.sortOrder||"asc"!==this.sortOrder&&"desc"!==this.sortOrder&&"ASC"!==this.sortOrder&&"DESC"!==this.sortOrder?null!==this.sortOrder&&console.warn("The filter 'sortOrder' has the following INVALID value: ".concat(this.sortOrder,". It will be not passed as a query param in the URL. For more information visit our documentation.")):(e+="&",e+="sort_order=".concat(this.sortOrder)),this.gameIds&&Array.isArray(this.gameIds)&&this.gameIds.length>0?(e+="&",e+="game_ids=".concat(this.gameIds)):null!==this.gameIds&&console.warn("The filter 'gameIds' has the following INVALID value: ".concat(this.gameIds,". It will be not passed as a query param in the URL. For more information visit our documentation.")),e},e}(s.default);e.default=u},83685:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64800)).default);e.default=s},32156:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64800)).default);e.default=s},33830:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId="",this.participantOne="",this.participantTwo="",this.correct=null}},96166:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BracketGamePredictionStatusEnum=void 0;var i,a=r(n(41198));!function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(i=e.BracketGamePredictionStatusEnum||(e.BracketGamePredictionStatusEnum={}));e.default=function(){this.id="",this.profileId="",this.profileModel=null,this.gameId="",this.totalPoints=null,this.gamePoints=null,this.bonusPoints=null,this.position=null,this.status=i.ACTIVE,this.fixtures=[],this.tiebreaker=new a.default,this.createdAt="",this.updatedAt=""}},41198:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.statTotal=0}},16187:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.BracketWinnerEnum=void 0,(n=e.BracketWinnerEnum||(e.BracketWinnerEnum={})).PARTICIPANT_ONE="PARTICIPANT_ONE",n.PARTICIPANT_TWO="PARTICIPANT_TWO",n.DRAW="DRAW"},15142:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16187);e.default=function(){this.matchId="",this.participantOne="",this.participantTwo="",this.winner=r.BracketWinnerEnum.PARTICIPANT_ONE}},7583:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.fixtures=[]}},6932:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},34227:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(78923)),a=r(n(73911)),s=r(n(18486)),o=r(n(34971)),u=r(n(29070)),l=r(n(51922)),c=r(n(46040)),d=r(n(49992)),f=r(n(20594)),h=r(n(33830)),p=r(n(96166)),m=r(n(41198)),v=r(n(6932));e.default=function(){var t=this;this.remapBracketGames=function(e){var n=new d.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapBracketGameById(e)})),n},this.remapBracketGameById=function(e){var n=new l.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.rules=e.rules,n.customFields=e.custom_fields,n.images=e.images,n.type=e.type,n.status=e.status,n.points=e.points,n.related=e.related?t.remapRelated(e.related):e.related,n.tiebreaker=e.tiebreaker?t.remapBracketGameTiebreaker(e.tiebreaker):e.tiebreaker,n.predictionsCutoff=e.predictions_cutoff,n.meta=e.meta&&e.meta.participants?t.remapBracketGameMeta(e.meta):e.meta,n.fixtures=e.fixtures?t.remapBracketGameFixtures(e.fixtures):e.fixtures,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapPredictionToRequestBody=function(t){return t.map((function(t){return{match_id:t.matchId,participant_one:t.participantOne,participant_two:t.participantTwo,winner:t.winner}}))},this.remapPrediction=function(e){var n=new p.default;return n.id=e.id,n.profileId=e.profile_id,n.gameId=e.game_id,n.totalPoints=e.total_points,n.gamePoints=e.game_points,n.bonusPoints=e.bonus_points,n.position=e.position,n.status=e.status,n.fixtures=t.remapPredictionFixtures(e.fixtures),n.tiebreaker=e.tiebreaker?t.remapPredictionTiebreaker(e.tiebreaker):e.tiebreaker,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapPredictionsForUser=function(e){var n=new c.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRankings=function(e){var n=new v.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRelated=function(t){return t.map((function(t){var e=new i.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},this.remapPredictionFixtures=function(t){return t.map((function(t){var e=new h.default;return e.matchId=t.match_id,e.participantOne=t.participant_one,e.participantTwo=t.participant_two,e.winner=t.winner,e.correct=t.correct,e}))},this.remapPredictionTiebreaker=function(t){var e=new m.default;return e.statTotal=t.stat_total,e},this.remapBracketGameMeta=function(t){var e=new o.default;return e.participants=t.participants.map((function(t){var e=new u.default;return e.id=t.id,e.name=t.name,e.group=t.group,e.image=t.image,e.undecided=t.undecided,e})),e},this.remapBracketGameFixtures=function(e){return e.map((function(e){var n=new s.default;return n.matchId=e.match_id,n.participantOne=e.participant_one,n.participantTwo=e.participant_two,n.winner=e.winner,n.homeParticipant=e.home_participant,n.startDate=e.start_date,n.score=e.score?t.remapBracketGameFixturesScore(e.score):e.score,n}))},this.remapBracketGameFixturesScore=function(t){var e=new a.default;return e.participantOne=t.participant_one,e.participantTwo=t.participant_two,e},this.remapBracketGameTiebreaker=function(t){var e=new f.default;return e.statTiebreakerEnabled=t.stat_tiebreaker_enabled,e.statTotal=t.stat_total,e}}},24705:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(67900),o=n(4021),u=n(94904),l=a(n(16198)),c=a(n(15142)),d=function(t){function e(e){var n=t.call(this,e)||this;return n.validatePrediction=function(t){t.fixtures&&Array.isArray(t.fixtures)&&0!==t.fixtures.length||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.REQUIRED_FIXTURES_FIELD);for(var e=Object.keys(new c.default),r=0,i=t.fixtures;r<i.length;r++){var a=i[r];(Object.keys(a).length!==e.length||Object.keys(a).some((function(t){return!e.includes(t)})))&&n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.INVALID_FIXTURES_FIELD)}!t.tiebreaker||t.tiebreaker.statTotal&&Number.isInteger(t.tiebreaker.statTotal)||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.INVALID_TIEBREAKER_FIELD)},n}return i(e,t),e}(l.default);e.default=d},94068:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(80123));e.default=function(t){var e=this;this.facade=null,this.issue=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.issue(t,n)];case 1:return[2,e.sent()]}}))}))},this.update=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.update(t,n)];case 1:return[2,e.sent()]}}))}))},this.updateTemplate=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.updateTemplate(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyChallenges=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyChallenges(t)];case 1:return[2,e.sent()]}}))}))},this.accept=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.accept(t)];case 1:return[2,e.sent()]}}))}))},this.reject=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.reject(t)];case 1:return[2,e.sent()]}}))}))},this.leave=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.leave(t)];case 1:return[2,e.sent()]}}))}))},this.getMyChallengesStandings=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyChallengesStandings(t)];case 1:return[2,e.sent()]}}))}))},this.getInvitations=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getInvitations(t)];case 1:return[2,e.sent()]}}))}))},this.getReportedPosts=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getReportedPosts(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPredictions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPredictions(t,n)];case 1:return[2,e.sent()]}}))}))},this.moderatePost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.moderatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},80123:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(87059)),o=a(n(48863)),u=a(n(45955)),l=a(n(73886)),c=a(n(49759)),d=n(4021),f=n(94904),h=a(n(62535)),p=n(5318),m=a(n(88247)),v=a(n(42590)),_=a(n(86409)),y=a(n(33820)),g=a(n(35230)),b=a(n(62388));e.default=function(t){var e=this;this.factory=null,this.https=null,this.loyaltyHttps=null,this.profile=null,this.service=null,this.discussionsService=null,this.issue=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){switch(i.label){case 0:return e=this.factory.createRequestBodyFromParam(t,"ONE_VS_ONE"),[4,this.https.create(e,"CHALLENGE")];case 1:return r=i.sent(),[4,this.service.setTemplateModels(r)];case 2:return i.sent(),[4,this.https.invite(r.id,[n])];case 3:return a=i.sent(),r.invites=[],r.invites.push(a[0]),[2,r]}}))}))},this.update=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return e=this.factory.createUpdateRequestBodyFromParam(n,"ONE_VS_ONE"),[4,this.https.update(t,e,"CHALLENGE")];case 1:return r=i.sent(),[4,this.service.setTemplateModels(r)];case 2:return i.sent(),[2,r]}}))}))},this.updateTemplate=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.https.updateLeagueTemplate(t,n,a,"CHALLENGE")];case 1:return e=r.sent(),[4,this.service.setTemplateModels(e)];case 2:return r.sent(),[2,e]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.delete(t,"CHALLENGE")];case 1:return[2,e.sent()]}}))}))},this.getById=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.https.getById(t,"CHALLENGE",n)];case 1:return e=r.sent(),[4,this.service.setTemplateModels(e)];case 2:return r.sent(),[2,e]}}))}))},this.getMyChallenges=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return t=new b.default(t),[4,this.https.getMyLeagues(t,"CHALLENGE")];case 1:return e=n.sent(),[4,this.service.setTemplateModelsInLeagues(e)];case 2:return n.sent(),[2,e]}}))}))},this.accept=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=!0,[4,this.https.accept(t,e,"CHALLENGE")];case 1:return n=r.sent(),[4,this.finalizeAcceptModel(n,e)];case 2:return[2,r.sent()]}}))}))},this.reject=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=!1,[4,this.https.accept(t,e,"CHALLENGE")];case 1:return n=r.sent(),[4,this.finalizeAcceptModel(n,e)];case 2:return[2,r.sent()]}}))}))},this.leave=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.leave(t,"CHALLENGE")];case 1:return[2,e.sent()]}}))}))},this.finalizeAcceptModel=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return n?[4,this.getById(t.challengeId)]:[3,2];case 1:e=r.sent(),t.challengeModel=e,r.label=2;case 2:return[4,this.service.setProfileModel(t)];case 3:return r.sent(),[2,t]}}))}))},this.getMyChallengesStandings=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s,o;return i(this,(function(i){switch(i.label){case 0:return t&&(t=new y.default(t)),[4,this.profile.getOwn().getInfo()];case 1:return e=i.sent(),[4,this.loyaltyHttps.getUserRankingsForPrivateLeagueAndChallenges(e.id,"CHALLENGE",t)];case 2:n=i.sent(),r=0,a=n.data,i.label=3;case 3:return r<a.length?(s=a[r],[4,this.getById(s.challengeId)]):[3,6];case 4:o=i.sent(),s.challengeModel=o,i.label=5;case 5:return r++,[3,3];case 6:return this.service.setTemplateModelsFromLeagueModels(n.data,"CHALLENGE"),[2,n]}}))}))},this.getInvitations=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(t=new l.default(t)).type="ONE_VS_ONE",[4,this.https.getInvitations("CHALLENGE",t)];case 1:return e=n.sent(),[4,this.service.setTemplateModelsInLeagues(e.data)];case 2:return n.sent(),[2,e]}}))}))},this.getReportedPosts=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return n&&(n=new c.default(n)),[4,this.https.getReportedPosts(t,n)];case 1:return e=i.sent(),r=e,[4,this.discussionsService.finalizePostFullModel(e.data)];case 2:return r.data=i.sent(),[2,e]}}))}))},this.getPredictions=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:if(n){if(n.limit&&n.limit>20)throw new h.default(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_LIMIT,p.ErrorMessages.INVALID_LIMIT+20..toString());n=new m.default(n)}return[4,this.https.getPredictions(t,n)];case 1:return e=r.sent(),[4,this.service.setModelsForPredictions(e)];case 2:return[2,r.sent()]}}))}))},this.moderatePost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.moderatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.factory=new u.default,this.https=new o.default(t),this.service=new v.default(t),this.loyaltyHttps=new s.default(t),this.profile=new _.default(t),this.discussionsService=new g.default(t)}},76085:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profileId="",this.profileModel=null,this.challengeId="",this.challengeModel=null,this.message=""}},95124:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ONE_VS_ONE",e}return i(e,t),e}(a(n(2167)).default);e.default=s},39845:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ONE_VS_ONE",e}return i(e,t),e}(a(n(64584)).default);e.default=s},33820:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=null,this.page=null,this.challengeId=null,this.templateId=null,this.sortOrder=null,this.constructFiltersUrl=function(){var t="";return e.limit&&(t+="&limit=".concat(e.limit)),e.page&&(t+="&page=".concat(e.page)),e.challengeId&&(t+="&league_id=".concat(e.challengeId)),e.templateId&&(t+="&template_id=".concat(e.templateId)),e.sortOrder&&(t+="&sort_order=".concat(e.sortOrder)),t},this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null,this.challengeId=t&&t.challengeId?t.challengeId:null,this.templateId=t&&t.templateId?t.templateId:null,this.sortOrder=t&&t.sortOrder?t.sortOrder:null}},62388:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.type="ONE_VS_ONE",this.userRole=null,this.constructFiltersUrl=function(){var t="&type=".concat(e.type);return e.userRole&&(t+="&user_role=".concat(e.userRole)),t},this.userRole=(null==t?void 0:t.userRole)||null}},11298:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.templateId="",this.templateModel=null,this.challengeId="",this.challengeModel=null,this.position="",this.points=0,this.type="challenge"}},20244:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(5645));e.default=function(t){var e=this;this.facade=null,this.getAll=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getAll(t,n)];case 1:return[2,e.sent()]}}))}))},this.getById=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getById(t)];case 1:return[2,e.sent()]}}))}))},this.createPost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.createPost(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPostById=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPostById(t)];case 1:return[2,e.sent()]}}))}))},this.updatePost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.updatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.deletePost=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.deletePost(t)];case 1:return[2,e.sent()]}}))}))},this.getPosts=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPosts(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPostReplies=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPostReplies(t,n)];case 1:return[2,e.sent()]}}))}))},this.react=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.reactToPost(t,n)];case 1:return[2,e.sent()]}}))}))},this.reportPost=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.reportPost(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getOwnPosts=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getOwnPosts(t)];case 1:return[2,e.sent()]}}))}))},this.getUserPosts=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getUserPosts(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.facade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getPostsCount=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPostsCount(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopDiscussions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getTopDiscussions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPostsCountExtended=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPostsCountExtended(t)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},5645:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(14946),c=n(4021),d=n(94904),f=u(n(68097)),h=u(n(62535)),p=n(5318),m=a(n(47686)),v=u(n(87945)),_=u(n(78261)),y=u(n(55383)),g=u(n(90505)),b=u(n(39209)),w=u(n(54804)),E=u(n(35230));e.default=function(t){var e=this;this.idSchema=null,this.errorHandlingMode=null,this.https=null,this.clientHttps=null,this.activityService=null,this.service=null,this.factory=null,this.LIMIT_POSTS_COUNT=50,this.LIMIT_POSTS_COUNT_EXTENDED=250,this.getAll=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i,a;return o(this,(function(s){switch(s.label){case 0:return t&&(t=new g.default(t)),[4,this.https.getAll(t,n)];case 1:e=s.sent(),r=0,i=e.data,s.label=2;case 2:return r<i.length?(a=i[r],[4,this.remapTags(a,l.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:s.sent(),s.label=4;case 4:return r++,[3,2];case 5:return[2,e]}}))}))},this.getById=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.https.getById(t)];case 1:return e=n.sent(),[4,this.remapTags(e,l.IdSchemaEnum.NATIVE,this.idSchema)];case 2:return n.sent(),[2,e]}}))}))},this.createPost=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return e=JSON.parse(JSON.stringify(n)),[4,this.remapTags(e,this.idSchema,l.IdSchemaEnum.NATIVE)];case 1:return i.sent(),r=this.factory.createRequestBodyFromParam(e),[4,this.https.createPost(t,r)];case 2:return[2,i.sent()]}}))}))},this.getPostById=function(t){return s(e,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.https.getPostById(t)];case 1:return e=n.sent(),[4,this.service.finalizePostFullModel([e])];case 2:return[2,n.sent()[0]]}}))}))},this.updatePost=function(t,n){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.https.updatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.deletePost=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.https.deletePost(t)];case 1:return[2,e.sent()]}}))}))},this.getPosts=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return n&&(n=new b.default(n)),[4,this.https.getPosts(t,n)];case 1:return e=i.sent(),r=e,[4,this.service.finalizePostFullModel(e.data)];case 2:return r.data=i.sent(),[2,e]}}))}))},this.getPostReplies=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return n&&(n=new b.default(n)),[4,this.https.getPostReplies(t,n)];case 1:return e=i.sent(),r=e,[4,this.service.finalizePostFullModel(e.data)];case 2:return r.data=i.sent(),[2,e]}}))}))},this.reactToPost=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,this.https.reactToPost(t,n)];case 1:return e=r.sent(),[4,this.service.finalizePostFullModel([e])];case 2:return[2,r.sent()[0]]}}))}))},this.reportPost=function(t,n,r){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.https.reportPost(t,n,r)];case 1:return[2,e.sent()]}}))}))},this.getOwnPosts=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return t&&(t=new b.default(t)),[4,this.https.getOwnPosts(t)];case 1:return[2,e.sent()]}}))}))},this.getUserPosts=function(t,n,r){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return n&&(n=new b.default(n)),[4,this.https.getUserPosts(t,n,r)];case 1:return[2,e.sent()]}}))}))},this.getConfig=function(){return s(e,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(m.FeatureConfigEnum.DISCUSSIONS)];case 1:return[2,t.sent()]}}))}))},this.getPostsCount=function(t,n){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:if(!t||!Array.isArray(t)||!t.length){if("standard"===this.errorHandlingMode)throw new h.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.INVALID_DISCUSSION_IDS);throw new f.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.INVALID_DISCUSSION_IDS)}if(t.length>this.LIMIT_POSTS_COUNT){if("standard"===this.errorHandlingMode)throw new h.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.EXCEEDED_DISCUSSION_IDS);throw new f.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.EXCEEDED_DISCUSSION_IDS)}return[4,this.https.getPostsCount(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopDiscussions=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i,a;return o(this,(function(s){switch(s.label){case 0:return t?(t=new w.default(t),[4,this.service.finalizeTopDiscussionsFilters(t)]):[3,2];case 1:s.sent(),s.label=2;case 2:return[4,this.https.getTopDiscussions(t,n)];case 3:e=s.sent(),r=0,i=e.data,s.label=4;case 4:return r<i.length?(a=i[r],[4,this.remapTags(a,l.IdSchemaEnum.NATIVE,this.idSchema)]):[3,7];case 5:s.sent(),s.label=6;case 6:return r++,[3,4];case 7:return[2,e]}}))}))},this.getPostsCountExtended=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:if(!t||!Array.isArray(t)||!t.length){if("standard"===this.errorHandlingMode)throw new h.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.INVALID_DISCUSSION_IDS);throw new f.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.INVALID_DISCUSSION_IDS)}if(t.length>this.LIMIT_POSTS_COUNT_EXTENDED){if("standard"===this.errorHandlingMode)throw new h.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.EXCEEDED_EXTENDED_DISCUSSION_IDS+this.LIMIT_POSTS_COUNT_EXTENDED);throw new f.default(c.ErrorCodes.BAD_METHOD_CALL,d.ErrorStatuses.INVALID_DISCUSSION_IDS,p.ErrorMessages.EXCEEDED_EXTENDED_DISCUSSION_IDS+this.LIMIT_POSTS_COUNT_EXTENDED)}return[4,this.https.getPostsCountExtended(t)];case 1:return[2,e.sent()]}}))}))},this.remapTags=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i;return o(this,(function(a){switch(a.label){case 0:return this.idSchema!=l.IdSchemaEnum.NATIVE&&t.context&&t.context.tags&&t.context.tags.length?(e=JSON.parse(JSON.stringify(t.context.tags)),[4,this.activityService.remapTagsIds(e,n,r)]):[3,2];case 1:i=a.sent(),t.context.tags=i,a.label=2;case 2:return[2]}}))}))},this.idSchema=t.idSchema,this.errorHandlingMode=t.errorHandlingMode,this.https=new v.default(t),this.clientHttps=new m.default(t),this.activityService=new _.default(t),this.service=new E.default(t),this.factory=new y.default}},55383:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(25678));e.default=function(){this.createRequestBodyFromParam=function(t){var e=new i.default;return e.content=t.content,e.reply_id=t.replyId,e.discussion_label=t.discussionLabel,e.discussion_url=t.discussionUrl,e.anonymous_nickname=t.userNickname,e.context=t.context,e}}},33949:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(61079));e.default=function(){this.enabled=!1,this.moderateLinks=!1,this.linksWhitelist=[],this.moderatorProfileId="",this.dictionary=new i.default}},61079:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.reason="",this.words=[]}},18543:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(33949));e.default=function(){this.enabled=!1,this.clientId=null,this.automaticModeration=new i.default}},39838:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content="",this.replyId="",this.discussionLabel="",this.discussionUrl="",this.userNickname="",this.context=null}},77897:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.label="",this.discussionType="LEAGUE",this.discussionUrl=null,this.moderationType="USER",this.postsCount=0,this.pinnedPosts=[],this.lastPostId="",this.status="",this.deleted=!1,this.deletedAt="",this.deletedBy="",this.customFields=null,this.context=null,this.createdAt="",this.updatedAt=""}},90505:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(64800)),o=["CREATED_AT_ASC","CREATED_AT_DESC","POSTS_COUNT_ASC","POSTS_COUNT_DESC"],u=["ACTIVE","INACTIVE"],l=function(t){function e(e){var n=t.call(this,e)||this;return n.discussionIds=e&&e.discussionIds?e.discussionIds:null,n.label=e&&e.label?e.label:null,n.discussionUrl=e&&e.discussionUrl?e.discussionUrl:null,n.fromDate=e&&e.fromDate?e.fromDate:null,n.toDate=e&&e.toDate?e.toDate:null,n.fromCount=e&&e.fromCount?e.fromCount:null,n.toCount=e&&e.toCount?e.toCount:null,n.sort=e&&e.sort?e.sort:null,n.status=(null==e?void 0:e.status)||null,n.skipDeleted=e&&void 0!==e.skipDeleted?e.skipDeleted:null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return null!==this.discussionIds&&(e+="&discussion_ids=".concat(this.discussionIds.join(","))),null!==this.label&&(e+="&label=".concat(this.label)),null!==this.discussionUrl&&(e+="&discussion_url=".concat(this.discussionUrl)),null!==this.fromDate&&(e+="&from_date=".concat(this.fromDate)),null!==this.toDate&&(e+="&to_date=".concat(this.toDate)),null!==this.fromCount&&(e+="&from_count=".concat(this.fromCount)),null!==this.toCount&&(e+="&to_count=".concat(this.toCount)),this.sort&&o.includes(this.sort.toUpperCase())&&(e+="&sort=".concat(this.sort.toUpperCase())),this.status&&u.includes(this.status.toUpperCase())&&(e+="&status=".concat(this.status.toUpperCase())),null!==this.skipDeleted&&(e+="&skip_deleted=".concat(this.skipDeleted)),e},e}(s.default);e.default=l},39209:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.skipDeleted=e&&void 0!==e.skipDeleted?e.skipDeleted:null,n.skipModerated=e&&void 0!==e.skipModerated?e.skipModerated:null,n.sort=e&&e.sort?e.sort.toLocaleLowerCase():null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return null!==this.skipDeleted&&(e+="&skip_deleted=".concat(this.skipDeleted)),null!==this.skipModerated&&(e+="&skip_moderated=".concat(this.skipModerated)),this.sort&&(e+="&sort=".concat(this.sort)),e},e}(a(n(64800)).default);e.default=s},54804:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.fromDate=(null==e?void 0:e.fromDate)||null,n.toDate=(null==e?void 0:e.toDate)||null,n.entityIds=(null==e?void 0:e.entityIds)||null,n.entityType=(null==e?void 0:e.entityType)||null,n.contentType=(null==e?void 0:e.contentType)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return null!==this.fromDate&&(e+="&from_date=".concat(this.fromDate)),null!==this.toDate&&(e+="&to_date=".concat(this.toDate)),null!==this.entityIds&&this.entityIds.length>0&&(e+="&entity_ids=".concat(this.entityIds)),null!==this.contentType&&(e+="&content_type=".concat(this.contentType)),e},e}(a(n(64800)).default);e.default=s},44071:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.userId="",this.discussionId="",this.content="",this.repliesCount=0,this.replyId="",this.anonymousNickname="",this.reactions=[],this.reactionsCount=0,this.reports=[],this.reportsCount=0,this.versions=null,this.privatePost=!1,this.deleted=!1,this.deletedAt="",this.deletedBy="",this.moderated=!1,this.moderatedAt="",this.moderatedBy="",this.moderatedReason="",this.createdAt="",this.updatedAt=""}},42528:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.userModel=null,e}return i(e,t),e}(a(n(44071)).default);e.default=s},25678:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content="",this.reply_id="",this.discussion_label="",this.discussion_url="",this.anonymous_nickname="",this.context=null}},70377:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.postsCount=0}},29331:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(19448));e.default=function(){this.meta=new i.default,this.data=[]}},64858:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(19448));e.default=function(){this.meta=new i.default,this.data=[]}},19448:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.pagination={totalItems:0,nextPageStartsAfter:"",lastCommentCreateTimestamp:""}}},84071:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},51579:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type="",this.userIds=[],this.reactionCount=0}},43476:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(77897)),a=r(n(19448)),s=r(n(44071)),o=r(n(29331)),u=r(n(51579)),l=r(n(85789)),c=r(n(83687)),d=r(n(42528)),f=r(n(64858)),h=r(n(38872)),p=r(n(84071)),m=r(n(70377));e.default=function(){var t=this;this.remapToDiscussions=function(e){return e.meta=t.remapToMeta(e.meta),e.data=e.data.map((function(e){return t.remapToDiscussionById(e)})),e},this.remapToDiscussionById=function(t){var e=new i.default;return e.id=t.id,e.label=t.label,e.status=t.status,e.deleted=t.deleted,e.deletedAt=t.deleted_at,e.deletedBy=t.deleted_by,e.discussionType=t.discussion_type,e.discussionUrl=t.discussion_url,e.moderationType=t.moderation_type,e.postsCount=t.posts_count,e.pinnedPosts=t.pinned_posts,e.lastPostId=t.last_post_id,e.customFields=t.custom_fields,e.context=t.context,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e},this.remapToPostsForDiscussion=function(e,n){var r=new o.default,i=new f.default;return r.meta=t.remapToPostMeta(e.meta),r.data=e.data.map((function(e){return t.remapToPostByIdBasic(e)})),i.meta=t.remapToPostMeta(e.meta),i.data=e.data.map((function(e){return t.remapToPostByIdFull(e)})),"basic"===n?r:i},this.remapToPosts=function(e){var n=new p.default;return n.meta=t.remapToMeta(e.meta),n.data=e.data.map((function(e){return t.remapToPostByIdBasic(e)})),n},this.remapToPostMeta=function(t){var e=new a.default;return e.pagination.totalItems=t.pagination.total_items,e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e.pagination.lastCommentCreateTimestamp=t.pagination.last_comment_create_timestamp,e},this.remapToMeta=function(t){var e=new h.default;return e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e},this.remapToPostByIdBasic=function(e){var n=new s.default;return n.id=e.id,n.userId=e.user_id,n.discussionId=e.discussion_id,n.content=e.content,n.anonymousNickname=e.anonymous_nickname,n.reactionsCount=e.reactions_count,n.replyId=e.reply_id,n.reactions=e.reactions.length?e.reactions.map((function(e){return t.remapReactionsPost(e)})):e.reactions,n.repliesCount=e.replies_count,n.reports=e.reports.length?e.reports.map((function(e){return t.remapReportPost(e)})):e.reports,n.reportsCount=e.reports_count,n.versions=e.versions.length?e.versions.map((function(e){return t.remapVersionsPost(e)})):e.versions,n.privatePost=e.private_post,n.deleted=e.deleted,n.deletedAt=e.deleted_at,n.deletedBy=e.deleted_by,n.moderated=e.moderated,n.moderatedAt=e.moderated_at,n.moderatedBy=e.moderated_by,n.moderatedReason=e.moderated_reason,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapToPostByIdFull=function(e){var n=new d.default;return n.id=e.id,n.userId=e.user_id,n.discussionId=e.discussion_id,n.content=e.content,n.anonymousNickname=e.anonymous_nickname,n.reactionsCount=e.reactions_count,n.replyId=e.reply_id,n.reactions=e.reactions.length?e.reactions.map((function(e){return t.remapReactionsPost(e)})):e.reactions,n.repliesCount=e.replies_count,n.reports=e.reports.length?e.reports.map((function(e){return t.remapReportPost(e)})):e.reports,n.reportsCount=e.reports_count,n.versions=e.versions.length?e.versions.map((function(e){return t.remapVersionsPost(e)})):e.versions,n.privatePost=e.private_post,n.deleted=e.deleted,n.deletedAt=e.deleted_at,n.deletedBy=e.deleted_by,n.moderated=e.moderated,n.moderatedAt=e.moderated_at,n.moderatedBy=e.moderated_by,n.moderatedReason=e.moderated_reason,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapToPostCount=function(t){return t.map((function(t){var e=new m.default;return e.id=t.id,e.postsCount=t.posts_count,e}))},this.remapReactionsPost=function(t){var e=new u.default;return e.type=t.type,e.userIds=t.user_ids,e.reactionCount=t.reaction_count,e},this.remapVersionsPost=function(t){var e=new l.default;return e.content=t.content,e.updatedAt=t.updated_at,e},this.remapReportPost=function(t){var e=new c.default;return e.userId=t.user_id,e.reason=t.reason,e.reasonDetails=t.reason_details,e}}},83687:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.userId=null,this.reason="AD",this.reasonDetails=null}},85789:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.updatedAt="",this.content=""}},35230:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(14946),o=a(n(88900)),u=a(n(19685)),l=a(n(86409));e.default=function(t){var e=this;this.idSchema=null,this.profile=null,this.validator=null,this.idMapping=null,this.finalizePostFullModel=function(t){return r(e,void 0,void 0,(function(){var e,n,r=this;return i(this,(function(i){switch(i.label){case 0:return e=t.map((function(t){return t.userId})),[4,this.profile.getByIds(e)];case 1:return n=i.sent(),[2,t.map((function(t){return t.userModel=r.extractModelById(n,t.userId),t}))]}}))}))},this.finalizeTopDiscussionsFilters=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.idSchema!==s.IdSchemaEnum.NATIVE&&t.entityIds&&t.entityIds.length>0?(this.validator.validateFilters(t),[4,this.idMapping.getEntityIdsBySchemaId(Array.from(t.entityIds),t.entityType,s.IdSchemaEnum.NATIVE)]):[3,2];case 1:e=n.sent(),t.entityIds=e[t.entityType],n.label=2;case 2:return[2]}}))}))},this.extractModelById=function(t,e){if(t.length){var n=t.find((function(t){return t.id===e}));return n?(delete n.interests,n):null}return null},this.idSchema=t.idSchema,this.profile=new l.default(t),this.validator=new u.default(t),this.idMapping=new o.default(t)}},79198:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(86028));e.default=function(t){var e=this;this.facade=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.makePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.updatePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionsForUser=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGamePredictionsForUser(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getRankings(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},86028:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(91450)),o=a(n(86409)),u=a(n(23737)),l=a(n(38651)),c=a(n(2431)),d=a(n(39185));e.default=function(t){var e=this;this.https=null,this.validator=null,this.profile=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t&&(t=new u.default(t)),[4,this.https.getEventGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.getEventGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(n),[4,this.https.makeEventGamePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(a),[4,this.https.updateEventGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionsForUser=function(t,n,a,s){return r(e,void 0,void 0,(function(){var e,r,o;return i(this,(function(i){switch(i.label){case 0:return a&&(a=new l.default(a)),[4,this.https.getEventGamePredictionsForUser(t,n,a,s)];case 1:e=i.sent(),r=null,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.profile.getById(n).getInfo()];case 3:return r=i.sent(),[3,5];case 4:return o=i.sent(),console.error(o),[3,5];case 5:return e.data.forEach((function(t){t.profileModel=r})),[2,e]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s;return i(this,(function(i){switch(i.label){case 0:return n&&(n=new c.default(n)),[4,this.https.getEventGameRankings(t,n,a)];case 1:return e=i.sent(),r=e.data.map((function(t){return t.profileId})),s=[],r.length>0?[4,this.profile.getByIds(r)]:[3,3];case 2:s=i.sent(),e.data=e.data.map((function(t){return t.profileModel=s.find((function(e){return e.id===t.profileId}))||null,t})),i.label=3;case 3:return[2,e]}}))}))},this.https=new s.default(t),this.profile=new o.default(t),this.validator=new d.default(t.errorHandlingMode)}},58012:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.options=[]}},2703:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.min=0,this.max=0}},95106:(t,e)=>{"use strict";var n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.EventGameFixtureStatusEnum=e.EventGameOutcomeTypeEnum=void 0,(r=e.EventGameOutcomeTypeEnum||(e.EventGameOutcomeTypeEnum={})).BOOLEAN="BOOLEAN",r.NUMBER="NUMBER",r.ENUM="ENUM",r.FREE_INPUT="FREE_INPUT",function(t){t.ACTIVE="ACTIVE",t.SETTLED="SETTLED",t.VOID="VOID"}(n=e.EventGameFixtureStatusEnum||(e.EventGameFixtureStatusEnum={}));e.default=function(){this.id="",this.question="",this.status=n.ACTIVE,this.voidReason=null,this.points=0,this.outcomeType=null,this.validOutcomes=null,this.outcome=null}},74809:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.title=null,this.description=null,this.images=null,this.rules=null,this.customFields=null,this.type="EVENT",this.status=null,this.points=null,this.related=[],this.tiebreaker=null,this.predictionsCutoff=null,this.fixtures=[],this.createdAt=null,this.updatedAt=null}},3868:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},62372:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},11407:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},23737:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(64800)),o=n(40853),u=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.sortOrder=null,n.gameIds=null,n.status=(null==e?void 0:e.status)||null,n.sortOrder=(null==e?void 0:e.sortOrder)||null,n.gameIds=(null==e?void 0:e.gameIds)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.status&&Object.values(o.GameStatusEnum).includes(this.status)?(e+="&",e+="status=".concat(this.status)):null===this.status&&void 0===this.status||console.warn("The filter 'status' has the following INVALID value: ".concat(this.status,". It will be not passed as a query param in the URL. For more information visit our documentation.")),!this.sortOrder||"asc"!==this.sortOrder&&"desc"!==this.sortOrder&&"ASC"!==this.sortOrder&&"DESC"!==this.sortOrder?null===this.sortOrder&&void 0===this.sortOrder||console.warn("The filter 'sortOrder' has the following INVALID value: ".concat(this.sortOrder,". It will be not passed as a query param in the URL. For more information visit our documentation.")):(e+="&",e+="sort_order=".concat(this.sortOrder)),this.gameIds&&Array.isArray(this.gameIds)&&this.gameIds.length>0?(e+="&",e+="game_ids=".concat(this.gameIds)):null===this.gameIds&&void 0===this.gameIds||console.warn("The filter 'gameIds' has the following INVALID value: ".concat(this.gameIds,". It will be not passed as a query param in the URL. For more information visit our documentation.")),e},e}(s.default);e.default=u},38651:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64800)).default);e.default=s},2431:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64800)).default);e.default=s},85:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.correct=null,this.points=0}},77618:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.EventGamePredictionStatusEnum=void 0;var i,a=r(n(31836));!function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(i=e.EventGamePredictionStatusEnum||(e.EventGamePredictionStatusEnum={}));e.default=function(){this.id="",this.profileId="",this.profileModel=null,this.gameId="",this.gamePoints=null,this.bonusPoints=null,this.totalPoints=null,this.position=null,this.status=i.ACTIVE,this.fixtures=[],this.tiebreaker=new a.default,this.createdAt="",this.updatedAt=""}},31836:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.statTotal=0}},12882:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=""}},50992:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.fixtures=[]}},58096:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},86827:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=s(n(78923)),u=s(n(11407)),l=s(n(62372)),c=s(n(77618)),d=s(n(31836)),f=s(n(58096)),h=s(n(74809)),p=a(n(95106)),m=s(n(85)),v=s(n(3868));e.default=function(){var t=this;this.remapEventGames=function(e){var n=new u.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapEventGameById(e)})),n},this.remapEventGameById=function(e){var n=new h.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.rules=e.rules,n.customFields=e.custom_fields,n.images=e.images,n.type=e.type,n.status=e.status,n.points=e.points,n.related=e.related?t.remapRelated(e.related):e.related,n.tiebreaker=e.tiebreaker?t.remapEventGameTiebreaker(e.tiebreaker):e.tiebreaker,n.predictionsCutoff=e.predictions_cutoff,n.fixtures=e.fixtures?t.remapEventGameFixtures(e.fixtures):e.fixtures,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapPredictionToRequestBody=function(t){return t.map((function(t){return{id:t.id,prediction_type:t.predictionType,prediction:t.prediction}}))},this.remapPrediction=function(e){var n=new c.default;return n.id=e.id,n.profileId=e.profile_id,n.gameId=e.game_id,n.totalPoints=e.total_points,n.gamePoints=e.game_points,n.bonusPoints=e.bonus_points,n.position=e.position,n.status=e.status,n.fixtures=t.remapPredictionFixtures(e.fixtures),n.tiebreaker=e.tiebreaker?t.remapPredictionTiebreaker(e.tiebreaker):e.tiebreaker,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapPredictionsForUser=function(e){var n=new v.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRankings=function(e){var n=new f.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRelated=function(t){return t.map((function(t){var e=new o.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},this.remapPredictionFixtures=function(t){return t.map((function(t){var e=new m.default;switch(t.prediction_type){case p.EventGameOutcomeTypeEnum.BOOLEAN:case p.EventGameOutcomeTypeEnum.NUMBER:case p.EventGameOutcomeTypeEnum.ENUM:case p.EventGameOutcomeTypeEnum.FREE_INPUT:e=new m.default}return e.id=t.id,e.predictionType=t.prediction_type,e.prediction=t.prediction,e.points=t.points,e.correct=t.correct,e}))},this.remapPredictionTiebreaker=function(t){var e=new d.default;return e.statTotal=t.stat_total,e},this.remapEventGameFixtures=function(t){return t.map((function(t){var e=new p.default;switch(t.outcome_type){case p.EventGameOutcomeTypeEnum.BOOLEAN:case p.EventGameOutcomeTypeEnum.NUMBER:case p.EventGameOutcomeTypeEnum.ENUM:case p.EventGameOutcomeTypeEnum.FREE_INPUT:e=new p.default}return e.id=t.id,e.question=t.question,e.status=t.status,e.voidReason=t.void_reason,e.points=t.points,e.outcomeType=t.outcome_type,e.validOutcomes=t.valid_outcomes,e.outcome=t.outcome,e}))},this.remapEventGameTiebreaker=function(t){var e=new l.default;return e.statTiebreakerEnabled=t.stat_tiebreaker_enabled,e.statTotal=t.stat_total,e}}},39185:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(67900),o=n(4021),u=n(94904),l=a(n(16198)),c=n(95106),d=function(t){function e(e){var n=t.call(this,e)||this;return n.validatePrediction=function(t){t.fixtures&&Array.isArray(t.fixtures)&&0!==t.fixtures.length||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.REQUIRED_FIXTURES_FIELD);for(var e=["id","predictionType","prediction"],r=0,i=t.fixtures;r<i.length;r++){var a=i[r];(Object.keys(a).length!==e.length||Object.keys(a).some((function(t){return!e.includes(t)})))&&n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.INVALID_FIXTURES_FIELD),n.validatePredictionType(a.predictionType,a.prediction)}!t.tiebreaker||t.tiebreaker.statTotal&&Number.isInteger(t.tiebreaker.statTotal)||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,s.ErrorMessages.INVALID_TIEBREAKER_FIELD)},n.validatePredictionType=function(t,e){switch(t){case c.EventGameOutcomeTypeEnum.BOOLEAN:"boolean"!=typeof e&&n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,"Prediction must be a boolean for prediction type ".concat(t));break;case c.EventGameOutcomeTypeEnum.NUMBER:"number"==typeof e&&Number.isFinite(e)||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,"Prediction must be a number for prediction type ".concat(t));break;case c.EventGameOutcomeTypeEnum.ENUM:case c.EventGameOutcomeTypeEnum.FREE_INPUT:"string"==typeof e&&""!==e.trim()||n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,"Prediction must be a non-empty string for prediction type ".concat(t));break;default:n.throwException(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_METHOD_CALL,"Unknown prediction type: ".concat(t))}},n}return i(e,t),e}(l.default);e.default=d},18263:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},l=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var c=n(14946),d=n(4021),f=n(94904),h=n(5318),p=a(n(47686)),m=l(n(60595)),v=l(n(87059)),_=l(n(52793)),y=l(n(97782)),g=l(n(52061)),b=l(n(70946));e.default=function(t){var e=this;this.idSchema=null,this.clientHttps=null,this.footballHttps=null,this.predictorHttps=null,this.loyaltyHttps=null,this.service=null,this.getConfig=function(){return s(e,void 0,void 0,(function(){var t,e;return o(this,(function(n){switch(n.label){case 0:return[4,this.clientHttps.getConfig(p.FeatureConfigEnum.FANTASY)];case 1:return t=n.sent(),this.idSchema===c.IdSchemaEnum.NATIVE?[3,3]:(e=t,[4,this.service.remapCompetitions(u([],t.competitionsWhitelist,!0))]);case 2:e.competitionsWhitelist=n.sent(),n.label=3;case 3:return[2,t]}}))}))},this.getPlayersPoints=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i;return o(this,(function(a){switch(a.label){case 0:return[4,this.footballHttps.getPlayersPoints(t,n,r)];case 1:return e=a.sent(),i=e,[4,this.service.addPlayerModels(e.data)];case 2:return i.data=a.sent(),[2,e]}}))}))},this.getPlayerDetailedStatistics=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a;return o(this,(function(s){switch(s.label){case 0:return e="",this.idSchema===c.IdSchemaEnum.NATIVE?[3,2]:[4,this.service.remapPlayerIdToNative(n)];case 1:e=s.sent(),s.label=2;case 2:return[4,this.footballHttps.getPlayerDetailedStatistics(t,e||n,r)];case 3:return(i=s.sent()).meta.filters.playerId=n,a=i,[4,this.service.addMatchModels(i.data)];case 4:return a.data=s.sent(),[2,i]}}))}))},this.play=function(t,n,r,i){return s(e,void 0,void 0,(function(){var e,a,s,u,l,p;return o(this,(function(o){switch(o.label){case 0:return r&&Array.isArray(r)||this.service.throwException(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_METHOD_CALL,h.ErrorMessages.INVALID_PARAM+"playerIds"),i&&(e="playersRoles",i instanceof Map||this.service.throwException(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_METHOD_CALL,h.ErrorMessages.INVALID_PARAM+e),(a=Array.from(i.keys())).length||this.service.throwException(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_METHOD_CALL,h.ErrorMessages.INVALID_PARAM+e),a.every((function(t){return!r.includes(t)}))&&this.service.throwException(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_METHOD_CALL,h.ErrorMessages.INVALID_MAP_PLAYERS_ROLES_KEYS+r.join(",")),s=Array.from(i.values()),u=["CAPTAIN","VICE_CAPTAIN"],s.every((function(t){return u.includes(t.toLocaleUpperCase())}))||this.service.throwException(d.ErrorCodes.BAD_METHOD_CALL,f.ErrorStatuses.INVALID_METHOD_CALL,h.ErrorMessages.INVALID_MAP_PLAYERS_ROLES_VALUES+u.join(",")+". Case insensitive.")),l=null,this.idSchema===c.IdSchemaEnum.NATIVE?[3,2]:[4,this.service.remapPlayers(r,this.idSchema,c.IdSchemaEnum.NATIVE,i)];case 1:return p=o.sent(),l=g.default.createFantasyPrediction(t,n,p,i),[3,3];case 2:l=g.default.createFantasyPrediction(t,n,r,i),o.label=3;case 3:return[4,this.predictorHttps.makeFootballPrediction(l)];case 4:return[2,o.sent()]}}))}))},this.getMyPrediction=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i;return o(this,(function(a){switch(a.label){case 0:return e="".concat(t,"_").concat(n),(r=new y.default(null)).gameIds=[e],[4,this.predictorHttps.getMyPredictions(r)];case 1:return 0===(i=a.sent()).data.length?[2,null]:[2,i.data[0]]}}))}))},this.getPlayerStatistics=function(t,n,r){return s(e,void 0,void 0,(function(){var e;return o(this,(function(i){switch(i.label){case 0:return[4,this.getPlayerDetailedStatistics(t,n,r)];case 1:return e=i.sent(),[2,g.default.createFantasyPlayerStats(e)]}}))}))},this.getGameWeekStatistics=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyHttps.getTemplateBreakdownPoints(t)];case 1:return[2,e.sent()]}}))}))},this.idSchema=t.idSchema,this.clientHttps=new p.default(t),this.footballHttps=new m.default(t),this.service=new b.default(t),this.predictorHttps=new _.default(t),this.loyaltyHttps=new v.default(t)}},52061:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(58152)),a=r(n(68031)),s=["minutesPlayed","cleanSheets","concededGoals","saves","penaltySaved","penaltyCommitted","yellowCards","redCards","assists","foulsCommitted","ownGoals","goals","tackles","shotsOn"],o=(new Map).set("minutesPlayed","Minutes Played").set("cleanSheets","Clean Sheets").set("concededGoals","Goals Conceded").set("saves","Saves").set("penaltySaved","Penalties Saved").set("penaltyCommitted","Penalties Committed").set("yellowCards","Yellow Cards").set("redCards","Red Cards").set("assists","Assists").set("foulsCommitted","Fouls Committed").set("ownGoals","Own Goals").set("goals","Goals").set("tackles","Tackles").set("shotsOn","Shots On Target"),u=function(){function t(){}return t.createFantasyPrediction=function(t,e,n,r){var i=new a.default;return i.template_id=t||null,i.group_id=e||null,i.fixtures=(null==n?void 0:n.map((function(t){var e;return{player_id:t,match_type:"FOOTBALL",market:"PLAYER_PERFORMANCE",role:(null===(e=null==r?void 0:r.get(t))||void 0===e?void 0:e.toLocaleUpperCase())||null}})))||[],i},t.createFantasyPlayerStats=function(t){return s.map((function(e){var n=new i.default,r=t.data.reduce((function(t,n){return t+n.stats[e]}),0);return n.key=e,n.label=o.get(e),n.value=r,n}))},t}();e.default=u},46139:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(18263));e.default=function(t){var e=this;this.facade=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.facade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getPlayersPoints=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPlayersPoints(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getPlayerDetailedStatistics=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPlayerDetailedStatistics(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.play=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.play(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getMyPrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyPrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayerStatistics=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPlayerStatistics(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGameWeekStatistics=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGameWeekStatistics(t)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},4339:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.assists=null,this.shots=null,this.offsides=null,this.tackles=null,this.saves=null,this.minutesEqualOrOver60=null,this.minutesUnder60=null,this.yellowCards=null,this.redCards=null,this.goalsGoalkeeper=null,this.goalsDefender=null,this.goalsMidfielder=null,this.goalsForwards=null,this.penaltyGoals=null,this.ownGoals=null,this.cleanSheetsGoalkeeper=null,this.cleanSheetsDefender=null,this.cleanSheetsMidfielder=null,this.cleanSheetsForwards=null,this.shotsOn=null,this.foulsCommitted=null,this.penaltyCommitted=null,this.penaltyWon=null,this.penaltyMissed=null,this.concededGoals=null,this.caughtBall=null}},60516:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(4339)),a=r(n(71002));e.default=function(){this.enabled=!1,this.clientId=null,this.addPointsToProfileTotal=!1,this.coefficients=new i.default,this.players=new a.default,this.multipliers=null,this.competitionsWhitelist=[]}},47626:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.captain=null,this.viceCaptain=null}},71002:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.total=null,this.minGoalkeepers=null,this.maxGoalkeepers=null,this.minDefenders=null,this.maxDefenders=null,this.minMidfielders=null,this.maxMidfielders=null,this.minStrikers=null,this.maxStrikers=null}},16808:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(63096));e.default=function(){this.meta=new i.default,this.data=[]}},58152:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.key=null,this.label=null,this.value=null}},55769:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(52158));e.default=function(){this.meta=new i.default,this.data=[]}},68031:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.template_id=null,this.group_id=null,this.fixtures=[]}},63096:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(54563));e.default=function(){this.filters=new i.default}},52158:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(21890));e.default=function(){this.filters=new i.default}},54563:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.templateId=null,this.playerId=null}},21890:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.templateId=null}},46472:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.total=null,this.minutesPlayed=null,this.yellowCards=null,this.redCards=null,this.goals=null,this.penaltyGoals=null,this.ownGoals=null,this.assists=null,this.cleanSheets=null,this.shots=null,this.shotsOn=null,this.offsides=null,this.foulsCommitted=null,this.penaltyCommitted=null,this.penaltyWon=null,this.penaltyMissed=null,this.tackles=null,this.concededGoals=null,this.caughtBall=null,this.saves=null}},69922:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(46472)),a=r(n(83327));e.default=function(){this.matchId=null,this.matchModel=null,this.points=new i.default,this.stats=new a.default}},98571:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.playerId=null,this.playerModel=null,this.points=null,this.rank=null}},83327:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.minutesPlayed=null,this.yellowCards=null,this.redCards=null,this.goals=null,this.penaltyGoals=null,this.penaltyCommitted=null,this.penaltyWon=null,this.penaltyMissed=null,this.penaltySaved=null,this.penaltyReceived=null,this.ownGoals=null,this.assists=null,this.cleanSheets=null,this.shots=null,this.shotsOn=null,this.shotsBlocked=null,this.offsides=null,this.foulsCommitted=null,this.foulsWon=null,this.tackles=null,this.tacklesBlocks=null,this.tacklesInterceptions=null,this.concededGoals=null,this.caughtBall=null,this.saves=null,this.passes=null,this.crosses=null,this.interceptions=null,this.keyPasses=null,this.passesAccuracy=null,this.duels=null,this.duelsWon=null,this.dribblesAttempts=null,this.dribblesSuccess=null,this.dribblesPast=null}},9260:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(16808)),a=r(n(55769)),s=r(n(46472)),o=r(n(69922)),u=r(n(98571)),l=r(n(83327));e.default=function(){var t=this;this.remapPlayersPoints=function(e){var n=new a.default;return n.meta.filters.templateId=e.meta.filters.template_id,n.data=e.data.map((function(e){return t.remapPlayersPointsData(e)})),n},this.remapPlayersPointsData=function(t){var e=new u.default;return e.playerId=t.player_id,e.points=t.points,e.rank=t.rank,e},this.remapPlayerDetailedStats=function(e){var n=new i.default;return n.meta.filters.templateId=e.meta.filters.template_id,n.meta.filters.playerId=e.meta.filters.player_id,n.data=e.data.map((function(e){return t.remapPlayerDetailedData(e)})),n},this.remapPlayerDetailedData=function(e){var n=new o.default;return n.matchId=e.match_id,n.points=e.points?t.remapPlayerDetailedPoints(e.points):null,n.stats=e.stats?t.remapPlayerDetailedStatsData(e.stats):null,n},this.remapPlayerDetailedPoints=function(t){var e=new s.default;return e.total=t.total,e.minutesPlayed=t.minutes_played,e.yellowCards=t.yellow_cards,e.redCards=t.red_cards,e.goals=t.goals,e.penaltyGoals=t.penalty_goals,e.ownGoals=t.own_goals,e.assists=t.assists,e.cleanSheets=t.clean_sheets,e.shots=t.shots,e.shotsOn=t.shots_on,e.offsides=t.offsides,e.foulsCommitted=t.fouls_committed,e.penaltyCommitted=t.penalty_committed,e.penaltyWon=t.penalty_won,e.penaltyMissed=t.penalty_missed,e.tackles=t.tackles,e.concededGoals=t.conceded_goals,e.caughtBall=t.caught_ball,e.saves=t.saves,e},this.remapPlayerDetailedStatsData=function(t){var e=new l.default;return e.minutesPlayed=t.minutes_played,e.yellowCards=t.yellow_cards,e.redCards=t.red_cards,e.goals=t.goals,e.penaltyGoals=t.penalty_goals,e.penaltyCommitted=t.penalty_committed,e.penaltyWon=t.penalty_won,e.penaltyMissed=t.penalty_missed,e.penaltySaved=t.penalty_saved,e.penaltyReceived=t.penalty_received,e.ownGoals=t.own_goals,e.assists=t.assists,e.cleanSheets=t.clean_sheets,e.shots=t.shots,e.shotsOn=t.shots_on,e.shotsBlocked=t.shots_blocked,e.offsides=t.offsides,e.foulsCommitted=t.fouls_committed,e.foulsWon=t.fouls_won,e.tackles=t.tackles,e.tacklesBlocks=t.tackles_blocks,e.tacklesInterceptions=t.tackles_interceptions,e.concededGoals=t.conceded_goals,e.caughtBall=t.caught_ball,e.saves=t.saves,e.passes=t.passes,e.crosses=t.crosses,e.interceptions=t.interceptions,e.keyPasses=t.key_passes,e.passesAccuracy=t.passes_accuracy,e.duels=t.duels,e.duelsWon=t.duels_won,e.dribblesAttempts=t.dribbles_attempts,e.dribblesSuccess=t.dribbles_success,e.dribblesPast=t.dribbles_past,e}}},70946:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(14946),o=n(4021),u=n(94904),l=a(n(68097)),c=a(n(62535)),d=n(5318),f=a(n(88900)),h=a(n(48808));e.default=function(t){var e=this;this.idMapping=null,this.idSchema=null,this.errorHandlingModel=null,this.football=null,this.remapCompetitions=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e={competition:t},[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,s.IdSchemaEnum.NATIVE,this.idSchema)];case 1:return[2,n.sent().competition]}}))}))},this.remapPlayers=function(t,n,a,s){return r(e,void 0,void 0,(function(){var e,r,o,u,l,c,d,f,h,p,m,v;return i(this,(function(i){switch(i.label){case 0:return e={player:Array.from(t)},[4,this.idMapping.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:if(r=i.sent(),s){for(o=new Map,u=0,l=Array.from(s.entries());u<l.length;u++)c=l[u],d=c[0],v=c[1],(m=r.get(d))&&o.set(m,v);for(s.clear(),f=0,h=Array.from(o.entries());f<h.length;f++)p=h[f],m=p[0],v=p[1],s.set(m,v)}return[2,Array.from(r.values())]}}))}))},this.addPlayerModels=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=t.map((function(t){return t.playerId})),[4,this.football.footballFacade.getPlayersMapWithNativeIds(e)];case 1:return n=r.sent(),t.forEach((function(t){var e;t.playerModel=Object.keys(n).length&&n[t.playerId]||null,t.playerId=(null===(e=t.playerModel)||void 0===e?void 0:e.id)||t.playerId})),[2,t]}}))}))},this.remapPlayerIdToNative=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.idMapping.getEntityIdBySchemaId("player",t)];case 1:return(e=n.sent())?[2,e.id]:(this.throwException(o.ErrorCodes.NOT_FOUND,u.ErrorStatuses.ID_MAPPING_NOT_FOUND,d.ErrorMessages.ID_MAPPING_NOT_FOUND+t),[2])}}))}))},this.addMatchModels=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=t.map((function(t){return t.matchId})),[4,this.football.footballFacade.getMatchesMapWithNativeIds(e)];case 1:return n=r.sent(),t.forEach((function(t){var e;t.matchModel=Object.keys(n).length&&n[t.matchId]||null,t.matchId=(null===(e=t.matchModel)||void 0===e?void 0:e.id)||t.matchId})),[2,t]}}))}))},this.throwException=function(t,n,r){if("standard"===e.errorHandlingModel)throw new c.default(t,n,r);throw new l.default(t,n,r)},this.idSchema=t.idSchema,this.errorHandlingModel=t.errorHandlingMode,this.football=new h.default(t),this.idMapping=new f.default(t)}},55815:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.FootballMatchStatusEnum=void 0,(n=e.FootballMatchStatusEnum||(e.FootballMatchStatusEnum={})).NONE="none",n.FINISHED="finished",n.CANCELLED="cancelled",n.POSTPONED="postponed",n.NOT_STARTED="not_started",n.FIRST_HALF="1st_half",n.SECOND_HALF="2nd_half",n.FINISHED_AFTER_AWARDED_WIN="finished_after_awarded_win",n.TO_FINISH="to_finish",n.FINISHED_AET="finished_aet",n.HALFTIME="halftime",n.FINISHED_AP="finished_ap",n.INTERRUPTED="interrupted",n.KICK_OFF_DELAYED="kick_off_delayed",n.ABANDONED="abandoned",n.WAITING_FOR_PENALTY="waiting_for_penalty",n.PENALTY="penalty",n.PAUSE="pause",n.EXTRA_TIME_1ST_HALF="extra_time_1st_half",n.EXTRA_TIME_END_OF_1ST_HALF="extra_time_end_of_1st_half",n.EXTRA_TIME_2ND_HALF="extra_time_2nd_half",n.WAITING_FOR_EXTRA_TIME="waiting_for_extra_time",n.NO_INFO_YET="no_info_yet",n.AWAITING_INFO="awaiting_info",n.FINISHED_ASG="finished_asg"},97e3:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(12754)),o=n(90712);e.default=function(t,e,n){var a=this;this.localStorage=null,this.https=null,this.idMapping=null,this.getCompetitionsIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,8,,9]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId(["".concat(t.countryId)],"country","native")]:[3,2]:[3,5];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),t.competitionIds=a.competition,i.label=4;case 4:if(n)return[2,[]];i.label=5;case 5:return[4,this.getCompetitions(t,e)];case 6:return o=i.sent(),[4,this.idMapping.remapEntities(o,"competition")];case 7:return[2,i.sent()];case 8:throw u=i.sent(),console.warn("There was a problem browsing all of the competitions",u),u;case 9:return[2]}}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(a,void 0,void 0,(function(){var e,n,r,a,u,l;return i(this,(function(i){switch(i.label){case 0:return e=new Map,n=t.length,r=new s.default({competitionIds:t,limit:n}),[4,this.getCompetitions(r)];case 1:return(a=i.sent()).sort((function(t,e){return t.id.localeCompare(e.id)})),u=(0,o.sortArrayInAscOrder)(t),[4,this.idMapping.remapEntities(a,"competition")];case 2:return l=i.sent(),u.forEach((function(t,n){return e.set(t,l[n])})),[2,e]}}))}))},this.getCompetitions=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return n=null,e=e||!1,[4,this.localStorage.getCompetitionsLength()];case 1:if(i.sent())return[3,7];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.https.getCompetitions()];case 3:return n=i.sent(),[3,5];case 4:throw r=i.sent(),console.warn("There was a problem retrieving all competitions",r),r;case 5:return[4,this.localStorage.setCompetitions(n)];case 6:i.sent(),i.label=7;case 7:return[4,this.localStorage.getCompetitions(t)];case 8:return[2,i.sent()]}}))}))},this.getCompetitionByIdIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"competition","native")];case 1:return n=i.sent(),r=n.competition[0],[4,this.getCompetitionById(r,e)];case 2:return a=i.sent(),[4,this.idMapping.remapEntities(a,"competition")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following competition:".concat(t),s),s;case 5:return[2]}}))}))},this.getCompetitionById=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getCompetitionById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the competition with the following id: ".concat(t),n),n;case 3:return[2]}}))}))},this.getTopCompetitionsIdMapping=function(t){return r(a,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopCompetitions(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"competition")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top competitions",n),n;case 4:return[2]}}))}))},this.getTopCompetitions=function(t){return r(a,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopCompetitions(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top competitions",e),e;case 3:return[2]}}))}))},this.localStorage=t,this.idMapping=n,this.https=e}},48350:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,i){var a=this;this.localCache=null,this.https=null,this.idMapping=null,this.getCountriesWithIdMapping=function(t){return n(a,void 0,void 0,(function(){var e,n;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getCountries(t)];case 1:return e=r.sent(),[2,this.idMapping.remapEntities(e,"country")];case 2:throw n=r.sent(),console.warn("There was a problem browsing countries as football entities",n),n;case 3:return[2]}}))}))},this.getCountries=function(t){return n(a,void 0,void 0,(function(){var e,n,i;return r(this,(function(r){switch(r.label){case 0:return t=t||!1,[4,this.localCache.getFootballCountries()];case 1:if((e=r.sent())&&e.length>0)return[2,e];r.label=2;case 2:return r.trys.push([2,5,,6]),[4,this.https.getCountries(t)];case 3:return n=r.sent(),[4,this.localCache.setFootballCountries(n)];case 4:return r.sent(),[2,n];case 5:throw i=r.sent(),console.warn("There was a problem retrieving countries as football entities",i),i;case 6:return[2]}}))}))},this.localCache=t,this.idMapping=i,this.https=e}},4289:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(48350)),o=a(n(97e3)),u=a(n(39693)),l=a(n(44272)),c=a(n(34545)),d=a(n(82140)),f=a(n(74410));e.default=function(t,e,n,a){var h=this;this.countriesFacade=null,this.competitionsFacade=null,this.teamsFacade=null,this.playerFacade=null,this.matchFacade=null,this.searchFacade=null,this.validator=null,this.getCountries=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.countriesFacade.getCountriesWithIdMapping(t)]}))}))},this.getCompetitions=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionsIdMapping(t,e)]}))}))},this.getCompetitionById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(t,e)]}))}))},this.getTopCompetitions=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.competitionsFacade.getTopCompetitionsIdMapping(t)]}))}))},this.getCompetitionsMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.competitionsFacade.getCompetitionsMapWithNativeIds(t)];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamsIdMapping(t,e)]}))}))},this.getTeamById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamByIdIdMapping(t,e)]}))}))},this.getTopTeams=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.teamsFacade.getTopTeamsIdMapping(t)]}))}))},this.getNextMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(t,e)]}))}))},this.getPrevMatchForTeam=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(t,e)]}))}))},this.getTeamsMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.teamsFacade.getTeamsMapWithNativeIds(t)];case 1:return[2,e.sent()]}}))}))},this.getPlayers=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayersIdMapping(t,e)]}))}))},this.getPlayerById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayerIdMapping(t,e)]}))}))},this.getTopPlayers=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getTopPlayersIdMapping(t)]}))}))},this.getNextMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(t,e)]}))}))},this.getPrevMatchForPlayer=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(t,e)]}))}))},this.getPlayersMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.playerFacade.getPlayersMapWithNativeIds(t)]}))}))},this.getMatches=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchesIdMapping(t,e)]}))}))},this.getMatchesMapWithNativeIds=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){return[2,this.matchFacade.getMatchesMapWithNativeIds(t)]}))}))},this.getMatchById=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchIdMapping(t,e)]}))}))},this.search=function(t,e){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.searchFacade.searchIdMapping(t,e)]}))}))},this.getTeamForm=function(t,e,n){return r(h,void 0,void 0,(function(){var r,a,s,o,u;return i(this,(function(i){switch(i.label){case 0:return this.validator.validateTeamFormArguments(t,e),r=(null==e?void 0:e.direction)||"ltr",a={teamIds:[t],competitionIds:e&&e.competitionId?[e.competitionId]:null,status:"finished",limit:(null==e?void 0:e.limit)||5,sortField:"date",sortOrder:"desc"},[4,this.matchFacade.getMatchesIdMapping(a,n)];case 1:return s=i.sent(),(o={teamId:t,matches:[]}).matches=s.data.map((function(e){var n,r,i=e.homeTeam.id===t,a=null!==(n=e.scores.ftScore.homeGoals)&&void 0!==n?n:0,s=null!==(r=e.scores.ftScore.awayGoals)&&void 0!==r?r:0;return{matchModel:e,isHomeGame:i,result:i?a>s?"W":a<s?"L":"D":s>a?"W":s<a?"L":"D"}})),"ltr"===r&&(u=Array.from(o.matches),o.matches=u.reverse()),[2,o]}}))}))},this.countriesFacade=new s.default(e,n,a),this.competitionsFacade=new o.default(e,n,a),this.teamsFacade=new u.default(t,n,a),this.playerFacade=new l.default(t,n,a),this.matchFacade=new c.default(t,n,a),this.searchFacade=new d.default(n,a),this.validator=new f.default(t)}},34545:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(90712),u=s(n(86134)),l=s(n(89582));e.default=function(t,e,n){var s=this;this.https=null,this.idMapping=null,this.footballService=null,this.getMatchesIdMapping=function(t,e){return r(s,void 0,void 0,(function(){var n,r,s,o,l,c,d,f;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,12,,13]),t?(t=new u.default(t)).countryIds&&t.countryIds.length>0?[4,this.idMapping.getEntityIdsBySchemaId(t.countryIds,"country","native")]:[3,2]:[3,8];case 1:n=i.sent(),t.countryIds=n.country,i.label=2;case 2:return t.competitionIds&&t.competitionIds.length>0?[4,this.idMapping.getEntityIdsBySchemaId(t.competitionIds,"competition","native")]:[3,4];case 3:r=i.sent(),t.competitionIds=r.competition,i.label=4;case 4:return t.matchIds&&t.matchIds.length>0?[4,this.idMapping.getEntityIdsBySchemaId(t.matchIds,"match","native")]:[3,6];case 5:s=i.sent(),t.matchIds=s.match,i.label=6;case 6:return t.teamIds&&t.teamIds.length>0?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,8];case 7:o=i.sent(),t.teamIds=o.team,i.label=8;case 8:return[4,this.getMatches(t,e)];case 9:return l=i.sent(),c=l,[4,this.footballService.setAvailableMarketsForMatch(a([],l.data,!0))];case 10:return c.data=i.sent(),d=l,[4,this.idMapping.remapEntities(l.data,"match")];case 11:return d.data=i.sent(),[2,l];case 12:throw f=i.sent(),console.warn("There was a problem browsing the matches",f),f;case 13:return[2]}}))}))},this.getMatchesWithNativeIds=function(t){return r(s,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=t.length,n=new u.default({matchIds:t,limit:e}),[4,this.getMatches(n)];case 1:return(r=i.sent()).data.sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(r.data,"match")];case 2:return[2,i.sent()]}}))}))},this.getMatchesMapWithNativeIds=function(t){return r(s,void 0,void 0,(function(){var e,n,r,a,s,l;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,o.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getMatchesWithNativeIds(Array.from(n))];case 1:return r=i.sent(),n.length===r.length?[3,3]:(a=new u.default({matchIds:n,limit:n.length}),[4,this.getMatches(a)]);case 2:s=i.sent(),l=n.filter((function(t){if(s.data.every((function(e){return e.id!==t})))return t})),n=n.filter((function(t){if(!l.includes(t))return t})),i.label=3;case 3:return n.forEach((function(t,n){return e[t]=r[n]})),[2,e]}}))}))},this.getMatches=function(t,e){return r(s,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getMatches(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the matches",n),n;case 3:return[2]}}))}))},this.getMatchIdMapping=function(t,e){return r(s,void 0,void 0,(function(){var n,r,a,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),[4,this.idMapping.getEntityIdsBySchemaId([t],"match","native")];case 1:return n=i.sent(),[4,this.getMatchById(n.match[0],e)];case 2:return r=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(r)];case 3:return a=i.sent(),[4,this.idMapping.remapEntities(a,"match")];case 4:return[2,i.sent()];case 5:throw s=i.sent(),console.warn("There was a problem browsing the following match: ".concat(t),s),s;case 6:return[2]}}))}))},this.getMatchById=function(t,e){return r(s,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getMatchById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following match: ".concat(t),n),n;case 3:return[2]}}))}))},this.https=e,this.idMapping=n,this.footballService=new l.default(t)}},44272:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(26477)),o=n(90712),u=a(n(89582));e.default=function(t,e,n){var a=this;this.https=null,this.footballService=null,this.idMapping=null,this.getPlayersIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a,o,u,l,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([t.countryId],"country","native")]:[3,2]:[3,7];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.playerIds?[4,this.idMapping.getEntityIdsBySchemaId(t.playerIds,"player","native")]:[3,4];case 3:0===(a=i.sent()).player.length&&(n=!0),t.playerIds=a.player,i.label=4;case 4:return t.scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,6];case 5:0===(o=i.sent()).competition.length&&(n=!0),t.scope=o.competition,i.label=6;case 6:if(n)return[2,[]];i.label=7;case 7:return[4,this.getPlayers(t,e)];case 8:return u=i.sent(),l=u,[4,this.idMapping.remapEntities(u.data,"player")];case 9:return l.data=i.sent(),[2,u];case 10:throw c=i.sent(),console.warn("There was a problem browsing the players",c),c;case 11:return[2]}}))}))},this.getPlayersWithNativeIds=function(t){return r(a,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=t.length,n=new s.default({playerIds:t,limit:e}),[4,this.getPlayers(n)];case 1:return(r=i.sent()).data.sort((function(t,e){return t.id.localeCompare(e.id)})),[4,this.idMapping.remapEntities(r.data,"player")];case 2:return[2,i.sent()]}}))}))},this.getPlayersMapWithNativeIds=function(t){return r(a,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,o.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getPlayersWithNativeIds(Array.from(n))];case 1:return r=i.sent(),n.forEach((function(t,n){return e[t]=r[n]})),[2,e]}}))}))},this.getPlayers=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getPlayers(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the players",n),n;case 3:return[2]}}))}))},this.getPlayerIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),[4,this.getPlayerById(n.player[0],e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"player")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following player:".concat(t),a),a;case 5:return[2]}}))}))},this.getPlayerById=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getPlayerById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following player: ".concat(t),n),n;case 3:return[2]}}))}))},this.getTopPlayersIdMapping=function(t){return r(a,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopPlayers(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"player")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top players",n),n;case 4:return[2]}}))}))},this.getTopPlayers=function(t){return r(a,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopPlayers(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top players",e),e;case 3:return[2]}}))}))},this.getNextMatchForPlayerIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),t=n.player[0],[4,this.getNextMatchForPlayer(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the next match for player:".concat(t),a),a;case 5:return[2]}}))}))},this.getNextMatchForPlayer=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getNextMatchForPlayer(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for player: ".concat(t),r),r;case 4:return[2]}}))}))},this.getPrevMatchForPlayerIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"player","native")];case 1:return n=i.sent(),t=n.player[0],[4,this.getPrevMatchForPlayer(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the previous match for player:".concat(t),a),a;case 5:return[2]}}))}))},this.getPrevMatchForPlayer=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getPrevMatchForPlayer(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for player: ".concat(t),r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new u.default(t)}},82140:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(40604));e.default=function(t,e){var n=this;this.https=null,this.idMapping=null,this.searchIdMapping=function(t,e){return r(n,void 0,void 0,(function(){var n,r,a,o,u,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),(t=new s.default(t)).scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,2];case 1:n=i.sent(),t.scope=n.competition,i.label=2;case 2:return[4,this.search(t,e)];case 3:return(r=i.sent()).teams&&r.teams.length>0?[4,this.idMapping.remapEntities(r.teams,"team")]:[3,5];case 4:a=i.sent(),r.teams=a,i.label=5;case 5:return r.players&&r.players.length>0?[4,this.idMapping.remapEntities(r.players,"player")]:[3,7];case 6:o=i.sent(),r.players=o,i.label=7;case 7:return r.competitions&&r.competitions.length>0?[4,this.idMapping.remapEntities(r.competitions,"competition")]:[3,9];case 8:u=i.sent(),r.competitions=u,i.label=9;case 9:return[2,r];case 10:throw l=i.sent(),console.warn("There was a problem with browsing the search result",l),l;case 11:return[2]}}))}))},this.search=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.https.search(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the search response",n),n;case 3:return[2]}}))}))},this.https=t,this.idMapping=e}},39693:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(59920)),o=a(n(89582)),u=n(90712);e.default=function(t,e,n){var a=this;this.footballService=null,this.https=null,this.idMapping=null,this.getTeamsIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a,o,u,l,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),n=!1,t?(t=new s.default(t)).countryId?[4,this.idMapping.getEntityIdsBySchemaId(["".concat(t.countryId)],"country","native")]:[3,2]:[3,6];case 1:0===(r=i.sent()).country.length&&(n=!0),t.countryId=r.country[0],i.label=2;case 2:return t.scope?[4,this.idMapping.getEntityIdsBySchemaId(t.scope,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),t.scope=a.competition,i.label=4;case 4:return t.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,6];case 5:0===(o=i.sent()).team.length&&(n=!0),t.teamIds=o.team,i.label=6;case 6:return n?[2,[]]:[4,this.getTeams(t,e)];case 7:return u=i.sent(),l=u,[4,this.idMapping.remapEntities(u.data,"team")];case 8:return l.data=i.sent(),[2,u];case 9:throw c=i.sent(),console.warn("There was a problem browsing all teams",c),c;case 10:return[2]}}))}))},this.getTeamsMapWithNativeIds=function(t){return r(a,void 0,void 0,(function(){var e,n,r,a,o,l;return i(this,(function(i){switch(i.label){case 0:return e=new Map,n=t.length,r=new s.default({teamIds:t,limit:n}),[4,this.getTeams(r)];case 1:return(a=i.sent().data).sort((function(t,e){return t.id.localeCompare(e.id)})),o=(0,u.sortArrayInAscOrder)(t),[4,this.idMapping.remapEntities(a,"team")];case 2:return l=i.sent(),o.forEach((function(t,n){return e.set(t,l[n])})),[2,e]}}))}))},this.getTeams=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTeams(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving all teams",n),n;case 3:return[2]}}))}))},this.getTeamByIdIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getTeamById(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"team")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following team:".concat(t),a),a;case 5:return[2]}}))}))},this.getTeamById=function(t,e){return r(a,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTeamById(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following team: ".concat(t),n),n;case 3:return[2]}}))}))},this.getTopTeamsIdMapping=function(t){return r(a,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopTeams(t)];case 1:return e=r.sent(),[4,this.idMapping.remapEntities(e,"team")];case 2:return[2,r.sent()];case 3:throw n=r.sent(),console.warn("There was a problem browsing the top teams",n),n;case 4:return[2]}}))}))},this.getTopTeams=function(t){return r(a,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTopTeams(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the top teams",e),e;case 3:return[2]}}))}))},this.getNextMatchForTeamIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getNextMatchForTeam(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the next match for the following team:".concat(t),a),a;case 5:return[2]}}))}))},this.getNextMatchForTeam=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getNextMatchForTeam(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the next match for the following team: ".concat(t),r),r;case 4:return[2]}}))}))},this.getPrevMatchForTeamIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([t],"team","native")];case 1:return n=i.sent(),t=n.team[0],[4,this.getPrevMatchForTeam(t,e)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the previous match for the following team:".concat(t),a),a;case 5:return[2]}}))}))},this.getPrevMatchForTeam=function(t,e){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),e=e||!1,[4,this.https.getPrevMatchForTeam(t,e)];case 1:return n=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the previous match for the following team: ".concat(t),r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new o.default(t)}},48808:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(88900)),o=a(n(60595)),u=a(n(4289)),l=a(n(78358)),c=a(n(93165)),d=function(){function t(t){var e=this;this.https=null,this.idMapping=null,this.localCache=null,this.footballFacade=null,this.getCountries=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCountries(t)];case 1:return[2,e.sent()]}}))}))},this.getCompetitions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCompetitions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getCompetitionById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getCompetitionById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopCompetitions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopCompetitions(t)];case 1:return[2,e.sent()]}}))}))},this.getTeams=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeams(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTeamById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeamById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopTeams=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopTeams(t)];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForTeam=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getNextMatchForTeam(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPrevMatchForTeam=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPrevMatchForTeam(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPlayers(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPlayerById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPlayerById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTopPlayers=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTopPlayers(t)];case 1:return[2,e.sent()]}}))}))},this.getNextMatchForPlayer=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getNextMatchForPlayer(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPrevMatchForPlayer=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getPrevMatchForPlayer(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMatches=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getMatches(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMatchById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getMatchById(t,n)];case 1:return[2,e.sent()]}}))}))},this.search=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.search(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTeamForm=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.footballFacade.getTeamForm(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.https=new o.default(t),this.idMapping=new s.default(t),this.localCache=(new l.default).createLocalCacheInstance(t.idSchema),this.footballFacade=new u.default(t,this.localCache,this.https,this.idMapping),this.footballHelpers=new c.default}return Object.defineProperty(t.prototype,"helpers",{get:function(){return this.footballHelpers},enumerable:!1,configurable:!0}),t}();e.default=d},93165:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(71732)),a=function(){function t(){this.matchStatusHelper=new i.default}return t.prototype.getMatchStatusEnum=function(t){return this.matchStatusHelper.getMatchEventStatus(t)},t.prototype.isMatchUpcoming=function(t){return this.matchStatusHelper.isUpcoming(t)},t.prototype.isMatchLive=function(t){return this.matchStatusHelper.isLive(t)},t.prototype.isMatchFinished=function(t){return this.matchStatusHelper.isFinished(t)},t}();e.default=a},71732:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(55815),i=function(){function t(){this.ALL_FINISHED_STATUSES=[r.FootballMatchStatusEnum.FINISHED,r.FootballMatchStatusEnum.CANCELLED,r.FootballMatchStatusEnum.INTERRUPTED,r.FootballMatchStatusEnum.ABANDONED,r.FootballMatchStatusEnum.FINISHED_AFTER_AWARDED_WIN,r.FootballMatchStatusEnum.FINISHED_AET,r.FootballMatchStatusEnum.FINISHED_AP,r.FootballMatchStatusEnum.FINISHED_ASG,r.FootballMatchStatusEnum.TO_FINISH],this.ALL_UPCOMING_STATUSES=[r.FootballMatchStatusEnum.NOT_STARTED,r.FootballMatchStatusEnum.KICK_OFF_DELAYED],this.ALL_LIVE_STATUSES=[r.FootballMatchStatusEnum.FIRST_HALF,r.FootballMatchStatusEnum.SECOND_HALF,r.FootballMatchStatusEnum.HALFTIME,r.FootballMatchStatusEnum.WAITING_FOR_PENALTY,r.FootballMatchStatusEnum.WAITING_FOR_EXTRA_TIME,r.FootballMatchStatusEnum.PENALTY,r.FootballMatchStatusEnum.PAUSE,r.FootballMatchStatusEnum.EXTRA_TIME_1ST_HALF,r.FootballMatchStatusEnum.EXTRA_TIME_2ND_HALF,r.FootballMatchStatusEnum.EXTRA_TIME_END_OF_1ST_HALF,r.FootballMatchStatusEnum.AWAITING_INFO]}return t.prototype.getMatchEventStatus=function(t){if(!t||!t.type||!t.subType)return r.FootballMatchStatusEnum.NO_INFO_YET;var e=t.type.toLowerCase(),n=t.subType.toLowerCase();return"finished"===e?"awarded_win"===n?r.FootballMatchStatusEnum.FINISHED_AFTER_AWARDED_WIN:"aet"===n?r.FootballMatchStatusEnum.FINISHED_AET:"ap"===n?r.FootballMatchStatusEnum.FINISHED_AP:"asg"===n?r.FootballMatchStatusEnum.FINISHED_ASG:r.FootballMatchStatusEnum.FINISHED:"notstarted"===e?"postponed"===n?r.FootballMatchStatusEnum.POSTPONED:"delayed"===n?r.FootballMatchStatusEnum.KICK_OFF_DELAYED:r.FootballMatchStatusEnum.NOT_STARTED:"inprogress"===e?"1st_half"===n?r.FootballMatchStatusEnum.FIRST_HALF:"2nd_half"===n?r.FootballMatchStatusEnum.SECOND_HALF:"halftime"===n?r.FootballMatchStatusEnum.HALFTIME:"penalty"===n?r.FootballMatchStatusEnum.PENALTY:"waiting_penalty"===n?r.FootballMatchStatusEnum.WAITING_FOR_PENALTY:"pause"===n?r.FootballMatchStatusEnum.PAUSE:"extra_time_1st_half"===n?r.FootballMatchStatusEnum.EXTRA_TIME_1ST_HALF:"extra_time_2nd_half"===n?r.FootballMatchStatusEnum.EXTRA_TIME_2ND_HALF:"extra_time_halftime"===n?r.FootballMatchStatusEnum.EXTRA_TIME_END_OF_1ST_HALF:"waiting_extra_time"===n?r.FootballMatchStatusEnum.WAITING_FOR_EXTRA_TIME:r.FootballMatchStatusEnum.AWAITING_INFO:"interrupted"===e?"abandoned"===n?r.FootballMatchStatusEnum.ABANDONED:"to_finish"===n?r.FootballMatchStatusEnum.TO_FINISH:r.FootballMatchStatusEnum.INTERRUPTED:"cancelled"===e?r.FootballMatchStatusEnum.CANCELLED:r.FootballMatchStatusEnum.NO_INFO_YET},t.prototype.isUpcoming=function(t){if(!t)return!1;var e=this.getMatchEventStatus(t);return this.ALL_UPCOMING_STATUSES.includes(e)},t.prototype.isLive=function(t){if(!t)return!1;var e=this.getMatchEventStatus(t);return this.ALL_LIVE_STATUSES.includes(e)},t.prototype.isFinished=function(t){if(!t)return!1;var e=this.getMatchEventStatus(t);return this.ALL_FINISHED_STATUSES.includes(e)},t}();e.default=i},39188:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.logo=null}},96975:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name=""}},12754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryId=null,this.name=null,this.gender=null,this.type=null,this.sortField=null,this.sortOrder=null,this.competitionIds=null,this.constructFilterUrl=function(){var t="";return e.countryId&&(t+="&",t+="country_id=".concat(e.countryId)),e.gender&&(t+="&",t+="gender=".concat(e.gender)),e.type&&(t+="&",t+="type=".concat(e.type)),e.sortField&&(t+="&",t+="sort_field=".concat(e.sortField)),e.sortOrder&&(t+="&",t+="sort_order=".concat(e.sortOrder)),e.name&&(t+="&",t+="name=".concat(e.name)),e.competitionIds&&e.competitionIds.length>0&&(t+="&",t+="competition_ids=".concat(e.competitionIds.join(","))),t},this.competitionSearchFilter=function(t){try{var n=e.filter(t);return e.sortField||e.sortOrder?e.sort(n):n}catch(t){return console.warn("There was a problem filtering the local competitions",t),[]}},this.filter=function(t){var n=e.entitiesToSearchWith();return t.filter((function(t){var r=!0;return n.forEach((function(n){"sortOrder"!==n&&"sortField"!==n&&("countryId"===n?r&&(r=t.country.id===e[n]):"name"===n?r&&(r=t.name.toLocaleLowerCase().includes(e[n].toLocaleLowerCase())):"competitionIds"===n?r&&(r=e[n].some((function(e){return t.id===e}))):r&&(r=t[n].toLocaleLowerCase()===e[n].toLocaleLowerCase()))})),r}))},this.entitiesToSearchWith=function(){var t=[];return e.countryId&&t.push("countryId"),e.name&&t.push("name"),e.gender&&t.push("gender"),e.type&&t.push("type"),e.sortField&&t.push("sortField"),e.sortOrder&&t.push("sortOrder"),e.competitionIds&&t.push("competitionIds"),t},this.sort=function(t){var n=[];return"name"===e.sortField?n=t.sort((function(t,n){return e.sortOrder&&"desc"===e.sortOrder?n.name.localeCompare(t.name):t.name.localeCompare(n.name)})):"country"===e.sortField?n=t.sort((function(t,n){return e.sortOrder&&"desc"===e.sortOrder?n.country.name.localeCompare(t.country.name):t.country.name.localeCompare(n.country.name)})):"scope"===e.sortField?t.forEach((function(t){return n[e.competitionIds.indexOf(t.id)]=t})):e.sortField||"desc"!==e.sortOrder||(n=t.sort((function(t,e){return e.id.localeCompare(t.id)}))),n},this.countryId=t.countryId?"".concat(t.countryId):null,this.name=t.name?t.name:null,this.gender=t.gender?t.gender:null,this.type=t.type?t.type:null,this.sortField=t.sortField?"".concat(t.sortField):null,this.sortOrder=t.sortOrder?"".concat(t.sortOrder):null,this.competitionIds=t.competitionIds?t.competitionIds:null}},73321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name="",this.participants=[]}},67316:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(96975)),a=r(n(23430)),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new a.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.type=t.type,e.name=t.name,e}catch(t){throw console.warn("There was a problem remapping the competition response",t),t}},t}();e.default=s},38758:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73321)),a=r(n(23430)),s=r(n(95827)),o=function(){function t(){this.countryRemapper=null,this.teamBasicRemapper=null,this.countryRemapper=new a.default,this.teamBasicRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.country=this.countryRemapper.countryFromResponse(t.country),n.gender=t.gender,n.assets=t.assets,n.type=t.type,n.name=t.name,n.participants=t.participants.map((function(t){return e.teamBasicRemapper.fromResponse(t)})),n}catch(t){throw console.warn("There was a problem remapping the competition response",t),t}},t}();e.default=o},24427:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.alias="",this.countryCode="",this.assets=null,this.name=""}},23430:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(24427));e.default=function(){var t=this;this.countriesFromResponse=function(e){if(e)return e.map((function(e){return t.countryFromResponse(e)}))},this.countryFromResponse=function(t){try{if(t){var e=new i.default;return e.id=t.id,e.alias=t.alias,e.assets=t.assets,e.countryCode=t.country_code,e.name=t.name,e}}catch(t){throw t}return null}}},28470:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.homeTeam={players:[]},this.awayTeam={players:[]}}},63098:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(28470)),a=r(n(93550)),s=function(){function t(){this.playerRemapper=null,this.playerRemapper=new a.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.homeTeam.players=t.home_team&&t.home_team.players?t.home_team.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n.awayTeam.players=t.away_team&&t.away_team.players?t.away_team.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping the lineups",t),t}},t}();e.default=s},13572:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36899));e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.homeTeam=null,this.awayTeam=null,this.isDeleted=!1,this.undecided=!1,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.context={competition:null},this.status=new i.default}},86134:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryIds=null,this.competitionIds=null,this.matchIds=null,this.status=null,this.teamIds=null,this.fromDate=null,this.toDate=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(t){var n="";return e.countryIds&&(n+="&",n+="countries=".concat(e.countryIds.join(","))),e.competitionIds&&e.competitionIds.length>0&&(n+="&",n+="competitions=".concat(e.competitionIds.join(","))),e.matchIds&&e.matchIds.length>0&&(n+="&",n+="matches=".concat(e.matchIds.join(","))),e.status&&(n+="&",n+="status=".concat(e.status)),e.teamIds&&e.teamIds.length>0&&(n+="&",n+="teams=".concat(e.teamIds.join(","))),e.fromDate&&(n+="&",n+="from_date=".concat(e.fromDate)),e.toDate&&(n+="&",n+="to_date=".concat(e.toDate)),e.limit&&!t&&(n+="&",n+="limit=".concat(e.limit)),e.page&&!t&&(n+="&",n+="page=".concat(e.page)),e.sortField&&(n+="&",n+="sort_field=".concat(e.sortField)),e.sortOrder&&(n+="&",n+="sort_order=".concat(e.sortOrder)),n},this.countryIds=t.countryIds?t.countryIds:null,this.competitionIds=t.competitionIds?t.competitionIds:null,this.matchIds=t.matchIds?t.matchIds:null,this.status=t.status?t.status:null,this.teamIds=t.teamIds?t.teamIds:null,this.fromDate=t.fromDate?t.fromDate:null,this.toDate=t.toDate?t.toDate:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},79661:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36899));e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.isDeleted=!1,this.undecided=!1,this.homeTeam=null,this.awayTeam=null,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.stats=null,this.playerStats=[],this.context={competition:null},this.timeline=[],this.status=new i.default,this.lineups=null}},46780:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.playerId=null,this.position=null,this.minutesPlayed=null,this.yellowCards=null,this.redCards=null,this.goals=null,this.penaltyGoals=null,this.penaltyCommitted=null,this.penaltyWon=null,this.penaltyMissed=null,this.penaltySaved=null,this.penaltyReceived=null,this.ownGoals=null,this.assists=null,this.cleanSheets=null,this.shots=null,this.shotsOn=null,this.shotsBlocked=null,this.offsides=null,this.foulsCommitted=null,this.foulsWon=null,this.tackles=null,this.tacklesBlocks=null,this.tacklesInterceptions=null,this.concededGoals=null,this.caughtBall=null,this.saves=null,this.passes=null,this.crosses=null,this.interceptions=null,this.keyPasses=null,this.passesAccuracy=null,this.duels=null,this.duelsWon=null,this.dribblesAttempts=null,this.dribblesSuccess=null,this.dribblesPast=null,this.updatedAt=null}},94976:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(46780)),a=function(){function t(){}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.playerId=t.player_id,e.position=t.position,e.minutesPlayed=t.minutes_played,e.yellowCards=t.yellow_cards,e.redCards=t.red_cards,e.goals=t.goals,e.penaltyGoals=t.penalty_goals,e.penaltyCommitted=t.penalty_committed,e.penaltyWon=t.penalty_won,e.penaltyMissed=t.penalty_missed,e.penaltySaved=t.penalty_saved,e.penaltyReceived=t.penalty_received,e.ownGoals=t.own_goals,e.assists=t.assists,e.cleanSheets=t.clean_sheets,e.shots=t.shots,e.shotsOn=t.shots_on,e.shotsBlocked=t.shots_blocked,e.offsides=t.offsides,e.foulsCommitted=t.fouls_committed,e.foulsWon=t.fouls_won,e.tackles=t.tackles,e.tacklesBlocks=t.tackles_blocks,e.tacklesInterceptions=t.tackles_interceptions,e.concededGoals=t.conceded_goals,e.caughtBall=t.caught_ball,e.saves=t.saves,e.passes=t.passes,e.crosses=t.crosses,e.interceptions=t.interceptions,e.keyPasses=t.key_passes,e.passesAccuracy=t.passes_accuracy,e.duels=t.duels,e.duelsWon=t.duels_won,e.dribblesAttempts=t.dribbles_attempts,e.dribblesSuccess=t.dribbles_success,e.dribblesPast=t.dribbles_past,e.updatedAt=t.updated_at,e}catch(t){throw console.warn("There was a problem remapping the player stats",t),t}},t}();e.default=a},95284:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(13572)),a=r(n(95827)),s=r(n(67316)),o=r(n(83949)),u=function(){function t(){this.teamRemapper=null,this.competitionRemapper=null,this.scoresRemapper=null,this.teamRemapper=new a.default,this.competitionRemapper=new s.default,this.scoresRemapper=new o.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.kickoffAt=t.kickoff_at,e.finishedAt=t.finished_at,e.updatedAt=t.updated_at,e.isDeleted=t.is_deleted,e.undecided=t.undecided,e.homeTeam=this.teamRemapper.fromResponse(t.home_team),e.awayTeam=this.teamRemapper.fromResponse(t.away_team),e.lineupsConfirmed=t.lineups_confirmed,e.startedAt=t.started_at,e.minute=t.minute,e.scores=this.scoresRemapper.fromResponse(t.scores),e.context={competition:t.context.competition?this.competitionRemapper.fromResponse(t.context.competition):null},e.status={type:t.status.type,subType:t.status.sub_type},e}catch(t){throw console.warn("There was a problem remapping the match response",t),t}},t}();e.default=u},9330:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(79661)),a=r(n(95827)),s=r(n(67316)),o=r(n(7122)),u=r(n(83949)),l=r(n(63098)),c=r(n(28470)),d=r(n(90092)),f=r(n(94976)),h=function(){function t(){this.teamMapper=null,this.competitionsMapper=null,this.lineupsMapper=null,this.scoresMapper=null,this.statsMapper=null,this.timelineMapper=null,this.playerStatsMapper=null,this.teamMapper=new a.default,this.competitionsMapper=new s.default,this.lineupsMapper=new l.default,this.scoresMapper=new u.default,this.statsMapper=new o.default,this.timelineMapper=new d.default,this.playerStatsMapper=new f.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.default;return n.id=t.id,n.kickoffAt=t.kickoff_at,n.finishedAt=t.finished_at,n.updatedAt=t.updated_at,n.isDeleted=t.is_deleted,n.undecided=t.undecided,n.homeTeam=t.home_team?this.teamMapper.fromResponse(t.home_team):null,n.awayTeam=t.away_team?this.teamMapper.fromResponse(t.away_team):null,n.lineupsConfirmed=t.lineups_confirmed,n.startedAt=t.started_at,n.minute=t.minute,n.scores=this.scoresMapper.fromResponse(t.scores),n.stats=this.statsMapper.fromResponse(t.stats),n.playerStats=t.player_stats?t.player_stats.map((function(t){return e.playerStatsMapper.fromResponse(t)})):t.player_stats,n.context={competition:this.competitionsMapper.fromResponse(t.context.competition)},n.timeline=t.timeline?t.timeline.map((function(t){return e.timelineMapper.fromResponse(t)})):[],n.status={type:t.status.type,subType:t.status.sub_type},n.lineups=t.lineups?this.lineupsMapper.fromResponse(t.lineups):new c.default,n}catch(t){throw console.warn("There was a problem remapping the match response",t),t}},t}();e.default=h},4652:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.ftScore=null,this.htScore=null,this.aetScore=null,this.aggScore=null,this.penScore=null}},83949:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(4652)),a=function(){function t(){this.statEntityFromResponse=function(t){return{homeGoals:t.home_goals,awayGoals:t.away_goals}}}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.ftScore=this.statEntityFromResponse(t.ft_score),e.htScore=this.statEntityFromResponse(t.ht_score),e.aetScore=this.statEntityFromResponse(t.aet_score),e.aggScore=this.statEntityFromResponse(t.agg_score),e.penScore=this.statEntityFromResponse(t.pen_score),e}catch(t){throw console.warn("There was a problem remapping the scores",t),t}},t}();e.default=a},77950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.corners=null,this.cornersFirstHalf=null,this.cornersSecondHalf=null,this.cornersExtraTime=null,this.crosses=null,this.crossesFirstHalf=null,this.crossesSecondHalf=null,this.crossesExtraTime=null,this.offside=null,this.offsideFirstHalf=null,this.offsideSecondHalf=null,this.offsideExtraTime=null,this.shotsOn=null,this.shotsOnFirstHalf=null,this.shotsOnSecondHalf=null,this.shotsOnExtraTime=null,this.throwIn=null,this.throwInFirstHalf=null,this.throwInSecondHalf=null,this.throwInExtraTime=null,this.redCards=null,this.redCardsFirstHalf=null,this.redCardsSecondHalf=null,this.redCardsExtraTime=null,this.shotsOff=null,this.shotsOffFirstHalf=null,this.shotsOffSecondHalf=null,this.shotsOffExtraTime=null,this.goalKicks=null,this.goalKicksFirstHalf=null,this.goalKicksSecondHalf=null,this.goalKicksExtraTime=null,this.possession=null,this.possessionFirstHalf=null,this.possessionSecondHalf=null,this.possessionExtraTime=null,this.treatments=null,this.treatmentsFirstHalf=null,this.treatmentsSecondHalf=null,this.treatmentsExtraTime=null,this.yellowCards=null,this.yellowCardsFirstHalf=null,this.yellowCardsSecondHalf=null,this.yellowCardsExtraTime=null,this.shotsBlocked=null,this.shotsBlockedFirstHalf=null,this.shotsBlockedSecondHalf=null,this.shotsBlockedExtraTime=null,this.substitutions=null,this.substitutionsFirstHalf=null,this.substitutionsSecondHalf=null,this.substitutionsExtraTime=null,this.counterAttacks=null,this.counterAttacksFirstHalf=null,this.counterAttacksSecondHalf=null,this.counterAttacksExtraTime=null,this.foulsCommitted=null,this.foulsCommittedFirstHalf=null,this.foulsCommittedSecondHalf=null,this.foulsCommittedExtraTime=null}},7122:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(77950)),a=function(){function t(){this.statEntityFromResponse=function(t){return{homeTeam:t?t.home_team:null,awayTeam:t?t.away_team:null}}}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.corners=this.statEntityFromResponse(t.corners),e.cornersFirstHalf=this.statEntityFromResponse(t.corners_1h),e.cornersSecondHalf=this.statEntityFromResponse(t.corners_2h),e.cornersExtraTime=this.statEntityFromResponse(t.corners_et),e.crosses=this.statEntityFromResponse(t.crosses),e.crossesFirstHalf=this.statEntityFromResponse(t.crosses_1h),e.crossesSecondHalf=this.statEntityFromResponse(t.crosses_2h),e.crossesExtraTime=this.statEntityFromResponse(t.crosses_et),e.offside=this.statEntityFromResponse(t.offside),e.offsideFirstHalf=this.statEntityFromResponse(t.offside_1h),e.offsideSecondHalf=this.statEntityFromResponse(t.offside_2h),e.offsideExtraTime=this.statEntityFromResponse(t.offside_et),e.shotsOn=this.statEntityFromResponse(t.shots_on),e.shotsOnFirstHalf=this.statEntityFromResponse(t.shots_on_1h),e.shotsOnSecondHalf=this.statEntityFromResponse(t.shots_on_2h),e.shotsOnExtraTime=this.statEntityFromResponse(t.shots_on_et),e.throwIn=this.statEntityFromResponse(t.throw_in),e.throwInFirstHalf=this.statEntityFromResponse(t.throw_in_1h),e.throwInSecondHalf=this.statEntityFromResponse(t.throw_in_2h),e.throwInExtraTime=this.statEntityFromResponse(t.throw_in_et),e.redCards=this.statEntityFromResponse(t.red_cards),e.redCardsFirstHalf=this.statEntityFromResponse(t.red_cards_1h),e.redCardsSecondHalf=this.statEntityFromResponse(t.red_cards_2h),e.redCardsExtraTime=this.statEntityFromResponse(t.red_cards_et),e.shotsOff=this.statEntityFromResponse(t.shots_off),e.shotsOffFirstHalf=this.statEntityFromResponse(t.shots_off_1h),e.shotsOffSecondHalf=this.statEntityFromResponse(t.shots_off_2h),e.shotsOffExtraTime=this.statEntityFromResponse(t.shots_off_et),e.goalKicks=this.statEntityFromResponse(t.goal_kicks),e.goalKicksFirstHalf=this.statEntityFromResponse(t.goal_kicks_1h),e.goalKicksSecondHalf=this.statEntityFromResponse(t.goal_kicks_2h),e.goalKicksExtraTime=this.statEntityFromResponse(t.goal_kicks_et),e.possession=this.statEntityFromResponse(t.possession),e.possessionFirstHalf=this.statEntityFromResponse(t.possession_1h),e.possessionSecondHalf=this.statEntityFromResponse(t.possession_2h),e.possessionExtraTime=this.statEntityFromResponse(t.possession_et),e.treatments=this.statEntityFromResponse(t.treatments),e.treatmentsFirstHalf=this.statEntityFromResponse(t.treatments_1h),e.treatmentsSecondHalf=this.statEntityFromResponse(t.treatments_2h),e.treatmentsExtraTime=this.statEntityFromResponse(t.treatments_et),e.yellowCards=this.statEntityFromResponse(t.yellow_cards),e.yellowCardsFirstHalf=this.statEntityFromResponse(t.yellow_cards_1h),e.yellowCardsSecondHalf=this.statEntityFromResponse(t.yellow_cards_2h),e.yellowCardsExtraTime=this.statEntityFromResponse(t.yellow_cards_et),e.shotsBlocked=this.statEntityFromResponse(t.shots_blocked),e.shotsBlockedFirstHalf=this.statEntityFromResponse(t.shots_blocked_1h),e.shotsBlockedSecondHalf=this.statEntityFromResponse(t.shots_blocked_2h),e.shotsBlockedExtraTime=this.statEntityFromResponse(t.shots_blocked_et),e.substitutions=this.statEntityFromResponse(t.substitutions),e.substitutionsFirstHalf=this.statEntityFromResponse(t.substitutions_1h),e.substitutionsSecondHalf=this.statEntityFromResponse(t.substitutions_2h),e.substitutionsExtraTime=this.statEntityFromResponse(t.substitutions_et),e.counterAttacks=this.statEntityFromResponse(t.counter_attacks),e.counterAttacksFirstHalf=this.statEntityFromResponse(t.counter_attacks_1h),e.counterAttacksSecondHalf=this.statEntityFromResponse(t.counter_attacks_2h),e.counterAttacksExtraTime=this.statEntityFromResponse(t.counter_attacks_et),e.foulsCommitted=this.statEntityFromResponse(t.fouls_committed),e.foulsCommittedFirstHalf=this.statEntityFromResponse(t.fouls_committed_1h),e.foulsCommittedSecondHalf=this.statEntityFromResponse(t.fouls_committed_2h),e.foulsCommittedExtraTime=this.statEntityFromResponse(t.fouls_committed_et),e}catch(t){throw console.warn("There was a problem remapping the stats",t),t}},t}();e.default=a},36899:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.subType=null}},59452:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.minute="",this.type="",this.teamId="",this.player=null,this.relatedPlayer=null,this.updatedAt=""}},90092:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(59452)),a=r(n(93550)),s=function(){function t(){this.playerRemapper=null,this.playerRemapper=new a.default}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.minute=t.minute,e.type=t.type,e.teamId=t.team_id,e.player=this.playerRemapper.fromResponse(t.player),e.relatedPlayer=t.related_player?this.playerRemapper.fromResponse(t.related_player):null,e.updatedAt=t.updated_at,e}catch(t){throw console.warn("There was a problem remapping timeline",t),t}},t}();e.default=s},90753:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569));e.default=function(){this.meta=new i.default,this.data=[]}},73569:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(10155));e.default=function(){this.pagination=new i.default}},10155:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.currentPage=null,this.itemsPerPage=null,this.totalItems=null,this.numberOfPages=null}},91925:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569));e.default=function(){this.remapMetaProp=function(t){var e=new i.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e}}},38632:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.headshot=null}},24426:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.isDeleted=!1,this.teams=[]}},26477:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.countryId=null,this.scope=null,this.name=null,this.playerIds=null,this.limit=null,this.page=null,this.sortField=null,this.sortOrder=null,this.constructFilterUrl=function(){var t="";return e.countryId&&(t+="&",t+="country_id=".concat(e.countryId)),e.scope&&e.scope.length>0&&(t+="&",t+="scope=".concat(e.scope.join(","))),e.name&&(t+="&",t+="name=".concat(e.name)),e.playerIds&&e.playerIds.length>0&&(t+="&",t+="player_ids=".concat(e.playerIds.join(","))),e.limit&&(t+="&",t+="limit=".concat(e.limit)),e.page&&(t+="&",t+="page=".concat(e.page)),e.sortField&&(t+="&",t+="sort_field=".concat(e.sortField)),e.sortOrder&&(t+="&",t+="sort_order=".concat(e.sortOrder)),t},this.countryId=t.countryId?t.countryId:null,this.scope=t.scope?t.scope:null,this.name=t.name?t.name:null,this.playerIds=t.playerIds?t.playerIds:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.sortField=t.sortField?t.sortField:null,this.sortOrder=t.sortOrder?t.sortOrder:null}},21837:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null,this.isDeleted=!1,this.competitions=[],this.teams=[]}},32858:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.country=null}},44803:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.name="",this.position="",this.assets=null,this.type=""}},59071:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.startDate="",this.endDate="",this.loan=!1,this.position="",this.country=null,this.name="",this.assets=null,this.birthDate=""}},75157:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(24426)),s=r(n(95827)),o=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.countryRemapper=new i.default,this.teamRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new a.default;return n.id=t.id,n.firstName=t.first_name?t.first_name:null,n.lastName=t.last_name?t.last_name:null,n.name=t.name?t.name:null,n.birthDate=t.birth_date,n.country=this.countryRemapper.countryFromResponse(t.country),n.assets=t.assets,n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.position=t.position,n.isDeleted=t.is_deleted,n}catch(t){throw console.warn("There was a problem remapping players response",t),t}},t}();e.default=o},97943:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(21837)),s=r(n(95827)),o=r(n(67316)),u=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.competitionRemapper=null,this.countryRemapper=new i.default,this.teamRemapper=new s.default,this.competitionRemapper=new o.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new a.default;return n.id=t.id,n.firstName=t.first_name?t.first_name:null,n.lastName=t.last_name?t.last_name:null,n.name=t.name?t.name:null,n.birthDate=t.birth_date,n.country=this.countryRemapper.countryFromResponse(t.country),n.assets=t.assets,n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.position=t.position,n.isDeleted=t.is_deleted,n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping player response",t),t}},t}();e.default=u},93550:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(44803)),a=function(){function t(){}return t.prototype.fromResponse=function(t){try{var e=new i.default;return e.id=t.id,e.name=t.name,e.position=t.position,e.shirtNumber=t.shirt_number,e.assets=t.assets,e.type=t.type,e}catch(t){throw console.warn("There was a problem remapping the player from timeline",t),t}},t}();e.default=a},14085:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(59071)),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new a.default;return e.id=t.id,e.startDate=t.start_date,e.endDate=t.end_date,e.shirtNumber=t.shirt_number,e.loan=t.loan,e.position=t.position,e.country=this.countryRemapper.countryFromResponse(t.country),e.name=t.name,e.assets=t.assets,e.birthDate=t.birth_date,e}catch(t){throw console.warn("There was a problem remapping the player from squad",t),t}},t}();e.default=s},4729:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(30056)),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new a.default;return e.id=t.id,e.firstName=t.first_name?t.first_name:null,e.lastName=t.last_name?t.last_name:null,e.name=t.name?t.name:null,e.birthDate=t.birth_date,e.country=this.countryRemapper.countryFromResponse(t.country),e.assets=t.assets,e.position=t.position,e}catch(t){throw console.warn("There was a problem remapping top player response",t),t}},t}();e.default=s},30056:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null}},40604:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.entities=null,this.query=null,this.scope=null,this.constructFilterUrl=function(){var t="";return e.entities&&(t+="&",t+="entities=".concat(e.entities.join(","))),e.query&&(t+="&",t+="q=".concat(e.query)),e.scope&&(t+="&",t+="scope=".concat(e.scope.join(","))),t},this.entities=t.entities?t.entities:null,this.query=t.query?t.query:null,this.scope=t.scope?t.scope:null}},36967:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.teams=null,this.players=null,this.competitions=null}},77287:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(95827)),a=r(n(75157)),s=r(n(67316)),o=r(n(36967)),u=function(){function t(){this.teamRemapper=null,this.playerRemapper=null,this.competitionremapper=null,this.teamRemapper=new i.default,this.playerRemapper=new a.default,this.competitionremapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new o.default;return n.teams=t.teams?t.teams.map((function(t){return e.teamRemapper.fromResponse(t)})):[],n.players=t.players?t.players.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionremapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping search response",t),t}},t}();e.default=u},95827:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(99314)),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new a.default;return e.id=t.id,e.country=this.countryRemapper.countryFromResponse(t.country),e.gender=t.gender,e.assets=t.assets,e.code=t.code,e.national=t.national,e.fullName=t.full_name,e.shortName=t.short_name,e.name=t.name,e.isDeleted=t.is_deleted,e.undecided=t.undecided,e}catch(t){throw console.warn("There was a problem remapping teams response",t),t}},t}();e.default=s},17821:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23430)),a=r(n(57316)),s=r(n(14085)),o=r(n(67316)),u=function(){function t(){this.countryRemapper=null,this.competitionRemapper=null,this.playerRemapper=null,this.countryRemapper=new i.default,this.competitionRemapper=new o.default,this.playerRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new a.default;return n.id=t.id,n.country=this.countryRemapper.countryFromResponse(t.country),n.gender=t.gender,n.assets=t.assets,n.code=t.code,n.national=t.national,n.fullName=t.full_name,n.shortName=t.short_name,n.name=t.name,n.isDeleted=t.is_deleted,n.undecided=t.undecided,n.competitions=t.competitions?t.competitions.map((function(t){return e.competitionRemapper.fromResponse(t)})):[],n.colors=t.colors?t.colors:n.colors,n.squad=t.squad?t.squad.map((function(t){return e.playerRemapper.fromResponse(t)})):[],n}catch(t){throw console.warn("There was a problem remapping team response",t),t}},t}();e.default=u},99314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.code="",this.national=!1,this.undecided=!1,this.fullName="",this.shortName="",this.isDeleted=!1}},33773:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.primary=null,this.secondary=null,this.tertiary=null}},59920:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.name=null,this.countryId=null,this.national=!1,this.gender=null,this.limit=null,this.page=null,this.scope=null,this.sortField=null,this.sortOrder=null,this.teamIds=null,this.constructFilterUrl=function(){var t="";return e.name&&(t+="&",t+="name=".concat(e.name)),e.countryId&&(t+="&",t+="country_id=".concat(e.countryId)),e.national&&(t+="&",t+="national=".concat(e.national)),e.gender&&(t+="&",t+="gender=".concat(e.gender)),e.limit&&(t+="&",t+="limit=".concat(e.limit)),e.scope&&e.scope.length>0&&(t+="&",t+="scope=".concat(e.scope.join(","))),e.page&&(t+="&",t+="page=".concat(e.page)),e.sortField&&(t+="&",t+="sort_field=".concat(e.sortField)),e.sortOrder&&(t+="&",t+="sort_order=".concat(e.sortOrder)),e.teamIds&&e.teamIds.length>0&&(t+="&",t+="team_ids=".concat(e.teamIds.join(","))),t},this.name=t.name?t.name:null,this.countryId=t.countryId?"".concat(t.countryId):null,this.national=!!t.national&&t.national,this.gender=t.gender?t.gender:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null,this.scope=t.scope?t.scope:null,this.sortField=t.sortField?"".concat(t.sortField):null,this.sortOrder=t.sortOrder?"".concat(t.sortOrder):null,this.teamIds=t.teamIds?t.teamIds:null}},57316:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(33773));e.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.competitions=[],this.code="",this.national=!1,this.fullName="",this.shortName="",this.isDeleted=!1,this.undecided=!1,this.colors=new i.default,this.squad=[]}},61284:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.teamId=null,this.matches=[]}},89582:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(4021),c=n(94904),d=u(n(68097)),f=u(n(62535)),h=n(5318),p=a(n(47686)),m=u(n(73569));e.default=function(t){var e=this;this.clientHttps=null,this.errorHandlingMode=null,this.setAvailableMarketsForMatch=function(t){return s(e,void 0,void 0,(function(){var e,n,r,i=this;return o(this,(function(a){switch(a.label){case 0:return[4,this.clientHttps.getConfig(p.FeatureConfigEnum.PREDICTOR)];case 1:return e=a.sent(),n=e.fullCoverageCompetitions,r=e.markets,Array.isArray(t)?[2,t.map((function(t){return i.setAvailableMarkets(t,n,r)}))]:"object"==typeof t&&Object.keys(t).length?[2,this.setAvailableMarkets(t,n,r)]:[2]}}))}))},this.setAvailableMarkets=function(t,n,r){var i,a=null===(i=t.context.competition)||void 0===i?void 0:i.id;return a&&e.isMatchInCoverageCompetition(a,n)?(t.availableMarkets=r.all,t):(t.availableMarkets=r.main,t)},this.setMetaDataBatchRequest=function(t,n,r){var i=new m.default;if(i.pagination.totalItems=t,i.pagination.itemsPerPage=n,i.pagination.numberOfPages=t?Math.ceil(t/n):0,i.pagination.currentPage=r,i.pagination.numberOfPages>0&&r>i.pagination.numberOfPages){if("standard"===e.errorHandlingMode)throw new f.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_PAGE_NUMBER,h.ErrorMessages.INVALID_PAGE_NUMBER);throw new d.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_PAGE_NUMBER,h.ErrorMessages.INVALID_PAGE_NUMBER)}return i},this.finalizeMatchesDataBatchRequest=function(t,e){t=t.sort((function(t,e){return new Date(t.kickoffAt).getTime()-new Date(e.kickoffAt).getTime()}));var n=e.limit||20;if(e.page){var r=e.page>1?n*(e.page-1):0;t=t.slice(r,r+n)}return!e.page&&t.length>n&&(t=t.slice(0,n)),t},this.isMatchInCoverageCompetition=function(t,e){var n=!1;return e.includes(t)?n=!0:n},this.clientHttps=new p.default(t),this.errorHandlingMode=t.errorHandlingMode}},74410:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4021),o=n(94904),u=n(5318),l=function(t){function e(e){var n=t.call(this,e.errorHandlingMode)||this;return n.limit=50,n.validateTeamFormArguments=function(t,e){t&&"string"==typeof t||n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_TEAM_ID,u.ErrorMessages.INVALID_TEAM_ID),e&&(e.competitionId&&"string"!=typeof e.competitionId&&n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_COMPETITION_ID,u.ErrorMessages.INVALID_COMPETITION_ID),e.limit&&"number"!=typeof e.limit&&n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_LIMIT,u.ErrorMessages.INVALID_LIMIT_TYPE),e.limit&&e.limit>n.limit&&n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_LIMIT,u.ErrorMessages.INVALID_LIMIT+n.limit.toString()))},n}return i(e,t),e}(a(n(16198)).default);e.default=l},21454:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.configuration=t}return t.prototype.getSDKConfiguration=function(){return this.configuration},t}();e.default=n},73650:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(95792)),o=a(n(64939)),u=a(n(52426));e.default=function(t){var e=this;this.validator=null,this.idMappingFacade=null,this.factory=new o.default,this.getMappedFootballCountryIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.validator.validate(t,n,a),e={country:Array.from(t)},[4,this.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:return r=i.sent(),[2,this.factory.remapToResponseModel(r,n,a)]}}))}))},this.getMappedFootballCompetitionIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.validator.validate(t,n,a),e={competition:Array.from(t)},[4,this.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:return r=i.sent(),[2,this.factory.remapToResponseModel(r,n,a)]}}))}))},this.getMappedFootballTeamIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.validator.validate(t,n,a),e={team:Array.from(t)},[4,this.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:return r=i.sent(),[2,this.factory.remapToResponseModel(r,n,a)]}}))}))},this.getMappedFootballPlayerIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.validator.validate(t,n,a),e={player:Array.from(t)},[4,this.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:return r=i.sent(),[2,this.factory.remapToResponseModel(r,n,a)]}}))}))},this.getFootballMappedMatchIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.validator.validate(t,n,a),e={match:Array.from(t)},[4,this.idMappingFacade.getEntitiesByIdsMap(e,n,a)];case 1:return r=i.sent(),[2,this.factory.remapToResponseModel(r,n,a)]}}))}))},this.validator=new u.default(t),this.idMappingFacade=new s.default(t)}},64939:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(47589));e.default=function(){this.remapToResponseModel=function(t,e,n){var r=new i.default;return r.meta.input=e,r.meta.output=n,0===t.size||(r.data=Array.from(t).map((function(t){return{input:t[0],output:t[1]}}))),r}}},99421:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(73650));e.default=function(t){var e=this;this.facade=null,this.getMappedFootballCountryIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMappedFootballCountryIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMappedFootballCompetitionIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMappedFootballCompetitionIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMappedFootballTeamIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMappedFootballTeamIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMappedFootballPlayerIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMappedFootballPlayerIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMappedFootballMatchIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getFootballMappedMatchIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},6448:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.input=null,this.output=null}},47589:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(6448));e.default=function(){this.meta=new i.default,this.data=[]}},52426:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(14946),a=n(4021),s=n(94904),o=r(n(68097)),u=r(n(62535)),l=n(5318);e.default=function(t){var e=this;this.errorHandlingModel=null,this.validate=function(t,n,r){t&&Array.isArray(t)&&0!==t.length||e.throwException(a.ErrorCodes.BAD_METHOD_CALL,s.ErrorStatuses.INVALID_IDS,l.ErrorMessages.INVALID_OR_EMPTY_IDS),(!n||n!==i.IdSchemaEnum.NATIVE&&n!==i.IdSchemaEnum.ENETPULSE&&n!==i.IdSchemaEnum.SPORTAL_365&&n!==i.IdSchemaEnum.SPORTRADAR&&n!==i.IdSchemaEnum.API_FOOTBALL)&&e.throwException(a.ErrorCodes.BAD_METHOD_CALL,s.ErrorStatuses.INVALID_INPUT_PROVIDER,l.ErrorMessages.INVALID_PROVIDER),(!r||r!==i.IdSchemaEnum.NATIVE&&r!==i.IdSchemaEnum.ENETPULSE&&r!==i.IdSchemaEnum.SPORTAL_365&&r!==i.IdSchemaEnum.SPORTRADAR&&r!==i.IdSchemaEnum.API_FOOTBALL)&&e.throwException(a.ErrorCodes.BAD_METHOD_CALL,s.ErrorStatuses.INVALID_OUTPUT_PROVIDER,l.ErrorMessages.INVALID_PROVIDER),n===r&&e.throwException(a.ErrorCodes.BAD_METHOD_CALL,s.ErrorStatuses.INVALID_OUTPUT_PROVIDER,l.ErrorMessages.INVALID_OUTPUT_PROVIDER)},this.throwException=function(t,n,r){if("standard"===e.errorHandlingModel)throw new u.default(t,n,r);throw new o.default(t,n,r)},this.errorHandlingModel=t.errorHandlingMode}},1161:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=s(n(47686)),u=s(n(92962)),l=s(n(40267)),c=s(n(91550)),d=s(n(29596)),f=s(n(73112)),h=s(n(9517));e.default=function(t){var e=this;this.clientHttps=null,this.topX=null,this.matchQuiz=null,this.loyalty=null,this.miniGames=null,this.voting=null,this.getListContent=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return n&&(n=new h.default(n)),[4,this.clientHttps.getListContent(t,n,a)];case 1:return e=r.sent(),[4,this.setModels(e.data)];case 2:return r.sent(),[2,e]}}))}))},this.setModels=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s,o,u,l,c,d,f,h;return i(this,(function(p){switch(p.label){case 0:e=!0,n=[],r=new Map,t.forEach((function(t){if(r.has(t.entityType)){var e=r.get(t.entityType);r.set(t.entityType,a(a([],e,!0),[t.entityId],!1))}else r.set(t.entityType,[t.entityId])})),p.label=1;case 1:p.trys.push([1,6,,7]),s=function(t,r){var s,u,l,c,d,f;return i(this,(function(i){switch(i.label){case 0:switch(t){case"TOP_X":return[3,1];case"MATCH_QUIZ":return[3,3];case"LEADERBOARD_TEMPLATES":return[3,5];case"CLASSIC_QUIZ":return[3,7];case"EITHER_OR":return[3,9];case"POLL":return[3,11]}return[3,13];case 1:return[4,o.topX.getGames({limit:r.length,gameIds:r},e)];case 2:return s=i.sent(),n=a(a([],n,!0),s.data,!0),[3,13];case 3:return[4,o.matchQuiz.getGames({limit:r.length,gameIds:r},e)];case 4:return u=i.sent(),n=a(a([],n,!0),u.data,!0),[3,13];case 5:return[4,o.loyalty.getTemplates(void 0,e)];case 6:return l=i.sent(),n=a(a([],n,!0),l.data.filter((function(t){return r.includes(t.id)})),!0),[3,13];case 7:return[4,o.miniGames.getClassicQuizzes({limit:r.length,classicQuizIds:r},!1,e)];case 8:return c=i.sent(),n=a(a([],n,!0),c.data,!0),[3,13];case 9:return[4,o.miniGames.getEitherOrs({limit:r.length,eitherOrIds:r},!1,e)];case 10:return d=i.sent(),n=a(a([],n,!0),d.data,!0),[3,13];case 11:return[4,o.voting.getPolls({limit:r.length,pollIds:r},e)];case 12:return f=i.sent(),n=a(a([],n,!0),f.data,!0),[3,13];case 13:return[2]}}))},o=this,u=0,l=Array.from(r.entries()),p.label=2;case 2:return u<l.length?(c=l[u],d=c[0],f=c[1],[5,s(d,f)]):[3,5];case 3:p.sent(),p.label=4;case 4:return u++,[3,2];case 5:return[3,7];case 6:throw h=p.sent(),console.error("An error occurred while trying to set models for list content entities",h),h;case 7:return t.forEach((function(t){var e=n.find((function(e){return e.id===t.entityId}))||null;t.entityModel=e})),[2]}}))}))},this.clientHttps=new o.default(t),this.topX=new d.default(t),this.matchQuiz=new l.default(t),this.loyalty=new u.default(t),this.miniGames=new c.default(t),this.voting=new f.default(t)}},78324:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(1161));e.default=function(t){var e=this;this.facade=null,this.getListContent=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getListContent(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},9517:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=null,this.page=null,this.constructFiltersUrl=function(){var t="";return e.limit&&(t+="&limit=".concat(e.limit)),e.page&&(t+="&page=".concat(e.page)),t},this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null}},97053:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityModel=null}},56412:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569)),a=r(n(97053)),s=r(n(80138));e.default=function(){var t=this;this.remapListContent=function(e){var n=new s.default;return n.meta=t.remapMeta(e.meta),n.data=e.data.map((function(t){var e=new a.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e})),n},this.remapMeta=function(t){var e=new i.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e}}},80138:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(91287);e.default=function(){this.meta=new r.MetaFootballModel,this.data=[]}},83822:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=n(47686),l=s(n(53142)),c=s(n(17232)),d=s(n(31139)),f=s(n(89502)),h=s(n(81859)),p=s(n(52793)),m=s(n(63247)),v=s(n(48061)),_=s(n(48808)),y=s(n(22544));e.default=function(t,e,n,s,g){var b=this;this.config=null,this.clientHttps=null,this.loyaltyHttps=null,this.loyaltyService=null,this.profileFacade=null,this.loyaltyValidator=null,this.topXFacade=null,this.matchQuizFacade=null,this.predictorHttps=null,this.errorHandlingMode=null,this.football=null,this.getConfig=function(){return r(b,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(u.FeatureConfigEnum.LOYALTY)];case 1:return[2,t.sent()]}}))}))},this.getConfigV2=function(t){return r(b,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.clientHttps.getNewLoyaltyConfig(t)];case 1:return e=n.sent(),[4,this.loyaltyService.addEntityModelToFootballBadges(e.rewards.badges)];case 2:return n.sent(),[4,this.loyaltyService.addGameModelToGamesBadges(e.rewards.badges)];case 3:return n.sent(),[2,e]}}))}))},this.getClientBadges=function(){return r(b,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getConfig()];case 1:return t=e.sent(),[2,this.loyaltyService.buildOldClientBadges(t.rewards.badges)]}}))}))},this.getClientBadgesV2=function(t){return r(b,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.clientHttps.getNewLoyaltyConfig(t)];case 1:return e=n.sent(),[2,this.loyaltyService.buildNewClientBadges(e.rewards.badges)]}}))}))},this.getTemplates=function(t,e){return r(b,void 0,void 0,(function(){var n,r,s,u,l;return i(this,(function(i){switch(i.label){case 0:return t&&(t=new v.default(t)),this.config.idSchema!==o.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyHttps.getTemplates(t,e)];case 1:return[2,i.sent()];case 2:return[4,this.loyaltyHttps.getTemplates(t,e)];case 3:return n=i.sent(),r=n,[4,this.loyaltyService.remapTemplatesIds(a([],n.data,!0))];case 4:r.data=i.sent(),s=0,u=n.data,i.label=5;case 5:return s<u.length?(l=u[s],[4,this.loyaltyService.remapTemplateGroupMatchIds(l.groups)]):[3,8];case 6:i.sent(),i.label=7;case 7:return s++,[3,5];case 8:return[2,n]}}))}))},this.getTemplateById=function(t,e){return r(b,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.loyaltyHttps.getTemplateById(t,e)];case 1:return n=i.sent(),this.config.idSchema===o.IdSchemaEnum.NATIVE?[2,n]:[4,this.loyaltyService.remapTemplatesIds([n])];case 2:return r=i.sent(),[4,this.loyaltyService.remapTemplateGroupMatchIds(r[0].groups)];case 3:return i.sent(),[2,r[0]]}}))}))},this.getLeaderboard=function(t,e,n){return r(b,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"loyalty"),[4,this.loyaltyHttps.getLeaderboard(t,n,e)];case 1:return r=i.sent(),a=r,[4,this.loyaltyService.addProfileModelToLeaderboard(r.data)];case 2:return a.data=i.sent(),[2,r]}}))}))},this.getLeaderboardForGame=function(t,e,n){return r(b,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return e&&(e=new y.default(e)),[4,this.loyaltyHttps.getLeaderboardForGame(t,n,e)];case 1:return r=i.sent(),a=r,[4,this.loyaltyService.addProfileModelToLeaderboard(r.data)];case 2:return a.data=i.sent(),[2,r]}}))}))},this.getLeaderboardForLeague=function(t,e){return r(b,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"league_leaderboard"),[4,this.loyaltyHttps.getLeaderboardForLeague(t,e)];case 1:return n=i.sent(),r=n,[4,this.loyaltyService.addProfileModelToLeaderboard(n.data)];case 2:return r.data=i.sent(),[2,n]}}))}))},this.getOwnRankings=function(t,e){return r(b,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.getOwn()];case 1:return n=r.sent().id,[2,this.getUserRankings(n,t,e)]}}))}))},this.getUserRankings=function(t,e,n){return r(b,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"rankings"),[4,this.loyaltyHttps.getUserRankings(t,e,n)];case 1:return r=i.sent(),[4,this.getModelsForUserRankings(r)];case 2:return[2,i.sent()]}}))}))},this.getHighestSuccessRate=function(t,e){return r(b,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t&&(t=new m.default(t),this.loyaltyValidator.validate(t,this.errorHandlingMode)),[4,this.loyaltyHttps.getHighestSuccessRate(t,e)];case 1:return n=r.sent(),[2,this.loyaltyService.addProfileModelToHighestSuccessRate(n)]}}))}))},this.getTemplateWinners=function(t,e){return r(b,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.predictorHttps.getContestWinners(t,e)];case 1:return n=i.sent(),[4,this.getTemplateById(t)];case 2:return r=i.sent(),n.contestModel=r,[2,this.loyaltyService.completeContestWinners(n)]}}))}))},this.getEntitiesFollows=function(t,e){return r(b,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.loyaltyService.validateEntitiesFollowsFilters(t),this.config.idSchema===o.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyService.remapEntitiesFollowsFilters(t)];case 1:t=r.sent(),r.label=2;case 2:return[4,this.loyaltyHttps.getEntitiesFollows(t,e)];case 3:return n=r.sent(),[4,this.loyaltyService.addModelsToEntitiesFollows(n)];case 4:return[2,r.sent()]}}))}))},this.getModelsForUserRankings=function(t){return r(b,void 0,void 0,(function(){var e,n,r,a,s,o,u,l,c,d,f,h;return i(this,(function(i){switch(i.label){case 0:return e=null,n=null,r=null,a=this.loyaltyService.extractRankingsIdsMap(t.data),s=a[0],o=a[1],(u=a[2]).length?[4,this.getTemplates()]:[3,2];case 1:l=i.sent(),e=l.data.filter((function(t){return u.includes(t.id)})),i.label=2;case 2:return s.length?(c={gameIds:s},[4,this.topXFacade.getGames(c)]):[3,4];case 3:d=i.sent(),n=d.data,i.label=4;case 4:return o.length?(f={gameIds:o},[4,this.matchQuizFacade.getGames(f)]):[3,6];case 5:h=i.sent(),r=h.data,i.label=6;case 6:return[2,this.loyaltyService.setModelsForUserRankings(n,r,e,t)]}}))}))},this.getTemplateMatches=function(t,e,n){return r(b,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return[4,this.getTemplateById(t,n)];case 1:return(r=i.sent()).competitionIds&&0!==r.competitionIds.length||r.teamIds&&0!==r.teamIds.length||r.matchIds&&0!==r.matchIds.length||r.gameIds&&0!==r.gameIds.length||r.gameTypes&&0!==r.gameTypes.length||r.groups&&0!==r.groups.length?[4,this.loyaltyService.initMatchFiltersForTemplates(r,e)]:[2,[]];case 2:return a=i.sent(),[4,this.football.getMatches(a,n)];case 3:return[2,i.sent().data]}}))}))},this.config=t,this.clientHttps=e,this.loyaltyHttps=n,this.profileFacade=new c.default(g,s),this.loyaltyService=new l.default(this.config),this.loyaltyValidator=new d.default,this.topXFacade=new f.default(t),this.matchQuizFacade=new h.default(t),this.predictorHttps=new p.default(t),this.errorHandlingMode=t.errorHandlingMode,this.football=new _.default(t)}},92962:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(47686)),o=a(n(87059)),u=a(n(83822)),l=a(n(84275)),c=a(n(78358));e.default=function(t){var e=this;this.clientHttps=null,this.profileHttps=null,this.loyaltyHttps=null,this.loyaltyFacade=null,this.localCache=null,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getConfigV2=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getConfigV2(t)];case 1:return[2,e.sent()]}}))}))},this.getClientBadges=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getClientBadges()];case 1:return[2,t.sent()]}}))}))},this.getClientBadgesV2=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getClientBadgesV2(t)];case 1:return[2,e.sent()]}}))}))},this.getTemplates=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplates(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTemplateById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboard=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboard(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboardForGame=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboardForGame(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboardForLeague=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getLeaderboardForLeague(t,n)];case 1:return[2,e.sent()]}}))}))},this.getOwnRankings=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getOwnRankings(t,n)];case 1:return[2,e.sent()]}}))}))},this.getUserRankings=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getUserRankings(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getHighestSuccessRate=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getHighestSuccessRate(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTemplateWinners=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateWinners(t,n)];case 1:return[2,e.sent()]}}))}))},this.getEntitiesFollows=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getEntitiesFollows(t,n)];case 1:return[2,e.sent()]}}))}))},this.getTemplateMatches=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateMatches(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.clientHttps=new s.default(t),this.profileHttps=new l.default(t),this.loyaltyHttps=new o.default(t),this.localCache=(new c.default).createLocalCacheInstance(t.idSchema),this.loyaltyFacade=new u.default(t,this.clientHttps,this.loyaltyHttps,this.profileHttps,this.localCache)}},78153:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},75111:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(78153));e.default=function(){this.value=[new i.default]}},38608:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=[],this.predictor=[],this.topX=[],this.matchQuiz=[]}},70246:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(51429));e.default=function(){this.assets={mainImageUrl:""},this.requirements=new i.default}},18687:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},77983:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(82354));e.default=function(){this.assets={mainImageUrl:""},this.requirements=new i.default}},82354:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.postPoints=null,e.postsCount=null,e.reactionsCount=null,e.totalDiscussionPoints=null,e}return i(e,t),e}(a(n(51429)).default);e.default=s},51429:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.gameParticipationCount=null,this.entityId=null,this.entityType=null,this.predictionsMade=null,this.correctPredictions=null}},49750:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(27978));e.default=function(){this.predictor=[],this.topX=[],this.matchQuiz=[],this.games=[],this.football=[],this.classicQuizzes=[],this.eitherOr=[],this.discussions=[],this.voting=new i.default}},99805:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.assets={mainImageUrl:""}}},63636:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},50075:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},33101:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(50075)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},11963:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityModel=null}},93035:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(11963)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},64270:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},68699:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(64270)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},33626:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},16268:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(33626)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},45643:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},38574:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(45643)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},63143:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},95793:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(63143)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},98743:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64646)).default);e.default=s},64646:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99805)),o=a(n(21821)),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.requirements=new o.default,e}return i(e,t),e}(s.default);e.default=u},21821:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},27978:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.potm=[],this.poll=[]}},50515:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(75111)),a=r(n(94226));e.default=function(){this.enabled=!1,this.clientId=null,this.conditions={list:null},this.actions=new i.default,this.rewards=new a.default}},16866:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(75111)),a=r(n(66483));e.default=function(){this.enabled=!1,this.clientId=null,this.conditions={list:null},this.actions=new i.default,this.rewards=new a.default}},46480:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.count=0,this.breakdown=[]}},91634:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},22544:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=null,this.page=null,this.groupId=null,this.limit=(null==t?void 0:t.limit)||null,this.page=(null==t?void 0:t.page)||null,void 0!==(null==t?void 0:t.groupId)&&console.warn("Warning: groupId filter property is deprecated and no longer supported by the API. This property will be removed in a future version. Please update your code accordingly.")}return t.prototype.constructFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit=".concat(this.limit)),this.page&&(t+="&",t+="page=".concat(this.page)),t},t}();e.default=n},63247:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.market=t.market?t.market:null,this.fromDate=t.fromDate?t.fromDate:null,this.toDate=t.toDate?t.toDate:null,this.usersCount=t.usersCount?t.usersCount:null,this.minimumPredictions=t.minimumPredictions?t.minimumPredictions:null}return t.prototype.constructFiltersUrl=function(){var t="";return this.market&&(t+="&",t+="market=".concat(this.market)),this.fromDate&&(t+="&",t+="from_date=".concat(this.fromDate)),this.toDate&&(t+="&",t+="to_date=".concat(this.toDate)),this.usersCount&&(t+="&",t+="users_count=".concat(this.usersCount)),this.minimumPredictions&&(t+="&",t+="minimum_predictions=".concat(this.minimumPredictions)),t},t}();e.default=n},84169:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.templateId=null,this.limit=null,this.page=null,this.groupId=null,this.templateId=(null==t?void 0:t.templateId)||null,this.limit=(null==t?void 0:t.limit)||null,this.page=(null==t?void 0:t.page)||null,void 0!==(null==t?void 0:t.groupId)&&console.warn("Warning: groupId property is deprecated and no longer supported by the API. This property will be removed in a future version. Please update your code accordingly.")}return t.prototype.constructFiltersUrl=function(){var t="";return this.templateId&&(t+="&template_id=".concat(this.templateId)),this.limit&&(t+="&limit=".concat(this.limit)),this.page&&(t+="&page=".concat(this.page)),t},t}();e.default=n},97910:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.groupId=null,this.limit=null,this.page=null,this.groupId=t.groupId?t.groupId:null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null}return t.prototype.constructFiltersUrl=function(){var t="";return this.groupId&&(t+="&",t+="group_id=".concat(this.groupId)),this.limit&&(t+="&",t+="limit=".concat(this.limit)),this.page&&(t+="&",t+="page=".concat(this.page)),t},t}();e.default=n},34996:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.sortOrder=null,this.rankType=null,this.leaderboardIds=null,this.gameType=null,this.limit=null,this.page=null,this.groupId=null,this.constructFiltersUrl=function(){var t="";return e.sortOrder&&(t+="&",t+="sort_order=".concat(e.sortOrder)),e.rankType&&(t+="&",t+="rank_type=".concat(e.rankType)),e.leaderboardIds&&(t+="&",t+="type_ids=".concat(e.leaderboardIds.join(","))),e.gameType&&(t+="&",t+="game_type=".concat(e.gameType)),e.limit&&(t+="&",t+="limit=".concat(e.limit)),e.page&&(t+="&",t+="page=".concat(e.page)),t},this.sortOrder=t.sortOrder,this.rankType=t.rankType,this.leaderboardIds=t.leaderboardIds,this.gameType=t.type&&"game"===t.type.toLowerCase()?t.gameType:null,this.limit=t.limit,this.page=t.page,void 0!==(null==t?void 0:t.groupId)&&console.warn("Warning: groupId property is deprecated and no longer supported by the API. This property will be removed in a future version. Please update your code accordingly.")}},48061:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.flags=null,this.status=null,this.type=null,this.activeFrom=null,this.activeTo=null,this.createdFrom=null,this.createdTo=null,this.updatedFrom=null,this.updatedTo=null,this.flags=t.flags?t.flags:null,this.status=t.status?t.status:null,this.type=t.type?t.type:null,this.activeFrom=t.activeFrom?t.activeFrom:null,this.activeTo=t.activeTo?t.activeTo:null,this.createdFrom=t.createdFrom?t.createdFrom:null,this.createdTo=t.createdTo?t.createdTo:null,this.updatedFrom=t.updatedFrom?t.updatedFrom:null,this.updatedTo=t.updatedTo?t.updatedTo:null}return t.prototype.constructFiltersUrl=function(){var t="";return this.flags&&this.flags.length>0&&(t+="&",t+="flags=".concat(this.flags.join(","))),this.status&&(t+="&",t+="status=".concat(this.status)),this.type&&(t+="&",t+="type=".concat(this.type)),this.activeFrom&&(t+="&",t+="active_from=".concat(this.activeFrom)),this.activeTo&&(t+="&",t+="active_to=".concat(this.activeTo)),this.createdFrom&&(t+="&",t+="created_from=".concat(this.createdFrom)),this.createdTo&&(t+="&",t+="created_to=".concat(this.createdTo)),this.updatedFrom&&(t+="&",t+="updated_from=".concat(this.updatedFrom)),this.updatedTo&&(t+="&",t+="updated_to=".concat(this.updatedTo)),t},t}();e.default=n},56507:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.points=null,this.predictionsMade=null,this.profileId=null,this.profileModel=null,this.successRatePercent=null}},7746:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(56507));e.default=function(){this.remapHighestSuccessRate=function(t){return t.map((function(t){var e=new i.default;return e.position=t.position,e.points=t.points,e.predictionsMade=t.predictions_made,e.profileId=t.profile_id,e.successRatePercent=t.success_rate_percent,e}))}}},91317:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(68988));e.default=function(){this.meta=new i.default,this.data=[]}},69642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.profileId=null,this.profileModel=null,this.points=null,this.predictionsMade=null}},87419:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(68988)),a=r(n(45828)),s=r(n(33224)),o=r(n(69642));e.default=function(){var t=this;this.remapResponse=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapData(e.data),e},this.remapLeagueLeaderboardResponse=function(e){return e.meta=t.remapLeagueLeaderboardMeta(e.meta),e.data=t.remapData(e.data),e},this.remapTemplateBreakdown=function(e){return e.meta=t.remapMeta(e.meta),e.data=e.data.map((function(e){return t.remapTemplatePoints(e)})),e},this.remapMeta=function(t){var e=new a.default;return e.rankType=t.rank_type,e.fromDate=t.from_date,e.toDate=t.to_date,e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e},this.remapLeagueLeaderboardMeta=function(t){var e=new i.default;return e.templateId=t.template_id,e.privateLeagueId=t.private_league_id,e.fromDate=t.from_date,e.toDate=t.to_date,e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e},this.remapData=function(t){var e=[];return t.forEach((function(t){var n=new o.default;n.position=t.position,n.profileId=t.profile_id,n.points=t.points,n.predictionsMade=t.predictions_made,e.push(n)})),e},this.remapTemplatePoints=function(t){var e=new s.default;return e.groupId=t.group_id,e.averagePoints=t.average_points,e.highestPoints=t.highest_points,e}}},27460:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(45828));e.default=function(){this.meta=new i.default,this.data=[]}},93409:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.flags="",this.status="",this.type="",this.activeFrom="",this.activeTo="",this.createdFrom="",this.createdTo="",this.updatedFrom="",this.updatedTo=""}},68988:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(10155));e.default=function(){this.templateId=null,this.privateLeagueId=null,this.fromDate=null,this.toDate=null,this.pagination=new i.default}},45828:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(10155));e.default=function(){this.rankType=null,this.fromDate=null,this.toDate=null,this.pagination=new i.default}},69012:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(10155)),a=r(n(93409));e.default=function(){this.pagination=new i.default,this.filters=new a.default}},5038:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.points=null}},4187:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=null,this.predictor=null,this.activity=null,this.topX=null,this.matchQuiz=null,this.discussionPost=null}},78072:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=t.call(this)||this;return delete e.weight,e}return i(e,t),e}(a(n(78153)).default);e.default=s},9013:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.id=null,e.rankType=null,e.model=null,e.gameType=null,e}return i(e,t),e}(a(n(69642)).default);e.default=s},64533:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(11298)),a=r(n(73569)),s=r(n(99659)),o=r(n(9013)),u=function(){function t(){var t=this;this.remapRankings=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapData(e.data),e},this.remapRankingsPrivateLeague=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapDataUserRankingPrivateLeague(e.data),e},this.remapRankingsChallenge=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapDataUserRankingChallenge(e.data),e},this.remapMeta=function(t){var e=new a.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.numberOfPages=t.pagination.number_of_pages,e.pagination.totalItems=t.pagination.total_items,e}}return t.prototype.remapData=function(t){var e=[];return t.forEach((function(t){var n=new o.default;n.id=t.id,n.rankType=t.rank_type,n.position=t.position,n.points=t.points,n.gameType=t.game_type,delete n.profileId,delete n.profileModel,delete n.predictionsMade,e.push(n)})),e},t.prototype.remapDataUserRankingPrivateLeague=function(t){var e=[];return t.forEach((function(t){var n=new s.default;n.templateId=t.template_id,n.privateLeagueId=t.private_league_id,n.position=t.position,n.points=t.points,e.push(n)})),e},t.prototype.remapDataUserRankingChallenge=function(t){var e=[];return t.forEach((function(t){var n=new i.default;n.templateId=t.template_id,n.challengeId=t.private_league_id,n.position=t.position,n.points=t.points,e.push(n)})),e},t}();e.default=u},94226:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.tiers=null,this.badges=null}},66483:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.tiers=null,this.badges=null}},36569:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(45828));e.default=function(){this.meta=new i.default,this.data=[]}},33224:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},44982:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.adContent=null,e}return i(e,t),e}(a(n(30194)).default);e.default=s},8587:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.fromDate=null,this.toDate=null,this.matchIds=[]}},49324:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.groupId=null,this.label=null,this.flags=[],this.filters=null}},30194:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id=null,this.name=null,this.description=null,this.type=null,this.fromDate=null,this.toDate=null,this.markets=[],this.teamIds=[],this.matchIds=[],this.groups=[],this.gameIds=[],this.gameTypes=[],this.competitionIds=[],this.excludedProfileIds=[],this.rules=null,this.labels=null,this.customFields=null,this.branding=null,this.flags=null,this.images=new i.default,this.status=null,this.automaticallyChangeStatus=!0,this.createdAt=null,this.updatedAt=null,this.related=null}},18899:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(63483)),o=a(n(16692)),u=a(n(69012)),l=a(n(44982)),c=a(n(8587)),d=a(n(49324)),f=a(n(30194)),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapResponse=function(t){var n=[];return t.forEach((function(t){var r=new f.default;r.id=t.id,r.name=t.name,r.description=t.description,r.type=t.type,r.fromDate=t.from_date,r.toDate=t.to_date,r.markets=t.markets?t.markets:null,r.teamIds=t.team_ids?t.team_ids:null,r.matchIds=t.match_ids?t.match_ids:null,r.groups=t.groups?e.remapGroups(t.groups):null,r.gameIds=t.game_ids?t.game_ids:null,r.gameTypes=t.game_types?t.game_types:null,r.competitionIds=t.competition_ids?t.competition_ids:null,r.excludedProfileIds=t.excluded_profile_ids?t.excluded_profile_ids:null,r.rules=t.rules?t.rules:null,r.labels=t.labels?t.labels:null,r.customFields=t.custom_fields?t.custom_fields:null,r.branding=t.branding?e.remapBranding(t.branding):null,r.flags=t.flags?t.flags:null,r.images=t.images?t.images:null,r.status=t.status?t.status:null,r.automaticallyChangeStatus=t.automatically_change_status,r.createdAt=t.created_at,r.updatedAt=t.updated_at,r.related=t.related?e.remapRelated(t.related):null,n.push(r)})),n},e.remapResponseId=function(t){var n=new l.default;return n.id=t.id,n.name=t.name,n.description=t.description,n.type=t.type,n.fromDate=t.from_date,n.toDate=t.to_date,n.markets=t.markets?t.markets:null,n.teamIds=t.team_ids?t.team_ids:null,n.matchIds=t.match_ids?t.match_ids:null,n.groups=t.groups?e.remapGroups(t.groups):null,n.gameIds=t.game_ids?t.game_ids:null,n.gameTypes=t.game_types?t.game_types:null,n.competitionIds=t.competition_ids?t.competition_ids:null,n.excludedProfileIds=t.excluded_profile_ids?t.excluded_profile_ids:null,n.rules=t.rules?t.rules:null,n.flags=t.flags?t.flags:null,n.images=t.images?t.images:null,n.status=t.status?t.status:null,n.automaticallyChangeStatus=t.automatically_change_status,n.related=t.related?e.remapRelated(t.related):null,n.labels=t.labels,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.adContent=t.ad_content,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapMeta=function(t){var e=new u.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.totalItems=t.pagination.total_items,e.pagination.numberOfPages=t.pagination.number_of_pages,e.filters.flags=t.filters.flags,e.filters.status=t.filters.status,e.filters.type=t.filters.type,e.filters.activeFrom=t.filters.active_from,e.filters.activeTo=t.filters.active_to,e.filters.createdFrom=t.filters.created_from,e.filters.createdTo=t.filters.created_to,e.filters.updatedFrom=t.filters.updated_from,e.filters.updatedTo=t.filters.updated_to,e},e.remapRelated=function(t){return t.map((function(t){var e=new s.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e}))},e.remapGroups=function(t){return t.map((function(t){var n=new d.default;return n.groupId=t.group_id,n.label=t.label,n.flags=t.flags,n.filters=e.remapGroupFilters(t.filters),n}))},e.remapGroupFilters=function(t){var e=new c.default;return e.fromDate=t.from_date,e.toDate=t.to_date,e.matchIds=t.match_ids,e},e}return i(e,t),e}(o.default);e.default=h},47478:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.id=null,this.label=null,this.points=null}},53142:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=n(4021),l=n(94904),c=s(n(68097)),d=s(n(62535)),f=n(90712),h=n(5318),p=s(n(88900)),m=s(n(48808)),v=s(n(86134)),_=s(n(81859)),y=s(n(91550)),g=s(n(86409)),b=s(n(89502)),w=s(n(18687)),E=s(n(63636)),I=s(n(84169)),M=s(n(97910)),O=s(n(34996));e.default=function(t){var e=this;this.idMappingService=null,this.profileNamespace=null,this.footballNamespace=null,this.topXFacade=null,this.matchQuizFacade=null,this.miniGamesNamespace=null,this.errorHandlingMode=null,this.remapTemplatesIds=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s,o;return i(this,(function(i){switch(i.label){case 0:return t.length>0?(e=[],n=[],r=[],t.forEach((function(t){t.teamIds&&t.teamIds.length>0&&(e=a(a([],e,!0),t.teamIds,!0)),t.matchIds&&t.matchIds.length>0&&(n=a(a([],n,!0),t.matchIds,!0)),t.competitionIds&&t.competitionIds.length>0&&(r=a(a([],r,!0),t.competitionIds,!0))})),s={team:e,match:n,competition:r},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(s,"native",this.idMappingService.idSchema)]):[3,2];case 1:return o=i.sent(),a([],o.team,!0),a([],o.match,!0),a([],o.competition,!0),t.forEach((function(t){t.teamIds&&t.teamIds.length>0&&(t.teamIds=t.teamIds.map((function(t){return o.team.shift()}))),t.matchIds&&t.matchIds.length>0&&(t.matchIds=t.matchIds.map((function(t){return o.match.shift()}))),t.competitionIds&&t.competitionIds.length>0&&(t.competitionIds=t.competitionIds.map((function(t){return o.competition.shift()})))})),[2,t];case 2:return[2,t]}}))}))},this.remapTemplateGroupMatchIds=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s;return i(this,(function(i){switch(i.label){case 0:if(!(t&&t.length>0))return[3,4];e=0,n=t,i.label=1;case 1:return e<n.length?(r=n[e]).filters.matchIds&&r.filters.matchIds.every((function(t){return t}))&&r.filters.matchIds.length>0?(a={match:Array.from(r.filters.matchIds)},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(a,"native",this.idMappingService.idSchema)]):[3,3]:[3,4];case 2:s=i.sent(),r.filters.matchIds=Array.from(s.match),i.label=3;case 3:return e++,[3,1];case 4:return[2]}}))}))},this.addProfileModelToLeaderboard=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t.length>0?(e=[],(n=t.map((function(t){return t.profileId}))).length?[4,this.profileNamespace.getByIds(n)]:[2,t]):[3,2];case 1:return r=i.sent(),t.forEach((function(t){r.forEach((function(e){e.id===t.profileId&&(delete e.interests,t.profileModel=e)})),t.profileModel||(t.profileModel=null),e.push(t)})),[2,e];case 2:return[2,t]}}))}))},this.buildOldClientBadges=function(t){var n=new w.default;return n.general=e.extractEnabledBadgesId(t.general),n.predictor=e.extractEnabledBadgesId(t.predictor),n.topX=e.extractEnabledBadgesId(t.topX),n.matchQuiz=e.extractEnabledBadgesId(t.matchQuiz),n},this.buildNewClientBadges=function(t){var n=new E.default;return n.predictor=e.extractEnabledBadgesId(t.predictor),n.topX=e.extractEnabledBadgesId(t.topX),n.matchQuiz=e.extractEnabledBadgesId(t.matchQuiz),n.games=e.extractEnabledBadgesId(t.games),n.football=e.extractEnabledBadgesId(t.football),n.classicQuizzes=e.extractEnabledBadgesId(t.classicQuizzes),n.eitherOr=e.extractEnabledBadgesId(t.eitherOr),n.discussions=e.extractEnabledBadgesId(t.discussions),n.potm=e.extractEnabledBadgesId(t.voting.potm),n.poll=e.extractEnabledBadgesId(t.voting.poll),n},this.initFilters=function(t,e){switch(e){case"loyalty":t&&(t=new M.default(t));break;case"rankings":t&&(t=new O.default(t));break;case"league_leaderboard":t&&(t=new I.default(t))}return t},this.addProfileModelToHighestSuccessRate=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=t.map((function(t){return t.profileId}))).length?[4,this.profileNamespace.getByIds(e)]:[2,t];case 1:return n=r.sent(),[2,t.map((function(t){return n.forEach((function(e){e.id===t.profileId&&(delete e.interests,t.profileModel=e)})),t}))]}}))}))},this.extractRankingsIdsMap=function(t){var e=[],n=[],r=[];return t.forEach((function(t){"GAME"===t.rankType&&"TOP_X"===t.gameType?e.push(t.id):"GAME"===t.rankType&&"MATCH_QUIZ"===t.gameType?n.push(t.id):"TEMPLATE"===t.rankType&&r.push(t.id)})),[e,n,r]},this.setModelsForUserRankings=function(t,e,n,r){return r.data.forEach((function(r){"MATCH_QUIZ"===r.gameType&&e?r.model=e.filter((function(t){return t.id===r.id}))[0]:"TOP_X"===r.gameType&&t?r.model=t.filter((function(t){return t.id===r.id}))[0]:"TEMPLATE"===r.rankType&&n&&(r.model=n.filter((function(t){return t.id===r.id}))[0])})),r},this.completeContestWinners=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return t.userList&&t.userList.length?(e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)]):[3,2];case 1:n=r.sent(),t.userList.forEach((function(t){var e=n.filter((function(e){return e.id===t.profileId}))[0];delete e.interests,t.profileModel=e})),r.label=2;case 2:return[2,t]}}))}))},this.validateEntitiesFollowsFilters=function(t){if(!t||!(t.footballCompetitions&&t.footballCompetitions.length||t.footballTeams&&t.footballTeams.length||t.footballPlayers&&t.footballPlayers.length)){if("default"===e.errorHandlingMode)throw new c.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_FILTERS,h.ErrorMessages.ENTITIES_NEEDED);throw new d.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_FILTERS,h.ErrorMessages.ENTITIES_NEEDED)}if(t.footballCompetitions&&t.footballCompetitions.length>24||t.footballTeams&&t.footballTeams.length>24||t.footballPlayers&&t.footballPlayers.length>24){if("default"===e.errorHandlingMode)throw new c.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.EXCEEDED_LENGTH,h.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED);throw new d.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.EXCEEDED_LENGTH,h.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED)}},this.remapEntitiesFollowsFilters=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:return e=JSON.parse(JSON.stringify(t)),n={},r={},e.footballCompetitions&&e.footballCompetitions.length&&(r.competition=e.footballCompetitions),e.footballTeams&&e.footballTeams.length&&(r.team=e.footballTeams),e.footballPlayers&&e.footballPlayers.length&&(r.player=e.footballPlayers),[4,this.idMappingService.idMappingFacade.getEntitiesByIds(r,this.idMappingService.idSchema,o.IdSchemaEnum.NATIVE)];case 1:return a=i.sent(),Object.keys(a).forEach((function(t){"competition"===t?n.footballCompetitions=a[t]:"team"===t?n.footballTeams=a[t]:"player"===t&&(n.footballPlayers=a[t])})),[2,n]}}))}))},this.addModelsToEntitiesFollows=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s,o,u,l,c;return i(this,(function(i){switch(i.label){case 0:return e=[],n="fb:c:",r=new Map,a=[],s="fb:t:",o=new Map,u=[],l="fb:p:",c=null,t.breakdown.forEach((function(t){t.id.includes(n)?e.push(t.id):t.id.includes(s)?a.push(t.id):t.id.includes(l)&&u.push(t.id)})),e.length?[4,this.footballNamespace.footballFacade.competitionsFacade.getCompetitionsMapWithNativeIds(e)]:[3,2];case 1:r=i.sent(),i.label=2;case 2:return a.length?[4,this.footballNamespace.footballFacade.teamsFacade.getTeamsMapWithNativeIds(a)]:[3,4];case 3:o=i.sent(),i.label=4;case 4:return u.length?[4,this.footballNamespace.footballFacade.playerFacade.getPlayersMapWithNativeIds(u)]:[3,6];case 5:c=i.sent(),i.label=6;case 6:return t.breakdown.forEach((function(t){t.id.includes(n)?(t.model=r.get(t.id),t.id=t.model.id):t.id.includes(s)?(t.model=o.get(t.id),t.id=t.model.id):t.id.includes(l)&&(t.model=c[t.id],t.id=t.model.id)})),[2,t]}}))}))},this.getMatchIdsFromGamesInTemplates=function(t,n){return r(e,void 0,void 0,(function(){var e,r,s,o,u,l,c,d,h,p,m,v,_,y,g,b,w,E,I,M=this;return i(this,(function(i){switch(i.label){case 0:if(!(t&&t.length>0))return[3,12];if(e=(0,f.limitIds)(t,100),r=[],!n||1!==n.length)return[3,8];if(!n.includes("TOP_X"))return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,Promise.all(e.map((function(t){return M.topXFacade.getGamesNoRemap({gameIds:t,limit:t.length},!0)})))];case 2:return u=i.sent(),r=u.reduce((function(t,e){return a(a([],t,!0),e.data,!0)}),[]),[3,4];case 3:throw s=i.sent(),console.error("There was a problem fetching match IDs from Top X games",s),s;case 4:if(!n.includes("MATCH_QUIZ"))return[3,8];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,Promise.all(e.map((function(t){return M.matchQuizFacade.getGamesNoRemap({gameIds:t,limit:t.length},!0)})))];case 6:return u=i.sent(),r=u.reduce((function(t,e){return a(a([],t,!0),e.data,!0)}),[]),[3,8];case 7:throw o=i.sent(),console.error("There was a problem fetching match IDs from Match Quiz games",o),o;case 8:return i.trys.push([8,10,,11]),[4,Promise.all(e.map((function(t){var e=M.topXFacade.getGamesNoRemap({gameIds:t,limit:t.length},!0),n=M.matchQuizFacade.getGamesNoRemap({gameIds:t,limit:t.length},!0);return Promise.all([e,n])})))];case 9:return u=i.sent(),r=u.reduce((function(t,e){var n=e[0],r=e[1];return a(a(a([],t,!0),n.data,!0),r.data,!0)}),[]),[3,11];case 10:throw l=i.sent(),console.error("There was a problem fetching match IDs from both Top X and Match Quiz games",l),l;case 11:return c=new Set,r.forEach((function(t){t.fixtures.map((function(t){return t.match_id})).forEach((function(t){return c.add(t)}))})),[2,Array.from(c)];case 12:d=[],h=100,i.label=13;case 13:i.trys.push([13,22,,23]),p=0,m=n,i.label=14;case 14:if(!(p<m.length))return[3,21];v=m[p],_=!0,y="",g=0,i.label=15;case 15:return _?(b=void 0,w={limit:h,startAfter:y},"TOP_X"!==v?[3,17]:[4,this.topXFacade.getGamesNoRemap(w,!0)]):[3,20];case 16:return b=i.sent(),d=a(a([],d,!0),b.data,!0),y=b.meta.pagination.next_page_starts_after||null,[3,19];case 17:return"MATCH_QUIZ"!==v?[3,19]:[4,this.matchQuizFacade.getGamesNoRemap(w,!0)];case 18:b=i.sent(),d=a(a([],d,!0),b.data,!0),y=b.meta.pagination.next_page_starts_after||null,i.label=19;case 19:return _=!!y,++g>=5&&(_=!1),[3,15];case 20:return p++,[3,14];case 21:return E=new Set,d.forEach((function(t){t.fixtures.map((function(t){return t.match_id})).forEach((function(t){return E.add(t)}))})),[2,Array.from(E)];case 22:throw I=i.sent(),console.error("There was a problem fetching match IDs from games",I),I;case 23:return[2]}}))}))},this.initMatchFiltersForTemplates=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,s,o,f,p,m;return i(this,(function(i){switch(i.label){case 0:return e=[],r=[],a=[],s=t.fromDate?this.reformatDate(t.fromDate):null,o=t.toDate?this.reformatDate(t.toDate,!0):null,f=500,t.competitionIds&&t.competitionIds.length>0&&(e=Array.from(t.competitionIds)),t.teamIds&&t.teamIds.length>0&&(r=Array.from(t.teamIds)),t.matchIds&&t.matchIds.length>0&&(a=Array.from(t.matchIds)),this.isGameTemplate(t)?[4,this.getMatchIdsFromGamesInTemplates(t.gameIds,t.gameTypes)]:[3,2];case 1:a=i.sent(),i.label=2;case 2:if(n){if(!(p=t.groups.find((function(t){return t.groupId===n})))){if("default"===this.errorHandlingMode)throw new c.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_TEMPLATE_GROUP_ID,h.ErrorMessages.INVALID_TEMPLATE_GROUP_ID);throw new d.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_TEMPLATE_GROUP_ID,h.ErrorMessages.INVALID_TEMPLATE_GROUP_ID)}if(!p.filters){if("default"===this.errorHandlingMode)throw new c.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_TEMPLATE_GROUP_FILTERS,h.ErrorMessages.INVALID_TEMPLATE_GROUP_FILTERS);throw new d.default(u.ErrorCodes.BAD_METHOD_CALL,l.ErrorStatuses.INVALID_TEMPLATE_GROUP_FILTERS,h.ErrorMessages.INVALID_TEMPLATE_GROUP_FILTERS)}s=p.filters.fromDate?this.reformatDate(p.filters.fromDate):null,o=p.filters.toDate?this.reformatDate(p.filters.toDate,!0):null,m=p.filters.matchIds.every((function(t){return t})),p.filters.matchIds.length>0&&m&&(a=Array.from(p.filters.matchIds))}return[2,new v.default({competitionIds:e,teamIds:r,matchIds:a,fromDate:s,toDate:o,limit:f})]}}))}))},this.isGameTemplate=function(t){if(t.gameIds&&t.gameIds.length>0)return!0;if(t.gameTypes&&t.gameTypes.length>0){if(t.gameTypes.includes("TOP_X"))return!0;if(t.gameTypes.includes("MATCH_QUIZ"))return!0}return!1},this.reformatDate=function(t,e){var n=new Date(t);e&&n.setUTCHours(23,59,59);var r=n.toISOString();return r.slice(0,-5)+"Z"},this.extractEnabledBadgesId=function(t){var e=[];return t.forEach((function(t){t.enabled&&e.push(t.id)})),e},this.addEntityModelToFootballBadges=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s,o,u,l,c,d,f,h=this;return i(this,(function(i){switch(i.label){case 0:return e=[],n=[],r=[],a=[],t.football&&t.football.length>0&&(e=t.football.filter((function(t){return"competition"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),n=t.football.filter((function(t){return"team"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),r=t.football.filter((function(t){return"player"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),a=t.football.filter((function(t){return"match"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId}))),t.voting&&t.voting.poll&&t.voting.poll.length>0&&(s=this.extractEntityIdsFromBadges(t.voting.poll),u=s[0],l=s[1],c=s[2],d=s[3],e=e.concat(u),e=Array.from(new Set(e)),n=n.concat(l),n=Array.from(new Set(n)),r=r.concat(c),r=Array.from(new Set(r)),a=a.concat(d),a=Array.from(new Set(a))),t.voting&&t.voting.potm&&t.voting.potm.length>0&&(o=this.extractEntityIdsFromBadges(t.voting.potm),u=o[0],l=o[1],c=o[2],d=o[3],e=e.concat(u),e=Array.from(new Set(e)),n=n.concat(l),n=Array.from(new Set(n)),r=r.concat(c),r=Array.from(new Set(r)),a=a.concat(d),a=Array.from(new Set(a))),[4,this.fetchFootballEntities(e,n,r,a)];case 1:return f=i.sent(),t.football&&t.football.length>0&&t.football.forEach((function(t){h.setEntityModelsFromMap(t.requirements,"competition",f.competitions),h.setEntityModelsFromMap(t.requirements,"team",f.teams),h.setEntityModelsFromObject(t.requirements,"player",f.players),h.setEntityModelsFromObject(t.requirements,"match",f.matches)})),t.voting&&t.voting.poll&&t.voting.poll.length>0&&t.voting.poll.forEach((function(t){h.setEntityModelsFromMap(t.requirements,"competition",f.competitions),h.setEntityModelsFromMap(t.requirements,"team",f.teams),h.setEntityModelsFromObject(t.requirements,"player",f.players),h.setEntityModelsFromObject(t.requirements,"match",f.matches)})),t.voting&&t.voting.potm&&t.voting.potm.length>0&&t.voting.potm.forEach((function(t){h.setEntityModelsFromMap(t.requirements,"competition",f.competitions),h.setEntityModelsFromMap(t.requirements,"team",f.teams),h.setEntityModelsFromObject(t.requirements,"player",f.players),h.setEntityModelsFromObject(t.requirements,"match",f.matches)})),[2]}}))}))},this.setEntityModelsFromMap=function(t,e,n){t.entityType===e&&(t.entityModel=n&&n.get(t.entityId)||null,t.entityModel&&(t.entityId=t.entityModel.id))},this.setEntityModelsFromObject=function(t,e,n){t.entityType===e&&(t.entityModel=n[t.entityId]?n[t.entityId]:null,t.entityModel&&(t.entityId=t.entityModel.id))},this.fetchFootballEntities=function(t,n,a,s){return r(e,void 0,void 0,(function(){var e,r,o,u,l;return i(this,(function(i){switch(i.label){case 0:return e={competitions:null,teams:null,players:null,matches:null},t.length?[4,this.footballNamespace.footballFacade.getCompetitionsMapWithNativeIds(t)]:[3,2];case 1:r=i.sent(),e.competitions=r,i.label=2;case 2:return n.length?[4,this.footballNamespace.footballFacade.getTeamsMapWithNativeIds(n)]:[3,4];case 3:o=i.sent(),e.teams=o,i.label=4;case 4:return a.length?[4,this.footballNamespace.footballFacade.getPlayersMapWithNativeIds(a)]:[3,6];case 5:u=i.sent(),e.players=u,i.label=6;case 6:return s.length?[4,this.footballNamespace.footballFacade.getMatchesMapWithNativeIds(s)]:[3,8];case 7:l=i.sent(),e.matches=l,i.label=8;case 8:return[2,e]}}))}))},this.extractEntityIdsFromBadges=function(t){return[t.filter((function(t){return t.requirements.entityType&&"competition"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),t.filter((function(t){return t.requirements.entityType&&"team"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),t.filter((function(t){return t.requirements.entityType&&"player"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId})),t.filter((function(t){return t.requirements.entityType&&"match"===t.requirements.entityType.toLocaleLowerCase()})).map((function(t){return t.requirements.entityId}))]},this.addGameModelToGamesBadges=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s;return i(this,(function(i){switch(i.label){case 0:return t.games&&0!==t.games.length?(e=this.getGameIdsFromGamesBadge(t.games,"top_x"),n=this.getGameIdsFromGamesBadge(t.games,"match_quiz"),r=this.getGameIdsFromGamesBadge(t.games,"classic_quiz"),a=this.getGameIdsFromGamesBadge(t.games,"either_or"),[4,this.fetchGamesEntities(e,n,r,a)]):[2];case 1:return s=i.sent(),t.games.forEach((function(t){t.requirements.specificGames&&t.requirements.specificGames.forEach((function(t){t.gameModel=s.find((function(e){return e.id===t.gameId}))||null}))})),[2]}}))}))},this.getGameIdsFromGamesBadge=function(t,e){var n=t.filter((function(t){return!!t.requirements.specificGames&&t.requirements.specificGames.some((function(t){return t.gameType.toLocaleLowerCase()===e}))})).map((function(t){return t.requirements.specificGames.map((function(t){return t.gameId}))}));return Array.prototype.concat.apply([],n)},this.fetchGamesEntities=function(t,n,s,o){return r(e,void 0,void 0,(function(){var e,r,u,l,c;return i(this,(function(i){switch(i.label){case 0:return e=[],t.length?[4,this.topXFacade.getGames({gameIds:t})]:[3,2];case 1:r=i.sent(),e=a(a([],e,!0),r.data,!0),i.label=2;case 2:return n.length?[4,this.matchQuizFacade.getGames({gameIds:n})]:[3,4];case 3:u=i.sent(),e=a(a([],e,!0),u.data,!0),i.label=4;case 4:return s.length?[4,this.miniGamesNamespace.getClassicQuizzes({classicQuizIds:s})]:[3,6];case 5:l=i.sent(),e=a(a([],e,!0),l.data,!0),i.label=6;case 6:return o.length?[4,this.miniGamesNamespace.getEitherOrs({eitherOrIds:o})]:[3,8];case 7:c=i.sent(),e=a(a([],e,!0),c.data,!0),i.label=8;case 8:return[2,e]}}))}))},this.idMappingService=new p.default(t),this.profileNamespace=new g.default(t),this.footballNamespace=new m.default(t),this.topXFacade=new b.default(t),this.matchQuizFacade=new _.default(t),this.miniGamesNamespace=new y.default(t),this.errorHandlingMode=t.errorHandlingMode}},31139:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(4021),a=n(94904),s=r(n(68097)),o=r(n(62535)),u=n(5318),l=n(27974);e.default=function(){var t=this;this.validate=function(e,n){e.market&&t.validateMarket(e.market,n),e.fromDate&&t.validateDate(e.fromDate,"fromDate",n),e.toDate&&t.validateDate(e.toDate,"toDate",n),e.usersCount&&t.validateNumberFilters(e.usersCount,"usersCount",n),e.minimumPredictions&&t.validateNumberFilters(e.minimumPredictions,"minimumPredictions",n)},this.validateMarket=function(t,e){if(!Object.keys(l.MarketEnum).includes(t)){var n=(0,u.invalidMarketMessage)(t);if("default"===e)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_MARKET,n);throw new o.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_MARKET,n)}},this.validateDate=function(t,e,n){if("string"!=typeof t){if("default"===n)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_TYPE+"string for ".concat(e," filter"));throw new o.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_TYPE+"string for ".concat(e," filter"))}if(!/^\d{4}-\d{2}-\d{2}$/.test(t)){if("default"===n)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_VALUE+"YYYY-MM-DD for ".concat(e));throw new o.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_VALUE+"YYYY-MM-DD for ".concat(e))}},this.validateNumberFilters=function(t,e,n){var r="usersCount"===e?1:0,l="usersCount"===e?1e3:1e6;if("number"!=typeof t){if("default"===n)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_TYPE+"number for ".concat(e," filter"));throw new o.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_TYPE+"number for ".concat(e," filter"))}if(t<r||t>l){if("default"===n)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_VALUE+"between ".concat(r," and ").concat(l));throw new o.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_VALUE+"between ".concat(r," and ").concat(l))}}}},81859:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(14946),c=u(n(81553)),d=a(n(47686)),f=u(n(52793)),h=u(n(88900)),p=u(n(81732)),m=u(n(97782)),v=u(n(25013)),_=n(40853),y=u(n(7299)),g=u(n(12310)),b=u(n(64800)),w=u(n(68097)),E=n(4021),I=n(94904),M=n(5318),O=u(n(62535));e.default=function(t){var e=this;this.predictorHttps=null,this.predictorService=null,this.idMapping=null,this.clientHttps=null,this.predictorValidator=null,this.errorHandlingMode=null,this.getConfig=function(){return s(e,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(d.FeatureConfigEnum.MATCH_QUIZ)];case 1:return t=e.sent(),this.idMapping.idSchema===l.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.play=function(t){return s(e,void 0,void 0,(function(){var e,n,r,i,a,s=this;return o(this,(function(o){switch(o.label){case 0:return t=this.predictorValidator.validateBodyFields("MATCH_QUIZ",t),(e=t.fixtures.map((function(t){return s.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value,t.prediction.playerId)})))&&e.length?this.idMapping.idSchema===l.IdSchemaEnum.NATIVE?[3,4]:(n=[],r=[],e.forEach((function(t){n.push(t.matchId),t instanceof p.default&&t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&r.push(t.prediction.playerId)})),[4,this.predictorService.remapMatchIdToNative(n)]):[3,4];case 1:return i=o.sent(),a={},r&&r.length>0?[4,this.predictorService.remapPlayerIdMapToNative(r)]:[3,3];case 2:a=o.sent(),o.label=3;case 3:e.forEach((function(t,e){t.matchId=i[e],t instanceof p.default&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=a[t.prediction.playerId])})),o.label=4;case 4:return t.fixtures=e,[4,this.predictorHttps.makeFootballPrediction(t)];case 5:return[2,o.sent()]}}))}))},this.delete=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("MATCH_QUIZ",t),[4,this.predictorHttps.getGames(e,n)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGamesNoRemap=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("MATCH_QUIZ",t),[4,this.predictorHttps.getGamesNoRemap(e,n)];case 1:return[2,r.sent()]}}))}))},this.getGameById=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return n=n||!1,[4,this.predictorHttps.getGameById(t,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,n,r){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return r=r||!1,n&&(n.type&&delete n.type,n.status&&delete n.status,n=new m.default(n)),[4,this.predictorHttps.getGamePredictions(t,r,n)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,r){return s(e,void 0,void 0,(function(){var e;return o(this,(function(i){switch(i.label){case 0:return r=r||!1,n&&(n=new b.default(n)),[4,this.predictorHttps.getGameResults(t,r,n)];case 1:return e=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,i.sent()]}}))}))},this.getCurrentGameResults=function(t){return s(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return t=t||!1,(e=new y.default(null)).status=_.GameStatusEnum.OPEN,e.type="MATCH_QUIZ",[4,this.predictorHttps.getGames(e,t)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,t)];case 2:return[2,i.sent().data[0]]}}))}))},this.getMyGameEditions=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i,a,s,u;return o(this,(function(o){switch(o.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),n=n||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(e)];case 1:return(i=o.sent()).data.length>0?(i.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),a=(null==t?void 0:t.limit)?{limit:t.limit}:null,s=this.predictorService.initGameFilters("MATCH_QUIZ",a,r),[4,this.predictorHttps.getUserGameEditions(s,n)]):[3,4];case 2:return u=o.sent(),[4,this.predictorService.addPredictionProp(i,u)];case 3:return[2,o.sent()];case 4:return[2,new c.default]}}))}))},this.getMyGamePrediction=function(t){return s(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return e=new m.default({gameIds:[t]}),[4,this.predictorHttps.getMyPredictions(e)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(e){return e.gameInstanceId===t}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a,s,u,l;return o(this,(function(o){switch(o.label){case 0:return n&&n.limit&&this.validateLimitFilterOnGames(n.limit),r=r||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",n),i=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,e)];case 1:return(a=o.sent()).data.length>0?(a.data.forEach((function(t){t.game_instance_id&&i.push(t.game_instance_id)})),s=(null==n?void 0:n.limit)?{limit:n.limit}:null,u=this.predictorService.initGameFilters("MATCH_QUIZ",s,i),[4,this.predictorHttps.getUserGameEditions(u,r)]):[3,4];case 2:return l=o.sent(),[4,this.predictorService.addPredictionProp(a,l)];case 3:return[2,o.sent()];case 4:return[2,new c.default]}}))}))},this.getUserGamePrediction=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a;return o(this,(function(s){switch(s.label){case 0:return r=r||!1,e=new m.default({gameIds:[n]}),[4,this.predictorHttps.getUserPredictions(t,r,e)];case 1:return(i=s.sent()).data.length>0?[2,(a=i.data.filter((function(t){return t.gameInstanceId===n}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,n)];case 1:return e=r.sent(),[4,this.predictorService.completeGameMarketResults(e,"MATCH_QUIZ")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return[4,this.predictorHttps.getContestWinners(t,n)];case 1:return e=i.sent(),[4,this.getGameById(t)];case 2:return r=i.sent(),e.contestModel=r,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===e.errorHandlingMode&&t>50)throw new w.default(E.ErrorCodes.BAD_METHOD_CALL,I.ErrorStatuses.EXCEEDED_LENGTH,M.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===e.errorHandlingMode&&t>50)throw new O.default(E.ErrorCodes.BAD_METHOD_CALL,I.ErrorStatuses.EXCEEDED_LENGTH,M.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED)},this.predictorValidator=new g.default(t.errorHandlingMode),this.idMapping=new h.default(t),this.predictorHttps=new f.default(t),this.predictorService=new v.default(t,this.idMapping),this.clientHttps=new d.default(t),this.errorHandlingMode=t.errorHandlingMode}},50018:function(t,e){"use strict";var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.findLastGame=function(t){if(!Array.isArray(t)||0===t.length)return null;var e=t.filter((function(t){return"SETTLED"===t.status})).sort((function(t,e){return new Date(e.predictionsCutoff).getTime()-new Date(t.predictionsCutoff).getTime()}));if(e.length>0)return e[0];var n=new Date,r=t.filter((function(t){return new Date(t.predictionsCutoff)<n})).sort((function(t,e){return new Date(e.predictionsCutoff).getTime()-new Date(t.predictionsCutoff).getTime()}));return r.length>0?r[0]:null},this.findNextGame=function(e){if(!Array.isArray(e)||0===e.length)return null;var r=t.findCurrentGame(e);if(!r)return null;var i=n([],e,!0).sort((function(t,e){return new Date(t.predictionsCutoff).getTime()-new Date(e.predictionsCutoff).getTime()})),a=new Date(r.predictionsCutoff).getTime();return i.find((function(t){return new Date(t.predictionsCutoff).getTime()>a}))||null},this.findCurrentGame=function(t){if(!Array.isArray(t)||0===t.length)return null;var e=t.find((function(t){return"LIVE"===t.status}));if(e)return e;var n=t.find((function(t){return"OPEN"===t.status}));if(n)return n;var r=new Date;return t.filter((function(t){return new Date(t.predictionsCutoff)>r})).sort((function(t,e){return new Date(t.predictionsCutoff).getTime()-new Date(e.predictionsCutoff).getTime()}))[0]||null}}},40267:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(81859)),o=a(n(50018));e.default=function(t){var e=this;this.matchQuizFacade=null,this.helpers=new o.default,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.play(t)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGamePredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameResults(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getCurrentGameResults(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMyGameEditions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMyGamePrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getUserGameEditions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getUserGameEditions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getUserGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getMarketsResultsForGame(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameWinners=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameWinners(t,n)];case 1:return[2,e.sent()]}}))}))},this.matchQuizFacade=new s.default(t)}},45765:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.clientId=null,this.defaultMarkets=null,this.competitionsWhitelist=null,this.authRequirement=null}},38410:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36899)),a=r(n(68042));e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new i.default,this.prediction=new a.default}},30670:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameId=null,this.results=null,this.tieBreakers=null}},87243:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(64916));e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.authRequirement=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new i.default,this.predictionId=null,this.participantsCount=0,this.related=[],this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.predictionsUpdatedAt=null,this.images=null,this.scheduleOpenAt=null,this.branding=null}},68042:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.target=null,this.playerId=null,this.playerModel=null,this.result=null}},86390:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=s(n(13022)),l=s(n(78261)),c=s(n(28107)),d=s(n(32261)),f=s(n(63069)),h=s(n(80425)),p=s(n(67050)),m=s(n(33404)),v=s(n(95403));e.default=function(t){var e=this;this.https=null,this.service=null,this.activityService=null,this.idSchema=null,this.getClassicQuizzes=function(t,n,r){return i(e,void 0,void 0,(function(){var e,i,s,u;return a(this,(function(a){switch(a.label){case 0:return t?(t=new c.default(t),[4,this.service.finalizeMiniGamesFilters(t)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[4,this.https.getClassicQuizzes(t,r)];case 3:return e=a.sent(),n?[4,this.service.setContextTagsModels(e.data)]:[3,5];case 4:return a.sent(),[3,9];case 5:i=0,s=e.data,a.label=6;case 6:return i<s.length?(u=s[i],[4,this.remapTags(u,o.IdSchemaEnum.NATIVE,this.idSchema)]):[3,9];case 7:a.sent(),a.label=8;case 8:return i++,[3,6];case 9:return[2,e]}}))}))},this.getClassicQuizById=function(t,n,r){return i(e,void 0,void 0,(function(){var e;return a(this,(function(i){switch(i.label){case 0:return[4,this.https.getClassicQuizById(t,n,r)];case 1:return e=i.sent(),[4,this.service.setContextTagsModels([e])];case 2:return i.sent(),[2,e]}}))}))},this.participateInClassicQuiz=function(t,n,r){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.https.participateInClassicQuiz(t,n,r)];case 1:return[2,e.sent()]}}))}))},this.getMyClassicQuizParticipations=function(t){return i(e,void 0,void 0,(function(){var e,n,i;return a(this,(function(a){switch(a.label){case 0:return t&&(t=new f.default(t)),[4,this.https.getMyClassicQuizParticipations(t)];case 1:return e=a.sent(),n=e.map((function(t){return t.classicQuizId})),[4,this.getClassicQuizzes({classicQuizIds:n})];case 2:return i=a.sent(),[2,e.map((function(t){var e=i.data.find((function(e){return e.id===t.classicQuizId}))||null;return r(r({},t),{classicQuizModel:e})}))]}}))}))},this.getLeaderboardForClassicQuizzes=function(t,n){return i(e,void 0,void 0,(function(){var e,r;return a(this,(function(i){switch(i.label){case 0:return t&&(t=new d.default(t)),[4,this.https.getLeaderboardForClassicQuizzes(t,n)];case 1:return e=i.sent(),r=e,[4,this.service.setProfileModelsForClassicQuizLeaderboards(e.data)];case 2:return r.data=i.sent(),[2,e]}}))}))},this.getClassicQuizzesUserRanking=function(t,n,s){return i(e,void 0,void 0,(function(){var e,i,o;return a(this,(function(a){switch(a.label){case 0:return n&&(n=new h.default(n)),[4,this.https.getClassicQuizzesUserRanking(t,n,s)];case 1:return e=a.sent(),i=e.data.map((function(t){return t.classicQuizId})),[4,this.getClassicQuizzes({classicQuizIds:i})];case 2:return o=a.sent(),e.data=e.data.map((function(t){var e=o.data.find((function(e){return e.id===t.classicQuizId}))||null;return r(r({},t),{classicQuizModel:e})})),[2,e]}}))}))},this.getClassicQuizQuestionsReport=function(t,n){return i(e,void 0,void 0,(function(){var e,r;return a(this,(function(i){switch(i.label){case 0:return n=n||!1,[4,this.https.getClassicQuizQuestionsReport(t)];case 1:return e=i.sent(),[4,this.getClassicQuizById(t,n,!0)];case 2:return r=i.sent(),[2,this.service.setQuestionModelsInQuestionsReport(e,r)]}}))}))},this.getClassicQuizResultsSummary=function(t,n){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.https.getClassicQuizResultsSummary(t,n)];case 1:return[2,e.sent()]}}))}))},this.getEitherOrs=function(t,n,r){return i(e,void 0,void 0,(function(){var e,i,s,u;return a(this,(function(a){switch(a.label){case 0:return t?(t=new p.default(t),[4,this.service.finalizeMiniGamesFilters(t)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[4,this.https.getEitherOrs(t,r)];case 3:return e=a.sent(),n?[4,this.service.setContextTagsModels(e.data)]:[3,5];case 4:return a.sent(),[3,9];case 5:i=0,s=e.data,a.label=6;case 6:return i<s.length?(u=s[i],[4,this.remapTags(u,o.IdSchemaEnum.NATIVE,this.idSchema)]):[3,9];case 7:a.sent(),a.label=8;case 8:return i++,[3,6];case 9:return[2,e]}}))}))},this.getEitherOrById=function(t,n){return i(e,void 0,void 0,(function(){var e;return a(this,(function(r){switch(r.label){case 0:return[4,this.https.getEitherOrById(t,n)];case 1:return e=r.sent(),[4,this.service.setContextTagsModels([e])];case 2:return r.sent(),[2,e]}}))}))},this.getMyEitherOrStats=function(t){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.https.getMyEitherOrStats(t)];case 1:return[2,e.sent()]}}))}))},this.getEitherOrResults=function(t,n){return i(e,void 0,void 0,(function(){var e;return a(this,(function(r){switch(r.label){case 0:return[4,this.https.getEitherOrResults(t,n)];case 1:return e=r.sent(),[4,this.service.setProfileModelsForEitherOrStandings(e)];case 2:return[2,r.sent()]}}))}))},this.participateInEitherOr=function(t,n,r){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return r?[3,2]:[4,this.service.defaultEitherOrParticipation(t,n)];case 1:case 3:return[2,e.sent()];case 2:return[4,this.service.handleEitherOrParticipationWithCallback(t,n,r)]}}))}))},this.calculateEitherOrResultPercentile=function(t,n){return i(e,void 0,void 0,(function(){var e,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:return null==n||isNaN(n)||n<0?[2,null]:0===n?[2,n]:[4,this.getEitherOrResults(t,!0)];case 1:for(e=a.sent(),r=e.breakdown.reduce((function(t,e){return t+e.totalUsers}),0),i=0,s=0,o=e.breakdown;s<o.length;s++)if(u=o[s],i+=u.totalUsers,n>=u.rangeStartInclusive&&n<=u.rangeEndInclusive)return[2,parseFloat((i/r*100).toFixed(1))];return[2,null]}}))}))},this.getPersonalityQuizzes=function(t,n,r){return i(e,void 0,void 0,(function(){var e,i,s,u;return a(this,(function(a){switch(a.label){case 0:return t?(t=new v.default(t),[4,this.service.finalizeMiniGamesFilters(t)]):[3,2];case 1:a.sent(),a.label=2;case 2:return[4,this.https.getPersonalityQuizzes(t,r)];case 3:return e=a.sent(),n?[4,this.service.setContextTagsModels(e.data)]:[3,5];case 4:return a.sent(),[3,9];case 5:i=0,s=e.data,a.label=6;case 6:return i<s.length?(u=s[i],[4,this.remapTags(u,o.IdSchemaEnum.NATIVE,this.idSchema)]):[3,9];case 7:a.sent(),a.label=8;case 8:return i++,[3,6];case 9:return[2,e]}}))}))},this.getPersonalityQuizById=function(t,n){return i(e,void 0,void 0,(function(){var e;return a(this,(function(r){switch(r.label){case 0:return[4,this.https.getPersonalityQuizById(t,n)];case 1:return e=r.sent(),[4,this.service.setContextTagsModels([e])];case 2:return r.sent(),[2,e]}}))}))},this.participateInPersonalityQuiz=function(t,n){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.https.participateInPersonalityQuiz(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPersonalityQuizUserParticipation=function(t,n,r){return i(e,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.https.getPersonalityQuizUserParticipation(t,n,r)];case 1:return[2,e.sent()]}}))}))},this.remapTags=function(t,n,r){return i(e,void 0,void 0,(function(){var e,i;return a(this,(function(a){switch(a.label){case 0:return this.idSchema!=o.IdSchemaEnum.NATIVE&&t.context&&t.context.tags&&t.context.tags.length?(e=JSON.parse(JSON.stringify(t.context.tags)),[4,this.activityService.remapTagsIds(e,n,r)]):[3,2];case 1:i=a.sent(),t.context.tags=i,a.label=2;case 2:return[2]}}))}))},this.https=new u.default(t),this.service=new m.default(t),this.activityService=new l.default(t),this.idSchema=t.idSchema}},91550:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(86390));e.default=function(t){var e=this;this.facade=null,this.getClassicQuizzes=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getClassicQuizzes(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getClassicQuizById=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getClassicQuizById(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.participateInClassicQuiz=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.participateInClassicQuiz(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMyClassicQuizParticipations=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyClassicQuizParticipations(t)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboardForClassicQuizzes=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getLeaderboardForClassicQuizzes(t,n)];case 1:return[2,e.sent()]}}))}))},this.getClassicQuizzesUserRanking=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getClassicQuizzesUserRanking(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getClassicQuizQuestionsReport=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getClassicQuizQuestionsReport(t,n)];case 1:return[2,e.sent()]}}))}))},this.getClassicQuizResultsSummary=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getClassicQuizResultsSummary(t,n)];case 1:return[2,e.sent()]}}))}))},this.getEitherOrs=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getEitherOrs(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getEitherOrById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getEitherOrById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyEitherOrStats=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyEitherOrStats(t)];case 1:return[2,e.sent()]}}))}))},this.getEitherOrResults=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getEitherOrResults(t,n)];case 1:return[2,e.sent()]}}))}))},this.participateInEitherOr=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.participateInEitherOr(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.calculateEitherOrResultPercentile=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.calculateEitherOrResultPercentile(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPersonalityQuizzes=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPersonalityQuizzes(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getPersonalityQuizById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPersonalityQuizById(t,n)];case 1:return[2,e.sent()]}}))}))},this.participateInPersonalityQuiz=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.participateInPersonalityQuiz(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPersonalityQuizUserParticipation=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPersonalityQuizUserParticipation(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},65985:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id=null,this.title=null,this.alternativeTitle=null,this.description=null,this.type=null,this.images=new i.default,this.participationCount=null,this.questionsCount=null,this.status=null,this.language=null,this.authRequirement=null,this.flags=null,this.customFields=null,this.labels=null,this.branding=null,this.related=[],this.time=null,this.points=null,this.scored=!1,this.maxAttempts=null,this.averageScore=null,this.perfectScore=null,this.adContent=null,this.context=null,this.createdAt=null,this.updatedAt=null}},28107:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.classicQuizIds=null,n.classicQuizIds=e&&e.classicQuizIds?e.classicQuizIds:null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.classicQuizIds&&this.classicQuizIds.length>0&&(e+="&classic_quiz_ids=".concat(this.classicQuizIds.join(","))),e},e}(a(n(96021)).default);e.default=s},96235:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rules=null,e.questions=[],e}return i(e,t),e}(a(n(65985)).default);e.default=s},41154:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.optionId=null,this.option=null,this.images=null,this.correct=null}},13142:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=0,this.optionId=0}},68944:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.classicQuizId=null,this.userId=null,this.questions=[],this.correctOptions=null,this.personalBest=null,this.points=null,this.attempts=null}},47763:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=null,this.optionId=null,this.correct=null,this.correctOptionId=null}},63069:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.classicQuizIds=null,n.classicQuizIds=(null==e?void 0:e.classicQuizIds)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.classicQuizIds&&this.classicQuizIds.length>0&&(e+="&classic_quiz_ids=".concat(this.classicQuizIds.join(","))),e},e}(a(n(64800)).default);e.default=s},20772:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=null,this.question=null,this.images=null,this.embedCode=null,this.explanation=null,this.options=[]}},81124:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.classicQuizId=null,this.classicQuizModel=null,this.correct=null,this.classicQuizQuestions=null,this.personalBest=null,this.points=null,this.answers=[],this.attempts=0}},85657:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},91717:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=null,this.questionModel=null,this.wrong=null,this.correct=null,this.skipped=null,this.total=null}},19657:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.classicQuizIds=null}},32261:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.classicQuizIds=null,n.classicQuizIds=(null==e?void 0:e.classicQuizIds)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.classicQuizIds&&this.classicQuizIds.length>0&&(e+="&classic_quiz_ids=".concat(this.classicQuizIds.join(","))),e},e}(a(n(80425)).default);e.default=s},12702:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(10155)),a=r(n(19657));e.default=function(){this.pagination=new i.default,this.filters=new a.default}},80425:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=null,this.page=null,this.limit=(null==t?void 0:t.limit)||null,this.page=(null==t?void 0:t.page)||null}return t.prototype.constructMainFiltersUrl=function(){var t="";return this.limit&&(t+="&limit=".concat(this.limit)),this.page&&(t+="&page=".concat(this.page)),t},t}();e.default=n},75563:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.profileId=null,this.profileModel=null,this.points=null}},38967:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position=null,this.classicQuizId=null,this.classicQuizModel=null,this.points=null}},12723:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569));e.default=function(){this.meta=new i.default,this.data=[]}},43238:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(12702));e.default=function(){this.meta=new i.default,this.data=[]}},64274:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questions=null,this.correctAnswers=null}},69619:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id="",this.title="",this.alternativeTitle="",this.description="",this.images=new i.default,this.flags=[],this.status="",this.language="",this.authRequirement=null,this.winningCondition="",this.lives=0,this.time=0,this.points=[],this.customFields=null,this.branding=null,this.labels=null,this.adContent="",this.context=null,this.type="",this.related=[],this.totalParticipationsCount=0,this.totalUsersCount=0,this.finishedParticipationsCount=0,this.averageStartedParticipationsCount=0,this.averageFinishedParticipationsCount=0,this.createdAt="",this.updatedAt=""}},67050:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.eitherOrIds=null,n.eitherOrIds=e&&e.eitherOrIds?e.eitherOrIds:null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.eitherOrIds&&this.eitherOrIds.length>0&&(e+="&either_or_ids=".concat(this.eitherOrIds.join(","))),e},e}(a(n(96021)).default);e.default=s},3167:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rules="",e}return i(e,t),e}(a(n(69619)).default);e.default=s},69146:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.correctSteps=0,this.score=0}},15367:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.eitherOrId="",this.personalBest=0,this.betterThan=0}},11969:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},55021:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.instanceId="",this.eitherOrId="",this.gameStartedAt="",this.currentStep=0,this.currentStreak=0,this.remainingSteps=0,this.currentLives=0,this.currentPoints=0,this.personalBest=0,this.participationCount=0,this.finishedParticipationsCount=0,this.steps=[]}},70850:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.expired=!1,e.time=0,e}return i(e,t),e}(a(n(55990)).default);e.default=s},55990:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.pair="",this.answer=""}},12557:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(56140));e.default=function(){this.pairId="",this.userSelection="",this.correct=null,this.played=null,this.timestamp="",this.optionOne=new i.default,this.optionTwo=new i.default}},56140:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(55253));e.default=function(){this.id="",this.label="",this.images=new i.default,this.value=null}},12699:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.rangeStartInclusive=0,this.rangeEndInclusive=0,this.totalUsers=0}},8590:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.standings=[],this.breakdown=[]}},45289:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.userId="",this.userModel=null,this.personalBest=""}},96021:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.flags=null,n.status=null,n.entityIds=null,n.entityType=null,n.sort=null,n.groupByStatus=null,n.language=null,n.title=null,n.flags=e&&e.flags?e.flags:null,n.status=e&&e.status?e.status:null,n.entityIds=e&&e.entityIds?e.entityIds:null,n.entityType=e&&e.entityType?e.entityType:null,n.sort=e&&e.sort?e.sort:null,n.groupByStatus=e&&void 0!==e.groupByStatus?e.groupByStatus:null,n.language=e&&e.language?e.language:null,n.title=e&&e.title?e.title:null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.flags&&this.flags.length>0&&(e+="&flags=".concat(this.flags.join(","))),this.status&&(e+="&status=".concat(this.status)),this.entityIds&&this.entityIds.length>0&&(e+="&entity_ids=".concat(this.entityIds)),this.sort&&(e+="&sort=".concat(this.sort)),null!==this.groupByStatus&&(e+="&group_by_status=".concat(this.groupByStatus)),null!==this.language&&(e+="&language=".concat(this.language)),null!==this.title&&(e+="&title=".concat(this.title)),e},e}(a(n(64800)).default);e.default=s},55253:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},76282:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content=null,this.tags=[],this.campaign=null}},43323:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.model=null,this.source=null,this.type=null}},23648:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=0,this.optionId=0}},82682:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.personalityQuizId=null,this.userId=null,this.questions=[],this.personas=[],this.attempts=null}},94663:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=null,this.optionId=null}},73806:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.personaId=null,this.percent=null}},23130:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id=null,this.title=null,this.alternativeTitle=null,this.description=null,this.images=new i.default,this.participationCount=null,this.status=null,this.language=null,this.authRequirement=null,this.flags=null,this.customFields=null,this.labels=null,this.branding=null,this.related=[],this.time=null,this.maxAttempts=null,this.adContent=null,this.context=null,this.createdAt=null,this.updatedAt=null}},95403:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.personalityQuizIds=null,n.personalityQuizIds=e&&e.personalityQuizIds?e.personalityQuizIds:null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.personalityQuizIds&&this.personalityQuizIds.length>0&&(e+="&personality_quiz_ids=".concat(this.personalityQuizIds.join(","))),e},e}(a(n(96021)).default);e.default=s},65880:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rules=null,e.questions=[],e.personaResults=[],e}return i(e,t),e}(a(n(23130)).default);e.default=s},67283:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.optionId=null,this.option=null,this.images=null,this.personaPoints=[],this.preferenceMapping=[]}},65666:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.personaId=null,this.points=null}},48930:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.questionId=null,this.question=null,this.images=null,this.explanation=null,this.options=[]}},92314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.personaId=null,this.title=null,this.description=null,this.images=null}},53279:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},72239:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(18902)),o=a(n(65985)),u=a(n(96235)),l=a(n(20772)),c=a(n(41154)),d=a(n(68944)),f=a(n(47763)),h=a(n(81124)),p=a(n(76282)),m=a(n(43323)),v=a(n(16692)),_=a(n(12702)),y=a(n(10155)),g=a(n(19657)),b=a(n(75563)),w=a(n(38967)),E=a(n(91717)),I=a(n(64274)),M=a(n(78923)),O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapClassicQuizzes=function(t){return t.meta.pagination=e.remapMetaPagination(t.meta.pagination),t.data=t.data.map((function(t){return e.remapBasicClassicQuiz(t)})),t},e.remapClassicQuizById=function(t){var n=new u.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.participationCount=t.participation_count,n.questionsCount=t.questions_count,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.adContent=t.ad_content,n.rules=t.rules,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.points=t.points,n.related=t.related?e.remapRelated(t.related):[],n.scored=t.scored,n.maxAttempts=t.max_attempts,n.context=t.context?e.remapContext(t.context):t.context,n.averageScore=t.average_score,n.perfectScore=t.perfect_score,n.questions=t.questions.map((function(t){return e.remapQuestions(t)})),n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapClassicQuizParticipation=function(t){var n=new d.default;return n.classicQuizId=t.classic_quiz_id,n.userId=t.user_id,n.questions=t.questions?t.questions.map((function(t){return e.remapParticipationQuestions(t)})):null,n.correctOptions=t.correct_options,n.personalBest=t.personal_best,n.points=t.points,n.attempts=t.attempts,n},e.remapClassicQuizParticipationBody=function(t){return t.map((function(t){return{question_id:t.questionId,option_id:t.optionId}}))},e.remapUserClassicQuizParticipations=function(t){return t.map((function(t){var n=new h.default;return n.classicQuizId=t.classic_quiz_id,n.correct=t.correct,n.classicQuizQuestions=t.classic_quiz_questions,n.personalBest=t.personal_best,n.points=t.points,n.attempts=t.attempts,n.answers=t.answers?t.answers.map((function(t){return e.remapParticipationQuestions(t)})):t.answers,n}))},e.remapClassicQuizzesLeaderboard=function(t){return t.meta=e.remapClassicQuizLeaderboardMeta(t.meta),t.data=t.data.map((function(t){return e.remapClassicQuizLeaderboard(t)})),t},e.remapClassicQuizUserRankings=function(t){return t.meta.pagination=e.remapMetaPaginationRank(t.meta.pagination),t.data=t.data.map((function(t){return e.remapClassicQuizUserRanking(t)})),t},e.remapClassicQuizQuestionsReport=function(t){return t.map((function(t){var e=new E.default;return e.questionId=t.question_id,e.correct=t.correct,e.wrong=t.wrong,e.skipped=t.skipped,e.total=t.total,e}))},e.remapClassicQuizResultsSummary=function(t){return t.map((function(t){var e=new I.default;return e.questions=t.questions,e.correctAnswers=t.correct_answers,e}))},e.remapMetaPagination=function(t){var e=new s.default;return e.itemsPerPage=t.items_per_page,e.nextPageStartsAfter=t.next_page_starts_after,e},e.remapClassicQuizLeaderboardMeta=function(t){var n=new _.default;return n.pagination=e.remapMetaPaginationRank(t.pagination),n.filters=e.remapLeaderboardMetaFilters(t.filters),n},e.remapMetaPaginationRank=function(t){var e=new y.default;return e.currentPage=t.current_page,e.itemsPerPage=t.items_per_page,e.numberOfPages=t.number_of_pages,e.totalItems=t.total_items,e},e.remapLeaderboardMetaFilters=function(t){var e=new g.default;return e.classicQuizIds=(null==t?void 0:t.classic_quiz_ids)||null,e},e.remapClassicQuizUserRanking=function(t){var e=new w.default;return e.position=t.position,e.classicQuizId=t.classic_quiz_id,e.points=t.points,e},e.remapBasicClassicQuiz=function(t){var n=new o.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.participationCount=t.participation_count,n.questionsCount=t.questions_count,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.related=t.related?e.remapRelated(t.related):[],n.averageScore=t.average_score,n.perfectScore=t.perfect_score,n.points=t.points,n.scored=t.scored,n.maxAttempts=t.max_attempts,n.context=t.context?e.remapContext(t.context):t.context,n.adContent=t.ad_content,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapQuestions=function(t){var n=new l.default;return n.questionId=t.question_id,n.question=t.question,n.images=t.images,n.embedCode=t.embed_code,n.explanation=t.explanation,n.options=t.options.map((function(t){return e.remapOptions(t)})),n},e.remapOptions=function(t){var e=new c.default;return e.optionId=t.option_id,e.option=t.option,e.images=t.images,e.correct=t.correct,e},e.remapParticipationQuestions=function(t){var e=new f.default;return e.questionId=t.question_id,e.optionId=t.option_id,e.correct=t.correct,e.correctOptionId=t.correct_option_id,e},e.remapClassicQuizLeaderboard=function(t){var e=new b.default;return e.position=t.position,e.profileId=t.profile_id,e.points=t.points,e},e.remapContext=function(t){var e=new p.default;return e.content=t.content,e.tags=t.tags?t.tags.map((function(t){var e=new m.default;return e.id=t.id,e.type=t.type,e.source=t.source,e})):null,e.campaign=t.campaign,e},e.remapRelated=function(t){return t.map((function(t){var e=new M.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},e}return i(e,t),e}(v.default);e.default=O},44688:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(18902)),o=a(n(69619)),u=a(n(3167)),l=a(n(69146)),c=a(n(15367)),d=a(n(55021)),f=a(n(12557)),h=a(n(12699)),p=a(n(8590)),m=a(n(45289)),v=a(n(76282)),_=a(n(43323)),y=a(n(16692)),g=a(n(78923)),b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapEitherOrs=function(t){return t.meta.pagination=e.remapMetaPagination(t.meta.pagination),t.data=t.data.map((function(t){return e.remapBasicEitherOr(t)})),t},e.remapEitherOrById=function(t){var n=new u.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.winningCondition=t.winning_condition,n.lives=t.lives,n.flags=t.flags,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.related=t.related?e.remapRelated(t.related):[],n.context=t.context?e.remapContext(t.context):t.context,n.points=t.points?t.points.map((function(t){return e.remapPoints(t)})):t.points,n.rules=t.rules,n.adContent=t.ad_content,n.totalParticipationsCount=t.total_participations_count,n.totalUsersCount=t.total_users_count,n.finishedParticipationsCount=t.finished_participations_count,n.averageStartedParticipationsCount=t.average_started_participations_count,n.averageFinishedParticipationsCount=t.average_finished_participations_count,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapEitherOrOwnStats=function(t){var e=new c.default;return e.eitherOrId=t.either_or_id,e.personalBest=t.personal_best,e.betterThan=t.better_than,e},e.remapEitherOrResults=function(t){var n=new p.default;return n.standings=t.standings?t.standings.map((function(t){return e.remapResultsStandings(t)})):t.standings,n.breakdown=t.breakdown?t.breakdown.map((function(t){return e.remapResultsBreakdown(t)})):t.breakdown,n},e.remapEitherOrParticipation=function(t){var n=new d.default;return n.instanceId=t.instance_id,n.eitherOrId=t.either_or_id,n.gameStartedAt=t.game_started_at,n.currentStep=t.current_step,n.currentStreak=t.current_streak,n.remainingSteps=t.remaining_steps,n.currentLives=t.current_lives,n.currentPoints=t.current_points,n.personalBest=t.personal_best,n.participationCount=t.participation_count,n.finishedParticipationsCount=t.finished_participations_count,n.steps=t.steps?t.steps.map((function(t){return e.remapParticipationSteps(t)})):t.steps,n},e.remapBasicEitherOr=function(t){var n=new o.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.status=t.status,n.language=t.language,n.winningCondition=t.winning_condition,n.authRequirement=t.auth_requirement,n.lives=t.lives,n.flags=t.flags,n.related=t.related?e.remapRelated(t.related):[],n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.adContent=t.ad_content,n.context=t.context?e.remapContext(t.context):t.context,n.time=t.time,n.points=t.points?t.points.map((function(t){return e.remapPoints(t)})):t.points,n.totalParticipationsCount=t.total_participations_count,n.totalUsersCount=t.total_users_count,n.finishedParticipationsCount=t.finished_participations_count,n.averageStartedParticipationsCount=t.average_started_participations_count,n.averageFinishedParticipationsCount=t.average_finished_participations_count,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapMetaPagination=function(t){var e=new s.default;return e.itemsPerPage=t.items_per_page,e.nextPageStartsAfter=t.next_page_starts_after,e},e.remapPoints=function(t){var e=new l.default;return e.correctSteps=t.correct_steps,e.score=t.score,e},e.remapResultsStandings=function(t){var e=new m.default;return e.userId=t.user_id,e.personalBest=t.personal_best,e},e.remapResultsBreakdown=function(t){var e=new h.default;return e.rangeStartInclusive=t.range_start_inclusive,e.rangeEndInclusive=t.range_end_inclusive,e.totalUsers=t.total_users,e},e.remapParticipationSteps=function(t){var e=new f.default;return e.pairId=t.pair_id,e.userSelection=t.user_selection,e.correct=t.correct,e.played=t.played,e.timestamp=t.timestamp,e.optionOne=t.option_one,e.optionTwo=t.option_two,e},e.remapContext=function(t){var e=new v.default;return e.content=t.content,e.tags=t.tags?t.tags.map((function(t){var e=new _.default;return e.id=t.id,e.type=t.type,e.source=t.source,e})):null,e.campaign=t.campaign,e},e.remapRelated=function(t){return t.map((function(t){var e=new g.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},e}return i(e,t),e}(y.default);e.default=b},95783:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(18902)),o=a(n(76282)),u=a(n(43323)),l=a(n(16692)),c=a(n(78923)),d=a(n(65880)),f=a(n(92314)),h=a(n(48930)),p=a(n(67283)),m=a(n(55955)),v=a(n(65666)),_=a(n(23130)),y=a(n(82682)),g=a(n(94663)),b=a(n(73806)),w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapPersonalityQuizzes=function(t){return t.meta.pagination=e.remapMetaPagination(t.meta.pagination),t.data=t.data.map((function(t){return e.remapBasicPersonalityQuiz(t)})),t},e.remapPersonalityQuizById=function(t){var n=new d.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.images=t.images,n.participationCount=t.participation_count,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.adContent=t.ad_content,n.rules=t.rules||null,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.related=t.related?e.remapRelated(t.related):[],n.maxAttempts=t.max_attempts,n.context=t.context?e.remapContext(t.context):t.context,n.questions=t.questions?t.questions.map((function(t){return e.remapQuestions(t)})):[],n.personaResults=t.persona_results?t.persona_results.map((function(t){return e.remapPersonaResults(t)})):[],n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapPersonalityQuizParticipation=function(t){var n=new y.default;return n.personalityQuizId=t.personality_quiz_id,n.userId=t.user_id,n.questions=t.questions?e.remapParticipationQuestions(t.questions):[],n.personas=t.personas?e.remapParticipationPersonas(t.personas):[],n.attempts=t.attempts,n},e.remapParticipationQuestions=function(t){return t.map((function(t){var e=new g.default;return e.questionId=t.question_id,e.optionId=t.option_id,e}))},e.remapParticipationPersonas=function(t){return t.map((function(t){var e=new b.default;return e.personaId=t.persona_id,e.percent=t.percent,e}))},e.remapPersonalityQuizParticipationBody=function(t){return t.map((function(t){return{question_id:t.questionId,option_id:t.optionId}}))},e.remapPersonalityQuizUserParticipation=function(t){var n=new d.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.images=t.images,n.participationCount=t.participation_count,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.adContent=t.ad_content,n.rules=t.rules,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.related=t.related?e.remapRelated(t.related):[],n.maxAttempts=t.max_attempts,n.context=t.context?e.remapContext(t.context):t.context,n.questions=t.questions.map((function(t){return e.remapQuestions(t)})),n.personaResults=t.persona_results?t.persona_results.map((function(t){return e.remapPersonaResults(t)})):[],n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapMetaPagination=function(t){var e=new s.default;return e.itemsPerPage=t.items_per_page,e.nextPageStartsAfter=t.next_page_starts_after,e},e.remapBasicPersonalityQuiz=function(t){var n=new _.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.images=t.images,n.participationCount=t.participation_count,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.labels=t.labels,n.time=t.time,n.related=t.related?e.remapRelated(t.related):[],n.maxAttempts=t.max_attempts,n.context=t.context?e.remapContext(t.context):t.context,n.adContent=t.ad_content,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapPersonaResults=function(t){var e=new f.default;return e.personaId=t.persona_id,e.title=t.title,e.description=t.description,e.images=t.images,e},e.remapQuestions=function(t){var n=new h.default;return n.questionId=t.question_id,n.question=t.question,n.images=t.images,n.explanation=t.explanation,n.options=t.options.map((function(t){return e.remapOptions(t)})),n},e.remapOptions=function(t){var n=new p.default;return n.optionId=t.option_id,n.option=t.option,n.images=t.images,n.preferenceMapping=t.preference_mapping?e.remapPreferencesMapping(t.preference_mapping):[],n.personaPoints=t.persona_points?e.remapPersonaPoints(t.persona_points):[],n},e.remapPreferencesMapping=function(t){return t.map((function(t){var e=new m.default;return e.preferenceId=t.preference_id,e}))},e.remapPersonaPoints=function(t){return t.map((function(t){var e=new v.default;return e.personaId=t.persona_id,e.points=t.points,e}))},e.remapContext=function(t){var e=new o.default;return e.content=t.content,e.tags=t.tags?t.tags.map((function(t){var e=new u.default;return e.id=t.id,e.type=t.type,e.source=t.source,e})):null,e.campaign=t.campaign,e},e.remapRelated=function(t){return t.map((function(t){var e=new c.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},e}return i(e,t),e}(l.default);e.default=w},33404:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=s(n(13022)),l=s(n(88900)),c=s(n(48808)),d=s(n(86409)),f=s(n(70850)),h=s(n(19685));e.default=function(t){var e=this;this.idSchema=null,this.idMapping=null,this.validator=null,this.https=null,this.entityTypes=["competition","team","player"],this.profile=null,this.football=null,this.eitherOrTime=0,this.participationStartTimestamp=0,this.countdownTimer=0,this.intervalId=null,this.currentPairId="",this.finalizeMiniGamesFilters=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.idSchema!==o.IdSchemaEnum.NATIVE&&t.entityIds&&t.entityIds.length>0?(this.validator.validateFilters(t),[4,this.idMapping.getEntityIdsBySchemaId(Array.from(t.entityIds),t.entityType,o.IdSchemaEnum.NATIVE)]):[3,2];case 1:e=n.sent(),t.entityIds=e[t.entityType],n.label=2;case 2:return[2]}}))}))},this.setProfileModelsForEitherOrStandings=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=t.standings.map((function(t){return t.userId}))).length?[4,this.profile.getByIds(e)]:[2,t];case 1:return n=r.sent(),t.standings.forEach((function(t){return t.userModel=n.find((function(e){return e.id===t.userId}))||null})),[2,t]}}))}))},this.setProfileModelsForClassicQuizLeaderboards=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=t.map((function(t){return t.profileId}))).length?[4,this.profile.getByIds(e)]:[2,t];case 1:return n=r.sent(),t.forEach((function(t){return t.profileModel=n.find((function(e){return e.id===t.profileId}))||null})),[2,t]}}))}))},this.defaultEitherOrParticipation=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,s,o;return i(this,(function(i){switch(i.label){case 0:return this.eitherOrTime||n?[3,3]:[4,this.https.getEitherOrById(t,!0)];case 1:return r=i.sent(),this.eitherOrTime=r.time,[4,this.https.participateInEitherOr(t,null)];case 2:return s=i.sent(),this.participationStartTimestamp=Date.now(),[2,s];case 3:return e=0,this.participationStartTimestamp?[3,6]:this.eitherOrTime?[3,5]:[4,this.https.getEitherOrById(t,!0)];case 4:r=i.sent(),this.eitherOrTime=r.time,i.label=5;case 5:return e=this.eitherOrTime+1,[3,7];case 6:e=(Date.now()-this.participationStartTimestamp)/1e3,i.label=7;case 7:a=this.createNewParticipation(e,n),i.label=8;case 8:return i.trys.push([8,10,,11]),[4,this.https.participateInEitherOr(t,a)];case 9:return(s=i.sent()).currentLives&&s.remainingSteps?this.participationStartTimestamp=Date.now():this.resetDefaultParticipationTimers(),[2,s];case 10:throw o=i.sent(),this.resetDefaultParticipationTimers(),o;case 11:return[2]}}))}))},this.handleEitherOrParticipationWithCallback=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return n?[3,2]:[4,this.initialEitherOrParticipationWithCallback(t,a)];case 1:case 3:return[2,e.sent()];case 2:return[4,this.eitherOrParticipationWithCallback(t,n,a)]}}))}))},this.initialEitherOrParticipationWithCallback=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return[4,this.https.getEitherOrById(t,!0)];case 1:return e=i.sent(),this.eitherOrTime=e.time,[4,this.https.participateInEitherOr(t,null)];case 2:return r=i.sent(),this.participationStartTimestamp=Date.now(),this.countdownTimer=this.eitherOrTime,this.setCurrentPairId(r),[4,this.handleEitherOrParticipationCallbackInterface(t,n)];case 3:return i.sent(),[2,r]}}))}))},this.eitherOrParticipationWithCallback=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return this.intervalId&&clearInterval(this.intervalId),e=0,this.participationStartTimestamp?[3,3]:this.eitherOrTime?[3,2]:[4,this.https.getEitherOrById(t,!0)];case 1:r=i.sent(),this.eitherOrTime=r.time,i.label=2;case 2:return e=this.eitherOrTime+1,[3,4];case 3:e=(Date.now()-this.participationStartTimestamp)/1e3,i.label=4;case 4:s=this.createNewParticipation(e,n),i.label=5;case 5:return i.trys.push([5,10,,11]),[4,this.https.participateInEitherOr(t,s)];case 6:return(o=i.sent()).currentLives&&o.remainingSteps?[3,7]:(this.resetCallbackParticipationTimers(),a.onElapsedResponse(o),clearInterval(this.intervalId),[3,9]);case 7:return this.participationStartTimestamp=Date.now(),this.countdownTimer=this.eitherOrTime,this.setCurrentPairId(o),[4,this.handleEitherOrParticipationCallbackInterface(t,a)];case 8:i.sent(),i.label=9;case 9:return[2,o];case 10:throw u=i.sent(),this.resetCallbackParticipationTimers(),clearInterval(this.intervalId),u;case 11:return[2]}}))}))},this.setCurrentPairId=function(t){e.currentPairId=t.steps.find((function(t){return!t.played})).pairId||""},this.handleEitherOrParticipationCallbackInterface=function(t,n){return r(e,void 0,void 0,(function(){var e=this;return i(this,(function(a){return this.intervalId=setInterval((function(){return r(e,void 0,void 0,(function(){var e,r,a,s;return i(this,(function(i){switch(i.label){case 0:return this.countdownTimer>0?(this.countdownTimer--,n.onTimerTick(this.countdownTimer),[3,3]):[3,1];case 1:return clearInterval(this.intervalId),e=(Date.now()-this.participationStartTimestamp)/1e3,r={pair:this.currentPairId,answer:this.currentPairId.split("_")[0]},a=this.createNewParticipation(e,r),[4,this.eitherOrParticipationWithCallback(t,a,n)];case 2:s=i.sent(),n.onElapsedResponse(s),i.label=3;case 3:return[2]}}))}))}),1e3),[2]}))}))},this.createNewParticipation=function(t,n){var r=new f.default;return r.expired=t>e.eitherOrTime,r.time=Number(t.toFixed(3)),r.pair=n.pair,r.answer=n.answer,r},this.resetCallbackParticipationTimers=function(){e.resetDefaultParticipationTimers(),e.countdownTimer=0,e.currentPairId=""},this.resetDefaultParticipationTimers=function(){e.eitherOrTime=0,e.participationStartTimestamp=0},this.setContextTagsModels=function(t){return r(e,void 0,void 0,(function(){var e,n,r=this;return i(this,(function(i){switch(i.label){case 0:return e={competitions:[],teams:[],players:[]},t.forEach((function(t){t.context&&t.context.tags&&t.context.tags.length>0&&(e.competitions=a(a([],e.competitions,!0),r.extractEntityIdsFromTags(t.context.tags,"competition"),!0),e.competitions=Array.from(new Set(e.competitions)),e.teams=a(a([],e.teams,!0),r.extractEntityIdsFromTags(t.context.tags,"team"),!0),e.teams=Array.from(new Set(e.teams)),e.players=a(a([],e.players,!0),r.extractEntityIdsFromTags(t.context.tags,"player"),!0),e.players=Array.from(new Set(e.players)))})),e.competitions.length?[4,this.football.footballFacade.getCompetitionsMapWithNativeIds(e.competitions)]:[3,2];case 1:n=i.sent(),this.setModelsForContextTags(t,n,"competition"),i.label=2;case 2:return e.teams.length?[4,this.football.footballFacade.getTeamsMapWithNativeIds(e.teams)]:[3,4];case 3:n=i.sent(),this.setModelsForContextTags(t,n,"team"),i.label=4;case 4:return e.players.length?[4,this.football.footballFacade.getPlayersMapWithNativeIds(e.players)]:[3,6];case 5:n=i.sent(),this.setModelsForContextTags(t,n,"player"),i.label=6;case 6:return[2]}}))}))},this.extractEntityIdsFromTags=function(t,e){return t.filter((function(t){return t.type===e})).map((function(t){return t.id}))},this.setModelsForContextTags=function(t,e,n){t.forEach((function(t){t.context&&t.context.tags&&t.context.tags.length>0&&t.context.tags.forEach((function(t){t.type===n&&(t.model="player"===n?e[t.id]:e.get(t.id),t.id=t.model.id)}))}))},this.setQuestionModelsInQuestionsReport=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){return[2,t.map((function(t){return t.questionModel=n.questions.find((function(e){return e.questionId.toString()===t.questionId})),t}))]}))}))},this.idSchema=t.idSchema,this.idMapping=new l.default(t),this.validator=new h.default(t),this.profile=new d.default(t),this.football=new c.default(t),this.https=new u.default(t)}},19685:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4021),o=n(94904),u=n(5318),l=function(t){function e(e){var n=t.call(this,e.errorHandlingMode)||this;return n.entityTypes=["competition","team","player"],n.validateFilters=function(t){(t.entityIds||t.entityType)&&(t.entityIds&&!t.entityType&&n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.FILTER_COMBINATION_ERROR),!t.entityIds&&t.entityType&&n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.FILTER_COMBINATION_ERROR),n.entityTypes.includes(t.entityType)||n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_FILTERS,u.ErrorMessages.INVALID_ENTITY_TYPE))},n}return i(e,t),e}(a(n(16198)).default);e.default=l},77361:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(67900),o=a(n(16198)),u=a(n(47876)),l=a(n(88900)),c=a(n(69196));e.default=function(t){var e=this;this.idMapping=null,this.getByMatchIds=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,o,u,l;return i(this,(function(i){switch(i.label){case 0:return this.validateOddClient(),t&&Array.isArray(t)&&0!==t.length||this.validator.throwException(s.ErrorCodes.BAD_METHOD_CALL,s.ErrorStatuses.INVALID_MATCH_IDS,s.ErrorMessages.INVALID_MATCH_IDS),e=Array.from(t),this.idSchema===s.IdSchemaEnum.SPORTAL_365?[3,2]:[4,this.idMapping.idMappingFacade.getEntitiesByIds({match:Array.from(t)},this.idSchema,s.IdSchemaEnum.SPORTAL_365)];case 1:r=i.sent(),e=r.match,i.label=2;case 2:return a=new c.default(n),[4,this.https.getMatchOdds(e,a)];case 3:return o=i.sent(),this.idSchema===s.IdSchemaEnum.SPORTAL_365?[3,5]:[4,this.idMapping.idMappingFacade.getEntitiesByIdsMap({match:Array.from(o.keys())},s.IdSchemaEnum.SPORTAL_365,this.idSchema)];case 4:return u=i.sent(),l=new Map,Array.from(o.entries()).forEach((function(t){var e=t[0],n=t[1];l.set(u.get(e),n)})),[2,l];case 5:return[2,o]}}))}))},this.validateOddClient=function(){e.oddClient||e.validator.throwException(s.ErrorCodes.PRECONDITION_FAILED,s.ErrorStatuses.ODD_CLIENT_CONFIGURATION_NOT_FOUND,s.ErrorMessages.MISSING_ODD_CLIENT_CONFIGURATION)},this.idSchema=t.idSchema,this.oddClient=t.oddClient,this.https=new u.default(t),this.validator=new o.default(t.errorHandlingMode),this.idMapping=new l.default(t)}},20660:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.logo=null,this.type=null,this.transparentBackgroundUrl=null,this.backgroundColor=null}},98446:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.backgroundColor=null,this.textColor=null}},44875:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.appType=null,this.selectionTemplateUrl=null,this.eventTemplateUrl=null,this.homepageUrl=null}},37104:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.url=null,this.assets=[],this.links=[],this.branding=null,this.eventUrls=[],this.stakesDisclaimer=null,this.domainName=null}},48287:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.url=null,this.appType=null}},69196:(t,e)=>{"use strict";var n,r,i,a,s,o;Object.defineProperty(e,"__esModule",{value:!0}),e.MatchOddsMarketEnum=e.OddFormatEnum=e.ScopeTypeEnum=e.OddTypeEnum=void 0,function(t){t.PRE_EVENT="PRE_EVENT",t.LIVE="LIVE",t.ALL="ALL"}(r=e.OddTypeEnum||(e.OddTypeEnum={})),function(t){t.ORDINARY_TIME="ORDINARY_TIME",t.FULL_TIME="FULL_TIME"}(i=e.ScopeTypeEnum||(e.ScopeTypeEnum={})),function(t){t.DECIMAL="DECIMAL",t.MONEYLINE="MONEYLINE",t.FRACTIONAL="FRACTIONAL"}(a=e.OddFormatEnum||(e.OddFormatEnum={})),function(t){t.ONE_X_TWO="1x2",t.OVER_UNDER="OVER_UNDER",t.DOUBLE_CHANCE="DOUBLE_CHANCE",t.BOTH_TO_SCORE="BOTH_TO_SCORE",t.CORRECT_SCORE="CORRECT_SCORE",t.FIRST_HALF_AND_FINAL_RESULT="FIRST_HALF_AND_FINAL_RESULT",t.FIRST_PLAYER_TO_SCORE="FIRST_PLAYER_TO_SCORE",t.PLAYER_TO_SCORE_DURING_GAME="PLAYER_TO_SCORE_DURING_GAME",t.PLAYER_TO_RECEIVE_CARD="PLAYER_TO_RECEIVE_CARD"}(s||(s={})),function(t){t.FT_1X2="FT_1X2",t.DOUBLE_CHANCE="DOUBLE_CHANCE",t.HT_FT="HT_FT",t.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",t.CORRECT_SCORE="CORRECT_SCORE",t.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",t.PLAYER_SCORE="PLAYER_SCORE",t.PLAYER_RED_CARD="PLAYER_RED_CARD",t.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",t.OVER_GOALS_0_5="OVER_GOALS_0_5",t.OVER_GOALS_1_5="OVER_GOALS_1_5",t.OVER_GOALS_2_5="OVER_GOALS_2_5",t.OVER_GOALS_3_5="OVER_GOALS_3_5",t.OVER_GOALS_4_5="OVER_GOALS_4_5",t.OVER_GOALS_5_5="OVER_GOALS_5_5"}(o=e.MatchOddsMarketEnum||(e.MatchOddsMarketEnum={}));var u=((n={})[o.FT_1X2]=s.ONE_X_TWO,n[o.DOUBLE_CHANCE]=s.DOUBLE_CHANCE,n[o.HT_FT]=s.FIRST_HALF_AND_FINAL_RESULT,n[o.BOTH_TEAMS_SCORE]=s.BOTH_TO_SCORE,n[o.CORRECT_SCORE]=s.CORRECT_SCORE,n[o.PLAYER_SCORE_FIRST_GOAL]=s.FIRST_PLAYER_TO_SCORE,n[o.PLAYER_SCORE]=s.PLAYER_TO_SCORE_DURING_GAME,n[o.PLAYER_RED_CARD]=s.PLAYER_TO_RECEIVE_CARD,n[o.PLAYER_YELLOW_CARD]=s.PLAYER_TO_RECEIVE_CARD,n),l=function(){function t(t){this.oddType=r.PRE_EVENT,this.scopeType=i.ORDINARY_TIME,this.oddFormat=a.DECIMAL,this.marketTypes=[o.FT_1X2],this.validateFilters(t)}return t.prototype.constructFiltersUrl=function(){var t=this,e=this.marketTypes.map((function(e){return t.mapToSportal365Market(e)}));return"&odd_type=".concat(this.oddType,"&scope_type=").concat(this.scopeType,"&odd_format=").concat(this.oddFormat,"&market_types=").concat(e.join(","))},t.prototype.validateFilters=function(t){var e=Object.values(r),n=Object.values(i),s=Object.values(a),u=Object.values(o);(null==t?void 0:t.oddType)&&(e.includes(t.oddType)?this.oddType=t.oddType:console.warn('The filter "oddType" is NOT valid and therefore it will be set to PRE_EVENT. The VALID values are : '.concat(e.join(", ")))),(null==t?void 0:t.scopeType)&&(n.includes(t.scopeType)?this.scopeType=t.scopeType:console.warn('The filter "scopeType" is NOT valid and therefore it will be set to ORDINARY_TIME. The VALID values are : '.concat(n.join(", ")))),(null==t?void 0:t.oddFormat)&&(s.includes(t.oddFormat)?this.oddFormat=t.oddFormat:console.warn('The filter "oddFormat" is NOT valid and therefore it will be set to DECIMAL. The VALID values are : '.concat(s.join(", ")))),(null==t?void 0:t.marketTypes)&&Array.isArray(null==t?void 0:t.marketTypes)&&(null==t?void 0:t.marketTypes.length)>0&&(t.marketTypes.every((function(t){return u.includes(t)}))?this.marketTypes=t.marketTypes:console.warn('The filter "marketTypes" is NOT valid and therefore it will be set to FT_1X2. The VALID values are : '.concat(u.join(", "))))},t.prototype.mapToSportal365Market=function(t){return t.startsWith("OVER_GOALS_")?s.OVER_UNDER:u[t]},t}();e.default=l},62641:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.scope=null,this.selections=[]}},71115:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.type=null,this.name=null,this.entityType=null}},42218:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.code=null,this.value=null,this.odds=null,this.urls=[],this.movement=null,this.oddsOld=null,this.entityType=null,this.additionalInfo=null,this.providerInfo=null}},47951:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.code=null,this.entityType=null}},97935:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.selectionId=null,this.eventId=null,this.marketId=null,this.competitionId=null}},3002:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.bookmaker=null,this.type=null,this.markets=[]}},8077:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(20660)),a=r(n(98446)),s=r(n(37104)),o=r(n(48287)),u=r(n(62641)),l=r(n(71115)),c=r(n(42218)),d=r(n(47951)),f=r(n(97935)),h=r(n(3002)),p=function(){function t(){var t=this;this.remapMarketType=function(t){var e=new d.default;return e.id=t.id,e.name=t.name,e.code=t.code,e.entityType=t.entity_type,e},this.remapMarketScope=function(t){var e=new l.default;return e.id=t.id,e.name=t.name,e.type=t.type,e.entityType=t.entity_type,e},this.remapMarketSelections=function(e,n,r){var i=Array.from(e);return r.length>0&&"OVER_UNDER"===n&&(i=i.filter((function(t){return"over"===t.code&&r.some((function(e){switch(e){case"OVER_GOALS_0_5":return"0.5"===t.value;case"OVER_GOALS_1_5":return"1.5"===t.value;case"OVER_GOALS_2_5":return"2.5"===t.value;case"OVER_GOALS_3_5":return"3.5"===t.value;case"OVER_GOALS_4_5":return"4.5"===t.value;case"OVER_GOALS_5_5":return"5.5"===t.value;default:return!1}}))}))),i.map((function(e){var n=new c.default;return n.id=e.id,n.name=e.name,n.code=e.code,n.value=e.value,n.odds=e.odds,n.urls=e.urls?t.remapEventUrls(e.urls):[],n.movement=e.movement,n.oddsOld=e.odds_old,n.entityType=e.entity_type,n.additionalInfo=e.additional_info,n.providerInfo=e.provider_info?t.remapProviderInfo(e.provider_info):null,n}))},this.remapProviderInfo=function(t){var e=new f.default;return e.selectionId=t.selection_id,e.eventId=t.event_id,e.marketId=t.market_id,e.competitionId=t.competition_id,e}}return t.prototype.fromResponse=function(t,e){var n=this,r=new Map;return t.matches.forEach((function(t){var i=t.odds.map((function(t){var r=new h.default;return r.bookmaker=t.bookmaker?n.remapBookmaker(t.bookmaker):null,r.type=t.type,r.markets=t.markets?n.remapMarkets(t.markets,e):[],r}));r.set(t.id,i)})),r},t.prototype.remapBookmaker=function(t){var e=new s.default;return e.id=t.id,e.name=t.name,e.assets=t.assets?this.remapAssets(t.assets):[],e.links=t.links||[],e.branding=t.branding?this.remapBranding(t.branding):null,e.eventUrls=t.event_urls?this.remapEventUrls(t.event_urls):[],e.stakesDisclaimer=t.stakes_disclaimer,e.domainName=t.domain_name,e},t.prototype.remapMarkets=function(t,e){var n=this;return t.map((function(t){var r=new u.default;return r.type=t.type?n.remapMarketType(t.type):null,r.scope=t.scope?n.remapMarketScope(t.scope):null,r.selections=t.selections?n.remapMarketSelections(t.selections,r.type.code,e):[],r}))},t.prototype.remapEventUrls=function(t){return t.map((function(t){var e=new o.default;return e.url=t.url,e.appType=t.app_type,e}))},t.prototype.remapBranding=function(t){var e=new a.default;return e.backgroundColor=t.background_color,e.textColor=t.text_color,e},t.prototype.remapAssets=function(t){return t.map((function(t){var e=new i.default;return e.logo=t.logo,e.type=t.type,e.transparentBackgroundUrl=t.transparent_background_url,e.backgroundColor=t.background_color,e}))},t}();e.default=p},74168:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(77361));e.default=function(t){var e=this;this.getByMatchIds=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getByMatchIds(t,n)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},27974:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.playerMarketNobodyPrediction=e.endMarkMarkets=e.playerMarkets=e.MarketsOverCorners=e.MarketsOverGoals=e.MarketEnum=void 0,function(t){t.FT_1X2="FT_1X2",t.HT_1X2="HT_1X2",t.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",t.DOUBLE_CHANCE="DOUBLE_CHANCE",t.HT_FT="HT_FT",t.PLAYER_SCORE="PLAYER_SCORE",t.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",t.PLAYER_RED_CARD="PLAYER_RED_CARD",t.RED_CARD_MATCH="RED_CARD_MATCH",t.PENALTY_MATCH="PENALTY_MATCH",t.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",t.CORNERS_MATCH="CORNERS_MATCH",t.CORRECT_SCORE="CORRECT_SCORE",t.CORRECT_SCORE_ADVANCED="CORRECT_SCORE_ADVANCED",t.CORRECT_SCORE_HT="CORRECT_SCORE_HT",t.PLAYER_SCORE_HATTRICK="PLAYER_SCORE_HATTRICK",t.PLAYER_SCORE_TWICE="PLAYER_SCORE_TWICE",t.OVER_GOALS_0_5="OVER_GOALS_0_5",t.OVER_GOALS_1_5="OVER_GOALS_1_5",t.OVER_GOALS_2_5="OVER_GOALS_2_5",t.OVER_GOALS_3_5="OVER_GOALS_3_5",t.OVER_GOALS_4_5="OVER_GOALS_4_5",t.OVER_GOALS_5_5="OVER_GOALS_5_5",t.OVER_GOALS_6_5="OVER_GOALS_6_5",t.OVER_CORNERS_6_5="OVER_CORNERS_6_5",t.OVER_CORNERS_7_5="OVER_CORNERS_7_5",t.OVER_CORNERS_8_5="OVER_CORNERS_8_5",t.OVER_CORNERS_9_5="OVER_CORNERS_9_5",t.OVER_CORNERS_10_5="OVER_CORNERS_10_5",t.OVER_CORNERS_11_5="OVER_CORNERS_11_5",t.OVER_CORNERS_12_5="OVER_CORNERS_12_5",t.OVER_CORNERS_13_5="OVER_CORNERS_13_5"}(n=e.MarketEnum||(e.MarketEnum={})),e.MarketsOverGoals=[n.OVER_GOALS_0_5,n.OVER_GOALS_1_5,n.OVER_GOALS_2_5,n.OVER_GOALS_3_5,n.OVER_GOALS_4_5,n.OVER_GOALS_5_5,n.OVER_GOALS_6_5],e.MarketsOverCorners=[n.OVER_CORNERS_6_5,n.OVER_CORNERS_7_5,n.OVER_CORNERS_8_5,n.OVER_CORNERS_9_5,n.OVER_CORNERS_10_5,n.OVER_CORNERS_11_5,n.OVER_CORNERS_12_5,n.OVER_CORNERS_13_5],e.playerMarkets=[n.PLAYER_RED_CARD,n.PLAYER_SCORE,n.PLAYER_SCORE_FIRST_GOAL,n.PLAYER_SCORE_HATTRICK,n.PLAYER_SCORE_TWICE,n.PLAYER_YELLOW_CARD],e.endMarkMarkets=[n.FT_1X2,n.HT_1X2,n.HT_FT,n.DOUBLE_CHANCE,n.CORNERS_MATCH,n.CORRECT_SCORE,n.CORRECT_SCORE_HT,n.CORRECT_SCORE_ADVANCED],e.playerMarketNobodyPrediction=n.PLAYER_SCORE_FIRST_GOAL},51113:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeEnum=void 0,(n=e.OutcomeEnum||(e.OutcomeEnum={})).CORRECT="CORRECT",n.INCORRECT="INCORRECT",n.PARTIALLY_CORRECT="PARTIALLY_CORRECT",n.NOT_VERIFIED="NOT_VERIFIED"},66147:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.pastStatuses=e.StatusEnum=void 0,function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(n=e.StatusEnum||(e.StatusEnum={})),e.pastStatuses=[n.WON,n.LOST,n.PARTIALLY_WON,n.CANCELED]},1976:(t,e)=>{"use strict";var n,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.HalfTimeFullTimeEnum=e.DoubleChanceEnum=e.OneXTwoEnum=void 0,(i=e.OneXTwoEnum||(e.OneXTwoEnum={})).ONE="1",i.X="x",i.TWO="2",(r=e.DoubleChanceEnum||(e.DoubleChanceEnum={})).ONE_X="1x",r.X_TWO="x2",r.ONE_TWO="12",(n=e.HalfTimeFullTimeEnum||(e.HalfTimeFullTimeEnum={})).ONE_ONE="1/1",n.ONE_X="1/x",n.ONE_TWO="1/2",n.X_ONE="x/1",n.X_X="x/x",n.X_TWO="x/2",n.TWO_ONE="2/1",n.TWO_X="2/x",n.TWO_TWO="2/2"},62929:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(14946),u=n(27974),l=n(47686),c=s(n(25013)),d=s(n(53950)),f=s(n(81732)),h=s(n(12310)),p=s(n(68097)),m=n(4021),v=n(94904),_=n(5318),y=s(n(62535));e.default=function(t,e,n,s){var g=this;this.predictorHttps=null,this.clientHttps=null,this.idMapping=null,this.predictorService=null,this.predictorValidator=null,this.errorHandlingMode=null,this.makeFootballPrediction=function(t,e,n,a){return r(g,void 0,void 0,(function(){var r,s,l,c,h,g,b;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorValidator.validateFixture(t,e,n,a),s=new d.default,this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,6]:(l=r.matchId,c="",[4,this.predictorService.remapMatchIdToNative([l])]);case 1:if(h=i.sent(),r.matchId=h[0],"default"===this.errorHandlingMode&&!r.matchId)throw new p.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.INVALID_FIELD,_.ErrorMessages.INVALID_MATCH_ID).errorMessage();if("standard"===this.errorHandlingMode&&!r.matchId)throw new y.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.INVALID_FIELD,_.ErrorMessages.INVALID_MATCH_ID);return r instanceof f.default&&"OWN_GOAL"!==r.prediction.playerId?r.prediction.playerId?(c=r.prediction.playerId,g=r.prediction,[4,this.predictorService.remapPlayerIdToNative([c])]):[3,3]:[3,4];case 2:g.playerId=i.sent(),i.label=3;case 3:if("default"===this.errorHandlingMode&&r.market!==u.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new p.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.INVALID_FIELD,_.ErrorMessages.INVALID_PLAYER_ID).errorMessage();if("standard"===this.errorHandlingMode&&r.market!==u.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new y.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.INVALID_FIELD,_.ErrorMessages.INVALID_PLAYER_ID);i.label=4;case 4:return s.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(s)];case 5:return(b=i.sent()).fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=c),t.matchId=l})),[2,b];case 6:return s.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(s)];case 7:return[2,i.sent()]}}))}))},this.getMatchSummary=function(t,e){return r(g,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return[4,this.getMatchSummaryBase(t,e)];case 1:return n=i.sent(),r=JSON.parse(JSON.stringify(n.predictions)),[4,this.predictorService.remapPlayerIdToIdSchema(r)];case 2:return a=i.sent(),n.predictions=a,[2,n]}}))}))},this.getMarketSummary=function(t,e,n,a){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.getMatchSummaryBase(t,a)];case 1:return r=i.sent(),[4,this.predictorService.getMarketSummary(r,e,n)];case 2:return[2,i.sent()];case 3:throw i.sent();case 4:return[2]}}))}))},this.getMatchSummaryBase=function(t,e){return r(g,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapMatchIdToNative([t])];case 1:return n=i.sent(),r=n[0],[4,this.predictorHttps.getMatchSummary(r,e)];case 2:return(a=i.sent()).matchId=t,[2,a];case 3:return[4,this.predictorHttps.getMatchSummary(t,e)];case 4:return[2,i.sent()]}}))}))},this.getConfig=function(){return r(g,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(l.FeatureConfigEnum.PREDICTOR)];case 1:return t=e.sent(),this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.deleteFootballPrediction=function(t){return r(g,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictions=function(t){return r(g,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"user"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPredictionsForMatches=function(t,e){return r(g,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new p.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,_.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new y.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,_.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED);return this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(a([],t,!0))];case 1:t=r.sent(),r.label=2;case 2:return n=this.predictorService.initPredictionsFilters(e,"matches",t),[4,this.predictorHttps.getMyPredictions(n)];case 3:return[2,r.sent()]}}))}))},this.getMyCurrentPredictions=function(t){return r(g,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"current"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getMyPastPredictions=function(t){return r(g,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.predictorService.initPredictionsFilters(t,"past"),[4,this.predictorHttps.getMyPredictions(e)];case 1:return[2,n.sent()]}}))}))},this.getUserPredictions=function(t,e,n){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"user"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserCurrentPredictions=function(t,e,n){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"current"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPastPredictions=function(t,e,n){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(e,"past"),[4,this.predictorHttps.getUserPredictions(t,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,e,n,s){return r(g,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new p.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,_.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new y.default(m.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,_.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED);return this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(a([],e,!0))];case 1:e=i.sent(),i.label=2;case 2:return r=this.predictorService.initPredictionsFilters(n,"matches",e),[4,this.predictorHttps.getUserPredictions(t,s,r)];case 3:return[2,i.sent()]}}))}))},this.getPredictionById=function(t){return r(g,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.getPredictionById(t)];case 1:return[2,e.sent()]}}))}))},this.getPredictionsByIds=function(t){return r(g,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.getPredictionsByIds(t)];case 1:return[2,e.sent()]}}))}))},this.getMatchMarketsResults=function(t){return r(g,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.idMapping.idSchema===o.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative([t])];case 1:e=n.sent(),t=e[0],n.label=2;case 2:return[4,this.predictorService.getMatchMarketsResults(t)];case 3:return[2,n.sent()]}}))}))},this.predictorHttps=e,this.idMapping=s,this.clientHttps=n,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new h.default(t.errorHandlingMode),this.predictorService=new c.default(t,s)}},49297:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var a=i(n(38173));e.default=function(t){var e=this;this.validator=null,this.calculateOneXTwoFromScores=function(t){e.validator.validateMatchSummary(t);var n=t.predictions,i=n.correctScore,a=n.correctScoreAdvanced,s=r(r({},i),a),o=0,u=0,l=0,c=0;return Object.entries(s).forEach((function(t){var e=t[0],n=t[1];if(0!==n){var r=n;o+=r;var i=e.split(":").map(Number),a=i[0],s=i[1];a>s?u+=r:a===s?l+=r:c+=r}})),{home:o?Math.round(u/o*100):0,draw:o?Math.round(l/o*100):0,away:o?Math.round(c/o*100):0}},this.getTopCorrectScores=function(t){e.validator.validateMatchSummary(t);var n=t.predictions,i=n.correctScore,a=n.correctScoreAdvanced,s=r(r({},i),a),o=0;return Object.values(s).forEach((function(t){o+=t})),Object.entries(s).filter((function(t){return t[0],t[1]>0})).map((function(t){var e=t[0],n=t[1];return{score:e,percentage:Math.round(n/o*100)}})).sort((function(t,e){return e.percentage-t.percentage})).slice(0,3)},this.validator=new a.default(t)}},38173:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4021),o=n(94904),u=n(5318),l=function(t){function e(e){var n=t.call(this,e.errorHandlingMode)||this;return n.validateMatchSummary=function(t){t||n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_MATCH_SUMMARY,u.ErrorMessages.MATCH_SUMMARY_REQUIRED),t.predictions||n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_MATCH_SUMMARY_PREDICTIONS,u.ErrorMessages.MATCH_SUMMARY_PREDICTIONS_REQUIRED),t.predictions.correctScore&&t.predictions.correctScoreAdvanced||n.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS,u.ErrorMessages.INVALID_MATCH_SUMMARY_PREDICTIONS_KEYS+"correctScore and correctScoreAdvanced")},n}return i(e,t),e}(a(n(16198)).default);e.default=l},60704:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(33949)),a=r(n(18543)),s=r(n(51429)),o=r(n(50515)),u=r(n(4187)),l=r(n(94226)),c=r(n(45765)),d=r(n(91180)),f=r(n(58452)),h=r(n(28824)),p=r(n(49750)),m=r(n(95793)),v=r(n(68699)),_=r(n(16268)),y=r(n(93035)),g=r(n(38574)),b=r(n(33101)),w=r(n(64646)),E=r(n(66483)),I=r(n(16866)),M=r(n(38608)),O=r(n(70246)),P=r(n(77983)),T=r(n(82354)),S=r(n(60516)),A=r(n(71002)),C=r(n(4339)),R=r(n(47626));e.default=function(){var t=this;this.remapPredictorConfig=function(e){var n=new f.default;return n.enabled=e.enabled,n.clientId=e.client_id,n.fullCoverageCompetitions=e.full_coverage_competitions,n.markets=e.markets,n.successRateScopes=e.success_rate_scopes,n.userDataConfig=e.user_data_config?t.remapUserDataConfig(e.user_data_config):null,n},this.remapTopXConfig=function(t){var e=new d.default;return e.enabled=t.enabled,e.clientId=t.client_id,e.minFixtures=t.min_fixtures,e.maxFixtures=t.max_fixtures,e.competitionsWhitelist=t.competitions_whitelist,e.authRequirement=t.auth_requirement,e},this.remapMatchQuizConfig=function(t){var e=new c.default;return e.enabled=t.enabled,e.clientId=t.client_id,e.defaultMarkets=t.default_markets,e.competitionsWhitelist=t.competitions_whitelist,e.authRequirement=t.auth_requirement,e},this.remapLoyaltyConfig=function(e){var n=new o.default;return n.enabled=e.enabled,n.clientId=e.client_id,n.conditions.list=e.conditions.list,n.actions.value=e.actions.value,n.rewards=t.remapRewards(e.rewards),n},this.remapLoyaltyNewConfig=function(e){var n=new I.default;return n.enabled=e.enabled,n.clientId=e.client_id,n.conditions.list=e.conditions.list,n.actions.value=e.actions.value,n.rewards=t.remapNewRewards(e.rewards),n},this.remapDiscussionsConfig=function(e){var n=new a.default;return n.enabled=e.enabled,n.clientId=e.client_id,n.automaticModeration=e.automatic_moderation?t.remapAutomaticModeration(e.automatic_moderation):null,n},this.remapFantasyConfig=function(e){var n=new S.default;return n.enabled=e.enabled,n.clientId=e.client_id,n.addPointsToProfileTotal=e.add_points_to_profile_total,n.competitionsWhitelist=e.competitions_whitelist,n.multipliers=e.multipliers?t.remapMultipliers(e.multipliers):null,n.players=t.remapFantasyPlayers(e.players),n.coefficients=t.remapFantasyCoefficients(e.coefficients),n},this.remapFantasyPlayers=function(t){var e=new A.default;return e.total=t.total,e.minGoalkeepers=t.min_goalkeepers,e.maxGoalkeepers=t.max_goalkeepers,e.minDefenders=t.min_defenders,e.maxDefenders=t.max_defenders,e.minMidfielders=t.min_midfielders,e.maxMidfielders=t.max_midfielders,e.minStrikers=t.min_strikers,e.maxStrikers=t.max_strikers,e},this.remapFantasyCoefficients=function(t){var e=new C.default;return e.assists=t.assists,e.shots=t.shots,e.offsides=t.offsides,e.tackles=t.tackles,e.saves=t.saves,e.minutesEqualOrOver60=t.minutes_equal_or_over_60,e.minutesUnder60=t.minutes_under_60,e.yellowCards=t.yellow_cards,e.redCards=t.red_cards,e.goalsGoalkeeper=t.goals_goalkeeper,e.goalsDefender=t.goals_defender,e.goalsMidfielder=t.goals_midfielder,e.goalsForwards=t.goals_forwards,e.penaltyGoals=t.penalty_goals,e.ownGoals=t.own_goals,e.cleanSheetsGoalkeeper=t.clean_sheets_goalkeeper,e.cleanSheetsDefender=t.clean_sheets_defender,e.cleanSheetsMidfielder=t.clean_sheets_midfielder,e.cleanSheetsForwards=t.clean_sheets_forwards,e.shotsOn=t.shots_on,e.foulsCommitted=t.fouls_committed,e.penaltyCommitted=t.penalty_committed,e.penaltyWon=t.penalty_won,e.penaltyMissed=t.penalty_missed,e.concededGoals=t.conceded_goals,e.caughtBall=t.caught_ball,e},this.remapAutomaticModeration=function(t){var e=new i.default;return e.enabled=t.enabled,e.moderateLinks=t.moderate_links,e.linksWhitelist=t.links_whitelist,e.moderatorProfileId=t.moderator_profile_id,e.dictionary=t.dictionary,e},this.remapNewRewards=function(e){var n=new E.default;return n.points=t.remapPoints(e.points),n.tiers=e.tiers,n.badges=t.remapNewBadges(e.badges),n},this.remapRewards=function(e){var n=new l.default;return n.points=t.remapPoints(e.points),n.tiers=e.tiers,n.badges=t.remapBadges(e.badges),n},this.remapPoints=function(t){var e=new u.default;return e.general=t.general,e.discussionPost=t.discussion_post,e.predictor=t.predictor,e.activity=t.activity,e.topX=t.top_x,e.matchQuiz=t.match_quiz,e},this.remapBadges=function(e){var n=new M.default;return n.general=e.general?t.remapGeneralBadgeValues(e.general):[],n.predictor=t.remapBadgeValues(e.predictor),n.topX=t.remapBadgeValues(e.top_x),n.matchQuiz=t.remapBadgeValues(e.match_quiz),n},this.remapNewBadges=function(e){var n=new p.default;return n.predictor=t.remapBadgeValuesPredictor(e.predictor),n.topX=t.remapBadgeValuesGame(e.top_x),n.matchQuiz=t.remapBadgeValuesGame(e.match_quiz),e.games&&(n.games=t.remapBadgeValuesGames(e.games)),e.football&&(n.football=t.remapBadgeValuesFootball(e.football)),e.classic_quizzes&&(n.classicQuizzes=t.remapBadgeValuesMiniGames(e.classic_quizzes)),e.either_or&&(n.eitherOr=t.remapBadgeValuesMiniGames(e.either_or)),e.discussions&&(n.discussions=t.remapBadgeValuesDiscussions(e.discussions)),e.voting&&e.voting.potm&&(n.voting.potm=t.remapBadgeValuesVoting(e.voting.potm)),e.voting&&e.voting.poll&&(n.voting.poll=t.remapBadgeValuesVoting(e.voting.poll)),n},this.remapBadgeValuesPredictor=function(t){return t.map((function(t){var e=new m.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.predictionsNumber=t.requirements.predictions_number,e.requirements.correctPredictions=t.requirements.correct_predictions,e.requirements.points=t.requirements.points,e.requirements.fromDate=t.requirements.from_date,e.requirements.toDate=t.requirements.to_date),e}))},this.remapBadgeValuesGame=function(t){return t.map((function(t){var e=new v.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.participationCount=t.requirements.participation_count,e.requirements.points=t.requirements.points,e.requirements.fromDate=t.requirements.from_date,e.requirements.toDate=t.requirements.to_date),e}))},this.remapBadgeValuesGames=function(e){return e.map((function(e){var n=new _.default;return n.id=e.id,n.enabled=e.enabled,n.label=e.label,n.description=e.description,n.flags=e.flags,e.assets?n.assets.mainImageUrl=e.assets.main_image_url:n.assets=e.assets,e.requirements&&(n.requirements.participationCount=e.requirements.participation_count,n.requirements.points=e.requirements.points,n.requirements.fromDate=e.requirements.from_date,n.requirements.toDate=e.requirements.to_date,n.requirements.specificGames=e.requirements.specific_games?t.remapSpecificGamesRequirement(e.requirements.specific_games):null),n}))},this.remapSpecificGamesRequirement=function(t){return t.map((function(t){return{gameId:t.game_id,gameType:t.game_type,gameModel:null}}))},this.remapBadgeValuesFootball=function(t){return t.map((function(t){var e=new y.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.predictionsNumber=t.requirements.predictions_number,e.requirements.correctPredictions=t.requirements.correct_predictions,e.requirements.points=t.requirements.points,e.requirements.entityId=t.requirements.entity_id,e.requirements.entityType=t.requirements.entity_type),e}))},this.remapBadgeValuesMiniGames=function(t){return t.map((function(t){var e=new g.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.participationCount=t.requirements.participation_count,e.requirements.fromDate=t.requirements.from_date,e.requirements.toDate=t.requirements.to_date),e}))},this.remapBadgeValuesDiscussions=function(t){return t.map((function(t){var e=new b.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.totalDiscussionPoints=t.requirements.total_discussion_points,e.requirements.postsCount=t.requirements.posts_count,e.requirements.postPoints=t.requirements.post_points,e.requirements.reactionsCount=t.requirements.reactions_count),e}))},this.remapBadgeValuesVoting=function(t){return t.map((function(t){var e=new w.default;return e.id=t.id,e.enabled=t.enabled,e.label=t.label,e.description=t.description,e.flags=t.flags,t.assets?e.assets.mainImageUrl=t.assets.main_image_url:e.assets=t.assets,t.requirements&&(e.requirements.points=t.requirements.points,e.requirements.voteCount=t.requirements.vote_count,e.requirements.entityId=t.requirements.entity_id,e.requirements.entityType=t.requirements.entity_type),e}))},this.remapBadgeValues=function(e){return e.map((function(e){var n=new O.default;return n.id=e.id,n.label=e.label,n.enabled=e.enabled,e.assets?n.assets.mainImageUrl=e.assets.main_image_url:n.assets=e.assets,n.requirements=t.remapRequirements(e.requirements),n}))},this.remapRequirements=function(t){var e=new s.default;return e.points=t.points,e.gameParticipationCount=t.game_participation_count,e.entityId=t.entity_id,e.entityType=t.entity_type,e.predictionsMade=t.predictions_made,e.correctPredictions=t.correct_predictions,e},this.remapUserDataConfig=function(t){var e=new h.default;return e.storeIp=t.store_ip,e.storeDeviceId=t.store_device_id,e.storeAgent=t.store_agent,e},this.remapGeneralBadgeValues=function(e){return e.map((function(e){var n=new P.default;return n.id=e.id,n.label=e.label,n.enabled=e.enabled,e.assets?n.assets.mainImageUrl=e.assets.main_image_url:n.assets=e.assets,n.requirements=t.remapGeneralRequirements(e.requirements),n}))},this.remapGeneralRequirements=function(t){var e=new T.default;return e.points=t.points,e.gameParticipationCount=t.game_participation_count,e.entityId=t.entity_id,e.entityType=t.entity_type,e.predictionsMade=t.predictions_made,e.correctPredictions=t.correct_predictions,e.postPoints=t.post_points,e.postsCount=t.posts_count,e.reactionsCount=t.reactions_count,e.totalDiscussionPoints=t.total_discussion_points,e},this.remapMultipliers=function(t){var e=new R.default;return e.captain=t.captain,e.viceCaptain=t.vice_captain,e}}},83918:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.main=null,this.all=null}},58452:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(40442));e.default=function(){this.enabled=!1,this.clientId=null,this.fullCoverageCompetitions=null,this.markets=null,this.successRateScopes=new i.default,this.userDataConfig=null}},40442:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.competitions=[],this.teams=[],this.markets=[]}},28824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.storeIp=!1,this.storeDeviceId=!1,this.storeAgent=!1}},78364:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1976),i=function(){function t(){}var e;return t.createMatchMarketsResultsModel=function(t,e){var n,r,i,a,s,o,u,l,c,d,f,h,p,m,v,_,y,g,b,w,E,I,M,O,P,T,S,A,C,R,D,F,L,k,j,N;return{FT_1X2:this.createOneXTwoResult(t.scores,"full_time"),HT_1X2:this.createOneXTwoResult(t.scores,"half_time"),BOTH_TEAMS_SCORE:t.scores.ftScore.homeGoals>0&&t.scores.ftScore.awayGoals>0,DOUBLE_CHANCE:this.createDoubleChanceResult(t.scores),HT_FT:this.createHalfTimeFullTimeResult(t.scores),RED_CARD_MATCH:this.createMarketResultByCriteria(t,"red_card"),PENALTY_MATCH:this.createMarketResultByCriteria(t,"penalty"),CORNERS_MATCH:isNaN((null===(r=null===(n=t.stats)||void 0===n?void 0:n.corners)||void 0===r?void 0:r.homeTeam)+(null===(a=null===(i=t.stats)||void 0===i?void 0:i.corners)||void 0===a?void 0:a.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam,PLAYER_YELLOW_CARD:this.createPlayersMarketsResults(t,e,"yellow_card"),PLAYER_RED_CARD:this.createPlayersMarketsResults(t,e,"red_card"),PLAYER_SCORE_FIRST_GOAL:this.createPlayersMarketsResults(t,e,"first_goal"),PLAYER_SCORE:this.createPlayersMarketsResults(t,e,"one_goal"),PLAYER_SCORE_TWICE:this.createPlayersMarketsResults(t,e,"two_goals"),PLAYER_SCORE_HATTRICK:this.createPlayersMarketsResults(t,e,"hattrick"),CORRECT_SCORE:{homeGoals:t.scores.ftScore.homeGoals,awayGoals:t.scores.ftScore.awayGoals},CORRECT_SCORE_ADVANCED:{homeGoals:t.scores.ftScore.homeGoals,awayGoals:t.scores.ftScore.awayGoals},CORRECT_SCORE_HT:{homeGoals:t.scores.htScore.homeGoals,awayGoals:t.scores.htScore.awayGoals},OVER_GOALS_0_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>0,OVER_GOALS_1_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>1,OVER_GOALS_2_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>2,OVER_GOALS_3_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>3,OVER_GOALS_4_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>4,OVER_GOALS_5_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>5,OVER_GOALS_6_5:t.scores.ftScore.homeGoals+t.scores.ftScore.awayGoals>6,OVER_CORNERS_6_5:isNaN((null===(o=null===(s=t.stats)||void 0===s?void 0:s.corners)||void 0===o?void 0:o.homeTeam)+(null===(l=null===(u=t.stats)||void 0===u?void 0:u.corners)||void 0===l?void 0:l.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>6,OVER_CORNERS_7_5:isNaN((null===(d=null===(c=t.stats)||void 0===c?void 0:c.corners)||void 0===d?void 0:d.homeTeam)+(null===(h=null===(f=t.stats)||void 0===f?void 0:f.corners)||void 0===h?void 0:h.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>7,OVER_CORNERS_8_5:isNaN((null===(m=null===(p=t.stats)||void 0===p?void 0:p.corners)||void 0===m?void 0:m.homeTeam)+(null===(_=null===(v=t.stats)||void 0===v?void 0:v.corners)||void 0===_?void 0:_.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>8,OVER_CORNERS_9_5:isNaN((null===(g=null===(y=t.stats)||void 0===y?void 0:y.corners)||void 0===g?void 0:g.homeTeam)+(null===(w=null===(b=t.stats)||void 0===b?void 0:b.corners)||void 0===w?void 0:w.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>9,OVER_CORNERS_10_5:isNaN((null===(I=null===(E=t.stats)||void 0===E?void 0:E.corners)||void 0===I?void 0:I.homeTeam)+(null===(O=null===(M=t.stats)||void 0===M?void 0:M.corners)||void 0===O?void 0:O.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>10,OVER_CORNERS_11_5:isNaN((null===(T=null===(P=t.stats)||void 0===P?void 0:P.corners)||void 0===T?void 0:T.homeTeam)+(null===(A=null===(S=t.stats)||void 0===S?void 0:S.corners)||void 0===A?void 0:A.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>11,OVER_CORNERS_12_5:isNaN((null===(R=null===(C=t.stats)||void 0===C?void 0:C.corners)||void 0===R?void 0:R.homeTeam)+(null===(F=null===(D=t.stats)||void 0===D?void 0:D.corners)||void 0===F?void 0:F.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>12,OVER_CORNERS_13_5:isNaN((null===(k=null===(L=t.stats)||void 0===L?void 0:L.corners)||void 0===k?void 0:k.homeTeam)+(null===(N=null===(j=t.stats)||void 0===j?void 0:j.corners)||void 0===N?void 0:N.awayTeam))?null:t.stats.corners.homeTeam+t.stats.corners.awayTeam>13}},e=t,t.createOneXTwoResult=function(t,e){var n,i,a,s;return"full_time"===e?t.ftScore.homeGoals>t.ftScore.awayGoals?r.OneXTwoEnum.ONE:t.ftScore.homeGoals===t.ftScore.awayGoals?r.OneXTwoEnum.X:r.OneXTwoEnum.TWO:(null===(n=null==t?void 0:t.htScore)||void 0===n?void 0:n.homeGoals)>(null===(i=null==t?void 0:t.htScore)||void 0===i?void 0:i.awayGoals)?r.OneXTwoEnum.ONE:(null===(a=null==t?void 0:t.htScore)||void 0===a?void 0:a.homeGoals)===(null===(s=null==t?void 0:t.htScore)||void 0===s?void 0:s.awayGoals)?r.OneXTwoEnum.X:r.OneXTwoEnum.TWO},t.createDoubleChanceResult=function(t){var e,n,i,a;return(null===(e=null==t?void 0:t.ftScore)||void 0===e?void 0:e.homeGoals)>(null===(n=null==t?void 0:t.ftScore)||void 0===n?void 0:n.awayGoals)?[r.DoubleChanceEnum.ONE_X,r.DoubleChanceEnum.ONE_TWO]:(null===(i=null==t?void 0:t.ftScore)||void 0===i?void 0:i.homeGoals)===(null===(a=null==t?void 0:t.ftScore)||void 0===a?void 0:a.awayGoals)?[r.DoubleChanceEnum.ONE_X,r.DoubleChanceEnum.X_TWO]:[r.DoubleChanceEnum.X_TWO,r.DoubleChanceEnum.ONE_TWO]},t.createHalfTimeFullTimeResult=function(t){var e,n,i,a,s,o,u,l,c,d,f,h,p,m,v,_,y,g,b,w,E,I,M,O;if((null===(e=null==t?void 0:t.htScore)||void 0===e?void 0:e.homeGoals)>(null===(n=null==t?void 0:t.htScore)||void 0===n?void 0:n.awayGoals)){if((null===(i=null==t?void 0:t.ftScore)||void 0===i?void 0:i.homeGoals)>(null===(a=null==t?void 0:t.ftScore)||void 0===a?void 0:a.awayGoals))return r.HalfTimeFullTimeEnum.ONE_ONE;if((null===(s=null==t?void 0:t.ftScore)||void 0===s?void 0:s.homeGoals)===(null===(o=null==t?void 0:t.ftScore)||void 0===o?void 0:o.awayGoals))return r.HalfTimeFullTimeEnum.ONE_X;if((null===(u=null==t?void 0:t.ftScore)||void 0===u?void 0:u.homeGoals)<(null===(l=null==t?void 0:t.ftScore)||void 0===l?void 0:l.awayGoals))return r.HalfTimeFullTimeEnum.ONE_TWO}if((null===(c=null==t?void 0:t.htScore)||void 0===c?void 0:c.homeGoals)===(null===(d=null==t?void 0:t.htScore)||void 0===d?void 0:d.awayGoals)){if((null===(f=null==t?void 0:t.ftScore)||void 0===f?void 0:f.homeGoals)>(null===(h=null==t?void 0:t.ftScore)||void 0===h?void 0:h.awayGoals))return r.HalfTimeFullTimeEnum.X_ONE;if((null===(p=null==t?void 0:t.ftScore)||void 0===p?void 0:p.homeGoals)===(null===(m=null==t?void 0:t.ftScore)||void 0===m?void 0:m.awayGoals))return r.HalfTimeFullTimeEnum.X_X;if((null===(v=null==t?void 0:t.ftScore)||void 0===v?void 0:v.homeGoals)<(null===(_=null==t?void 0:t.ftScore)||void 0===_?void 0:_.awayGoals))return r.HalfTimeFullTimeEnum.X_TWO}if((null===(y=null==t?void 0:t.htScore)||void 0===y?void 0:y.homeGoals)<(null===(g=null==t?void 0:t.htScore)||void 0===g?void 0:g.awayGoals)){if((null===(b=null==t?void 0:t.ftScore)||void 0===b?void 0:b.homeGoals)>(null===(w=null==t?void 0:t.ftScore)||void 0===w?void 0:w.awayGoals))return r.HalfTimeFullTimeEnum.TWO_ONE;if((null===(E=null==t?void 0:t.ftScore)||void 0===E?void 0:E.homeGoals)===(null===(I=null==t?void 0:t.ftScore)||void 0===I?void 0:I.awayGoals))return r.HalfTimeFullTimeEnum.TWO_X;if((null===(M=null==t?void 0:t.ftScore)||void 0===M?void 0:M.homeGoals)<(null===(O=null==t?void 0:t.ftScore)||void 0===O?void 0:O.awayGoals))return r.HalfTimeFullTimeEnum.TWO_TWO}},t.createMarketResultByCriteria=function(t,e){return t.timeline&&t.timeline.length?"red_card"===e?t.timeline.filter((function(t){return Number(t.minute)<=90})).some((function(t){return"red_card"===t.type})):t.timeline.filter((function(t){return Number(t.minute)<=90})).some((function(t){return t.type.startsWith(e)})):null},t.createPlayersMarketsResults=function(t,n,r){if(!t.timeline||!t.timeline.length)return"first_goal"===r?null:[];if("first_goal"===r){var i=t.timeline.find((function(t){return"goal"===t.type||"penalty_goal"===t.type||"own_goal"===t.type}))||null;if(i){var a=n[i.player.id];return{playerId:"goal"===i.type||"penalty_goal"===i.type?i.player.id:"OWN_GOAL",playerModel:a}}return null}if("yellow_card"===r||"red_card"===r)return e.transformPlayerMarketResult(t.timeline.filter((function(t){return Number(t.minute)<=90})).filter((function(t){return t.type===r})).map((function(t){return n[t.player.id]})));var s=new Map,o="one_goal"===r?1:"two_goals"===r?2:3,u=[];return t.timeline.filter((function(t){return Number(t.minute)<=90})).filter((function(t){return"goal"===t.type||"penalty_goal"===t.type})).forEach((function(t){var e=n[t.player.id];if(s.has(t.player.id)){var r=s.get(t.player.id);r.push(e),s.set(t.player.id,r)}else s.set(t.player.id,[e])})),s.forEach((function(t){t.length>=o&&u.push(t[0])})),e.transformPlayerMarketResult(u)},t.transformPlayerMarketResult=function(t){return t.map((function(t){return{playerId:t.id,playerModel:t}}))},t}();e.default=i},46367:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.playerId=null,this.playerModel=null}},61406:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(22524)),o=a(n(81732)),u=a(n(54119)),l=a(n(91465)),c=a(n(85132)),d=a(n(87344));e.default=function(t,e,n){var a=this;this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapFixturesRequest=function(t){var e={};if(e.match_id=t.matchId,e.match_type="FOOTBALL",t instanceof o.default)e.market=t.market,e.prediction=t.prediction.value,e.player_id=t.prediction.playerId;else if(t instanceof c.default||t instanceof d.default)e.market=t.market,e.prediction=t.prediction.value;else if(t instanceof l.default){e.market=t.market;var n=t.prediction.value.split(":");e.goals_home=Number(n[0]),e.goals_away=Number(n[1])}else e.market=t.market,e.prediction=t.prediction.value;return e},this.remapFixturesResponse=function(t){return r(a,void 0,void 0,(function(){var e,n,r,a,o,u,l,c,d,f,h,p;return i(this,(function(i){switch(i.label){case 0:for(e="OWN_GOAL",n=[],r=[],a=null,o=[],t.length>1&&t.sort((function(t,e){return t.match_id.localeCompare(e.match_id)})),u=0,l=t;u<l.length;u++)h=l[u],n.push(h.match_id),h.player_id&&!r.includes(h.player_id)&&r.push(h.player_id);return[4,this.matchFacade.getMatchesMapWithNativeIds(n)];case 1:return c=i.sent(),r.sort((function(t,e){return t.localeCompare(e)})),r&&r.length>0&&!r.includes(e)?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:for(d=0,f=t;d<f.length;d++)h=f[d],p=new s.default,h.target?p.market=this.predictorService.convertMarketForResponseModel(h.market,h.target):p.market=h.market,p.matchId=c[h.match_id].id,p.matchType=h.match_type,p.matchModel=c?c[h.match_id]:null,delete p.matchModel.availableMarkets,void 0!==h.prediction?p.prediction.value=h.prediction:void 0!==h.goals_home&&void 0!==h.goals_away&&(p.prediction.value=h.goals_home.toString()+":"+h.goals_away.toString()),p.prediction.playerId=h.player_id?h.player_id:null,"PLAYER_PERFORMANCE"===h.market&&(p.prediction.playerRole=h.role),p.prediction.playerId&&p.prediction.playerId!==e&&(p.prediction.playerModel=a[h.player_id],p.prediction.playerId=a[h.player_id].id),p.result=this.remapResult(h.result),o.push(p);return[2,o]}}))}))},this.remapResult=function(t){var e=new u.default;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e},this.matchFacade=t,this.playerFacade=e,this.predictorService=n}},22524:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(46367));e.default=function(){this.market=null,this.matchId=null,this.matchType=null,this.matchModel=null,this.prediction=new i.default,this.result=null}},61206:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(89883));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.BOTH_TEAMS_SCORE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},45274:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(78038));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.CORNERS_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},91465:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(3125));e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new i.default,this.prediction.value=n}},47535:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(56902));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.DOUBLE_CHANCE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},27307:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(66642));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.HT_FT,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},91718:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(12782));e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new i.default,this.prediction.value=n}},85132:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(89883));e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new i.default,this.prediction.value=n}},87344:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(89883));e.default=function(t,e,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new i.default,this.prediction.value=n}},71855:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(89883));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.PENALTY_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},81732:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(77321));e.default=function(t,e,n,r){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new i.default,this.prediction.value=n,this.prediction.playerId=r}},45814:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(27974),a=r(n(89883));e.default=function(t,e){this.matchId=null,this.market=i.MarketEnum.RED_CARD_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new a.default,this.prediction.value=e}},54119:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.settledAt=null,this.resettledAt=null,this.status=null,this.outcome=null,this.points=0}},2155:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.home=null,this.draw=null,this.away=null}},88821:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.score=null,this.percentage=null}},18430:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.homeGoals=null,this.awayGoals=null}},12449:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(18430)),a=r(n(59506));e.default=function(){this.FT_1X2=null,this.HT_1X2=null,this.BOTH_TEAMS_SCORE=null,this.DOUBLE_CHANCE=null,this.HT_FT=null,this.RED_CARD_MATCH=null,this.PENALTY_MATCH=null,this.CORNERS_MATCH=null,this.PLAYER_YELLOW_CARD=[],this.PLAYER_RED_CARD=[],this.PLAYER_SCORE_FIRST_GOAL=new a.default,this.PLAYER_SCORE=[],this.PLAYER_SCORE_TWICE=[],this.PLAYER_SCORE_HATTRICK=[],this.CORRECT_SCORE=new i.default,this.CORRECT_SCORE_ADVANCED=new i.default,this.CORRECT_SCORE_HT=new i.default,this.OVER_GOALS_0_5=null,this.OVER_GOALS_1_5=null,this.OVER_GOALS_2_5=null,this.OVER_GOALS_3_5=null,this.OVER_GOALS_4_5=null,this.OVER_GOALS_5_5=null,this.OVER_GOALS_6_5=null,this.OVER_CORNERS_6_5=null,this.OVER_CORNERS_7_5=null,this.OVER_CORNERS_8_5=null,this.OVER_CORNERS_9_5=null,this.OVER_CORNERS_10_5=null,this.OVER_CORNERS_11_5=null,this.OVER_CORNERS_12_5=null,this.OVER_CORNERS_13_5=null}},59506:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.playerId=null,this.playerModel=null}},45908:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.no=0,this.yes=0}},82726:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(61406)),o=a(n(12532)),u=a(n(13792)),l=a(n(60595)),c=a(n(34545)),d=a(n(44272)),f=a(n(22524)),h=a(n(25013)),p=a(n(1399)),m=a(n(68031));e.default=function(t,e){var n=this;this.fixturesRemapper=null,this.footballHttps=null,this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapRequestBody=function(t){if(t instanceof m.default)return t;var e={};return e.game_instance_id=t.gameInstanceId,e.fixtures=t.fixtures.map((function(t){return n.fixturesRemapper.remapFixturesRequest(t)})),t instanceof p.default&&t.tiebreaker&&(e.tiebreaker={},e.tiebreaker.golden_goal=t.tiebreaker.goldenGoal?t.tiebreaker.goldenGoal:null),e},this.remapResponseArrayBody=function(t){return r(n,void 0,void 0,(function(){var e,n,r,a,s,u,l=this;return i(this,(function(i){switch(i.label){case 0:return t.length?(e="OWN_GOAL",n=[],r=[],a={},s=[],t.forEach((function(t){t.fixtures.forEach((function(t){n.push(t.match_id),t.player_id&&t.player_id!==e&&r.push(t.player_id)}))})),[4,this.matchFacade.getMatchesMapWithNativeIds(n)]):[3,4];case 1:return u=i.sent(),r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:return t.forEach((function(t){var n=new o.default,r=[];n.id=t.id,n.gameInstanceId=t.game_instance_id,n.gameType=t.game_type,n.wager=t.wager,n.totalFixtures=t.total_fixtures,n.settledFixtures=t.settled_fixtures,n.userId=t.user_id,n.templateId=t.template_id,n.groupId=t.group_id,n.profileLastUpdatedAt=t.profile_last_updated_at,t.fixtures.forEach((function(t){var n=new f.default;t.target?n.market=l.predictorService.convertMarketForResponseModel(t.market,t.target):n.market=t.market,n.matchId=u[t.match_id].id,n.matchType=t.match_type,n.matchModel=u[t.match_id],delete n.matchModel.availableMarkets,void 0!==t.prediction?n.prediction.value=t.prediction:void 0!==t.goals_home&&void 0!==t.goals_away&&(n.prediction.value=t.goals_home.toString()+":"+t.goals_away.toString()),n.prediction.playerId=t.player_id?t.player_id:null,n.prediction.playerId&&n.prediction.playerId!==e&&(n.prediction.playerModel=a[n.prediction.playerId],n.prediction.playerId=a[n.prediction.playerId].id),"PLAYER_PERFORMANCE"===t.market&&(n.prediction.playerRole=t.role),n.result=l.fixturesRemapper.remapResult(t.result),r.push(n)})),n.fixtures=r,n.status=t.status,t.tiebreaker?n.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:n.tiebreaker=null,n.points=t.points,n.createdAt=t.created_at,n.updatedAt=t.updated_at,s.push(n)})),[2,s];case 4:return[2,t]}}))}))},this.remapResponseObjBody=function(t){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return(e=new o.default).id=t.id,e.gameInstanceId=t.game_instance_id,e.gameType=t.game_type,e.wager=t.wager,e.totalFixtures=t.total_fixtures,e.settledFixtures=t.settled_fixtures,e.userId=t.user_id,e.templateId=t.template_id,e.groupId=t.group_id,e.profileLastUpdatedAt=t.profile_last_updated_at,n=e,[4,this.fixturesRemapper.remapFixturesResponse(t.fixtures)];case 1:return n.fixtures=r.sent(),e.status=t.status,t.tiebreaker?e.tiebreaker.goldenGoal=t.tiebreaker.golden_goal:e.tiebreaker=null,e.points=t.points,e.createdAt=t.created_at,e.updatedAt=t.updated_at,[2,e]}}))}))},this.remapPredictionModel=function(t){var e=new u.default;return e.fullTimeOneXTwo=t.FT_1X2,e.halfTimeOneXTwo=t.HT_1X2,e.bothTeamsScore=t.BOTH_TEAMS_SCORE,e.overZeroPointFiveGoals=t.OVER_GOALS_0_5,e.overOnePointFiveGoals=t.OVER_GOALS_1_5,e.overTwoPointFiveGoals=t.OVER_GOALS_2_5,e.overThreePointFiveGoals=t.OVER_GOALS_3_5,e.overFourPointFiveGoals=t.OVER_GOALS_4_5,e.overFivePointFiveGoals=t.OVER_GOALS_5_5,e.overSixPointFiveGoals=t.OVER_GOALS_6_5,e.overSixPointFiveCorners=t.OVER_CORNERS_6_5,e.overSevenPointFiveCorners=t.OVER_CORNERS_7_5,e.overEightPointFiveCorners=t.OVER_CORNERS_8_5,e.overNinePointFiveCorners=t.OVER_CORNERS_9_5,e.overTenPointFiveCorners=t.OVER_CORNERS_10_5,e.overElevenPointFiveCorners=t.OVER_CORNERS_11_5,e.overTwelvePointFiveCorners=t.OVER_CORNERS_12_5,e.overThirteenPointFiveCorners=t.OVER_CORNERS_13_5,e.doubleChance=t.DOUBLE_CHANCE,e.halfTimeFullTime=t.HT_FT,e.playerScore=t.PLAYER_SCORE,e.playerYellowCard=t.PLAYER_YELLOW_CARD,e.playerRedCard=t.PLAYER_RED_CARD,e.redCardMatch=t.RED_CARD_MATCH,e.penaltyMatch=t.PENALTY_MATCH,e.playerScoreFirstGoal=t.PLAYER_SCORE_FIRST_GOAL,e.cornersMatch=t.CORNERS_MATCH,e.correctScore=t.CORRECT_SCORE,e.correctScoreHalfTime=t.CORRECT_SCORE_HT,e.correctScoreAdvanced=t.CORRECT_SCORE_ADVANCED,e.playerScoreHattrick=t.PLAYER_SCORE_HATTRICK,e.playerScoreTwice=t.PLAYER_SCORE_TWICE,e},this.footballHttps=new l.default(t),this.matchFacade=new c.default(t,this.footballHttps,e),this.playerFacade=new d.default(t,this.footballHttps,e),this.predictorService=new h.default(t,e),this.fixturesRemapper=new s.default(this.matchFacade,this.playerFacade,this.predictorService)}},53950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameInstanceId=null,this.fixtures=null}},12532:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(97640));e.default=function(){this.id=null,this.gameInstanceId=null,this.gameType=null,this.wager=null,this.totalFixtures=null,this.settledFixtures=null,this.userId=null,this.fixtures=[],this.status=null,this.tiebreaker=new i.default,this.points=null,this.templateId=null,this.groupId=null,this.profileLastUpdatedAt=null,this.createdAt=null,this.updatedAt=null}},97782:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(66147);e.default=function(t){var e=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.matchIds=null,this.gameIds=null,this.constructFiltersUrl=function(){var t="",n=!1;return e.status&&(n=Object.values(r.StatusEnum).some((function(t){return e.status.includes(t)}))),e.limit&&(t+="&",t+="limit=".concat(e.limit)),e.startAfter&&(t+="&",t+="start_after=".concat(e.startAfter)),e.status&&n&&(t+="&",t+="status=".concat(e.status.join(","))),e.type&&(t+="&",t+="game_types=".concat(e.type)),e.matchIds&&e.matchIds.length>0&&(t+="&",t+="match_ids=".concat(e.matchIds.join(","))),e.gameIds&&e.gameIds.length>0&&(t+="&",t+="game_ids=".concat(e.gameIds.join(","))),t},this.limit=(null==t?void 0:t.limit)||null,this.startAfter=(null==t?void 0:t.startAfter)||null,this.status=(null==t?void 0:t.status)||null,this.type=(null==t?void 0:t.type)||null,this.matchIds=(null==t?void 0:t.matchIds)||null,this.gameIds=(null==t?void 0:t.gameIds)||null}},13792:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(45908));e.default=function(){this.fullTimeOneXTwo={},this.halfTimeOneXTwo={},this.bothTeamsScore=new i.default,this.doubleChance={},this.halfTimeFullTime={},this.playerScore={},this.playerYellowCard={},this.playerRedCard={},this.redCardMatch=new i.default,this.penaltyMatch=new i.default,this.playerScoreFirstGoal={},this.cornersMatch={},this.correctScore={},this.correctScoreHalfTime={},this.correctScoreAdvanced={},this.playerScoreHattrick={},this.playerScoreTwice={},this.overZeroPointFiveGoals=new i.default,this.overOnePointFiveGoals=new i.default,this.overTwoPointFiveGoals=new i.default,this.overThreePointFiveGoals=new i.default,this.overFourPointFiveGoals=new i.default,this.overFivePointFiveGoals=new i.default,this.overSixPointFiveGoals=new i.default,this.overSixPointFiveCorners=new i.default,this.overSevenPointFiveCorners=new i.default,this.overEightPointFiveCorners=new i.default,this.overNinePointFiveCorners=new i.default,this.overTenPointFiveCorners=new i.default,this.overElevenPointFiveCorners=new i.default,this.overTwelvePointFiveCorners=new i.default,this.overThirteenPointFiveCorners=new i.default}},19378:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchType=null,this.predictions=null}},79679:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(82726)),a=r(n(19378));e.default=function(t,e){var n=this;this.remapPredictions=null,this.remapResponse=function(t){var e=new a.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.predictions=n.remapPredictions.remapPredictionModel(t.predictions),e},this.remapPredictions=new i.default(t,e)}},77321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1,this.playerId=null}},89883:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1}},78038:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},3125:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},56902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},66642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},12782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},71259:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(52793)),o=a(n(88900)),u=a(n(62929)),l=a(n(47686)),c=a(n(49297));e.default=function(t){var e=this;this.predictorHttps=null,this.clientHttps=null,this.predictorFacade=null,this.idMapping=null,this.helpers=null,this.makeFootballPrediction=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.makeFootballPrediction(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getMatchSummary=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMatchSummary(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMarketSummary=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMarketSummary(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.deleteFootballPrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyCurrentPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyCurrentPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPastPredictions=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPastPredictions(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPredictionsForMatches=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMyPredictionsForMatches(t,n)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserCurrentPredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserCurrentPredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserPastPredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPastPredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,n,a,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getUserPredictionsForMatches(t,n,a,s)];case 1:return[2,e.sent()]}}))}))},this.getPredictionById=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getPredictionById(t)];case 1:return[2,e.sent()]}}))}))},this.getPredictionsByIds=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getPredictionsByIds(t)];case 1:return[2,e.sent()]}}))}))},this.getMatchMarketsResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getMatchMarketsResults(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new o.default(t),this.predictorHttps=new s.default(t),this.clientHttps=new l.default(t),this.predictorFacade=new u.default(t,this.predictorHttps,this.clientHttps,this.idMapping),this.helpers=new c.default(t)}},25013:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(27974),l=o(n(58452)),c=o(n(45908)),d=o(n(68950)),f=o(n(36890)),h=o(n(60595)),p=o(n(34545)),m=o(n(97782)),v=o(n(7299)),_=n(90712),y=o(n(54119)),g=o(n(63751)),b=o(n(87243)),w=o(n(44272)),E=o(n(91180)),I=o(n(45765)),M=n(66147),O=n(5318),P=n(14946),T=o(n(86409)),S=n(91260),A=o(n(66247)),C=o(n(12449)),R=o(n(78364));e.default=function(t,e){var n=this;this.footballHttps=null,this.idMapping=null,this.matchFacade=null,this.playerFacade=null,this.profileNamespace=null,this.remapMatchIdToNative=function(t){return i(n,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(t,"match","native")];case 1:return[2,e.sent().match]}}))}))},this.remapPlayerIdToNative=function(t){return i(n,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(t,"player","native")];case 1:return[2,e.sent().player[0]]}}))}))},this.remapPlayerIdMapToNative=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(a){switch(a.label){case 0:return e={},n=(0,_.transformIdsToBeUnique)(t),[4,this.idMapping.getEntityIdsBySchemaId(n,"player","native")];case 1:return r=a.sent(),i=r.player,n.forEach((function(t,n){return e[t]=i[n]})),[2,e]}}))}))},this.remapPlayerIdToIdSchema=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,s,o,u,l,c,d,f,h,p,m,v,_,y,g,b;return a(this,(function(a){switch(a.label){case 0:for(e=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=[],r=0,i=Object.entries(t);r<i.length;r++)if(s=i[r],o=s[0],u=s[1],e.includes(o))for(l=0,c=Object.keys(u);l<c.length;l++)"NOBODY"!==(d=c[l])&&"OWN_GOAL"!==d&&n.push(d);return n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[2,t];case 1:for(f=a.sent(),h=0,p=Object.entries(t);h<p.length;h++)if(m=p[h],v=m[0],_=m[1],e.includes(v))for(y=0,g=Object.keys(_);y<g.length;y++)"NOBODY"!==(b=g[y])&&"OWN_GOAL"!==b&&(_[f[b].id]=_[b],_[f[b].id].model=f[b],this.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&delete _[b]);return[2,t]}}))}))},this.convertMarketForResponseModel=function(t,e){return t+"_"+e.toString()},this.getMarketSummary=function(t,e,r){return i(n,void 0,void 0,(function(){var n,i,s,o,l,d,f,h,p=this;return a(this,(function(a){switch(a.label){case 0:if(n=S.marketToKeySummaryMap.get(e),(i={}).matchId=t.matchId,i.matchType=t.matchType,!Object.keys(t.predictions).includes(n))throw new Error("You have passed invalid market");return i[n]=t.predictions[n],u.playerMarkets.includes(e)&&r?(s="","OWN_GOAL"===r||"NOBODY"===r?[3,2]:[4,this.idMapping.idMappingFacade.getEntitiesByIds({player:[r]},this.idMapping.idSchema,"native")]):[3,6];case 1:o=a.sent(),s=o.player[0],a.label=2;case 2:return s&&i[n][s]?[4,this.playerFacade.getPlayersMapWithNativeIds([s])]:[3,4];case 3:return l=a.sent(),i[n][s].model=l[s],[2,i[n][s]];case 4:return s?(i[n][s]=new c.default,[2,i[n][s]]):[2,i[n][r]];case 5:return[3,10];case 6:return!u.playerMarkets.includes(e)||r?[3,10]:(d=Object.keys(i[n]).filter((function(t){return"NOBODY"!==t&&"OWN_GOAL"!==t}))).length?[4,this.playerFacade.getPlayersMapWithNativeIds(d)]:[3,8];case 7:return h=a.sent(),[3,9];case 8:h={},a.label=9;case 9:f=h,Object.keys(f).length&&Object.keys(i[n]).forEach((function(t){"NOBODY"!==t&&"OWN_GOAL"!==t&&(i[n][f[t].id]=i[n][t],i[n][f[t].id].model=f[t],p.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&delete i[n][t])})),a.label=10;case 10:return[2,i]}}))}))},this.remapCompetitionsFromConfig=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,s,o,u,c;return a(this,(function(a){switch(a.label){case 0:return t instanceof l.default?(e={competition:t.fullCoverageCompetitions},n={competition:t.successRateScopes.competitions},r={team:t.successRateScopes.teams},[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,"native",this.idMapping.idSchema)]):[3,4];case 1:return i=a.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",this.idMapping.idSchema)];case 2:return s=a.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(r,"native",this.idMapping.idSchema)];case 3:return o=a.sent(),t.fullCoverageCompetitions=i.competition,t.successRateScopes.competitions=s.competition,t.successRateScopes.teams=o.team,[2,t];case 4:return t instanceof E.default||t instanceof I.default?(u={competition:t.competitionsWhitelist},[4,this.idMapping.idMappingFacade.getEntitiesByIds(u,"native",this.idMapping.idSchema)]):[3,6];case 5:return c=a.sent(),t.competitionsWhitelist=c.competition,[2,t];case 6:return[2]}}))}))},this.remapMatchIdsFixtures=function(t){return i(n,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return Array.isArray(t.data)?t.data.length>0?(e=[],n=[],t.data.forEach((function(t){t instanceof g.default||t instanceof d.default||t instanceof b.default||t instanceof A.default?(t.fixtures.forEach((function(t){return e.push(t.matchId)})),t instanceof b.default&&t.fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&n.push(t.prediction.playerId)}))):t instanceof f.default&&t.results.forEach((function(t){return e.push(t.matchId)}))})),[4,this.refactorResponseArrModel(t,e,n)]):[3,2]:[3,4];case 1:case 5:return[2,r.sent()];case 2:return[2,t];case 3:return[3,6];case 4:return[4,this.refactorResponseObjModel(t)];case 6:return[2]}}))}))},this.refactorResponseArrModel=function(t,e,r){return i(n,void 0,void 0,(function(){var n,i,s,o=this;return a(this,(function(a){switch(a.label){case 0:return n=[],[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return i=a.sent(),s={},r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:s=a.sent(),a.label=3;case 3:return t.data.forEach((function(t){t instanceof g.default||t instanceof d.default||t instanceof b.default?(t.fixtures.forEach((function(e){o.handleMatchModel(i,e),t instanceof b.default&&e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&(e.prediction.playerModel=s[e.prediction.playerId],e.prediction.playerId=s[e.prediction.playerId].id)})),n.push(t)):t instanceof f.default&&(t.results.forEach((function(t){t.matchModel=i[t.matchId],delete t.matchModel.availableMarkets,t.matchId=t.matchModel.id})),n.push(t))})),t.data=n,[2,t]}}))}))},this.refactorResponseObjModel=function(t){return i(n,void 0,void 0,(function(){var e,n,r=this;return a(this,(function(i){switch(i.label){case 0:return e=[],t.fixtures.forEach((function(t){return e.push(t.matchId)})),[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return n=i.sent(),t.fixtures.forEach((function(t){return r.handleMatchModel(n,t)})),[2,t]}}))}))},this.getCurrentGameId=function(t){var e=new Date;if(t.data.length>1){var n=[];return t.data.forEach((function(t){return n.push(t.predictionsCutoff)})),t.data.sort((function(t,n){var r=[t.predictionsCutoff,n.predictionsCutoff].map((function(t){return Math.abs(new Date(t)-e)}));return r[0]-r[1]}))[0].id}return t.data[0].id},this.initGameTypePredictions=function(t,e){var n={type:t,limit:null,startAfter:null};return e&&(n=r(r({},n),{limit:e.limit,startAfter:e.startAfter})),new m.default(n)},this.initGameFilters=function(t,e,n){if(e&&n)return e.type=t,e.gameIds=n,new v.default(e);if(e&&!n)return e.type=t,new v.default(e);if(!e&&n){var r={type:t,gameIds:n};return new v.default(r)}return r={type:t},new v.default(r)},this.addPredictionProp=function(t,e){return i(n,void 0,void 0,(function(){var n=this;return a(this,(function(r){switch(r.label){case 0:return e.data.forEach((function(e){var r=e.fixtures.map((function(t){return t.matchId}));t.data.forEach((function(t){e.id===t.game_instance_id&&(e.fixtures.sort((function(t,e){return t.matchId.localeCompare(e.matchId)})),t.fixtures.sort((function(t,e){return t.match_id.localeCompare(e.match_id)})),e.predictionId=t.id,e.outcome=t.status,e.fixtures.forEach((function(e,r){void 0!==t.fixtures[r].goals_home&&void 0!==t.fixtures[r].goals_away?e.prediction.value=t.fixtures[r].goals_home+":"+t.fixtures[r].goals_away:e.prediction.value=t.fixtures[r].prediction,t.fixtures[r].player_id?e.prediction.playerId=t.fixtures[r].player_id:t.fixtures[r].target&&(e.prediction.target=t.fixtures[r].target),e.prediction.result=n.remapResult(t.fixtures[r].result)})),e.predictionsMadeAt=t.created_at,e.predictionsUpdatedAt=t.profile_last_updated_at,e.points=t.points,e instanceof d.default&&(t.tiebreaker?e.predictionTiebreaker.goldenGoal=t.tiebreaker.golden_goal:e.predictionTiebreaker=t.tiebreaker))})),e.fixtures.sort((function(t,e){return r.indexOf(t.matchId)-r.indexOf(e.matchId)}))})),e.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,[4,this.remapMatchIdsFixtures(e)];case 1:return[2,r.sent()]}}))}))},this.remapResult=function(t){var e=new y.default;return e.settledAt=t.settled_at,e.resettledAt=t.resettled_at,e.status=t.status,e.outcome=t.outcome,e.points=t.points,e},this.areIdsExceeded=function(t){return t.length>10},this.initPredictionsFilters=function(t,e,r){switch(e){case"user":t&&(t=new m.default(t));break;case"current":if(t)n.deleteUnexpectedProperties(t),t.status=[M.StatusEnum.ACTIVE],t=new m.default(t);else{var i={status:[M.StatusEnum.ACTIVE]};t=new m.default(i)}break;case"past":t?(n.deleteUnexpectedProperties(t),t.status=M.pastStatuses,t=new m.default(t)):(i={status:M.pastStatuses},t=new m.default(i));break;case"matches":t?(n.deleteUnexpectedProperties(t),t.matchIds=r,t=new m.default(t)):(i={matchIds:r},t=new m.default(i))}return t},this.completeGameMarketResults=function(t,e){return i(n,void 0,void 0,(function(){var n,r,i,o,l,c,d,f,h=this;return a(this,(function(a){switch(a.label){case 0:switch(e){case"MATCH_QUIZ":return[3,1];case"TOP_X":return[3,5]}return[3,9];case 1:return n={},r=t.results[0].matchId,i=t.results.map((function(t){return u.playerMarkets.includes(t.market)&&!t.result.includes("OWN_GOAL")?s([],t.result,!0):[]})).flat(),[4,this.matchFacade.getMatchesMapWithNativeIds([r])];case 2:return o=a.sent(),i.length?[4,this.playerFacade.getPlayersMapWithNativeIds(i)]:[3,4];case 3:n=a.sent(),a.label=4;case 4:return t.results=t.results.map((function(t){if(t.matchModel=o[t.matchId]?o[t.matchId]:null,t.playerModels&&Object.keys(n).length&&(e=t.result).forEach((function(e){var r=n[e];t.playerModels.push(r)})),h.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&(h.remapMatchIdForResultsMarkets(o,t),t.playerModels&&Object.keys(n).length)){var e=t.result;t.result=e.map((function(t){return n[t].id}))}return t})),[2,t];case 5:return l=t.results.map((function(t){return t.matchId})),[4,this.matchFacade.getMatchesMapWithNativeIds(l)];case 6:return c=a.sent(),t.results=t.results.map((function(t){return t.matchModel=c[t.matchId]?c[t.matchId]:null,h.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&h.remapMatchIdForResultsMarkets(c,t),t})),t.tieBreakers.goldenGoals.length?(d=t.tieBreakers.goldenGoals.map((function(t){return t.playerId})),[4,this.playerFacade.getPlayersMapWithNativeIds(d)]):[3,8];case 7:f=a.sent(),t.tieBreakers.goldenGoals=t.tieBreakers.goldenGoals.map((function(t){return t.matchModel=c[t.matchId],t.playerModel=f[t.playerId],h.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&(t.matchId=c[t.matchId].id,t.playerId=f[t.playerId].id),t})),a.label=8;case 8:return[2,t];case 9:return[2]}}))}))},this.completeContestWinners=function(t){return i(n,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return t.userList&&t.userList.length?(e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)]):[3,2];case 1:n=r.sent(),t.userList.forEach((function(t){var e=n.filter((function(e){return e.id===t.profileId}))[0];delete e.interests,t.profileModel=e})),r.label=2;case 2:return[2,t]}}))}))},this.handleMatchModel=function(t,e){t[e.matchId]?(e.matchModel=t[e.matchId],delete e.matchModel.availableMarkets,e.matchId=e.matchModel.id):(e.matchModel=null,n.idMapping.idSchema!==P.IdSchemaEnum.NATIVE&&n.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then((function(t){e.matchId=t[S.ID_TYPES[n.idMapping.idSchema]]})))},this.remapMatchIdForResultsMarkets=function(t,e){t[e.matchId]?e.matchId=t[e.matchId].id:n.idMapping.idMappingFacade.getEntityById(e.matchId,"match","native").then((function(t){e.matchId=t[S.ID_TYPES[n.idMapping.idSchema]]}))},this.deleteUnexpectedProperties=function(t){return t.status&&(console.warn(O.WarningMessages.UNEXPECTED_STATUS_PROP),delete t.status),t.type&&(console.warn(O.WarningMessages.UNEXPECTED_TYPE_PROP),delete t.type),t},this.getMatchMarketsResults=function(t){return i(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.footballHttps.getMatchById(t,!0)];case 1:return"finished"===(e=i.sent()).status.type&&e.finishedAt?(n=[],e.timeline.filter((function(t){return Number(t.minute)<=90})).filter((function(t){return"goal"===t.type||"penalty_goal"===t.type||"yellow_card"===t.type||"red_card"===t.type})).forEach((function(t){n.push(t.player.id)})),r={},n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[3,3]):[2,new C.default];case 2:r=i.sent(),i.label=3;case 3:return[2,R.default.createMatchMarketsResultsModel(e,r)]}}))}))},this.footballHttps=new h.default(t),this.idMapping=e,this.matchFacade=new p.default(t,this.footballHttps,e),this.playerFacade=new w.default(t,this.footballHttps,e),this.profileNamespace=new T.default(t)}},12310:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(4021),a=n(94904),s=r(n(68097)),o=n(5318),u=n(27974),l=n(1976),c=r(n(61206)),d=r(n(45274)),f=r(n(91465)),h=r(n(47535)),p=r(n(91718)),m=r(n(27307)),v=r(n(85132)),_=r(n(87344)),y=r(n(71855)),g=r(n(81732)),b=r(n(45814)),w=r(n(53950)),E=n(91260),I=r(n(97640)),M=r(n(62535));e.default=function(t){var e=this;this.errorHandlingMode=null,this.validateBodyFields=function(t,n){var r=Object.keys(n),i=Object.keys(new w.default);switch(t){case"MATCH_QUIZ":r.forEach((function(t){i.includes(t)||e.throwInvalidParamException([t])}));break;case"TOP_X":var a=n;a.fixtures.forEach((function(t){return e.validateMarketTopX(t.market)})),r.includes("tiebreaker")&&a.tiebreaker&&e.validateTiebreaker(a.tiebreaker),r.forEach((function(t){"tiebreaker"===t||i.includes(t)||e.throwInvalidParamException([t])}))}var s=i.filter((function(t){return!r.includes(t)}));return s.length&&e.throwMissingFieldsException("game prediction body",s),n.fixtures.forEach((function(t){e.validateFixtureFields(t)})),n},this.validateFixture=function(t,n,r,i){e.validateMarket(n);var a=Object.values(l.OneXTwoEnum),s=Object.values(l.HalfTimeFullTimeEnum),o=Object.values(l.DoubleChanceEnum);if(n===u.MarketEnum.FT_1X2||n===u.MarketEnum.HT_1X2){if(a.includes(r))return new p.default(t,n,r)}else if(n===u.MarketEnum.HT_FT){if(s.includes(r))return new m.default(t,r)}else if(n===u.MarketEnum.DOUBLE_CHANCE){if(o.includes(r))return new h.default(t,r)}else if(n===u.MarketEnum.CORRECT_SCORE||n===u.MarketEnum.CORRECT_SCORE_ADVANCED||n===u.MarketEnum.CORRECT_SCORE_HT){if("string"==typeof r&&/\d+:\d+/.test(r))return new f.default(t,n,r)}else if(n===u.MarketEnum.CORNERS_MATCH){if("number"==typeof r)return new d.default(t,r)}else if(n===u.MarketEnum.BOTH_TEAMS_SCORE){if(e.isPredictionBoolean(r))return new c.default(t,r)}else if(n===u.MarketEnum.RED_CARD_MATCH){if(e.isPredictionBoolean(r))return new b.default(t,r)}else if(n===u.MarketEnum.PENALTY_MATCH){if(e.isPredictionBoolean(r))return new y.default(t,r)}else if(u.playerMarkets.includes(n)){var w="OWN_GOAL";if(e.validatePlayerId(n,i),n===u.playerMarketNobodyPrediction&&e.isPredictionBoolean(r)){var E=i&&i===w?w:i;return new g.default(t,n,r,E)}if(i&&e.isPredictionBoolean(r))return new g.default(t,n,r,i)}else if(u.MarketsOverGoals.includes(n)){if(e.isPredictionBoolean(r))return new _.default(t,n,r)}else if(u.MarketsOverCorners.includes(n)&&e.isPredictionBoolean(r))return new v.default(t,n,r);e.throwInvalidPredictionException(r,n)},this.validateFixtureFields=function(t){var n=Object.keys(t);n.forEach((function(t){E.validFixtureFields.includes(t)||e.throwInvalidParamException([t])}));var r=E.validFixtureFields.filter((function(t){if("matchType"!==t&&!n.includes(t))return t}));r.length&&e.throwMissingFieldsException("fixtures",r),e.validatePredictionKey(t.market,t.prediction)},this.validateTiebreaker=function(t){var n=Object.keys(t);n.length&&"object"==typeof t||e.throwInvalidType("tiebreaker","object");var r=Object.keys(new I.default)[0];n.forEach((function(t){r!==t&&e.throwInvalidParamException([t])})),n.includes(r)||e.throwMissingFieldsException("tiebreaker",[r]),"number"!=typeof t.goldenGoal&&e.throwInvalidType("goldenGoal","number")},this.validatePredictionKey=function(t,n){if("object"==typeof n){var r=Object.keys(n),i=["value"];if(r.length||e.throwMissingFieldsException("prediction",i),1!==r.length||r.includes(i[0])||e.throwInvalidParamException(r),r.length>1){u.playerMarkets.includes(t)&&i.push("playerId");var a=r.filter((function(t){return!i.includes(t)}));a.length&&e.throwInvalidParamException(a)}}else e.throwInvalidType("prediction","object")},this.validatePlayerId=function(t,n){var r="playerId";t!==u.playerMarketNobodyPrediction&&(n||e.throwInvalidParamException([r]),"string"!=typeof n&&e.throwInvalidType(r,"string"))},this.validateMarket=function(t){Object.values(u.MarketEnum).includes(t)||e.throwInvalidMarketException(t)},this.validateMarketTopX=function(t){t!==u.MarketEnum.CORRECT_SCORE&&t!==u.MarketEnum.CORRECT_SCORE_ADVANCED&&e.throwInvalidMarketException(t,"TOP_X")},this.isPredictionBoolean=function(t){return"boolean"==typeof t},this.throwInvalidPredictionException=function(t,n){var r=(0,o.invalidPredictionMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_PREDICTION,r);throw new M.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,r)},this.throwInvalidMarketException=function(t,n){var r;if(r=n&&"TOP_X"===n?(0,o.invalidMarketTopXMessage)(t):(0,o.invalidMarketMessage)(t),"default"===e.errorHandlingMode)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_MARKET,r);throw new M.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,r)},this.throwInvalidParamException=function(t){var n=(0,o.invalidFieldMessage)(t);if("default"===e.errorHandlingMode)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FIELD,n);throw new M.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,n)},this.throwMissingFieldsException=function(t,n){var r=(0,o.missingFieldsMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_FIELD,r);throw new M.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,r)},this.throwInvalidType=function(t,n){var r=(0,o.invalidTypeMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,r);throw new M.default(i.ErrorCodes.BAD_METHOD_CALL,a.ErrorStatuses.INVALID_TYPE,r)},this.errorHandlingMode=t}},84306:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4021),o=n(94904),u=a(n(62535)),l=n(5318),c=a(n(87059)),d=a(n(48863)),f=a(n(35230)),h=a(n(86409)),p=a(n(45955)),m=a(n(73886)),v=a(n(54121)),_=a(n(31461)),y=a(n(49759)),g=a(n(88247)),b=a(n(42590));e.default=function(t){var e=this;this.factory=null,this.privateLeagueHttps=null,this.loyaltyHttps=null,this.profile=null,this.service=null,this.discussionsService=null,this.create=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=this.factory.createRequestBodyFromParam(t,"PRIVATE"),[4,this.privateLeagueHttps.create(e,"PRIVATE_LEAGUE")];case 1:return n=r.sent(),[4,this.service.setTemplateModels(n)];case 2:return r.sent(),[2,n]}}))}))},this.getById=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.privateLeagueHttps.getById(t,"PRIVATE_LEAGUE",n)];case 1:return e=r.sent(),[4,this.service.setTemplateModels(e)];case 2:return r.sent(),[2,e]}}))}))},this.getMyLeagues=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return t=new v.default(t),[4,this.privateLeagueHttps.getMyLeagues(t,"PRIVATE_LEAGUE")];case 1:return e=n.sent(),[4,this.service.setTemplateModelsInLeagues(e)];case 2:return n.sent(),[2,e]}}))}))},this.update=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return e=this.factory.createUpdateRequestBodyFromParam(n,"PRIVATE"),[4,this.privateLeagueHttps.update(t,e,"PRIVATE_LEAGUE")];case 1:return r=i.sent(),[4,this.service.setTemplateModels(r)];case 2:return i.sent(),[2,r]}}))}))},this.updateTemplate=function(t,n,a){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.privateLeagueHttps.updateLeagueTemplate(t,n,a,"PRIVATE_LEAGUE")];case 1:return e=r.sent(),[4,this.service.setTemplateModels(e)];case 2:return r.sent(),[2,e]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.delete(t,"PRIVATE_LEAGUE")];case 1:return[2,e.sent()]}}))}))},this.invite=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.invite(t,n)];case 1:return[2,e.sent()]}}))}))},this.deleteInvitation=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.deleteInvitation(t,n)];case 1:return[2,e.sent()]}}))}))},this.accept=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=!0,[4,this.privateLeagueHttps.accept(t,e,"PRIVATE_LEAGUE")];case 1:return n=r.sent(),[4,this.finalizeAcceptModel(n,e)];case 2:return[2,r.sent()]}}))}))},this.reject=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=!1,[4,this.privateLeagueHttps.accept(t,e,"PRIVATE_LEAGUE")];case 1:return n=r.sent(),[4,this.finalizeAcceptModel(n,e)];case 2:return[2,r.sent()]}}))}))},this.banUsers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.ban(t,n)];case 1:return[2,e.sent()]}}))}))},this.unbanUsers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.unban(t,n)];case 1:return[2,e.sent()]}}))}))},this.join=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.privateLeagueHttps.join(t)];case 1:return e=n.sent(),[4,this.finalizeAcceptModel(e,!0)];case 2:return[2,n.sent()]}}))}))},this.leave=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.leave(t,"PRIVATE_LEAGUE")];case 1:return[2,e.sent()]}}))}))},this.finalizeAcceptModel=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return n?[4,this.getById(t.leagueId)]:[3,2];case 1:e=r.sent(),t.leagueModel=e,r.label=2;case 2:return[4,this.service.setProfileModel(t)];case 3:return r.sent(),[2,t]}}))}))},this.getMyLeaguesStandings=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,s,o;return i(this,(function(i){switch(i.label){case 0:return t&&(t=new _.default(t)),[4,this.profile.getOwn().getInfo()];case 1:return e=i.sent(),[4,this.loyaltyHttps.getUserRankingsForPrivateLeagueAndChallenges(e.id,"PRIVATE_LEAGUE",t)];case 2:n=i.sent(),r=0,a=n.data,i.label=3;case 3:return r<a.length?(s=a[r],[4,this.getById(s.privateLeagueId)]):[3,6];case 4:o=i.sent(),s.privateLeagueModel=o,i.label=5;case 5:return r++,[3,3];case 6:return this.service.setTemplateModelsFromLeagueModels(n.data,"PRIVATE_LEAGUE"),[2,n]}}))}))},this.getInvitations=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return(t=new m.default(t)).type="PRIVATE",[4,this.privateLeagueHttps.getInvitations("PRIVATE_LEAGUE",t)];case 1:return e=n.sent(),[4,this.service.setTemplateModelsInLeagues(e.data)];case 2:return n.sent(),[2,e]}}))}))},this.getReportedPosts=function(t,n){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return n&&(n=new y.default(n)),[4,this.privateLeagueHttps.getReportedPosts(t,n)];case 1:return e=i.sent(),r=e,[4,this.discussionsService.finalizePostFullModel(e.data)];case 2:return r.data=i.sent(),[2,e]}}))}))},this.getPredictions=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:if(n){if(n.limit&&n.limit>20)throw new u.default(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_LIMIT,l.ErrorMessages.INVALID_LIMIT+20..toString());n=new g.default(n)}return[4,this.privateLeagueHttps.getPredictions(t,n)];case 1:return e=r.sent(),[4,this.service.setModelsForPredictions(e)];case 2:return[2,r.sent()]}}))}))},this.moderatePost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeagueHttps.moderatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.factory=new p.default,this.privateLeagueHttps=new d.default(t),this.loyaltyHttps=new c.default(t),this.profile=new h.default(t),this.service=new b.default(t),this.discussionsService=new f.default(t)}},45955:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(95124)),a=r(n(91796)),s=r(n(44823)),o=r(n(39845));e.default=function(){this.createRequestBodyFromParam=function(t,e){var n="PRIVATE"===e?new a.default:new i.default;return n.name=t.name,n.description=t.description,n.invitation_code=t.invitationCode,n.template_id=t.templateId,n.users_can_invite_users=t.usersCanInviteUsers,t.administrators?n.administrators=t.administrators:delete n.administrators,t.scoringStartsAt?n.scoring_starts_at=t.scoringStartsAt:delete n.scoring_starts_at,n},this.createUpdateRequestBodyFromParam=function(t,e){var n="PRIVATE"===e?new s.default:new o.default;return n.name=t.name,n.description=t.description,n.invitation_code=t.invitationCode,n.template_id=t.templateId,n.users_can_invite_users=t.usersCanInviteUsers,n.administrators=t.administrators,n.pinned_posts=t.pinnedPosts,n.scoring_starts_at=t.scoringStartsAt,n}}},73958:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profileId="",this.profileModel=null,this.leagueId="",this.leagueModel=null,this.message=""}},73886:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.type=null,n.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(n);return n.type&&(e+="&type=".concat(n.type)),e},n.type=e&&e.type?e.type:null,n}return i(e,t),e}(a(n(64800)).default);e.default=s},54121:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.type="PRIVATE",this.userRole=null,this.constructFiltersUrl=function(){var t="&type=".concat(e.type);return e.userRole&&(t+="&user_role=".concat(e.userRole)),t},this.userRole=(null==t?void 0:t.userRole)||null}},31461:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=null,this.page=null,this.leagueId=null,this.templateId=null,this.sortOrder=null,this.constructFiltersUrl=function(){var t="";return e.limit&&(t+="&limit=".concat(e.limit)),e.page&&(t+="&page=".concat(e.page)),e.leagueId&&(t+="&league_id=".concat(e.leagueId)),e.templateId&&(t+="&template_id=".concat(e.templateId)),e.sortOrder&&(t+="&sort_order=".concat(e.sortOrder)),t},this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null,this.leagueId=t&&t.leagueId?t.leagueId:null,this.templateId=t&&t.templateId?t.templateId:null,this.sortOrder=t&&t.sortOrder?t.sortOrder:null}},49759:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.reportsCount=null,n.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(n);return n.reportsCount&&(e+="&reports_count=".concat(n.reportsCount)),e},n.reportsCount=e.reportsCount?e.reportsCount:null,n}return i(e,t),e}(a(n(64800)).default);e.default=s},88247:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=null,this.page=null,this.profileIds=null,this.constructFiltersUrl=function(){var t="";return e.limit&&(t+="&limit=".concat(e.limit)),e.page&&(t+="&page=".concat(e.page)),e.profileIds&&(t+="&profile_ids=".concat(e.profileIds.join(","))),t},this.limit=t&&t.limit?t.limit:null,this.page=t&&t.page?t.page:null,this.profileIds=t&&t.profileIds?t.leagueId:null}},72690:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30194));e.default=function(){this.id=null,this.name=null,this.model=new i.default}},78383:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.members=[],e}return i(e,t),e}(a(n(82446)).default);e.default=s},82446:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.name="",this.description="",this.type="",this.banned=[],this.invites=[],this.administrators=[],this.membersCount=0,this.invitationCode="",this.templateId="",this.templateModel=null,this.pastTemplates=[],this.usersCanInviteUsers=!1,this.scoringStartsAt="",this.pinnedPosts=[]}},98796:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.name="",this.description="",this.invitationCode="",this.templateId="",this.usersCanInviteUsers=!1,this.administrators=[],this.scoringStartsAt=""}},24225:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.name="",this.description="",this.invitationCode="",this.templateId="",this.usersCanInviteUsers=!1,this.administrators=[],this.pinnedPosts=[],this.scoringStartsAt=""}},52663:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.predictionId=null,this.predictionModel=null,this.profileId=null,this.profileModel=null}},16361:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(73569));e.default=function(){this.meta=new i.default,this.data=[]}},30494:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},99659:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.templateId="",this.templateModel=null,this.privateLeagueId="",this.privateLeagueModel=null,this.position="",this.points=0,this.type="private_league"}},84239:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872)),a=r(n(76085)),s=r(n(73569)),o=r(n(73958)),u=r(n(78383)),l=r(n(82446)),c=r(n(52663));e.default=function(){var t=this;this.remapToPrivateLeagues=function(e){return e.meta=t.remapMetaPrivateLeagues(e.meta.pagination),e.data=e.data.map((function(e){return t.remapToPrivateLeagueById(e)})),e},this.remapMetaPrivateLeagues=function(t){var e=new i.default;return e.pagination.itemsPerPage=t.items_per_page,e.pagination.nextPageStartsAfter=t.next_page_starts_after,e},this.remapToPrivateLeagueById=function(t){var e=new u.default;return e.id=t.id,e.name=t.name,e.description=t.description,e.type=t.type,e.members=t.members,e.administrators=t.administrators,e.banned=t.banned,e.invites=t.invites,e.membersCount=t.members_count,e.usersCanInviteUsers=t.users_can_invite_users,e.invitationCode=t.invitation_code,e.templateId=t.template_id,e.pastTemplates=t.past_templates,e.pinnedPosts=t.pinned_posts,e.scoringStartsAt=t.scoring_starts_at,e},this.remapToMyPrivateLeagues=function(t){var e=new l.default;return e.id=t.id,e.name=t.name,e.description=t.description,e.type=t.type,e.administrators=t.administrators,e.banned=t.banned,e.invites=t.invites,e.membersCount=t.members_count,e.usersCanInviteUsers=t.users_can_invite_users,e.invitationCode=t.invitation_code,e.templateId=t.template_id,e.pastTemplates=t.past_templates,e.pinnedPosts=t.pinned_posts,e.scoringStartsAt=t.scoring_starts_at,e},this.remapToAcceptPrivateLeague=function(t){var e=new o.default;return e.profileId=t.profile_id,e.leagueId=t.league_id,e.message=t.message,e},this.remapToAcceptChallenge=function(t){var e=new a.default;return e.profileId=t.profile_id,e.challengeId=t.league_id,e.message=t.message,e},this.remapPredictions=function(e){return e.meta=t.remapMeta(e.meta),e.data=t.remapPredictionsData(e.data),e},this.remapMeta=function(t){var e=new s.default;return e.pagination.currentPage=t.pagination.current_page,e.pagination.itemsPerPage=t.pagination.items_per_page,e.pagination.numberOfPages=t.pagination.number_of_pages,e.pagination.totalItems=t.pagination.total_items,e},this.remapPredictionsData=function(t){return t.map((function(t){var e=new c.default;return e.predictionId=t.prediction_id,e.profileId=t.profile_id,e}))}}},2167:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.name="",this.description="",this.invitation_code="",this.template_id="",this.users_can_invite_users=!1,this.administrators=[],this.scoring_starts_at=""}},91796:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="PRIVATE",e}return i(e,t),e}(a(n(2167)).default);e.default=s},64584:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.name="",this.description="",this.invitation_code="",this.template_id="",this.users_can_invite_users=!1,this.administrators=[],this.pinned_posts=[],this.scoring_starts_at=""}},44823:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="PRIVATE",e}return i(e,t),e}(a(n(64584)).default);e.default=s},83281:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(84306));e.default=function(t){var e=this;this.privateLeaguesFacade=null,this.create=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.create(t)];case 1:return[2,e.sent()]}}))}))},this.update=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.update(t,n)];case 1:return[2,e.sent()]}}))}))},this.updateTemplate=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.updateTemplate(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyLeagues=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getMyLeagues(t)];case 1:return[2,e.sent()]}}))}))},this.invite=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.invite(t,n)];case 1:return[2,e.sent()]}}))}))},this.deleteInvitation=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.deleteInvitation(t,n)];case 1:return[2,e.sent()]}}))}))},this.accept=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.accept(t)];case 1:return[2,e.sent()]}}))}))},this.reject=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.reject(t)];case 1:return[2,e.sent()]}}))}))},this.banUsers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.banUsers(t,n)];case 1:return[2,e.sent()]}}))}))},this.unbanUsers=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.unbanUsers(t,n)];case 1:return[2,e.sent()]}}))}))},this.join=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.join(t)];case 1:return[2,e.sent()]}}))}))},this.leave=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.leave(t)];case 1:return[2,e.sent()]}}))}))},this.getMyLeaguesStandings=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getMyLeaguesStandings(t)];case 1:return[2,e.sent()]}}))}))},this.getInvitations=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getInvitations(t)];case 1:return[2,e.sent()]}}))}))},this.getReportedPosts=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getReportedPosts(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPredictions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.getPredictions(t,n)];case 1:return[2,e.sent()]}}))}))},this.moderatePost=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.privateLeaguesFacade.moderatePost(t,n)];case 1:return[2,e.sent()]}}))}))},this.privateLeaguesFacade=new s.default(t)}},42590:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(92962)),o=a(n(86409)),u=a(n(71259));e.default=function(t){var e=this;this.loyalty=null,this.profile=null,this.predictor=null,this.setTemplateModels=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.loyalty.getTemplates()];case 1:return e=n.sent(),t.templateModel=e.data.find((function(e){return e.id===t.templateId})),t.pastTemplates&&t.pastTemplates.length>0&&t.pastTemplates.forEach((function(t){t.model=e.data.find((function(e){return e.id===t.id}))})),[2]}}))}))},this.setTemplateModelsInLeagues=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return t.length?[4,this.loyalty.getTemplates()]:[2];case 1:return e=n.sent(),t.forEach((function(t){t.templateModel=e.data.find((function(e){return e.id===t.templateId})),t.pastTemplates&&t.pastTemplates.length>0&&t.pastTemplates.forEach((function(t){t.model=e.data.find((function(e){return e.id===t.id}))}))})),[2]}}))}))},this.setTemplateModelsFromLeagueModels=function(t,e){"PRIVATE_LEAGUE"!==e?t.forEach((function(t){t.templateModel=t.templateId===t.challengeModel.templateId?t.challengeModel.templateModel:t.challengeModel.pastTemplates.find((function(e){return e.id===t.templateId})).model})):t.forEach((function(t){t.templateModel=t.templateId===t.privateLeagueModel.templateId?t.privateLeagueModel.templateModel:t.privateLeagueModel.pastTemplates.find((function(e){return e.id===t.templateId})).model}))},this.setProfileModel=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.profile.getById(t.profileId).getInfo()];case 1:return e=n.sent(),t.profileModel=e,[2]}}))}))},this.setModelsForPredictions=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:return t.data.length?(e=t.data.map((function(t){return t.profileId})),n=t.data.map((function(t){return t.predictionId})),[4,this.getProfileModels(e)]):[3,3];case 1:return r=i.sent(),[4,this.getPredictionModels(n)];case 2:a=i.sent(),t.data.forEach((function(t){t.profileModel=r.find((function(e){return e.id===t.profileId})),t.predictionModel=a.find((function(e){return e.id===t.predictionId}))})),i.label=3;case 3:return[2,t]}}))}))},this.getProfileModels=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profile.getByIds(t)];case 1:return[2,e.sent()]}}))}))},this.getPredictionModels=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictor.getPredictionsByIds(t)];case 1:return[2,e.sent()]}}))}))},this.loyalty=new s.default(t),this.profile=new o.default(t),this.predictor=new u.default(t)}},64831:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=o(n(79072)),l=o(n(17232)),c=o(n(94268)),d=o(n(68097)),f=o(n(62535)),h=n(4021),p=n(94904),m=n(5318);e.default=function(t,e,n,o,v){var _=this;this.idsRemapper=null,this.profileHttps=null,this.profileService=null,this.localCache=null,this.profileFacade=null,this.ownProfile=null,this.modified=!1,this.expireAt=0,this.promises=[],this.isFetching=!1,this.configuration=null,this.getOwnProfile=function(){return i(_,void 0,void 0,(function(){var t,e,n;return a(this,(function(r){switch(r.label){case 0:return this.isFetching?(console.log("Another thread is fetching profile..."),[4,this.delay(100)]):[3,2];case 1:return r.sent(),[3,0];case 2:if(this.modified&&this.ownProfile)return console.log("Timestamp is less than 10 minutes OR profile is modifying "),[2,this.ownProfile];if(t=Math.floor(Date.now()/1e3),this.ownProfile&&!(this.expireAt<t))return[3,8];this.isFetching=!0,this.expireAt=Math.floor(Date.now()/1e3)+600,r.label=3;case 3:return r.trys.push([3,6,,7]),[4,this.clearAllProfileData()];case 4:return r.sent(),[4,this.profileFacade.getOwn()];case 5:return e=r.sent(),this.setOwnProfile(e),[3,7];case 6:throw n=r.sent(),this.isFetching=!1,n;case 7:return this.modified=!1,this.isFetching=!1,[2,this.ownProfile];case 8:return[2,this.ownProfile]}}))}))},this.delay=function(t){return new Promise((function(e){setTimeout(e,t)}))},this.setOwnProfile=function(t){_.ownProfile=t},this.getInfo=function(){return i(_,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),delete(e=JSON.parse(JSON.stringify(t))).interests,[2,e]}}))}))},this.showInterests=function(){return i(_,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.remapInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return i(_,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.showFullInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowers(t)];case 1:return[2,e.sent()]}}))}))},this.getFollowing=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowing(t)];case 1:return[2,e.sent()]}}))}))},this.follow=function(t){return i(_,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.follow(t)];case 1:return e=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,e]}}))}))},this.unfollow=function(t){return i(_,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.unfollow(t)];case 1:return e=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,e]}}))}))},this.getStats=function(){return i(_,void 0,void 0,(function(){var t;return a(this,(function(e){switch(e.label){case 0:return[4,this.clearAllProfileData()];case 1:return e.sent(),[4,this.profileFacade.getStats()];case 2:return t=e.sent(),[4,this.idsRemapper.remapProfileStats(t)];case 3:return[2,e.sent()]}}))}))},this.getBadges=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return[4,this.clearAllProfileData()];case 1:return e.sent(),[4,this.profileFacade.getBadges(t)];case 2:return[2,e.sent()]}}))}))},this.addInterestPromise=function(t){return i(_,void 0,void 0,(function(){var e,n,i;return a(this,(function(a){switch(a.label){case 0:return this.modified=!0,e=r({},t),[4,this.getOwnProfile()];case 1:return a.sent(),n=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(e)];case 2:return n=a.sent(),[3,4];case 3:n=e,a.label=4;case 4:return i=this.ownProfile.interests.filter((function(t){return t.id!==n.id||t.type!==n.type||t.source!==n.source})),this.ownProfile.interests=s([],i,!0),this.ownProfile.interests.push(n),[2,this]}}))}))},this.addInterest=function(t){return _.promises.push(_.addInterestPromise(t)),_},this.removeInterestPromise=function(t){return i(_,void 0,void 0,(function(){var e,n;return a(this,(function(i){switch(i.label){case 0:return this.modified=!0,e=r({},t),[4,this.getOwnProfile()];case 1:return i.sent(),n=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(e)];case 2:return n=i.sent(),[3,4];case 3:n=e,i.label=4;case 4:return this.ownProfile.interests=this.ownProfile.interests.filter((function(t){return t.id!==n.id||t.type!==n.type||t.source!==n.source})),[2,this]}}))}))},this.removeInterest=function(t){return _.promises.push(_.removeInterestPromise(t)),_},this.setBirthdatePromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.birthDate=t||null,[2,this]}}))}))},this.setBirthdate=function(t){return _.promises.push(_.setBirthdatePromise(t)),_},this.setGenderPromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.gender="male"===t||"female"===t?t:"unspecified",[2,this]}}))}))},this.setGender=function(t){return _.promises.push(_.setGenderPromise(t)),_},this.setNicknamePromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.nickname=t,[2,this]}}))}))},this.setNickname=function(t){return _.promises.push(_.setNicknamePromise(t)),_},this.setNamePromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),this.ownProfile.name=t,[2,this]}}))}))},this.setName=function(t){return _.promises.push(_.setNamePromise(t)),_},this.setCountryPromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),t&&!this.ownProfile.country?(this.ownProfile.country=new u.default,this.ownProfile.country.id=t):t&&this.ownProfile.country?this.ownProfile.country.id=t:this.ownProfile.country=null,[2,this]}}))}))},this.setCountry=function(t){return _.promises.push(_.setCountryPromise(t)),_},this.showFullnessProfile=function(){return i(_,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[2,this.profileFacade.showFullnessProfile(e)]}}))}))},this.setAvatarPromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:if(e.sent(),this.profileService.isAvatarValidURL(t))this.ownProfile.avatar=t;else{if("default"===this.configuration.errorHandlingMode)throw new d.default(h.ErrorCodes.BAD_METHOD_CALL,p.ErrorStatuses.INVALID_AVATAR,m.ErrorMessages.INVALID_AVATAR);if("standard"===this.configuration.errorHandlingMode)throw new f.default(h.ErrorCodes.BAD_METHOD_CALL,p.ErrorStatuses.INVALID_AVATAR,m.ErrorMessages.INVALID_AVATAR)}return[2,this]}}))}))},this.setAvatar=function(t){return _.promises.push(_.setAvatarPromise(t)),_},this.delete=function(){return i(_,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.profileHttps.deleteOwnProfile()];case 1:return t.sent(),[4,this.profileFacade.clearLocalStorageData()];case 2:return t.sent(),[2,!0]}}))}))},this.deleteData=function(){return i(_,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.profileHttps.deleteUserData()];case 1:return t.sent(),[4,this.profileFacade.clearLocalStorageData()];case 2:return t.sent(),[2,!0]}}))}))},this.setEmailPromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),"string"==typeof t&&t?this.ownProfile.email=t:console.warn("Wrong email argument: ".concat(t,". Will be ignored when updating profile")),[2,this]}}))}))},this.setEmail=function(t){return _.promises.push(_.setEmailPromise(t)),_},this.setPhoneCountryCodePromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),null===t||"string"==typeof t&&t?this.ownProfile.phoneCountryCode=t:console.warn("Wrong phoneCountryCode argument: ".concat(t,". Will be ignored when updating profile")),[2,this]}}))}))},this.setPhoneCountryCode=function(t){return _.promises.push(_.setPhoneCountryCodePromise(t)),_},this.setPhoneNumberPromise=function(t){return i(_,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return e.sent(),null===t||"string"==typeof t&&t?this.ownProfile.phoneNumber=t:console.warn("Wrong phoneNumber argument: ".concat(t,". Will be ignored when updating profile")),[2,this]}}))}))},this.setPhoneNumber=function(t){return _.promises.push(_.setPhoneNumberPromise(t)),_},this.update=function(){return i(_,void 0,void 0,(function(){var t,e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return 0===this.promises.length?[2,this.ownProfile]:[4,Promise.all(this.promises)];case 1:return a.sent(),[4,this.profileFacade.getOwn()];case 2:return t=a.sent(),[4,this.getOwnProfile()];case 3:return e=a.sent(),n=this.profileService.extractUpdatedProps(t,e),this.modified=!1,this.expireAt=0,Object.keys(n).length?[4,this.profileHttps.updateProfile(n)]:[3,6];case 4:return r=a.sent(),i=JSON.parse(JSON.stringify(r)),this.setOwnProfile(i),[4,this.localCache.setOwnProfile(i)];case 5:return a.sent(),delete r.interests,[2,r];case 6:return delete(s=JSON.parse(JSON.stringify(this.ownProfile))).interests,[2,s]}}))}))},this.clearAllProfileData=function(){return i(_,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.isNewProfileRequested()];case 1:return t.sent()?[4,this.profileFacade.clearLocalStorageData()]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},this.isNewProfileRequested=function(){return i(_,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return(t=this.profileHttps.extractUserIdFromToken())?this.ownProfile?[3,2]:[4,this.profileFacade.getOwnProfileFromCache()]:[2,!1];case 1:return(e=n.sent())&&Object.keys(e).length&&e.id!==t?[2,!0]:[2,!1];case 2:return this.ownProfile.id!==t?[2,!0]:[2,!1]}}))}))},this.configuration=t,this.idsRemapper=e,this.localCache=n,this.profileHttps=o,this.profileService=new c.default,this.profileFacade=new l.default(n,o,v)}},90642:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(17232));e.default=function t(e,n,a,o){var u=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.profileFacade=null,this.profileId="",this.localCache=null,this.getById=function(e){return new t(u.idsRemapper,u.localCache,u.profileHttps,u.activityHttps).setId(e)},this.setId=function(t){return u.profileId=t,u},this.getProfile=function(){return r(u,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getById(this.profileId)];case 1:return[2,t.sent()]}}))}))},this.getInfo=function(){return r(u,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getProfile()];case 1:return delete(t=e.sent()).interests,[2,t]}}))}))},this.showInterests=function(){return r(u,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.remapInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(u,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return t=n.sent(),e=JSON.parse(JSON.stringify(t)),[4,this.idsRemapper.showFullInterests(e.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(t){return r(u,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowers(t,this.profileId)];case 1:return[2,e.sent()]}}))}))},this.getFollowing=function(t){return r(u,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getFollowing(t,this.profileId)];case 1:return[2,e.sent()]}}))}))},this.showFullnessProfile=function(){return r(u,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.getProfile()];case 1:return t=e.sent(),[2,this.profileFacade.showFullnessProfile(t)]}}))}))},this.getStats=function(t){return r(u,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,this.activityHttps.getStats(this.profileId,t)];case 1:return e=n.sent(),[4,this.idsRemapper.remapProfileStats(e)];case 2:return[2,n.sent()]}}))}))},this.getBadges=function(){return r(u,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileHttps.getBadges(this.profileId)];case 1:return[2,t.sent()]}}))}))},this.idsRemapper=e,this.profileHttps=a,this.activityHttps=o,this.localCache=n,this.profileFacade=new s.default(n,a,o)}},17232:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(99037)),o=a(n(69523)),u=a(n(62535)),l=n(4021),c=n(94904),d=n(5318),f=a(n(68097));e.default=function(t,e,n,a){var h=this;this.profileHttps=null,this.activityHttps=null,this.errorHandlingMode=null,this.getOwn=function(){return r(h,void 0,void 0,(function(){var t,e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.getLocalStorageData("profile")];case 1:if((t=r.sent())&&Object.keys(t).length)return[2,JSON.parse(JSON.stringify(t))];r.label=2;case 2:return r.trys.push([2,5,,6]),[4,this.profileHttps.getProfile()];case 3:return e=r.sent(),[4,this.localCache.setOwnProfile(e)];case 4:return r.sent(),[2,e];case 5:throw n=r.sent(),console.warn("There was a problem retrieving your profile: ",n),n;case 6:return[2]}}))}))},this.getOwnProfileFromCache=function(){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.localCache.getOwnProfile()];case 1:return[2,t.sent()]}}))}))},this.updateOwnProfile=function(){return r(h,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,this.profileHttps.getProfile()];case 1:return t=n.sent(),[4,this.localCache.setOwnProfile(t)];case 2:return n.sent(),[2,t];case 3:throw e=n.sent(),console.warn("There was a problem retrieving your profile: ",e),e;case 4:return[2]}}))}))},this.getByIds=function(t,e,n){return r(h,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:if(t&&t.length>0&&e||!t&&0===t.length&&!e)throw new u.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_METHOD_CALL,d.ErrorMessages.INVALID_GET_PROFILES_METHOD_CALL);i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getProfiles(t,e,n)];case 2:return[2,i.sent()];case 3:throw r=i.sent(),console.warn("There was a problem retrieving the selected profiles: ".concat(t.join(",")," "),r),r;case 4:return[2]}}))}))},this.getById=function(t){return r(h,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem retrieving the selected profile: ".concat(t," "),e),e;case 3:return[2]}}))}))},this.getCountries=function(t){return r(h,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,[4,this.localCache.getProfileCountries()];case 1:if((e=i.sent())&&e.length>0)return[2,e];i.label=2;case 2:return i.trys.push([2,5,,6]),[4,this.profileHttps.getCountries(t)];case 3:return n=i.sent(),[4,this.localCache.setProfileCountries(n)];case 4:return i.sent(),[2,n];case 5:throw r=i.sent(),console.warn("There was a problem retrieving profile countries: ",r),r;case 6:return[2]}}))}))},this.getFollowers=function(t,e){return r(h,void 0,void 0,(function(){var n,r,a,s,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new o.default(t)),[4,this.profileHttps.getFollowers(t,e)];case 1:return n=i.sent(),(r=n.data.map((function(t){return t.followerId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return a=i.sent(),s=n.data.map((function(t){return a.forEach((function(e){t.followerId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=s,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your followers: ",u),u;case 5:return[2]}}))}))},this.getFollowing=function(t,e){return r(h,void 0,void 0,(function(){var n,r,a,s,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new o.default(t)),[4,this.profileHttps.getFollowing(t,e)];case 1:return n=i.sent(),(r=n.data.map((function(t){return t.followingId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return a=i.sent(),s=n.data.map((function(t){return a.forEach((function(e){t.followingId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=s,[2,n];case 3:return[2,n];case 4:throw u=i.sent(),console.warn("There was a problem retrieving your following profiles: ",u),u;case 5:return[2]}}))}))},this.follow=function(t){return r(h,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.follow(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem following profiles: ".concat(t.join(",")," "),e),e;case 3:return[2]}}))}))},this.unfollow=function(t){return r(h,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.unfollow(t)];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.warn("There was a problem unfollowing profiles: ".concat(t.join(",")," "),e),e;case 3:return[2]}}))}))},this.showFullnessProfile=function(t){var e=new s.default,n=0;return t.avatar&&(e.breakdown.addedAvatar.completed=!0,n+=e.breakdown.addedAvatar.percentage),t.birthDate&&(e.breakdown.addedBirthdate.completed=!0,n+=e.breakdown.addedBirthdate.percentage),t.country&&(e.breakdown.addedCountry.completed=!0,n+=e.breakdown.addedCountry.percentage),t.gender&&(e.breakdown.addedGender.completed=!0,n+=e.breakdown.addedGender.percentage),t.interests&&t.interests.length>0&&(t.interests.find((function(t){return"team"===t.type&&t.favourite}))&&(e.breakdown.teamFavourite.completed=!0,n+=e.breakdown.teamFavourite.percentage),t.interests.find((function(t){return"team"===t.type}))&&(e.breakdown.teamFollowed.completed=!0,n+=e.breakdown.teamFollowed.percentage),t.interests.find((function(t){return"player"===t.type&&t.favourite}))&&(e.breakdown.playerFavourite.completed=!0,n+=e.breakdown.playerFavourite.percentage),t.interests.find((function(t){return"player"===t.type}))&&(e.breakdown.playerFollowed.completed=!0,n+=e.breakdown.playerFollowed.percentage),t.interests.find((function(t){return"competition"===t.type&&t.favourite}))&&(e.breakdown.competitionFavourite.completed=!0,n+=e.breakdown.competitionFavourite.percentage),t.interests.find((function(t){return"competition"===t.type}))&&(e.breakdown.competitionFollowed.completed=!0,n+=e.breakdown.competitionFollowed.percentage)),e.totalPercentage=n,e},this.getStats=function(){return r(h,void 0,void 0,(function(){var t,e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.getLocalStorageData("statistics")];case 1:if((t=r.sent())&&Object.keys(t).length)return[2,JSON.parse(JSON.stringify(t))];r.label=2;case 2:return r.trys.push([2,5,,6]),[4,this.activityHttps.getStats()];case 3:return e=r.sent(),[4,this.localCache.setProfileStats(e)];case 4:return r.sent(),[2,e];case 5:throw n=r.sent(),console.warn("There was a problem retrieving own profile statistics: ",n),n;case 6:return[2]}}))}))},this.getBadges=function(t){return r(h,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:if(!t)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getBadges()];case 2:return[2,i.sent()];case 3:throw e=i.sent(),console.warn("There was a problem retrieving own profile badges: ",e),e;case 4:return[4,this.getLocalStorageData("badges")];case 5:if(n=i.sent())return[2,n];i.label=6;case 6:return i.trys.push([6,9,,10]),[4,this.profileHttps.getBadges()];case 7:return r=i.sent(),[4,this.localCache.setProfileBadges(r)];case 8:return i.sent(),[2,r];case 9:throw a=i.sent(),console.warn("There was a problem retrieving own profile badges: ",a),a;case 10:return[2]}}))}))},this.clearLocalStorageData=function(){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.localCache.setOwnProfile({})];case 1:return t.sent(),[4,this.localCache.setProfileStats({})];case 2:return t.sent(),[4,this.localCache.setProfileBadges(null)];case 3:return t.sent(),[2]}}))}))},this.collectLead=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(this.errorHandlingMode&&!t){if("standard"===this.errorHandlingMode)throw new u.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_METHOD_CALL,d.ErrorMessages.INVALID_COLLECT_LEAD_METHOD_CALL);throw new f.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_METHOD_CALL,d.ErrorMessages.INVALID_COLLECT_LEAD_METHOD_CALL)}return[4,this.profileHttps.collectLead(t)];case 1:return[2,e.sent()]}}))}))},this.checkFollowStatus=function(t){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(!t||!Array.isArray(t)||0===t.length){if("standard"===this.errorHandlingMode)throw new u.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_METHOD_CALL,d.ErrorMessages.INVALID_OR_EMPTY_IDS);throw new f.default(l.ErrorCodes.BAD_METHOD_CALL,c.ErrorStatuses.INVALID_METHOD_CALL,d.ErrorMessages.INVALID_OR_EMPTY_IDS)}return[4,this.profileHttps.checkFollowStatus(t)];case 1:return[2,e.sent()]}}))}))},this.getLocalStorageData=function(t){return r(h,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return e=Math.floor(Date.now()/1e3),[4,this.localCache.getExpiration("profile",t)];case 1:switch(n=r.sent(),t){case"profile":return[3,2];case"statistics":return[3,4];case"badges":return[3,6]}return[3,8];case 2:return n>e?[4,this.localCache.getOwnProfile()]:[3,4];case 3:case 5:case 7:return[2,r.sent()];case 4:return n>e?[4,this.localCache.getProfileStats()]:[3,6];case 6:return n>e?[4,this.localCache.getProfileBadges()]:[3,8];case 8:return[2,null]}}))}))},this.localCache=t,this.profileHttps=e,this.activityHttps=n,this.errorHandlingMode=a}},90133:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.email=null,e.phoneNumber=null,e.phoneCountryCode=null,e.preferences=null,e}return i(e,t),e}(a(n(23546)).default);e.default=s},69523:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){var e=this;this.limit=0,this.startAfter=null,this.constructFilterUrl=function(){var t="";return e.limit&&(t+="&",t+="limit=".concat(e.limit)),e.startAfter&&(t+="&",t+="start_after=".concat(e.startAfter)),t},this.limit=t.limit?t.limit:20,this.startAfter=t.startAfter?t.startAfter:null}},28212:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.followsMe=[],this.iFollow=[],this.followsMeBack=[]}},54782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.avatar=null,this.followerId=null,this.name=null,this.nickname=null,this.profileId=null}},41712:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profile_ids=[]}},93106:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.avatar=null,this.followingId=null,this.name=null,this.nickname=null,this.profileId=null}},25156:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.model=null,e}return i(e,t),e}(a(n(45867)).default);e.default=s},76620:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(47312));e.default=function(){this.teamFollowed=new i.default(10),this.teamFavourite=new i.default(15),this.playerFollowed=new i.default(10),this.playerFavourite=new i.default(10),this.competitionFollowed=new i.default(10),this.competitionFavourite=new i.default(5),this.addedBirthdate=new i.default(10),this.addedGender=new i.default(10),this.addedCountry=new i.default(10),this.addedAvatar=new i.default(10)}},47312:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){this.completed=!1,this.percentage=t}},99037:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(76620));e.default=function(){this.breakdown=new i.default}},45867:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.source="",this.type="",this.favourite=!1}},84440:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.leadId=null,this.profileId=null,this.firstName=null,this.lastName=null,this.fullName=null,this.email=null,this.gender=null,this.country=null,this.phoneCountryCode=null,this.phoneNumber=null,this.campaignId=null,this.campaignName=null,this.contentType=null,this.contentId=null,this.contentName=null,this.customFields=null}},31488:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.firstName=null,this.lastName=null,this.fullName=null,this.email=null,this.gender=null,this.country=null,this.phoneCountryCode=null,this.phoneNumber=null,this.campaignId=null,this.campaignName=null,this.contentType=null,this.contentId=null,this.contentName=null,this.customFields=null}},79072:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.assets=null}},23546:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.nickname=null,this.avatar=null,this.gender=null,this.country=null,this.birthDate=null,this.verified=!1,this.staffMember=!1,this.anonymous=!1,this.disabled=!1,this.interests=[],this.followingCount=0,this.followersCount=0}},66277:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(81553)),a=r(n(54782)),s=r(n(28212));e.default=function(){var t=this;this.followersFromResponse=function(e){var n=new i.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapResponse(e)})),n},this.followStatusFromResponse=function(t){var e=new s.default;return e.iFollow=t.i_follow,e.followsMe=t.follows_me,e.followsMeBack=t.follows_me_back,e},this.remapResponse=function(t){var e=new a.default;return e.avatar=t.avatar,e.followerId=t.follower_id,e.name=t.name,e.profileId=t.profile_id,e}}},38673:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(81553)),a=r(n(93106));e.default=function(){var t=this;this.followResponse=function(e){return e.map((function(e){return t.remapResponse(e)}))},this.followingFromResponse=function(e){var n=new i.default;return n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.data=e.data.map((function(e){return t.remapResponse(e)})),n},this.remapResponse=function(t){var e=new a.default;return e.avatar=t.avatar,e.followingId=t.following_id,e.name=t.name,e.profileId=t.profile_id,e.nickname=t.nickname,e}}},97627:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(84440)),a=function(){function t(){}return t.prototype.toRequest=function(t){return{first_name:t.firstName||null,last_name:t.lastName||null,full_name:t.fullName||null,email:t.email||null,gender:t.gender||null,country:t.country||null,phone_country_code:t.phoneCountryCode||null,phone_number:t.phoneNumber||null,campaign_id:t.campaignId||null,campaign_name:t.campaignName||null,content_type:t.contentType||null,content_id:t.contentId||null,content_name:t.contentName||null,custom_fields:t.customFields||null}},t.prototype.fromResponse=function(t){var e=new i.default;return e.leadId=t.lead_id,e.profileId=t.profile_id,e.firstName=t.first_name,e.lastName=t.last_name,e.fullName=t.full_name,e.email=t.email,e.gender=t.gender,e.country=t.country,e.phoneCountryCode=t.phone_country_code,e.phoneNumber=t.phone_number,e.campaignId=t.campaign_id,e.campaignName=t.campaign_name,e.contentId=t.content_id,e.contentType=t.content_type,e.contentName=t.content_name,e.customFields=t.custom_fields,e},t}();e.default=a},441:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(23546)),a=r(n(90133));e.default=function(){var t=this;this.profilesFromResponse=function(e){return e?e.map((function(e){return t.publicProfileFromResponse(e)})):null},this.fullProfileFromResponse=function(e){var n=new a.default;return n.id=e.id,n.name=e.name,n.email=e.email,n.nickname=e.nickname,n.avatar=e.avatar,n.gender=e.gender,n.country=e.country,n.birthDate=e.birth_date,n.phoneCountryCode=e.phone_country_code,n.phoneNumber=e.phone_number,n.verified=e.verified,n.staffMember=e.staff_member,n.anonymous=e.anonymous,n.disabled=e.disabled,n.interests=e.interests?e.interests:[],n.preferences=e.preferences?t.remapPreferences(e.preferences):[],n.followingCount=e.following_count,n.followersCount=e.followers_count,n},this.publicProfileFromResponse=function(t){var e=new i.default;return e.id=t.id,e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar,e.gender=t.gender,e.country=t.country,e.birthDate=t.birth_date,e.verified=t.verified,e.staffMember=t.staff_member,e.anonymous=t.anonymous,e.disabled=t.disabled,e.interests=t.interests?t.interests:[],e.followingCount=t.following_count,e.followersCount=t.followers_count,e},this.remapPreferences=function(t){return t.map((function(t){return{preferenceId:t.preference_id,categories:t.categories,source:t.source}}))}}},61758:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.achievedAt=""}},86635:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participationCount=null,this.points=null}},13009:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.totalPoints=null,this.postPoints=null,this.postsMade=null,this.reactionPoints=null,this.reactionCount=null}},57165:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participationCount=null}},3621:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participations=0,this.points=0}},5490:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(3621)),a=r(n(81342));e.default=function(){this.single=new a.default,this.topX=new i.default,this.matchQuiz=new i.default}},81316:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(86635)),a=r(n(13009)),s=r(n(57165)),o=r(n(5490)),u=r(n(75123));e.default=function(){this.successRates=new u.default,this.predictions=new o.default,this.tiers=[],this.badges=[],this.discussions=new a.default,this.classicQuizzes=new i.default,this.eitherOr=new s.default}},53195:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityId="",this.entityType="",this.entitySource="",this.model=null,this.predictionsMade=0,this.correct=0,this.points=0}},81342:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(63087));e.default=function(){this.predictionsMade=0,this.correct=0,this.points=0,this.breakdown=new i.default}},9826:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.model=null}},75123:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},63087:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.footballCompetitions=[],this.footballTeams=[]}},86409:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(84275)),o=a(n(88900)),u=a(n(17232)),l=a(n(64831)),c=a(n(90642)),d=a(n(4289)),f=a(n(60595)),h=a(n(71022)),p=a(n(14912)),m=a(n(78358));e.default=function(t){var e=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.footballHttps=null,this.footballFacade=null,this.idMapping=null,this.localCache=null,this.profileFacade=null,this.ownProfileBuilder=null,this.profileBuilder=null,this.getOwn=function(){return e.ownProfileBuilder},this.getById=function(t){return e.profileBuilder.getById(t)},this.getCountries=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getCountries(t)];case 1:return[2,e.sent()]}}))}))},this.getByIds=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getByIds(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.collectLead=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.collectLead(t)];case 1:return[2,e.sent()]}}))}))},this.checkFollowStatus=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.checkFollowStatus(t)];case 1:return[2,e.sent()]}}))}))},this.getOwnStats=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.ownProfileBuilder.getStats()];case 1:return[2,t.sent()]}}))}))},this.getStats=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileBuilder.getById(t).getStats(n)];case 1:return[2,e.sent()]}}))}))},this.getOwnBadges=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.ownProfileBuilder.getBadges()];case 1:return[2,t.sent()]}}))}))},this.getBadges=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileBuilder.getById(t).getBadges()];case 1:return[2,e.sent()]}}))}))},this.profileHttps=new s.default(t),this.activityHttps=new h.default(t),this.footballHttps=new f.default(t),this.idMapping=new o.default(t),this.localCache=(new m.default).createLocalCacheInstance(t.idSchema),this.footballFacade=new d.default(t,this.localCache,this.footballHttps,this.idMapping),this.profileFacade=new u.default(this.localCache,this.profileHttps,this.activityHttps,t.errorHandlingMode),this.idsRemapper=new p.default(t,this.footballFacade),this.ownProfileBuilder=new l.default(t,this.idsRemapper,this.localCache,this.profileHttps,this.activityHttps),this.profileBuilder=new c.default(this.idsRemapper,this.localCache,this.profileHttps,this.activityHttps)}},94268:function(t,e){"use strict";var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.extractUpdatedProps=function(e,n){var r=["name","nickname","gender","avatar","email"],i={};return Object.keys(e).forEach((function(a){if(r.includes(a)&&e[a]!==n[a])i[a]=n[a];else if("phoneCountryCode"===a)e[a]&&null===n[a]?i.phone_country_code=null:(null===e[a]&&n[a]||e[a]!==n[a])&&(i.phone_country_code=n[a]);else if("phoneNumber"===a)(e[a]&&null===n[a]||null===e[a]&&n[a]||e[a]!==n[a])&&(i.phone_number=n[a]);else if("birthDate"===a)(null===n[a]||null===e[a]&&n[a]||e[a]!==n[a])&&(i.birth_date=n[a]);else if("country"===a)null===n[a]?i.country_id=n[a]:(null===e[a]&&n[a]||e[a].id!==n[a].id)&&(i.country_id=n[a].id);else if("interests"===a){var s=e[a],o=n[a];o.length&&t.isNewInterest(s,o)?i[a]=t.updateInterests(s,o):!o.length&&s.length?i[a]=o:s.length===o.length||t.isNewInterest(s,o)||(i[a]=o)}})),i},this.updateInterests=function(e,r){if(e.length===r.length){var i=t.extractSameAndNewInterests(e,r),a=i[0],s=i[1];return n(n([],s,!0),a,!0)}return r},this.isNewInterest=function(e,n){var r=!1;return t.extractSameAndNewInterests(e,n)[0].length?r=!0:r},this.extractSameAndNewInterests=function(t,e){var n=e.filter((function(e){return t.some((function(t){return e.id===t.id&&e.type===t.type&&e.source===t.source&&e.favourite===t.favourite}))}));return[e.filter((function(e){return!t.some((function(t){return e.id===t.id&&e.type===t.type&&e.source===t.source&&e.favourite===t.favourite}))})),n]},this.isAvatarValidURL=function(t){try{return new URL(t),!0}catch(t){return!1}}}},31267:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.KEY_PREFIX="fu-progress-",this.get=function(e,n){var r=localStorage.getItem("".concat(t.KEY_PREFIX).concat(e,"-").concat(n));return r?JSON.parse(r):r},this.set=function(e,n,r){return localStorage.setItem("".concat(t.KEY_PREFIX).concat(e,"-").concat(n),JSON.stringify(r)),JSON.stringify(r)},this.delete=function(e,n){localStorage.removeItem("".concat(t.KEY_PREFIX).concat(e,"-").concat(n))}}},58298:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(91450)),o=a(n(86409)),u=a(n(46914)),l=a(n(1117)),c=a(n(95018));e.default=function(t){var e=this;this.https=null,this.profile=null,this.validator=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return t&&(t=new u.default(t)),[4,this.https.getStandingsGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.getStandingGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(n),[4,this.https.makeStandingGamePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.validator.validatePrediction(a),[4,this.https.updateStandingGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionForUser=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.https.getStandingGamePredictionsForUser(t,n,a)];case 1:e=i.sent(),r=null,i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.profile.getById(n).getInfo()];case 3:return r=i.sent(),[3,5];case 4:return s=i.sent(),console.error(s),[3,5];case 5:return e.data.forEach((function(t){t.profileModel=r})),[2,e]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,s;return i(this,(function(i){switch(i.label){case 0:return n&&(n=new l.default(n)),[4,this.https.getStandingGameRankings(t,n,a)];case 1:return e=i.sent(),r=e.data.map((function(t){return t.profileId})),s=[],r.length>0?[4,this.profile.getByIds(r)]:[3,3];case 2:s=i.sent(),e.data=e.data.map((function(t){return t.profileModel=s.find((function(e){return e.id===t.profileId}))||null,t})),i.label=3;case 3:return[2,e]}}))}))},this.https=new s.default(t),this.profile=new o.default(t),this.validator=new c.default(t.errorHandlingMode)}},1117:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e}(a(n(64800)).default);e.default=s},46914:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(64800)),o=n(40853),u=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.sortOrder=null,n.gameIds=null,n.status=(null==e?void 0:e.status)||null,n.sortOrder=(null==e?void 0:e.sortOrder)||null,n.gameIds=(null==e?void 0:e.gameIds)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.status&&Object.values(o.GameStatusEnum).includes(this.status)?(e+="&",e+="status=".concat(this.status)):null!==this.status&&console.warn("The filter 'status' has the following INVALID value: ".concat(this.status,". It will be not passed as a query param in the URL. For more information visit our documentation.")),!this.sortOrder||"asc"!==this.sortOrder&&"desc"!==this.sortOrder&&"ASC"!==this.sortOrder&&"DESC"!==this.sortOrder?null!==this.sortOrder&&console.warn("The filter 'sortOrder' has the following INVALID value: ".concat(this.sortOrder,". It will be not passed as a query param in the URL. For more information visit our documentation.")):(e+="&",e+="sort_order=".concat(this.sortOrder)),this.gameIds&&Array.isArray(this.gameIds)&&this.gameIds.length>0?(e+="&",e+="game_ids=".concat(this.gameIds.join(","))):null!==this.gameIds&&console.warn("The filter 'gameIds' has the following INVALID value: ".concat(this.gameIds,". It will be not passed as a query param in the URL. For more information visit our documentation.")),e},e}(s.default);e.default=u},83201:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.StandingGamePredictionStatusEnum=void 0,function(t){t.ACTIVE="ACTIVE",t.WON="WON",t.LOST="LOST",t.PARTIALLY_WON="PARTIALLY_WON",t.CANCELED="CANCELED"}(n=e.StandingGamePredictionStatusEnum||(e.StandingGamePredictionStatusEnum={}));e.default=function(){this.id="",this.profileId="",this.profileModel=null,this.total=0,this.gameId="",this.totalPoints=null,this.gamePoints=null,this.bonusPoints=null,this.position=null,this.status=n.ACTIVE,this.standing=[],this.createdAt="",this.updatedAt=""}},14148:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},86075:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(78923)),a=r(n(12934)),s=r(n(27909)),o=r(n(7451)),u=r(n(43807)),l=r(n(83201)),c=r(n(72911)),d=r(n(14148));e.default=function(){var t=this;this.remapBracketGames=function(e){var n=new s.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapStandingGameById(e)})),n},this.remapStandingGameById=function(e){var n=new a.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.rules=e.rules,n.customFields=e.custom_fields,n.images=e.images,n.type=e.type,n.status=e.status,n.points=e.points,n.related=e.related?t.remapRelated(e.related):e.related,n.predictionsCutoff=e.predictions_cutoff,n.meta=e.meta&&e.meta.participants?t.remapStandingGameMeta(e.meta):e.meta,n.outcomeCount=e.outcome_count,n.outcome=e.outcome,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapPrediction=function(t){var e=new l.default;return e.id=t.id,e.profileId=t.profile_id,e.gameId=t.game_id,e.totalPoints=t.total_points,e.gamePoints=t.game_points,e.bonusPoints=t.bonus_points,e.position=t.position,e.status=t.status,e.standing=t.standing,e.total=t.total,e.createdAt=t.created_at,e.updatedAt=t.updated_at,e},this.remapPredictionsForUser=function(e){var n=new c.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRankings=function(e){var n=new d.default;return n.meta.pagination.itemsPerPage=e.meta.pagination.items_per_page,n.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,n.data=e.data.map((function(e){return t.remapPrediction(e)})),n},this.remapRelated=function(t){return t.map((function(t){var e=new i.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},this.remapStandingGameMeta=function(t){var e=new o.default;return e.participants=t.participants.map((function(t){var e=new u.default;return e.id=t.id,e.name=t.name,e.group=t.group,e.image=t.image,e.undecided=t.undecided,e})),e}}},7451:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.participants=[]}},43807:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.group=null,this.image=null,this.undecided=!1}},12934:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(7451));e.default=function(){this.id=null,this.title=null,this.description=null,this.rules=null,this.customFields=null,this.images=null,this.type="STANDING",this.status=null,this.points=null,this.related=[],this.predictionsCutoff="",this.meta=new i.default,this.outcomeCount=null,this.outcome=[],this.createdAt=null,this.updatedAt=null}},72911:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},27909:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},50808:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(58298));e.default=function(t){var e=this;this.facade=null,this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.makePrediction=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.makePrediction(t,n)];case 1:return[2,e.sent()]}}))}))},this.updatePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.updatePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictionForUser=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getGamePredictionForUser(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getRankings=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getRankings(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},95018:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4021),o=n(94904),u=n(5318),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.validatePrediction=function(t){t&&Array.isArray(t)&&0!==t.length&&!t.some((function(t){return!t}))||e.throwException(s.ErrorCodes.BAD_METHOD_CALL,o.ErrorStatuses.INVALID_METHOD_CALL,u.ErrorMessages.INVALID_STANDING_PREDICTION_ARGUMENT)},e}return i(e,t),e}(a(n(16198)).default);e.default=l},40853:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.GameStatusEnum=void 0,(n=e.GameStatusEnum||(e.GameStatusEnum={})).OPEN="OPEN",n.LIVE="LIVE",n.PENDING="PENDING",n.CANCELED="CANCELED",n.CLOSED="CLOSED",n.SETTLED="SETTLED"},89502:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var l=n(14946),c=u(n(52793)),d=u(n(88900)),f=u(n(25013)),h=n(40853),p=u(n(7299)),m=u(n(81553)),v=u(n(1399)),_=u(n(97782)),y=a(n(47686)),g=u(n(12310)),b=u(n(68097)),w=n(94904),E=n(5318),I=n(4021),M=u(n(62535));e.default=function(t){var e=this;this.idMapping=null,this.predictorHttps=null,this.predictorService=null,this.predictorValidator=null,this.clientHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return s(e,void 0,void 0,(function(){var t;return o(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(y.FeatureConfigEnum.TOP_X)];case 1:return t=e.sent(),this.idMapping.idSchema===l.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.getGames=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("TOP_X",t),[4,this.predictorHttps.getGames(e,n)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGamesNoRemap=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return n=n||!1,e=this.predictorService.initGameFilters("TOP_X",t),[4,this.predictorHttps.getGamesNoRemap(e,n)];case 1:return[2,r.sent()]}}))}))},this.getGameById=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return n=n||!1,[4,this.predictorHttps.getGameById(t,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,n,r){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return r=r||!1,n&&(n.type&&delete n.type,n.status&&delete n.status,n=new _.default(n)),[4,this.predictorHttps.getGamePredictions(t,r,n)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,r){return s(e,void 0,void 0,(function(){var e;return o(this,(function(i){switch(i.label){case 0:return r=r||!1,n&&(n=new p.default(n)),[4,this.predictorHttps.getGameResults(t,r,n)];case 1:return e=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,i.sent()]}}))}))},this.getCurrentGameResults=function(t){return s(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return t=t||!1,(e=new p.default(null)).status=h.GameStatusEnum.OPEN,e.type="TOP_X",[4,this.predictorHttps.getGames(e,t)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,t)];case 2:return[2,i.sent().data[0]]}}))}))},this.play=function(t){return s(e,void 0,void 0,(function(){var e,n,r,i,a=this;return o(this,(function(s){switch(s.label){case 0:return e=new v.default(t),(e=this.predictorValidator.validateBodyFields("TOP_X",e)).fixtures=e.fixtures.map((function(t){return a.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value)})),this.idMapping.idSchema===l.IdSchemaEnum.NATIVE?[3,2]:(n=[],e.fixtures.forEach((function(t){return n.push(t.matchId)})),[4,this.predictorService.remapMatchIdToNative(n)]);case 1:r=s.sent(),e.fixtures.forEach((function(t){return t.matchId=r.shift()})),s.label=2;case 2:return[4,this.predictorHttps.makeFootballPrediction(e)];case 3:return(i=s.sent()).fixtures.forEach((function(t){t.matchId=t.matchModel.id})),[2,i]}}))}))},this.delete=function(t){return s(e,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return s(e,void 0,void 0,(function(){var e,r,i,a,s,u;return o(this,(function(o){switch(o.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),n=n||!1,e=this.predictorService.initGameTypePredictions("TOP_X",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(e)];case 1:return(i=o.sent()).data.length>0?(i.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),a=(null==t?void 0:t.limit)?{limit:t.limit}:null,s=this.predictorService.initGameFilters("TOP_X",a,r),[4,this.predictorHttps.getUserGameEditions(s,n)]):[3,4];case 2:return u=o.sent(),[4,this.predictorService.addPredictionProp(i,u)];case 3:return[2,o.sent()];case 4:return[2,new m.default]}}))}))},this.getMyGamePrediction=function(t){return s(e,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return e=new _.default({gameIds:[t]}),[4,this.predictorHttps.getMyPredictions(e)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(e){return e.gameInstanceId===t}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a,s,u,l;return o(this,(function(o){switch(o.label){case 0:return n&&n.limit&&this.validateLimitFilterOnGames(n.limit),r=r||!1,e=this.predictorService.initGameTypePredictions("TOP_X",n),i=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,e)];case 1:return(a=o.sent()).data.length>0?(a.data.forEach((function(t){t.game_instance_id&&i.push(t.game_instance_id)})),s=(null==n?void 0:n.limit)?{limit:n.limit}:null,u=this.predictorService.initGameFilters("TOP_X",s,i),[4,this.predictorHttps.getUserGameEditions(u,r)]):[3,4];case 2:return l=o.sent(),[4,this.predictorService.addPredictionProp(a,l)];case 3:return[2,o.sent()];case 4:return[2,new m.default]}}))}))},this.getUserGamePrediction=function(t,n,r){return s(e,void 0,void 0,(function(){var e,i,a;return o(this,(function(s){switch(s.label){case 0:return r=r||!1,e=new _.default({gameIds:[n]}),[4,this.predictorHttps.getUserPredictions(t,r,e)];case 1:return(i=s.sent()).data.length>0?[2,(a=i.data.filter((function(t){return t.gameInstanceId===n}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,n){return s(e,void 0,void 0,(function(){var e;return o(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,n)];case 1:return e=r.sent(),[4,this.predictorService.completeGameMarketResults(e,"TOP_X")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t,n){return s(e,void 0,void 0,(function(){var e,r;return o(this,(function(i){switch(i.label){case 0:return[4,this.predictorHttps.getContestWinners(t,n)];case 1:return e=i.sent(),[4,this.getGameById(t)];case 2:return r=i.sent(),e.contestModel=r,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===e.errorHandlingMode&&t>50)throw new b.default(I.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,E.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===e.errorHandlingMode&&t>50)throw new M.default(I.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,E.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED)},this.idMapping=new d.default(t),this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new g.default(t.errorHandlingMode),this.predictorHttps=new c.default(t),this.predictorService=new f.default(t,this.idMapping),this.clientHttps=new y.default(t)}},19013:function(t,e){"use strict";var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){var t=this;this.findLastGame=function(t){if(!Array.isArray(t)||0===t.length)return null;var e=t.filter((function(t){return"SETTLED"===t.status})).sort((function(t,e){return new Date(e.predictionsCutoff).getTime()-new Date(t.predictionsCutoff).getTime()}));if(e.length>0)return e[0];var n=new Date,r=t.filter((function(t){return new Date(t.predictionsCutoff)<n})).sort((function(t,e){return new Date(e.predictionsCutoff).getTime()-new Date(t.predictionsCutoff).getTime()}));return r.length>0?r[0]:null},this.findNextGame=function(e){if(!Array.isArray(e)||0===e.length)return null;var r=t.findCurrentGame(e);if(!r)return null;var i=n([],e,!0).sort((function(t,e){return new Date(t.predictionsCutoff).getTime()-new Date(e.predictionsCutoff).getTime()})),a=new Date(r.predictionsCutoff).getTime();return i.find((function(t){return new Date(t.predictionsCutoff).getTime()>a}))||null},this.findCurrentGame=function(t){if(!Array.isArray(t)||0===t.length)return null;var e=t.find((function(t){return"LIVE"===t.status}));if(e)return e;var n=t.find((function(t){return"OPEN"===t.status}));if(n)return n;var r=new Date;return t.filter((function(t){return new Date(t.predictionsCutoff)>r})).sort((function(t,e){return new Date(t.predictionsCutoff).getTime()-new Date(e.predictionsCutoff).getTime()}))[0]||null}}},91180:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.clientId=null,this.minFixtures=null,this.maxFixtures=null,this.competitionsWhitelist=null,this.authRequirement=null}},7482:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36899));e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new i.default}},15967:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(36899)),a=r(n(13381));e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new i.default,this.prediction=new a.default}},66247:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.adContent=null,e}return i(e,t),e}(a(n(63751)).default);e.default=s},36890:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.userId=null,this.points=null,this.results=[],this.tiebreaker=null}},56160:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchModel=null,this.outcome=null}},7299:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(64800)),o=n(40853),u=function(t){function e(e){var n=t.call(this,e)||this;return n.status=null,n.type=null,n.gameIds=null,n.sortOrder=null,n.constructFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(n);return n.status&&Object.values(o.GameStatusEnum).includes(n.status)&&(e+="&",e+="status=".concat(n.status)),n.type&&(e+="&",e+="type=".concat(n.type)),n.gameIds&&n.gameIds.length>0&&(e+="&",e+="game_ids=".concat(n.gameIds.join(","))),n.sortOrder&&(e+="&",e+="sort_order=".concat(n.sortOrder)),e},n.status=(null==e?void 0:e.status)||null,n.type=(null==e?void 0:e.type)||null,n.gameIds=(null==e?void 0:e.gameIds)||null,n.sortOrder=(null==e?void 0:e.sortOrder)||null,n}return i(e,t),e}(s.default);e.default=u},63751:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439)),a=r(n(64916));e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.authRequirement=null,this.scheduleOpenAt=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new a.default,this.participantsCount=0,this.related=[],this.excludedProfileIds=null,this.rules=null,this.labels=null,this.customFields=null,this.branding=null,this.flags=null,this.images=new i.default,this.createdAt=null,this.updatedAt=null}},4780:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(7482)),o=a(n(38410)),u=a(n(15967)),l=a(n(36890)),c=a(n(56160)),d=a(n(63751)),f=a(n(87243)),h=a(n(68950)),p=a(n(97640)),m=a(n(81553)),v=a(n(30670)),_=n(27974),y=a(n(64916)),g=a(n(21784)),b=a(n(60824)),w=a(n(36899)),E=a(n(66247)),I=a(n(16692)),M=n(91287),O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapPaginatedGames=function(t){var n=new m.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapGamesListResponse(t)})),n},e.remapGamesListResponse=function(t){var n=new d.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.authRequirement=t.auth_requirement||null,n.scheduleOpenAt=t.schedule_open_at,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):[],n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.labels=t.labels,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.flags=t.flags,n.images=t.images,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapGameByIdResponse=function(t){var n=new E.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.authRequirement=t.auth_requirement||null,n.scheduleOpenAt=t.schedule_open_at,n.predictionsCutoff=t.predictions_cutoff,n.fixtures=t.fixtures.map((function(t){return e.remapFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):[],n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.adContent=t.ad_content,n.labels=t.labels,n.customFields=t.custom_fields,n.branding=t.branding?e.remapBranding(t.branding):null,n.images=t.images,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapFixturesResponse=function(t){var e=new s.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status?t.match_status.type:null,e.matchStatus.subType=t.match_status?t.match_status.sub_type:null,e},e.remapPaginatedUserTopXEditions=function(t){var n=new m.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapUserTopXEditionsResponse(t)})),n},e.remapUserTopXEditionsResponse=function(t){var n=new h.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.authRequirement=t.auth_requirement||null,n.predictionsCutoff=t.predictions_cutoff,n.scheduleOpenAt=t.schedule_open_at,n.fixtures=t.fixtures.map((function(t){return e.remapTopXFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):[],n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.images=t.images,n.branding=t.branding?e.remapBranding(t.branding):null,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapTopXFixturesResponse=function(t){var e=new u.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status?t.match_status.type:null,e.matchStatus.subType=t.match_status?t.match_status.sub_type:null,e},e.remapPaginatedUserMathQuizEditions=function(t){var n=new m.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapUserMatchQuizEditionsResponse(t)})),n},e.remapUserMatchQuizEditionsResponse=function(t){var n=new f.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,n.authRequirement=t.auth_requirement||null,n.predictionsCutoff=t.predictions_cutoff,n.scheduleOpenAt=t.schedule_open_at,n.fixtures=t.fixtures.map((function(t){return e.remapMatchQuizFixturesResponse(t)})),n.tiebreaker=t.tiebreaker?e.remapTimeTiebreaker(t.tiebreaker.time_tiebreaker):null,n.participantsCount=t.participants_count,n.related=t.related?e.remapRelated(t.related):[],n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.images=t.images,n.branding=t.branding?e.remapBranding(t.branding):null,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapMatchQuizFixturesResponse=function(t){var e=new o.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status?t.match_status.type:null,e.matchStatus.subType=t.match_status?t.match_status.sub_type:null,e},e.remapPaginatedGameResults=function(t){var n=new m.default;return n.meta.pagination.nextPageStartsAfter=t.meta.pagination.next_page_starts_after,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.data=t.data.map((function(t){return e.remapGameResults(t)})),n},e.remapGameResults=function(t){var n=new l.default;return n.userId=t.user_id,n.points=t.points?t.points:0,n.results=t.results.map((function(t){return e.remapResults(t)})),n.tiebreaker=t.tiebreaker?e.remapTiebreaker(t.tiebreaker):null,n},e.remapGameMarketsResults=function(t){var n=new v.default;return n.gameId=t.game_id,n.results=e.remapMarketsResults(t.results),n.tieBreakers=t.tie_breakers?e.remapTieBreakers(t.tie_breakers):null,n},e.remapContestWinners=function(t){var n=new g.default;return n.contestId=t.contest_id,n.contestType=t.contest_type,n.description=t.description,n.userList=t.user_list?t.user_list.map((function(t){return e.remapUserListWinners(t)})):null,n},e.remapUserListWinners=function(t){var e=new b.default;return e.position=t.position,e.profileId=t.profile_id,e.note=t.note,e.tags=t.tags,e},e.remapTieBreakers=function(t){var e={goldenGoals:[]};return e.goldenGoals=t.golden_goals.map((function(t){return{minute:t.minute,matchId:t.match_id,matchModel:null,playerId:t.player_id,playerModel:null,goalType:t.goal_type}})),e},e.remapMarketsResults=function(t){var n=[];return t.forEach((function(t){var r={matchId:t.match_id,market:t.market,result:e.remapMarketResult(t.market,t.result),matchModel:null,playerModels:[],matchStatus:e.remapMarketsResultsMatchStatus(t.match_status)};n.push(e.deleteUnusefulField(r))})),n},e.remapMarketsResultsMatchStatus=function(t){var e=new w.default;return t&&(e.type=t.type,e.subType=t.sub_type),e},e.remapMarketResult=function(t,e){return _.endMarkMarkets.includes(t)?e[0]:_.playerMarkets.includes(t)?e:"true"===e[0]||"false"!==e[0]&&void 0},e.deleteUnusefulField=function(t){return _.playerMarkets.includes(t.market)&&!e.isPlayerMarketWithNoResult(t.market,t.result)||delete t.playerModels,t},e.isPlayerMarketWithNoResult=function(t,e){return _.playerMarkets.includes(t)&&0===e.length},e.remapResults=function(t){var e=new c.default;return e.matchId=t.match_id,e.outcome=t.outcome,e},e.remapTiebreaker=function(t){var e=new p.default;return e.goldenGoal=t.golden_goal,e},e.remapTimeTiebreaker=function(t){var e=new y.default;return e.timeTiebreaker=t,e},e.remapRelated=function(t){return t.map((function(t){var e=new M.RelatedEntityRelationship;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},e}return i(e,t),e}(I.default);e.default=O},68950:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(64916)),a=r(n(97640));e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.authRequirement=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new i.default,this.predictionId=null,this.participantsCount=0,this.related=[],this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.predictionsUpdatedAt=null,this.scheduleOpenAt=null,this.images=null,this.predictionTiebreaker=new a.default,this.branding=null}},97640:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.goldenGoal=null}},64916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.timeTiebreaker=!1}},21784:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.contestId="",this.contestType="GAME",this.contestModel=null,this.description="",this.userList=[]}},60824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position="",this.profileId="",this.profileModel=null,this.note="",this.tags=[]}},13381:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.result=null}},1399:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(91465));e.default=function(t){var e=this;this.gameInstanceId=null,this.fixtures=[],this.tiebreaker=null,this.gameInstanceId=t.gameInstanceId,t.fixtures.forEach((function(t){return e.fixtures.push(new i.default(t.matchId,t.market,t.prediction.value))})),this.tiebreaker=t.tiebreaker?t.tiebreaker:null}},29596:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(89502)),o=a(n(19013));e.default=function(t){var e=this;this.topXFacade=null,this.helpers=new o.default,this.getConfig=function(){return r(e,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getConfig()];case 1:return[2,t.sent()]}}))}))},this.getGames=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGames(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameById(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGamePredictions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGamePredictions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameResults(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getCurrentGameResults(t)];case 1:return[2,e.sent()]}}))}))},this.play=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.play(t)];case 1:return[2,e.sent()]}}))}))},this.delete=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.getMyGameEditions=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMyGameEditions(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyGamePrediction=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMyGamePrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getUserGameEditions=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getUserGameEditions(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,a){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getUserGamePrediction(t,n,a)];case 1:return[2,e.sent()]}}))}))},this.getMarketsResultsForGame=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getMarketsResultsForGame(t,n)];case 1:return[2,e.sent()]}}))}))},this.getGameWinners=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameWinners(t,n)];case 1:return[2,e.sent()]}}))}))},this.topXFacade=new s.default(t)}},7323:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(14946),o=a(n(64800)),u=a(n(81613)),l=a(n(58742)),c=a(n(84790)),d=a(n(84874));e.default=function(t){var e=this;this.https=null,this.service=null,this.idSchema=null,this.getPolls=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,o;return i(this,(function(i){switch(i.label){case 0:return t?(t=new c.default(t),[4,this.service.finalizePollsFilters(t)]):[3,2];case 1:i.sent(),i.label=2;case 2:return[4,this.https.getPolls(t,n)];case 3:e=i.sent(),r=0,a=e.data,i.label=4;case 4:return r<a.length?(o=a[r],[4,this.service.remapTags(o,s.IdSchemaEnum.NATIVE,this.idSchema)]):[3,7];case 5:i.sent(),i.label=6;case 6:return r++,[3,4];case 7:return[2,e]}}))}))},this.getPollById=function(t,n){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return[4,this.https.getPollById(t,n)];case 1:return e=r.sent(),[4,this.service.remapTags(e,s.IdSchemaEnum.NATIVE,this.idSchema)];case 2:return r.sent(),[2,e]}}))}))},this.voteForPoll=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return"string"==typeof n&&(console.warn("Passing a single optionId as a string will be deprecated. Please pass it as an array."),n=[n]),[4,this.https.voteForPoll(t,n)];case 1:return[2,e.sent()]}}))}))},this.deleteVoteForPoll=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.https.deleteVoteForPoll(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPollVote=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.https.getMyPollVote(t)];case 1:return e=i.sent(),n?[4,this.getPolls(new c.default({pollIds:[t]}),!0)]:[3,3];case 2:r=i.sent(),e.pollModel=r.data.find((function(e){return e.id===t}))||null,e.optionModel=(null===(a=r.data.find((function(e){return e.id===t})))||void 0===a?void 0:a.options.find((function(t){return t.id===e.optionId})))||null,e.optionsModels=e.optionIds&&(null===(s=r.data.find((function(e){return e.id===t})))||void 0===s?void 0:s.options.filter((function(t){return e.optionIds.includes(t.id)})))||[],e.previousVotes.forEach((function(t){var e;t.optionsModels=(null===(e=r.data.find((function(e){return e.id===t.pollId})))||void 0===e?void 0:e.options.filter((function(e){return t.optionIds.includes(e.id)})))||[]})),i.label=3;case 3:return[2,e]}}))}))},this.getMyPollsVotes=function(t){return r(e,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t&&(t=new o.default(t)),[4,this.https.getMyPollsVotes(t)];case 1:return e=i.sent(),n=e.data.map((function(t){return t.id})),[4,this.getPolls(new c.default({pollIds:n}),!0)];case 2:return r=i.sent(),e.data=e.data.map((function(t){var e,n;return t.pollModel=r.data.find((function(e){return e.id===t.pollId}))||null,t.optionModel=(null===(e=t.pollModel)||void 0===e?void 0:e.options.find((function(e){return e.id===t.optionId})))||null,t.optionsModels=t.optionIds&&(null===(n=t.pollModel)||void 0===n?void 0:n.options.filter((function(e){return t.optionIds.includes(e.id)})))||[],t})),[2,e]}}))}))},this.voteForPlayerOfTheMatch=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){switch(i.label){case 0:return this.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.service.remapMatchAndPlayerIds(t,n,this.idSchema,s.IdSchemaEnum.NATIVE)];case 1:return e=i.sent(),r=e[0],a=e[1],[4,this.https.voteForPlayerOfTheMatch(r,a)];case 2:return i.sent(),[2,{playerId:n}];case 3:return[4,this.https.voteForPlayerOfTheMatch(t,n)];case 4:return[2,i.sent()]}}))}))},this.deleteVoteForPlayerOfTheMatch=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.service.remapMatchIds([t],this.idSchema,s.IdSchemaEnum.NATIVE)];case 1:return e=n.sent(),[4,this.https.deleteVoteForPlayerOfTheMatch(e[0])];case 2:case 4:return n.sent(),[2,!0];case 3:return[4,this.https.deleteVoteForPlayerOfTheMatch(t)]}}))}))},this.getOwnVotesForPlayerOfTheMatch=function(t){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return t&&(t=new l.default(t)),t&&t.matchIds&&t.matchIds.length>0&&this.idSchema!==s.IdSchemaEnum.NATIVE?[4,this.service.remapMatchIds(t.matchIds,this.idSchema,s.IdSchemaEnum.NATIVE)]:[3,2];case 1:e=r.sent(),t.matchIds=e,r.label=2;case 2:return[4,this.https.getOwnVotesForPlayerOfTheMatch(t)];case 3:return n=r.sent(),[4,this.service.setModelsForUserVotes(n)];case 4:return[2,r.sent()]}}))}))},this.getResultsForPlayerOfTheMatch=function(t,n){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){switch(i.label){case 0:return this.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:[4,this.service.remapMatchIds([t],this.idSchema,s.IdSchemaEnum.NATIVE)];case 1:return e=i.sent(),[4,this.https.getResultsForPlayerOfTheMatch(e[0],n)];case 2:return r=i.sent(),[4,this.service.setModelsForPotmResults(r.data)];case 3:return i.sent(),[2,r];case 4:return[4,this.https.getResultsForPlayerOfTheMatch(t,n)];case 5:return a=i.sent(),[4,this.service.setModelsForPotmResults(a.data)];case 6:return i.sent(),[2,a]}}))}))},this.idSchema=t.idSchema,this.https=new u.default(t),this.service=new d.default(t)}},58742:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.matchIds=null,n.matchIds=e&&e.matchIds?e.matchIds:null,n}return i(e,t),e.prototype.constructFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.matchIds&&this.matchIds.length>0&&(e+="&",e+="match_ids=".concat(this.matchIds.join(","))),e},e}(a(n(64800)).default);e.default=s},19379:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},93285:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.teamId=null,this.teamModel=null,this.playerId=null,this.playerModel=null,this.votes=null,this.winner=null}},10862:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(19379));e.default=function(){this.meta=new i.default,this.data=[]}},92379:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchModel=null,this.playerId=null,this.playerModel=null,this.createdAt=null}},34824:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},84790:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.flags=null,n.status=null,n.entityIds=null,n.entityType=null,n.pollIds=null,n.sortOrder=null,n.minVotes=null,n.language=null,n.flags=(null==e?void 0:e.flags)||null,n.status=(null==e?void 0:e.status)||null,n.entityIds=(null==e?void 0:e.entityIds)||null,n.entityType=(null==e?void 0:e.entityType)||null,n.pollIds=(null==e?void 0:e.pollIds)||null,n.sortOrder=(null==e?void 0:e.sortOrder)||null,n.minVotes=e&&void 0!==e.minVotes?e.minVotes:null,n.language=(null==e?void 0:e.language)||null,n}return i(e,t),e.prototype.constructMainFiltersUrl=function(){var e=t.prototype.constructMainFiltersUrl.call(this);return this.flags&&this.flags.length>0&&(e+="&flags=".concat(this.flags.join(","))),this.status&&(e+="&status=".concat(this.status)),this.entityIds&&this.entityIds.length>0&&(e+="&entity_ids=".concat(this.entityIds.join(","))),this.pollIds&&this.pollIds.length>0&&(e+="&poll_ids=".concat(this.pollIds.join(","))),this.sortOrder&&(e+="&sort_order=".concat(this.sortOrder)),this.minVotes&&(e+="&min_votes=".concat(this.minVotes)),this.language&&(e+="&language=".concat(this.language)),e},e}(a(n(64800)).default);e.default=s},81770:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id=null,this.title=null,this.alternativeTitle=null,this.description=null,this.type=null,this.images=new i.default,this.status=null,this.language=null,this.authRequirement=null,this.totalVotes=null,this.flags=[],this.customFields=null,this.branding=null,this.embedCode=null,this.labels=null,this.adContent=null,this.context=null,this.options=[],this.related=[],this.preferencesEnabled=!1,this.multipleChoice=!1,this.maxMultipleChoiceOptions=null,this.participationCount=0,this.maxAttempts=0,this.externalActivity=null,this.createdAt=null,this.updatedAt=null}},1126:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rules=null,e}return i(e,t),e}(a(n(81770)).default);e.default=s},70890:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(30439));e.default=function(){this.id=null,this.title=null,this.description=null,this.images=new i.default,this.votes=null,this.embedCode=null,this.preferencesMapping=[]}},358:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.pollId=null,this.optionId=null,this.optionIds=[],this.userId=null,this.createdAt=null}},15390:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pollModel=null,e.optionModel=null,e.optionsModels=[],e.previousVotes=[],e.attempts=null,e}return i(e,t),e}(a(n(358)).default);e.default=s},71812:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},62160:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872));e.default=function(){this.meta=new i.default,this.data=[]}},88593:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.pollId=null,this.optionIds=[],this.optionsModels=[],this.userId=null,this.createdAt=null}},67377:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.previousVotes=[],e.attempts=null,e}return i(e,t),e}(a(n(358)).default);e.default=s},93305:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(38872)),a=r(n(93285)),s=r(n(10862)),o=r(n(92379)),u=r(n(34824));e.default=function(){var t=this;this.remapUserVotes=function(e){var n=new u.default;return n.meta=t.remapMeta(e.meta.pagination),n.data=e.data.map((function(e){return t.remapUserVoteModel(e)})),n},this.remapResults=function(e){var n=new s.default;return n.meta=e.meta,n.data=e.data.map((function(e){return t.remapResultsModel(e)})),n},this.remapMeta=function(t){var e=new i.default;return e.pagination.itemsPerPage=t.items_per_page,e.pagination.nextPageStartsAfter=t.next_page_starts_after,e},this.remapUserVoteModel=function(t){var e=new o.default;return e.matchId=t.match_id,e.playerId=t.player_id,e.createdAt=t.created_at,e},this.remapResultsModel=function(t){var e=new a.default;return e.teamId=t.team_id,e.playerId=t.player_id,e.votes=t.votes,e.winner=t.winner,e}}},6829:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(18902)),o=a(n(78923)),u=a(n(16692)),l=a(n(72820)),c=a(n(87060)),d=a(n(81770)),f=a(n(1126)),h=a(n(70890)),p=a(n(15390)),m=a(n(71812)),v=a(n(62160)),_=a(n(55955)),y=a(n(88593)),g=a(n(67377)),b=a(n(358)),w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.remapPolls=function(t){var n=new m.default;return n.meta.pagination=e.remapMetaPagination(t.meta.pagination),n.data=t.data.map((function(t){return e.remapPoll(t)})),n},e.remapPollById=function(t){var n=new f.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.totalVotes=t.total_votes,n.customFields=t.custom_fields,n.related=t.related?e.remapRelated(t.related):[],n.branding=t.branding?e.remapBranding(t.branding):null,n.embedCode=t.embed_code,n.labels=t.labels,n.rules=t.rules,n.adContent=t.ad_content,n.options=t.options?e.remapOptions(t.options):[],n.context=t.context?e.remapContext(t.context):t.context,n.preferencesEnabled=t.preferences_enabled,n.multipleChoice=t.multiple_choice,n.maxMultipleChoiceOptions=t.max_multiple_choice_options,n.participationCount=t.participation_count,n.maxAttempts=t.max_attempts,n.externalActivity=t.external_activity,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapUserVote=function(t){var n=new g.default;return n.id=t.id,n.pollId=t.poll_id,n.optionId=t.option_id,n.optionIds=t.option_ids,n.userId=t.user_id,n.attempts=t.attempts||null,n.previousVotes=t.previous_votes?t.previous_votes.map((function(t){return e.remapPreviousVotes(t)})):[],n.createdAt=t.created_at,n},e.remapPreviousVotes=function(t){var e=new y.default;return e.id=t.id,e.pollId=t.poll_id,e.optionIds=t.option_ids,e.userId=t.user_id,e.createdAt=t.created_at,e},e.remapPollsVotes=function(t){var n=new v.default;return n.meta.pagination=e.remapMetaPagination(t.meta.pagination),n.data=t.data.map((function(t){return e.remapAllPollsVotes(t)})),n},e.remapAllPollsVotes=function(t){var e=new b.default;return e.id=t.id,e.pollId=t.poll_id,e.optionId=t.option_id,e.optionIds=t.option_ids,e.userId=t.user_id,e.createdAt=t.created_at,e},e.remapSinglePollVote=function(t){var n=new p.default;return n.id=t.id,n.pollId=t.poll_id,n.optionId=t.option_id,n.optionIds=t.option_ids,n.userId=t.user_id,n.attempts=t.attempts||null,n.createdAt=t.created_at,n.previousVotes=t.previous_votes?t.previous_votes.map((function(t){return e.remapPreviousVotes(t)})):[],n},e.remapMetaPagination=function(t){var e=new s.default;return e.itemsPerPage=t.items_per_page,e.nextPageStartsAfter=t.next_page_starts_after,e},e.remapPoll=function(t){var n=new d.default;return n.id=t.id,n.title=t.title,n.alternativeTitle=t.alternative_title,n.description=t.description,n.type=t.type,n.images=t.images,n.status=t.status,n.language=t.language,n.authRequirement=t.auth_requirement,n.flags=t.flags,n.totalVotes=t.total_votes,n.customFields=t.custom_fields,n.related=t.related?e.remapRelated(t.related):[],n.branding=t.branding?e.remapBranding(t.branding):null,n.embedCode=t.embed_code,n.labels=t.labels,n.adContent=t.ad_content,n.options=t.options?e.remapOptions(t.options):[],n.context=t.context?e.remapContext(t.context):t.context,n.preferencesEnabled=t.preferences_enabled,n.multipleChoice=t.multiple_choice,n.maxMultipleChoiceOptions=t.max_multiple_choice_options,n.participationCount=t.participation_count,n.maxAttempts=t.max_attempts,n.externalActivity=t.external_activity,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},e.remapContext=function(t){var e=new l.default;return e.content=t.content,e.tags=t.tags?t.tags.map((function(t){var e=new c.default;return e.id=t.id,e.type=t.type,e.source=t.source,e})):null,e.campaign=t.campaign,e},e.remapRelated=function(t){return t.map((function(t){var e=new o.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e.entityRelationship=t.entity_relationship,e}))},e.remapOptions=function(t){return t.map((function(t){var n=new h.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.images=t.images,n.votes=t.votes,n.embedCode=t.embed_code,n.preferencesMapping=t.preferences_mapping?e.remapPreferencesMapping(t.preferences_mapping):[],n}))},e.remapPreferencesMapping=function(t){return t.map((function(t){var e=new _.default;return e.preferenceId=t.preference_id,e}))},e}return i(e,t),e}(u.default);e.default=w},84874:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(67900),o=n(14946),u=n(4021),l=n(94904),c=a(n(68097)),d=a(n(62535)),f=a(n(88900)),h=a(n(78261)),p=a(n(48808)),m=a(n(19685));e.default=function(t){var e=this;this.idMappingService=null,this.idSchema=null,this.errorHandlingMode=null,this.validator=null,this.activityService=null,this.football=null,this.finalizePollsFilters=function(t){return r(e,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.idSchema!==o.IdSchemaEnum.NATIVE&&t.entityIds&&t.entityIds.length>0?(this.validator.validateFilters(t),[4,this.idMappingService.getEntityIdsBySchemaId(Array.from(t.entityIds),t.entityType,o.IdSchemaEnum.NATIVE)]):[3,2];case 1:e=n.sent(),t.entityIds=e[t.entityType],n.label=2;case 2:return[2]}}))}))},this.remapTags=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.idSchema!=o.IdSchemaEnum.NATIVE&&t.context&&t.context.tags&&t.context.tags.length?(e=JSON.parse(JSON.stringify(t.context.tags)),[4,this.activityService.remapTagsIds(e,n,a)]):[3,2];case 1:r=i.sent(),t.context.tags=r,i.label=2;case 2:return[2]}}))}))},this.remapMatchAndPlayerIds=function(t,n,a,o){return r(e,void 0,void 0,(function(){var e,r,f,h;return i(this,(function(i){switch(i.label){case 0:return e={match:[t],player:[n]},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(e,a,o)];case 1:if((r=i.sent()).match.length>0&&r.player.length>0)return f=r.match[0],h=r.player[0],[2,[f,h]];if("default"===this.errorHandlingMode)throw new c.default(u.ErrorCodes.NOT_FOUND,l.ErrorStatuses.ENTITY_IDS_NOT_FOUND,s.ErrorMessages.ENTITY_IDS_NOT_FOUND);throw new d.default(u.ErrorCodes.NOT_FOUND,l.ErrorStatuses.ENTITY_IDS_NOT_FOUND,s.ErrorMessages.ENTITY_IDS_NOT_FOUND)}}))}))},this.remapMatchIds=function(t,n,a){return r(e,void 0,void 0,(function(){var e,r,o;return i(this,(function(i){switch(i.label){case 0:return e=Array.from(t),r={match:t},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(r,n,a)];case 1:if((o=i.sent()).match.length>0&&o.match.length===e.length)return[2,o.match];if("default"===this.errorHandlingMode)throw new c.default(u.ErrorCodes.NOT_FOUND,l.ErrorStatuses.MATCH_IDS_NOT_FOUND,s.ErrorMessages.MATCH_IDS_NOT_FOUND);throw new d.default(u.ErrorCodes.NOT_FOUND,l.ErrorStatuses.MATCH_IDS_NOT_FOUND,s.ErrorMessages.MATCH_IDS_NOT_FOUND)}}))}))},this.setModelsForUserVotes=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:return e=t.data.map((function(t){return t.matchId})),n=t.data.map((function(t){return t.playerId})),e.length>0&&n.length>0?[4,this.football.footballFacade.getMatchesMapWithNativeIds(e)]:[3,3];case 1:return r=i.sent(),[4,this.football.footballFacade.getPlayersMapWithNativeIds(n)];case 2:a=i.sent(),t.data.forEach((function(t){t.matchModel=r[t.matchId]||null,t.playerModel=a[t.playerId]||null,t.matchId=t.matchModel?t.matchModel.id:t.matchId,t.playerId=t.playerModel?t.playerModel.id:t.playerId})),t.meta.pagination.nextPageStartsAfter&&(t.meta.pagination.nextPageStartsAfter=t.data[t.data.length-1].matchId),i.label=3;case 3:return[2,t]}}))}))},this.setModelsForPotmResults=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a;return i(this,(function(i){switch(i.label){case 0:return e=t.map((function(t){return t.teamId})),n=t.map((function(t){return t.playerId})),e.length>0&&n.length>0?[4,this.football.footballFacade.getTeamsMapWithNativeIds(e)]:[3,3];case 1:return r=i.sent(),[4,this.football.footballFacade.getPlayersMapWithNativeIds(n)];case 2:a=i.sent(),t.forEach((function(t){t.teamModel=r.get(t.teamId)||null,t.playerModel=a[t.playerId]||null,t.teamId=t.teamModel?t.teamModel.id:t.teamId,t.playerId=t.playerModel?t.playerModel.id:t.playerId})),i.label=3;case 3:return[2]}}))}))},this.idSchema=t.idSchema,this.errorHandlingMode=t.errorHandlingMode,this.idMappingService=new f.default(t),this.validator=new m.default(t),this.activityService=new h.default(t),this.football=new p.default(t)}},73112:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(7323));e.default=function(t){var e=this;this.facade=null,this.getPolls=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPolls(t,n)];case 1:return[2,e.sent()]}}))}))},this.getPollById=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getPollById(t,n)];case 1:return[2,e.sent()]}}))}))},this.voteForPoll=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.voteForPoll(t,n)];case 1:return[2,e.sent()]}}))}))},this.deleteVoteForPoll=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.deleteVoteForPoll(t)];case 1:return[2,e.sent()]}}))}))},this.getMyPollVote=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyPollVote(t,n)];case 1:return[2,e.sent()]}}))}))},this.getMyPollsVotes=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getMyPollsVotes(t)];case 1:return[2,e.sent()]}}))}))},this.voteForPlayerOfTheMatch=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.voteForPlayerOfTheMatch(t,n)];case 1:return[2,e.sent()]}}))}))},this.deleteVoteForPlayerOfTheMatch=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.deleteVoteForPlayerOfTheMatch(t)];case 1:return[2,e.sent()]}}))}))},this.getOwnVotesForPlayerOfTheMatch=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getOwnVotesForPlayerOfTheMatch(t)];case 1:return[2,e.sent()]}}))}))},this.getResultsForPlayerOfTheMatch=function(t,n){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.facade.getResultsForPlayerOfTheMatch(t,n)];case 1:return[2,e.sent()]}}))}))},this.facade=new s.default(t)}},34806:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=n(14946),l=n(10817),c=n(95409),d=o(n(25156));e.default=function(t,e,n){var o=this;this.idMapping=null,this.idSchema=null,this.native=u.IdSchemaEnum.NATIVE,this.footballFacade=null,this.remapProfileStats=function(t){return i(o,void 0,void 0,(function(){var e,n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:return t.predictions?(e=t.successRates,n=t.predictions,r={competition:this.getIdsKeys(e.byFootballCompetition,n.single.breakdown.footballCompetitions),team:this.getIdsKeys(e.byFootballTeam,n.single.breakdown.footballTeams)},Object.values(r.competition).length?(i=JSON.parse(JSON.stringify(t.successRates.byFootballCompetition)),[4,this.getEntitiesMap(r.competition,l.EntityTypeEnum.COMPETITION)]):[3,3]):[2,t];case 1:return o=a.sent(),[4,this.setSuccessRatesModels(i,o)];case 2:u=a.sent(),t.successRates.byFootballCompetition=u,n.single.breakdown.footballCompetitions=this.reconstructBreakdown(n.single.breakdown.footballCompetitions,o),a.label=3;case 3:return Object.values(r.team).length?(s=JSON.parse(JSON.stringify(t.successRates.byFootballTeam)),[4,this.getEntitiesMap(r.team,l.EntityTypeEnum.TEAM)]):[3,6];case 4:return o=a.sent(),[4,this.setSuccessRatesModels(s,o)];case 5:u=a.sent(),t.successRates.byFootballTeam=u,n.single.breakdown.footballTeams=this.reconstructBreakdown(n.single.breakdown.footballTeams,o),a.label=6;case 6:return[2,t]}}))}))},this.setSuccessRatesModels=function(t,e){return i(o,void 0,void 0,(function(){return a(this,(function(n){return[2,this.reconstructRecords(t,void 0,e)]}))}))},this.getEntitiesMap=function(t,e){return i(o,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:switch(e){case"competition":return[3,1];case"team":return[3,3]}return[3,5];case 1:return[4,this.footballFacade.getCompetitionsMapWithNativeIds(t)];case 2:case 4:return[2,n.sent()];case 3:return[4,this.footballFacade.getTeamsMapWithNativeIds(t)];case 5:return[2]}}))}))},this.reconstructRecords=function(t,e,n){return t&&Object.keys(t).length?(Object.keys(t).forEach((function(i){var a,s=n.get(i);(e=r(r({},e),((a={})[s.id]=t[i],a)))[s.id].model=s})),e):t},this.reconstructBreakdown=function(t,e){return t.length?t.map((function(t){var n=e.get(t.entityId);return t.entityId=n.id,t.model=n,t})):t},this.getIdsKeys=function(t,e){var n=Object.keys(t);if(e.length){var r=e.map((function(t){return t.entityId}));return Array.from(new Set(s(s([],n,!0),r,!0)))}return n},this.remapInterestsToIdSchema=function(t){return i(o,void 0,void 0,(function(){var e,n,r,i,s,o,u,l,d,f,h,p;return a(this,(function(a){switch(a.label){case 0:return this.idSchema===this.native?[3,3]:t&&t.length>0?(e={},n={},r=t.filter((function(t){return t.source.toLocaleUpperCase()===c.SportSourceEnum.FOOTBALL})),i=t.filter((function(t){return t.source.toLocaleUpperCase()!==c.SportSourceEnum.FOOTBALL})),r.forEach((function(t){e.hasOwnProperty(t.type)||(e[t.type]=[],n[t.type]=[]),e[t.type].push(t.id),n[t.type].push(t)})),[4,this.remapIdsObj(e,this.native,this.idSchema)]):[3,2];case 1:for(s=a.sent(),o=[],u=function(t,e){e.forEach((function(e,n){e.id=s[t][n],o.push(e)}))},l=0,d=Object.entries(n);l<d.length;l++)f=d[l],h=f[0],p=f[1],u(h,p);return[2,o.concat(i)];case 2:case 3:return[2,t]}}))}))},this.remapInterestToNative=function(t){return i(o,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(a){switch(a.label){case 0:return this.idSchema===this.native||t.source.toLocaleUpperCase()!==c.SportSourceEnum.FOOTBALL?[3,2]:(e={},n=t.id,r=t.type,e[r]=[n],[4,this.remapIdsObj(e,this.idSchema,this.native)]);case 1:return i=a.sent(),t.id=i[r][0],[2,t];case 2:return[2,t]}}))}))},this.inquiryCustomInterests=function(t,e){var n=[];return t&&t.length>0&&(n=t.filter((function(t){return t.source.toLocaleUpperCase()===c.SportSourceEnum.CUSTOM})),e)?n.map((function(t){var e=new d.default;return e.id=t.id,e.type=t.type,e.source=t.source,e.favourite=t.favourite,e})):n},this.remapInterests=function(t){return i(o,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return(e=this.inquiryCustomInterests(t,!1))&&e.length>0?(n=t.filter((function(t){return t.source.toLocaleUpperCase()!==c.SportSourceEnum.CUSTOM})),[4,this.remapInterestsToIdSchema(n)]):[3,2];case 1:return r=i.sent(),e.forEach((function(t){return r.push(t)})),[2,r];case 2:return[4,this.remapInterestsToIdSchema(t)];case 3:return[2,i.sent()]}}))}))},this.showFullInterests=function(t){return i(o,void 0,void 0,(function(){var e,n,r,i,s,o,u,d;return a(this,(function(a){switch(a.label){case 0:return e=[],t&&t.length>0?(n=this.inquiryCustomInterests(t,!0),e.push(n),r=t.filter((function(t){return t.source.toLocaleUpperCase()!==c.SportSourceEnum.CUSTOM})),[4,this.getInterestsEntitiesMap(r)]):[3,2];case 1:return i=a.sent(),s=i.competitionsMap,o=i.teamsMap,u=i.playersMap,d=r.map((function(t){var e=null;return t.source.toLocaleUpperCase()!==c.SportSourceEnum.FOOTBALL?(t.model=e,t):t.type===l.EntityTypeEnum.COMPETITION?((e=s.get(t.id))&&(t.id=e.id),t.model=e,t):t.type===l.EntityTypeEnum.TEAM?((e=o.get(t.id))&&(t.id=e.id),t.model=e,t):t.type===l.EntityTypeEnum.PLAYER?(u?(t.model=u[t.id],t.id=u[t.id].id):t.model=e,t):void 0})),e.push(d),[2,e.flat()];case 2:return[2,e]}}))}))},this.getInterestsEntitiesMap=function(t){return i(o,void 0,void 0,(function(){var e,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return e=[],n=[],r=[],i=new Map,s=new Map,o=null,t.forEach((function(t){t.type===l.EntityTypeEnum.COMPETITION&&t.source.toLocaleUpperCase()===c.SportSourceEnum.FOOTBALL?e.push(t.id):t.type===l.EntityTypeEnum.TEAM&&t.source.toLocaleUpperCase()===c.SportSourceEnum.FOOTBALL?n.push(t.id):t.type===l.EntityTypeEnum.PLAYER&&t.source.toLocaleUpperCase()===c.SportSourceEnum.FOOTBALL&&r.push(t.id)})),e.length?[4,this.footballFacade.getCompetitionsMapWithNativeIds(e)]:[3,2];case 1:i=a.sent(),a.label=2;case 2:return n.length?[4,this.footballFacade.getTeamsMapWithNativeIds(n)]:[3,4];case 3:s=a.sent(),a.label=4;case 4:return r.length?[4,this.footballFacade.getPlayersMapWithNativeIds(r)]:[3,6];case 5:o=a.sent(),a.label=6;case 6:return[2,{competitionsMap:i,teamsMap:s,playersMap:o}]}}))}))},this.remapIdsObj=function(t,e,n){return i(o,void 0,void 0,(function(){return a(this,(function(r){switch(r.label){case 0:return[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,e,n)];case 1:return[2,r.sent()]}}))}))},this.idMapping=n,this.idSchema=t.idSchema,this.footballFacade=e}},14912:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,a){function s(t){try{u(r.next(t))}catch(t){a(t)}}function o(t){try{u(r.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,o[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=a(n(88900)),o=a(n(34806));e.default=function(t,e){var n=this;this.idMapping=null,this.profileOperations=null,this.remapProfileStats=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapProfileStats(t)];case 1:return[2,e.sent()]}}))}))},this.remapInterestToNative=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapInterestToNative(t)];case 1:return[2,e.sent()]}}))}))},this.remapInterests=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapInterests(t)];case 1:return[2,e.sent()]}}))}))},this.showFullInterests=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.showFullInterests(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new s.default(t),this.profileOperations=new o.default(t,e,this.idMapping)}},82506:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getVersion=void 0,e.getVersion=function(){var t=n(49829),e=null,r=t.version.split("."),i=Number(r[0]),a=Number(r[1]),s=r[2];if(s.includes("-RC")){var o=s.split("-RC");s=Number(o[0]),e=Number(o[1])}else s=Number(s);return{version:t.version,major:i,minor:a,patch:s,releaseCandidate:e}}},67900:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FootballMatchStatusEnum=e.MatchOddsMarketEnum=e.OddFormatEnum=e.ScopeTypeEnum=e.OddTypeEnum=e.EventGamePredictionStatusEnum=e.EventGameOutcomeTypeEnum=e.BracketGamePredictionStatusEnum=e.BracketWinnerEnum=e.GameStatusEnum=e.HalfTimeFullTimeEnum=e.DoubleChanceEnum=e.OneXTwoEnum=e.StatusEnum=e.OutcomeEnum=e.MarketEnum=e.UserActionsEnum=e.ActionsEnum=e.ErrorMessages=e.ErrorStatuses=e.ErrorCodes=e.LangEnum=e.IdSchemaEnum=e.ErrorHandlingModeEnum=e.EnvironmentEnum=void 0;var r=n(2671);Object.defineProperty(e,"EnvironmentEnum",{enumerable:!0,get:function(){return r.EnvironmentEnum}});var i=n(89580);Object.defineProperty(e,"ErrorHandlingModeEnum",{enumerable:!0,get:function(){return i.ErrorHandlingModeEnum}});var a=n(14946);Object.defineProperty(e,"IdSchemaEnum",{enumerable:!0,get:function(){return a.IdSchemaEnum}});var s=n(89377);Object.defineProperty(e,"LangEnum",{enumerable:!0,get:function(){return s.LangEnum}});var o=n(4021);Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:function(){return o.ErrorCodes}});var u=n(94904);Object.defineProperty(e,"ErrorStatuses",{enumerable:!0,get:function(){return u.ErrorStatuses}});var l=n(5318);Object.defineProperty(e,"ErrorMessages",{enumerable:!0,get:function(){return l.ErrorMessages}});var c=n(71491);Object.defineProperty(e,"ActionsEnum",{enumerable:!0,get:function(){return c.ActionsEnum}});var d=n(94964);Object.defineProperty(e,"UserActionsEnum",{enumerable:!0,get:function(){return d.UserActionsEnum}});var f=n(27974);Object.defineProperty(e,"MarketEnum",{enumerable:!0,get:function(){return f.MarketEnum}});var h=n(51113);Object.defineProperty(e,"OutcomeEnum",{enumerable:!0,get:function(){return h.OutcomeEnum}});var p=n(66147);Object.defineProperty(e,"StatusEnum",{enumerable:!0,get:function(){return p.StatusEnum}});var m=n(1976);Object.defineProperty(e,"OneXTwoEnum",{enumerable:!0,get:function(){return m.OneXTwoEnum}});var v=n(1976);Object.defineProperty(e,"DoubleChanceEnum",{enumerable:!0,get:function(){return v.DoubleChanceEnum}});var _=n(1976);Object.defineProperty(e,"HalfTimeFullTimeEnum",{enumerable:!0,get:function(){return _.HalfTimeFullTimeEnum}});var y=n(40853);Object.defineProperty(e,"GameStatusEnum",{enumerable:!0,get:function(){return y.GameStatusEnum}});var g=n(16187);Object.defineProperty(e,"BracketWinnerEnum",{enumerable:!0,get:function(){return g.BracketWinnerEnum}});var b=n(96166);Object.defineProperty(e,"BracketGamePredictionStatusEnum",{enumerable:!0,get:function(){return b.BracketGamePredictionStatusEnum}});var w=n(95106);Object.defineProperty(e,"EventGameOutcomeTypeEnum",{enumerable:!0,get:function(){return w.EventGameOutcomeTypeEnum}});var E=n(77618);Object.defineProperty(e,"EventGamePredictionStatusEnum",{enumerable:!0,get:function(){return E.EventGamePredictionStatusEnum}});var I=n(69196);Object.defineProperty(e,"OddTypeEnum",{enumerable:!0,get:function(){return I.OddTypeEnum}});var M=n(69196);Object.defineProperty(e,"ScopeTypeEnum",{enumerable:!0,get:function(){return M.ScopeTypeEnum}});var O=n(69196);Object.defineProperty(e,"OddFormatEnum",{enumerable:!0,get:function(){return O.OddFormatEnum}});var P=n(69196);Object.defineProperty(e,"MatchOddsMarketEnum",{enumerable:!0,get:function(){return P.MatchOddsMarketEnum}});var T=n(55815);Object.defineProperty(e,"FootballMatchStatusEnum",{enumerable:!0,get:function(){return T.FootballMatchStatusEnum}})},63607:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.FansUnitedSDK=void 0;var a=n(48519);Object.defineProperty(e,"FansUnitedSDK",{enumerable:!0,get:function(){return a.FansUnitedSDK}}),i(n(67900),e),i(n(29679),e),i(n(91287),e)},29679:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},48519:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)},i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.FansUnitedSDK=void 0;var a=i(n(46595)),s=n(40682),o=n(2671),u=n(89580),l=n(14946),c=n(89377),d=n(62141),f=n(29627),h=i(n(17070)),p=i(n(87302)),m=i(n(9201)),v=i(n(94068)),_=i(n(20244)),y=i(n(79198)),g=i(n(46139)),b=i(n(48808)),w=i(n(21454)),E=i(n(99421)),I=i(n(78324)),M=i(n(92962)),O=i(n(40267)),P=i(n(91550)),T=i(n(74168)),S=i(n(71259)),A=i(n(83281)),C=i(n(86409)),R=i(n(31267)),D=i(n(50808)),F=i(n(29596)),L=i(n(73112)),k=n(82506),j=null,N=null;e.FansUnitedSDK=function(t){if(x(t)){var e=G(t);if(e.isValid)return j={profile:new C.default(t),football:new b.default(t),predictor:new S.default(t),loyalty:new M.default(t),topX:new F.default(t),matchQuiz:new O.default(t),activity:new p.default(t),miniGames:new P.default(t),discussions:new _.default(t),privateLeagues:new A.default(t),challenges:new v.default(t),progress:new R.default,voting:new L.default(t),fantasy:new g.default(t),helpers:new w.default(t),idMapping:new E.default(t),bracketGame:new m.default(t),lists:new I.default(t),standingGame:new D.default(t),eventGame:new y.default(t),odds:new T.default(t),getVersion:k.getVersion},N=r({},t),j;U(e)}return j};var x=function(t){var e,n;return!j||JSON.stringify(t)!==JSON.stringify(N)||(null===(e=t.authProvider)||void 0===e?void 0:e.getIdToken())!==(null===(n=N.authProvider)||void 0===n?void 0:n.getIdToken())},G=function(t){var e=(new a.default).validate(t);return e.idSchema.validation!==f.ValidationResponseEnum.MISSING_VALUE&&e.idSchema.validation!==f.ValidationResponseEnum.INVALID_VALUE||(console.warn(e.idSchema.message.text),t.idSchema=l.IdSchemaEnum.NATIVE),e.environment.validation!==f.ValidationResponseEnum.MISSING_VALUE&&e.environment.validation!==f.ValidationResponseEnum.INVALID_VALUE||(console.warn(e.environment.message.text),t.environment=o.EnvironmentEnum.PROD),e.lang.validation!==f.ValidationResponseEnum.MISSING_VALUE&&e.lang.validation!==f.ValidationResponseEnum.INVALID_VALUE||(console.warn(e.lang.message.text),t.lang=c.LangEnum.EN),e.errorHandlingMode.validation!==f.ValidationResponseEnum.MISSING_VALUE&&e.errorHandlingMode.validation!==f.ValidationResponseEnum.INVALID_VALUE||(console.warn(e.errorHandlingMode.message.text),t.errorHandlingMode=u.ErrorHandlingModeEnum.DEFAULT),e.authProvider.validation===f.ValidationResponseEnum.INVALID_VALUE&&console.warn(e.authProvider.message.text),e.oddClient.message.type!==d.LogEnum.WARNING&&e.oddClient.credentials.message.type!==d.LogEnum.WARNING||console.warn(e.oddClient.message.text||e.oddClient.credentials.message.text),e},U=function(t){var e="isValid";Object.keys(t).forEach((function(n){var r=t[n];if(n!==e&&n!==s.ConfigFieldEnum.authProvider){if(r.message.type===d.LogEnum.ERROR)throw new Error(r.message.text)}else if(n!==e&&n===s.ConfigFieldEnum.authProvider){if((null==r?void 0:r.message.type)===d.LogEnum.ERROR)throw new Error(r.message.text);Object.keys(new h.default).forEach((function(t){if(r[t].message.type===d.LogEnum.ERROR)throw new Error(r[t].message.text)}))}if(n!==e&&n===s.ConfigFieldEnum.oddClient){if((null==r?void 0:r.message.type)===d.LogEnum.ERROR)throw new Error(r.message.text);var i=r;if(i.credentials.message.type===d.LogEnum.ERROR)throw new Error(i.credentials.message.text)}}))}},91287:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.DiscussionsFilters=e.DiscussionsConfigModel=e.DictionaryModel=e.AutomaticModerationModel=e.VersionsModel=e.ReportModel=e.ReactionModel=e.PostsModel=e.PostsMetaModel=e.PostsFullModel=e.PostsDiscussionBasicModel=e.PostsCountDiscussionModel=e.PostCreateModel=e.PostByIdFullModel=e.PostByIdBasicModel=e.CreatePostParamBody=e.DiscussionModel=e.ChallengeRankingsModel=e.MyChallengesFilters=e.ChallengeFilters=e.ChallengeUpdateModel=e.ChallengeCreateModel=e.AcceptChallengeModel=e.BracketGameRankingsModel=e.BracketGamesModel=e.BracketGameFilters=e.BracketGamePredictionsModel=e.BracketGameFixtures=e.BracketGamePredictionRequestBody=e.BracketGameTiebreaker=e.BracketGamePredictionFixturesModel=e.BracketGamePredictionModel=e.BracketGamePredictionsFilters=e.BracketGameFixtureScoreModel=e.BracketGameFixturesModel=e.BracketGameMetaParticipantsModel=e.BracketGameMetaModel=e.BracketGameTiebreakerModel=e.BracketGameModel=e.TagsModel=e.ContextModel=e.ContentModel=e.CampaignModel=e.CreateActivityRequestBody=e.UserActivityFilters=e.OwnActivityFilters=e.ActivityFilters=e.PaginationActivities=e.ActivityResponseBody=e.ActivityMeta=void 0,e.PlayerBasicModel=e.PlayerStatsModel=e.TimelineModel=e.LineupsModel=e.ScoresModel=e.StatsModel=e.MatchStatus=e.MatchFilters=e.MatchFullModel=e.MatchBasicModel=e.FootballCountryModel=e.CompetitionFullModel=e.CompetitionFilters=e.CompetitionBasicModel=e.PlayersPointsFilters=e.PlayerDetailedStatsFilters=e.FantasyPlayersMetaModel=e.FantasyPlayerDetailedStatsMetaModel=e.FantasyMultipliersModel=e.FantasyPlayersModel=e.FantasyConfigModel=e.FantasyCoefficientsModel=e.PlayerStatsMatchModel=e.PlayerPointsModel=e.PlayerDetailedStatsModel=e.PlayerDetailedPointsModel=e.FantasyPredictionRequestBody=e.FantasyPlayersPointsModel=e.FantasyPlayerStatsModel=e.FantasyPlayerDetailedStatsModel=e.FansUnitedSdkFetchException=e.StandardFansUnitedException=e.EventGameFixtureNumberModel=e.EventGameFixtureEnumModel=e.EventGameRankingsModel=e.EventGamePredictionsModel=e.EventGamePredictionRequestBody=e.EventGameFixtures=e.EventGameTiebreaker=e.EventGamePredictionFixturesModel=e.EventGamePredictionModel=e.EventGameRankingsFilters=e.EventGamePredictionsFilters=e.EventGameFilters=e.EventGameTiebreakerModel=e.EventGameFixturesModel=e.EventGamesModel=e.EventGameModel=e.TopDiscussionsFilters=e.PostsFilters=void 0,e.GamesBadgeRequirements=e.GameBadgesValue=e.GameBadgeRequirements=e.FootballBadgesValue=e.FootballBadgeRequirements=e.DiscussionsBadgesValue=e.DiscussionsBadgeRequirements=e.ClientBadgesV2=e.BadgesValueV2=e.BadgesModelV2=e.RequirementModel=e.GeneralRequirementModel=e.GeneralBadgesValue=e.ClientBadges=e.BadgesValue=e.BadgesModel=e.ActionsModel=e.ActionValueModel=e.ListContentFilters=e.ListContentModel=e.ListContentResponseModel=e.MappingModel=e.MappingResponseModel=e.PreferenceModel=e.BrandingImagesModel=e.BrandingUrlsModel=e.BrandingColorsModel=e.BrandingModel=e.RelatedEntityRelationship=e.ImagesModel=e.SDKConfiguraitonModel=e.FansUnitedSDKModel=e.AssetsModel=e.PaginationFootballProperties=e.MetaFootballModel=e.FootballPaginationModel=e.SearchFilters=e.SearchModel=e.TeamFormModel=e.TeamColors=e.TeamFilters=e.TeamFullModel=e.TeamBasicModel=e.PlayerShortModel=e.PlayerMarketResultModel=e.PlayerAssetsModel=e.PlayerFilters=e.TopPlayerModel=e.PlayerSquadModel=e.PlayerFullModel=void 0,e.ClassicQuizParticipationBodyModel=e.ClassicQuizOptionModel=e.ClassicQuizQuestionModel=e.ClassicQuizFullModel=e.ClassicQuizFilters=e.ClassicQuizBasicModel=e.PredictionMatchQuizModel=e.GamesMatchQuizListModel=e.GameMarketsResults=e.FixturesMatchQuizModel=e.MatchQuizConfigModel=e.TiersModel=e.TemplateGroupFilter=e.TemplateGroups=e.TemplateByIdModel=e.TemplateModel=e.TemplateBreakdownPointsModel=e.TemplateBreakdownModel=e.RewardsModelV2=e.RewardsModel=e.RankingsModel=e.PointsValueModel=e.PointsModel=e.Points=e.TemplateMeta=e.LoyaltyMeta=e.LeagueLeaderboardMetaModel=e.FiltersMetaModel=e.LeaderboardModel=e.LeaderboardResponseModel=e.LeaderboardLeagueResponse=e.HighestSuccessRateModel=e.TemplateFilters=e.RankingsFilters=e.LoyaltyFilters=e.LeagueLeaderboardFilters=e.HighestSuccessRateFilters=e.EntitiesFollowsFilters=e.EntitiesFollows=e.LoyaltyConfigModelV2=e.LoyaltyConfigModel=e.VotingBadgesValue=e.PotmBadgesValue=e.VotingBadgeRequirements=e.PollBadgesValue=e.PredictorBadgesValue=e.PredictorBadgeRequirements=e.MiniGamesBadgesValue=e.MiniGamesBadgeRequirements=e.GamesBadgesValue=void 0,e.BookmakerUrlModel=e.BookmakerAssetModel=e.BookmakerLinkModel=e.BookmakerBrandingModel=e.BookmakerModel=e.PersonalityQuizPersonaPercentsModel=e.PersonalityQuizParticipationQuestionModel=e.PersonalityQuizParticipationModel=e.PersonalityQuizParticipationBodyModel=e.PersonalityQuizFilters=e.PersonalityQuizFullModel=e.PersonalityQuizOptionModel=e.PersonalityQuizPersonaPointsModel=e.PersonalityQuizQuestionModel=e.PersonalityQuizResultsModel=e.PersonalityQuizzesModel=e.PersonalityQuizBasicModel=e.ResultsSummaryModel=e.MiniGamesFilters=e.MiniGamesContextTag=e.MiniGamesContext=e.MiniGameImages=e.EitherOrResultsStandingsModel=e.EitherOrResultsModel=e.EitherOrResultsBreakdownModel=e.EitherOrParticipationStepsOptionModel=e.EitherOrParticipationStepsModel=e.EitherOrParticipationRequestModel=e.EitherOrParticipationRequestFullModel=e.EitherOrParticipationModel=e.EitherOrStatsModel=e.EitherOrsModel=e.EitherOrPointsModel=e.EitherOrFullModel=e.EitherOrFilters=e.EitherOrBasicModel=e.ClassicQuizzesLeaderboardModel=e.ClassicQuizUserRankModel=e.ClassicQuizUserRank=e.ClassicQuizRankModel=e.ClassicQuizRankFilters=e.ClassicQuizLeaderboardMeta=e.ClassicQuizLeaderboardFilters=e.ClassicQuizFiltersMeta=e.ClassicQuizQuestionsReportModel=e.ClassicQuizzesModel=e.ClassicQuizUserParticipationModel=e.ClassicQuizParticipationsFilters=e.ClassicQuizParticipationQuestionModel=e.ClassicQuizParticipationModel=void 0,e.PrivateLeagueModel=e.PrivateLeaguePredictionModel=e.PrivateLeagueParamUpdateBody=e.PrivateLeagueParamCreateBody=e.PrivateLeagueFullModel=e.PastTemplateModel=e.AcceptPrivateLeagueModel=e.ValueOneXTwo=e.ValueHalfTimeFullTime=e.ValueDoubleChance=e.ValueCorrectScore=e.ValueCorners=e.ValueBoolean=e.ValueAndPlayerId=e.MatchSummaryModel=e.PredictionsModel=e.PredictionsFilters=e.PredictionResponseModel=e.PredictionRequestModel=e.NoYesModel=e.MatchPlayerMarketResultModel=e.MatchMarketsResultsModel=e.MatchCorrectScoreMarketResultModel=e.TopCorrectScoresModel=e.CalculatedOneXTwoFromScoresModel=e.RedCardFixtureModel=e.PlayerFixtureModel=e.PenaltyMatchFixtureModel=e.OverGoalsFixtureModel=e.OverCornersFixtureModel=e.OneXTwoFixtureModel=e.HalfTimeFullTimeFixtureModel=e.DoubleChanceFixtureModel=e.CorrectScoreFixtureModel=e.CornersFixtureModel=e.BothTeamsFixtureModel=e.ResultModel=e.FixturesResponseModel=e.FixturesPredictionModel=e.UserDataConfigModel=e.SuccessRateScopeModel=e.PredictorConfigModel=e.MarketsConfigModel=e.MatchOddsModel=e.SelectionProviderInfoModel=e.MatchOddsMarketTypeModel=e.MatchOddsMarketSelectionModel=e.MatchOddsMarketScopeModel=e.MatchOddsMarketModel=e.MatchOddsFilters=void 0,e.FixturesGamesModel=e.TopXConfigModel=e.StandingGameRankingsModel=e.StandingGamePredictionModel=e.StandingGameRankingsFilters=e.StandingGamesFilters=e.StandingGamePredictionsModel=e.StandingGameMetaParticipantsModel=e.StandingGameMetaModel=e.StandingGameModel=e.StandingGamesModel=e.FollowStatusModel=e.LeadModel=e.LeadRequestBody=e.SummarizedBreakdown=e.SuccessRates=e.SuccessRatePercent=e.SinglePredictionsStats=e.SinglePredictionsBreakdown=e.ProfileStatsModel=e.PredictionsStats=e.GamePredictionsStats=e.EitherOrStats=e.DiscussionStats=e.ClassicQuizzesStats=e.AchievementsStats=e.FullnessProfile=e.CompletedModel=e.BreakdownModel=e.FollowModel=e.FollowingModel=e.FollowersModel=e.FollowFilters=e.FullInterestModel=e.InterestModel=e.ProfileCountryModel=e.DetailedProfileModel=e.ProfileModel=e.PrivateLeagueUpdateModel=e.PrivateLeagueBasicUpdateRequestBody=e.PrivateLeagueCreateModel=e.PrivateLeagueBasicCreateModel=e.PrivateLeagueRankingsModel=e.PrivateLeaguePredictionsFilters=e.PrivateLeaguePostsFilters=e.PrivateLeagueFilters=e.MyLeaguesFilters=e.InvitationFilters=e.PrivateLeaguesModel=e.PrivateLeaguePredictionsModel=void 0,e.PotmResultsMetaModel=e.PotmResultsModel=e.PotmResultsResponseModel=e.PotmUserVotesModel=e.PotmUserVotesResponseModel=e.PotmUserVotesFilters=e.PollsUserVotesModel=e.PollsModel=e.SinglePollVoteModel=e.PollVoteFullModel=e.PollVoteBasicModel=e.PreferenceMappingModel=e.PollOptionModel=e.PollFullModel=e.PollBasicModel=e.PollsFilters=e.TopXPredictionRequestModel=e.PredictionTopXModel=e.UserListWinners=e.ContestWinners=e.TimeTiebreaker=e.TiebreakerModel=e.GamesTopXListModel=e.GamesListModel=e.GamesFilters=e.GameResultsModel=e.GameModel=e.GameByIdModel=e.FixturesTopXModel=void 0;var i=n(80316);Object.defineProperty(e,"ActivityMeta",{enumerable:!0,get:function(){return r(i).default}});var a=n(21517);Object.defineProperty(e,"ActivityResponseBody",{enumerable:!0,get:function(){return r(a).default}});var s=n(16021);Object.defineProperty(e,"PaginationActivities",{enumerable:!0,get:function(){return r(s).default}});var o=n(82195);Object.defineProperty(e,"ActivityFilters",{enumerable:!0,get:function(){return r(o).default}});var u=n(60629);Object.defineProperty(e,"OwnActivityFilters",{enumerable:!0,get:function(){return r(u).default}});var l=n(28636);Object.defineProperty(e,"UserActivityFilters",{enumerable:!0,get:function(){return r(l).default}});var c=n(74630);Object.defineProperty(e,"CreateActivityRequestBody",{enumerable:!0,get:function(){return r(c).default}});var d=n(51382);Object.defineProperty(e,"CampaignModel",{enumerable:!0,get:function(){return r(d).default}});var f=n(37976);Object.defineProperty(e,"ContentModel",{enumerable:!0,get:function(){return r(f).default}});var h=n(72820);Object.defineProperty(e,"ContextModel",{enumerable:!0,get:function(){return r(h).default}});var p=n(87060);Object.defineProperty(e,"TagsModel",{enumerable:!0,get:function(){return r(p).default}});var m=n(51922);Object.defineProperty(e,"BracketGameModel",{enumerable:!0,get:function(){return r(m).default}});var v=n(20594);Object.defineProperty(e,"BracketGameTiebreakerModel",{enumerable:!0,get:function(){return r(v).default}});var _=n(34971);Object.defineProperty(e,"BracketGameMetaModel",{enumerable:!0,get:function(){return r(_).default}});var y=n(29070);Object.defineProperty(e,"BracketGameMetaParticipantsModel",{enumerable:!0,get:function(){return r(y).default}});var g=n(18486);Object.defineProperty(e,"BracketGameFixturesModel",{enumerable:!0,get:function(){return r(g).default}});var b=n(73911);Object.defineProperty(e,"BracketGameFixtureScoreModel",{enumerable:!0,get:function(){return r(b).default}});var w=n(83685);Object.defineProperty(e,"BracketGamePredictionsFilters",{enumerable:!0,get:function(){return r(w).default}});var E=n(96166);Object.defineProperty(e,"BracketGamePredictionModel",{enumerable:!0,get:function(){return r(E).default}});var I=n(33830);Object.defineProperty(e,"BracketGamePredictionFixturesModel",{enumerable:!0,get:function(){return r(I).default}});var M=n(41198);Object.defineProperty(e,"BracketGameTiebreaker",{enumerable:!0,get:function(){return r(M).default}});var O=n(7583);Object.defineProperty(e,"BracketGamePredictionRequestBody",{enumerable:!0,get:function(){return r(O).default}});var P=n(15142);Object.defineProperty(e,"BracketGameFixtures",{enumerable:!0,get:function(){return r(P).default}});var T=n(46040);Object.defineProperty(e,"BracketGamePredictionsModel",{enumerable:!0,get:function(){return r(T).default}});var S=n(73253);Object.defineProperty(e,"BracketGameFilters",{enumerable:!0,get:function(){return r(S).default}});var A=n(49992);Object.defineProperty(e,"BracketGamesModel",{enumerable:!0,get:function(){return r(A).default}});var C=n(6932);Object.defineProperty(e,"BracketGameRankingsModel",{enumerable:!0,get:function(){return r(C).default}});var R=n(76085);Object.defineProperty(e,"AcceptChallengeModel",{enumerable:!0,get:function(){return r(R).default}});var D=n(95124);Object.defineProperty(e,"ChallengeCreateModel",{enumerable:!0,get:function(){return r(D).default}});var F=n(39845);Object.defineProperty(e,"ChallengeUpdateModel",{enumerable:!0,get:function(){return r(F).default}});var L=n(33820);Object.defineProperty(e,"ChallengeFilters",{enumerable:!0,get:function(){return r(L).default}});var k=n(62388);Object.defineProperty(e,"MyChallengesFilters",{enumerable:!0,get:function(){return r(k).default}});var j=n(11298);Object.defineProperty(e,"ChallengeRankingsModel",{enumerable:!0,get:function(){return r(j).default}});var N=n(77897);Object.defineProperty(e,"DiscussionModel",{enumerable:!0,get:function(){return r(N).default}});var x=n(39838);Object.defineProperty(e,"CreatePostParamBody",{enumerable:!0,get:function(){return r(x).default}});var G=n(44071);Object.defineProperty(e,"PostByIdBasicModel",{enumerable:!0,get:function(){return r(G).default}});var U=n(42528);Object.defineProperty(e,"PostByIdFullModel",{enumerable:!0,get:function(){return r(U).default}});var B=n(25678);Object.defineProperty(e,"PostCreateModel",{enumerable:!0,get:function(){return r(B).default}});var V=n(70377);Object.defineProperty(e,"PostsCountDiscussionModel",{enumerable:!0,get:function(){return r(V).default}});var H=n(29331);Object.defineProperty(e,"PostsDiscussionBasicModel",{enumerable:!0,get:function(){return r(H).default}});var z=n(64858);Object.defineProperty(e,"PostsFullModel",{enumerable:!0,get:function(){return r(z).default}});var q=n(19448);Object.defineProperty(e,"PostsMetaModel",{enumerable:!0,get:function(){return r(q).default}});var W=n(84071);Object.defineProperty(e,"PostsModel",{enumerable:!0,get:function(){return r(W).default}});var Q=n(51579);Object.defineProperty(e,"ReactionModel",{enumerable:!0,get:function(){return r(Q).default}});var Y=n(83687);Object.defineProperty(e,"ReportModel",{enumerable:!0,get:function(){return r(Y).default}});var X=n(85789);Object.defineProperty(e,"VersionsModel",{enumerable:!0,get:function(){return r(X).default}});var K=n(33949);Object.defineProperty(e,"AutomaticModerationModel",{enumerable:!0,get:function(){return r(K).default}});var J=n(61079);Object.defineProperty(e,"DictionaryModel",{enumerable:!0,get:function(){return r(J).default}});var Z=n(18543);Object.defineProperty(e,"DiscussionsConfigModel",{enumerable:!0,get:function(){return r(Z).default}});var $=n(90505);Object.defineProperty(e,"DiscussionsFilters",{enumerable:!0,get:function(){return r($).default}});var tt=n(39209);Object.defineProperty(e,"PostsFilters",{enumerable:!0,get:function(){return r(tt).default}});var et=n(54804);Object.defineProperty(e,"TopDiscussionsFilters",{enumerable:!0,get:function(){return r(et).default}});var nt=n(74809);Object.defineProperty(e,"EventGameModel",{enumerable:!0,get:function(){return r(nt).default}});var rt=n(11407);Object.defineProperty(e,"EventGamesModel",{enumerable:!0,get:function(){return r(rt).default}});var it=n(95106);Object.defineProperty(e,"EventGameFixturesModel",{enumerable:!0,get:function(){return r(it).default}});var at=n(62372);Object.defineProperty(e,"EventGameTiebreakerModel",{enumerable:!0,get:function(){return r(at).default}});var st=n(23737);Object.defineProperty(e,"EventGameFilters",{enumerable:!0,get:function(){return r(st).default}});var ot=n(38651);Object.defineProperty(e,"EventGamePredictionsFilters",{enumerable:!0,get:function(){return r(ot).default}});var ut=n(2431);Object.defineProperty(e,"EventGameRankingsFilters",{enumerable:!0,get:function(){return r(ut).default}});var lt=n(77618);Object.defineProperty(e,"EventGamePredictionModel",{enumerable:!0,get:function(){return r(lt).default}});var ct=n(85);Object.defineProperty(e,"EventGamePredictionFixturesModel",{enumerable:!0,get:function(){return r(ct).default}});var dt=n(31836);Object.defineProperty(e,"EventGameTiebreaker",{enumerable:!0,get:function(){return r(dt).default}});var ft=n(12882);Object.defineProperty(e,"EventGameFixtures",{enumerable:!0,get:function(){return r(ft).default}});var ht=n(50992);Object.defineProperty(e,"EventGamePredictionRequestBody",{enumerable:!0,get:function(){return r(ht).default}});var pt=n(3868);Object.defineProperty(e,"EventGamePredictionsModel",{enumerable:!0,get:function(){return r(pt).default}});var mt=n(58096);Object.defineProperty(e,"EventGameRankingsModel",{enumerable:!0,get:function(){return r(mt).default}});var vt=n(58012);Object.defineProperty(e,"EventGameFixtureEnumModel",{enumerable:!0,get:function(){return r(vt).default}});var _t=n(2703);Object.defineProperty(e,"EventGameFixtureNumberModel",{enumerable:!0,get:function(){return r(_t).default}});var yt=n(62535);Object.defineProperty(e,"StandardFansUnitedException",{enumerable:!0,get:function(){return r(yt).default}});var gt=n(48712);Object.defineProperty(e,"FansUnitedSdkFetchException",{enumerable:!0,get:function(){return r(gt).default}});var bt=n(16808);Object.defineProperty(e,"FantasyPlayerDetailedStatsModel",{enumerable:!0,get:function(){return r(bt).default}});var wt=n(58152);Object.defineProperty(e,"FantasyPlayerStatsModel",{enumerable:!0,get:function(){return r(wt).default}});var Et=n(55769);Object.defineProperty(e,"FantasyPlayersPointsModel",{enumerable:!0,get:function(){return r(Et).default}});var It=n(68031);Object.defineProperty(e,"FantasyPredictionRequestBody",{enumerable:!0,get:function(){return r(It).default}});var Mt=n(46472);Object.defineProperty(e,"PlayerDetailedPointsModel",{enumerable:!0,get:function(){return r(Mt).default}});var Ot=n(69922);Object.defineProperty(e,"PlayerDetailedStatsModel",{enumerable:!0,get:function(){return r(Ot).default}});var Pt=n(98571);Object.defineProperty(e,"PlayerPointsModel",{enumerable:!0,get:function(){return r(Pt).default}});var Tt=n(83327);Object.defineProperty(e,"PlayerStatsMatchModel",{enumerable:!0,get:function(){return r(Tt).default}});var St=n(4339);Object.defineProperty(e,"FantasyCoefficientsModel",{enumerable:!0,get:function(){return r(St).default}});var At=n(60516);Object.defineProperty(e,"FantasyConfigModel",{enumerable:!0,get:function(){return r(At).default}});var Ct=n(71002);Object.defineProperty(e,"FantasyPlayersModel",{enumerable:!0,get:function(){return r(Ct).default}});var Rt=n(47626);Object.defineProperty(e,"FantasyMultipliersModel",{enumerable:!0,get:function(){return r(Rt).default}});var Dt=n(63096);Object.defineProperty(e,"FantasyPlayerDetailedStatsMetaModel",{enumerable:!0,get:function(){return r(Dt).default}});var Ft=n(52158);Object.defineProperty(e,"FantasyPlayersMetaModel",{enumerable:!0,get:function(){return r(Ft).default}});var Lt=n(54563);Object.defineProperty(e,"PlayerDetailedStatsFilters",{enumerable:!0,get:function(){return r(Lt).default}});var kt=n(21890);Object.defineProperty(e,"PlayersPointsFilters",{enumerable:!0,get:function(){return r(kt).default}});var jt=n(96975);Object.defineProperty(e,"CompetitionBasicModel",{enumerable:!0,get:function(){return r(jt).default}});var Nt=n(12754);Object.defineProperty(e,"CompetitionFilters",{enumerable:!0,get:function(){return r(Nt).default}});var xt=n(73321);Object.defineProperty(e,"CompetitionFullModel",{enumerable:!0,get:function(){return r(xt).default}});var Gt=n(24427);Object.defineProperty(e,"FootballCountryModel",{enumerable:!0,get:function(){return r(Gt).default}});var Ut=n(13572);Object.defineProperty(e,"MatchBasicModel",{enumerable:!0,get:function(){return r(Ut).default}});var Bt=n(79661);Object.defineProperty(e,"MatchFullModel",{enumerable:!0,get:function(){return r(Bt).default}});var Vt=n(86134);Object.defineProperty(e,"MatchFilters",{enumerable:!0,get:function(){return r(Vt).default}});var Ht=n(36899);Object.defineProperty(e,"MatchStatus",{enumerable:!0,get:function(){return r(Ht).default}});var zt=n(77950);Object.defineProperty(e,"StatsModel",{enumerable:!0,get:function(){return r(zt).default}});var qt=n(4652);Object.defineProperty(e,"ScoresModel",{enumerable:!0,get:function(){return r(qt).default}});var Wt=n(28470);Object.defineProperty(e,"LineupsModel",{enumerable:!0,get:function(){return r(Wt).default}});var Qt=n(59452);Object.defineProperty(e,"TimelineModel",{enumerable:!0,get:function(){return r(Qt).default}});var Yt=n(46780);Object.defineProperty(e,"PlayerStatsModel",{enumerable:!0,get:function(){return r(Yt).default}});var Xt=n(24426);Object.defineProperty(e,"PlayerBasicModel",{enumerable:!0,get:function(){return r(Xt).default}});var Kt=n(21837);Object.defineProperty(e,"PlayerFullModel",{enumerable:!0,get:function(){return r(Kt).default}});var Jt=n(59071);Object.defineProperty(e,"PlayerSquadModel",{enumerable:!0,get:function(){return r(Jt).default}});var Zt=n(30056);Object.defineProperty(e,"TopPlayerModel",{enumerable:!0,get:function(){return r(Zt).default}});var $t=n(26477);Object.defineProperty(e,"PlayerFilters",{enumerable:!0,get:function(){return r($t).default}});var te=n(38632);Object.defineProperty(e,"PlayerAssetsModel",{enumerable:!0,get:function(){return r(te).default}});var ee=n(32858);Object.defineProperty(e,"PlayerMarketResultModel",{enumerable:!0,get:function(){return r(ee).default}});var ne=n(44803);Object.defineProperty(e,"PlayerShortModel",{enumerable:!0,get:function(){return r(ne).default}});var re=n(99314);Object.defineProperty(e,"TeamBasicModel",{enumerable:!0,get:function(){return r(re).default}});var ie=n(57316);Object.defineProperty(e,"TeamFullModel",{enumerable:!0,get:function(){return r(ie).default}});var ae=n(59920);Object.defineProperty(e,"TeamFilters",{enumerable:!0,get:function(){return r(ae).default}});var se=n(33773);Object.defineProperty(e,"TeamColors",{enumerable:!0,get:function(){return r(se).default}});var oe=n(61284);Object.defineProperty(e,"TeamFormModel",{enumerable:!0,get:function(){return r(oe).default}});var ue=n(36967);Object.defineProperty(e,"SearchModel",{enumerable:!0,get:function(){return r(ue).default}});var le=n(40604);Object.defineProperty(e,"SearchFilters",{enumerable:!0,get:function(){return r(le).default}});var ce=n(90753);Object.defineProperty(e,"FootballPaginationModel",{enumerable:!0,get:function(){return r(ce).default}});var de=n(73569);Object.defineProperty(e,"MetaFootballModel",{enumerable:!0,get:function(){return r(de).default}});var fe=n(10155);Object.defineProperty(e,"PaginationFootballProperties",{enumerable:!0,get:function(){return r(fe).default}});var he=n(39188);Object.defineProperty(e,"AssetsModel",{enumerable:!0,get:function(){return r(he).default}});var pe=n(43529);Object.defineProperty(e,"FansUnitedSDKModel",{enumerable:!0,get:function(){return r(pe).default}});var me=n(17563);Object.defineProperty(e,"SDKConfiguraitonModel",{enumerable:!0,get:function(){return r(me).default}});var ve=n(30439);Object.defineProperty(e,"ImagesModel",{enumerable:!0,get:function(){return r(ve).default}});var _e=n(78923);Object.defineProperty(e,"RelatedEntityRelationship",{enumerable:!0,get:function(){return r(_e).default}});var ye=n(6862);Object.defineProperty(e,"BrandingModel",{enumerable:!0,get:function(){return r(ye).default}});var ge=n(81282);Object.defineProperty(e,"BrandingColorsModel",{enumerable:!0,get:function(){return r(ge).default}});var be=n(12291);Object.defineProperty(e,"BrandingUrlsModel",{enumerable:!0,get:function(){return r(be).default}});var we=n(1997);Object.defineProperty(e,"BrandingImagesModel",{enumerable:!0,get:function(){return r(we).default}});var Ee=n(62475);Object.defineProperty(e,"PreferenceModel",{enumerable:!0,get:function(){return r(Ee).default}});var Ie=n(47589);Object.defineProperty(e,"MappingResponseModel",{enumerable:!0,get:function(){return r(Ie).default}});var Me=n(6448);Object.defineProperty(e,"MappingModel",{enumerable:!0,get:function(){return r(Me).default}});var Oe=n(80138);Object.defineProperty(e,"ListContentResponseModel",{enumerable:!0,get:function(){return r(Oe).default}});var Pe=n(97053);Object.defineProperty(e,"ListContentModel",{enumerable:!0,get:function(){return r(Pe).default}});var Te=n(9517);Object.defineProperty(e,"ListContentFilters",{enumerable:!0,get:function(){return r(Te).default}});var Se=n(78153);Object.defineProperty(e,"ActionValueModel",{enumerable:!0,get:function(){return r(Se).default}});var Ae=n(75111);Object.defineProperty(e,"ActionsModel",{enumerable:!0,get:function(){return r(Ae).default}});var Ce=n(38608);Object.defineProperty(e,"BadgesModel",{enumerable:!0,get:function(){return r(Ce).default}});var Re=n(70246);Object.defineProperty(e,"BadgesValue",{enumerable:!0,get:function(){return r(Re).default}});var De=n(18687);Object.defineProperty(e,"ClientBadges",{enumerable:!0,get:function(){return r(De).default}});var Fe=n(77983);Object.defineProperty(e,"GeneralBadgesValue",{enumerable:!0,get:function(){return r(Fe).default}});var Le=n(82354);Object.defineProperty(e,"GeneralRequirementModel",{enumerable:!0,get:function(){return r(Le).default}});var ke=n(51429);Object.defineProperty(e,"RequirementModel",{enumerable:!0,get:function(){return r(ke).default}});var je=n(49750);Object.defineProperty(e,"BadgesModelV2",{enumerable:!0,get:function(){return r(je).default}});var Ne=n(99805);Object.defineProperty(e,"BadgesValueV2",{enumerable:!0,get:function(){return r(Ne).default}});var xe=n(63636);Object.defineProperty(e,"ClientBadgesV2",{enumerable:!0,get:function(){return r(xe).default}});var Ge=n(50075);Object.defineProperty(e,"DiscussionsBadgeRequirements",{enumerable:!0,get:function(){return r(Ge).default}});var Ue=n(33101);Object.defineProperty(e,"DiscussionsBadgesValue",{enumerable:!0,get:function(){return r(Ue).default}});var Be=n(11963);Object.defineProperty(e,"FootballBadgeRequirements",{enumerable:!0,get:function(){return r(Be).default}});var Ve=n(93035);Object.defineProperty(e,"FootballBadgesValue",{enumerable:!0,get:function(){return r(Ve).default}});var He=n(64270);Object.defineProperty(e,"GameBadgeRequirements",{enumerable:!0,get:function(){return r(He).default}});var ze=n(68699);Object.defineProperty(e,"GameBadgesValue",{enumerable:!0,get:function(){return r(ze).default}});var qe=n(33626);Object.defineProperty(e,"GamesBadgeRequirements",{enumerable:!0,get:function(){return r(qe).default}});var We=n(16268);Object.defineProperty(e,"GamesBadgesValue",{enumerable:!0,get:function(){return r(We).default}});var Qe=n(45643);Object.defineProperty(e,"MiniGamesBadgeRequirements",{enumerable:!0,get:function(){return r(Qe).default}});var Ye=n(38574);Object.defineProperty(e,"MiniGamesBadgesValue",{enumerable:!0,get:function(){return r(Ye).default}});var Xe=n(63143);Object.defineProperty(e,"PredictorBadgeRequirements",{enumerable:!0,get:function(){return r(Xe).default}});var Ke=n(95793);Object.defineProperty(e,"PredictorBadgesValue",{enumerable:!0,get:function(){return r(Ke).default}});var Je=n(98743);Object.defineProperty(e,"PollBadgesValue",{enumerable:!0,get:function(){return r(Je).default}});var Ze=n(21821);Object.defineProperty(e,"VotingBadgeRequirements",{enumerable:!0,get:function(){return r(Ze).default}});var $e=n(64646);Object.defineProperty(e,"PotmBadgesValue",{enumerable:!0,get:function(){return r($e).default}});var tn=n(27978);Object.defineProperty(e,"VotingBadgesValue",{enumerable:!0,get:function(){return r(tn).default}});var en=n(50515);Object.defineProperty(e,"LoyaltyConfigModel",{enumerable:!0,get:function(){return r(en).default}});var nn=n(16866);Object.defineProperty(e,"LoyaltyConfigModelV2",{enumerable:!0,get:function(){return r(nn).default}});var rn=n(46480);Object.defineProperty(e,"EntitiesFollows",{enumerable:!0,get:function(){return r(rn).default}});var an=n(91634);Object.defineProperty(e,"EntitiesFollowsFilters",{enumerable:!0,get:function(){return r(an).default}});var sn=n(63247);Object.defineProperty(e,"HighestSuccessRateFilters",{enumerable:!0,get:function(){return r(sn).default}});var on=n(84169);Object.defineProperty(e,"LeagueLeaderboardFilters",{enumerable:!0,get:function(){return r(on).default}});var un=n(97910);Object.defineProperty(e,"LoyaltyFilters",{enumerable:!0,get:function(){return r(un).default}});var ln=n(34996);Object.defineProperty(e,"RankingsFilters",{enumerable:!0,get:function(){return r(ln).default}});var cn=n(48061);Object.defineProperty(e,"TemplateFilters",{enumerable:!0,get:function(){return r(cn).default}});var dn=n(56507);Object.defineProperty(e,"HighestSuccessRateModel",{enumerable:!0,get:function(){return r(dn).default}});var fn=n(91317);Object.defineProperty(e,"LeaderboardLeagueResponse",{enumerable:!0,get:function(){return r(fn).default}});var hn=n(27460);Object.defineProperty(e,"LeaderboardResponseModel",{enumerable:!0,get:function(){return r(hn).default}});var pn=n(69642);Object.defineProperty(e,"LeaderboardModel",{enumerable:!0,get:function(){return r(pn).default}});var mn=n(93409);Object.defineProperty(e,"FiltersMetaModel",{enumerable:!0,get:function(){return r(mn).default}});var vn=n(68988);Object.defineProperty(e,"LeagueLeaderboardMetaModel",{enumerable:!0,get:function(){return r(vn).default}});var _n=n(45828);Object.defineProperty(e,"LoyaltyMeta",{enumerable:!0,get:function(){return r(_n).default}});var yn=n(69012);Object.defineProperty(e,"TemplateMeta",{enumerable:!0,get:function(){return r(yn).default}});var gn=n(5038);Object.defineProperty(e,"Points",{enumerable:!0,get:function(){return r(gn).default}});var bn=n(4187);Object.defineProperty(e,"PointsModel",{enumerable:!0,get:function(){return r(bn).default}});var wn=n(78072);Object.defineProperty(e,"PointsValueModel",{enumerable:!0,get:function(){return r(wn).default}});var En=n(9013);Object.defineProperty(e,"RankingsModel",{enumerable:!0,get:function(){return r(En).default}});var In=n(94226);Object.defineProperty(e,"RewardsModel",{enumerable:!0,get:function(){return r(In).default}});var Mn=n(66483);Object.defineProperty(e,"RewardsModelV2",{enumerable:!0,get:function(){return r(Mn).default}});var On=n(36569);Object.defineProperty(e,"TemplateBreakdownModel",{enumerable:!0,get:function(){return r(On).default}});var Pn=n(33224);Object.defineProperty(e,"TemplateBreakdownPointsModel",{enumerable:!0,get:function(){return r(Pn).default}});var Tn=n(30194);Object.defineProperty(e,"TemplateModel",{enumerable:!0,get:function(){return r(Tn).default}});var Sn=n(44982);Object.defineProperty(e,"TemplateByIdModel",{enumerable:!0,get:function(){return r(Sn).default}});var An=n(49324);Object.defineProperty(e,"TemplateGroups",{enumerable:!0,get:function(){return r(An).default}});var Cn=n(8587);Object.defineProperty(e,"TemplateGroupFilter",{enumerable:!0,get:function(){return r(Cn).default}});var Rn=n(47478);Object.defineProperty(e,"TiersModel",{enumerable:!0,get:function(){return r(Rn).default}});var Dn=n(45765);Object.defineProperty(e,"MatchQuizConfigModel",{enumerable:!0,get:function(){return r(Dn).default}});var Fn=n(38410);Object.defineProperty(e,"FixturesMatchQuizModel",{enumerable:!0,get:function(){return r(Fn).default}});var Ln=n(30670);Object.defineProperty(e,"GameMarketsResults",{enumerable:!0,get:function(){return r(Ln).default}});var kn=n(87243);Object.defineProperty(e,"GamesMatchQuizListModel",{enumerable:!0,get:function(){return r(kn).default}});var jn=n(68042);Object.defineProperty(e,"PredictionMatchQuizModel",{enumerable:!0,get:function(){return r(jn).default}});var Nn=n(65985);Object.defineProperty(e,"ClassicQuizBasicModel",{enumerable:!0,get:function(){return r(Nn).default}});var xn=n(28107);Object.defineProperty(e,"ClassicQuizFilters",{enumerable:!0,get:function(){return r(xn).default}});var Gn=n(96235);Object.defineProperty(e,"ClassicQuizFullModel",{enumerable:!0,get:function(){return r(Gn).default}});var Un=n(20772);Object.defineProperty(e,"ClassicQuizQuestionModel",{enumerable:!0,get:function(){return r(Un).default}});var Bn=n(41154);Object.defineProperty(e,"ClassicQuizOptionModel",{enumerable:!0,get:function(){return r(Bn).default}});var Vn=n(13142);Object.defineProperty(e,"ClassicQuizParticipationBodyModel",{enumerable:!0,get:function(){return r(Vn).default}});var Hn=n(68944);Object.defineProperty(e,"ClassicQuizParticipationModel",{enumerable:!0,get:function(){return r(Hn).default}});var zn=n(47763);Object.defineProperty(e,"ClassicQuizParticipationQuestionModel",{enumerable:!0,get:function(){return r(zn).default}});var qn=n(63069);Object.defineProperty(e,"ClassicQuizParticipationsFilters",{enumerable:!0,get:function(){return r(qn).default}});var Wn=n(81124);Object.defineProperty(e,"ClassicQuizUserParticipationModel",{enumerable:!0,get:function(){return r(Wn).default}});var Qn=n(85657);Object.defineProperty(e,"ClassicQuizzesModel",{enumerable:!0,get:function(){return r(Qn).default}});var Yn=n(91717);Object.defineProperty(e,"ClassicQuizQuestionsReportModel",{enumerable:!0,get:function(){return r(Yn).default}});var Xn=n(19657);Object.defineProperty(e,"ClassicQuizFiltersMeta",{enumerable:!0,get:function(){return r(Xn).default}});var Kn=n(32261);Object.defineProperty(e,"ClassicQuizLeaderboardFilters",{enumerable:!0,get:function(){return r(Kn).default}});var Jn=n(12702);Object.defineProperty(e,"ClassicQuizLeaderboardMeta",{enumerable:!0,get:function(){return r(Jn).default}});var Zn=n(80425);Object.defineProperty(e,"ClassicQuizRankFilters",{enumerable:!0,get:function(){return r(Zn).default}});var $n=n(75563);Object.defineProperty(e,"ClassicQuizRankModel",{enumerable:!0,get:function(){return r($n).default}});var tr=n(38967);Object.defineProperty(e,"ClassicQuizUserRank",{enumerable:!0,get:function(){return r(tr).default}});var er=n(12723);Object.defineProperty(e,"ClassicQuizUserRankModel",{enumerable:!0,get:function(){return r(er).default}});var nr=n(43238);Object.defineProperty(e,"ClassicQuizzesLeaderboardModel",{enumerable:!0,get:function(){return r(nr).default}});var rr=n(69619);Object.defineProperty(e,"EitherOrBasicModel",{enumerable:!0,get:function(){return r(rr).default}});var ir=n(67050);Object.defineProperty(e,"EitherOrFilters",{enumerable:!0,get:function(){return r(ir).default}});var ar=n(3167);Object.defineProperty(e,"EitherOrFullModel",{enumerable:!0,get:function(){return r(ar).default}});var sr=n(69146);Object.defineProperty(e,"EitherOrPointsModel",{enumerable:!0,get:function(){return r(sr).default}});var or=n(11969);Object.defineProperty(e,"EitherOrsModel",{enumerable:!0,get:function(){return r(or).default}});var ur=n(15367);Object.defineProperty(e,"EitherOrStatsModel",{enumerable:!0,get:function(){return r(ur).default}});var lr=n(55021);Object.defineProperty(e,"EitherOrParticipationModel",{enumerable:!0,get:function(){return r(lr).default}});var cr=n(70850);Object.defineProperty(e,"EitherOrParticipationRequestFullModel",{enumerable:!0,get:function(){return r(cr).default}});var dr=n(55990);Object.defineProperty(e,"EitherOrParticipationRequestModel",{enumerable:!0,get:function(){return r(dr).default}});var fr=n(12557);Object.defineProperty(e,"EitherOrParticipationStepsModel",{enumerable:!0,get:function(){return r(fr).default}});var hr=n(56140);Object.defineProperty(e,"EitherOrParticipationStepsOptionModel",{enumerable:!0,get:function(){return r(hr).default}});var pr=n(12699);Object.defineProperty(e,"EitherOrResultsBreakdownModel",{enumerable:!0,get:function(){return r(pr).default}});var mr=n(8590);Object.defineProperty(e,"EitherOrResultsModel",{enumerable:!0,get:function(){return r(mr).default}});var vr=n(45289);Object.defineProperty(e,"EitherOrResultsStandingsModel",{enumerable:!0,get:function(){return r(vr).default}});var _r=n(55253);Object.defineProperty(e,"MiniGameImages",{enumerable:!0,get:function(){return r(_r).default}});var yr=n(76282);Object.defineProperty(e,"MiniGamesContext",{enumerable:!0,get:function(){return r(yr).default}});var gr=n(43323);Object.defineProperty(e,"MiniGamesContextTag",{enumerable:!0,get:function(){return r(gr).default}});var br=n(96021);Object.defineProperty(e,"MiniGamesFilters",{enumerable:!0,get:function(){return r(br).default}});var wr=n(64274);Object.defineProperty(e,"ResultsSummaryModel",{enumerable:!0,get:function(){return r(wr).default}});var Er=n(23130);Object.defineProperty(e,"PersonalityQuizBasicModel",{enumerable:!0,get:function(){return r(Er).default}});var Ir=n(53279);Object.defineProperty(e,"PersonalityQuizzesModel",{enumerable:!0,get:function(){return r(Ir).default}});var Mr=n(92314);Object.defineProperty(e,"PersonalityQuizResultsModel",{enumerable:!0,get:function(){return r(Mr).default}});var Or=n(48930);Object.defineProperty(e,"PersonalityQuizQuestionModel",{enumerable:!0,get:function(){return r(Or).default}});var Pr=n(65666);Object.defineProperty(e,"PersonalityQuizPersonaPointsModel",{enumerable:!0,get:function(){return r(Pr).default}});var Tr=n(67283);Object.defineProperty(e,"PersonalityQuizOptionModel",{enumerable:!0,get:function(){return r(Tr).default}});var Sr=n(65880);Object.defineProperty(e,"PersonalityQuizFullModel",{enumerable:!0,get:function(){return r(Sr).default}});var Ar=n(95403);Object.defineProperty(e,"PersonalityQuizFilters",{enumerable:!0,get:function(){return r(Ar).default}});var Cr=n(23648);Object.defineProperty(e,"PersonalityQuizParticipationBodyModel",{enumerable:!0,get:function(){return r(Cr).default}});var Rr=n(82682);Object.defineProperty(e,"PersonalityQuizParticipationModel",{enumerable:!0,get:function(){return r(Rr).default}});var Dr=n(94663);Object.defineProperty(e,"PersonalityQuizParticipationQuestionModel",{enumerable:!0,get:function(){return r(Dr).default}});var Fr=n(73806);Object.defineProperty(e,"PersonalityQuizPersonaPercentsModel",{enumerable:!0,get:function(){return r(Fr).default}});var Lr=n(37104);Object.defineProperty(e,"BookmakerModel",{enumerable:!0,get:function(){return r(Lr).default}});var kr=n(98446);Object.defineProperty(e,"BookmakerBrandingModel",{enumerable:!0,get:function(){return r(kr).default}});var jr=n(44875);Object.defineProperty(e,"BookmakerLinkModel",{enumerable:!0,get:function(){return r(jr).default}});var Nr=n(20660);Object.defineProperty(e,"BookmakerAssetModel",{enumerable:!0,get:function(){return r(Nr).default}});var xr=n(48287);Object.defineProperty(e,"BookmakerUrlModel",{enumerable:!0,get:function(){return r(xr).default}});var Gr=n(69196);Object.defineProperty(e,"MatchOddsFilters",{enumerable:!0,get:function(){return r(Gr).default}});var Ur=n(62641);Object.defineProperty(e,"MatchOddsMarketModel",{enumerable:!0,get:function(){return r(Ur).default}});var Br=n(71115);Object.defineProperty(e,"MatchOddsMarketScopeModel",{enumerable:!0,get:function(){return r(Br).default}});var Vr=n(42218);Object.defineProperty(e,"MatchOddsMarketSelectionModel",{enumerable:!0,get:function(){return r(Vr).default}});var Hr=n(47951);Object.defineProperty(e,"MatchOddsMarketTypeModel",{enumerable:!0,get:function(){return r(Hr).default}});var zr=n(97935);Object.defineProperty(e,"SelectionProviderInfoModel",{enumerable:!0,get:function(){return r(zr).default}});var qr=n(3002);Object.defineProperty(e,"MatchOddsModel",{enumerable:!0,get:function(){return r(qr).default}});var Wr=n(83918);Object.defineProperty(e,"MarketsConfigModel",{enumerable:!0,get:function(){return r(Wr).default}});var Qr=n(58452);Object.defineProperty(e,"PredictorConfigModel",{enumerable:!0,get:function(){return r(Qr).default}});var Yr=n(40442);Object.defineProperty(e,"SuccessRateScopeModel",{enumerable:!0,get:function(){return r(Yr).default}});var Xr=n(28824);Object.defineProperty(e,"UserDataConfigModel",{enumerable:!0,get:function(){return r(Xr).default}});var Kr=n(46367);Object.defineProperty(e,"FixturesPredictionModel",{enumerable:!0,get:function(){return r(Kr).default}});var Jr=n(22524);Object.defineProperty(e,"FixturesResponseModel",{enumerable:!0,get:function(){return r(Jr).default}});var Zr=n(54119);Object.defineProperty(e,"ResultModel",{enumerable:!0,get:function(){return r(Zr).default}});var $r=n(61206);Object.defineProperty(e,"BothTeamsFixtureModel",{enumerable:!0,get:function(){return r($r).default}});var ti=n(45274);Object.defineProperty(e,"CornersFixtureModel",{enumerable:!0,get:function(){return r(ti).default}});var ei=n(91465);Object.defineProperty(e,"CorrectScoreFixtureModel",{enumerable:!0,get:function(){return r(ei).default}});var ni=n(47535);Object.defineProperty(e,"DoubleChanceFixtureModel",{enumerable:!0,get:function(){return r(ni).default}});var ri=n(27307);Object.defineProperty(e,"HalfTimeFullTimeFixtureModel",{enumerable:!0,get:function(){return r(ri).default}});var ii=n(91718);Object.defineProperty(e,"OneXTwoFixtureModel",{enumerable:!0,get:function(){return r(ii).default}});var ai=n(85132);Object.defineProperty(e,"OverCornersFixtureModel",{enumerable:!0,get:function(){return r(ai).default}});var si=n(87344);Object.defineProperty(e,"OverGoalsFixtureModel",{enumerable:!0,get:function(){return r(si).default}});var oi=n(71855);Object.defineProperty(e,"PenaltyMatchFixtureModel",{enumerable:!0,get:function(){return r(oi).default}});var ui=n(81732);Object.defineProperty(e,"PlayerFixtureModel",{enumerable:!0,get:function(){return r(ui).default}});var li=n(45814);Object.defineProperty(e,"RedCardFixtureModel",{enumerable:!0,get:function(){return r(li).default}});var ci=n(2155);Object.defineProperty(e,"CalculatedOneXTwoFromScoresModel",{enumerable:!0,get:function(){return r(ci).default}});var di=n(88821);Object.defineProperty(e,"TopCorrectScoresModel",{enumerable:!0,get:function(){return r(di).default}});var fi=n(18430);Object.defineProperty(e,"MatchCorrectScoreMarketResultModel",{enumerable:!0,get:function(){return r(fi).default}});var hi=n(12449);Object.defineProperty(e,"MatchMarketsResultsModel",{enumerable:!0,get:function(){return r(hi).default}});var pi=n(59506);Object.defineProperty(e,"MatchPlayerMarketResultModel",{enumerable:!0,get:function(){return r(pi).default}});var mi=n(45908);Object.defineProperty(e,"NoYesModel",{enumerable:!0,get:function(){return r(mi).default}});var vi=n(53950);Object.defineProperty(e,"PredictionRequestModel",{enumerable:!0,get:function(){return r(vi).default}});var _i=n(12532);Object.defineProperty(e,"PredictionResponseModel",{enumerable:!0,get:function(){return r(_i).default}});var yi=n(97782);Object.defineProperty(e,"PredictionsFilters",{enumerable:!0,get:function(){return r(yi).default}});var gi=n(13792);Object.defineProperty(e,"PredictionsModel",{enumerable:!0,get:function(){return r(gi).default}});var bi=n(19378);Object.defineProperty(e,"MatchSummaryModel",{enumerable:!0,get:function(){return r(bi).default}});var wi=n(77321);Object.defineProperty(e,"ValueAndPlayerId",{enumerable:!0,get:function(){return r(wi).default}});var Ei=n(89883);Object.defineProperty(e,"ValueBoolean",{enumerable:!0,get:function(){return r(Ei).default}});var Ii=n(78038);Object.defineProperty(e,"ValueCorners",{enumerable:!0,get:function(){return r(Ii).default}});var Mi=n(3125);Object.defineProperty(e,"ValueCorrectScore",{enumerable:!0,get:function(){return r(Mi).default}});var Oi=n(56902);Object.defineProperty(e,"ValueDoubleChance",{enumerable:!0,get:function(){return r(Oi).default}});var Pi=n(66642);Object.defineProperty(e,"ValueHalfTimeFullTime",{enumerable:!0,get:function(){return r(Pi).default}});var Ti=n(12782);Object.defineProperty(e,"ValueOneXTwo",{enumerable:!0,get:function(){return r(Ti).default}});var Si=n(73958);Object.defineProperty(e,"AcceptPrivateLeagueModel",{enumerable:!0,get:function(){return r(Si).default}});var Ai=n(72690);Object.defineProperty(e,"PastTemplateModel",{enumerable:!0,get:function(){return r(Ai).default}});var Ci=n(78383);Object.defineProperty(e,"PrivateLeagueFullModel",{enumerable:!0,get:function(){return r(Ci).default}});var Ri=n(98796);Object.defineProperty(e,"PrivateLeagueParamCreateBody",{enumerable:!0,get:function(){return r(Ri).default}});var Di=n(24225);Object.defineProperty(e,"PrivateLeagueParamUpdateBody",{enumerable:!0,get:function(){return r(Di).default}});var Fi=n(52663);Object.defineProperty(e,"PrivateLeaguePredictionModel",{enumerable:!0,get:function(){return r(Fi).default}});var Li=n(82446);Object.defineProperty(e,"PrivateLeagueModel",{enumerable:!0,get:function(){return r(Li).default}});var ki=n(16361);Object.defineProperty(e,"PrivateLeaguePredictionsModel",{enumerable:!0,get:function(){return r(ki).default}});var ji=n(30494);Object.defineProperty(e,"PrivateLeaguesModel",{enumerable:!0,get:function(){return r(ji).default}});var Ni=n(73886);Object.defineProperty(e,"InvitationFilters",{enumerable:!0,get:function(){return r(Ni).default}});var xi=n(54121);Object.defineProperty(e,"MyLeaguesFilters",{enumerable:!0,get:function(){return r(xi).default}});var Gi=n(31461);Object.defineProperty(e,"PrivateLeagueFilters",{enumerable:!0,get:function(){return r(Gi).default}});var Ui=n(49759);Object.defineProperty(e,"PrivateLeaguePostsFilters",{enumerable:!0,get:function(){return r(Ui).default}});var Bi=n(88247);Object.defineProperty(e,"PrivateLeaguePredictionsFilters",{enumerable:!0,get:function(){return r(Bi).default}});var Vi=n(99659);Object.defineProperty(e,"PrivateLeagueRankingsModel",{enumerable:!0,get:function(){return r(Vi).default}});var Hi=n(2167);Object.defineProperty(e,"PrivateLeagueBasicCreateModel",{enumerable:!0,get:function(){return r(Hi).default}});var zi=n(91796);Object.defineProperty(e,"PrivateLeagueCreateModel",{enumerable:!0,get:function(){return r(zi).default}});var qi=n(64584);Object.defineProperty(e,"PrivateLeagueBasicUpdateRequestBody",{enumerable:!0,get:function(){return r(qi).default}});var Wi=n(44823);Object.defineProperty(e,"PrivateLeagueUpdateModel",{enumerable:!0,get:function(){return r(Wi).default}});var Qi=n(23546);Object.defineProperty(e,"ProfileModel",{enumerable:!0,get:function(){return r(Qi).default}});var Yi=n(90133);Object.defineProperty(e,"DetailedProfileModel",{enumerable:!0,get:function(){return r(Yi).default}});var Xi=n(79072);Object.defineProperty(e,"ProfileCountryModel",{enumerable:!0,get:function(){return r(Xi).default}});var Ki=n(45867);Object.defineProperty(e,"InterestModel",{enumerable:!0,get:function(){return r(Ki).default}});var Ji=n(25156);Object.defineProperty(e,"FullInterestModel",{enumerable:!0,get:function(){return r(Ji).default}});var Zi=n(69523);Object.defineProperty(e,"FollowFilters",{enumerable:!0,get:function(){return r(Zi).default}});var $i=n(54782);Object.defineProperty(e,"FollowersModel",{enumerable:!0,get:function(){return r($i).default}});var ta=n(93106);Object.defineProperty(e,"FollowingModel",{enumerable:!0,get:function(){return r(ta).default}});var ea=n(41712);Object.defineProperty(e,"FollowModel",{enumerable:!0,get:function(){return r(ea).default}});var na=n(76620);Object.defineProperty(e,"BreakdownModel",{enumerable:!0,get:function(){return r(na).default}});var ra=n(47312);Object.defineProperty(e,"CompletedModel",{enumerable:!0,get:function(){return r(ra).default}});var ia=n(99037);Object.defineProperty(e,"FullnessProfile",{enumerable:!0,get:function(){return r(ia).default}});var aa=n(61758);Object.defineProperty(e,"AchievementsStats",{enumerable:!0,get:function(){return r(aa).default}});var sa=n(86635);Object.defineProperty(e,"ClassicQuizzesStats",{enumerable:!0,get:function(){return r(sa).default}});var oa=n(13009);Object.defineProperty(e,"DiscussionStats",{enumerable:!0,get:function(){return r(oa).default}});var ua=n(57165);Object.defineProperty(e,"EitherOrStats",{enumerable:!0,get:function(){return r(ua).default}});var la=n(3621);Object.defineProperty(e,"GamePredictionsStats",{enumerable:!0,get:function(){return r(la).default}});var ca=n(5490);Object.defineProperty(e,"PredictionsStats",{enumerable:!0,get:function(){return r(ca).default}});var da=n(81316);Object.defineProperty(e,"ProfileStatsModel",{enumerable:!0,get:function(){return r(da).default}});var fa=n(53195);Object.defineProperty(e,"SinglePredictionsBreakdown",{enumerable:!0,get:function(){return r(fa).default}});var ha=n(81342);Object.defineProperty(e,"SinglePredictionsStats",{enumerable:!0,get:function(){return r(ha).default}});var pa=n(9826);Object.defineProperty(e,"SuccessRatePercent",{enumerable:!0,get:function(){return r(pa).default}});var ma=n(75123);Object.defineProperty(e,"SuccessRates",{enumerable:!0,get:function(){return r(ma).default}});var va=n(63087);Object.defineProperty(e,"SummarizedBreakdown",{enumerable:!0,get:function(){return r(va).default}});var _a=n(31488);Object.defineProperty(e,"LeadRequestBody",{enumerable:!0,get:function(){return r(_a).default}});var ya=n(84440);Object.defineProperty(e,"LeadModel",{enumerable:!0,get:function(){return r(ya).default}});var ga=n(28212);Object.defineProperty(e,"FollowStatusModel",{enumerable:!0,get:function(){return r(ga).default}});var ba=n(27909);Object.defineProperty(e,"StandingGamesModel",{enumerable:!0,get:function(){return r(ba).default}});var wa=n(12934);Object.defineProperty(e,"StandingGameModel",{enumerable:!0,get:function(){return r(wa).default}});var Ea=n(7451);Object.defineProperty(e,"StandingGameMetaModel",{enumerable:!0,get:function(){return r(Ea).default}});var Ia=n(43807);Object.defineProperty(e,"StandingGameMetaParticipantsModel",{enumerable:!0,get:function(){return r(Ia).default}});var Ma=n(72911);Object.defineProperty(e,"StandingGamePredictionsModel",{enumerable:!0,get:function(){return r(Ma).default}});var Oa=n(46914);Object.defineProperty(e,"StandingGamesFilters",{enumerable:!0,get:function(){return r(Oa).default}});var Pa=n(1117);Object.defineProperty(e,"StandingGameRankingsFilters",{enumerable:!0,get:function(){return r(Pa).default}});var Ta=n(83201);Object.defineProperty(e,"StandingGamePredictionModel",{enumerable:!0,get:function(){return r(Ta).default}});var Sa=n(14148);Object.defineProperty(e,"StandingGameRankingsModel",{enumerable:!0,get:function(){return r(Sa).default}});var Aa=n(91180);Object.defineProperty(e,"TopXConfigModel",{enumerable:!0,get:function(){return r(Aa).default}});var Ca=n(7482);Object.defineProperty(e,"FixturesGamesModel",{enumerable:!0,get:function(){return r(Ca).default}});var Ra=n(15967);Object.defineProperty(e,"FixturesTopXModel",{enumerable:!0,get:function(){return r(Ra).default}});var Da=n(66247);Object.defineProperty(e,"GameByIdModel",{enumerable:!0,get:function(){return r(Da).default}});var Fa=n(36890);Object.defineProperty(e,"GameModel",{enumerable:!0,get:function(){return r(Fa).default}});var La=n(56160);Object.defineProperty(e,"GameResultsModel",{enumerable:!0,get:function(){return r(La).default}});var ka=n(7299);Object.defineProperty(e,"GamesFilters",{enumerable:!0,get:function(){return r(ka).default}});var ja=n(63751);Object.defineProperty(e,"GamesListModel",{enumerable:!0,get:function(){return r(ja).default}});var Na=n(68950);Object.defineProperty(e,"GamesTopXListModel",{enumerable:!0,get:function(){return r(Na).default}});var xa=n(97640);Object.defineProperty(e,"TiebreakerModel",{enumerable:!0,get:function(){return r(xa).default}});var Ga=n(64916);Object.defineProperty(e,"TimeTiebreaker",{enumerable:!0,get:function(){return r(Ga).default}});var Ua=n(21784);Object.defineProperty(e,"ContestWinners",{enumerable:!0,get:function(){return r(Ua).default}});var Ba=n(60824);Object.defineProperty(e,"UserListWinners",{enumerable:!0,get:function(){return r(Ba).default}});var Va=n(13381);Object.defineProperty(e,"PredictionTopXModel",{enumerable:!0,get:function(){return r(Va).default}});var Ha=n(1399);Object.defineProperty(e,"TopXPredictionRequestModel",{enumerable:!0,get:function(){return r(Ha).default}});var za=n(84790);Object.defineProperty(e,"PollsFilters",{enumerable:!0,get:function(){return r(za).default}});var qa=n(81770);Object.defineProperty(e,"PollBasicModel",{enumerable:!0,get:function(){return r(qa).default}});var Wa=n(1126);Object.defineProperty(e,"PollFullModel",{enumerable:!0,get:function(){return r(Wa).default}});var Qa=n(70890);Object.defineProperty(e,"PollOptionModel",{enumerable:!0,get:function(){return r(Qa).default}});var Ya=n(55955);Object.defineProperty(e,"PreferenceMappingModel",{enumerable:!0,get:function(){return r(Ya).default}});var Xa=n(358);Object.defineProperty(e,"PollVoteBasicModel",{enumerable:!0,get:function(){return r(Xa).default}});var Ka=n(15390);Object.defineProperty(e,"PollVoteFullModel",{enumerable:!0,get:function(){return r(Ka).default}});var Ja=n(67377);Object.defineProperty(e,"SinglePollVoteModel",{enumerable:!0,get:function(){return r(Ja).default}});var Za=n(71812);Object.defineProperty(e,"PollsModel",{enumerable:!0,get:function(){return r(Za).default}});var $a=n(62160);Object.defineProperty(e,"PollsUserVotesModel",{enumerable:!0,get:function(){return r($a).default}});var ts=n(58742);Object.defineProperty(e,"PotmUserVotesFilters",{enumerable:!0,get:function(){return r(ts).default}});var es=n(34824);Object.defineProperty(e,"PotmUserVotesResponseModel",{enumerable:!0,get:function(){return r(es).default}});var ns=n(92379);Object.defineProperty(e,"PotmUserVotesModel",{enumerable:!0,get:function(){return r(ns).default}});var rs=n(10862);Object.defineProperty(e,"PotmResultsResponseModel",{enumerable:!0,get:function(){return r(rs).default}});var is=n(93285);Object.defineProperty(e,"PotmResultsModel",{enumerable:!0,get:function(){return r(is).default}});var as=n(19379);Object.defineProperty(e,"PotmResultsMetaModel",{enumerable:!0,get:function(){return r(as).default}})},76878:e=>{"use strict";e.exports=t},49829:t=>{"use strict";t.exports=JSON.parse('{"name":"fansunited-sdk-esm","version":"1.113.2","description":"Javascript SDK implemented as a standard module system","author":"fansunited","license":"ISC","homepage":"https://fansunitedmedia.com/","type":"module","exports":{".":{"import":"./index.js","types":"./types/index.d.ts"},"./Core/*":{"import":"./Core/*.js","types":"./types/Core/*.d.ts"}},"typesVersions":{"*":{"*":["./types/*"],"Core/*":["./types/Core/*"]}},"files":["*.js","*.d.ts","types/**/*.d.ts","types/Core/**/*.js","types/Core/**/*.d.ts"],"sideEffects":false}')}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var a=n[t]={exports:{}};return e[t].call(a.exports,a,a.exports,r),a.exports}return r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(63607)})()));
2
2
  //# sourceMappingURL=index.js.map