fansunited-sdk-umd 1.28.0 → 1.30.0

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():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.FansUnitedSDK=e():t.FansUnitedSDK=e()}(self,(function(){return(()=>{var t={9669:(t,e,n)=>{t.exports=n(1609)},5448:(t,e,n)=>{"use strict";var r=n(4867),i=n(6026),s=n(4372),a=n(5327),o=n(4097),u=n(4109),c=n(7985),l=n(5061),d=n(5655),h=n(5263);t.exports=function(t){return new Promise((function(e,n){var p,f=t.data,m=t.headers,v=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}r.isFormData(f)&&delete m["Content-Type"];var g=new XMLHttpRequest;if(t.auth){var w=t.auth.username||"",b=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+b)}var _=o(t.baseURL,t.url);function E(){if(g){var r="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,s={data:v&&"text"!==v&&"json"!==v?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:t,request:g};i((function(t){e(t),y()}),(function(t){n(t),y()}),s),g=null}}if(g.open(t.method.toUpperCase(),a(_,t.params,t.paramsSerializer),!0),g.timeout=t.timeout,"onloadend"in g?g.onloadend=E:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(E)},g.onabort=function(){g&&(n(l("Request aborted",t,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",t,null,g)),g=null},g.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||d.transitional;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(l(e,t,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var I=(t.withCredentials||c(_))&&t.xsrfCookieName?s.read(t.xsrfCookieName):void 0;I&&(m[t.xsrfHeaderName]=I)}"setRequestHeader"in g&&r.forEach(m,(function(t,e){void 0===f&&"content-type"===e.toLowerCase()?delete m[e]:g.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(g.withCredentials=!!t.withCredentials),v&&"json"!==v&&(g.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&g.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(p=function(t){g&&(n(!t||t&&t.type?new h("canceled"):t),g.abort(),g=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p))),f||(f=null),g.send(f)}))}},1609:(t,e,n)=>{"use strict";var r=n(4867),i=n(1849),s=n(321),a=n(7185),o=function t(e){var n=new s(e),o=i(s.prototype.request,n);return r.extend(o,s.prototype,n),r.extend(o,n),o.create=function(n){return t(a(e,n))},o}(n(5655));o.Axios=s,o.Cancel=n(5263),o.CancelToken=n(4972),o.isCancel=n(6502),o.VERSION=n(7288).version,o.all=function(t){return Promise.all(t)},o.spread=n(8713),o.isAxiosError=n(6268),t.exports=o,t.exports.default=o},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,n)=>{"use strict";var r=n(5263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},i.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(4867),i=n(5327),s=n(782),a=n(3572),o=n(7185),u=n(4875),c=u.validators;function l(t){this.defaults=t,this.interceptors={request:new s,response:new s}}l.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=o(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=t.transitional;void 0!==e&&u.assertOptions(e,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,s=[];if(this.interceptors.response.forEach((function(t){s.push(t.fulfilled,t.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(s),i=Promise.resolve(t);l.length;)i=i.then(l.shift(),l.shift());return i}for(var d=t;n.length;){var h=n.shift(),p=n.shift();try{d=h(d)}catch(t){p(t);break}}try{i=a(d)}catch(t){return Promise.reject(t)}for(;s.length;)i=i.then(s.shift(),s.shift());return i},l.prototype.getUri=function(t){return t=o(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,n){return this.request(o(n||{},{method:t,url:e,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(t){l.prototype[t]=function(e,n,r){return this.request(o(r||{},{method:t,url:e,data:n}))}})),t.exports=l},782:(t,e,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},4097:(t,e,n)=>{"use strict";var r=n(1793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},5061:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,s){var a=new Error(t);return r(a,e,n,i,s)}},3572:(t,e,n)=>{"use strict";var r=n(4867),i=n(8527),s=n(6502),a=n(5655),o=n(5263);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new o("canceled")}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=i.call(t,t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=i.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return s(e)||(u(t),e&&e.response&&(e.response.data=i.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}},7185:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function s(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function a(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function u(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||s,i=e(t);r.isUndefined(i)&&e!==u||(n[t]=i)})),n}},6026:(t,e,n)=>{"use strict";var r=n(5061);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},8527:(t,e,n)=>{"use strict";var r=n(4867),i=n(5655);t.exports=function(t,e,n){var s=this||i;return r.forEach(n,(function(n){t=n.call(s,t,e)})),t}},5655:(t,e,n)=>{"use strict";var r=n(4867),i=n(6016),s=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function o(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(5448)),u),transformRequest:[function(t,e){return i(e,"Accept"),i(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(o(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)||e&&"application/json"===e["Content-Type"]?(o(e,"application/json"),function(t,e,n){if(r.isString(t))try{return(0,JSON.parse)(t),r.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||c.transitional,n=e&&e.silentJSONParsing,i=e&&e.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(a){if("SyntaxError"===t.name)throw s(t,this,"E_JSON_PARSE");throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(t){c.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){c.headers[t]=r.merge(a)})),t.exports=c},7288:t=>{t.exports={version:"0.24.0"}},1849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},5327:(t,e,n)=>{"use strict";var r=n(4867);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var s;if(n)s=n(e);else if(r.isURLSearchParams(e))s=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),s=a.join("&")}if(s){var o=t.indexOf("#");-1!==o&&(t=t.slice(0,o)),t+=(-1===t.indexOf("?")?"?":"&")+s}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,s,a){var o=[];o.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),r.isString(i)&&o.push("path="+i),r.isString(s)&&o.push("domain="+s),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},6268:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&!0===t.isAxiosError}},7985:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},6016:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},4109:(t,e,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,s,a={};return t?(r.forEach(t.split("\n"),(function(t){if(s=t.indexOf(":"),e=r.trim(t.substr(0,s)).toLowerCase(),n=r.trim(t.substr(s+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}})),a):a}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4875:(t,e,n)=>{"use strict";var r=n(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));var s={};i.transitional=function(t,e,n){function i(t,e){return"[Axios v"+r+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return function(n,r,a){if(!1===t)throw new Error(i(r," has been removed"+(e?" in "+e:"")));return e&&!s[r]&&(s[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}},t.exports={assertOptions:function(t,e,n){if("object"!=typeof t)throw new TypeError("options must be an object");for(var r=Object.keys(t),i=r.length;i-- >0;){var s=r[i],a=e[s];if(a){var o=t[s],u=void 0===o||a(o,s,t);if(!0!==u)throw new TypeError("option "+s+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+s)}},validators:i}},4867:(t,e,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function s(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function o(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),s(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:s,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:o,isPlainObject:u,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return o(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):s(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},6245:(t,e,n)=>{"use strict";function r(t){this.message=t}n.r(e),n.d(e,{default:()=>o,InvalidTokenError:()=>a}),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,s=0,a=0,o="";i=e.charAt(a++);~i&&(n=s%4?64*n+i:i,s++%4)?o+=String.fromCharCode(255&n>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function s(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 a(t){this.message=t}a.prototype=new Error,a.prototype.name="InvalidTokenError";const o=function(t,e){if("string"!=typeof t)throw new a("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(s(t.split(".")[n]))}catch(t){throw new a("Invalid token specified: "+t.message)}}},6595:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(682),i=n(2141),s=n(4241),a=n(6391),o=n(1512),u=n(4392),c=n(320),l=n(7631),d=n(6965),h=n(9158);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 l.default,n={apiKey:new o.default,environment:new a.default,idSchema:new u.default,clientId:new d.default,lang:new s.default,errorHandlingMode:new h.default,authProvider:new c.default},r=0,i=Object.entries(e);r<i.length;r++){var p=i[r],f=p[0];p[1],"isValid"!==f&&n[f].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,s=Object.entries(t);n<s.length;n++){var a=s[n],o=a[0],u=a[1];if(o!==r.ConfigFieldEnum.authProvider){if("isValid"!==o&&u.message.type===i.LogEnum.ERROR)return!1;if("isValid"!==o&&u.message.type===i.LogEnum.WARNING)return!0}else if(u.message.type===i.LogEnum.ERROR)return!1}return e}}},682:(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.authProvider="authProvider"},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"},9580:(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"},4946:(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"},9377:(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"},2141:(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"},9028:(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.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"},9627:(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"},7070:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.getIdToken=null,this.logout=null}},2379:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3220);e.default=function(){this.validation=null,this.message=new r.default,this.getIdToken={validation:null,message:new r.default},this.logout={validation:null,message:new r.default}}},7631:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3074);e.default=function(){this.apiKey=null,this.environment=null,this.idSchema=null,this.clientId=null,this.lang=null,this.errorHandlingMode=null,this.authProvider={getIdToken:new r.default,logout:new r.default},this.isValid=!1}},3220:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.text=null,this.type=null}},3074:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},1512:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=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=s.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=a},320:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(7070),o=n(2379),u=function(){function t(){this.validateAuthProvider=function(t){var e=Object.keys(new a.default),n=new o.default;if(t){var u=Object.keys(t).filter((function(t){return!e.includes(t)}));u.length>0?(n.validation=r.ValidationResponseEnum.INVALID_VALUE,n.message.type=s.LogEnum.WARNING,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_INVALID_PROP+" "+u.join(",")):n.validation=r.ValidationResponseEnum.VALID_VALUE}else n.validation=r.ValidationResponseEnum.MISSING_VALUE,n.message.type=s.LogEnum.ERROR,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING;return n},this.validateAuthProviderConfigFields=function(t,e){return Object.keys(new a.default).forEach((function(n){t[n]?e[n].validation=r.ValidationResponseEnum.VALID_VALUE:e[n].validation=r.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===r.ValidationResponseEnum.MISSING_VALUE&&(n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_PROP_MISSING+" "+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===r.ValidationResponseEnum.MISSING_VALUE&&t.validation===r.ValidationResponseEnum.VALID_VALUE&&(t.validation=r.ValidationResponseEnum.INVALID_VALUE,t.message.type=s.LogEnum.ERROR,t.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING_CONFIG)})),t}}return t.prototype.validate=function(t){var e=this.validateAuthProvider(t.authProvider);return e.validation!==r.ValidationResponseEnum.MISSING_VALUE&&(e=this.validateAuthProviderConfigFields(t.authProvider,e),e=this.generateAuthProviderConfigMessages(e),e=this.checkAuthProviderConfigMessagesForErrors(e)),e},t}();e.default=u},6965:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=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=s.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=a},6391:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(2671),o=function(){function t(){this.validateField=function(t){var e=[a.EnvironmentEnum.DEV,a.EnvironmentEnum.STAGING,a.EnvironmentEnum.PROD];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=s.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},9158:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9580),i=n(2141),s=n(9028),a=n(9627);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)?a.ValidationResponseEnum.VALID_VALUE:a.ValidationResponseEnum.INVALID_VALUE:a.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(t){var e=null,n=i.LogEnum.WARNING;return t===a.ValidationResponseEnum.MISSING_VALUE&&(e=s.ValidationMessageEnum.ERROR_HANDLING_MODE_MISSING),t===a.ValidationResponseEnum.INVALID_VALUE&&(e=s.ValidationMessageEnum.ERROR_HANDLING_MODE_INVALID),t===a.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},4392:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(4946),o=function(){function t(){this.validateField=function(t){var e=[a.IdSchemaEnum.NATIVE,a.IdSchemaEnum.SPORTAL_365,a.IdSchemaEnum.ENETPULSE,a.IdSchemaEnum.SPORTRADAR];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=s.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},4241:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9377),i=n(9627),s=n(9028),a=n(2141);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=[r.LangEnum.BG,r.LangEnum.RO,r.LangEnum.EN,r.LangEnum.EL];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=a.LogEnum.WARNING;return t===i.ValidationResponseEnum.MISSING_VALUE&&(e=s.ValidationMessageEnum.LANG_MISSING),t===i.ValidationResponseEnum.INVALID_VALUE&&(e=s.ValidationMessageEnum.LANG_INVALID),t===i.ValidationResponseEnum.VALID_VALUE&&(e=null,n=null),{text:e,type:n}}}},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"},4904:(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"},8097: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},2535:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,n){this.response={error:{code:0,status:"",message:""}},this.response.error.code=t,this.response.error.status=e,this.response.error.message=n}},1260:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validFixtureFields=e.documentationLinks=e.ID_TYPES=void 0,e.ID_TYPES={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id"},e.documentationLinks={PREDICTOR_USER_RELATED_OPERATION:"https://docs.fansunitedmedia.com/docs/predictor-operations#user-related-operations"},e.validFixtureFields=["matchId","matchType","market","prediction"]},712:(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"}[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"}[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"}[e]},e.transformIdsToBeUnique=function(t){return t.filter((function(t,e,n){return e===n.indexOf(t)}))},e.isDisabledCache=function(t){return t||!1},e.initDisableCache=function(){return"&disable_cache="+Date.now()},e.sortArrayInAscOrder=function(t){return 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}},5601:function(t,e,n){"use strict";var r=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;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 i=n(1260),s="FansUnited",a={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}}};e.default=function(t){var e=this;this.idSchema="",this.expirationProfileTimeout=600,this.expirationBadgesTimeout=3600,this.expirationClientFeaturesTimeout=14400,this.expirationFootballIdsTimeout=604800,this.clearData=function(){e.setData(a)},this.getEntityById=function(t,n){return void 0===t&&(t=""),void 0===n&&(n=""),e.getData().football.ids.find((function(r){var s=i.ID_TYPES[e.idSchema];return r&&""+r[s]===n&&r.resource===t}))},this.getEntity=function(t,n,r){return Array.isArray(t)?e.getData().football.ids.filter((function(e){var s=i.ID_TYPES[r];return e&&t.includes(""+e[s])&&e.resource===n})):e.getData().football.ids.find((function(e){var s=i.ID_TYPES[r];return e&&""+e[s]===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&&""+e.id===n&&e.resource===t}))},this.checkForExistingIdObjs=function(t,n){var r=i.ID_TYPES[n],s={};return Object.keys(t).forEach((function(i){var a=t[i],o=e.getEntity(a,i,n).map((function(t){return t[r]})),u=t[i].filter((function(t){return!o.includes(t)}));s[i]=a.map((function(t){return u.includes(t)?{id:t,exists:!1}:{id:t,exists:!0}}))})),s},this.getIdsByType=function(t,n,r){var s=i.ID_TYPES[r],a=i.ID_TYPES[n],o={};return Object.keys(t).forEach((function(n){var r=t[n],i=[];e.getData().football.ids.forEach((function(t){r.forEach((function(e,r){e===t[a]&&n===t.resource&&(i[r]=t[s])}))})),o[n]=i})),o},this.addIdMapping=function(t){var n=e.getData();n.football.ids.push(t),e.setData(n)},this.addIdMappings=function(t){var n=e.getData(),i=n.football.ids;i=r(r([],i,!0),t,!0),n.football.ids=i,e.setData(n)},this.addTopIdMappings=function(t){var n=e.getData();if(n.football.ids.length){var i=JSON.parse(JSON.stringify(n.football.ids));i=i.filter((function(t){return"match"!==t.resource})),t=t.filter((function(t){return"match"===t.resource})),i=r(r([],i,!0),t,!0),n.football.ids=i}else n.football.ids=t;n.football.expirations.ids=Math.floor(Date.now()/1e3)+e.expirationFootballIdsTimeout,e.setData(n)},this.setOwnProfile=function(t){var n=e.getData();n.profile.info=t,n.profile.expirations.profile=Math.floor(Date.now()/1e3)+e.expirationProfileTimeout,e.setData(n)},this.getOwnProfile=function(){return e.getData().profile.info},this.getProfileCountries=function(){return e.getData().profile.countries},this.setProfileCountries=function(t){var n=e.getData();n.profile.countries=t,e.setData(n)},this.getProfileStats=function(){return e.getData().profile.statistics},this.setProfileStats=function(t){var n=e.getData();n.profile.statistics=t,n.profile.expirations.statistics=Math.floor(Date.now()/1e3)+e.expirationProfileTimeout,e.setData(n)},this.getProfileBadges=function(){return e.getData().profile.badges},this.setProfileBadges=function(t){var n=e.getData();n.profile.badges=t,n.profile.expirations.badges=Math.floor(Date.now()/1e3)+e.expirationBadgesTimeout,e.setData(n)},this.getFootballCountries=function(){return e.getData().football.countries},this.setFootballCountries=function(t){var n=e.getData();n.football.countries=t,e.setData(n)},this.getCompetitions=function(t){var n=e.getData();return t?t.competitionSearchFilter(n.football.competitions):n.football.competitions},this.setCompetitions=function(t){var n=e.getData(),i=r([],n.football.competitions,!0);i.push.apply(i,t),n.football.competitions=e.makeCompetitionsUnique(i),e.setData(n)},this.getCompetitionsLength=function(){return e.getData().football.competitions.length},this.getClientFeatures=function(){return e.getData().client.features},this.setClientFeatures=function(t){var n=e.getData(),r=JSON.parse(JSON.stringify(t));n.client.expirations.features=Math.floor(Date.now()/1e3)+e.expirationClientFeaturesTimeout,n.client.features=r,e.setData(n)},this.getExpiration=function(t,n){e.initialNewSchema(t,"expirations");var r=e.getData();switch(n){case"profile":return r.profile.expirations.profile;case"statistics":return r.profile.expirations.statistics;case"badges":return r.profile.expirations.badges;case"features":return r.client.expirations.features;case"ids":return r.football.expirations.ids}},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 JSON.parse(localStorage.getItem(s))},this.setData=function(t){localStorage.setItem(s,JSON.stringify(t))},this.initialNewSchema=function(t,n){var r=e.getData();r&&r[t]&&r[t][n]||e.setData(a)},this.idSchema=t.idSchema,void 0!==this.getData()&&null!==this.getData()||this.setData(a)}},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(1260);(r=e.ErrorMessages||(e.ErrorMessages={})).LOYALTY_INVALID_TEMPLATE_ID="Provided template ID does NOT exist! Try again with existing template ID.",r.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_PREDICTION_FIELD="Prediction 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 10 or less.",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 "+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 "+i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION},e.invalidPredictionMessage=function(t,e){return"The prediction '"+t+"' is invalid for market '"+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 '"+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 '"+t+"' is not valid for Top X game. The only available market is CORRECT_SCORE."},e.invalidFieldMessage=function(t){return"The field/s '"+(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 "+t+": '"+(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 "+t+" has incorrect type. The correct type is "+e}},4800:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=t.limit?t.limit:null,this.startAfter=t.startAfter?t.startAfter:null}return t.prototype.constructMainFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit="+this.limit),this.startAfter&&(t+="&",t+="start_after="+this.startAfter),t},t}();e.default=n},439:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.main=null,this.cover=null,this.mobile=null}},8872:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8902);e.default=function(){this.pagination=new r.default}},8902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.nextPageStartsAfter=null,this.itemsPerPage=null}},1553:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8872);e.default=function(){this.meta=new r.default,this.data=[]}},3623:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8872);e.default=function(){this.remapMetaData=function(t){var e=new r.default;return e.pagination.nextPageStartsAfter=t.pagination.next_page_starts_after,e.pagination.itemsPerPage=t.pagination.items_per_page,e}}},3483:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.entityId=null,this.entityType=null}},6208:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.axiosError=void 0,e.axiosError=function(t,e,n){var r={data:t.data,status:e,statusText:n,headers:t.headers,config:t};return{code:String(e),config:t,isAxiosError:!0,toJSON:function(){return{}},name:"Unauthorized",message:n,response:r}}},1022: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)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(2453),c=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"loyalty"))||this;return n.activityRemapper=null,n.createActivity=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),e="/activities"+this.apiSignInUrl,[4,this.instanceAuth.post(e,JSON.stringify(t))];case 1:return n=s.sent(),[2,this.activityRemapper.remapSingleResponse(n.data)];case 2:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with creating activity for user",i),i.response;case 3:return[2]}}))}))},n.deleteActivity=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),e="/activities/"+t+this.apiSignInUrl,[4,this.instanceAuth.delete(e)];case 1:return i.sent(),[2,!0];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem deleting the following activity: "+t,r),r.response;case 3:return[2]}}))}))},n.getOwnActivities=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/activities"+this.apiSignInUrl,r=Date.now(),t&&(n+=""+t.constructFilterUrl()),e&&(n+="disable_cache="+r),[4,this.instanceAuth.get(n)];case 1:return i=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(i.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with fetching own activities",o),o.response;case 3:return[2]}}))}))},n.getActivitiesForUser=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/users/"+t+"/activities"+this.apiSignInUrl,i=Date.now(),e&&(n+=""+e.constructFilterUrl()),r&&(n+="disable_cache="+i),[4,this.instance.get(n)];case 1:return s=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(s.data)];case 2:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with fetching activities for user "+t,u),u.response;case 3:return[2]}}))}))},n.getStats=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,5,,6]),n="",r=null,t?(n+=(0,o.isDisabledCache)(e)?"/users/"+t+"/statistics"+this.apiSignInUrl+(0,o.initDisableCache)():"/users/"+t+"/statistics"+this.apiSignInUrl,[4,this.instance.get(n)]):[3,2];case 1:return r=a.sent(),[3,4];case 2:return n+="/statistics"+this.apiSignInUrl,[4,this.instanceAuth.get(n)];case 3:r=a.sent(),a.label=4;case 4:return[2,this.activityRemapper.remapStatsReponse(r.data.data)];case 5:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching profile`s statistics:",s),s.response;case 6:return[2]}}))}))},n.activityRemapper=new u.default,n}return i(e,t),e}(n(7724).default);e.default=c},7686: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)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureConfigType=void 0;var o,u=n(712),c=n(704),l=n(7724),d=n(5601);(o=e.FeatureConfigType||(e.FeatureConfigType={})).PREDICTOR="predictor",o.TOP_X="topX",o.MATCH_QUIZ="matchQuiz",o.LOYALTY="loyalty";var h=function(t){function e(e){var n=t.call(this,e,(0,u.setBaseUrl)(e.environment,"client"))||this;return n.featureConfigRemapper=null,n.localStorage=null,n.clientId=null,n.getConfig=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),(e=this.getCachedFeatures())?[3,2]:(n="/clients/"+this.clientId+"/features",r=this.apiSignInUrl.split("&")[0],[4,this.instance.get(""+n+r)]);case 1:i=a.sent(),e=i.data.data,this.localStorage.setClientFeatures(e),a.label=2;case 2: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)]}return[3,4];case 3:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching configuration from Client API",o),o.response;case 4:return[2]}}))}))},n.getCachedFeatures=function(){var t=n.getLocalStorageData();if(t&&Object.keys(t).length)return t},n.getLocalStorageData=function(){var t=Math.floor(Date.now()/1e3);return n.localStorage.getExpiration("client","features")>t?n.localStorage.getClientFeatures():null},n.clientId=e.clientId,n.localStorage=new d.default(e),n.featureConfigRemapper=new c.default,n}return i(e,t),e}(l.default);e.default=h},595: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)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(3430),c=n(7316),l=n(8758),d=n(5827),h=n(7821),p=n(5284),f=n(9330),m=n(4729),v=n(5157),y=n(7943),g=n(7287),w=n(753),b=n(1925),_=function(t){function e(e){var n=t.call(this,e,(0,o.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.getCountries=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/countries"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return r=a.sent(),[2,this.countryRemapper.countriesFromResponse(r.data.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with the football countries request",s),s.response;case 3:return[2]}}))}))},n.getCompetitions=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),e=e||!1,!(t&&t.competitionIds&&t.competitionIds.length>this.limitIds-1))return[3,5];i=[],s=(0,o.limitIds)(t.competitionIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],t.competitionIds=l,d="/competitions"+this.apiSignInUrl+t.constructFilterUrl(),e&&(d+="&disable_cache="+r),[4,this.instance.get(d)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(t){return f.competitionBasicRemapper.fromResponse(t)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d="/competitions"+this.apiSignInUrl,t&&(d+=""+t.constructFilterUrl()),e&&(d+="&disable_cache="+r),[4,this.instance.get(d)];case 6:return[2,(n=a.sent()).data.data.map((function(t){return f.competitionBasicRemapper.fromResponse(t)}))];case 7:return[3,9];case 8:throw h=a.sent(),p=this.transformAxiosErrorToFansUnitedException(h),console.warn("There was a problem with getCompetitions request",p),p.response;case 9:return[2]}}))}))},n.getCompetitionById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/competitions/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.competitionFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getCompetitionById request",o),o.response;case 3:return[2]}}))}))},n.getTopCompetitions=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/competitions/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,a.sent().data.data.map((function(t){return s.competitionBasicRemapper.fromResponse(t)}))];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopCompetitions request",i),i.response;case 3:return[2]}}))}))},n.getTeams=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),!(t&&t.teamIds&&t.teamIds.length>this.limitIds))return[3,5];i=[],s=(0,o.limitIds)(t.teamIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],t.teamIds=l,h="/teams"+this.apiSignInUrl+t.constructFilterUrl(),e&&(h+="disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new w.default,h="/teams"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=a.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),d.data=n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)})),[2,d];case 7:return[3,9];case 8:throw p=a.sent(),f=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem with getTeams request",f),f.response;case 9:return[2]}}))}))},n.getTeamById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.teamFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getTeamById request",o),o.response;case 3:return[2]}}))}))},n.getTopTeams=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s,o=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/teams/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="$disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,(r=a.sent()).data.data?r.data.data.map((function(t){return o.teamBasicRemapper.fromResponse(t)})):[]];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with getTopTeams request",s),s.response;case 3:return[2]}}))}))},n.getNextMatchForTeam=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+t+"/next-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getNextMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForTeam=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+t+"/previous-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPrevMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPlayers=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),!(t&&t.playerIds&&t.playerIds.length>this.limitIds-1))return[3,5];i=[],s=(0,o.limitIds)(t.playerIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],t.playerIds=l,h="/players"+this.apiSignInUrl+t.constructFilterUrl(),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(t){return m.teamBasicRemapper.fromResponse(t)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new w.default,h="/players"+this.apiSignInUrl,t&&(h+=""+t.constructFilterUrl()),e&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=a.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),d.data=n.data.data.map((function(t){return m.playerBasicRemapper.fromResponse(t)})),[2,d];case 7:return[3,9];case 8:throw p=a.sent(),f=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem with getPlayers request",f),f.response;case 9:return[2]}}))}))},n.getPlayerById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.playerFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPlayerById request",o),o.response;case 3:return[2]}}))}))},n.getTopPlayers=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="/players/top"+this.apiSignInUrl,n=Date.now(),t&&(e+="&disable_cache="+n),[4,this.instance.get(e)];case 1:return[2,a.sent().data.data.map((function(t){return s.topPlayerRemapper.fromResponse(t)}))];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopPlayers request",i),i.response;case 3:return[2]}}))}))},n.getNextMatchForPlayer=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+t+"/next-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getNextMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForPlayer=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+t+"/previous-match"+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPrevMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getMatchById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/matches/"+t+this.apiSignInUrl,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getMatchById request",o),o.response;case 3:return[2]}}))}))},n.getMatches=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u,c=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=new w.default,r="/matches"+this.apiSignInUrl,i=Date.now(),t&&(r+=""+t.constructFilterUrl()),e&&(r+="&disable_cache="+i),[4,this.instance.get(r)];case 1:return s=a.sent(),n.meta=this.footballMetaRemapper.remapMetaProp(s.data.meta),n.data=s.data.data.map((function(t){return c.matchBasicRemapper.fromResponse(t)})),[2,n];case 2:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with getMatches request",u),u.response;case 3:return[2]}}))}))},n.search=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/search"+this.apiSignInUrl+t.constructFilterUrl(),r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.searchRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with search request",o),o.response;case 3:return[2]}}))}))},n.apiSignInUrl="en"!==e.lang?n.apiSignInUrl+"&lang="+e.lang:n.apiSignInUrl,n.countryRemapper=new u.default,n.competitionBasicRemapper=new c.default,n.competitionFullRemapper=new l.default,n.teamBasicRemapper=new d.default,n.teamFullRemapper=new h.default,n.matchBasicRemapper=new p.default,n.matchFullRemapper=new f.default,n.playerBasicRemapper=new v.default,n.playerFullRemapper=new y.default,n.topPlayerRemapper=new m.default,n.searchRemapper=new g.default,n.footballMetaRemapper=new b.default,n}return i(e,t),e}(n(7724).default);e.default=_},7724:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9669),i=n(6245),s=n(4021),a=n(4904),o=n(2535),u=n(6208),c=n(5318);e.default=function(t,e){var n=this;this.apiSignInUrl=null,this.instanceAuth=null,this.instance=null,this.errorHandlingMode=null,this.transformAxiosErrorToFansUnitedException=function(t){if("standard"===n.errorHandlingMode&&t.response&&t.response.data&&t.response.data.error){var e=t.response.data.error,r=e.code,i=e.status,s=e.message;return new o.default(r,i,s)}return t},this.apiSignInUrl="?key="+t.apiKey+"&client_id="+t.clientId,this.errorHandlingMode=t.errorHandlingMode,this.instanceAuth=r.default.create({baseURL:e,headers:{Authorization:"Bearer "+t.authProvider.getIdToken(),"Content-Type":"application/json"}}),this.instanceAuth.interceptors.request.use((function(e){var l=null;try{l=(0,i.default)(t.authProvider.getIdToken())}catch(t){if("default"===n.errorHandlingMode)throw(0,u.axiosError)(e,401,t.message);if("standard"===n.errorHandlingMode)throw new o.default(s.ErrorCodes.UNAUTHORIZED,a.ErrorStatuses.INVALID_TOKEN,c.ErrorMessages.INVALID_TOKEN)}return Date.now()>l.exp?(r.default.defaults.headers.common.Authorization="Bearer "+t.authProvider.getIdToken(),e.headers.Authorization="Bearer "+t.authProvider.getIdToken(),e):e}),(function(t){Promise.reject(t)})),this.instanceAuth.interceptors.response.use((function(t){return t}),(function(e){var r,i,u,l=e.config;if((403===(null===(r=e.response)||void 0===r?void 0:r.status)||401===(null===(i=e.response)||void 0===i?void 0:i.status))&&!l._retry){l._retry=!0;var d=t.authProvider.getIdToken();return l.headers.Authorization="Bearer "+d,n.instanceAuth(l)}if("standard"===n.errorHandlingMode&&401===(null===(u=e.response)||void 0===u?void 0:u.status)){var h=new o.default(s.ErrorCodes.UNAUTHORIZED,a.ErrorStatuses.UNAUTHORIZED,c.ErrorMessages.EXPIRED_TOKEN);return Promise.reject(h)}return Promise.reject(e)})),this.instance=r.default.create({baseURL:e,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)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(7724),c={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"},l=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"idMapping"))||this;return n.getEntityById=function(t,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+e.idSchema+"&"+c[t]+"="+r)}catch(t){throw console.warn("There was a problem with id mapping request for the following id:"+r,t),t.response}},n.getEntityByIdAndSchema=function(t,e,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e)}catch(t){throw console.warn("There was a problem with id mapping request for the following id:"+e,t),t.response}},n.getEntityIdsByIdsAndSchema=function(t,e,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e.join(","))}catch(t){throw console.warn("There was a problem with id mapping request for the following ids:"+e.join(","),t),t.response}},n.getEntitiesByIds=function(t,e,r){e.sort((function(t,e){return t.localeCompare(e)}));var i=(0,o.requestChunkBuild)(e).map((function(e){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[t]+"="+e.join(","))}catch(t){var i=n.transformAxiosErrorToFansUnitedException(t);throw console.warn("There was a problem with id mapping request for the following ids:"+e.join(","),i),i.response}}));return Promise.all(i).then((function(t){var e=[];return t.forEach((function(t){e.push.apply(e,t.data.data)})),e}))},n.getEntitiesByIdObjs=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,l,d,h,p,f;return a(this,(function(m){switch(m.label){case 0:n=[],r={},i=[],Object.keys(t).forEach((function(e){n.push.apply(n,t[e])})),s=(0,o.transformIdsToBeUnique)(n),u=(0,o.requestChunkBuild)(s),l=function(n){var s,o,u,l;return a(this,(function(a){switch(a.label){case 0:if(s="",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)})),s+="&",s+=c[t]+"="+r[t].join(","))})),!(s&&s.length>0))return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,d.instance.get("/football"+d.apiSignInUrl+"&input_provider="+(e||"native")+s)];case 2:return o=a.sent(),i.push(o.data.data),[3,4];case 3:throw u=a.sent(),l=d.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem with id mapping request",l),l.response;case 4:return[3,6];case 5:i.push([]),a.label=6;case 6:return[2]}}))},d=this,h=0,p=u,m.label=1;case 1:return h<p.length?(f=p[h],[5,l(f)]):[3,4];case 2:m.sent(),m.label=3;case 3:return h++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)]}}))}))},n.getTopEntities=function(){return s(n,void 0,void 0,(function(){var t,e;return a(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/football/top"+this.apiSignInUrl)];case 1:return[2,n.sent().data.data];case 2:throw t=n.sent(),e=this.transformAxiosErrorToFansUnitedException(t),console.warn("There was a problem with top id mappings request",e),e.response;case 3:return[2]}}))}))},n.apiSignInUrl=n.apiSignInUrl.split("&")[0],n}return i(e,t),e}(u.default);e.default=l},7059: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)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(7419),c=n(4533),l=n(8899),d=n(7746),h=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"loyalty"))||this;return n.templateRemapper=null,n.leaderboardRemapper=null,n.rankingsRemapper=null,n.highestSuccessRateRemapper=null,n.getTemplates=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(t)?"/leaderboard/templates/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),e?((i=JSON.parse(JSON.stringify(r.data))).meta=this.templateRemapper.remapMeta(r.data.meta),i.data=this.templateRemapper.remapResponse(r.data.data),[2,i]):[2,this.templateRemapper.remapResponse(r.data.data)];case 2:throw s=a.sent(),u=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the list of templates",u),u.response;case 3:return[2]}}))}))},n.getTemplateById=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/templates/"+t+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+t+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.templateRemapper.remapResponseId(r.data.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem requesting the following template: "+t,s),s.response;case 3:return[2]}}))}))},n.getLeaderboard=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/"+t+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/"+t+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=a.sent(),s=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(s)];case 2:throw u=a.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following template: "+t,c),c.response;case 3:return[2]}}))}))},n.getLeaderboardForGame=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/games/"+t+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/games/"+t+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=a.sent(),s=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(s)];case 2:throw u=a.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following game: "+t,c),c.response;case 3:return[2]}}))}))},n.getUserRankings=function(t,e,r){return s(n,void 0,void 0,(function(){var n,i,s,u;return a(this,(function(a){switch(a.label){case 0:n="/leaderboard/users/"+t+"/rankings/"+this.apiSignInUrl,e&&(n+=""+e.constructFiltersUrl()),(0,o.isDisabledCache)(r)&&(n+=""+(0,o.initDisableCache)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return i=a.sent(),[2,this.rankingsRemapper.remapRankings(i.data)];case 3:throw s=a.sent(),u=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the rankings for the following user: "+t,u),u.response;case 4:return[2]}}))}))},n.getHighestSuccessRate=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n=(0,o.isDisabledCache)(e)?"/statistics/top"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/top"+this.apiSignInUrl,t&&(n+="&market="+t),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.highestSuccessRateRemapper.remapHighestSuccessRate(r.data.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching highest success rate",s),s.response;case 4:return[2]}}))}))},n.getEntitiesFollows=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i;return a(this,(function(s){switch(s.label){case 0:n=(0,o.isDisabledCache)(e)?"/statistics/follows"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/follows"+this.apiSignInUrl,t.footballCompetitions&&(n+="&competitions="+t.footballCompetitions.join(",")),t.footballTeams&&(n+="&teams="+t.footballTeams.join(",")),t.footballPlayers&&(n+="&players="+t.footballPlayers.join(",")),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return[2,s.sent().data.data];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching follows for entities",i),i.response;case 4:return[2]}}))}))},n.templateRemapper=new l.default,n.leaderboardRemapper=new u.default,n.rankingsRemapper=new c.default,n.highestSuccessRateRemapper=new d.default,n}return i(e,t),e}(n(7724).default);e.default=h},2793: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)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(2726),u=n(9679),c=n(712),l=n(4780),d=n(1553),h=n(3623),p=function(t){function e(e,n){var r=t.call(this,e,(0,c.setBaseUrl)(e.environment,"predictor"))||this;return r.predictionRemapper=null,r.matchSummaryRemapper=null,r.gamesRemapper=null,r.metaRemapper=null,r.makeFootballPrediction=function(t){return s(r,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),e=this.predictionRemapper.remapRequestBody(t),[4,this.instanceAuth.post("/predictions"+this.apiSignInUrl,JSON.stringify(e))];case 1:return n=s.sent(),[4,this.predictionRemapper.remapResponseObjBody(n.data)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem making POST request: ",i),i.response;case 4:return[2]}}))}))},r.getMatchSummary=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n=(0,c.isDisabledCache)(e)?"/predictions/summary/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/summary/"+t+this.apiSignInUrl,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.matchSummaryRemapper.remapResponse(r.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching predictions for match: "+t+" ",s),s.response;case 4:return[2]}}))}))},r.deleteFootballPrediction=function(t){return s(r,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.delete("/predictions/"+t+this.apiSignInUrl)];case 1:return r.sent(),[2,!0];case 2:throw e=r.sent(),n=this.transformAxiosErrorToFansUnitedException(e),console.warn("There was a problem deleting your prediction: "+t,n),n.response;case 3:return[2]}}))}))},r.getMyPredictions=function(t){return s(r,void 0,void 0,(function(){var e,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),e=new d.default,n="/predictions"+this.apiSignInUrl,t&&(n+=""+t.constructFiltersUrl()),[4,this.instanceAuth.get(n)];case 1:return r=a.sent(),e.meta=this.metaRemapper.remapMetaData(r.data.meta),i=e,[4,this.predictionRemapper.remapResponseArrayBody(r.data.data)];case 2:return i.data=a.sent(),[2,e];case 3:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching own predictions",o),o.response;case 4:return[2]}}))}))},r.getMyPredictionsNoRemap=function(t){return s(r,void 0,void 0,(function(){var e,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl+t.constructFiltersUrl())];case 1:return[2,r.sent().data];case 2:throw e=r.sent(),n=this.transformAxiosErrorToFansUnitedException(e),console.warn("There was a problem fetching own predictions",n),n.response;case 3:return[2]}}))}))},r.getUserPredictions=function(t,e,n){return s(r,void 0,void 0,(function(){var r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),r=new d.default,i=(0,c.isDisabledCache)(e)?"/predictions/users/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/users/"+t+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return s=a.sent(),r.meta=this.metaRemapper.remapMetaData(s.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(s.data.data)];case 2:return o.data=a.sent(),[2,r];case 3:throw u=a.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching predictions for user: "+t,l),l.response;case 4:return[2]}}))}))},r.getUserPredictionsNoRemap=function(t,e){return s(r,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/predictions/users/"+t+this.apiSignInUrl+e.constructFiltersUrl())];case 1:return[2,i.sent().data];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching predictions for user: "+t,r),r.response;case 3:return[2]}}))}))},r.getGames=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(e)?"/games/"+this.apiSignInUrl+t.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+t.constructFiltersUrl(),[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.gamesRemapper.remapPaginatedGames(r.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the games list",s),s.response;case 3:return[2]}}))}))},r.getGameById=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(e)?"/games/"+t+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.gamesRemapper.remapGameByIdResponse(r.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the following game: "+t,s),s.response;case 3:return[2]}}))}))},r.getGamePredictions=function(t,e,n){return s(r,void 0,void 0,(function(){var r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),r=new d.default,i=(0,c.isDisabledCache)(e)?"/games/"+t+"/predictions"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+"/predictions"+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return s=a.sent(),r.meta=this.metaRemapper.remapMetaData(s.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(s.data.data)];case 2:return o.data=a.sent(),[2,r];case 3:throw u=a.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the predictions for game: "+t,l),l.response;case 4:return[2]}}))}))},r.getUserGameEditions=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s,o,u=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=null,r=(0,c.isDisabledCache)(e)?"/games/"+this.apiSignInUrl+t.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+t.constructFiltersUrl(),[4,this.instance.get(r)];case 1:return(i=a.sent()).data.data.forEach((function(t){"TOP_X"===t.type?n=u.gamesRemapper.remapPaginatedUserTopXEditions(i.data):"MATCH_QUIZ"===t.type&&(n=u.gamesRemapper.remapPaginatedUserMathQuizEditions(i.data))})),[2,n];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the games list",o),o.response;case 3:return[2]}}))}))},r.getGameResults=function(t,e,n){return s(r,void 0,void 0,(function(){var r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),r=(0,c.isDisabledCache)(e)?"/games/"+t+"/results/"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+t+"/results/"+this.apiSignInUrl,n&&(r+=""+n.constructMainFiltersUrl()),[4,this.instance.get(r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapPaginatedGameResults(i.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the results for the following game: "+t,o),o.response;case 3:return[2]}}))}))},r.getMarketResultsForGame=function(t,e){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n="/games/"+t+"/correct-results/"+this.apiSignInUrl,(0,c.isDisabledCache)(e)&&(n+=""+(0,c.initDisableCache)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.gamesRemapper.remapGameMarketsResults(r.data.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the markets correct results for the following game: "+t,s),s.response;case 4:return[2]}}))}))},r.getContestWinners=function(t){return s(r,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/winners/"+this.apiSignInUrl+"&contest_id="+t)];case 1:return e=i.sent(),[2,this.gamesRemapper.remapContestWinners(e.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching winners for the following game: "+t,r),r.response;case 3:return[2]}}))}))},r.getPredictionById=function(t){return s(r,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),e="/predictions/"+t+this.apiSignInUrl,[4,this.instanceAuth.get(e)];case 1:return n=s.sent(),[4,this.predictionRemapper.remapResponseArrayBody([n.data.data])];case 2:return[2,s.sent()[0]];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching info for the following prediction: "+t,i),i.response;case 4:return[2]}}))}))},r.predictionRemapper=new o.default(e,n),r.matchSummaryRemapper=new u.default(e,n),r.gamesRemapper=new l.default,r.metaRemapper=new h.default,r}return i(e,t),e}(n(7724).default);e.default=p},4275: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)}),s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var o=n(712),u=n(441),c=n(8673),l=n(6277),d=n(1712),h=function(t){function e(e){var n=t.call(this,e,(0,o.setBaseUrl)(e.environment,"profile"))||this;return n.profileRemapper=null,n.followingRemapper=null,n.followersRemapper=null,n.lang=null,n.limitIds=100,n.getCountries=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e="&lang="+this.lang,n="/countries"+this.apiSignInUrl+e,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return[2,a.sent().data.data];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the countries:",s),s.response;case 3:return[2]}}))}))},n.getProfile=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:if(e="/profile"+this.apiSignInUrl,!t)return[3,5];e="/profiles/"+t+this.apiSignInUrl,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(e)];case 2:return r=a.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 3:throw n=a.sent(),s=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching the following profile: "+t,s),s.response;case 4:return[3,8];case 5:return a.trys.push([5,7,,8]),[4,this.instanceAuth.get(e)];case 6:return r=a.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 7:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching your profile from API:",s),s.response;case 8:return[2]}}))}))},n.getProfiles=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,7,,8]),n=Date.now(),!(t.length>this.limitIds))return[3,5];r=[],i=(0,o.limitIds)(t,this.limitIds),s=0,u=i,a.label=1;case 1:return s<u.length?(c=u[s],l="/profiles"+this.apiSignInUrl+"&profile_ids="+c.join(","),e&&(l+="&disable_cache="+n),[4,this.instance.get(l)]):[3,4];case 2:d=a.sent(),r.push.apply(r,this.profileRemapper.profilesFromResponse(d.data.data)),a.label=3;case 3:return s++,[3,1];case 4:return[2,r];case 5:return h="/profiles"+this.apiSignInUrl+"&profile_ids="+t.join(","),e&&(h+="&disable_cache="+n),[4,this.instance.get(h)];case 6:return p=a.sent(),[2,this.profileRemapper.profilesFromResponse(p.data.data)];case 7:throw f=a.sent(),m=this.transformAxiosErrorToFansUnitedException(f),console.warn("There was a problem fetching the following profiles: "+t.join(","),m),m.response;case 8:return[2]}}))}))},n.getFollowers=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:if(n="/profile/followers"+this.apiSignInUrl,!t||e)return[3,5];n="/profile/followers"+this.apiSignInUrl+t.constructFilterUrl(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 3:throw r=a.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 4:return[3,9];case 5:if(t||e)return[3,9];a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 8:throw i=a.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 9:t&&e?n="/profile/"+e+"/followers"+this.apiSignInUrl+t.constructFilterUrl():!t&&e&&(n="/profile/"+e+"/followers"+this.apiSignInUrl),a.label=10;case 10:return a.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 12:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers for profile: "+e,u),u.response;case 13:return[2]}}))}))},n.getFollowing=function(t,e){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:if(n="/profile/following"+this.apiSignInUrl,!t||e)return[3,5];n="/profile/following"+this.apiSignInUrl+t.constructFilterUrl(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 3:throw r=a.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 4:return[3,9];case 5:if(t||e)return[3,9];a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 8:throw i=a.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 9:t&&e?n="/profile/"+e+"/following"+this.apiSignInUrl+t.constructFilterUrl():!t&&e&&(n="/profile/"+e+"/following"+this.apiSignInUrl),a.label=10;case 10:return a.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 12:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers of the following profile: "+e,u),u.response;case 13:return[2]}}))}))},n.follow=function(t){return s(n,void 0,void 0,(function(){var e,n,r,i;return a(this,(function(s){switch(s.label){case 0:(e=new d.default).profile_ids=t,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instanceAuth.post("/profile/follow"+this.apiSignInUrl,JSON.stringify(e))];case 2:return n=s.sent(),[2,this.followingRemapper.followResponse(n.data.data)];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with POST request for profiles: "+t.join(",")+" ",i),i.response;case 4:return[2]}}))}))},n.unfollow=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:(e=new d.default).profile_ids=t,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.delete("/profile/follow"+this.apiSignInUrl,{data:JSON.stringify(e)})];case 2:return i.sent(),[2,!0];case 3:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with DELETE request for profiles: "+t.join(",")+" ",r),r.response;case 4:return[2]}}))}))},n.getBadges=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:e="/profile/badges"+this.apiSignInUrl,i.label=1;case 1:return i.trys.push([1,5,,6]),t?(e="/profile/"+t+"/badges"+this.apiSignInUrl,[4,this.instance.get(e)]):[3,3];case 2:return[2,i.sent().data.data];case 3:return[4,this.instanceAuth.get(e)];case 4:return[2,i.sent().data.data];case 5:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with fetching the badges",r),r.response;case 6:return[2]}}))}))},n.updateProfile=function(t){return s(n,void 0,void 0,(function(){var e,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instanceAuth.patch("/profile"+this.apiSignInUrl,t)];case 1:return e=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(e.data.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem updating the own profile:",r),r.response;case 3:return[2]}}))}))},n.lang=e.lang,n.profileRemapper=new u.default,n.followingRemapper=new c.default,n.followersRemapper=new l.default,n}return i(e,t),e}(n(7724).default);e.default=h},5792:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(5601),a=n(8539),o=n(1260);e.default=function(t){var e=this;this.isBrowser=!1,this.localStorage=null,this.https=null,this.getEntitiesByIds=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,a,u,c,l;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?[4,this.setTopIdMappings()]:[3,6];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),e=this.localStorage.checkForExistingIdObjs(t,n),r=this.splitForRequestAndExisting(e),[4,this.https.getEntitiesByIdObjs(r.request,n)];case 3:return a=i.sent(),this.localStorage.addIdMappings(a),[2,this.localStorage.getIdsByType(t,n,s)];case 4:return u=i.sent(),console.warn("There was a problem retrieving the entity ids ",u),[2,Promise.resolve([])];case 5:return[3,9];case 6:return i.trys.push([6,8,,9]),[4,this.https.getEntitiesByIdObjs(t,n)];case 7:return c=i.sent(),Object.keys(t).forEach((function(e){t[e]=c.filter((function(t){return t.resource===e})).map((function(t){return t[o.ID_TYPES[s]]}))})),[2,t];case 8:return l=i.sent(),console.warn("There was a problem retrieving the entity ids ",l),[2,Promise.resolve([])];case 9:return[2]}}))}))},this.getEntityById=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=this.localStorage.getEntity(t,n,s))?[2,e]:[3,1]:[3,4];case 1:case 4:return[4,this.requestEntity(t,n,s)];case 2:return r=i.sent(),this.localStorage.addIdMappings(r),[2,r];case 3:return[3,6];case 5:return[2,i.sent()];case 6:return[2]}}))}))},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,s){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,s)];case 1:return[2,r.sent()];case 2:return e=r.sent(),console.warn("There was a problem retrieving the requested entity: "+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),this.localStorage.getExpiration("football","ids")>t?[2,Promise.resolve()]:[4,this.https.getTopEntities()];case 1:return e=n.sent(),this.localStorage.addTopIdMappings(e),[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=new s.default(t),this.https=new a.default(t)}},8900:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(5792),o=n(7611),u=n(9052);e.default=function(t){var e=this;this.idSchema="",this.idMappingFacade=null,this.getEntityIdBySchemaId=function(t,n){return e.idMappingFacade.getEntityById(t,n,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 o.default,a=r.traverse(e,n),[2,this.idMappingFacade.getEntitiesByIds(a,"native",this.idSchema).then((function(t){return(new u.default).traverse(e,n,t)}))]):[2,t]}catch(t){return console.warn("There was a problem remapping entity: "+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 a.default(t)}},3845:(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}}},7611:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3845);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)}))}}},9052:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3845);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)}))}}},7302:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(5936);e.default=function(t){var e=this;this.add=function(t,n,s,a){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,s,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.activityFacade.delete(t)];case 1:return[2,e.sent()]}}))}))},this.like=function(t,n,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.dislike=function(t,n,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.addPageview=function(t,n,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.addContentConsumed=function(t,n,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.addShare=function(t,n,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.addComment=function(t,n,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.addClickAd=function(t,n,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.addConversion=function(t,n,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.activityFacade.addConversion(t,n,s)];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,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.activityFacade=new s.default(t)}},1491:(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.CONVERSION="conversion",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"},5936:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(1022),o=n(1491),u=n(4630),c=n(8261),l=n(629),d=n(8636);e.default=function(t){var e=this;this.add=function(t,n,a,o){return r(e,void 0,void 0,(function(){var e,r,c,l,d;return i(this,(function(i){switch(i.label){case 0:return this.idSchema==s.IdSchemaEnum.NATIVE?[3,3]:(e=JSON.parse(JSON.stringify(n)),[4,this.activityService.remapTagsIds(n,this.idSchema,s.IdSchemaEnum.NATIVE)]);case 1:return r=i.sent(),c=new u.default(t,r,a,o),[4,this.activityHttps.createActivity(c)];case 2:return(l=i.sent()).context.tags=e,[2,l];case 3:return d=new u.default(t,n,a,o),[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,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.LIKE,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.dislike=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.DISLIKE,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addPageview=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.PAGE_VIEW,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addContentConsumed=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CONTENT_CONSUMED,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addShare=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.SHARE,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addComment=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.COMMENT,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addClickAd=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CLICK_AD,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.addConversion=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return e=o.ActionsEnum.CONVERSION,[4,this.add(e,t,n,s)];case 1:return[2,r.sent()]}}))}))},this.getOwn=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 n=n||!1,t&&(t=new l.default(t)),this.idSchema==s.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?(o=a[r],[4,this.activityService.remapTagsIds(o.context.tags,s.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,a){return r(e,void 0,void 0,(function(){var e,r,o,u;return i(this,(function(i){switch(i.label){case 0:return a=a||!1,n&&(n=new d.default(n)),this.idSchema==s.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getActivitiesForUser(t,n,a)];case 1:e=i.sent(),r=0,o=e.data,i.label=2;case 2:return r<o.length?(u=o[r],[4,this.activityService.remapTagsIds(u.context.tags,s.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.getActivitiesForUser(t,n,a)];case 7:return[2,i.sent()]}}))}))},this.idSchema=t.idSchema,this.activityHttps=new a.default(t),this.activityService=new c.default(t)}},1517:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2820);e.default=function(){this.id=null,this.profileId=null,this.property=null,this.value=null,this.action=null,this.context=new r.default,this.points=0}},2195:(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}},629: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)});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="+this.action),this.page&&(t+="&",t+="page="+this.page),this.limit&&(t+="&",t+="limit="+this.limit),t},e}(n(2195).default);e.default=s},8636: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)});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="+this.action),this.page&&(t+="&",t+="page="+this.page),this.limit&&(t+="&",t+="limit="+this.limit),t},e}(n(2195).default);e.default=s},6021:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569),i=n(1517);e.default=function(){this.meta=new r.default,this.data=[new i.default]}},2820:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.content=null,this.tags=[],this.campaign=null}},4630:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2820);e.default=function(t,e,n,i){this.action=null,this.context=new r.default,this.action=t,this.context.tags=e,n&&(this.context.content=n),i&&(this.context.campaign=i)}},2453: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)};Object.defineProperty(e,"__esModule",{value:!0});var i=n(7974),s=n(1316),a=n(9826),o=n(1517),u=n(6021);e.default=function(){var t=this;this.remapSingleResponse=function(t){var e=new o.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 u.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.remapStatsReponse=function(e){var n=new s.default;return n.profileId=e.profile_id,n.tier=e.tier,n.points=e.points,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},this.constructNewRecord=function(e){var n;return Object.entries(e).length?(Object.entries(e).forEach((function(e){var s,a=e[0],o=e[1];n=r(r({},n),((s={})[a]=t.remapSuccessRatePercent(o),s)),i.MarketEnum[a]&&delete n[a].model})),n):e},this.remapSuccessRatePercent=function(t){var e=new a.default;return e.successRatePercent=t.success_rate_percent,e}}},8261:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900);e.default=function(t){var e=this;this.remapTagsIds=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,a,o,u,c,l,d,h,p;return i(this,(function(i){switch(i.label){case 0:return t&&t.length?(e={},r={},a=[],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,s)]):[2,t];case 1:for(o=i.sent(),u=function(t,e){e.forEach((function(e,n){e.id=o[t][n],a.push(e)}))},c=0,l=Object.entries(r);c<l.length;c++)d=l[c],h=d[0],p=d[1],u(h,p);return[2,a]}}))}))},this.idSchema=t.idSchema,this.idMapping=new s.default(t)}},7e3:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(2754);e.default=function(t,e,n){var a=this;this.isBrowser=!1,this.localStorage={},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([""+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,o;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)})),[4,this.idMapping.remapEntities(a,"competition")];case 2:return o=i.sent(),t.forEach((function(t,n){return e.set(t,o[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:if(n=null,e=e||!1,!this.isBrowser)return[3,6];if(this.localStorage.getCompetitionsLength())return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.https.getCompetitions()];case 2:return n=i.sent(),[3,4];case 3:throw r=i.sent(),console.warn("There was a problem retrieving all competitions",r),r;case 4:this.localStorage.setCompetitions(n),i.label=5;case 5:return[2,this.localStorage.getCompetitions(t)];case 6:return[2,this.https.getCompetitions(t,e)]}}))}))},this.getCompetitionByIdIdMapping=function(t,e){return r(a,void 0,void 0,(function(){var n,r,s,a;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 s=i.sent(),[4,this.idMapping.remapEntities(s,"competition")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following competition:"+t,a),a;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: "+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.isBrowser="undefined"!=typeof window,this.localStorage=t,this.idMapping=n,this.https=e}},8350:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t,e,i){var s=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCountriesWithIdMapping=function(t){return n(s,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(s,void 0,void 0,(function(){var e,n,i;return r(this,(function(r){switch(r.label){case 0:return t=t||!1,this.isBrowser?(e=this.localStorage.getFootballCountries())&&e.length>0?[2,e]:[3,1]:[3,5];case 1:return r.trys.push([1,3,,4]),[4,this.https.getCountries(t)];case 2:return n=r.sent(),this.localStorage.setFootballCountries(n),[2,n];case 3:throw i=r.sent(),console.warn("There was a problem retrieving countries as football entities",i),i;case 4:return[3,6];case 5:return[2,this.https.getCountries(t)];case 6:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=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,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8350),a=n(7e3),o=n(9693),u=n(4272),c=n(4545),l=n(2140);e.default=function(t,e,n,d){var h=this;this.countriesFacade=null,this.competitionsFacade=null,this.teamsFacade=null,this.playerFacade=null,this.matchFacade=null,this.searchFacade=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.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.countriesFacade=new s.default(e,n,d),this.competitionsFacade=new a.default(e,n,d),this.teamsFacade=new o.default(t,n,d),this.playerFacade=new u.default(t,n,d),this.matchFacade=new c.default(t,n,d),this.searchFacade=new l.default(n,d)}},4545:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;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 a=n(712),o=n(6134),u=n(9582);e.default=function(t,e,n){var c=this;this.https=null,this.idMapping=null,this.footballService=null,this.getMatchesIdMapping=function(t,e){return r(c,void 0,void 0,(function(){var n,r,a,u,c,l,d,h;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,12,,13]),t?(t=new o.default(t)).countryIds?[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?[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?[4,this.idMapping.getEntityIdsBySchemaId(t.matchIds,"match","native")]:[3,6];case 5:a=i.sent(),t.matchIds=a.match,i.label=6;case 6:return t.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(t.teamIds,"team","native")]:[3,8];case 7:u=i.sent(),t.teamIds=u.team,i.label=8;case 8:return[4,this.getMatches(t,e)];case 9:return c=i.sent(),l=c,[4,this.footballService.setAvailableMarketsForMatch(s([],c.data,!0))];case 10:return l.data=i.sent(),d=c,[4,this.idMapping.remapEntities(c.data,"match")];case 11:return d.data=i.sent(),[2,c];case 12:throw h=i.sent(),console.warn("There was a problem browsing the matches",h),h;case 13:return[2]}}))}))},this.getMatchesWithNativeIds=function(t){return r(c,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 o.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(c,void 0,void 0,(function(){var e,n,r,s,u,c;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,a.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getMatchesWithNativeIds(n)];case 1:return r=i.sent(),n.length===r.length?[3,3]:(s=new o.default({matchIds:n,limit:n.length}),[4,this.getMatches(s)]);case 2:u=i.sent(),c=n.filter((function(t){if(u.data.every((function(e){return e.id!==t})))return t})),n=n.filter((function(t){if(!c.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(c,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(c,void 0,void 0,(function(){var n,r,s,a;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 s=i.sent(),[4,this.idMapping.remapEntities(s,"match")];case 4:return[2,i.sent()];case 5:throw a=i.sent(),console.warn("There was a problem browsing the following match: "+t,a),a;case 6:return[2]}}))}))},this.getMatchById=function(t,e){return r(c,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: "+t,n),n;case 3:return[2]}}))}))},this.https=e,this.idMapping=n,this.footballService=new u.default(t)}},4272:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(6477),a=n(712),o=n(9582);e.default=function(t,e,n){var u=this;this.https=null,this.footballService=null,this.idMapping=null,this.getPlayersIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,a,o,u,c,l;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(),c=u,[4,this.idMapping.remapEntities(u.data,"player")];case 9:return c.data=i.sent(),[2,u];case 10:throw l=i.sent(),console.warn("There was a problem browsing the players",l),l;case 11:return[2]}}))}))},this.getPlayersWithNativeIds=function(t){return r(u,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(u,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e={},(n=(0,a.transformIdsToBeUnique)(t)).sort((function(t,e){return t.localeCompare(e)})),[4,this.getPlayersWithNativeIds(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(u,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(u,void 0,void 0,(function(){var n,r,s;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 s=i.sent(),console.warn("There was a problem browsing the following player:"+t,s),s;case 5:return[2]}}))}))},this.getPlayerById=function(t,e){return r(u,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: "+t,n),n;case 3:return[2]}}))}))},this.getTopPlayersIdMapping=function(t){return r(u,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(u,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(u,void 0,void 0,(function(){var n,r,s;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 s=i.sent(),console.warn("There was a problem browsing the next match for player:"+t,s),s;case 5:return[2]}}))}))},this.getNextMatchForPlayer=function(t,e){return r(u,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: "+t,r),r;case 4:return[2]}}))}))},this.getPrevMatchForPlayerIdMapping=function(t,e){return r(u,void 0,void 0,(function(){var n,r,s;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 s=i.sent(),console.warn("There was a problem browsing the previous match for player:"+t,s),s;case 5:return[2]}}))}))},this.getPrevMatchForPlayer=function(t,e){return r(u,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: "+t,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new o.default(t)}},2140:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(604);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,c;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 c=i.sent(),console.warn("There was a problem with browsing the search result",c),c;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}},9693:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(9920),a=n(9582);e.default=function(t,e,n){var o=this;this.footballService=null,this.https=null,this.idMapping=null,this.getTeamsIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,a,o,u,c,l;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([""+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(),c=u,[4,this.idMapping.remapEntities(u.data,"team")];case 8:return c.data=i.sent(),[2,u];case 9:throw l=i.sent(),console.warn("There was a problem browsing all teams",l),l;case 10:return[2]}}))}))},this.getTeamsMapWithNativeIds=function(t){return r(o,void 0,void 0,(function(){var e,n,r,a,o;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)})),[4,this.idMapping.remapEntities(a,"team")];case 2:return o=i.sent(),t.forEach((function(t,n){return e.set(t,o[n])})),[2,e]}}))}))},this.getTeams=function(t,e){return r(o,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(o,void 0,void 0,(function(){var n,r,s;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 s=i.sent(),console.warn("There was a problem browsing the following team:"+t,s),s;case 5:return[2]}}))}))},this.getTeamById=function(t,e){return r(o,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: "+t,n),n;case 3:return[2]}}))}))},this.getTopTeamsIdMapping=function(t){return r(o,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(o,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(o,void 0,void 0,(function(){var n,r,s;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 s=i.sent(),console.warn("There was a problem browsing the next match for the following team:"+t,s),s;case 5:return[2]}}))}))},this.getNextMatchForTeam=function(t,e){return r(o,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: "+t,r),r;case 4:return[2]}}))}))},this.getPrevMatchForTeamIdMapping=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s;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 s=i.sent(),console.warn("There was a problem browsing the previous match for the following team:"+t,s),s;case 5:return[2]}}))}))},this.getPrevMatchForTeam=function(t,e){return r(o,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: "+t,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=e,this.footballService=new a.default(t)}},8808:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900),a=n(5601),o=n(595),u=n(4289);e.default=function(t){var e=this;this.https=null,this.idMapping=null,this.localStorage=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.https=new o.default(t),this.idMapping=new s.default(t),this.localStorage=new a.default(t),this.footballFacade=new u.default(t,this.localStorage,this.https,this.idMapping)}},6975:(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=""}},2754:(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="+e.countryId),e.gender&&(t=(t+="&")+"gender="+e.gender),e.type&&(t=(t+="&")+"type="+e.type),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),e.name&&(t=(t+="&")+"name="+e.name),e.competitionIds&&(t=(t+="&")+"competition_ids="+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?""+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?""+t.sortField:null,this.sortOrder=t.sortOrder?""+t.sortOrder:null,this.competitionIds=t.competitionIds?t.competitionIds:null}},3321:(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=[]}},7316:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6975),i=n(3430),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new r.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},8758:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3321),i=n(3430),s=n(5827),a=function(){function t(){this.countryRemapper=null,this.teamBasicRemapper=null,this.countryRemapper=new i.default,this.teamBasicRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.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=a},4427:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.alias="",this.countryCode="",this.assets=null,this.name=""}},3430:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4427);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 r.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}}},8470:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.homeTeam={players:[]},this.awayTeam={players:[]}}},3098:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8470),i=n(3550),s=function(){function t(){this.playerRemapper=null,this.playerRemapper=new i.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.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},2579:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.homeTeam=null,this.awayTeam=null,this.isDeleted=!1,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.context={competition:null},this.status={type:null,subType:null}}},6134:(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(){var t="";return e.countryIds&&(t=(t+="&")+"countries="+e.countryIds.join(",")),e.competitionIds&&(t=(t+="&")+"competitions="+e.competitionIds.join(",")),e.matchIds&&(t=(t+="&")+"matches="+e.matchIds.join(",")),e.status&&(t=(t+="&")+"status="+e.status),e.teamIds&&(t=(t+="&")+"teams="+e.teamIds.join(",")),e.fromDate&&(t=(t+="&")+"from_date="+e.fromDate),e.toDate&&(t=(t+="&")+"to_date="+e.toDate),e.limit&&(t=(t+="&")+"limit="+e.limit),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),t},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}},9661:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899);e.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.isDeleted=!1,this.homeTeam=null,this.awayTeam=null,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.stats=null,this.context={competition:null},this.timeline=[],this.status=new r.default,this.lineups=null}},5284:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2579),i=n(5827),s=n(7316),a=n(3949),o=function(){function t(){this.teamRemapper=null,this.competitionRemapper=null,this.scoresRemapper=null,this.teamRemapper=new i.default,this.competitionRemapper=new s.default,this.scoresRemapper=new a.default}return t.prototype.fromResponse=function(t){try{var e=new r.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.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=o},9330:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9661),i=n(5827),s=n(7316),a=n(7122),o=n(3949),u=n(3098),c=n(8470),l=n(92),d=function(){function t(){this.teamMapper=null,this.competitionsMapper=null,this.lineupsMapper=null,this.scoresMapper=null,this.statsMapper=null,this.timelineMapper=null,this.teamMapper=new i.default,this.competitionsMapper=new s.default,this.lineupsMapper=new u.default,this.scoresMapper=new o.default,this.statsMapper=new a.default,this.timelineMapper=new l.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new r.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.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.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=d},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}},3949:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4652),i=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 r.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=i},7950:(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:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7950),i=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 r.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=i},6899:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.type=null,this.subType=null}},9452:(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=""}},92:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9452),i=n(3550),s=function(){function t(){this.playerRemapper=null,this.playerRemapper=new i.default}return t.prototype.fromResponse=function(t){try{var e=new r.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},753:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569);e.default=function(){this.meta=new r.default,this.data=[]}},3569:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(155);e.default=function(){this.pagination=new r.default}},155:(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}},1925:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569);e.default=function(){this.remapMetaProp=function(t){var e=new r.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}}},4426:(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=[]}},6477:(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="+e.countryId),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),e.name&&(t=(t+="&")+"name="+e.name),e.playerIds&&(t=(t+="&")+"player_ids="+e.playerIds.join(",")),e.limit&&(t=(t+="&")+"limit="+e.limit),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+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}},1837:(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=[]}},4803:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id="",this.name="",this.position="",this.assets=null,this.type=""}},9071:(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=""}},5157:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(4426),s=n(5827),a=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.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=a},7943:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(1837),s=n(5827),a=n(7316),o=function(){function t(){this.countryRemapper=null,this.teamRemapper=null,this.competitionRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default,this.competitionRemapper=new a.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new i.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=o},3550:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4803),i=function(){function t(){}return t.prototype.fromResponse=function(t){try{var e=new r.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=i},4085:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(9071),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.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:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(56),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.default}return t.prototype.fromResponse=function(t){try{var e=new i.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},56:(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}},604:(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="+e.entities.join(",")),e.query&&(t=(t+="&")+"q="+e.query),e.scope&&(t=(t+="&")+"scope="+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}},6967:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.teams=null,this.players=null,this.competitions=null}},7287:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5827),i=n(5157),s=n(7316),a=n(6967),o=function(){function t(){this.teamRemapper=null,this.playerRemapper=null,this.competitionremapper=null,this.teamRemapper=new r.default,this.playerRemapper=new i.default,this.competitionremapper=new s.default}return t.prototype.fromResponse=function(t){var e=this;try{var n=new a.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=o},5827:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(9314),s=function(){function t(){this.countryRemapper=null,this.countryRemapper=new r.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.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}catch(t){throw console.warn("There was a problem remapping teams response",t),t}},t}();e.default=s},7821:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3430),i=n(1986),s=n(4085),a=n(7316),o=function(){function t(){this.countryRemapper=null,this.competitionRemapper=null,this.playerRemapper=null,this.countryRemapper=new r.default,this.competitionRemapper=new a.default,this.playerRemapper=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.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.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=o},9314:(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.fullName="",this.shortName="",this.isDeleted=!1}},3773:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.primary=null,this.secondary=null,this.tertiary=null}},9920:(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="+e.name),e.countryId&&(t=(t+="&")+"country_id="+e.countryId),e.national&&(t=(t+="&")+"national="+e.national),e.gender&&(t=(t+="&")+"gender="+e.gender),e.limit&&(t=(t+="&")+"limit="+e.limit),e.scope&&(t=(t+="&")+"scope="+e.scope.join(",")),e.page&&(t=(t+="&")+"page="+e.page),e.sortField&&(t=(t+="&")+"sort_field="+e.sortField),e.sortOrder&&(t=(t+="&")+"sort_order="+e.sortOrder),e.teamIds&&(t=(t+="&")+"team_ids="+e.teamIds.join(",")),t},this.name=t.name?t.name:null,this.countryId=t.countryId?""+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?""+t.sortField:null,this.sortOrder=t.sortOrder?""+t.sortOrder:null,this.teamIds=t.teamIds?t.teamIds:null}},1986:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3773);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.colors=new r.default,this.squad=[]}},9582:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(7686);e.default=function(t){var e=this;this.clientHttps=null,this.setAvailableMarketsForMatch=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.clientHttps.getConfig(s.FeatureConfigType.PREDICTOR)];case 1:return e=i.sent(),n=e.fullCoverageCompetitions,r=e.markets,Array.isArray(t)?[2,t.map((function(t){return a.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,s=null===(i=t.context.competition)||void 0===i?void 0:i.id;return s&&e.isMatchInCoverageCompetition(s,n)?(t.availableMarkets=r.all,t):(t.availableMarkets=r.main,t)},this.isMatchInCoverageCompetition=function(t,e){var n=!1;return e.includes(t)?n=!0:n},this.clientHttps=new s.default(t)}},3822:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;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 a=n(4946),o=n(7686),u=n(3142),c=n(7232),l=n(1139),d=n(9502),h=n(8900),p=n(1859),f=n(2793);e.default=function(t,e,n,m,v){var y=this;this.config=null,this.clientHttps=null,this.loyaltyHttps=null,this.loyaltyService=null,this.profileFacade=null,this.loyaltyValidator=null,this.idMapping=null,this.topXFacade=null,this.matchQuizFacade=null,this.predictorHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(y,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.LOYALTY)];case 1:return[2,t.sent()]}}))}))},this.getClientBadges=function(){return r(y,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.buildClientBadges(t.rewards.badges)]}}))}))},this.getTemplates=function(t){return r(y,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=!0,this.config.idSchema!==a.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(s([],n.data,!0))];case 4:return r.data=i.sent(),[2,n]}}))}))},this.getTemplateById=function(t,e){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.loyaltyHttps.getTemplateById(t,e)];case 1:return n=r.sent(),this.config.idSchema===a.IdSchemaEnum.NATIVE?[2,n]:[4,this.loyaltyService.remapTemplatesIds([n])];case 2:return[2,r.sent()[0]]}}))}))},this.getLeaderboard=function(t,e,n){return r(y,void 0,void 0,(function(){var r,s;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(),s=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return s.data=i.sent(),[2,r]}}))}))},this.getLeaderboardForGame=function(t,e,n){return r(y,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return e=this.loyaltyService.initFilters(e,"loyalty"),[4,this.loyaltyHttps.getLeaderboardForGame(t,n,e)];case 1:return r=i.sent(),s=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return s.data=i.sent(),[2,r]}}))}))},this.getOwnRankings=function(t,e){return r(y,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(y,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(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t&&this.loyaltyValidator.validateMarket(this.errorHandlingMode,t),[4,this.loyaltyHttps.getHighestSuccessRate(t,e)];case 1:return n=r.sent(),[2,this.loyaltyService.addProfileModelToHighestSuccessRate(n)]}}))}))},this.getTemplateWinners=function(t){return r(y,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getTemplateById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.loyaltyService.completeContestWinners(e)]}}))}))},this.getEntitiesFollows=function(t,e){return r(y,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===a.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(y,void 0,void 0,(function(){var e,n,r,s,a,o,u,c,l,d,h,p;return i(this,(function(i){switch(i.label){case 0:return e=null,n=null,r=null,s=this.loyaltyService.extractRankingsIdsMap(t.data),a=s[0],o=s[1],(u=s[2]).length?[4,this.getTemplates()]:[3,2];case 1:c=i.sent(),e=c.data.filter((function(t){return u.includes(t.id)})),i.label=2;case 2:return a.length?(l={gameIds:a},[4,this.topXFacade.getGames(l)]):[3,4];case 3:d=i.sent(),n=d.data,i.label=4;case 4:return o.length?(h={gameIds:o},[4,this.matchQuizFacade.getGames(h)]):[3,6];case 5:p=i.sent(),r=p.data,i.label=6;case 6:return[2,this.loyaltyService.setModelsForUserRankings(n,r,e,t)]}}))}))},this.config=t,this.clientHttps=e,this.loyaltyHttps=n,this.profileFacade=new c.default(v,m),this.loyaltyService=new u.default(this.config),this.loyaltyValidator=new l.default,this.idMapping=new h.default(t),this.topXFacade=new d.default(t,this.idMapping),this.matchQuizFacade=new p.default(t),this.predictorHttps=new f.default(t,this.idMapping),this.errorHandlingMode=t.errorHandlingMode}},2962:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(7686),a=n(7059),o=n(3822),u=n(4275),c=n(5601);e.default=function(t){var e=this;this.clientHttps=null,this.profileHttps=null,this.loyaltyHttps=null,this.loyaltyFacade=null,this.localStorage=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.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.getTemplates=function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplates(t)];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,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.getLeaderboardForGame=function(t,n,s){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,s)];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,s){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,s)];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){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getTemplateWinners(t)];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.clientHttps=new s.default(t),this.profileHttps=new u.default(t),this.loyaltyHttps=new a.default(t),this.localStorage=new c.default(t),this.loyaltyFacade=new o.default(t,this.clientHttps,this.loyaltyHttps,this.profileHttps,this.localStorage)}},8153:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},5111:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8153);e.default=function(){this.value=[new r.default]}},8608:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=[],this.predictor=[],this.topX=[],this.matchQuiz=[]}},246:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1429);e.default=function(){this.requirements=new r.default}},8687:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},1429:(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}},515:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5111),i=n(4226);e.default=function(){this.enabled=!1,this.conditions={list:null},this.actions=new r.default,this.rewards=new i.default}},7910:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.limit=null,this.page=null,this.limit=t.limit?t.limit:null,this.page=t.page?t.page:null}return t.prototype.constructFiltersUrl=function(){var t="";return this.limit&&(t+="&",t+="limit="+this.limit),this.page&&(t+="&",t+="page="+this.page),t},t}();e.default=n},4996: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)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(e){var n=t.call(this,e)||this;return n.sortOrder=null,n.rankType=null,n.leaderboardIds=null,n.gameType=null,n.constructFiltersUrl=function(){var e=t.prototype.constructFiltersUrl.call(n);return n.sortOrder&&(e+="&",e+="sort_order="+n.sortOrder),n.rankType&&(e+="&",e+="rank_type="+n.rankType),n.leaderboardIds&&(e+="&",e+="type_ids="+n.leaderboardIds.join(",")),n.gameType&&(e+="&",e+="game_type="+n.gameType),e},n.sortOrder=e.sortOrder,n.rankType=e.rankType,n.leaderboardIds=e.leaderboardIds,n.gameType=e.type&&"game"===e.type.toLowerCase()?e.gameType:null,n}return i(e,t),e}(n(7910).default);e.default=s},6507:(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:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6507);e.default=function(){this.remapHighestSuccessRate=function(t){return t.map((function(t){var e=new r.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}))}}},9642:(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}},7419:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5828),i=n(9642);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.remapMeta=function(t){var e=new r.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.remapData=function(t){var e=[];return t.forEach((function(t){var n=new i.default;n.position=t.position,n.profileId=t.profile_id,n.points=t.points,n.predictionsMade=t.predictions_made,e.push(n)})),e}}},5828:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(155);e.default=function(){this.rankType=null,this.fromDate=null,this.toDate=null,this.pagination=new r.default}},4187:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.general=null,this.comments=null,this.predictor=null,this.activity=null,this.topX=null,this.matchQuiz=null}},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)});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}(n(9642).default);e.default=s},4533:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3569),i=n(9013),s=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.remapMeta=function(t){var e=new r.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 i.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}();e.default=s},4226:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.points=null,this.tiers=null,this.badges=null}},4982: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)});Object.defineProperty(e,"__esModule",{value:!0});var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.labels=null,e.customFields=null,e}return i(e,t),e}(n(194).default);e.default=s},194:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(439);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.gameIds=[],this.gameTypes=[],this.competitionIds=[],this.excludedProfileIds=[],this.rules=null,this.flags=null,this.images=new r.default,this.status=null,this.automaticallyChangeStatus=!0,this.createdAt=null,this.updatedAt=null,this.related=null}},8899:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3483),i=n(4982),s=n(194);e.default=function(){var t=this;this.remapResponse=function(e){var n=[];return e.forEach((function(e){var r=new s.default;r.id=e.id,r.name=e.name,r.description=e.description,r.type=e.type,r.fromDate=e.from_date,r.toDate=e.to_date,r.markets=e.markets?e.markets:null,r.teamIds=e.team_ids?e.team_ids:null,r.matchIds=e.match_ids?e.match_ids:null,r.gameIds=e.game_ids?e.game_ids:null,r.gameTypes=e.game_types?e.game_types:null,r.competitionIds=e.competition_ids?e.competition_ids:null,r.excludedProfileIds=e.excluded_profile_ids?e.excluded_profile_ids:null,r.rules=e.rules?e.rules:null,r.flags=e.flags?e.flags:null,r.images=e.images?e.images:null,r.status=e.status?e.status:null,r.automaticallyChangeStatus=e.automatically_change_status,r.createdAt=e.created_at,r.updatedAt=e.updated_at,r.related=e.related?t.remapRelated(e.related):null,n.push(r)})),n},this.remapResponseId=function(e){var n=new i.default;return n.id=e.id,n.name=e.name,n.description=e.description,n.type=e.type,n.fromDate=e.from_date,n.toDate=e.to_date,n.markets=e.markets?e.markets:null,n.teamIds=e.team_ids?e.team_ids:null,n.matchIds=e.match_ids?e.match_ids:null,n.gameIds=e.game_ids?e.game_ids:null,n.gameTypes=e.game_types?e.game_types:null,n.competitionIds=e.competition_ids?e.competition_ids:null,n.excludedProfileIds=e.excluded_profile_ids?e.excluded_profile_ids:null,n.rules=e.rules?e.rules:null,n.flags=e.flags?e.flags:null,n.images=e.images?e.images:null,n.status=e.status?e.status:null,n.automaticallyChangeStatus=e.automatically_change_status,n.related=e.related?t.remapRelated(e.related):null,n.labels=e.labels,n.customFields=e.custom_fields,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapMeta=function(t){var e={};return e.totalItems=t.pagination.total_items,e},this.remapRelated=function(t){return t.map((function(t){var e=new r.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e}))}}},3142:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;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 a=n(4946),o=n(4021),u=n(4904),c=n(8097),l=n(2535),d=n(5318),h=n(8900),p=n(8808),f=n(6409),m=n(8687),v=n(7910),y=n(4996);e.default=function(t){var e=this;this.idMappingService=null,this.profileNamespace=null,this.footballNamespace=null,this.errorHandlingMode=null,this.remapTemplatesIds=function(t){return r(e,void 0,void 0,(function(){var e,n,r,a,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=s(s([],e,!0),t.teamIds,!0):t.matchIds&&t.matchIds.length>0?n=s(s([],n,!0),t.matchIds,!0):t.competitionIds&&t.competitionIds.length>0&&(r=s(s([],r,!0),t.competitionIds,!0))})),a={team:e,match:n,competition:r},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(a,"native",this.idMappingService.idSchema)]):[3,2];case 1:return o=i.sent(),s([],o.team,!0),s([],o.match,!0),s([],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.addProfileModelToLeaderboad=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.buildClientBadges=function(t){var n=new m.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.initFilters=function(t,e){switch(e){case"loyalty":t&&(t=new v.default(t));break;case"rankings":t&&(t=new y.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 e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)];case 1:return 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})),[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(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_FILTERS,d.ErrorMessages.ENTITIES_NEEDED);throw new l.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_FILTERS,d.ErrorMessages.ENTITIES_NEEDED).response}if(t.footballCompetitions&&t.footballCompetitions.length>10||t.footballTeams&&t.footballTeams.length>10||t.footballPlayers&&t.footballPlayers.length>10){if("default"===e.errorHandlingMode)throw new c.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.EXCEEDED_LENGTH,d.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED);throw new l.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.EXCEEDED_LENGTH,d.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED).response}},this.remapEntitiesFollowsFilters=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s;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,a.IdSchemaEnum.NATIVE)];case 1:return s=i.sent(),Object.keys(s).forEach((function(t){"competition"===t?n.footballCompetitions=s[t]:"team"===t?n.footballTeams=s[t]:"player"===t&&(n.footballPlayers=s[t])})),[2,n]}}))}))},this.addModelsToEntitiesFollows=function(t){return r(e,void 0,void 0,(function(){var e,n,r,s,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return e=[],n="fb:c:",r=new Map,s=[],a="fb:t:",o=new Map,u=[],c="fb:p:",l=null,t.breakdown.forEach((function(t){t.id.includes(n)?e.push(t.id):t.id.includes(a)?s.push(t.id):t.id.includes(c)&&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 s.length?[4,this.footballNamespace.footballFacade.teamsFacade.getTeamsMapWithNativeIds(s)]:[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:l=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(a)?(t.model=o.get(t.id),t.id=t.model.id):t.id.includes(c)&&(t.model=l[t.id],t.id=t.model.id)})),[2,t]}}))}))},this.extractEnabledBadgesId=function(t){var e=[];return t.forEach((function(t){t.enabled&&e.push(t.id)})),e},this.idMappingService=new h.default(t),this.profileNamespace=new f.default(t),this.footballNamespace=new p.default(t),this.errorHandlingMode=t.errorHandlingMode}},1139:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4021),i=n(4904),s=n(8097),a=n(2535),o=n(5318),u=n(7974);e.default=function(){this.validateMarket=function(t,e){if(!Object.keys(u.MarketEnum).includes(e)){var n=(0,o.invalidMarketMessage)(e);if("default"===t)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n);throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n).response}}}},1859:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(1553),o=n(7686),u=n(2793),c=n(8900),l=n(1732),d=n(7782),h=n(5013),p=n(853),f=n(7299),m=n(2310),v=n(4800),y=n(8097),g=n(4021),w=n(4904),b=n(5318),_=n(2535);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 r(e,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.MATCH_QUIZ)];case 1:return t=e.sent(),this.idMapping.idSchema===s.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 r(e,void 0,void 0,(function(){var e,n,r,a,o,u=this;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorValidator.validateBodyFields("MATCH_QUIZ",t),(e=t.fixtures.map((function(t){return u.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value,t.prediction.playerId)})))&&e.length?this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:(n=[],r=[],e.forEach((function(t){n.push(t.matchId),t instanceof l.default&&t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&r.push(t.prediction.playerId)})),[4,this.predictorService.remapMatchIdToNative(n)]):[3,4];case 1:return a=i.sent(),o={},r&&r.length>0?[4,this.predictorService.remapPlayerIdMapToNative(r)]:[3,3];case 2:o=i.sent(),i.label=3;case 3:e.forEach((function(t,e){t.matchId=a[e],t instanceof l.default&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=o[t.prediction.playerId])})),i.label=4;case 4:return t.fixtures=e,[4,this.predictorHttps.makeFootballPrediction(t)];case 5:return[2,i.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.predictorHttps.deleteFootballPrediction(t)];case 1:return[2,e.sent()]}}))}))},this.getGames=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||!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.getGameById=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=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,s){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return s=s||!1,n&&(n.type&&delete n.type,n.status&&delete n.status,n=new d.default(n)),[4,this.predictorHttps.getGamePredictions(t,s,n)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,s){return r(e,void 0,void 0,(function(){var e;return i(this,(function(r){switch(r.label){case 0:return s=s||!1,n&&(n=new v.default(n)),[4,this.predictorHttps.getGameResults(t,s,n)];case 1:return e=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(e)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=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||!1,e={status:p.GameStatusEnum.OPEN,type:"MATCH_QUIZ"},e=new f.default(e),[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 r(e,void 0,void 0,(function(){var e,r,s,o,u;return i(this,(function(i){switch(i.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(s=i.sent()).data.length>0?(s.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),o=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(o,n)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(s,u)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getMyGamePrediction=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 e=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[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,s){return r(e,void 0,void 0,(function(){var e,r,o,u,c;return i(this,(function(i){switch(i.label){case 0:return n&&n.limit&&this.validateLimitFilterOnGames(n.limit),s=s||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ",n),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,e)];case 1:return(o=i.sent()).data.length>0?(o.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),u=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(u,s)]):[3,4];case 2:return c=i.sent(),[4,this.predictorService.addPredictionProp(o,c)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getUserGamePrediction=function(t,n,s){return r(e,void 0,void 0,(function(){var e,r,a;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,e=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getUserPredictions(t,s,e)];case 1:return(r=i.sent()).data.length>0?[2,(a=r.data.filter((function(t){return t.gameInstanceId===n}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=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.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){return r(e,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getGameById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===e.errorHandlingMode&&t>50)throw new y.default(g.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,b.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===e.errorHandlingMode&&t>50)throw new _.default(g.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,b.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.predictorValidator=new m.default(t.errorHandlingMode),this.idMapping=new c.default(t),this.predictorHttps=new u.default(t,this.idMapping),this.predictorService=new h.default(t,this.idMapping),this.clientHttps=new o.default(t),this.errorHandlingMode=t.errorHandlingMode}},267:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(1859);e.default=function(t){var e=this;this.matchQuizFacade=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.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,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,s){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,s)];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,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,s){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,s)];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){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getGameWinners(t)];case 1:return[2,e.sent()]}}))}))},this.matchQuizFacade=new s.default(t)}},5765:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.defaultMarkets=null,this.competitionsWhitelist=null}},8410:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899),i=n(8042);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},670:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameId=null,this.results=null,this.tieBreakers=null}},7243:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.images=null,this.scheduleOpenAt=null}},8042:(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}},7974:(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},6147:(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"},2929:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;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 a=n(4946),o=n(7974),u=n(7686),c=n(5013),l=n(3950),d=n(1732),h=n(2310),p=n(8097),f=n(4021),m=n(4904),v=n(5318),y=n(2535);e.default=function(t,e,n,g){var w=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,s){return r(w,void 0,void 0,(function(){var r,u,c,h,g,w,b;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorValidator.validateFixture(t,e,n,s),u=new l.default,this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,6]:(c=r.matchId,h="",[4,this.predictorService.remapMatchIdToNative([c])]);case 1:if(g=i.sent(),r.matchId=g[0],"default"===this.errorHandlingMode&&!r.matchId)throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).errorMessage();if("standard"===this.errorHandlingMode&&!r.matchId)throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).response;return r instanceof d.default&&"OWN_GOAL"!==r.prediction.playerId?r.prediction.playerId?(h=r.prediction.playerId,w=r.prediction,[4,this.predictorService.remapPlayerIdToNative([h])]):[3,3]:[3,4];case 2:w.playerId=i.sent(),i.label=3;case 3:if("default"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).errorMessage();if("standard"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).response;i.label=4;case 4:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 5:return(b=i.sent()).fixtures.forEach((function(t){t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerId=h),t.matchId=c})),[2,b];case 6:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 7:return[2,i.sent()]}}))}))},this.getMatchSummary=function(t,e){return r(w,void 0,void 0,(function(){var n,r,s;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 s=i.sent(),n.predictions=s,[2,n]}}))}))},this.getMarketSummary=function(t,e,n,s){return r(w,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,s)];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(w,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return this.idMapping.idSchema===a.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(s=i.sent()).matchId=t,[2,s];case 3:return[4,this.predictorHttps.getMatchSummary(t,e)];case 4:return[2,i.sent()]}}))}))},this.getConfig=function(){return r(w,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(u.FeatureConfigType.PREDICTOR)];case 1:return t=e.sent(),this.idMapping.idSchema===a.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(w,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(w,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(w,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(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(s([],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(w,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(w,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(w,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(w,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(w,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,o){return r(w,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(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(s([],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,o,r)];case 3:return[2,i.sent()]}}))}))},this.getPredictionById=function(t){return r(w,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.predictorHttps=e,this.idMapping=g,this.clientHttps=n,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new h.default(t.errorHandlingMode),this.predictorService=new c.default(t,g)}},704:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(8608),i=n(246),s=n(1429),a=n(515),o=n(4187),u=n(4226),c=n(5765),l=n(1180),d=n(8452);e.default=function(){var t=this;this.remapPredictorConfig=function(t){var e=new d.default;return e.enabled=t.enabled,e.fullCoverageCompetitions=t.full_coverage_competitions,e.markets=t.markets,e.successRateScopes=t.success_rate_scopes,e},this.remapTopXConfig=function(t){var e=new l.default;return e.enabled=t.enabled,e.minFixtures=t.min_fixtures,e.maxFixtures=t.max_fixtures,e.competitionsWhitelist=t.competitions_whitelist,e},this.remapMatchQuizConfig=function(t){var e=new c.default;return e.enabled=t.enabled,e.defaultMarkets=t.default_markets,e.competitionsWhitelist=t.competitions_whitelist,e},this.remapLoyaltyConfig=function(e){var n=new a.default;return n.enabled=e.enabled,n.conditions.list=e.conditions.list,n.actions.value=e.actions.value,n.rewards=t.remapRewards(e.rewards),n},this.remapRewards=function(e){var n=new u.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 o.default;return e.general=t.general,e.comments=t.comments,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 r.default;return n.general=e.general,n.predictor=t.remapBadgeValues(e.predictor),n.topX=t.remapBadgeValues(e.top_x),n.matchQuiz=t.remapBadgeValues(e.match_quiz),n},this.remapBadgeValues=function(e){return e.map((function(e){var n=new i.default;return n.id=e.id,n.enabled=e.enabled,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}}},8452:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(442);e.default=function(){this.enabled=!1,this.fullCoverageCompetitions=null,this.markets=null,this.successRateScopes=new r.default}},442:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.competitions=[],this.teams=[],this.markets=[]}},6367:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.playerId=null,this.playerModel=null}},1406:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(2524),a=n(1732),o=n(4119),u=n(1465),c=n(5132),l=n(7344);e.default=function(t,e,n){var d=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 a.default)e.market=t.market,e.prediction=t.prediction.value,e.player_id=t.prediction.playerId;else if(t instanceof c.default||t instanceof l.default)e.market=t.market,e.prediction=t.prediction.value;else if(t instanceof u.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(d,void 0,void 0,(function(){var e,n,r,a,o,u,c,l,d,h,p,f;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,c=t;u<c.length;u++)p=c[u],n.push(p.match_id),p.player_id&&!r.includes(p.player_id)&&r.push(p.player_id);return[4,this.matchFacade.getMatchesMapWithNativeIds(n)];case 1:return l=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,h=t;d<h.length;d++)p=h[d],f=new s.default,p.target?f.market=this.predictorService.convertMarketForResponseModel(p.market,p.target):f.market=p.market,f.matchId=l[p.match_id].id,f.matchType=p.match_type,f.matchModel=l?l[p.match_id]:null,delete f.matchModel.availableMarkets,void 0!==p.goals_home&&void 0!==p.goals_away?f.prediction.value=p.goals_home.toString()+":"+p.goals_away.toString():f.prediction.value=p.prediction,f.prediction.playerId=p.player_id?p.player_id:null,f.prediction.playerId&&f.prediction.playerId!==e&&(f.prediction.playerModel=a[p.player_id],f.prediction.playerId=a[p.player_id].id),f.result=this.remapResult(p.result),o.push(f);return[2,o]}}))}))},this.remapResult=function(t){var e=new o.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}},2524:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6367);e.default=function(){this.market=null,this.matchId=null,this.matchType=null,this.matchModel=null,this.prediction=new r.default,this.result=null}},1206:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.BOTH_TEAMS_SCORE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},5274:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(8038);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.CORNERS_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1465:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var 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 r.default,this.prediction.value=n}},7535:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(6902);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.DOUBLE_CHANCE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},7307:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(6642);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.HT_FT,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1718:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2782);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 r.default,this.prediction.value=n}},5132:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9883);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 r.default,this.prediction.value=n}},7344:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9883);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 r.default,this.prediction.value=n}},1855:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.PENALTY_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},1732:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7321);e.default=function(t,e,n,i){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.market=e,this.prediction=new r.default,this.prediction.value=n,this.prediction.playerId=i}},5814:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7974),i=n(9883);e.default=function(t,e){this.matchId=null,this.market=r.MarketEnum.RED_CARD_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=t,this.prediction=new i.default,this.prediction.value=e}},4119:(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}},5908:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.no=0,this.yes=0}},2726:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(1406),a=n(2532),o=n(3792),u=n(595),c=n(4545),l=n(4272),d=n(2524),h=n(5013),p=n(1399);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){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,s,o,u,c=this;return i(this,(function(i){switch(i.label){case 0:return t.length?(e="OWN_GOAL",n=[],r=[],s={},o=[],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:s=i.sent(),i.label=3;case 3:return t.forEach((function(t){var n=new a.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,t.fixtures.forEach((function(t){var n=new d.default;t.target?n.market=c.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.goals_home&&void 0!==t.goals_away?n.prediction.value=t.goals_home.toString()+":"+t.goals_away.toString():n.prediction.value=t.prediction,n.prediction.playerId=t.player_id?t.player_id:null,n.prediction.playerId&&n.prediction.playerId!==e&&(n.prediction.playerModel=s[n.prediction.playerId],n.prediction.playerId=s[n.prediction.playerId].id),n.result=c.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,o.push(n)})),[2,o];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 a.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,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 o.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 u.default(t),this.matchFacade=new c.default(t,this.footballHttps,e),this.playerFacade=new l.default(t,this.footballHttps,e),this.predictorService=new h.default(t,e),this.fixturesRemapper=new s.default(this.matchFacade,this.playerFacade,this.predictorService)}},3950:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.gameInstanceId=null,this.fixtures=null}},2532:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7640);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 r.default,this.points=null,this.createdAt=null,this.updatedAt=null}},7782:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6147);e.default=function(t){var e=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.matchIds=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="+e.limit),e.startAfter&&(t+="&",t+="start_after="+e.startAfter),e.status&&n&&(t+="&",t+="status="+e.status.join(",")),e.type&&(t+="&",t+="game_types="+e.type),e.matchIds&&(t+="&",t+="match_ids="+e.matchIds.join(",")),t},this.limit=t.limit?t.limit:null,this.startAfter=t.startAfter?t.startAfter:null,this.status=t.status?t.status:null,this.type=t.type?t.type:null,this.matchIds=t.matchIds?t.matchIds:null}},3792:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5908);e.default=function(){this.fullTimeOneXTwo={},this.halfTimeOneXTwo={},this.bothTeamsScore=new r.default,this.doubleChance={},this.halfTimeFullTime={},this.playerScore={},this.playerYellowCard={},this.playerRedCard={},this.redCardMatch=new r.default,this.penaltyMatch=new r.default,this.playerScoreFirstGoal={},this.cornersMatch={},this.correctScore={},this.correctScoreHalfTime={},this.correctScoreAdvanced={},this.playerScoreHattrick={},this.playerScoreTwice={},this.overZeroPointFiveGoals=new r.default,this.overOnePointFiveGoals=new r.default,this.overTwoPointFiveGoals=new r.default,this.overThreePointFiveGoals=new r.default,this.overFourPointFiveGoals=new r.default,this.overFivePointFiveGoals=new r.default,this.overSixPointFiveGoals=new r.default,this.overSixPointFiveCorners=new r.default,this.overSevenPointFiveCorners=new r.default,this.overEightPointFiveCorners=new r.default,this.overNinePointFiveCorners=new r.default,this.overTenPointFiveCorners=new r.default,this.overElevenPointFiveCorners=new r.default,this.overTwelvePointFiveCorners=new r.default,this.overThirteenPointFiveCorners=new r.default}},9378:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.matchId=null,this.matchType=null,this.predictions=null}},9679:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2726),i=n(9378);e.default=function(t,e){var n=this;this.remapPredictions=null,this.remapResponse=function(t){var e=new i.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.predictions=n.remapPredictions.remapPredictionModel(t.predictions),e},this.remapPredictions=new r.default(t,e)}},7321:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1,this.playerId=null}},9883:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=!1}},8038:(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}},6902:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},6642:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},2782:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null}},1259:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(2793),a=n(8900),o=n(2929),u=n(7686);e.default=function(t){var e=this;this.predictorHttps=null,this.clientHttps=null,this.predictorFacade=null,this.idMapping=null,this.makeFootballPrediction=function(t,n,s,a){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,s,a)];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,s,a){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,s,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.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,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.getUserCurrentPredictions=function(t,n,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.getUserPastPredictions=function(t,n,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.getUserPredictionsForMatches=function(t,n,s,a){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,s,a)];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.idMapping=new a.default(t),this.predictorHttps=new s.default(t,this.idMapping),this.clientHttps=new u.default(t),this.predictorFacade=new o.default(t,this.predictorHttps,this.clientHttps,this.idMapping)}},5013: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,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},a=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;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 o=n(7974),u=n(3792),c=n(8452),l=n(5908),d=n(8950),h=n(6890),p=n(595),f=n(4545),m=n(7782),v=n(7299),y=n(712),g=n(4119),w=n(3751),b=n(7243),_=n(4272),E=n(1180),I=n(5765),M=n(6147),O=n(5318),T=n(4946),R=n(6409),S=n(1260),P=n(6247);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 s(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 s(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 s(this,(function(s){switch(s.label){case 0:return e={},n=(0,y.transformIdsToBeUnique)(t),[4,this.idMapping.getEntityIdsBySchemaId(n,"player","native")];case 1:return r=s.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,a,o,u,c,l,d,h,p,f,m,v,y,g,w,b;return s(this,(function(s){switch(s.label){case 0:for(e=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=[],r=0,i=Object.entries(t);r<i.length;r++)if(a=i[r],o=a[0],u=a[1],e.includes(o))for(c=0,l=Object.keys(u);c<l.length;c++)"NOBODY"!==(d=l[c])&&"OWN_GOAL"!==d&&n.push(d);return n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[2,t];case 1:for(h=s.sent(),p=0,f=Object.entries(t);p<f.length;p++)if(m=f[p],v=m[0],y=m[1],e.includes(v))for(g=0,w=Object.keys(y);g<w.length;g++)"NOBODY"!==(b=w[g])&&"OWN_GOAL"!==b&&(y[h[b].id]=y[b],y[h[b].id].model=h[b],this.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&delete y[b]);return[2,t]}}))}))},this.convertMarket=function(t){for(var e=Object.keys(new u.default),n=Object.values(o.MarketEnum),r=0;r<n.length;r++)t===n[r]&&(t=e[r]);return 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,a,u,c,d,h,p,f=this;return s(this,(function(s){switch(s.label){case 0:if(n=this.convertMarket(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],o.playerMarkets.includes(e)&&r?(a="","OWN_GOAL"===r||"NOBODY"===r?[3,2]:[4,this.idMapping.idMappingFacade.getEntitiesByIds({player:[r]},this.idMapping.idSchema,"native")]):[3,6];case 1:u=s.sent(),a=u.player[0],s.label=2;case 2:return a&&i[n][a]?[4,this.playerFacade.getPlayersMapWithNativeIds([a])]:[3,4];case 3:return c=s.sent(),i[n][a].model=c[a],[2,i[n][a]];case 4:return a?(i[n][a]=new l.default,[2,i[n][a]]):[2,i[n][r]];case 5:return[3,10];case 6:return!o.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 p=s.sent(),[3,9];case 8:p={},s.label=9;case 9:h=p,Object.keys(h).length&&Object.keys(i[n]).forEach((function(t){"NOBODY"!==t&&"OWN_GOAL"!==t&&(i[n][h[t].id]=i[n][t],i[n][h[t].id].model=h[t],f.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&delete i[n][t])})),s.label=10;case 10:return[2,i]}}))}))},this.remapCompetitionsFromConfig=function(t){return i(n,void 0,void 0,(function(){var e,n,r,i,a,o,u,l;return s(this,(function(s){switch(s.label){case 0:return t instanceof c.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=s.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",this.idMapping.idSchema)];case 2:return a=s.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(r,"native",this.idMapping.idSchema)];case 3:return o=s.sent(),t.fullCoverageCompetitions=i.competition,t.successRateScopes.competitions=a.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 l=s.sent(),t.competitionsWhitelist=l.competition,[2,t];case 6:return[2]}}))}))},this.remapMatchIdsFixtures=function(t){return i(n,void 0,void 0,(function(){var e,n;return s(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 w.default||t instanceof d.default||t instanceof b.default||t instanceof P.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 h.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,a,o=this;return s(this,(function(s){switch(s.label){case 0:return n=[],[4,this.matchFacade.getMatchesMapWithNativeIds(e)];case 1:return i=s.sent(),a={},r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=s.sent(),s.label=3;case 3:return t.data.forEach((function(t){t instanceof w.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=a[e.prediction.playerId],e.prediction.playerId=a[e.prediction.playerId].id)})),n.push(t)):t instanceof h.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 s(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 s(this,(function(r){switch(r.label){case 0:return e.data.forEach((function(e){t.data.forEach((function(t){e.id===t.game_instance_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.points=t.points)}))})),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 g.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,u,c,l,d,h,p=this;return s(this,(function(s){switch(s.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 o.playerMarkets.includes(t.market)&&!t.result.includes("OWN_GOAL")?a([],t.result,!0):[]})).flat(),[4,this.matchFacade.getMatchesMapWithNativeIds([r])];case 2:return u=s.sent(),i.length?[4,this.playerFacade.getPlayersMapWithNativeIds(i)]:[3,4];case 3:n=s.sent(),s.label=4;case 4:return t.results=t.results.map((function(t){if(t.matchModel=u[t.matchId]?u[t.matchId]:null,t.playerModels&&Object.keys(n).length&&(e=t.result).forEach((function(e){var r=n[e];t.playerModels.push(r)})),p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&(p.remapMatchIdForResultsMarkets(u,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 c=t.results.map((function(t){return t.matchId})),[4,this.matchFacade.getMatchesMapWithNativeIds(c)];case 6:return l=s.sent(),t.results=t.results.map((function(t){return t.matchModel=l[t.matchId]?l[t.matchId]:null,p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&p.remapMatchIdForResultsMarkets(l,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:h=s.sent(),t.tieBreakers.goldenGoals=t.tieBreakers.goldenGoals.map((function(t){return t.matchModel=l[t.matchId],t.playerModel=h[t.playerId],p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&(t.matchId=l[t.matchId].id,t.playerId=h[t.playerId].id),t})),s.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 s(this,(function(r){switch(r.label){case 0:return e=t.userList.map((function(t){return t.profileId})),[4,this.profileNamespace.getByIds(e)];case 1:return 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})),[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!==T.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.footballHttps=new p.default(t),this.idMapping=e,this.matchFacade=new f.default(t,this.footballHttps,e),this.playerFacade=new _.default(t,this.footballHttps,e),this.profileNamespace=new R.default(t)}},2310:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4021),i=n(4904),s=n(8097),a=n(5318),o=n(7974),u=n(1976),c=n(1206),l=n(5274),d=n(1465),h=n(7535),p=n(1718),f=n(7307),m=n(5132),v=n(7344),y=n(1855),g=n(1732),w=n(5814),b=n(3950),_=n(1260),E=n(7640),I=n(2535);e.default=function(t){var e=this;this.errorHandlingMode=null,this.validateBodyFields=function(t,n){var r=Object.keys(n),i=Object.keys(new b.default);switch(t){case"MATCH_QUIZ":r.forEach((function(t){i.includes(t)||e.throwInvalidParamException([t])}));break;case"TOP_X":var s=n;s.fixtures.forEach((function(t){return e.validateMarketTopX(t.market)})),r.includes("tiebreaker")&&s.tiebreaker&&e.validateTiebreaker(s.tiebreaker),r.forEach((function(t){"tiebreaker"===t||i.includes(t)||e.throwInvalidParamException([t])}))}var a=i.filter((function(t){return!r.includes(t)}));return a.length&&e.throwMissingFieldsException("game prediction body",a),n.fixtures.forEach((function(t){e.validateFixtureFields(t)})),n},this.validateFixture=function(t,n,r,i){e.validateMarket(n);var s=Object.values(u.OneXTwoEnum),a=Object.values(u.HalfTimeFullTimeEnum),b=Object.values(u.DoubleChanceEnum);if(n===o.MarketEnum.FT_1X2||n===o.MarketEnum.HT_1X2){if(s.includes(r))return new p.default(t,n,r)}else if(n===o.MarketEnum.HT_FT){if(a.includes(r))return new f.default(t,r)}else if(n===o.MarketEnum.DOUBLE_CHANCE){if(b.includes(r))return new h.default(t,r)}else if(n===o.MarketEnum.CORRECT_SCORE||n===o.MarketEnum.CORRECT_SCORE_ADVANCED||n===o.MarketEnum.CORRECT_SCORE_HT){if("string"==typeof r&&/\d+:\d+/.test(r))return new d.default(t,n,r)}else if(n===o.MarketEnum.CORNERS_MATCH){if("number"==typeof r)return new l.default(t,r)}else if(n===o.MarketEnum.BOTH_TEAMS_SCORE){if(e.isPredictionBoolean(r))return new c.default(t,r)}else if(n===o.MarketEnum.RED_CARD_MATCH){if(e.isPredictionBoolean(r))return new w.default(t,r)}else if(n===o.MarketEnum.PENALTY_MATCH){if(e.isPredictionBoolean(r))return new y.default(t,r)}else if(o.playerMarkets.includes(n)){var _="OWN_GOAL";if(e.validatePlayerId(n,i),n===o.playerMarketNobodyPrediction&&e.isPredictionBoolean(r)){var E=i&&i===_?_:i;return new g.default(t,n,r,E)}if(i&&e.isPredictionBoolean(r))return new g.default(t,n,r,i)}else if(o.MarketsOverGoals.includes(n)){if(e.isPredictionBoolean(r))return new v.default(t,n,r)}else if(o.MarketsOverCorners.includes(n)&&e.isPredictionBoolean(r))return new m.default(t,n,r);e.throwInvalidPredictionException(r,n)},this.validateFixtureFields=function(t){var n=Object.keys(t);n.forEach((function(t){_.validFixtureFields.includes(t)||e.throwInvalidParamException([t])}));var r=_.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 E.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){o.playerMarkets.includes(t)&&i.push("playerId");var s=r.filter((function(t){return!i.includes(t)}));s.length&&e.throwInvalidParamException(s)}}else e.throwInvalidType("prediction","object")},this.validatePlayerId=function(t,n){var r="playerId";t!==o.playerMarketNobodyPrediction&&(n||e.throwInvalidParamException([r]),"string"!=typeof n&&e.throwInvalidType(r,"string"))},this.validateMarket=function(t){Object.values(o.MarketEnum).includes(t)||e.throwInvalidMarketException(t)},this.validateMarketTopX=function(t){t!==o.MarketEnum.CORRECT_SCORE&&t!==o.MarketEnum.CORRECT_SCORE_ADVANCED&&e.throwInvalidMarketException(t,"TOP_X")},this.isPredictionBoolean=function(t){return"boolean"==typeof t},this.throwInvalidPredictionException=function(t,n){var o=(0,a.invalidPredictionMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_PREDICTION,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidMarketException=function(t,n){var o;if(o=n&&"TOP_X"===n?(0,a.invalidMarketTopXMessage)(t):(0,a.invalidMarketMessage)(t),"default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidParamException=function(t){var n=(0,a.invalidFieldMessage)(t);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,n);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,n).response},this.throwMissingFieldsException=function(t,n){var o=(0,a.missingFieldsMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidType=function(t,n){var o=(0,a.invalidTypeMessage)(t,n);if("default"===e.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.errorHandlingMode=t}},4831:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;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 a=n(9072),o=n(7232),u=n(4268);e.default=function(t,e,n,c,l,d){var h=this;this.idsRemapper=null,this.profileHttps=null,this.profileService=null,this.localStorage=null,this.profileFacade=null,this.ownProfile=null,this.modified=!1,this.expireAt=0,this.promises=[],this.isFetching=!1,this.getOwnProfile=function(){return r(h,void 0,void 0,(function(){var t,e,n;return i(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,7];this.isFetching=!0,this.expireAt=Math.floor(Date.now()/1e3)+600,r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.profileFacade.getOwn()];case 4:return e=r.sent(),this.setOwnProfile(e),[3,6];case 5:throw n=r.sent(),this.isFetching=!1,n;case 6:return this.modified=!1,this.isFetching=!1,[2,this.ownProfile];case 7:return[2,this.ownProfile]}}))}))},this.delay=function(t){return new Promise((function(e){setTimeout(e,t)}))},this.setOwnProfile=function(t){h.ownProfile=t},this.getInfo=function(){return r(h,void 0,void 0,(function(){var t,e;return i(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 r(h,void 0,void 0,(function(){var t,e;return i(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 r(h,void 0,void 0,(function(){var t,e;return i(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 r(h,void 0,void 0,(function(){return i(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 r(h,void 0,void 0,(function(){return i(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 r(h,void 0,void 0,(function(){var e,n;return i(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 r(h,void 0,void 0,(function(){var e,n;return i(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 r(h,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getStats()];case 1:return t=e.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(t)];case 2:return[2,e.sent()]}}))}))},this.getBadges=function(){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getBadges()];case 1:return[2,t.sent()]}}))}))},this.addInterestPromise=function(t){return r(h,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return r.sent(),e=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(t)];case 2:return e=r.sent(),[3,4];case 3:e=t,r.label=4;case 4:return n=this.ownProfile.interests.filter((function(t){return t.id!==e.id||t.type!==e.type||t.source!==e.source})),this.ownProfile.interests=s([],n,!0),this.ownProfile.interests.push(e),[2,this]}}))}))},this.addInterest=function(t){return h.promises.push(h.addInterestPromise(t)),h},this.removeInterestPromise=function(t){return r(h,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return n.sent(),e=null,"custom"===t.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(t)];case 2:return e=n.sent(),[3,4];case 3:e=t,n.label=4;case 4:return this.ownProfile.interests=this.ownProfile.interests.filter((function(t){return t.id!==e.id||t.type!==e.type||t.source!==e.source})),[2,this]}}))}))},this.removeInterest=function(t){return h.promises.push(h.removeInterestPromise(t)),h},this.setBirthdatePromise=function(t){return r(h,void 0,void 0,(function(){return i(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 h.promises.push(h.setBirthdatePromise(t)),h},this.setGenderPromise=function(t){return r(h,void 0,void 0,(function(){return i(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 h.promises.push(h.setGenderPromise(t)),h},this.setNicknamePromise=function(t){return r(h,void 0,void 0,(function(){return i(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 h.promises.push(h.setNicknamePromise(t)),h},this.setNamePromise=function(t){return r(h,void 0,void 0,(function(){return i(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 h.promises.push(h.setNamePromise(t)),h},this.setCountryPromise=function(t){return r(h,void 0,void 0,(function(){return i(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 a.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 h.promises.push(h.setCountryPromise(t)),h},this.showFullnessProfile=function(){return r(h,void 0,void 0,(function(){var t,e;return i(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.update=function(){return r(h,void 0,void 0,(function(){var t,e,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return 0===this.promises.length?[2,this.ownProfile]:[4,Promise.all(this.promises)];case 1:return i.sent(),[4,this.profileFacade.getOwn()];case 2:return t=i.sent(),[4,this.getOwnProfile()];case 3:return e=i.sent(),n=this.profileService.extractUpdatedProps(t,e),this.modified=!1,this.expireAt=0,Object.keys(n).length?[4,this.profileHttps.updateProfile(n)]:[3,5];case 4:return r=i.sent(),s=JSON.parse(JSON.stringify(r)),this.setOwnProfile(s),this.localStorage.setOwnProfile(s),delete r.interests,[2,r];case 5:return delete(a=JSON.parse(JSON.stringify(this.ownProfile))).interests,[2,a]}}))}))},this.idsRemapper=t,this.localStorage=e,this.profileHttps=n,this.profileService=new u.default,this.profileFacade=new o.default(e,n,c)}},642:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(7232);e.default=function(t,e,n,a){var o=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.profileFacade=null,this.profileId="",this.setId=function(t){return o.profileId=t,o},this.getProfile=function(){return r(o,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(o,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(o,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(o,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(o,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(o,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(o,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(o,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.remapSuccessRatesEntities(e)];case 2:return[2,n.sent()]}}))}))},this.getBadges=function(){return r(o,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=t,this.profileHttps=n,this.activityHttps=a,this.profileFacade=new s.default(e,n,a)}},7232:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(9037),a=n(9523);e.default=function(t,e,n){var o=this;this.isBrowser=!1,this.localStorage={},this.profileHttps=null,this.activityHttps=null,this.getOwn=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("profile"))?[2,JSON.parse(JSON.stringify(t))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getProfile()];case 2:return n=i.sent(),this.localStorage.setOwnProfile(n),[2,n];case 3:throw e=i.sent(),console.warn("There was a problem retrieving your profile: ",e),e;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getProfile()];case 6:return[2,n=i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving your profile: ",r),r;case 8:return[2]}}))}))},this.updateOwnProfile=function(){return r(o,void 0,void 0,(function(){var t,e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile()];case 1:return t=n.sent(),this.localStorage.setOwnProfile(t),[2,t];case 2:throw e=n.sent(),console.warn("There was a problem retrieving your profile: ",e),e;case 3:return[2]}}))}))},this.getByIds=function(t,e){return r(o,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.profileHttps.getProfiles(t,e)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the selected profiles: "+t.join(",")+" ",n),n;case 3:return[2]}}))}))},this.getById=function(t){return r(o,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: "+t+" ",e),e;case 3:return[2]}}))}))},this.getCountries=function(t){return r(o,void 0,void 0,(function(){var e,n,r,s;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,this.isBrowser?(e=this.localStorage.getProfileCountries())&&e.length>0?[2,e]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getCountries(t)];case 2:return n=i.sent(),this.localStorage.setProfileCountries(n),[2,n];case 3:throw r=i.sent(),console.warn("There was a problem retrieving profile countries: ",r),r;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getCountries(t)];case 6:return[2,i.sent()];case 7:throw s=i.sent(),console.warn("There was a problem retrieving profile countries: ",s),s;case 8:return[2]}}))}))},this.getFollowers=function(t,e){return r(o,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new a.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 s=i.sent(),o=n.data.map((function(t){return s.forEach((function(e){t.followerId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=o,[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(o,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),t&&(t=new a.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 s=i.sent(),o=n.data.map((function(t){return s.forEach((function(e){t.followingId===e.id&&(t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar)})),t})),n.data=o,[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(o,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: "+t.join(",")+" ",e),e;case 3:return[2]}}))}))},this.unfollow=function(t){return r(o,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: "+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(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("statistics"))&&Object.keys(t).length?[2,JSON.parse(JSON.stringify(t))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.activityHttps.getStats()];case 2:return e=i.sent(),this.localStorage.setProfileStats(e),[2,e];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.activityHttps.getStats()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",r),r;case 8:return[2]}}))}))},this.getBadges=function(){return r(o,void 0,void 0,(function(){var t,e,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.getLocalStorageData("badges"))?[2,t]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getBadges()];case 2:return e=i.sent(),this.localStorage.setProfileBadges(e),[2,e];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile badges: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getBadges()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile badges: ",r),r;case 8:return[2]}}))}))},this.getLocalStorageData=function(t){var e=Math.floor(Date.now()/1e3),n=o.localStorage.getExpiration("profile",t);switch(t){case"profile":if(n>e)return o.localStorage.getOwnProfile();case"statistics":if(n>e)return o.localStorage.getProfileStats();case"badges":if(n>e)return o.localStorage.getProfileBadges();default:return null}},this.isBrowser="undefined"!=typeof window,this.localStorage=t,this.profileHttps=e,this.activityHttps=n}},9523:(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="+e.limit),e.startAfter&&(t=(t+="&")+"start_after="+e.startAfter),t},this.limit=t.limit?t.limit:20,this.startAfter=t.startAfter?t.startAfter:null}},4782:(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}},1712:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.profile_ids=[]}},3106:(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}},6620:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7312);e.default=function(){this.teamFollowed=new r.default(10),this.teamFavourite=new r.default(15),this.playerFollowed=new r.default(10),this.playerFavourite=new r.default(10),this.competitionFollowed=new r.default(10),this.competitionFavourite=new r.default(5),this.addedBirthdate=new r.default(10),this.addedGender=new r.default(10),this.addedCountry=new r.default(10),this.addedAvatar=new r.default(10)}},7312:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(t){this.completed=!1,this.percentage=t}},9037:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6620);e.default=function(){this.breakdown=new r.default}},9072:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.id=null,this.name=null,this.assets=null}},3546:(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.interests=[],this.followingCount=0,this.followersCount=0}},6277:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1553),i=n(4782);e.default=function(){var t=this;this.followersFromResponse=function(e){var n=new r.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 i.default;return e.avatar=t.avatar,e.followerId=t.follower_id,e.name=t.name,e.profileId=t.profile_id,e}}},8673:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1553),i=n(3106);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 r.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 i.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}}},441:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3546);e.default=function(){var t=this;this.profilesFromResponse=function(e){return e?e.map((function(e){return t.fullProfileFromResponse(e)})):null},this.fullProfileFromResponse=function(t){var e=new r.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.interests=t.interests?t.interests:[],e.followingCount=t.following_count,e.followersCount=t.followers_count,e}}},1316:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(5123);e.default=function(){this.successRates=new r.default}},9826:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.model=null}},5123:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){}},6409:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4275),a=n(8900),o=n(7232),u=n(5601),c=n(4831),l=n(642),d=n(4289),h=n(595),p=n(1022),f=n(4912);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.localStorage=null,this.profileFacade=null,this.ownProfileBuilder=null,this.profileBuilder=null,this.getOwn=function(){return e.ownProfileBuilder},this.getById=function(t){return e.profileBuilder.setId(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){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)];case 1:return[2,e.sent()]}}))}))},this.profileHttps=new s.default(t),this.activityHttps=new p.default(t),this.footballHttps=new h.default(t),this.idMapping=new a.default(t),this.localStorage=new u.default(t),this.footballFacade=new d.default(t,this.localStorage,this.footballHttps,this.idMapping),this.profileFacade=new o.default(this.localStorage,this.profileHttps,this.activityHttps),this.idsRemapper=new f.default(t,this.footballFacade),this.ownProfileBuilder=new c.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps,this.idMapping,this.footballFacade),this.profileBuilder=new l.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps)}},4268:function(t,e){"use strict";var n=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;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"],i={};return Object.keys(e).forEach((function(s){if(r.includes(s)&&e[s]!==n[s])i[s]=n[s];else if("birthDate"===s)(null===n[s]||null===e[s]&&n[s]||e[s]!==n[s])&&(i.birth_date=n[s]);else if("country"===s)null===n[s]?i.country_id=n[s]:(null===e[s]&&n[s]||e[s].id!==n[s].id)&&(i.country_id=n[s].id);else if("interests"===s){var a=e[s],o=n[s];o.length&&t.isNewInterest(a,o)?i[s]=t.updateInterests(a,o):!o.length&&a.length?i[s]=o:a.length===o.length||t.isNewInterest(a,o)||(i[s]=o)}})),i},this.updateInterests=function(e,r){if(e.length===r.length){var i=t.extractSameAndNewInterests(e,r),s=i[0],a=i[1];return n(n([],a,!0),s,!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]}}},853:(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"},9502:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(4946),a=n(2793),o=n(5013),u=n(853),c=n(7299),l=n(1553),d=n(1399),h=n(7782),p=n(7686),f=n(2310),m=n(8097),v=n(4904),y=n(5318),g=n(4021),w=n(2535);e.default=function(t,e){var n=this;this.idMapping=null,this.predictorHttps=null,this.predictorService=null,this.predictorValidator=null,this.clientHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(n,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(p.FeatureConfigType.TOP_X)];case 1:return t=e.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(t)];case 2:return[2,e.sent()];case 3:return[2,t]}}))}))},this.getGames=function(t,e){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return e=e||!1,n=this.predictorService.initGameFilters("TOP_X",t),[4,this.predictorHttps.getGames(n,e)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return e=e||!1,[4,this.predictorHttps.getGameById(t,e)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(t,e,s){return r(n,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return s=s||!1,e&&(e.type&&delete e.type,e.status&&delete e.status,e=new h.default(e)),[4,this.predictorHttps.getGamePredictions(t,s,e)];case 1:return[2,n.sent()]}}))}))},this.getGameResults=function(t,e,s){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return s=s||!1,e&&(e=new c.default(e)),[4,this.predictorHttps.getGameResults(t,s,e)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(t){return r(n,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,e={status:u.GameStatusEnum.OPEN,type:"TOP_X"},e=new c.default(e),[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 r(n,void 0,void 0,(function(){var e,n,r,a,o=this;return i(this,(function(i){switch(i.label){case 0:return e=new d.default(t),(e=this.predictorValidator.validateBodyFields("TOP_X",e)).fixtures=e.fixtures.map((function(t){return o.predictorValidator.validateFixture(t.matchId,t.market,t.prediction.value)})),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:(n=[],e.fixtures.forEach((function(t){return n.push(t.matchId)})),[4,this.predictorService.remapMatchIdToNative(n)]);case 1:r=i.sent(),e.fixtures.forEach((function(t){return t.matchId=r.shift()})),i.label=2;case 2:return[4,this.predictorHttps.makeFootballPrediction(e)];case 3:return(a=i.sent()).fixtures.forEach((function(t){t.matchId=t.matchModel.id})),[2,a]}}))}))},this.delete=function(t){return r(n,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.getMyGameEditions=function(t,e){return r(n,void 0,void 0,(function(){var n,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),e=e||!1,n=this.predictorService.initGameTypePredictions("TOP_X",t),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(n)];case 1:return(s=i.sent()).data.length>0?(s.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),a=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(a,e)]):[3,4];case 2:return o=i.sent(),[4,this.predictorService.addPredictionProp(s,o)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getMyGamePrediction=function(t){return r(n,void 0,void 0,(function(){var e,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this.predictorService.initGameTypePredictions("TOP_X"),[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,e,s){return r(n,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return e&&e.limit&&this.validateLimitFilterOnGames(e.limit),s=s||!1,n=this.predictorService.initGameTypePredictions("TOP_X",e),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(t,n)];case 1:return(a=i.sent()).data.length>0?(a.data.forEach((function(t){t.game_instance_id&&r.push(t.game_instance_id)})),o=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(o,s)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(a,u)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getUserGamePrediction=function(t,e,s){return r(n,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,n=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getUserPredictions(t,s,n)];case 1:return(r=i.sent()).data.length>0?[2,(a=r.data.filter((function(t){return t.gameInstanceId===e}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(t,e){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(t,e)];case 1:return n=r.sent(),[4,this.predictorService.completeGameMarketResults(n,"TOP_X")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(t){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(t)];case 1:return e=r.sent(),[4,this.getGameById(t)];case 2:return n=r.sent(),e.contestModel=n,[2,this.predictorService.completeContestWinners(e)]}}))}))},this.validateLimitFilterOnGames=function(t){if("default"===n.errorHandlingMode&&t>50)throw new m.default(g.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,y.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===n.errorHandlingMode&&t>50)throw new w.default(g.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,y.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.idMapping=e,this.errorHandlingMode=t.errorHandlingMode,this.predictorValidator=new f.default(t.errorHandlingMode),this.predictorHttps=new a.default(t,e),this.predictorService=new o.default(t,e),this.clientHttps=new p.default(t)}},1180:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.enabled=!1,this.minFixtures=null,this.maxFixtures=null,this.competitionsWhitelist=null}},7482:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default}},5967:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6899),i=n(3381);e.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},6247: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)});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.labels=null,e.customFields=null,e}return i(e,t),e}(n(3751).default);e.default=s},6890:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.userId=null,this.points=null,this.results=[],this.tiebreaker=null}},6160:(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)});Object.defineProperty(e,"__esModule",{value:!0});var s=n(4800),a=n(853),o=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(a.GameStatusEnum).includes(n.status)&&(e+="&",e+="status="+n.status),n.type&&(e+="&",e+="type="+n.type),n.gameIds&&n.gameIds.length>0&&(e+="&",e+="game_ids="+n.gameIds.join(",")),n.sortOrder&&(e+="&",e+="sort_order="+n.sortOrder),e},n.status=e.status?e.status:null,n.type=e.type?e.type:null,n.gameIds=e.gameIds?e.gameIds:null,n.sortOrder=e.sortOrder?e.sortOrder:null,n}return i(e,t),e}(s.default);e.default=o},3751:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(439),i=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.scheduleOpenAt=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new i.default,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.images=new r.default,this.createdAt=null,this.updatedAt=null}},4780:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(7482),i=n(8410),s=n(5967),a=n(6890),o=n(6160),u=n(3751),c=n(7243),l=n(8950),d=n(7640),h=n(1553),p=n(670),f=n(7974),m=n(4916),v=n(3483),y=n(1784),g=n(824),w=n(6899),b=n(6247);e.default=function(){var t=this;this.remapPaginatedGames=function(e){var n=new h.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.remapGamesListResponse(e)})),n},this.remapGamesListResponse=function(e){var n=new u.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.scheduleOpenAt=e.schedule_open_at,n.predictionsCutoff=e.predictions_cutoff,n.fixtures=e.fixtures.map((function(e){return t.remapFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapGameByIdResponse=function(e){var n=new b.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.scheduleOpenAt=e.schedule_open_at,n.predictionsCutoff=e.predictions_cutoff,n.fixtures=e.fixtures.map((function(e){return t.remapFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.adContent=e.ad_content,n.labels=e.labels,n.customFields=e.custom_fields,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapFixturesResponse=function(t){var e=new r.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedUserTopXEditions=function(e){var n=new h.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.remapUserTopXEditionsResponse(e)})),n},this.remapUserTopXEditionsResponse=function(e){var n=new l.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.predictionsCutoff=e.predictions_cutoff,n.scheduleOpenAt=e.schedule_open_at,n.fixtures=e.fixtures.map((function(e){return t.remapTopXFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapTopXFixturesResponse=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.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedUserMathQuizEditions=function(e){var n=new h.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.remapUserMatchQuizEditionsResponse(e)})),n},this.remapUserMatchQuizEditionsResponse=function(e){var n=new c.default;return n.id=e.id,n.title=e.title,n.description=e.description,n.type=e.type,n.status=e.status,n.predictionsCutoff=e.predictions_cutoff,n.scheduleOpenAt=e.schedule_open_at,n.fixtures=e.fixtures.map((function(e){return t.remapMatchQuizFixturesResponse(e)})),n.tiebreaker=e.tiebreaker?t.remapTimeTiebreaker(e.tiebreaker.time_tiebreaker):null,n.participantsCount=e.participants_count,n.related=e.related?t.remapRelated(e.related):null,n.excludedProfileIds=e.excluded_profile_ids,n.rules=e.rules,n.flags=e.flags,n.images=e.images,n.createdAt=e.created_at,n.updatedAt=e.updated_at,n},this.remapMatchQuizFixturesResponse=function(t){var e=new i.default;return e.matchId=t.match_id,e.matchType=t.match_type,e.market=t.market,e.matchStatus.type=t.match_status.type,e.matchStatus.subType=t.match_status.sub_type,e},this.remapPaginatedGameResults=function(e){var n=new h.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.remapGameResults(e)})),n},this.remapGameResults=function(e){var n=new a.default;return n.userId=e.user_id,n.points=e.points?e.points:0,n.results=e.results.map((function(e){return t.remapResults(e)})),n.tiebreaker=e.tiebreaker?t.remapTiebreaker(e.tiebreaker):null,n},this.remapGameMarketsResults=function(e){var n=new p.default;return n.gameId=e.game_id,n.results=t.remapMarketsResults(e.results),n.tieBreakers=e.tie_breakers?t.remapTieBreakers(e.tie_breakers):null,n},this.remapContestWinners=function(e){var n=new y.default;return n.contestId=e.contest_id,n.contestType=e.contest_type,n.description=e.description,n.userList=e.user_list.map((function(e){return t.remapUserListWinners(e)})),n},this.remapUserListWinners=function(t){var e=new g.default;return e.position=t.position,e.profileId=t.profile_id,e.note=t.note,e.tags=t.tags,e},this.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},this.remapMarketsResults=function(e){var n=[];return e.forEach((function(e){var r={matchId:e.match_id,market:e.market,result:t.remapMarketResult(e.market,e.result),matchModel:null,playerModels:[],matchStatus:t.remapMarketsResultsMatchStatus(e.match_status)};n.push(t.deleteUnusefulField(r))})),n},this.remapMarketsResultsMatchStatus=function(t){var e=new w.default;return e.type=t.type,e.subType=t.sub_type,e},this.remapMarketResult=function(t,e){return f.endMarkMarkets.includes(t)?e[0]:f.playerMarkets.includes(t)?e:"true"===e[0]||"false"!==e[0]&&void 0},this.deleteUnusefulField=function(e){return f.playerMarkets.includes(e.market)&&!t.isPlayerMarketWithNoResult(e.market,e.result)||delete e.playerModels,e},this.isPlayerMarketWithNoResult=function(t,e){return f.playerMarkets.includes(t)&&0===e.length},this.remapResults=function(t){var e=new o.default;return e.matchId=t.match_id,e.outcome=t.outcome,e},this.remapTiebreaker=function(t){var e=new d.default;return e.goldenGoal=t.golden_goal,e},this.remapTimeTiebreaker=function(t){var e=new m.default;return e.timeTiebreaker=t,e},this.remapRelated=function(t){return t.map((function(t){var e=new v.default;return e.entityId=t.entity_id,e.entityType=t.entity_type,e}))}}},8950:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(4916);e.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.scheduleOpenAt=null,this.images=null}},7640:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.goldenGoal=null}},4916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.timeTiebreaker=!1}},1784:(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=[]}},824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.position="",this.profileId="",this.profileModel=null,this.note="",this.tags=[]}},3381:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function(){this.value=null,this.result=null}},1399:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1465);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 r.default(t.matchId,t.market,t.prediction.value))})),this.tiebreaker=t.tiebreaker?t.tiebreaker:null}},9596:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900),a=n(9502);e.default=function(t){var e=this;this.topXFacade=null,this.idMapping=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.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,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.getGameResults=function(t,n,s){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,s)];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,s){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,s)];case 1:return[2,e.sent()]}}))}))},this.getUserGamePrediction=function(t,n,s){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,s)];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){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getGameWinners(t)];case 1:return[2,e.sent()]}}))}))},this.idMapping=new s.default(t),this.topXFacade=new a.default(t,this.idMapping)}},4806: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,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var a=n(4946),o=n(712);e.default=function(t,e,n){var u=this;this.idMapping=null,this.idSchema=null,this.native=a.IdSchemaEnum.NATIVE,this.footballFacade=null,this.remapSuccessRatesEntities=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return e=t.successRates,n={competition:this.getIdsKeys(e.byFootballCompetition),team:this.getIdsKeys(e.byFootballTeam)},Object.values(n.competition).length?(r=t.successRates.byFootballCompetition,i=t.successRates,[4,this.setModels(r,n.competition,"competition")]):[3,2];case 1:i.byFootballCompetition=s.sent(),s.label=2;case 2:return Object.values(n.team).length?(a=t.successRates.byFootballTeam,o=t.successRates,[4,this.setModels(a,n.team,"team")]):[3,4];case 3:o.byFootballTeam=s.sent(),s.label=4;case 4:return[2,t]}}))}))},this.setModels=function(t,e,n){return i(u,void 0,void 0,(function(){var i,a;return s(this,(function(s){switch(s.label){case 0:switch(i=null,e=(0,o.sortArrayInAscOrder)(e),n){case"competition":return[3,1];case"team":return[3,3]}return[3,5];case 1:return[4,this.footballFacade.getCompetitionsMapWithNativeIds(e)];case 2:case 4:return i=s.sent(),[3,5];case 3:return[4,this.footballFacade.getTeamsMapWithNativeIds(e)];case 5:return Object.keys(t).forEach((function(e){var n,s=i.get(e);(a=r(r({},a),((n={})[s.id]=t[e],n)))[s.id].model=s})),[2,a]}}))}))},this.getIdsKeys=function(t){var e=JSON.parse(JSON.stringify(t));return Object.keys(e)},this.remapInterestsToIdSchema=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,o,u,c,l,d;return s(this,(function(s){switch(s.label){case 0:return this.idSchema===this.native?[3,3]:t&&t.length>0?(e={},n={},t.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(r=s.sent(),i=[],a=function(t,e){e.forEach((function(e,n){e.id=r[t][n],i.push(e)}))},o=0,u=Object.entries(n);o<u.length;o++)c=u[o],l=c[0],d=c[1],a(l,d);return[2,i];case 2:case 3:return[2,t]}}))}))},this.remapInterestToNative=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i;return s(this,(function(s){switch(s.label){case 0:return this.idSchema===this.native?[3,2]:(e={},n=t.id,r=t.type,e[r]=[n],[4,this.remapIdsObj(e,this.idSchema,this.native)]);case 1:return i=s.sent(),t.id=i[r][0],[2,t];case 2:return[2,t]}}))}))},this.inquiryCustomInterests=function(t){var e=[];return t&&t.length>0&&(e=t.filter((function(t){return"CUSTOM"===t.source.toLocaleUpperCase()}))),e},this.remapInterests=function(t){return i(u,void 0,void 0,(function(){var e,n,r;return s(this,(function(i){switch(i.label){case 0:return(e=this.inquiryCustomInterests(t))&&e.length>0?(n=t.filter((function(t){return"CUSTOM"!==t.source.toLocaleUpperCase()})),[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(u,void 0,void 0,(function(){var e,n,r,i,a,o,u,c;return s(this,(function(s){switch(s.label){case 0:return e=[],t&&t.length>0?(n=this.inquiryCustomInterests(t),e.push(n),r=t.filter((function(t){return"CUSTOM"!==t.source.toLocaleUpperCase()})),[4,this.getInterestsEntitiesMap(r)]):[3,2];case 1:return i=s.sent(),a=i.competitionsMap,o=i.teamsMap,u=i.playersMap,c=r.map((function(t){var e=null;return"competition"===t.type?((e=a.get(t.id))&&(t.id=e.id),t.model=e,t):"team"===t.type?((e=o.get(t.id))&&(t.id=e.id),t.model=e,t):"player"===t.type?(u?(t.model=u[t.id],t.id=u[t.id].id):t.model=e,t):void 0})),e.push(c),[2,e.flat()];case 2:return[2,e]}}))}))},this.getInterestsEntitiesMap=function(t){return i(u,void 0,void 0,(function(){var e,n,r,i,a,u,c;return s(this,(function(s){switch(s.label){case 0:return e=[],n=[],r=[],i=new Map,a=new Map,u=null,t.forEach((function(t){"competition"===t.type?e.push(t.id):"team"===t.type?n.push(t.id):"player"===t.type&&r.push(t.id)})),e.length?(c=(0,o.sortArrayInAscOrder)(e),[4,this.footballFacade.getCompetitionsMapWithNativeIds(c)]):[3,2];case 1:i=s.sent(),s.label=2;case 2:return n.length?(c=(0,o.sortArrayInAscOrder)(n),[4,this.footballFacade.getTeamsMapWithNativeIds(c)]):[3,4];case 3:a=s.sent(),s.label=4;case 4:return r.length?(c=(0,o.sortArrayInAscOrder)(r),[4,this.footballFacade.getPlayersMapWithNativeIds(c)]):[3,6];case 5:u=s.sent(),s.label=6;case 6:return[2,{competitionsMap:i,teamsMap:a,playersMap:u}]}}))}))},this.remapIdsObj=function(t,e,n){return i(u,void 0,void 0,(function(){return s(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}},4912:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,s){function a(t){try{u(r.next(t))}catch(t){s(t)}}function o(t){try{u(r.throw(t))}catch(t){s(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(a,o)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(8900),a=n(4806);e.default=function(t,e){var n=this;this.idMapping=null,this.profileOperations=null,this.remapSuccessRatesEntities=function(t){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileOperations.remapSuccessRatesEntities(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 a.default(t,e,this.idMapping)}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.FansUnitedSDK=void 0;var e=n(6409),i=n(6595),s=n(8808),a=n(4946),o=n(1259),u=n(2962),c=n(9627),l=n(2671),d=n(9377),h=n(9596),p=n(267),f=n(7302),m=n(2141),v=n(7070),y=n(9580);t.FansUnitedSDK=function(t){var n=(new i.default).validate(t);if(n.idSchema.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.idSchema.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.idSchema.message.text),t.idSchema=a.IdSchemaEnum.NATIVE),n.environment.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.environment.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.environment.message.text),t.environment=l.EnvironmentEnum.PROD),n.lang.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.lang.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.lang.message.text),t.lang=d.LangEnum.EN),n.errorHandlingMode.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.errorHandlingMode.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.errorHandlingMode.message.text),t.errorHandlingMode=y.ErrorHandlingModeEnum.DEFAULT),n.authProvider.validation===c.ValidationResponseEnum.INVALID_VALUE&&console.warn(n.authProvider.message.text),n.isValid)return{profile:new e.default(t),football:new s.default(t),predictor:new o.default(t),loyalty:new u.default(t),topX:new h.default(t),matchQuiz:new p.default(t),activity:new f.default(t)};g(n)};var g=function(t){var e="authProvider",n="isValid";Object.keys(t).forEach((function(r){var i=t[r];if(r!==n&&r!==e){if(i.message.type===m.LogEnum.ERROR)throw new Error(i.message.text)}else r!==n&&r===e&&Object.keys(new v.default).forEach((function(t){if(i[t].message.type===m.LogEnum.ERROR)throw new Error(i[t].message.text)}))}))}})(),r})()}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FansUnitedSDK=t():e.FansUnitedSDK=t()}(self,(function(){return(()=>{var e={9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),s=n(4372),a=n(5327),o=n(4097),u=n(4109),c=n(7985),l=n(5061),d=n(5655),h=n(5263);e.exports=function(e){return new Promise((function(t,n){var p,f=e.data,m=e.headers,v=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(f)&&delete m["Content-Type"];var g=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";m.Authorization="Basic "+btoa(w+":"+b)}var _=o(e.baseURL,e.url);function E(){if(g){var r="getAllResponseHeaders"in g?u(g.getAllResponseHeaders()):null,s={data:v&&"text"!==v&&"json"!==v?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g};i((function(e){t(e),y()}),(function(e){n(e),y()}),s),g=null}}if(g.open(e.method.toUpperCase(),a(_,e.params,e.paramsSerializer),!0),g.timeout=e.timeout,"onloadend"in g?g.onloadend=E:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(E)},g.onabort=function(){g&&(n(l("Request aborted",e,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",e,null,g)),g=null},g.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var I=(e.withCredentials||c(_))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;I&&(m[e.xsrfHeaderName]=I)}"setRequestHeader"in g&&r.forEach(m,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete m[t]:g.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(g.withCredentials=!!e.withCredentials),v&&"json"!==v&&(g.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&g.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){g&&(n(!e||e&&e.type?new h("canceled"):e),g.abort(),g=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),f||(f=null),g.send(f)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),i=n(1849),s=n(321),a=n(7185),o=function e(t){var n=new s(t),o=i(s.prototype.request,n);return r.extend(o,s.prototype,n),r.extend(o,n),o.create=function(n){return e(a(t,n))},o}(n(5655));o.Axios=s,o.Cancel=n(5263),o.CancelToken=n(4972),o.isCancel=n(6502),o.VERSION=n(7288).version,o.all=function(e){return Promise.all(e)},o.spread=n(8713),o.isAxiosError=n(6268),e.exports=o,e.exports.default=o},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),i=n(5327),s=n(782),a=n(3572),o=n(7185),u=n(4875),c=u.validators;function l(e){this.defaults=e,this.interceptors={request:new s,response:new s}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=o(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&u.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean),forcedJSONParsing:c.transitional(c.boolean),clarifyTimeoutError:c.transitional(c.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,s=[];if(this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(s),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var d=e;n.length;){var h=n.shift(),p=n.shift();try{d=h(d)}catch(e){p(e);break}}try{i=a(d)}catch(e){return Promise.reject(e)}for(;s.length;)i=i.then(s.shift(),s.shift());return i},l.prototype.getUri=function(e){return e=o(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(o(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(o(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,n)=>{"use strict";var r=n(1793),i=n(7303);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,i,s){var a=new Error(e);return r(a,t,n,i,s)}},3572:(e,t,n)=>{"use strict";var r=n(4867),i=n(8527),s=n(6502),a=n(5655),o=n(5263);function u(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new o("canceled")}e.exports=function(e){return u(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return u(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return s(t)||(u(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function u(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||s,i=t(e);r.isUndefined(i)&&t!==u||(n[e]=i)})),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),i=n(5655);e.exports=function(e,t,n){var s=this||i;return r.forEach(n,(function(n){e=n.call(s,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),i=n(6016),s=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(u=n(5448)),u),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(o(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw s(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(a)})),e.exports=c},7288:e=>{e.exports={version:"0.24.0"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},5327:(e,t,n)=>{"use strict";var r=n(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var s;if(n)s=n(t);else if(r.isURLSearchParams(t))s=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+"="+i(e))})))})),s=a.join("&")}if(s){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,s,a){var o=[];o.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),r.isString(i)&&o.push("path="+i),r.isString(s)&&o.push("domain="+s),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,a={};return e?(r.forEach(e.split("\n"),(function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var s={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(i(r," has been removed"+(t?" in "+t:"")));return t&&!s[r]&&(s[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var s=r[i],a=t[s];if(a){var o=e[s],u=void 0===o||a(o,s,e);if(!0!==u)throw new TypeError("option "+s+" must be "+u)}else if(!0!==n)throw Error("Unknown option "+s)}},validators:i}},4867:(e,t,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function s(e){return"[object Array]"===i.call(e)}function a(e){return void 0===e}function o(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!a(e)&&null!==e.constructor&&!a(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:o,isPlainObject:u,isUndefined:a,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return o(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):s(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},6245:(e,t,n)=>{"use strict";function r(e){this.message=e}n.r(t),n.d(t,{default:()=>o,InvalidTokenError:()=>a}),r.prototype=new Error,r.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,s=0,a=0,o="";i=t.charAt(a++);~i&&(n=s%4?64*n+i:i,s++%4)?o+=String.fromCharCode(255&n>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function s(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(i(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return i(t)}}function a(e){this.message=e}a.prototype=new Error,a.prototype.name="InvalidTokenError";const o=function(e,t){if("string"!=typeof e)throw new a("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(s(e.split(".")[n]))}catch(e){throw new a("Invalid token specified: "+e.message)}}},6595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(682),i=n(2141),s=n(4241),a=n(6391),o=n(1512),u=n(4392),c=n(320),l=n(7631),d=n(6965),h=n(9158);t.default=function(){var e=this;this.validate=function(t){var n=e.checkFieldsForValues(t);return n.isValid=e.containsErrorMessage(n),n},this.checkFieldsForValues=function(e){for(var t=new l.default,n={apiKey:new o.default,environment:new a.default,idSchema:new u.default,clientId:new d.default,lang:new s.default,errorHandlingMode:new h.default,authProvider:new c.default},r=0,i=Object.entries(t);r<i.length;r++){var p=i[r],f=p[0];p[1],"isValid"!==f&&n[f].validate(e)}return Object.keys(n).forEach((function(r){t[r]=n[r].validate(e)})),t},this.containsErrorMessage=function(e){for(var t=!0,n=0,s=Object.entries(e);n<s.length;n++){var a=s[n],o=a[0],u=a[1];if(o!==r.ConfigFieldEnum.authProvider){if("isValid"!==o&&u.message.type===i.LogEnum.ERROR)return!1;if("isValid"!==o&&u.message.type===i.LogEnum.WARNING)return!0}else if(u.message.type===i.LogEnum.ERROR)return!1}return t}}},682:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigFieldEnum=void 0,(n=t.ConfigFieldEnum||(t.ConfigFieldEnum={})).apiKey="apiKey",n.environment="environment",n.idSchema="idSchema",n.clientId="clientId",n.lang="lang",n.authProvider="authProvider"},2671:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentEnum=void 0,(n=t.EnvironmentEnum||(t.EnvironmentEnum={})).DEV="dev",n.PROD="prod",n.STAGING="staging"},9580:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorHandlingModeEnum=void 0,(n=t.ErrorHandlingModeEnum||(t.ErrorHandlingModeEnum={})).DEFAULT="default",n.STANDARD="standard"},4946:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.IdSchemaEnum=void 0,(n=t.IdSchemaEnum||(t.IdSchemaEnum={})).NATIVE="native",n.ENETPULSE="enetpulse",n.SPORTRADAR="sportradar",n.SPORTAL_365="sportal365"},9377:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LangEnum=void 0,(n=t.LangEnum||(t.LangEnum={})).EN="en",n.BG="bg",n.RO="ro",n.EL="el"},2141:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogEnum=void 0,(n=t.LogEnum||(t.LogEnum={})).ERROR="error",n.WARNING="warning"},9028:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationMessageEnum=void 0,(n=t.ValidationMessageEnum||(t.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.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"},9627:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationResponseEnum=void 0,(n=t.ValidationResponseEnum||(t.ValidationResponseEnum={})).MISSING_VALUE="missing",n.INVALID_VALUE="invalid",n.VALID_VALUE="valid"},7070:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.getIdToken=null,this.logout=null}},2379:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3220);t.default=function(){this.validation=null,this.message=new r.default,this.getIdToken={validation:null,message:new r.default},this.logout={validation:null,message:new r.default}}},7631:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3074);t.default=function(){this.apiKey=null,this.environment=null,this.idSchema=null,this.clientId=null,this.lang=null,this.errorHandlingMode=null,this.authProvider={getIdToken:new r.default,logout:new r.default},this.isValid=!1}},3220:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.text=null,this.type=null}},3074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},1512:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=function(){function e(){this.validateField=function(e){return null!=e&&e.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.ERROR;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.API_KEY),e===r.ValidationResponseEnum.VALID_VALUE&&(n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.apiKey);return{validation:t,message:this.generateMessage(t)}},e}();t.default=a},320:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(7070),o=n(2379),u=function(){function e(){this.validateAuthProvider=function(e){var t=Object.keys(new a.default),n=new o.default;if(e){var u=Object.keys(e).filter((function(e){return!t.includes(e)}));u.length>0?(n.validation=r.ValidationResponseEnum.INVALID_VALUE,n.message.type=s.LogEnum.WARNING,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_INVALID_PROP+" "+u.join(",")):n.validation=r.ValidationResponseEnum.VALID_VALUE}else n.validation=r.ValidationResponseEnum.MISSING_VALUE,n.message.type=s.LogEnum.ERROR,n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING;return n},this.validateAuthProviderConfigFields=function(e,t){return Object.keys(new a.default).forEach((function(n){e[n]?t[n].validation=r.ValidationResponseEnum.VALID_VALUE:t[n].validation=r.ValidationResponseEnum.MISSING_VALUE})),t},this.generateAuthProviderConfigMessages=function(e){return Object.keys(e).filter((function(e){return"validation"!==e&&"message"!==e})).forEach((function(t){var n=e[t];n.validation===r.ValidationResponseEnum.MISSING_VALUE&&(n.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_PROP_MISSING+" "+t,n.message.type=s.LogEnum.ERROR)})),e},this.checkAuthProviderConfigMessagesForErrors=function(e){return Object.keys(e).filter((function(e){return"validation"!==e&&"message"!==e})).forEach((function(t){e[t].validation===r.ValidationResponseEnum.MISSING_VALUE&&e.validation===r.ValidationResponseEnum.VALID_VALUE&&(e.validation=r.ValidationResponseEnum.INVALID_VALUE,e.message.type=s.LogEnum.ERROR,e.message.text=i.ValidationMessageEnum.AUTH_PROVIDER_CONFIG_MISSING_CONFIG)})),e}}return e.prototype.validate=function(e){var t=this.validateAuthProvider(e.authProvider);return t.validation!==r.ValidationResponseEnum.MISSING_VALUE&&(t=this.validateAuthProviderConfigFields(e.authProvider,t),t=this.generateAuthProviderConfigMessages(t),t=this.checkAuthProviderConfigMessagesForErrors(t)),t},e}();t.default=u},6965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=function(){function e(){this.validateField=function(e){return null!=e&&e.length>0?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.ERROR;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.CLIENT_ID),e===r.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.clientId);return{validation:t,message:this.generateMessage(t)}},e}();t.default=a},6391:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(2671),o=function(){function e(){this.validateField=function(e){var t=[a.EnvironmentEnum.DEV,a.EnvironmentEnum.STAGING,a.EnvironmentEnum.PROD];return null!=e&&e.length>0?t.includes(e)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.WARNING;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.ENVIRONMENT_MISSING),e===r.ValidationResponseEnum.INVALID_VALUE&&(t=i.ValidationMessageEnum.ENVIRONMENT_INVALID),e===r.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.environment);return{validation:t,message:this.generateMessage(t)}},e}();t.default=o},9158:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9580),i=n(2141),s=n(9028),a=n(9627);t.default=function(){var e=this;this.validate=function(t){var n=e.validateField(t.errorHandlingMode);return{validation:n,message:e.generateMessage(n)}},this.validateField=function(e){var t=[r.ErrorHandlingModeEnum.DEFAULT,r.ErrorHandlingModeEnum.STANDARD];return e?t.includes(e)?a.ValidationResponseEnum.VALID_VALUE:a.ValidationResponseEnum.INVALID_VALUE:a.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=i.LogEnum.WARNING;return e===a.ValidationResponseEnum.MISSING_VALUE&&(t=s.ValidationMessageEnum.ERROR_HANDLING_MODE_MISSING),e===a.ValidationResponseEnum.INVALID_VALUE&&(t=s.ValidationMessageEnum.ERROR_HANDLING_MODE_INVALID),e===a.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}},4392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9627),i=n(9028),s=n(2141),a=n(4946),o=function(){function e(){this.validateField=function(e){var t=[a.IdSchemaEnum.NATIVE,a.IdSchemaEnum.SPORTAL_365,a.IdSchemaEnum.ENETPULSE,a.IdSchemaEnum.SPORTRADAR];return null!=e&&e.length>0?t.includes(e)?r.ValidationResponseEnum.VALID_VALUE:r.ValidationResponseEnum.INVALID_VALUE:r.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=s.LogEnum.WARNING;return e===r.ValidationResponseEnum.MISSING_VALUE&&(t=i.ValidationMessageEnum.ID_SCHEMA_MISSING),e===r.ValidationResponseEnum.INVALID_VALUE&&(t=i.ValidationMessageEnum.ID_SCHEMA_INVALID),e===r.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}return e.prototype.validate=function(e){var t=this.validateField(e.idSchema);return{validation:t,message:this.generateMessage(t)}},e}();t.default=o},4241:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9377),i=n(9627),s=n(9028),a=n(2141);t.default=function(){var e=this;this.validate=function(t){var n=e.validateField(t.lang);return{validation:n,message:e.generateMessage(n)}},this.validateField=function(e){var t=[r.LangEnum.BG,r.LangEnum.RO,r.LangEnum.EN,r.LangEnum.EL];return null!=e&&e.length>0?t.includes(e)?i.ValidationResponseEnum.VALID_VALUE:i.ValidationResponseEnum.INVALID_VALUE:i.ValidationResponseEnum.MISSING_VALUE},this.generateMessage=function(e){var t=null,n=a.LogEnum.WARNING;return e===i.ValidationResponseEnum.MISSING_VALUE&&(t=s.ValidationMessageEnum.LANG_MISSING),e===i.ValidationResponseEnum.INVALID_VALUE&&(t=s.ValidationMessageEnum.LANG_INVALID),e===i.ValidationResponseEnum.VALID_VALUE&&(t=null,n=null),{text:t,type:n}}}},4021:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorCodes=void 0,(n=t.ErrorCodes||(t.ErrorCodes={}))[n.BAD_METHOD_CALL=400]="BAD_METHOD_CALL",n[n.UNAUTHORIZED=401]="UNAUTHORIZED"},4904:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorStatuses=void 0,(n=t.ErrorStatuses||(t.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"},8097:function(e,t){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n,r){var i=e.call(this)||this;return i.code=0,i.status=null,i.message=null,i.errorMessage=function(){return i.message},i.code=t,i.status=n,i.message=r,i}return r(t,e),t}(Error);t.default=i},2535:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,n){this.response={error:{code:0,status:"",message:""}},this.response.error.code=e,this.response.error.status=t,this.response.error.message=n}},1260:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validFixtureFields=t.documentationLinks=t.ID_TYPES=void 0,t.ID_TYPES={native:"id",sportradar:"sportradar_id",sportal365:"sportal365_id",enetpulse:"enetpulse_id"},t.documentationLinks={PREDICTOR_USER_RELATED_OPERATION:"https://docs.fansunitedmedia.com/docs/predictor-operations#user-related-operations"},t.validFixtureFields=["matchId","matchType","market","prediction"]},712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.constructStringArrayWithProvidedLength=t.sortArrayInAscOrder=t.initDisableCache=t.isDisabledCache=t.transformIdsToBeUnique=t.setBaseUrl=t.limitIds=t.requestChunkBuild=void 0;var r=n(2671);t.requestChunkBuild=function(e){var t=[],n=0;return t[n]=[],e.forEach((function(e){t[n].length<=199?t[n].push(e):(n++,t[n]=[e])})),t},t.limitIds=function(e,t){for(var n=[];e.length>t;){var r=e.splice(0,t);n.push(r)}return n.push(e),n},t.setBaseUrl=function(e,t){return e===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"}[t]:e===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"}[t]:{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"}[t]},t.transformIdsToBeUnique=function(e){return e.filter((function(e,t,n){return t===n.indexOf(e)}))},t.isDisabledCache=function(e){return e||!1},t.initDisableCache=function(){return"&disable_cache="+Date.now()},t.sortArrayInAscOrder=function(e){return e.sort((function(e,t){return e.localeCompare(t)}))},t.constructStringArrayWithProvidedLength=function(e,t){for(var n=[],r=0;r<t;r++)n[r]=e;return n}},5601:function(e,t,n){"use strict";var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1260),s="FansUnited",a={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}}};t.default=function(e){var t=this;this.idSchema="",this.expirationProfileTimeout=600,this.expirationBadgesTimeout=3600,this.expirationClientFeaturesTimeout=14400,this.expirationFootballIdsTimeout=604800,this.clearData=function(){t.setData(a)},this.getEntityById=function(e,n){return void 0===e&&(e=""),void 0===n&&(n=""),t.getData().football.ids.find((function(r){var s=i.ID_TYPES[t.idSchema];return r&&""+r[s]===n&&r.resource===e}))},this.getEntity=function(e,n,r){return Array.isArray(e)?t.getData().football.ids.filter((function(t){var s=i.ID_TYPES[r];return t&&e.includes(""+t[s])&&t.resource===n})):t.getData().football.ids.find((function(t){var s=i.ID_TYPES[r];return t&&""+t[s]===e&&t.resource===n}))},this.getEntityByNativeId=function(e,n){return void 0===e&&(e=""),void 0===n&&(n=""),t.getData().football.ids.find((function(t){return t&&""+t.id===n&&t.resource===e}))},this.checkForExistingIdObjs=function(e,n){var r=i.ID_TYPES[n],s={};return Object.keys(e).forEach((function(i){var a=e[i],o=t.getEntity(a,i,n).map((function(e){return e[r]})),u=e[i].filter((function(e){return!o.includes(e)}));s[i]=a.map((function(e){return u.includes(e)?{id:e,exists:!1}:{id:e,exists:!0}}))})),s},this.getIdsByType=function(e,n,r){var s=i.ID_TYPES[r],a=i.ID_TYPES[n],o={};return Object.keys(e).forEach((function(n){var r=e[n],i=[];t.getData().football.ids.forEach((function(e){r.forEach((function(t,r){t===e[a]&&n===e.resource&&(i[r]=e[s])}))})),o[n]=i})),o},this.addIdMapping=function(e){var n=t.getData();n.football.ids.push(e),t.setData(n)},this.addIdMappings=function(e){var n=t.getData(),i=n.football.ids;i=r(r([],i,!0),e,!0),n.football.ids=i,t.setData(n)},this.addTopIdMappings=function(e){var n=t.getData();if(n.football.ids.length){var i=JSON.parse(JSON.stringify(n.football.ids));i=i.filter((function(e){return"match"!==e.resource})),e=e.filter((function(e){return"match"===e.resource})),i=r(r([],i,!0),e,!0),n.football.ids=i}else n.football.ids=e;n.football.expirations.ids=Math.floor(Date.now()/1e3)+t.expirationFootballIdsTimeout,t.setData(n)},this.setOwnProfile=function(e){var n=t.getData();n.profile.info=e,n.profile.expirations.profile=Math.floor(Date.now()/1e3)+t.expirationProfileTimeout,t.setData(n)},this.getOwnProfile=function(){return t.getData().profile.info},this.getProfileCountries=function(){return t.getData().profile.countries},this.setProfileCountries=function(e){var n=t.getData();n.profile.countries=e,t.setData(n)},this.getProfileStats=function(){return t.getData().profile.statistics},this.setProfileStats=function(e){var n=t.getData();n.profile.statistics=e,n.profile.expirations.statistics=Math.floor(Date.now()/1e3)+t.expirationProfileTimeout,t.setData(n)},this.getProfileBadges=function(){return t.getData().profile.badges},this.setProfileBadges=function(e){var n=t.getData();n.profile.badges=e,n.profile.expirations.badges=Math.floor(Date.now()/1e3)+t.expirationBadgesTimeout,t.setData(n)},this.getFootballCountries=function(){return t.getData().football.countries},this.setFootballCountries=function(e){var n=t.getData();n.football.countries=e,t.setData(n)},this.getCompetitions=function(e){var n=t.getData();return e?e.competitionSearchFilter(n.football.competitions):n.football.competitions},this.setCompetitions=function(e){var n=t.getData(),i=r([],n.football.competitions,!0);i.push.apply(i,e),n.football.competitions=t.makeCompetitionsUnique(i),t.setData(n)},this.getCompetitionsLength=function(){return t.getData().football.competitions.length},this.getClientFeatures=function(){return t.getData().client.features},this.setClientFeatures=function(e){var n=t.getData(),r=JSON.parse(JSON.stringify(e));n.client.expirations.features=Math.floor(Date.now()/1e3)+t.expirationClientFeaturesTimeout,n.client.features=r,t.setData(n)},this.getExpiration=function(e,n){t.initialNewSchema(e,"expirations");var r=t.getData();switch(n){case"profile":return r.profile.expirations.profile;case"statistics":return r.profile.expirations.statistics;case"badges":return r.profile.expirations.badges;case"features":return r.client.expirations.features;case"ids":return r.football.expirations.ids}},this.makeCompetitionsUnique=function(e){var t=new Set;return e.filter((function(e){var n=!t.has(e.id);return t.add(e.id),n}))},this.getData=function(){return JSON.parse(localStorage.getItem(s))},this.setData=function(e){localStorage.setItem(s,JSON.stringify(e))},this.initialNewSchema=function(e,n){var r=t.getData();r&&r[e]&&r[e][n]||t.setData(a)},this.idSchema=e.idSchema,void 0!==this.getData()&&null!==this.getData()||this.setData(a)}},5318:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invalidTypeMessage=t.missingFieldsMessage=t.invalidFieldMessage=t.invalidMarketTopXMessage=t.invalidMarketMessage=t.invalidPredictionMessage=t.WarningMessages=t.ErrorMessages=void 0;var r,i=n(1260);(r=t.ErrorMessages||(t.ErrorMessages={})).LOYALTY_INVALID_TEMPLATE_ID="Provided template ID does NOT exist! Try again with existing template ID.",r.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_PREDICTION_FIELD="Prediction 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 10 or less.",t.WarningMessages={UNEXPECTED_STATUS_PROP:"Unexpected provided property 'status'. You can NOT use this property for this method. For more information visit our documentation: \n "+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 "+i.documentationLinks.PREDICTOR_USER_RELATED_OPERATION},t.invalidPredictionMessage=function(e,t){return"The prediction '"+e+"' is invalid for market '"+t+"'. 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"},t.invalidMarketMessage=function(e){return"The market '"+e+"' is not supported from Fans United. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction"},t.invalidMarketTopXMessage=function(e){return"The market '"+e+"' is not valid for Top X game. The only available market is CORRECT_SCORE."},t.invalidFieldMessage=function(e){return"The field/s '"+(e.length>1?e.join(", "):e[0])+"' is/are invalid. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/javascript-sdk"},t.missingFieldsMessage=function(e,t){return"The following field/s is/are missing from "+e+": '"+(t.length>1?t.join(", "):t[0])+"'. For more information please visit our documentation: https://docs.fansunitedmedia.com/docs/predictor-operations#make-football-prediction"},t.invalidTypeMessage=function(e,t){return"The field "+e+" has incorrect type. The correct type is "+t}},4800:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.limit=e.limit?e.limit:null,this.startAfter=e.startAfter?e.startAfter:null}return e.prototype.constructMainFiltersUrl=function(){var e="";return this.limit&&(e+="&",e+="limit="+this.limit),this.startAfter&&(e+="&",e+="start_after="+this.startAfter),e},e}();t.default=n},439:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.main=null,this.cover=null,this.mobile=null}},8872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8902);t.default=function(){this.pagination=new r.default}},8902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.nextPageStartsAfter=null,this.itemsPerPage=null}},1553:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8872);t.default=function(){this.meta=new r.default,this.data=[]}},3623:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8872);t.default=function(){this.remapMetaData=function(e){var t=new r.default;return t.pagination.nextPageStartsAfter=e.pagination.next_page_starts_after,t.pagination.itemsPerPage=e.pagination.items_per_page,t}}},3483:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.entityId=null,this.entityType=null}},6208:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.axiosError=void 0,t.axiosError=function(e,t,n){var r={data:e.data,status:t,statusText:n,headers:e.headers,config:e};return{code:String(t),config:e,isAxiosError:!0,toJSON:function(){return{}},name:"Unauthorized",message:n,response:r}}},1022:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(712),u=n(2453),c=function(e){function t(t){var n=e.call(this,t,(0,o.setBaseUrl)(t.environment,"loyalty"))||this;return n.activityRemapper=null,n.createActivity=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),t="/activities"+this.apiSignInUrl,[4,this.instanceAuth.post(t,JSON.stringify(e))];case 1:return n=s.sent(),[2,this.activityRemapper.remapSingleResponse(n.data)];case 2:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with creating activity for user",i),i.response;case 3:return[2]}}))}))},n.deleteActivity=function(e){return s(n,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),t="/activities/"+e+this.apiSignInUrl,[4,this.instanceAuth.delete(t)];case 1:return i.sent(),[2,!0];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem deleting the following activity: "+e,r),r.response;case 3:return[2]}}))}))},n.getOwnActivities=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/activities"+this.apiSignInUrl,r=Date.now(),e&&(n+=""+e.constructFilterUrl()),t&&(n+="disable_cache="+r),[4,this.instanceAuth.get(n)];case 1:return i=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(i.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with fetching own activities",o),o.response;case 3:return[2]}}))}))},n.getActivitiesForUser=function(e,t,r){return s(n,void 0,void 0,(function(){var n,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/users/"+e+"/activities"+this.apiSignInUrl,i=Date.now(),t&&(n+=""+t.constructFilterUrl()),r&&(n+="disable_cache="+i),[4,this.instance.get(n)];case 1:return s=a.sent(),[2,this.activityRemapper.remapActivitiesResponse(s.data)];case 2:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with fetching activities for user "+e,u),u.response;case 3:return[2]}}))}))},n.getStats=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,5,,6]),n="",r=null,e?(n+=(0,o.isDisabledCache)(t)?"/users/"+e+"/statistics"+this.apiSignInUrl+(0,o.initDisableCache)():"/users/"+e+"/statistics"+this.apiSignInUrl,[4,this.instance.get(n)]):[3,2];case 1:return r=a.sent(),[3,4];case 2:return n+="/statistics"+this.apiSignInUrl,[4,this.instanceAuth.get(n)];case 3:r=a.sent(),a.label=4;case 4:return[2,this.activityRemapper.remapStatsReponse(r.data.data)];case 5:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching profile`s statistics:",s),s.response;case 6:return[2]}}))}))},n.activityRemapper=new u.default,n}return i(t,e),t}(n(7724).default);t.default=c},7686:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureConfigType=void 0;var o,u=n(712),c=n(704),l=n(7724),d=n(5601);(o=t.FeatureConfigType||(t.FeatureConfigType={})).PREDICTOR="predictor",o.TOP_X="topX",o.MATCH_QUIZ="matchQuiz",o.LOYALTY="loyalty";var h=function(e){function t(t){var n=e.call(this,t,(0,u.setBaseUrl)(t.environment,"client"))||this;return n.featureConfigRemapper=null,n.localStorage=null,n.clientId=null,n.getConfig=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),(t=this.getCachedFeatures())?[3,2]:(n="/clients/"+this.clientId+"/features",r=this.apiSignInUrl.split("&")[0],[4,this.instance.get(""+n+r)]);case 1:i=a.sent(),t=i.data.data,this.localStorage.setClientFeatures(t),a.label=2;case 2:switch(e){case"predictor":return[2,this.featureConfigRemapper.remapPredictorConfig(t.predictor)];case"topX":return[2,this.featureConfigRemapper.remapTopXConfig(t.top_x)];case"matchQuiz":return[2,this.featureConfigRemapper.remapMatchQuizConfig(t.match_quiz)];case"loyalty":return[2,this.featureConfigRemapper.remapLoyaltyConfig(t.loyalty)]}return[3,4];case 3:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching configuration from Client API",o),o.response;case 4:return[2]}}))}))},n.getCachedFeatures=function(){var e=n.getLocalStorageData();if(e&&Object.keys(e).length)return e},n.getLocalStorageData=function(){var e=Math.floor(Date.now()/1e3);return n.localStorage.getExpiration("client","features")>e?n.localStorage.getClientFeatures():null},n.clientId=t.clientId,n.localStorage=new d.default(t),n.featureConfigRemapper=new c.default,n}return i(t,e),t}(l.default);t.default=h},595:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(712),u=n(3430),c=n(7316),l=n(8758),d=n(5827),h=n(7821),p=n(5284),f=n(9330),m=n(4729),v=n(5157),y=n(7943),g=n(7287),w=n(753),b=n(1925),_=function(e){function t(t){var n=e.call(this,t,(0,o.setBaseUrl)(t.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.getCountries=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t="/countries"+this.apiSignInUrl,n=Date.now(),e&&(t+="&disable_cache="+n),[4,this.instance.get(t)];case 1:return r=a.sent(),[2,this.countryRemapper.countriesFromResponse(r.data.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with the football countries request",s),s.response;case 3:return[2]}}))}))},n.getCompetitions=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),t=t||!1,!(e&&e.competitionIds&&e.competitionIds.length>this.limitIds-1))return[3,5];i=[],s=(0,o.limitIds)(e.competitionIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],e.competitionIds=l,d="/competitions"+this.apiSignInUrl+e.constructFilterUrl(),t&&(d+="&disable_cache="+r),[4,this.instance.get(d)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(e){return f.competitionBasicRemapper.fromResponse(e)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d="/competitions"+this.apiSignInUrl,e&&(d+=""+e.constructFilterUrl()),t&&(d+="&disable_cache="+r),[4,this.instance.get(d)];case 6:return[2,(n=a.sent()).data.data.map((function(e){return f.competitionBasicRemapper.fromResponse(e)}))];case 7:return[3,9];case 8:throw h=a.sent(),p=this.transformAxiosErrorToFansUnitedException(h),console.warn("There was a problem with getCompetitions request",p),p.response;case 9:return[2]}}))}))},n.getCompetitionById=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/competitions/"+e+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.competitionFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getCompetitionById request",o),o.response;case 3:return[2]}}))}))},n.getTopCompetitions=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t="/competitions/top"+this.apiSignInUrl,n=Date.now(),e&&(t+="&disable_cache="+n),[4,this.instance.get(t)];case 1:return[2,a.sent().data.data.map((function(e){return s.competitionBasicRemapper.fromResponse(e)}))];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopCompetitions request",i),i.response;case 3:return[2]}}))}))},n.getTeams=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),!(e&&e.teamIds&&e.teamIds.length>this.limitIds))return[3,5];i=[],s=(0,o.limitIds)(e.teamIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],e.teamIds=l,h="/teams"+this.apiSignInUrl+e.constructFilterUrl(),t&&(h+="disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(e){return m.teamBasicRemapper.fromResponse(e)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new w.default,h="/teams"+this.apiSignInUrl,e&&(h+=""+e.constructFilterUrl()),t&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=a.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),d.data=n.data.data.map((function(e){return m.teamBasicRemapper.fromResponse(e)})),[2,d];case 7:return[3,9];case 8:throw p=a.sent(),f=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem with getTeams request",f),f.response;case 9:return[2]}}))}))},n.getTeamById=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+e+this.apiSignInUrl,r=Date.now(),t&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.teamFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getTeamById request",o),o.response;case 3:return[2]}}))}))},n.getTopTeams=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s,o=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t="/teams/top"+this.apiSignInUrl,n=Date.now(),e&&(t+="$disable_cache="+n),[4,this.instance.get(t)];case 1:return[2,(r=a.sent()).data.data?r.data.data.map((function(e){return o.teamBasicRemapper.fromResponse(e)})):[]];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem with getTopTeams request",s),s.response;case 3:return[2]}}))}))},n.getNextMatchForTeam=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+e+"/next-match"+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getNextMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForTeam=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/teams/"+e+"/previous-match"+this.apiSignInUrl,r=Date.now(),t&&(n+="disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPrevMatchForTeam request",o),o.response;case 3:return[2]}}))}))},n.getPlayers=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m=this;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,8,,9]),n={},r=Date.now(),!(e&&e.playerIds&&e.playerIds.length>this.limitIds-1))return[3,5];i=[],s=(0,o.limitIds)(e.playerIds,this.limitIds),u=0,c=s,a.label=1;case 1:return u<c.length?(l=c[u],e.playerIds=l,h="/players"+this.apiSignInUrl+e.constructFilterUrl(),t&&(h+="&disable_cache="+r),[4,this.instance.get(h)]):[3,4];case 2:n=a.sent(),i.push(n.data.data.map((function(e){return m.teamBasicRemapper.fromResponse(e)}))),a.label=3;case 3:return u++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)];case 5:return d=new w.default,h="/players"+this.apiSignInUrl,e&&(h+=""+e.constructFilterUrl()),t&&(h+="&disable_cache="+r),[4,this.instance.get(h)];case 6:return n=a.sent(),d.meta=this.footballMetaRemapper.remapMetaProp(n.data.meta),d.data=n.data.data.map((function(e){return m.playerBasicRemapper.fromResponse(e)})),[2,d];case 7:return[3,9];case 8:throw p=a.sent(),f=this.transformAxiosErrorToFansUnitedException(p),console.warn("There was a problem with getPlayers request",f),f.response;case 9:return[2]}}))}))},n.getPlayerById=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+e+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.playerFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPlayerById request",o),o.response;case 3:return[2]}}))}))},n.getTopPlayers=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t="/players/top"+this.apiSignInUrl,n=Date.now(),e&&(t+="&disable_cache="+n),[4,this.instance.get(t)];case 1:return[2,a.sent().data.data.map((function(e){return s.topPlayerRemapper.fromResponse(e)}))];case 2:throw r=a.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with getTopPlayers request",i),i.response;case 3:return[2]}}))}))},n.getNextMatchForPlayer=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+e+"/next-match"+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getNextMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getPrevMatchForPlayer=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/players/"+e+"/previous-match"+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getPrevMatchForPlayer request",o),o.response;case 3:return[2]}}))}))},n.getMatchById=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/matches/"+e+this.apiSignInUrl,r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.matchFullRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with getMatchById request",o),o.response;case 3:return[2]}}))}))},n.getMatches=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u,c=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=new w.default,r="/matches"+this.apiSignInUrl,i=Date.now(),e&&(r+=""+e.constructFilterUrl()),t&&(r+="&disable_cache="+i),[4,this.instance.get(r)];case 1:return s=a.sent(),n.meta=this.footballMetaRemapper.remapMetaProp(s.data.meta),n.data=s.data.data.map((function(e){return c.matchBasicRemapper.fromResponse(e)})),[2,n];case 2:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem with getMatches request",u),u.response;case 3:return[2]}}))}))},n.search=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n="/search"+this.apiSignInUrl+e.constructFilterUrl(),r=Date.now(),t&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return i=a.sent(),[2,this.searchRemapper.fromResponse(i.data.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem with search request",o),o.response;case 3:return[2]}}))}))},n.apiSignInUrl="en"!==t.lang?n.apiSignInUrl+"&lang="+t.lang:n.apiSignInUrl,n.countryRemapper=new u.default,n.competitionBasicRemapper=new c.default,n.competitionFullRemapper=new l.default,n.teamBasicRemapper=new d.default,n.teamFullRemapper=new h.default,n.matchBasicRemapper=new p.default,n.matchFullRemapper=new f.default,n.playerBasicRemapper=new v.default,n.playerFullRemapper=new y.default,n.topPlayerRemapper=new m.default,n.searchRemapper=new g.default,n.footballMetaRemapper=new b.default,n}return i(t,e),t}(n(7724).default);t.default=_},7724:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9669),i=n(6245),s=n(4021),a=n(4904),o=n(2535),u=n(6208),c=n(5318);t.default=function(e,t){var n=this;this.apiSignInUrl=null,this.instanceAuth=null,this.instance=null,this.errorHandlingMode=null,this.transformAxiosErrorToFansUnitedException=function(e){if("standard"===n.errorHandlingMode&&e.response&&e.response.data&&e.response.data.error){var t=e.response.data.error,r=t.code,i=t.status,s=t.message;return new o.default(r,i,s)}return e},this.apiSignInUrl="?key="+e.apiKey+"&client_id="+e.clientId,this.errorHandlingMode=e.errorHandlingMode,this.instanceAuth=r.default.create({baseURL:t,headers:{Authorization:"Bearer "+e.authProvider.getIdToken(),"Content-Type":"application/json"}}),this.instanceAuth.interceptors.request.use((function(t){var l=null;try{l=(0,i.default)(e.authProvider.getIdToken())}catch(e){if("default"===n.errorHandlingMode)throw(0,u.axiosError)(t,401,e.message);if("standard"===n.errorHandlingMode)throw new o.default(s.ErrorCodes.UNAUTHORIZED,a.ErrorStatuses.INVALID_TOKEN,c.ErrorMessages.INVALID_TOKEN)}return Date.now()>l.exp?(r.default.defaults.headers.common.Authorization="Bearer "+e.authProvider.getIdToken(),t.headers.Authorization="Bearer "+e.authProvider.getIdToken(),t):t}),(function(e){Promise.reject(e)})),this.instanceAuth.interceptors.response.use((function(e){return e}),(function(t){var r,i,u,l=t.config;if((403===(null===(r=t.response)||void 0===r?void 0:r.status)||401===(null===(i=t.response)||void 0===i?void 0:i.status))&&!l._retry){l._retry=!0;var d=e.authProvider.getIdToken();return l.headers.Authorization="Bearer "+d,n.instanceAuth(l)}if("standard"===n.errorHandlingMode&&401===(null===(u=t.response)||void 0===u?void 0:u.status)){var h=new o.default(s.ErrorCodes.UNAUTHORIZED,a.ErrorStatuses.UNAUTHORIZED,c.ErrorMessages.EXPIRED_TOKEN);return Promise.reject(h)}return Promise.reject(t)})),this.instance=r.default.create({baseURL:t,headers:{"Content-Type":"application/json"}})}},8539:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(712),u=n(7724),c={player:"players",team:"teams",homeTeam:"teams",awayTeam:"teams",country:"countries",competition:"competitions",match:"matches"},l=function(e){function t(t){var n=e.call(this,t,(0,o.setBaseUrl)(t.environment,"idMapping"))||this;return n.getEntityById=function(e,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+t.idSchema+"&"+c[e]+"="+r)}catch(e){throw console.warn("There was a problem with id mapping request for the following id:"+r,e),e.response}},n.getEntityByIdAndSchema=function(e,t,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[e]+"="+t)}catch(e){throw console.warn("There was a problem with id mapping request for the following id:"+t,e),e.response}},n.getEntityIdsByIdsAndSchema=function(e,t,r){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[e]+"="+t.join(","))}catch(e){throw console.warn("There was a problem with id mapping request for the following ids:"+t.join(","),e),e.response}},n.getEntitiesByIds=function(e,t,r){t.sort((function(e,t){return e.localeCompare(t)}));var i=(0,o.requestChunkBuild)(t).map((function(t){try{return n.instance.get("/football"+n.apiSignInUrl+"&input_provider="+r+"&"+c[e]+"="+t.join(","))}catch(e){var i=n.transformAxiosErrorToFansUnitedException(e);throw console.warn("There was a problem with id mapping request for the following ids:"+t.join(","),i),i.response}}));return Promise.all(i).then((function(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.data.data)})),t}))},n.getEntitiesByIdObjs=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u,l,d,h,p,f;return a(this,(function(m){switch(m.label){case 0:n=[],r={},i=[],Object.keys(e).forEach((function(t){n.push.apply(n,e[t])})),s=(0,o.transformIdsToBeUnique)(n),u=(0,o.requestChunkBuild)(s),l=function(n){var s,o,u,l;return a(this,(function(a){switch(a.label){case 0:if(s="",Object.keys(e).forEach((function(t){r[t]=[];var i=n.filter((function(n){return e[t].includes(n)}));i&&i.length>0&&(r[t]=i)})),Object.keys(r).forEach((function(e){r[e].length>0&&(r[e].sort((function(e,t){return e.localeCompare(t)})),s+="&",s+=c[e]+"="+r[e].join(","))})),!(s&&s.length>0))return[3,5];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,d.instance.get("/football"+d.apiSignInUrl+"&input_provider="+(t||"native")+s)];case 2:return o=a.sent(),i.push(o.data.data),[3,4];case 3:throw u=a.sent(),l=d.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem with id mapping request",l),l.response;case 4:return[3,6];case 5:i.push([]),a.label=6;case 6:return[2]}}))},d=this,h=0,p=u,m.label=1;case 1:return h<p.length?(f=p[h],[5,l(f)]):[3,4];case 2:m.sent(),m.label=3;case 3:return h++,[3,1];case 4:return[2,Array.prototype.concat.apply([],i)]}}))}))},n.getTopEntities=function(){return s(n,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.instance.get("/football/top"+this.apiSignInUrl)];case 1:return[2,n.sent().data.data];case 2:throw e=n.sent(),t=this.transformAxiosErrorToFansUnitedException(e),console.warn("There was a problem with top id mappings request",t),t.response;case 3:return[2]}}))}))},n.apiSignInUrl=n.apiSignInUrl.split("&")[0],n}return i(t,e),t}(u.default);t.default=l},7059:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(712),u=n(7419),c=n(4533),l=n(8899),d=n(7746),h=function(e){function t(t){var n=e.call(this,t,(0,o.setBaseUrl)(t.environment,"loyalty"))||this;return n.templateRemapper=null,n.leaderboardRemapper=null,n.rankingsRemapper=null,n.highestSuccessRateRemapper=null,n.getTemplates=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(e)?"/leaderboard/templates/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),t?((i=JSON.parse(JSON.stringify(r.data))).meta=this.templateRemapper.remapMeta(r.data.meta),i.data=this.templateRemapper.remapResponse(r.data.data),[2,i]):[2,this.templateRemapper.remapResponse(r.data.data)];case 2:throw s=a.sent(),u=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the list of templates",u),u.response;case 3:return[2]}}))}))},n.getTemplateById=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(t)?"/leaderboard/templates/"+e+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/templates/"+e+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.templateRemapper.remapResponseId(r.data.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem requesting the following template: "+e,s),s.response;case 3:return[2]}}))}))},n.getLeaderboard=function(e,t,r){return s(n,void 0,void 0,(function(){var n,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(t)?"/leaderboard/"+e+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/"+e+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=a.sent(),s=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(s)];case 2:throw u=a.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following template: "+e,c),c.response;case 3:return[2]}}))}))},n.getLeaderboardForGame=function(e,t,r){return s(n,void 0,void 0,(function(){var n,i,s,u,c;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,o.isDisabledCache)(t)?"/leaderboard/games/"+e+"/"+this.apiSignInUrl+(0,o.initDisableCache)():"/leaderboard/games/"+e+"/"+this.apiSignInUrl,r&&(n+=""+r.constructFiltersUrl()),[4,this.instance.get(n)];case 1:return i=a.sent(),s=JSON.parse(JSON.stringify(i.data)),[2,this.leaderboardRemapper.remapResponse(s)];case 2:throw u=a.sent(),c=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the leaderboard for the following game: "+e,c),c.response;case 3:return[2]}}))}))},n.getUserRankings=function(e,t,r){return s(n,void 0,void 0,(function(){var n,i,s,u;return a(this,(function(a){switch(a.label){case 0:n="/leaderboard/users/"+e+"/rankings/"+this.apiSignInUrl,t&&(n+=""+t.constructFiltersUrl()),(0,o.isDisabledCache)(r)&&(n+=""+(0,o.initDisableCache)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return i=a.sent(),[2,this.rankingsRemapper.remapRankings(i.data)];case 3:throw s=a.sent(),u=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the rankings for the following user: "+e,u),u.response;case 4:return[2]}}))}))},n.getHighestSuccessRate=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n=(0,o.isDisabledCache)(t)?"/statistics/top"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/top"+this.apiSignInUrl,e&&(n+="&market="+e),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.highestSuccessRateRemapper.remapHighestSuccessRate(r.data.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching highest success rate",s),s.response;case 4:return[2]}}))}))},n.getEntitiesFollows=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i;return a(this,(function(s){switch(s.label){case 0:n=(0,o.isDisabledCache)(t)?"/statistics/follows"+this.apiSignInUrl+(0,o.initDisableCache)():"/statistics/follows"+this.apiSignInUrl,e.footballCompetitions&&(n+="&competitions="+e.footballCompetitions.join(",")),e.footballTeams&&(n+="&teams="+e.footballTeams.join(",")),e.footballPlayers&&(n+="&players="+e.footballPlayers.join(",")),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return[2,s.sent().data.data];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching follows for entities",i),i.response;case 4:return[2]}}))}))},n.templateRemapper=new l.default,n.leaderboardRemapper=new u.default,n.rankingsRemapper=new c.default,n.highestSuccessRateRemapper=new d.default,n}return i(t,e),t}(n(7724).default);t.default=h},2793:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(2726),u=n(9679),c=n(712),l=n(4780),d=n(1553),h=n(3623),p=function(e){function t(t,n){var r=e.call(this,t,(0,c.setBaseUrl)(t.environment,"predictor"))||this;return r.predictionRemapper=null,r.matchSummaryRemapper=null,r.gamesRemapper=null,r.metaRemapper=null,r.makeFootballPrediction=function(e){return s(r,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),t=this.predictionRemapper.remapRequestBody(e),[4,this.instanceAuth.post("/predictions"+this.apiSignInUrl,JSON.stringify(t))];case 1:return n=s.sent(),[4,this.predictionRemapper.remapResponseObjBody(n.data)];case 2:return[2,s.sent()];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem making POST request: ",i),i.response;case 4:return[2]}}))}))},r.getMatchSummary=function(e,t){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n=(0,c.isDisabledCache)(t)?"/predictions/summary/"+e+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/summary/"+e+this.apiSignInUrl,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.matchSummaryRemapper.remapResponse(r.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching predictions for match: "+e+" ",s),s.response;case 4:return[2]}}))}))},r.deleteFootballPrediction=function(e){return s(r,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.delete("/predictions/"+e+this.apiSignInUrl)];case 1:return r.sent(),[2,!0];case 2:throw t=r.sent(),n=this.transformAxiosErrorToFansUnitedException(t),console.warn("There was a problem deleting your prediction: "+e,n),n.response;case 3:return[2]}}))}))},r.getMyPredictions=function(e){return s(r,void 0,void 0,(function(){var t,n,r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),t=new d.default,n="/predictions"+this.apiSignInUrl,e&&(n+=""+e.constructFiltersUrl()),[4,this.instanceAuth.get(n)];case 1:return r=a.sent(),t.meta=this.metaRemapper.remapMetaData(r.data.meta),i=t,[4,this.predictionRemapper.remapResponseArrayBody(r.data.data)];case 2:return i.data=a.sent(),[2,t];case 3:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching own predictions",o),o.response;case 4:return[2]}}))}))},r.getMyPredictionsNoRemap=function(e){return s(r,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.instanceAuth.get("/predictions"+this.apiSignInUrl+e.constructFiltersUrl())];case 1:return[2,r.sent().data];case 2:throw t=r.sent(),n=this.transformAxiosErrorToFansUnitedException(t),console.warn("There was a problem fetching own predictions",n),n.response;case 3:return[2]}}))}))},r.getUserPredictions=function(e,t,n){return s(r,void 0,void 0,(function(){var r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),r=new d.default,i=(0,c.isDisabledCache)(t)?"/predictions/users/"+e+this.apiSignInUrl+(0,c.initDisableCache)():"/predictions/users/"+e+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return s=a.sent(),r.meta=this.metaRemapper.remapMetaData(s.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(s.data.data)];case 2:return o.data=a.sent(),[2,r];case 3:throw u=a.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching predictions for user: "+e,l),l.response;case 4:return[2]}}))}))},r.getUserPredictionsNoRemap=function(e,t){return s(r,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/predictions/users/"+e+this.apiSignInUrl+t.constructFiltersUrl())];case 1:return[2,i.sent().data];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching predictions for user: "+e,r),r.response;case 3:return[2]}}))}))},r.getGames=function(e,t){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(t)?"/games/"+this.apiSignInUrl+e.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+e.constructFiltersUrl(),[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.gamesRemapper.remapPaginatedGames(r.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the games list",s),s.response;case 3:return[2]}}))}))},r.getGameById=function(e,t){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=(0,c.isDisabledCache)(t)?"/games/"+e+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+e+this.apiSignInUrl,[4,this.instance.get(n)];case 1:return r=a.sent(),[2,this.gamesRemapper.remapGameByIdResponse(r.data)];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the following game: "+e,s),s.response;case 3:return[2]}}))}))},r.getGamePredictions=function(e,t,n){return s(r,void 0,void 0,(function(){var r,i,s,o,u,l;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),r=new d.default,i=(0,c.isDisabledCache)(t)?"/games/"+e+"/predictions"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+e+"/predictions"+this.apiSignInUrl,n&&(i+=""+n.constructFiltersUrl()),[4,this.instance.get(i)];case 1:return s=a.sent(),r.meta=this.metaRemapper.remapMetaData(s.data.meta),o=r,[4,this.predictionRemapper.remapResponseArrayBody(s.data.data)];case 2:return o.data=a.sent(),[2,r];case 3:throw u=a.sent(),l=this.transformAxiosErrorToFansUnitedException(u),console.warn("There was a problem fetching the predictions for game: "+e,l),l.response;case 4:return[2]}}))}))},r.getUserGameEditions=function(e,t){return s(r,void 0,void 0,(function(){var n,r,i,s,o,u=this;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=null,r=(0,c.isDisabledCache)(t)?"/games/"+this.apiSignInUrl+e.constructFiltersUrl()+(0,c.initDisableCache)():"/games/"+this.apiSignInUrl+e.constructFiltersUrl(),[4,this.instance.get(r)];case 1:return(i=a.sent()).data.data.forEach((function(e){"TOP_X"===e.type?n=u.gamesRemapper.remapPaginatedUserTopXEditions(i.data):"MATCH_QUIZ"===e.type&&(n=u.gamesRemapper.remapPaginatedUserMathQuizEditions(i.data))})),[2,n];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the games list",o),o.response;case 3:return[2]}}))}))},r.getGameResults=function(e,t,n){return s(r,void 0,void 0,(function(){var r,i,s,o;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),r=(0,c.isDisabledCache)(t)?"/games/"+e+"/results/"+this.apiSignInUrl+(0,c.initDisableCache)():"/games/"+e+"/results/"+this.apiSignInUrl,n&&(r+=""+n.constructMainFiltersUrl()),[4,this.instance.get(r)];case 1:return i=a.sent(),[2,this.gamesRemapper.remapPaginatedGameResults(i.data)];case 2:throw s=a.sent(),o=this.transformAxiosErrorToFansUnitedException(s),console.warn("There was a problem fetching the results for the following game: "+e,o),o.response;case 3:return[2]}}))}))},r.getMarketResultsForGame=function(e,t){return s(r,void 0,void 0,(function(){var n,r,i,s;return a(this,(function(a){switch(a.label){case 0:n="/games/"+e+"/correct-results/"+this.apiSignInUrl,(0,c.isDisabledCache)(t)&&(n+=""+(0,c.initDisableCache)()),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(n)];case 2:return r=a.sent(),[2,this.gamesRemapper.remapGameMarketsResults(r.data.data)];case 3:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the markets correct results for the following game: "+e,s),s.response;case 4:return[2]}}))}))},r.getContestWinners=function(e){return s(r,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instance.get("/winners/"+this.apiSignInUrl+"&contest_id="+e)];case 1:return t=i.sent(),[2,this.gamesRemapper.remapContestWinners(t.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching winners for the following game: "+e,r),r.response;case 3:return[2]}}))}))},r.getPredictionById=function(e){return s(r,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(s){switch(s.label){case 0:return s.trys.push([0,3,,4]),t="/predictions/"+e+this.apiSignInUrl,[4,this.instanceAuth.get(t)];case 1:return n=s.sent(),[4,this.predictionRemapper.remapResponseArrayBody([n.data.data])];case 2:return[2,s.sent()[0]];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching info for the following prediction: "+e,i),i.response;case 4:return[2]}}))}))},r.predictionRemapper=new o.default(t,n),r.matchSummaryRemapper=new u.default(t,n),r.gamesRemapper=new l.default,r.metaRemapper=new h.default,r}return i(t,e),t}(n(7724).default);t.default=p},4275:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(712),u=n(441),c=n(8673),l=n(6277),d=n(1712),h=function(e){function t(t){var n=e.call(this,t,(0,o.setBaseUrl)(t.environment,"profile"))||this;return n.profileRemapper=null,n.followingRemapper=null,n.followersRemapper=null,n.lang=null,n.limitIds=100,n.getCountries=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),t="&lang="+this.lang,n="/countries"+this.apiSignInUrl+t,r=Date.now(),e&&(n+="&disable_cache="+r),[4,this.instance.get(n)];case 1:return[2,a.sent().data.data];case 2:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the countries:",s),s.response;case 3:return[2]}}))}))},n.getProfile=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i,s;return a(this,(function(a){switch(a.label){case 0:if(t="/profile"+this.apiSignInUrl,!e)return[3,5];t="/profiles/"+e+this.apiSignInUrl,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instance.get(t)];case 2:return r=a.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 3:throw n=a.sent(),s=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem fetching the following profile: "+e,s),s.response;case 4:return[3,8];case 5:return a.trys.push([5,7,,8]),[4,this.instanceAuth.get(t)];case 6:return r=a.sent(),[2,this.profileRemapper.fullProfileFromResponse(r.data.data)];case 7:throw i=a.sent(),s=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching your profile from API:",s),s.response;case 8:return[2]}}))}))},n.getProfiles=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,u,c,l,d,h,p,f,m;return a(this,(function(a){switch(a.label){case 0:if(a.trys.push([0,7,,8]),n=Date.now(),!(e.length>this.limitIds))return[3,5];r=[],i=(0,o.limitIds)(e,this.limitIds),s=0,u=i,a.label=1;case 1:return s<u.length?(c=u[s],l="/profiles"+this.apiSignInUrl+"&profile_ids="+c.join(","),t&&(l+="&disable_cache="+n),[4,this.instance.get(l)]):[3,4];case 2:d=a.sent(),r.push.apply(r,this.profileRemapper.profilesFromResponse(d.data.data)),a.label=3;case 3:return s++,[3,1];case 4:return[2,r];case 5:return h="/profiles"+this.apiSignInUrl+"&profile_ids="+e.join(","),t&&(h+="&disable_cache="+n),[4,this.instance.get(h)];case 6:return p=a.sent(),[2,this.profileRemapper.profilesFromResponse(p.data.data)];case 7:throw f=a.sent(),m=this.transformAxiosErrorToFansUnitedException(f),console.warn("There was a problem fetching the following profiles: "+e.join(","),m),m.response;case 8:return[2]}}))}))},n.getFollowers=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:if(n="/profile/followers"+this.apiSignInUrl,!e||t)return[3,5];n="/profile/followers"+this.apiSignInUrl+e.constructFilterUrl(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 3:throw r=a.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 4:return[3,9];case 5:if(e||t)return[3,9];a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 8:throw i=a.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers for own profile",u),u.response;case 9:e&&t?n="/profile/"+t+"/followers"+this.apiSignInUrl+e.constructFilterUrl():!e&&t&&(n="/profile/"+t+"/followers"+this.apiSignInUrl),a.label=10;case 10:return a.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return s=a.sent(),[2,this.followersRemapper.followersFromResponse(s.data)];case 12:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers for profile: "+t,u),u.response;case 13:return[2]}}))}))},n.getFollowing=function(e,t){return s(n,void 0,void 0,(function(){var n,r,i,s,o,u;return a(this,(function(a){switch(a.label){case 0:if(n="/profile/following"+this.apiSignInUrl,!e||t)return[3,5];n="/profile/following"+this.apiSignInUrl+e.constructFilterUrl(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.instanceAuth.get(n)];case 2:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 3:throw r=a.sent(),u=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 4:return[3,9];case 5:if(e||t)return[3,9];a.label=6;case 6:return a.trys.push([6,8,,9]),[4,this.instanceAuth.get(n)];case 7:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 8:throw i=a.sent(),u=this.transformAxiosErrorToFansUnitedException(i),console.warn("There was a problem fetching the followers of own profile",u),u.response;case 9:e&&t?n="/profile/"+t+"/following"+this.apiSignInUrl+e.constructFilterUrl():!e&&t&&(n="/profile/"+t+"/following"+this.apiSignInUrl),a.label=10;case 10:return a.trys.push([10,12,,13]),[4,this.instance.get(n)];case 11:return s=a.sent(),[2,this.followingRemapper.followingFromResponse(s.data)];case 12:throw o=a.sent(),u=this.transformAxiosErrorToFansUnitedException(o),console.warn("There was a problem fetching the followers of the following profile: "+t,u),u.response;case 13:return[2]}}))}))},n.follow=function(e){return s(n,void 0,void 0,(function(){var t,n,r,i;return a(this,(function(s){switch(s.label){case 0:(t=new d.default).profile_ids=e,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.instanceAuth.post("/profile/follow"+this.apiSignInUrl,JSON.stringify(t))];case 2:return n=s.sent(),[2,this.followingRemapper.followResponse(n.data.data)];case 3:throw r=s.sent(),i=this.transformAxiosErrorToFansUnitedException(r),console.warn("There was a problem with POST request for profiles: "+e.join(",")+" ",i),i.response;case 4:return[2]}}))}))},n.unfollow=function(e){return s(n,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:(t=new d.default).profile_ids=e,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.instanceAuth.delete("/profile/follow"+this.apiSignInUrl,{data:JSON.stringify(t)})];case 2:return i.sent(),[2,!0];case 3:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with DELETE request for profiles: "+e.join(",")+" ",r),r.response;case 4:return[2]}}))}))},n.getBadges=function(e){return s(n,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:t="/profile/badges"+this.apiSignInUrl,i.label=1;case 1:return i.trys.push([1,5,,6]),e?(t="/profile/"+e+"/badges"+this.apiSignInUrl,[4,this.instance.get(t)]):[3,3];case 2:return[2,i.sent().data.data];case 3:return[4,this.instanceAuth.get(t)];case 4:return[2,i.sent().data.data];case 5:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem with fetching the badges",r),r.response;case 6:return[2]}}))}))},n.updateProfile=function(e){return s(n,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.instanceAuth.patch("/profile"+this.apiSignInUrl,e)];case 1:return t=i.sent(),[2,this.profileRemapper.fullProfileFromResponse(t.data.data)];case 2:throw n=i.sent(),r=this.transformAxiosErrorToFansUnitedException(n),console.warn("There was a problem updating the own profile:",r),r.response;case 3:return[2]}}))}))},n.lang=t.lang,n.profileRemapper=new u.default,n.followingRemapper=new c.default,n.followersRemapper=new l.default,n}return i(t,e),t}(n(7724).default);t.default=h},5792:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(5601),a=n(8539),o=n(1260);t.default=function(e){var t=this;this.isBrowser=!1,this.localStorage=null,this.https=null,this.getEntitiesByIds=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r,a,u,c,l;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?[4,this.setTopIdMappings()]:[3,6];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,5]),t=this.localStorage.checkForExistingIdObjs(e,n),r=this.splitForRequestAndExisting(t),[4,this.https.getEntitiesByIdObjs(r.request,n)];case 3:return a=i.sent(),this.localStorage.addIdMappings(a),[2,this.localStorage.getIdsByType(e,n,s)];case 4:return u=i.sent(),console.warn("There was a problem retrieving the entity ids ",u),[2,Promise.resolve([])];case 5:return[3,9];case 6:return i.trys.push([6,8,,9]),[4,this.https.getEntitiesByIdObjs(e,n)];case 7:return c=i.sent(),Object.keys(e).forEach((function(t){e[t]=c.filter((function(e){return e.resource===t})).map((function(e){return e[o.ID_TYPES[s]]}))})),[2,e];case 8:return l=i.sent(),console.warn("There was a problem retrieving the entity ids ",l),[2,Promise.resolve([])];case 9:return[2]}}))}))},this.getEntityById=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(t=this.localStorage.getEntity(e,n,s))?[2,t]:[3,1]:[3,4];case 1:case 4:return[4,this.requestEntity(e,n,s)];case 2:return r=i.sent(),this.localStorage.addIdMappings(r),[2,r];case 3:return[3,6];case 5:return[2,i.sent()];case 6:return[2]}}))}))},this.splitForRequestAndExisting=function(e){var t={},n={};return Object.keys(e).forEach((function(r){t[r]=e[r].filter((function(e){return!e.exists})).map((function(e){return e.id})),n[r]=e[r].filter((function(e){return e.exists})).map((function(e){return e.id}))})),{existing:n,request:t}},this.requestEntity=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=Array.isArray(e)?e:[e],[4,this.https.getEntitiesByIds(n,e,s)];case 1:return[2,r.sent()];case 2:return t=r.sent(),console.warn("There was a problem retrieving the requested entity: "+t),[2,null];case 3:return[2]}}))}))},this.setTopIdMappings=function(){return r(t,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return e=Math.floor(Date.now()/1e3),this.localStorage.getExpiration("football","ids")>e?[2,Promise.resolve()]:[4,this.https.getTopEntities()];case 1:return t=n.sent(),this.localStorage.addTopIdMappings(t),[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=new s.default(e),this.https=new a.default(e)}},8900:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(5792),o=n(7611),u=n(9052);t.default=function(e){var t=this;this.idSchema="",this.idMappingFacade=null,this.getEntityIdBySchemaId=function(e,n){return t.idMappingFacade.getEntityById(e,n,t.idSchema)},this.remapEntities=function(e,n){return r(t,void 0,void 0,(function(){var t,r,a;return i(this,(function(i){t=JSON.parse(JSON.stringify(e));try{return this.idSchema!==s.IdSchemaEnum.NATIVE?(r=new o.default,a=r.traverse(t,n),[2,this.idMappingFacade.getEntitiesByIds(a,"native",this.idSchema).then((function(e){return(new u.default).traverse(t,n,e)}))]):[2,e]}catch(e){return console.warn("There was a problem remapping entity: "+n+" with inner entity ",e),[2,[]]}return[2]}))}))},this.getEntityIdsBySchemaId=function(e,n,a){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return(t={})[n]=e,this.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:[4,this.idMappingFacade.getEntitiesByIds(t,this.idSchema,a)];case 1:return[2,r.sent()];case 2:return[2,t]}}))}))},this.idSchema=e.idSchema,this.idMappingFacade=new a.default(e)}},3845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typeConvert=void 0,t.typeConvert=function(e){switch(e){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 e}}},7611:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3845);t.default=function(){var e=this;this.extractedObjIds={},this.traverse=function(t,n){return n=(0,r.typeConvert)(n),Array.isArray(t)?e.traverseArrExtract(t,n):t&&"object"==typeof t&&e.traverseObjExtract(t,n),e.extractedObjIds},this.traverseArrExtract=function(t,n){t&&t.length>0&&t.forEach((function(t){e.traverseObjExtract(t,n)}))},this.traverseObjExtract=function(t,n){t&&Object.keys(t).length>0&&Object.keys(t).forEach((function(r){var i=t[r];"id"===r||"teamId"===r?(e.extractedObjIds.hasOwnProperty(n)||(e.extractedObjIds[n]=[]),i&&e.extractedObjIds[n].push(i)):t[r]&&e.traverse(t[r],r)}))}}},9052:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3845);t.default=function(){var e=this;this.replaceObjIdsIndex=null,this.remappedIdsObj={},this.traverse=function(t,n,i){return n=(0,r.typeConvert)(n),null===e.replaceObjIdsIndex&&(e.initReplaceObjIdsIndex(i),e.remappedIdsObj=i),Array.isArray(t)?e.traverseArrReplace(t,n):t&&"object"==typeof t&&e.traverseObjReplace(t,n),t},this.initReplaceObjIdsIndex=function(t){e.replaceObjIdsIndex={},Object.keys(t).forEach((function(t){e.replaceObjIdsIndex[t]=0}))},this.traverseArrReplace=function(t,n){t&&t.length>0&&t.forEach((function(t){e.traverseObjReplace(t,n)}))},this.traverseObjReplace=function(t,n){t&&Object.keys(t).length>0&&Object.keys(t).forEach((function(r){"id"===r||"teamId"===r?t[r]&&(t[r]=e.remappedIdsObj[n][e.replaceObjIdsIndex[n]],e.replaceObjIdsIndex[n]=e.replaceObjIdsIndex[n]+1):t[r]&&e.traverse(t[r],r,e.remappedIdsObj)}))}}},7302:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(5936);t.default=function(e){var t=this;this.add=function(e,n,s,a){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.add(e,n,s,a)];case 1:return[2,t.sent()]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.delete(e)];case 1:return[2,t.sent()]}}))}))},this.like=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.like(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.dislike=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.dislike(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addPageview=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.addPageview(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addContentConsumed=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.addContentConsumed(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addShare=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.addShare(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addComment=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.addComment(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addClickAd=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.addClickAd(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.addConversion=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.addConversion(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getOwn=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.getOwn(e,n)];case 1:return[2,t.sent()]}}))}))},this.getForUser=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityFacade.getForUser(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.activityFacade=new s.default(e)}},1491:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionsEnum=void 0,(n=t.ActionsEnum||(t.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.CONVERSION="conversion",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"},5936:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(1022),o=n(1491),u=n(4630),c=n(8261),l=n(629),d=n(8636);t.default=function(e){var t=this;this.add=function(e,n,a,o){return r(t,void 0,void 0,(function(){var t,r,c,l,d;return i(this,(function(i){switch(i.label){case 0:return this.idSchema==s.IdSchemaEnum.NATIVE?[3,3]:(t=JSON.parse(JSON.stringify(n)),[4,this.activityService.remapTagsIds(n,this.idSchema,s.IdSchemaEnum.NATIVE)]);case 1:return r=i.sent(),c=new u.default(e,r,a,o),[4,this.activityHttps.createActivity(c)];case 2:return(l=i.sent()).context.tags=t,[2,l];case 3:return d=new u.default(e,n,a,o),[2,this.activityHttps.createActivity(d)]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.activityHttps.deleteActivity(e)];case 1:return[2,t.sent()]}}))}))},this.like=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=o.ActionsEnum.LIKE,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.dislike=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=o.ActionsEnum.DISLIKE,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addPageview=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=o.ActionsEnum.PAGE_VIEW,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addContentConsumed=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=o.ActionsEnum.CONTENT_CONSUMED,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addShare=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=o.ActionsEnum.SHARE,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addComment=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=o.ActionsEnum.COMMENT,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addClickAd=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=o.ActionsEnum.CLICK_AD,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.addConversion=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=o.ActionsEnum.CONVERSION,[4,this.add(t,e,n,s)];case 1:return[2,r.sent()]}}))}))},this.getOwn=function(e,n){return r(t,void 0,void 0,(function(){var t,r,a,o;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,e&&(e=new l.default(e)),this.idSchema==s.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getOwnActivities(e,n)];case 1:t=i.sent(),r=0,a=t.data,i.label=2;case 2:return r<a.length?(o=a[r],[4,this.activityService.remapTagsIds(o.context.tags,s.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,t];case 6:return[4,this.activityHttps.getOwnActivities(e,n)];case 7:return[2,i.sent()]}}))}))},this.getForUser=function(e,n,a){return r(t,void 0,void 0,(function(){var t,r,o,u;return i(this,(function(i){switch(i.label){case 0:return a=a||!1,n&&(n=new d.default(n)),this.idSchema==s.IdSchemaEnum.NATIVE?[3,6]:[4,this.activityHttps.getActivitiesForUser(e,n,a)];case 1:t=i.sent(),r=0,o=t.data,i.label=2;case 2:return r<o.length?(u=o[r],[4,this.activityService.remapTagsIds(u.context.tags,s.IdSchemaEnum.NATIVE,this.idSchema)]):[3,5];case 3:i.sent(),i.label=4;case 4:return r++,[3,2];case 5:return[2,t];case 6:return[4,this.activityHttps.getActivitiesForUser(e,n,a)];case 7:return[2,i.sent()]}}))}))},this.idSchema=e.idSchema,this.activityHttps=new a.default(e),this.activityService=new c.default(e)}},1517:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2820);t.default=function(){this.id=null,this.profileId=null,this.property=null,this.value=null,this.action=null,this.context=new r.default,this.points=0}},2195:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){this.page=null,this.limit=null,this.page=e.page?e.page:null,this.limit=e.limit?e.limit:null}},629:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this,t)||this;return n.action=null,n.action=t.action?t.action:null,n}return i(t,e),t.prototype.constructFilterUrl=function(){var e="";return this.action&&(e+="&",e+="action="+this.action),this.page&&(e+="&",e+="page="+this.page),this.limit&&(e+="&",e+="limit="+this.limit),e},t}(n(2195).default);t.default=s},8636:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this,t)||this;return n.action=null,n.action=t.action?t.action:null,n}return i(t,e),t.prototype.constructFilterUrl=function(){var e="";return this.action&&(e+="&",e+="action="+this.action),this.page&&(e+="&",e+="page="+this.page),this.limit&&(e+="&",e+="limit="+this.limit),e},t}(n(2195).default);t.default=s},6021:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3569),i=n(1517);t.default=function(){this.meta=new r.default,this.data=[new i.default]}},2820:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.content=null,this.tags=[],this.campaign=null}},4630:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2820);t.default=function(e,t,n,i){this.action=null,this.context=new r.default,this.action=e,this.context.tags=t,n&&(this.context.content=n),i&&(this.context.campaign=i)}},2453:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(7974),s=n(1316),a=n(9826),o=n(1517),u=n(6021);t.default=function(){var e=this;this.remapSingleResponse=function(e){var t=new o.default;return t.id=e.id,t.profileId=e.profile_id,t.property=e.property,t.value=e.value,t.action=e.action,t.context.content=e.context.content,t.context.tags=e.context.tags,t.context.campaign=e.context.campaign,t.points=e.points,t},this.remapActivitiesResponse=function(t){var n=new u.default;return n.meta.pagination.currentPage=t.meta.pagination.current_page,n.meta.pagination.itemsPerPage=t.meta.pagination.items_per_page,n.meta.pagination.numberOfPages=t.meta.pagination.number_of_pages,n.meta.pagination.totalItems=t.meta.pagination.total_items,n.data=t.data.map((function(t){return e.remapSingleResponse(t)})),n},this.remapStatsReponse=function(t){var n=new s.default;return n.profileId=t.profile_id,n.tier=t.tier,n.points=t.points,n.successRates.overallPercent=t.success_rates.overall_percent,n.successRates.byFootballCompetition=e.constructNewRecord(t.success_rates.by_competition),n.successRates.byFootballTeam=e.constructNewRecord(t.success_rates.by_team),n.successRates.byFootballMarket=e.constructNewRecord(t.success_rates.by_market),n},this.constructNewRecord=function(t){var n;return Object.entries(t).length?(Object.entries(t).forEach((function(t){var s,a=t[0],o=t[1];n=r(r({},n),((s={})[a]=e.remapSuccessRatePercent(o),s)),i.MarketEnum[a]&&delete n[a].model})),n):t},this.remapSuccessRatePercent=function(e){var t=new a.default;return t.successRatePercent=e.success_rate_percent,t}}},8261:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8900);t.default=function(e){var t=this;this.remapTagsIds=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r,a,o,u,c,l,d,h,p;return i(this,(function(i){switch(i.label){case 0:return e&&e.length?(t={},r={},a=[],e.forEach((function(e){t.hasOwnProperty(e.type)||(t[e.type]=[],r[e.type]=[]),t[e.type].push(e.id),r[e.type].push(e)})),[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,n,s)]):[2,e];case 1:for(o=i.sent(),u=function(e,t){t.forEach((function(t,n){t.id=o[e][n],a.push(t)}))},c=0,l=Object.entries(r);c<l.length;c++)d=l[c],h=d[0],p=d[1],u(h,p);return[2,a]}}))}))},this.idSchema=e.idSchema,this.idMapping=new s.default(e)}},7e3:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2754);t.default=function(e,t,n){var a=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCompetitionsIdMapping=function(e,t){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,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+e.countryId],"country","native")]:[3,2]:[3,5];case 1:0===(r=i.sent()).country.length&&(n=!0),e.countryId=r.country[0],i.label=2;case 2:return e.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(e.competitionIds,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),e.competitionIds=a.competition,i.label=4;case 4:if(n)return[2,[]];i.label=5;case 5:return[4,this.getCompetitions(e,t)];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(e){return r(a,void 0,void 0,(function(){var t,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return t=new Map,n=e.length,r=new s.default({competitionIds:e,limit:n}),[4,this.getCompetitions(r)];case 1:return(a=i.sent()).sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(a,"competition")];case 2:return o=i.sent(),e.forEach((function(e,n){return t.set(e,o[n])})),[2,t]}}))}))},this.getCompetitions=function(e,t){return r(a,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:if(n=null,t=t||!1,!this.isBrowser)return[3,6];if(this.localStorage.getCompetitionsLength())return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.https.getCompetitions()];case 2:return n=i.sent(),[3,4];case 3:throw r=i.sent(),console.warn("There was a problem retrieving all competitions",r),r;case 4:this.localStorage.setCompetitions(n),i.label=5;case 5:return[2,this.localStorage.getCompetitions(e)];case 6:return[2,this.https.getCompetitions(e,t)]}}))}))},this.getCompetitionByIdIdMapping=function(e,t){return r(a,void 0,void 0,(function(){var n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"competition","native")];case 1:return n=i.sent(),r=n.competition[0],[4,this.getCompetitionById(r,t)];case 2:return s=i.sent(),[4,this.idMapping.remapEntities(s,"competition")];case 3:return[2,i.sent()];case 4:throw a=i.sent(),console.warn("There was a problem browsing the following competition:"+e,a),a;case 5:return[2]}}))}))},this.getCompetitionById=function(e,t){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]),t=t||!1,[4,this.https.getCompetitionById(e,t)];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: "+e,n),n;case 3:return[2]}}))}))},this.getTopCompetitionsIdMapping=function(e){return r(a,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopCompetitions(e)];case 1:return t=r.sent(),[4,this.idMapping.remapEntities(t,"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(e){return r(a,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTopCompetitions(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the top competitions",t),t;case 3:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.idMapping=n,this.https=t}},8350:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t,i){var s=this;this.isBrowser=!1,this.localStorage={},this.https=null,this.idMapping=null,this.getCountriesWithIdMapping=function(e){return n(s,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.getCountries(e)];case 1:return t=r.sent(),[2,this.idMapping.remapEntities(t,"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(e){return n(s,void 0,void 0,(function(){var t,n,i;return r(this,(function(r){switch(r.label){case 0:return e=e||!1,this.isBrowser?(t=this.localStorage.getFootballCountries())&&t.length>0?[2,t]:[3,1]:[3,5];case 1:return r.trys.push([1,3,,4]),[4,this.https.getCountries(e)];case 2:return n=r.sent(),this.localStorage.setFootballCountries(n),[2,n];case 3:throw i=r.sent(),console.warn("There was a problem retrieving countries as football entities",i),i;case 4:return[3,6];case 5:return[2,this.https.getCountries(e)];case 6:return[2]}}))}))},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.idMapping=i,this.https=t}},4289:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8350),a=n(7e3),o=n(9693),u=n(4272),c=n(4545),l=n(2140);t.default=function(e,t,n,d){var h=this;this.countriesFacade=null,this.competitionsFacade=null,this.teamsFacade=null,this.playerFacade=null,this.matchFacade=null,this.searchFacade=null,this.getCountries=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.countriesFacade.getCountriesWithIdMapping(e)]}))}))},this.getCompetitions=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionsIdMapping(e,t)]}))}))},this.getCompetitionById=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.competitionsFacade.getCompetitionByIdIdMapping(e,t)]}))}))},this.getTopCompetitions=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.competitionsFacade.getTopCompetitionsIdMapping(e)]}))}))},this.getCompetitionsMapWithNativeIds=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.competitionsFacade.getCompetitionsMapWithNativeIds(e)];case 1:return[2,t.sent()]}}))}))},this.getTeams=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamsIdMapping(e,t)]}))}))},this.getTeamById=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getTeamByIdIdMapping(e,t)]}))}))},this.getTopTeams=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.teamsFacade.getTopTeamsIdMapping(e)]}))}))},this.getNextMatchForTeam=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getNextMatchForTeamIdMapping(e,t)]}))}))},this.getPrevMatchForTeam=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.teamsFacade.getPrevMatchForTeamIdMapping(e,t)]}))}))},this.getTeamsMapWithNativeIds=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.teamsFacade.getTeamsMapWithNativeIds(e)];case 1:return[2,t.sent()]}}))}))},this.getPlayers=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayersIdMapping(e,t)]}))}))},this.getPlayerById=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPlayerIdMapping(e,t)]}))}))},this.getTopPlayers=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getTopPlayersIdMapping(e)]}))}))},this.getNextMatchForPlayer=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getNextMatchForPlayerIdMapping(e,t)]}))}))},this.getPrevMatchForPlayer=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.playerFacade.getPrevMatchForPlayerIdMapping(e,t)]}))}))},this.getPlayersMapWithNativeIds=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){return[2,this.playerFacade.getPlayersMapWithNativeIds(e)]}))}))},this.getMatches=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchesIdMapping(e,t)]}))}))},this.getMatchById=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.matchFacade.getMatchIdMapping(e,t)]}))}))},this.search=function(e,t){return r(h,void 0,void 0,(function(){return i(this,(function(n){return[2,this.searchFacade.searchIdMapping(e,t)]}))}))},this.countriesFacade=new s.default(t,n,d),this.competitionsFacade=new a.default(t,n,d),this.teamsFacade=new o.default(e,n,d),this.playerFacade=new u.default(e,n,d),this.matchFacade=new c.default(e,n,d),this.searchFacade=new l.default(n,d)}},4545:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var a=n(712),o=n(6134),u=n(9582);t.default=function(e,t,n){var c=this;this.https=null,this.idMapping=null,this.footballService=null,this.getMatchesIdMapping=function(e,t){return r(c,void 0,void 0,(function(){var n,r,a,u,c,l,d,h;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,12,,13]),e?(e=new o.default(e)).countryIds?[4,this.idMapping.getEntityIdsBySchemaId(e.countryIds,"country","native")]:[3,2]:[3,8];case 1:n=i.sent(),e.countryIds=n.country,i.label=2;case 2:return e.competitionIds?[4,this.idMapping.getEntityIdsBySchemaId(e.competitionIds,"competition","native")]:[3,4];case 3:r=i.sent(),e.competitionIds=r.competition,i.label=4;case 4:return e.matchIds?[4,this.idMapping.getEntityIdsBySchemaId(e.matchIds,"match","native")]:[3,6];case 5:a=i.sent(),e.matchIds=a.match,i.label=6;case 6:return e.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(e.teamIds,"team","native")]:[3,8];case 7:u=i.sent(),e.teamIds=u.team,i.label=8;case 8:return[4,this.getMatches(e,t)];case 9:return c=i.sent(),l=c,[4,this.footballService.setAvailableMarketsForMatch(s([],c.data,!0))];case 10:return l.data=i.sent(),d=c,[4,this.idMapping.remapEntities(c.data,"match")];case 11:return d.data=i.sent(),[2,c];case 12:throw h=i.sent(),console.warn("There was a problem browsing the matches",h),h;case 13:return[2]}}))}))},this.getMatchesWithNativeIds=function(e){return r(c,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=e.length,n=new o.default({matchIds:e,limit:t}),[4,this.getMatches(n)];case 1:return(r=i.sent()).data.sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(r.data,"match")];case 2:return[2,i.sent()]}}))}))},this.getMatchesMapWithNativeIds=function(e){return r(c,void 0,void 0,(function(){var t,n,r,s,u,c;return i(this,(function(i){switch(i.label){case 0:return t={},(n=(0,a.transformIdsToBeUnique)(e)).sort((function(e,t){return e.localeCompare(t)})),[4,this.getMatchesWithNativeIds(n)];case 1:return r=i.sent(),n.length===r.length?[3,3]:(s=new o.default({matchIds:n,limit:n.length}),[4,this.getMatches(s)]);case 2:u=i.sent(),c=n.filter((function(e){if(u.data.every((function(t){return t.id!==e})))return e})),n=n.filter((function(e){if(!c.includes(e))return e})),i.label=3;case 3:return n.forEach((function(e,n){return t[e]=r[n]})),[2,t]}}))}))},this.getMatches=function(e,t){return r(c,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getMatches(e,t)];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(e,t){return r(c,void 0,void 0,(function(){var n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,5,,6]),[4,this.idMapping.getEntityIdsBySchemaId([e],"match","native")];case 1:return n=i.sent(),[4,this.getMatchById(n.match[0],t)];case 2:return r=i.sent(),[4,this.footballService.setAvailableMarketsForMatch(r)];case 3:return s=i.sent(),[4,this.idMapping.remapEntities(s,"match")];case 4:return[2,i.sent()];case 5:throw a=i.sent(),console.warn("There was a problem browsing the following match: "+e,a),a;case 6:return[2]}}))}))},this.getMatchById=function(e,t){return r(c,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getMatchById(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following match: "+e,n),n;case 3:return[2]}}))}))},this.https=t,this.idMapping=n,this.footballService=new u.default(e)}},4272:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(6477),a=n(712),o=n(9582);t.default=function(e,t,n){var u=this;this.https=null,this.footballService=null,this.idMapping=null,this.getPlayersIdMapping=function(e,t){return r(u,void 0,void 0,(function(){var n,r,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),n=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([e.countryId],"country","native")]:[3,2]:[3,7];case 1:0===(r=i.sent()).country.length&&(n=!0),e.countryId=r.country[0],i.label=2;case 2:return e.playerIds?[4,this.idMapping.getEntityIdsBySchemaId(e.playerIds,"player","native")]:[3,4];case 3:0===(a=i.sent()).player.length&&(n=!0),e.playerIds=a.player,i.label=4;case 4:return e.scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,6];case 5:0===(o=i.sent()).competition.length&&(n=!0),e.scope=o.competition,i.label=6;case 6:if(n)return[2,[]];i.label=7;case 7:return[4,this.getPlayers(e,t)];case 8:return u=i.sent(),c=u,[4,this.idMapping.remapEntities(u.data,"player")];case 9:return c.data=i.sent(),[2,u];case 10:throw l=i.sent(),console.warn("There was a problem browsing the players",l),l;case 11:return[2]}}))}))},this.getPlayersWithNativeIds=function(e){return r(u,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=e.length,n=new s.default({playerIds:e,limit:t}),[4,this.getPlayers(n)];case 1:return(r=i.sent()).data.sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(r.data,"player")];case 2:return[2,i.sent()]}}))}))},this.getPlayersMapWithNativeIds=function(e){return r(u,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t={},(n=(0,a.transformIdsToBeUnique)(e)).sort((function(e,t){return e.localeCompare(t)})),[4,this.getPlayersWithNativeIds(n)];case 1:return r=i.sent(),n.forEach((function(e,n){return t[e]=r[n]})),[2,t]}}))}))},this.getPlayers=function(e,t){return r(u,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getPlayers(e,t)];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(e,t){return r(u,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"player","native")];case 1:return n=i.sent(),[4,this.getPlayerById(n.player[0],t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"player")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following player:"+e,s),s;case 5:return[2]}}))}))},this.getPlayerById=function(e,t){return r(u,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getPlayerById(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following player: "+e,n),n;case 3:return[2]}}))}))},this.getTopPlayersIdMapping=function(e){return r(u,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopPlayers(e)];case 1:return t=r.sent(),[4,this.idMapping.remapEntities(t,"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(e){return r(u,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTopPlayers(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the top players",t),t;case 3:return[2]}}))}))},this.getNextMatchForPlayerIdMapping=function(e,t){return r(u,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"player","native")];case 1:return n=i.sent(),e=n.player[0],[4,this.getNextMatchForPlayer(e,t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the next match for player:"+e,s),s;case 5:return[2]}}))}))},this.getNextMatchForPlayer=function(e,t){return r(u,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]),t=t||!1,[4,this.https.getNextMatchForPlayer(e,t)];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: "+e,r),r;case 4:return[2]}}))}))},this.getPrevMatchForPlayerIdMapping=function(e,t){return r(u,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"player","native")];case 1:return n=i.sent(),e=n.player[0],[4,this.getPrevMatchForPlayer(e,t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the previous match for player:"+e,s),s;case 5:return[2]}}))}))},this.getPrevMatchForPlayer=function(e,t){return r(u,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]),t=t||!1,[4,this.https.getPrevMatchForPlayer(e,t)];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: "+e,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=t,this.footballService=new o.default(e)}},2140:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(604);t.default=function(e,t){var n=this;this.https=null,this.idMapping=null,this.searchIdMapping=function(e,t){return r(n,void 0,void 0,(function(){var n,r,a,o,u,c;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,10,,11]),(e=new s.default(e)).scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,2];case 1:n=i.sent(),e.scope=n.competition,i.label=2;case 2:return[4,this.search(e,t)];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 c=i.sent(),console.warn("There was a problem with browsing the search result",c),c;case 11:return[2]}}))}))},this.search=function(e,t){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(e,t)];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=e,this.idMapping=t}},9693:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9920),a=n(9582);t.default=function(e,t,n){var o=this;this.footballService=null,this.https=null,this.idMapping=null,this.getTeamsIdMapping=function(e,t){return r(o,void 0,void 0,(function(){var n,r,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,9,,10]),n=!1,e?(e=new s.default(e)).countryId?[4,this.idMapping.getEntityIdsBySchemaId([""+e.countryId],"country","native")]:[3,2]:[3,6];case 1:0===(r=i.sent()).country.length&&(n=!0),e.countryId=r.country[0],i.label=2;case 2:return e.scope?[4,this.idMapping.getEntityIdsBySchemaId(e.scope,"competition","native")]:[3,4];case 3:0===(a=i.sent()).competition.length&&(n=!0),e.scope=a.competition,i.label=4;case 4:return e.teamIds?[4,this.idMapping.getEntityIdsBySchemaId(e.teamIds,"team","native")]:[3,6];case 5:0===(o=i.sent()).team.length&&(n=!0),e.teamIds=o.team,i.label=6;case 6:return n?[2,[]]:[4,this.getTeams(e,t)];case 7:return u=i.sent(),c=u,[4,this.idMapping.remapEntities(u.data,"team")];case 8:return c.data=i.sent(),[2,u];case 9:throw l=i.sent(),console.warn("There was a problem browsing all teams",l),l;case 10:return[2]}}))}))},this.getTeamsMapWithNativeIds=function(e){return r(o,void 0,void 0,(function(){var t,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return t=new Map,n=e.length,r=new s.default({teamIds:e,limit:n}),[4,this.getTeams(r)];case 1:return(a=i.sent().data).sort((function(e,t){return e.id.localeCompare(t.id)})),[4,this.idMapping.remapEntities(a,"team")];case 2:return o=i.sent(),e.forEach((function(e,n){return t.set(e,o[n])})),[2,t]}}))}))},this.getTeams=function(e,t){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTeams(e,t)];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(e,t){return r(o,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"team","native")];case 1:return n=i.sent(),e=n.team[0],[4,this.getTeamById(e,t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"team")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the following team:"+e,s),s;case 5:return[2]}}))}))},this.getTeamById=function(e,t){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.https.getTeamById(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the following team: "+e,n),n;case 3:return[2]}}))}))},this.getTopTeamsIdMapping=function(e){return r(o,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),[4,this.getTopTeams(e)];case 1:return t=r.sent(),[4,this.idMapping.remapEntities(t,"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(e){return r(o,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),e=e||!1,[4,this.https.getTopTeams(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the top teams",t),t;case 3:return[2]}}))}))},this.getNextMatchForTeamIdMapping=function(e,t){return r(o,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"team","native")];case 1:return n=i.sent(),e=n.team[0],[4,this.getNextMatchForTeam(e,t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the next match for the following team:"+e,s),s;case 5:return[2]}}))}))},this.getNextMatchForTeam=function(e,t){return r(o,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]),t=t||!1,[4,this.https.getNextMatchForTeam(e,t)];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: "+e,r),r;case 4:return[2]}}))}))},this.getPrevMatchForTeamIdMapping=function(e,t){return r(o,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),[4,this.idMapping.getEntityIdsBySchemaId([e],"team","native")];case 1:return n=i.sent(),e=n.team[0],[4,this.getPrevMatchForTeam(e,t)];case 2:return r=i.sent(),[4,this.idMapping.remapEntities(r,"match")];case 3:return[2,i.sent()];case 4:throw s=i.sent(),console.warn("There was a problem browsing the previous match for the following team:"+e,s),s;case 5:return[2]}}))}))},this.getPrevMatchForTeam=function(e,t){return r(o,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]),t=t||!1,[4,this.https.getPrevMatchForTeam(e,t)];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: "+e,r),r;case 4:return[2]}}))}))},this.idMapping=n,this.https=t,this.footballService=new a.default(e)}},8808:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8900),a=n(5601),o=n(595),u=n(4289);t.default=function(e){var t=this;this.https=null,this.idMapping=null,this.localStorage=null,this.footballFacade=null,this.getCountries=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getCountries(e)];case 1:return[2,t.sent()]}}))}))},this.getCompetitions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getCompetitions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getCompetitionById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getCompetitionById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getTopCompetitions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTopCompetitions(e)];case 1:return[2,t.sent()]}}))}))},this.getTeams=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTeams(e,n)];case 1:return[2,t.sent()]}}))}))},this.getTeamById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTeamById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getTopTeams=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTopTeams(e)];case 1:return[2,t.sent()]}}))}))},this.getNextMatchForTeam=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getNextMatchForTeam(e,n)];case 1:return[2,t.sent()]}}))}))},this.getPrevMatchForTeam=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPrevMatchForTeam(e,n)];case 1:return[2,t.sent()]}}))}))},this.getPlayers=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPlayers(e,n)];case 1:return[2,t.sent()]}}))}))},this.getPlayerById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPlayerById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getTopPlayers=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getTopPlayers(e)];case 1:return[2,t.sent()]}}))}))},this.getNextMatchForPlayer=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getNextMatchForPlayer(e,n)];case 1:return[2,t.sent()]}}))}))},this.getPrevMatchForPlayer=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getPrevMatchForPlayer(e,n)];case 1:return[2,t.sent()]}}))}))},this.getMatches=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getMatches(e,n)];case 1:return[2,t.sent()]}}))}))},this.getMatchById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.getMatchById(e,n)];case 1:return[2,t.sent()]}}))}))},this.search=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.footballFacade.search(e,n)];case 1:return[2,t.sent()]}}))}))},this.https=new o.default(e),this.idMapping=new s.default(e),this.localStorage=new a.default(e),this.footballFacade=new u.default(e,this.localStorage,this.https,this.idMapping)}},6975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name=""}},2754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=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 e="";return t.countryId&&(e=(e+="&")+"country_id="+t.countryId),t.gender&&(e=(e+="&")+"gender="+t.gender),t.type&&(e=(e+="&")+"type="+t.type),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),t.name&&(e=(e+="&")+"name="+t.name),t.competitionIds&&(e=(e+="&")+"competition_ids="+t.competitionIds.join(",")),e},this.competitionSearchFilter=function(e){try{var n=t.filter(e);return t.sortField||t.sortOrder?t.sort(n):n}catch(e){return console.warn("There was a problem filtering the local competitions",e),[]}},this.filter=function(e){var n=t.entitiesToSearchWith();return e.filter((function(e){var r=!0;return n.forEach((function(n){"sortOrder"!==n&&"sortField"!==n&&("countryId"===n?r&&(r=e.country.id===t[n]):"name"===n?r&&(r=e.name.toLocaleLowerCase().includes(t[n].toLocaleLowerCase())):"competitionIds"===n?r&&(r=t[n].some((function(t){return e.id===t}))):r&&(r=e[n].toLocaleLowerCase()===t[n].toLocaleLowerCase()))})),r}))},this.entitiesToSearchWith=function(){var e=[];return t.countryId&&e.push("countryId"),t.name&&e.push("name"),t.gender&&e.push("gender"),t.type&&e.push("type"),t.sortField&&e.push("sortField"),t.sortOrder&&e.push("sortOrder"),t.competitionIds&&e.push("competitionIds"),e},this.sort=function(e){var n=[];return"name"===t.sortField?n=e.sort((function(e,n){return t.sortOrder&&"desc"===t.sortOrder?n.name.localeCompare(e.name):e.name.localeCompare(n.name)})):"country"===t.sortField?n=e.sort((function(e,n){return t.sortOrder&&"desc"===t.sortOrder?n.country.name.localeCompare(e.country.name):e.country.name.localeCompare(n.country.name)})):"scope"===t.sortField?e.forEach((function(e){return n[t.competitionIds.indexOf(e.id)]=e})):t.sortField||"desc"!==t.sortOrder||(n=e.sort((function(e,t){return t.id.localeCompare(e.id)}))),n},this.countryId=e.countryId?""+e.countryId:null,this.name=e.name?e.name:null,this.gender=e.gender?e.gender:null,this.type=e.type?e.type:null,this.sortField=e.sortField?""+e.sortField:null,this.sortOrder=e.sortOrder?""+e.sortOrder:null,this.competitionIds=e.competitionIds?e.competitionIds:null}},3321:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.type="",this.name="",this.participants=[]}},7316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6975),i=n(3430),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new i.default}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.id=e.id,t.country=this.countryRemapper.countryFromResponse(e.country),t.gender=e.gender,t.assets=e.assets,t.type=e.type,t.name=e.name,t}catch(e){throw console.warn("There was a problem remapping the competition response",e),e}},e}();t.default=s},8758:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3321),i=n(3430),s=n(5827),a=function(){function e(){this.countryRemapper=null,this.teamBasicRemapper=null,this.countryRemapper=new i.default,this.teamBasicRemapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new r.default;return n.id=e.id,n.country=this.countryRemapper.countryFromResponse(e.country),n.gender=e.gender,n.assets=e.assets,n.type=e.type,n.name=e.name,n.participants=e.participants.map((function(e){return t.teamBasicRemapper.fromResponse(e)})),n}catch(e){throw console.warn("There was a problem remapping the competition response",e),e}},e}();t.default=a},4427:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.alias="",this.countryCode="",this.assets=null,this.name=""}},3430:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4427);t.default=function(){var e=this;this.countriesFromResponse=function(t){if(t)return t.map((function(t){return e.countryFromResponse(t)}))},this.countryFromResponse=function(e){try{if(e){var t=new r.default;return t.id=e.id,t.alias=e.alias,t.assets=e.assets,t.countryCode=e.country_code,t.name=e.name,t}}catch(e){throw e}return null}}},8470:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.homeTeam={players:[]},this.awayTeam={players:[]}}},3098:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8470),i=n(3550),s=function(){function e(){this.playerRemapper=null,this.playerRemapper=new i.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new r.default;return n.homeTeam.players=e.home_team&&e.home_team.players?e.home_team.players.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n.awayTeam.players=e.away_team&&e.away_team.players?e.away_team.players.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping the lineups",e),e}},e}();t.default=s},2579:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.homeTeam=null,this.awayTeam=null,this.isDeleted=!1,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.context={competition:null},this.status={type:null,subType:null}}},6134:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=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(){var e="";return t.countryIds&&(e=(e+="&")+"countries="+t.countryIds.join(",")),t.competitionIds&&(e=(e+="&")+"competitions="+t.competitionIds.join(",")),t.matchIds&&(e=(e+="&")+"matches="+t.matchIds.join(",")),t.status&&(e=(e+="&")+"status="+t.status),t.teamIds&&(e=(e+="&")+"teams="+t.teamIds.join(",")),t.fromDate&&(e=(e+="&")+"from_date="+t.fromDate),t.toDate&&(e=(e+="&")+"to_date="+t.toDate),t.limit&&(e=(e+="&")+"limit="+t.limit),t.page&&(e=(e+="&")+"page="+t.page),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),e},this.countryIds=e.countryIds?e.countryIds:null,this.competitionIds=e.competitionIds?e.competitionIds:null,this.matchIds=e.matchIds?e.matchIds:null,this.status=e.status?e.status:null,this.teamIds=e.teamIds?e.teamIds:null,this.fromDate=e.fromDate?e.fromDate:null,this.toDate=e.toDate?e.toDate:null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null,this.sortField=e.sortField?e.sortField:null,this.sortOrder=e.sortOrder?e.sortOrder:null}},9661:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6899);t.default=function(){this.id="",this.kickoffAt="",this.finishedAt="",this.updatedAt="",this.availableMarkets=null,this.isDeleted=!1,this.homeTeam=null,this.awayTeam=null,this.lineupsConfirmed=!1,this.startedAt="",this.minute="",this.scores=null,this.stats=null,this.context={competition:null},this.timeline=[],this.status=new r.default,this.lineups=null}},5284:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2579),i=n(5827),s=n(7316),a=n(3949),o=function(){function e(){this.teamRemapper=null,this.competitionRemapper=null,this.scoresRemapper=null,this.teamRemapper=new i.default,this.competitionRemapper=new s.default,this.scoresRemapper=new a.default}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.id=e.id,t.kickoffAt=e.kickoff_at,t.finishedAt=e.finished_at,t.updatedAt=e.updated_at,t.isDeleted=e.is_deleted,t.homeTeam=this.teamRemapper.fromResponse(e.home_team),t.awayTeam=this.teamRemapper.fromResponse(e.away_team),t.lineupsConfirmed=e.lineups_confirmed,t.startedAt=e.started_at,t.minute=e.minute,t.scores=this.scoresRemapper.fromResponse(e.scores),t.context={competition:e.context.competition?this.competitionRemapper.fromResponse(e.context.competition):null},t.status={type:e.status.type,subType:e.status.sub_type},t}catch(e){throw console.warn("There was a problem remapping the match response",e),e}},e}();t.default=o},9330:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9661),i=n(5827),s=n(7316),a=n(7122),o=n(3949),u=n(3098),c=n(8470),l=n(92),d=function(){function e(){this.teamMapper=null,this.competitionsMapper=null,this.lineupsMapper=null,this.scoresMapper=null,this.statsMapper=null,this.timelineMapper=null,this.teamMapper=new i.default,this.competitionsMapper=new s.default,this.lineupsMapper=new u.default,this.scoresMapper=new o.default,this.statsMapper=new a.default,this.timelineMapper=new l.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new r.default;return n.id=e.id,n.kickoffAt=e.kickoff_at,n.finishedAt=e.finished_at,n.updatedAt=e.updated_at,n.isDeleted=e.is_deleted,n.homeTeam=e.home_team?this.teamMapper.fromResponse(e.home_team):null,n.awayTeam=e.away_team?this.teamMapper.fromResponse(e.away_team):null,n.lineupsConfirmed=e.lineups_confirmed,n.startedAt=e.started_at,n.minute=e.minute,n.scores=this.scoresMapper.fromResponse(e.scores),n.stats=this.statsMapper.fromResponse(e.stats),n.context={competition:this.competitionsMapper.fromResponse(e.context.competition)},n.timeline=e.timeline?e.timeline.map((function(e){return t.timelineMapper.fromResponse(e)})):[],n.status={type:e.status.type,subType:e.status.sub_type},n.lineups=e.lineups?this.lineupsMapper.fromResponse(e.lineups):new c.default,n}catch(e){throw console.warn("There was a problem remapping the match response",e),e}},e}();t.default=d},4652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.ftScore=null,this.htScore=null,this.aetScore=null,this.aggScore=null,this.penScore=null}},3949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4652),i=function(){function e(){this.statEntityFromResponse=function(e){return{homeGoals:e.home_goals,awayGoals:e.away_goals}}}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.ftScore=this.statEntityFromResponse(e.ft_score),t.htScore=this.statEntityFromResponse(e.ht_score),t.aetScore=this.statEntityFromResponse(e.aet_score),t.aggScore=this.statEntityFromResponse(e.agg_score),t.penScore=this.statEntityFromResponse(e.pen_score),t}catch(e){throw console.warn("There was a problem remapping the scores",e),e}},e}();t.default=i},7950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.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:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7950),i=function(){function e(){this.statEntityFromResponse=function(e){return{homeTeam:e?e.home_team:null,awayTeam:e?e.away_team:null}}}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.corners=this.statEntityFromResponse(e.corners),t.cornersFirstHalf=this.statEntityFromResponse(e.corners_1h),t.cornersSecondHalf=this.statEntityFromResponse(e.corners_2h),t.cornersExtraTime=this.statEntityFromResponse(e.corners_et),t.crosses=this.statEntityFromResponse(e.crosses),t.crossesFirstHalf=this.statEntityFromResponse(e.crosses_1h),t.crossesSecondHalf=this.statEntityFromResponse(e.crosses_2h),t.crossesExtraTime=this.statEntityFromResponse(e.crosses_et),t.offside=this.statEntityFromResponse(e.offside),t.offsideFirstHalf=this.statEntityFromResponse(e.offside_1h),t.offsideSecondHalf=this.statEntityFromResponse(e.offside_2h),t.offsideExtraTime=this.statEntityFromResponse(e.offside_et),t.shotsOn=this.statEntityFromResponse(e.shots_on),t.shotsOnFirstHalf=this.statEntityFromResponse(e.shots_on_1h),t.shotsOnSecondHalf=this.statEntityFromResponse(e.shots_on_2h),t.shotsOnExtraTime=this.statEntityFromResponse(e.shots_on_et),t.throwIn=this.statEntityFromResponse(e.throw_in),t.throwInFirstHalf=this.statEntityFromResponse(e.throw_in_1h),t.throwInSecondHalf=this.statEntityFromResponse(e.throw_in_2h),t.throwInExtraTime=this.statEntityFromResponse(e.throw_in_et),t.redCards=this.statEntityFromResponse(e.red_cards),t.redCardsFirstHalf=this.statEntityFromResponse(e.red_cards_1h),t.redCardsSecondHalf=this.statEntityFromResponse(e.red_cards_2h),t.redCardsExtraTime=this.statEntityFromResponse(e.red_cards_et),t.shotsOff=this.statEntityFromResponse(e.shots_off),t.shotsOffFirstHalf=this.statEntityFromResponse(e.shots_off_1h),t.shotsOffSecondHalf=this.statEntityFromResponse(e.shots_off_2h),t.shotsOffExtraTime=this.statEntityFromResponse(e.shots_off_et),t.goalKicks=this.statEntityFromResponse(e.goal_kicks),t.goalKicksFirstHalf=this.statEntityFromResponse(e.goal_kicks_1h),t.goalKicksSecondHalf=this.statEntityFromResponse(e.goal_kicks_2h),t.goalKicksExtraTime=this.statEntityFromResponse(e.goal_kicks_et),t.possession=this.statEntityFromResponse(e.possession),t.possessionFirstHalf=this.statEntityFromResponse(e.possession_1h),t.possessionSecondHalf=this.statEntityFromResponse(e.possession_2h),t.possessionExtraTime=this.statEntityFromResponse(e.possession_et),t.treatments=this.statEntityFromResponse(e.treatments),t.treatmentsFirstHalf=this.statEntityFromResponse(e.treatments_1h),t.treatmentsSecondHalf=this.statEntityFromResponse(e.treatments_2h),t.treatmentsExtraTime=this.statEntityFromResponse(e.treatments_et),t.yellowCards=this.statEntityFromResponse(e.yellow_cards),t.yellowCardsFirstHalf=this.statEntityFromResponse(e.yellow_cards_1h),t.yellowCardsSecondHalf=this.statEntityFromResponse(e.yellow_cards_2h),t.yellowCardsExtraTime=this.statEntityFromResponse(e.yellow_cards_et),t.shotsBlocked=this.statEntityFromResponse(e.shots_blocked),t.shotsBlockedFirstHalf=this.statEntityFromResponse(e.shots_blocked_1h),t.shotsBlockedSecondHalf=this.statEntityFromResponse(e.shots_blocked_2h),t.shotsBlockedExtraTime=this.statEntityFromResponse(e.shots_blocked_et),t.substitutions=this.statEntityFromResponse(e.substitutions),t.substitutionsFirstHalf=this.statEntityFromResponse(e.substitutions_1h),t.substitutionsSecondHalf=this.statEntityFromResponse(e.substitutions_2h),t.substitutionsExtraTime=this.statEntityFromResponse(e.substitutions_et),t.counterAttacks=this.statEntityFromResponse(e.counter_attacks),t.counterAttacksFirstHalf=this.statEntityFromResponse(e.counter_attacks_1h),t.counterAttacksSecondHalf=this.statEntityFromResponse(e.counter_attacks_2h),t.counterAttacksExtraTime=this.statEntityFromResponse(e.counter_attacks_et),t.foulsCommitted=this.statEntityFromResponse(e.fouls_committed),t.foulsCommittedFirstHalf=this.statEntityFromResponse(e.fouls_committed_1h),t.foulsCommittedSecondHalf=this.statEntityFromResponse(e.fouls_committed_2h),t.foulsCommittedExtraTime=this.statEntityFromResponse(e.fouls_committed_et),t}catch(e){throw console.warn("There was a problem remapping the stats",e),e}},e}();t.default=i},6899:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.type=null,this.subType=null}},9452:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.minute="",this.type="",this.teamId="",this.player=null,this.relatedPlayer=null,this.updatedAt=""}},92:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9452),i=n(3550),s=function(){function e(){this.playerRemapper=null,this.playerRemapper=new i.default}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.minute=e.minute,t.type=e.type,t.teamId=e.team_id,t.player=this.playerRemapper.fromResponse(e.player),t.relatedPlayer=e.related_player?this.playerRemapper.fromResponse(e.related_player):null,t.updatedAt=e.updated_at,t}catch(e){throw console.warn("There was a problem remapping timeline",e),e}},e}();t.default=s},753:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3569);t.default=function(){this.meta=new r.default,this.data=[]}},3569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(155);t.default=function(){this.pagination=new r.default}},155:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.currentPage=null,this.itemsPerPage=null,this.totalItems=null,this.numberOfPages=null}},1925:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3569);t.default=function(){this.remapMetaProp=function(e){var t=new r.default;return t.pagination.currentPage=e.pagination.current_page,t.pagination.itemsPerPage=e.pagination.items_per_page,t.pagination.totalItems=e.pagination.total_items,t.pagination.numberOfPages=e.pagination.number_of_pages,t}}},4426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.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=[]}},6477:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=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 e="";return t.countryId&&(e=(e+="&")+"country_id="+t.countryId),t.scope&&(e=(e+="&")+"scope="+t.scope.join(",")),t.name&&(e=(e+="&")+"name="+t.name),t.playerIds&&(e=(e+="&")+"player_ids="+t.playerIds.join(",")),t.limit&&(e=(e+="&")+"limit="+t.limit),t.page&&(e=(e+="&")+"page="+t.page),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),e},this.countryId=e.countryId?e.countryId:null,this.scope=e.scope?e.scope:null,this.name=e.name?e.name:null,this.playerIds=e.playerIds?e.playerIds:null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null,this.sortField=e.sortField?e.sortField:null,this.sortOrder=e.sortOrder?e.sortOrder:null}},1837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.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=[]}},4803:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.name="",this.position="",this.assets=null,this.type=""}},9071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.startDate="",this.endDate="",this.loan=!1,this.position="",this.country=null,this.name="",this.assets=null,this.birthDate=""}},5157:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(4426),s=n(5827),a=function(){function e(){this.countryRemapper=null,this.teamRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new i.default;return n.id=e.id,n.firstName=e.first_name?e.first_name:null,n.lastName=e.last_name?e.last_name:null,n.name=e.name?e.name:null,n.birthDate=e.birth_date,n.country=this.countryRemapper.countryFromResponse(e.country),n.assets=e.assets,n.teams=e.teams?e.teams.map((function(e){return t.teamRemapper.fromResponse(e)})):[],n.position=e.position,n.isDeleted=e.is_deleted,n}catch(e){throw console.warn("There was a problem remapping players response",e),e}},e}();t.default=a},7943:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(1837),s=n(5827),a=n(7316),o=function(){function e(){this.countryRemapper=null,this.teamRemapper=null,this.competitionRemapper=null,this.countryRemapper=new r.default,this.teamRemapper=new s.default,this.competitionRemapper=new a.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new i.default;return n.id=e.id,n.firstName=e.first_name?e.first_name:null,n.lastName=e.last_name?e.last_name:null,n.name=e.name?e.name:null,n.birthDate=e.birth_date,n.country=this.countryRemapper.countryFromResponse(e.country),n.assets=e.assets,n.teams=e.teams?e.teams.map((function(e){return t.teamRemapper.fromResponse(e)})):[],n.position=e.position,n.isDeleted=e.is_deleted,n.competitions=e.competitions?e.competitions.map((function(e){return t.competitionRemapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping player response",e),e}},e}();t.default=o},3550:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4803),i=function(){function e(){}return e.prototype.fromResponse=function(e){try{var t=new r.default;return t.id=e.id,t.name=e.name,t.position=e.position,t.shirtNumber=e.shirt_number,t.assets=e.assets,t.type=e.type,t}catch(e){throw console.warn("There was a problem remapping the player from timeline",e),e}},e}();t.default=i},4085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(9071),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new r.default}return e.prototype.fromResponse=function(e){try{var t=new i.default;return t.id=e.id,t.startDate=e.start_date,t.endDate=e.end_date,t.shirtNumber=e.shirt_number,t.loan=e.loan,t.position=e.position,t.country=this.countryRemapper.countryFromResponse(e.country),t.name=e.name,t.assets=e.assets,t.birthDate=e.birth_date,t}catch(e){throw console.warn("There was a problem remapping the player from squad",e),e}},e}();t.default=s},4729:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(56),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new r.default}return e.prototype.fromResponse=function(e){try{var t=new i.default;return t.id=e.id,t.firstName=e.first_name?e.first_name:null,t.lastName=e.last_name?e.last_name:null,t.name=e.name?e.name:null,t.birthDate=e.birth_date,t.country=this.countryRemapper.countryFromResponse(e.country),t.assets=e.assets,t.position=e.position,t}catch(e){throw console.warn("There was a problem remapping top player response",e),e}},e}();t.default=s},56:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.birthDate="",this.firstName="",this.lastName="",this.name="",this.position="",this.assets=null}},604:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.entities=null,this.query=null,this.scope=null,this.constructFilterUrl=function(){var e="";return t.entities&&(e=(e+="&")+"entities="+t.entities.join(",")),t.query&&(e=(e+="&")+"q="+t.query),t.scope&&(e=(e+="&")+"scope="+t.scope.join(",")),e},this.entities=e.entities?e.entities:null,this.query=e.query?e.query:null,this.scope=e.scope?e.scope:null}},6967:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.teams=null,this.players=null,this.competitions=null}},7287:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5827),i=n(5157),s=n(7316),a=n(6967),o=function(){function e(){this.teamRemapper=null,this.playerRemapper=null,this.competitionremapper=null,this.teamRemapper=new r.default,this.playerRemapper=new i.default,this.competitionremapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new a.default;return n.teams=e.teams?e.teams.map((function(e){return t.teamRemapper.fromResponse(e)})):[],n.players=e.players?e.players.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n.competitions=e.competitions?e.competitions.map((function(e){return t.competitionremapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping search response",e),e}},e}();t.default=o},5827:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(9314),s=function(){function e(){this.countryRemapper=null,this.countryRemapper=new r.default}return e.prototype.fromResponse=function(e){try{var t=new i.default;return t.id=e.id,t.country=this.countryRemapper.countryFromResponse(e.country),t.gender=e.gender,t.assets=e.assets,t.code=e.code,t.national=e.national,t.fullName=e.full_name,t.shortName=e.short_name,t.name=e.name,t.isDeleted=e.is_deleted,t}catch(e){throw console.warn("There was a problem remapping teams response",e),e}},e}();t.default=s},7821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3430),i=n(1986),s=n(4085),a=n(7316),o=function(){function e(){this.countryRemapper=null,this.competitionRemapper=null,this.playerRemapper=null,this.countryRemapper=new r.default,this.competitionRemapper=new a.default,this.playerRemapper=new s.default}return e.prototype.fromResponse=function(e){var t=this;try{var n=new i.default;return n.id=e.id,n.country=this.countryRemapper.countryFromResponse(e.country),n.gender=e.gender,n.assets=e.assets,n.code=e.code,n.national=e.national,n.fullName=e.full_name,n.shortName=e.short_name,n.name=e.name,n.isDeleted=e.is_deleted,n.competitions=e.competitions?e.competitions.map((function(e){return t.competitionRemapper.fromResponse(e)})):[],n.colors=e.colors?e.colors:n.colors,n.squad=e.squad?e.squad.map((function(e){return t.playerRemapper.fromResponse(e)})):[],n}catch(e){throw console.warn("There was a problem remapping team response",e),e}},e}();t.default=o},9314:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id="",this.country=null,this.gender="",this.assets=null,this.name="",this.code="",this.national=!1,this.fullName="",this.shortName="",this.isDeleted=!1}},3773:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.primary=null,this.secondary=null,this.tertiary=null}},9920:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=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 e="";return t.name&&(e=(e+="&")+"name="+t.name),t.countryId&&(e=(e+="&")+"country_id="+t.countryId),t.national&&(e=(e+="&")+"national="+t.national),t.gender&&(e=(e+="&")+"gender="+t.gender),t.limit&&(e=(e+="&")+"limit="+t.limit),t.scope&&(e=(e+="&")+"scope="+t.scope.join(",")),t.page&&(e=(e+="&")+"page="+t.page),t.sortField&&(e=(e+="&")+"sort_field="+t.sortField),t.sortOrder&&(e=(e+="&")+"sort_order="+t.sortOrder),t.teamIds&&(e=(e+="&")+"team_ids="+t.teamIds.join(",")),e},this.name=e.name?e.name:null,this.countryId=e.countryId?""+e.countryId:null,this.national=!!e.national&&e.national,this.gender=e.gender?e.gender:null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null,this.scope=e.scope?e.scope:null,this.sortField=e.sortField?""+e.sortField:null,this.sortOrder=e.sortOrder?""+e.sortOrder:null,this.teamIds=e.teamIds?e.teamIds:null}},1986:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3773);t.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.colors=new r.default,this.squad=[]}},9582:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(7686);t.default=function(e){var t=this;this.clientHttps=null,this.setAvailableMarketsForMatch=function(e){return r(t,void 0,void 0,(function(){var t,n,r,a=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.clientHttps.getConfig(s.FeatureConfigType.PREDICTOR)];case 1:return t=i.sent(),n=t.fullCoverageCompetitions,r=t.markets,Array.isArray(e)?[2,e.map((function(e){return a.setAvailableMarkets(e,n,r)}))]:"object"==typeof e&&Object.keys(e).length?[2,this.setAvailableMarkets(e,n,r)]:[2]}}))}))},this.setAvailableMarkets=function(e,n,r){var i,s=null===(i=e.context.competition)||void 0===i?void 0:i.id;return s&&t.isMatchInCoverageCompetition(s,n)?(e.availableMarkets=r.all,e):(e.availableMarkets=r.main,e)},this.isMatchInCoverageCompetition=function(e,t){var n=!1;return t.includes(e)?n=!0:n},this.clientHttps=new s.default(e)}},3822:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var a=n(4946),o=n(7686),u=n(3142),c=n(7232),l=n(1139),d=n(9502),h=n(8900),p=n(1859),f=n(2793);t.default=function(e,t,n,m,v){var y=this;this.config=null,this.clientHttps=null,this.loyaltyHttps=null,this.loyaltyService=null,this.profileFacade=null,this.loyaltyValidator=null,this.idMapping=null,this.topXFacade=null,this.matchQuizFacade=null,this.predictorHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(y,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.LOYALTY)];case 1:return[2,e.sent()]}}))}))},this.getClientBadges=function(){return r(y,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.getConfig()];case 1:return e=t.sent(),[2,this.loyaltyService.buildClientBadges(e.rewards.badges)]}}))}))},this.getTemplates=function(e){return r(y,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=!0,this.config.idSchema!==a.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyHttps.getTemplates(e,t)];case 1:return[2,i.sent()];case 2:return[4,this.loyaltyHttps.getTemplates(e,t)];case 3:return n=i.sent(),r=n,[4,this.loyaltyService.remapTemplatesIds(s([],n.data,!0))];case 4:return r.data=i.sent(),[2,n]}}))}))},this.getTemplateById=function(e,t){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.loyaltyHttps.getTemplateById(e,t)];case 1:return n=r.sent(),this.config.idSchema===a.IdSchemaEnum.NATIVE?[2,n]:[4,this.loyaltyService.remapTemplatesIds([n])];case 2:return[2,r.sent()[0]]}}))}))},this.getLeaderboard=function(e,t,n){return r(y,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return t=this.loyaltyService.initFilters(t,"loyalty"),[4,this.loyaltyHttps.getLeaderboard(e,n,t)];case 1:return r=i.sent(),s=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return s.data=i.sent(),[2,r]}}))}))},this.getLeaderboardForGame=function(e,t,n){return r(y,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return t=this.loyaltyService.initFilters(t,"loyalty"),[4,this.loyaltyHttps.getLeaderboardForGame(e,n,t)];case 1:return r=i.sent(),s=r,[4,this.loyaltyService.addProfileModelToLeaderboad(r.data)];case 2:return s.data=i.sent(),[2,r]}}))}))},this.getOwnRankings=function(e,t){return r(y,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,e,t)]}}))}))},this.getUserRankings=function(e,t,n){return r(y,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return t=this.loyaltyService.initFilters(t,"rankings"),[4,this.loyaltyHttps.getUserRankings(e,t,n)];case 1:return r=i.sent(),[4,this.getModelsForUserRankings(r)];case 2:return[2,i.sent()]}}))}))},this.getHighestSuccessRate=function(e,t){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return e&&this.loyaltyValidator.validateMarket(this.errorHandlingMode,e),[4,this.loyaltyHttps.getHighestSuccessRate(e,t)];case 1:return n=r.sent(),[2,this.loyaltyService.addProfileModelToHighestSuccessRate(n)]}}))}))},this.getTemplateWinners=function(e){return r(y,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(e)];case 1:return t=r.sent(),[4,this.getTemplateById(e)];case 2:return n=r.sent(),t.contestModel=n,[2,this.loyaltyService.completeContestWinners(t)]}}))}))},this.getEntitiesFollows=function(e,t){return r(y,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.loyaltyService.validateEntitiesFollowsFilters(e),this.config.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.loyaltyService.remapEntitiesFollowsFilters(e)];case 1:e=r.sent(),r.label=2;case 2:return[4,this.loyaltyHttps.getEntitiesFollows(e,t)];case 3:return n=r.sent(),[4,this.loyaltyService.addModelsToEntitiesFollows(n)];case 4:return[2,r.sent()]}}))}))},this.getModelsForUserRankings=function(e){return r(y,void 0,void 0,(function(){var t,n,r,s,a,o,u,c,l,d,h,p;return i(this,(function(i){switch(i.label){case 0:return t=null,n=null,r=null,s=this.loyaltyService.extractRankingsIdsMap(e.data),a=s[0],o=s[1],(u=s[2]).length?[4,this.getTemplates()]:[3,2];case 1:c=i.sent(),t=c.data.filter((function(e){return u.includes(e.id)})),i.label=2;case 2:return a.length?(l={gameIds:a},[4,this.topXFacade.getGames(l)]):[3,4];case 3:d=i.sent(),n=d.data,i.label=4;case 4:return o.length?(h={gameIds:o},[4,this.matchQuizFacade.getGames(h)]):[3,6];case 5:p=i.sent(),r=p.data,i.label=6;case 6:return[2,this.loyaltyService.setModelsForUserRankings(n,r,t,e)]}}))}))},this.config=e,this.clientHttps=t,this.loyaltyHttps=n,this.profileFacade=new c.default(v,m),this.loyaltyService=new u.default(this.config),this.loyaltyValidator=new l.default,this.idMapping=new h.default(e),this.topXFacade=new d.default(e,this.idMapping),this.matchQuizFacade=new p.default(e),this.predictorHttps=new f.default(e,this.idMapping),this.errorHandlingMode=e.errorHandlingMode}},2962:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(7686),a=n(7059),o=n(3822),u=n(4275),c=n(5601);t.default=function(e){var t=this;this.clientHttps=null,this.profileHttps=null,this.loyaltyHttps=null,this.loyaltyFacade=null,this.localStorage=null,this.getConfig=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getConfig()];case 1:return[2,e.sent()]}}))}))},this.getClientBadges=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.loyaltyFacade.getClientBadges()];case 1:return[2,e.sent()]}}))}))},this.getTemplates=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getTemplates(e)];case 1:return[2,t.sent()]}}))}))},this.getTemplateById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getTemplateById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getLeaderboard=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getLeaderboard(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getLeaderboardForGame=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getLeaderboardForGame(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getOwnRankings=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getOwnRankings(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserRankings=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getUserRankings(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getHighestSuccessRate=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getHighestSuccessRate(e,n)];case 1:return[2,t.sent()]}}))}))},this.getTemplateWinners=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getTemplateWinners(e)];case 1:return[2,t.sent()]}}))}))},this.getEntitiesFollows=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.loyaltyFacade.getEntitiesFollows(e,n)];case 1:return[2,t.sent()]}}))}))},this.clientHttps=new s.default(e),this.profileHttps=new u.default(e),this.loyaltyHttps=new a.default(e),this.localStorage=new c.default(e),this.loyaltyFacade=new o.default(e,this.clientHttps,this.loyaltyHttps,this.profileHttps,this.localStorage)}},8153:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},5111:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8153);t.default=function(){this.value=[new r.default]}},8608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.general=[],this.predictor=[],this.topX=[],this.matchQuiz=[]}},246:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1429);t.default=function(){this.requirements=new r.default}},8687:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},1429:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.points=null,this.gameParticipationCount=null,this.entityId=null,this.entityType=null,this.predictionsMade=null,this.correctPredictions=null}},515:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5111),i=n(4226);t.default=function(){this.enabled=!1,this.conditions={list:null},this.actions=new r.default,this.rewards=new i.default}},7910:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.limit=null,this.page=null,this.limit=e.limit?e.limit:null,this.page=e.page?e.page:null}return e.prototype.constructFiltersUrl=function(){var e="";return this.limit&&(e+="&",e+="limit="+this.limit),this.page&&(e+="&",e+="page="+this.page),e},e}();t.default=n},4996:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(t){var n=e.call(this,t)||this;return n.sortOrder=null,n.rankType=null,n.leaderboardIds=null,n.gameType=null,n.constructFiltersUrl=function(){var t=e.prototype.constructFiltersUrl.call(n);return n.sortOrder&&(t+="&",t+="sort_order="+n.sortOrder),n.rankType&&(t+="&",t+="rank_type="+n.rankType),n.leaderboardIds&&(t+="&",t+="type_ids="+n.leaderboardIds.join(",")),n.gameType&&(t+="&",t+="game_type="+n.gameType),t},n.sortOrder=t.sortOrder,n.rankType=t.rankType,n.leaderboardIds=t.leaderboardIds,n.gameType=t.type&&"game"===t.type.toLowerCase()?t.gameType:null,n}return i(t,e),t}(n(7910).default);t.default=s},6507:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.position=null,this.points=null,this.predictionsMade=null,this.profileId=null,this.profileModel=null,this.successRatePercent=null}},7746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6507);t.default=function(){this.remapHighestSuccessRate=function(e){return e.map((function(e){var t=new r.default;return t.position=e.position,t.points=e.points,t.predictionsMade=e.predictions_made,t.profileId=e.profile_id,t.successRatePercent=e.success_rate_percent,t}))}}},9642:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.position=null,this.profileId=null,this.profileModel=null,this.points=null,this.predictionsMade=null}},7419:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5828),i=n(9642);t.default=function(){var e=this;this.remapResponse=function(t){return t.meta=e.remapMeta(t.meta),t.data=e.remapData(t.data),t},this.remapMeta=function(e){var t=new r.default;return t.rankType=e.rank_type,t.fromDate=e.from_date,t.toDate=e.to_date,t.pagination.currentPage=e.pagination.current_page,t.pagination.itemsPerPage=e.pagination.items_per_page,t.pagination.totalItems=e.pagination.total_items,t.pagination.numberOfPages=e.pagination.number_of_pages,t},this.remapData=function(e){var t=[];return e.forEach((function(e){var n=new i.default;n.position=e.position,n.profileId=e.profile_id,n.points=e.points,n.predictionsMade=e.predictions_made,t.push(n)})),t}}},5828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(155);t.default=function(){this.rankType=null,this.fromDate=null,this.toDate=null,this.pagination=new r.default}},4187:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.general=null,this.comments=null,this.predictor=null,this.activity=null,this.topX=null,this.matchQuiz=null}},9013:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.id=null,t.rankType=null,t.model=null,t.gameType=null,t}return i(t,e),t}(n(9642).default);t.default=s},4533:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3569),i=n(9013),s=function(){function e(){var e=this;this.remapRankings=function(t){return t.meta=e.remapMeta(t.meta),t.data=e.remapData(t.data),t},this.remapMeta=function(e){var t=new r.default;return t.pagination.currentPage=e.pagination.current_page,t.pagination.itemsPerPage=e.pagination.items_per_page,t.pagination.numberOfPages=e.pagination.number_of_pages,t.pagination.totalItems=e.pagination.total_items,t}}return e.prototype.remapData=function(e){var t=[];return e.forEach((function(e){var n=new i.default;n.id=e.id,n.rankType=e.rank_type,n.position=e.position,n.points=e.points,n.gameType=e.game_type,delete n.profileId,delete n.profileModel,delete n.predictionsMade,t.push(n)})),t},e}();t.default=s},4226:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.points=null,this.tiers=null,this.badges=null}},4982:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.labels=null,t.customFields=null,t}return i(t,e),t}(n(194).default);t.default=s},194:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(439);t.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.gameIds=[],this.gameTypes=[],this.competitionIds=[],this.excludedProfileIds=[],this.rules=null,this.flags=null,this.images=new r.default,this.status=null,this.automaticallyChangeStatus=!0,this.createdAt=null,this.updatedAt=null,this.related=null}},8899:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3483),i=n(4982),s=n(194);t.default=function(){var e=this;this.remapResponse=function(t){var n=[];return t.forEach((function(t){var r=new s.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.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.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},this.remapResponseId=function(t){var n=new i.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.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.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapMeta=function(e){var t={};return t.totalItems=e.pagination.total_items,t},this.remapRelated=function(e){return e.map((function(e){var t=new r.default;return t.entityId=e.entity_id,t.entityType=e.entity_type,t}))}}},3142:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var a=n(4946),o=n(4021),u=n(4904),c=n(8097),l=n(2535),d=n(5318),h=n(8900),p=n(8808),f=n(6409),m=n(8687),v=n(7910),y=n(4996);t.default=function(e){var t=this;this.idMappingService=null,this.profileNamespace=null,this.footballNamespace=null,this.errorHandlingMode=null,this.remapTemplatesIds=function(e){return r(t,void 0,void 0,(function(){var t,n,r,a,o;return i(this,(function(i){switch(i.label){case 0:return e.length>0?(t=[],n=[],r=[],e.forEach((function(e){e.teamIds&&e.teamIds.length>0?t=s(s([],t,!0),e.teamIds,!0):e.matchIds&&e.matchIds.length>0?n=s(s([],n,!0),e.matchIds,!0):e.competitionIds&&e.competitionIds.length>0&&(r=s(s([],r,!0),e.competitionIds,!0))})),a={team:t,match:n,competition:r},[4,this.idMappingService.idMappingFacade.getEntitiesByIds(a,"native",this.idMappingService.idSchema)]):[3,2];case 1:return o=i.sent(),s([],o.team,!0),s([],o.match,!0),s([],o.competition,!0),e.forEach((function(e){e.teamIds&&e.teamIds.length>0?e.teamIds=e.teamIds.map((function(e){return o.team.shift()})):e.matchIds&&e.matchIds.length>0?e.matchIds=e.matchIds.map((function(e){return o.match.shift()})):e.competitionIds&&e.competitionIds.length>0&&(e.competitionIds=e.competitionIds.map((function(e){return o.competition.shift()})))})),[2,e];case 2:return[2,e]}}))}))},this.addProfileModelToLeaderboad=function(e){return r(t,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return e.length>0?(t=[],(n=e.map((function(e){return e.profileId}))).length?[4,this.profileNamespace.getByIds(n)]:[2,e]):[3,2];case 1:return r=i.sent(),e.forEach((function(e){r.forEach((function(t){t.id===e.profileId&&(delete t.interests,e.profileModel=t)})),e.profileModel||(e.profileModel=null),t.push(e)})),[2,t];case 2:return[2,e]}}))}))},this.buildClientBadges=function(e){var n=new m.default;return n.general=t.extractEnabledBadgesId(e.general),n.predictor=t.extractEnabledBadgesId(e.predictor),n.topX=t.extractEnabledBadgesId(e.topX),n.matchQuiz=t.extractEnabledBadgesId(e.matchQuiz),n},this.initFilters=function(e,t){switch(t){case"loyalty":e&&(e=new v.default(e));break;case"rankings":e&&(e=new y.default(e))}return e},this.addProfileModelToHighestSuccessRate=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return(t=e.map((function(e){return e.profileId}))).length?[4,this.profileNamespace.getByIds(t)]:[2,e];case 1:return n=r.sent(),[2,e.map((function(e){return n.forEach((function(t){t.id===e.profileId&&(delete t.interests,e.profileModel=t)})),e}))]}}))}))},this.extractRankingsIdsMap=function(e){var t=[],n=[],r=[];return e.forEach((function(e){"GAME"===e.rankType&&"TOP_X"===e.gameType?t.push(e.id):"GAME"===e.rankType&&"MATCH_QUIZ"===e.gameType?n.push(e.id):"TEMPLATE"===e.rankType&&r.push(e.id)})),[t,n,r]},this.setModelsForUserRankings=function(e,t,n,r){return r.data.forEach((function(r){"MATCH_QUIZ"===r.gameType&&t?r.model=t.filter((function(e){return e.id===r.id}))[0]:"TOP_X"===r.gameType&&e?r.model=e.filter((function(e){return e.id===r.id}))[0]:"TEMPLATE"===r.rankType&&n&&(r.model=n.filter((function(e){return e.id===r.id}))[0])})),r},this.completeContestWinners=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=e.userList.map((function(e){return e.profileId})),[4,this.profileNamespace.getByIds(t)];case 1:return n=r.sent(),e.userList.forEach((function(e){var t=n.filter((function(t){return t.id===e.profileId}))[0];delete t.interests,e.profileModel=t})),[2,e]}}))}))},this.validateEntitiesFollowsFilters=function(e){if(!e||!(e.footballCompetitions&&e.footballCompetitions.length||e.footballTeams&&e.footballTeams.length||e.footballPlayers&&e.footballPlayers.length)){if("default"===t.errorHandlingMode)throw new c.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_FILTERS,d.ErrorMessages.ENTITIES_NEEDED);throw new l.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.INVALID_FILTERS,d.ErrorMessages.ENTITIES_NEEDED).response}if(e.footballCompetitions&&e.footballCompetitions.length>10||e.footballTeams&&e.footballTeams.length>10||e.footballPlayers&&e.footballPlayers.length>10){if("default"===t.errorHandlingMode)throw new c.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.EXCEEDED_LENGTH,d.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED);throw new l.default(o.ErrorCodes.BAD_METHOD_CALL,u.ErrorStatuses.EXCEEDED_LENGTH,d.ErrorMessages.ENTITIES_FOLLOWS_FILTERS_EXCEEDED).response}},this.remapEntitiesFollowsFilters=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s;return i(this,(function(i){switch(i.label){case 0:return t=JSON.parse(JSON.stringify(e)),n={},r={},t.footballCompetitions&&t.footballCompetitions.length&&(r.competition=t.footballCompetitions),t.footballTeams&&t.footballTeams.length&&(r.team=t.footballTeams),t.footballPlayers&&t.footballPlayers.length&&(r.player=t.footballPlayers),[4,this.idMappingService.idMappingFacade.getEntitiesByIds(r,this.idMappingService.idSchema,a.IdSchemaEnum.NATIVE)];case 1:return s=i.sent(),Object.keys(s).forEach((function(e){"competition"===e?n.footballCompetitions=s[e]:"team"===e?n.footballTeams=s[e]:"player"===e&&(n.footballPlayers=s[e])})),[2,n]}}))}))},this.addModelsToEntitiesFollows=function(e){return r(t,void 0,void 0,(function(){var t,n,r,s,a,o,u,c,l;return i(this,(function(i){switch(i.label){case 0:return t=[],n="fb:c:",r=new Map,s=[],a="fb:t:",o=new Map,u=[],c="fb:p:",l=null,e.breakdown.forEach((function(e){e.id.includes(n)?t.push(e.id):e.id.includes(a)?s.push(e.id):e.id.includes(c)&&u.push(e.id)})),t.length?[4,this.footballNamespace.footballFacade.competitionsFacade.getCompetitionsMapWithNativeIds(t)]:[3,2];case 1:r=i.sent(),i.label=2;case 2:return s.length?[4,this.footballNamespace.footballFacade.teamsFacade.getTeamsMapWithNativeIds(s)]:[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:l=i.sent(),i.label=6;case 6:return e.breakdown.forEach((function(e){e.id.includes(n)?(e.model=r.get(e.id),e.id=e.model.id):e.id.includes(a)?(e.model=o.get(e.id),e.id=e.model.id):e.id.includes(c)&&(e.model=l[e.id],e.id=e.model.id)})),[2,e]}}))}))},this.extractEnabledBadgesId=function(e){var t=[];return e.forEach((function(e){e.enabled&&t.push(e.id)})),t},this.idMappingService=new h.default(e),this.profileNamespace=new f.default(e),this.footballNamespace=new p.default(e),this.errorHandlingMode=e.errorHandlingMode}},1139:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4021),i=n(4904),s=n(8097),a=n(2535),o=n(5318),u=n(7974);t.default=function(){this.validateMarket=function(e,t){if(!Object.keys(u.MarketEnum).includes(t)){var n=(0,o.invalidMarketMessage)(t);if("default"===e)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n);throw new a.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,n).response}}}},1859:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(1553),o=n(7686),u=n(2793),c=n(8900),l=n(1732),d=n(7782),h=n(5013),p=n(853),f=n(7299),m=n(2310),v=n(4800),y=n(8097),g=n(4021),w=n(4904),b=n(5318),_=n(2535);t.default=function(e){var t=this;this.predictorHttps=null,this.predictorService=null,this.idMapping=null,this.clientHttps=null,this.predictorValidator=null,this.errorHandlingMode=null,this.getConfig=function(){return r(t,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(o.FeatureConfigType.MATCH_QUIZ)];case 1:return e=t.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(e)];case 2:return[2,t.sent()];case 3:return[2,e]}}))}))},this.play=function(e){return r(t,void 0,void 0,(function(){var t,n,r,a,o,u=this;return i(this,(function(i){switch(i.label){case 0:return e=this.predictorValidator.validateBodyFields("MATCH_QUIZ",e),(t=e.fixtures.map((function(e){return u.predictorValidator.validateFixture(e.matchId,e.market,e.prediction.value,e.prediction.playerId)})))&&t.length?this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,4]:(n=[],r=[],t.forEach((function(e){n.push(e.matchId),e instanceof l.default&&e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&r.push(e.prediction.playerId)})),[4,this.predictorService.remapMatchIdToNative(n)]):[3,4];case 1:return a=i.sent(),o={},r&&r.length>0?[4,this.predictorService.remapPlayerIdMapToNative(r)]:[3,3];case 2:o=i.sent(),i.label=3;case 3:t.forEach((function(e,t){e.matchId=a[t],e instanceof l.default&&"OWN_GOAL"!==e.prediction.playerId&&(e.prediction.playerId=o[e.prediction.playerId])})),i.label=4;case 4:return e.fixtures=t,[4,this.predictorHttps.makeFootballPrediction(e)];case 5:return[2,i.sent()]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getGames=function(e,n){return r(t,void 0,void 0,(function(){var t,r;return i(this,(function(i){switch(i.label){case 0:return n=n||!1,t=this.predictorService.initGameFilters("MATCH_QUIZ",e),[4,this.predictorHttps.getGames(t,n)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=function(e,n){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return n=n||!1,[4,this.predictorHttps.getGameById(e,n)];case 1:return t=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(t)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return s=s||!1,n&&(n.type&&delete n.type,n.status&&delete n.status,n=new d.default(n)),[4,this.predictorHttps.getGamePredictions(e,s,n)];case 1:return[2,t.sent()]}}))}))},this.getGameResults=function(e,n,s){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return s=s||!1,n&&(n=new v.default(n)),[4,this.predictorHttps.getGameResults(e,s,n)];case 1:return t=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(t)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(e){return r(t,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return e=e||!1,t={status:p.GameStatusEnum.OPEN,type:"MATCH_QUIZ"},t=new f.default(t),[4,this.predictorHttps.getGames(t,e)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,e)];case 2:return[2,i.sent().data[0]]}}))}))},this.getMyGameEditions=function(e,n){return r(t,void 0,void 0,(function(){var t,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return e&&e.limit&&this.validateLimitFilterOnGames(e.limit),n=n||!1,t=this.predictorService.initGameTypePredictions("MATCH_QUIZ",e),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(t)];case 1:return(s=i.sent()).data.length>0?(s.data.forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),o=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(o,n)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(s,u)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getMyGamePrediction=function(e){return r(t,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(t){return t.gameInstanceId===e}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r,o,u,c;return i(this,(function(i){switch(i.label){case 0:return n&&n.limit&&this.validateLimitFilterOnGames(n.limit),s=s||!1,t=this.predictorService.initGameTypePredictions("MATCH_QUIZ",n),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(e,t)];case 1:return(o=i.sent()).data.length>0?(o.data.forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),u=this.predictorService.initGameFilters("MATCH_QUIZ",null,r),[4,this.predictorHttps.getUserGameEditions(u,s)]):[3,4];case 2:return c=i.sent(),[4,this.predictorService.addPredictionProp(o,c)];case 3:return[2,i.sent()];case 4:return[2,new a.default]}}))}))},this.getUserGamePrediction=function(e,n,s){return r(t,void 0,void 0,(function(){var t,r,a;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,t=this.predictorService.initGameTypePredictions("MATCH_QUIZ"),[4,this.predictorHttps.getUserPredictions(e,s,t)];case 1:return(r=i.sent()).data.length>0?[2,(a=r.data.filter((function(e){return e.gameInstanceId===n}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(e,n){return r(t,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(e,n)];case 1:return t=r.sent(),[4,this.predictorService.completeGameMarketResults(t,"MATCH_QUIZ")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(e){return r(t,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(e)];case 1:return t=r.sent(),[4,this.getGameById(e)];case 2:return n=r.sent(),t.contestModel=n,[2,this.predictorService.completeContestWinners(t)]}}))}))},this.validateLimitFilterOnGames=function(e){if("default"===t.errorHandlingMode&&e>50)throw new y.default(g.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,b.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===t.errorHandlingMode&&e>50)throw new _.default(g.ErrorCodes.BAD_METHOD_CALL,w.ErrorStatuses.EXCEEDED_LENGTH,b.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.predictorValidator=new m.default(e.errorHandlingMode),this.idMapping=new c.default(e),this.predictorHttps=new u.default(e,this.idMapping),this.predictorService=new h.default(e,this.idMapping),this.clientHttps=new o.default(e),this.errorHandlingMode=e.errorHandlingMode}},267:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1859);t.default=function(e){var t=this;this.matchQuizFacade=null,this.getConfig=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.matchQuizFacade.getConfig()];case 1:return[2,e.sent()]}}))}))},this.play=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.play(e)];case 1:return[2,t.sent()]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.delete(e)];case 1:return[2,t.sent()]}}))}))},this.getGames=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGames(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGameById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGameById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGamePredictions=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGamePredictions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getGameResults=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGameResults(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getCurrentGameResults=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getCurrentGameResults(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGameEditions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getMyGameEditions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getMyGamePrediction=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getMyGamePrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getUserGameEditions=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getUserGameEditions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getUserGamePrediction=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getUserGamePrediction(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getMarketsResultsForGame=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getMarketsResultsForGame(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGameWinners=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.matchQuizFacade.getGameWinners(e)];case 1:return[2,t.sent()]}}))}))},this.matchQuizFacade=new s.default(e)}},5765:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.enabled=!1,this.defaultMarkets=null,this.competitionsWhitelist=null}},8410:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6899),i=n(8042);t.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},670:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.gameId=null,this.results=null,this.tieBreakers=null}},7243:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4916);t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.images=null,this.scheduleOpenAt=null}},8042:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null,this.target=null,this.playerId=null,this.playerModel=null,this.result=null}},7974:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.playerMarketNobodyPrediction=t.endMarkMarkets=t.playerMarkets=t.MarketsOverCorners=t.MarketsOverGoals=t.MarketEnum=void 0,function(e){e.FT_1X2="FT_1X2",e.HT_1X2="HT_1X2",e.BOTH_TEAMS_SCORE="BOTH_TEAMS_SCORE",e.DOUBLE_CHANCE="DOUBLE_CHANCE",e.HT_FT="HT_FT",e.PLAYER_SCORE="PLAYER_SCORE",e.PLAYER_YELLOW_CARD="PLAYER_YELLOW_CARD",e.PLAYER_RED_CARD="PLAYER_RED_CARD",e.RED_CARD_MATCH="RED_CARD_MATCH",e.PENALTY_MATCH="PENALTY_MATCH",e.PLAYER_SCORE_FIRST_GOAL="PLAYER_SCORE_FIRST_GOAL",e.CORNERS_MATCH="CORNERS_MATCH",e.CORRECT_SCORE="CORRECT_SCORE",e.CORRECT_SCORE_ADVANCED="CORRECT_SCORE_ADVANCED",e.CORRECT_SCORE_HT="CORRECT_SCORE_HT",e.PLAYER_SCORE_HATTRICK="PLAYER_SCORE_HATTRICK",e.PLAYER_SCORE_TWICE="PLAYER_SCORE_TWICE",e.OVER_GOALS_0_5="OVER_GOALS_0_5",e.OVER_GOALS_1_5="OVER_GOALS_1_5",e.OVER_GOALS_2_5="OVER_GOALS_2_5",e.OVER_GOALS_3_5="OVER_GOALS_3_5",e.OVER_GOALS_4_5="OVER_GOALS_4_5",e.OVER_GOALS_5_5="OVER_GOALS_5_5",e.OVER_GOALS_6_5="OVER_GOALS_6_5",e.OVER_CORNERS_6_5="OVER_CORNERS_6_5",e.OVER_CORNERS_7_5="OVER_CORNERS_7_5",e.OVER_CORNERS_8_5="OVER_CORNERS_8_5",e.OVER_CORNERS_9_5="OVER_CORNERS_9_5",e.OVER_CORNERS_10_5="OVER_CORNERS_10_5",e.OVER_CORNERS_11_5="OVER_CORNERS_11_5",e.OVER_CORNERS_12_5="OVER_CORNERS_12_5",e.OVER_CORNERS_13_5="OVER_CORNERS_13_5"}(n=t.MarketEnum||(t.MarketEnum={})),t.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],t.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],t.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],t.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],t.playerMarketNobodyPrediction=n.PLAYER_SCORE_FIRST_GOAL},6147:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.pastStatuses=t.StatusEnum=void 0,function(e){e.ACTIVE="ACTIVE",e.WON="WON",e.LOST="LOST",e.PARTIALLY_WON="PARTIALLY_WON",e.CANCELED="CANCELED"}(n=t.StatusEnum||(t.StatusEnum={})),t.pastStatuses=[n.WON,n.LOST,n.PARTIALLY_WON,n.CANCELED]},1976:(e,t)=>{"use strict";var n,r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.HalfTimeFullTimeEnum=t.DoubleChanceEnum=t.OneXTwoEnum=void 0,(i=t.OneXTwoEnum||(t.OneXTwoEnum={})).ONE="1",i.X="x",i.TWO="2",(r=t.DoubleChanceEnum||(t.DoubleChanceEnum={})).ONE_X="1x",r.X_TWO="x2",r.ONE_TWO="12",(n=t.HalfTimeFullTimeEnum||(t.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"},2929:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var a=n(4946),o=n(7974),u=n(7686),c=n(5013),l=n(3950),d=n(1732),h=n(2310),p=n(8097),f=n(4021),m=n(4904),v=n(5318),y=n(2535);t.default=function(e,t,n,g){var w=this;this.predictorHttps=null,this.clientHttps=null,this.idMapping=null,this.predictorService=null,this.predictorValidator=null,this.errorHandlingMode=null,this.makeFootballPrediction=function(e,t,n,s){return r(w,void 0,void 0,(function(){var r,u,c,h,g,w,b;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorValidator.validateFixture(e,t,n,s),u=new l.default,this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,6]:(c=r.matchId,h="",[4,this.predictorService.remapMatchIdToNative([c])]);case 1:if(g=i.sent(),r.matchId=g[0],"default"===this.errorHandlingMode&&!r.matchId)throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).errorMessage();if("standard"===this.errorHandlingMode&&!r.matchId)throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_MATCH_ID).response;return r instanceof d.default&&"OWN_GOAL"!==r.prediction.playerId?r.prediction.playerId?(h=r.prediction.playerId,w=r.prediction,[4,this.predictorService.remapPlayerIdToNative([h])]):[3,3]:[3,4];case 2:w.playerId=i.sent(),i.label=3;case 3:if("default"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).errorMessage();if("standard"===this.errorHandlingMode&&r.market!==o.playerMarketNobodyPrediction&&!r.prediction.playerId)throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.INVALID_FIELD,v.ErrorMessages.INVALID_PLAYER_ID).response;i.label=4;case 4:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 5:return(b=i.sent()).fixtures.forEach((function(e){e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&(e.prediction.playerId=h),e.matchId=c})),[2,b];case 6:return u.fixtures=[r],[4,this.predictorHttps.makeFootballPrediction(u)];case 7:return[2,i.sent()]}}))}))},this.getMatchSummary=function(e,t){return r(w,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return[4,this.getMatchSummaryBase(e,t)];case 1:return n=i.sent(),r=JSON.parse(JSON.stringify(n.predictions)),[4,this.predictorService.remapPlayerIdToIdSchema(r)];case 2:return s=i.sent(),n.predictions=s,[2,n]}}))}))},this.getMarketSummary=function(e,t,n,s){return r(w,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(e,s)];case 1:return r=i.sent(),[4,this.predictorService.getMarketSummary(r,t,n)];case 2:return[2,i.sent()];case 3:throw i.sent();case 4:return[2]}}))}))},this.getMatchSummaryBase=function(e,t){return r(w,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapMatchIdToNative([e])];case 1:return n=i.sent(),r=n[0],[4,this.predictorHttps.getMatchSummary(r,t)];case 2:return(s=i.sent()).matchId=e,[2,s];case 3:return[4,this.predictorHttps.getMatchSummary(e,t)];case 4:return[2,i.sent()]}}))}))},this.getConfig=function(){return r(w,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(u.FeatureConfigType.PREDICTOR)];case 1:return e=t.sent(),this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(e)];case 2:return[2,t.sent()];case 3:return[2,e]}}))}))},this.deleteFootballPrediction=function(e){return r(w,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getMyPredictions=function(e){return r(w,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=this.predictorService.initPredictionsFilters(e,"user"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return[2,n.sent()]}}))}))},this.getMyPredictionsForMatches=function(e,t){return r(w,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(e))throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(s([],e,!0))];case 1:e=r.sent(),r.label=2;case 2:return n=this.predictorService.initPredictionsFilters(t,"matches",e),[4,this.predictorHttps.getMyPredictions(n)];case 3:return[2,r.sent()]}}))}))},this.getMyCurrentPredictions=function(e){return r(w,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=this.predictorService.initPredictionsFilters(e,"current"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return[2,n.sent()]}}))}))},this.getMyPastPredictions=function(e){return r(w,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t=this.predictorService.initPredictionsFilters(e,"past"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return[2,n.sent()]}}))}))},this.getUserPredictions=function(e,t,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(t,"user"),[4,this.predictorHttps.getUserPredictions(e,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserCurrentPredictions=function(e,t,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(t,"current"),[4,this.predictorHttps.getUserPredictions(e,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPastPredictions=function(e,t,n){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=this.predictorService.initPredictionsFilters(t,"past"),[4,this.predictorHttps.getUserPredictions(e,n,r)];case 1:return[2,i.sent()]}}))}))},this.getUserPredictionsForMatches=function(e,t,n,o){return r(w,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:if("default"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new p.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).errorMessage();if("standard"===this.errorHandlingMode&&this.predictorService.areIdsExceeded(t))throw new y.default(f.ErrorCodes.BAD_METHOD_CALL,m.ErrorStatuses.EXCEEDED_LENGTH,v.ErrorMessages.QUERY_PARAM_MATCH_IDS_EXCEEDED).response;return this.idMapping.idSchema===a.IdSchemaEnum.NATIVE?[3,2]:[4,this.predictorService.remapMatchIdToNative(s([],t,!0))];case 1:t=i.sent(),i.label=2;case 2:return r=this.predictorService.initPredictionsFilters(n,"matches",t),[4,this.predictorHttps.getUserPredictions(e,o,r)];case 3:return[2,i.sent()]}}))}))},this.getPredictionById=function(e){return r(w,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.getPredictionById(e)];case 1:return[2,t.sent()]}}))}))},this.predictorHttps=t,this.idMapping=g,this.clientHttps=n,this.errorHandlingMode=e.errorHandlingMode,this.predictorValidator=new h.default(e.errorHandlingMode),this.predictorService=new c.default(e,g)}},704:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(8608),i=n(246),s=n(1429),a=n(515),o=n(4187),u=n(4226),c=n(5765),l=n(1180),d=n(8452);t.default=function(){var e=this;this.remapPredictorConfig=function(e){var t=new d.default;return t.enabled=e.enabled,t.fullCoverageCompetitions=e.full_coverage_competitions,t.markets=e.markets,t.successRateScopes=e.success_rate_scopes,t},this.remapTopXConfig=function(e){var t=new l.default;return t.enabled=e.enabled,t.minFixtures=e.min_fixtures,t.maxFixtures=e.max_fixtures,t.competitionsWhitelist=e.competitions_whitelist,t},this.remapMatchQuizConfig=function(e){var t=new c.default;return t.enabled=e.enabled,t.defaultMarkets=e.default_markets,t.competitionsWhitelist=e.competitions_whitelist,t},this.remapLoyaltyConfig=function(t){var n=new a.default;return n.enabled=t.enabled,n.conditions.list=t.conditions.list,n.actions.value=t.actions.value,n.rewards=e.remapRewards(t.rewards),n},this.remapRewards=function(t){var n=new u.default;return n.points=e.remapPoints(t.points),n.tiers=t.tiers,n.badges=e.remapBadges(t.badges),n},this.remapPoints=function(e){var t=new o.default;return t.general=e.general,t.comments=e.comments,t.predictor=e.predictor,t.activity=e.activity,t.topX=e.top_x,t.matchQuiz=e.match_quiz,t},this.remapBadges=function(t){var n=new r.default;return n.general=t.general,n.predictor=e.remapBadgeValues(t.predictor),n.topX=e.remapBadgeValues(t.top_x),n.matchQuiz=e.remapBadgeValues(t.match_quiz),n},this.remapBadgeValues=function(t){return t.map((function(t){var n=new i.default;return n.id=t.id,n.label=t.label,n.enabled=t.enabled,n.requirements=e.remapRequirements(t.requirements),n}))},this.remapRequirements=function(e){var t=new s.default;return t.points=e.points,t.gameParticipationCount=e.game_participation_count,t.entityId=e.entity_id,t.entityType=e.entity_type,t.predictionsMade=e.predictions_made,t.correctPredictions=e.correct_predictions,t}}},8452:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(442);t.default=function(){this.enabled=!1,this.fullCoverageCompetitions=null,this.markets=null,this.successRateScopes=new r.default}},442:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.competitions=[],this.teams=[],this.markets=[]}},6367:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null,this.playerId=null,this.playerModel=null}},1406:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2524),a=n(1732),o=n(4119),u=n(1465),c=n(5132),l=n(7344);t.default=function(e,t,n){var d=this;this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapFixturesRequest=function(e){var t={};if(t.match_id=e.matchId,t.match_type="FOOTBALL",e instanceof a.default)t.market=e.market,t.prediction=e.prediction.value,t.player_id=e.prediction.playerId;else if(e instanceof c.default||e instanceof l.default)t.market=e.market,t.prediction=e.prediction.value;else if(e instanceof u.default){t.market=e.market;var n=e.prediction.value.split(":");t.goals_home=Number(n[0]),t.goals_away=Number(n[1])}else t.market=e.market,t.prediction=e.prediction.value;return t},this.remapFixturesResponse=function(e){return r(d,void 0,void 0,(function(){var t,n,r,a,o,u,c,l,d,h,p,f;return i(this,(function(i){switch(i.label){case 0:for(t="OWN_GOAL",n=[],r=[],a=null,o=[],e.length>1&&e.sort((function(e,t){return e.match_id.localeCompare(t.match_id)})),u=0,c=e;u<c.length;u++)p=c[u],n.push(p.match_id),p.player_id&&!r.includes(p.player_id)&&r.push(p.player_id);return[4,this.matchFacade.getMatchesMapWithNativeIds(n)];case 1:return l=i.sent(),r.sort((function(e,t){return e.localeCompare(t)})),r&&r.length>0&&!r.includes(t)?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=i.sent(),i.label=3;case 3:for(d=0,h=e;d<h.length;d++)p=h[d],f=new s.default,p.target?f.market=this.predictorService.convertMarketForResponseModel(p.market,p.target):f.market=p.market,f.matchId=l[p.match_id].id,f.matchType=p.match_type,f.matchModel=l?l[p.match_id]:null,delete f.matchModel.availableMarkets,void 0!==p.goals_home&&void 0!==p.goals_away?f.prediction.value=p.goals_home.toString()+":"+p.goals_away.toString():f.prediction.value=p.prediction,f.prediction.playerId=p.player_id?p.player_id:null,f.prediction.playerId&&f.prediction.playerId!==t&&(f.prediction.playerModel=a[p.player_id],f.prediction.playerId=a[p.player_id].id),f.result=this.remapResult(p.result),o.push(f);return[2,o]}}))}))},this.remapResult=function(e){var t=new o.default;return t.settledAt=e.settled_at,t.resettledAt=e.resettled_at,t.status=e.status,t.outcome=e.outcome,t.points=e.points,t},this.matchFacade=e,this.playerFacade=t,this.predictorService=n}},2524:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6367);t.default=function(){this.market=null,this.matchId=null,this.matchType=null,this.matchModel=null,this.prediction=new r.default,this.result=null}},1206:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(9883);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.BOTH_TEAMS_SCORE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},5274:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(8038);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.CORNERS_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},1465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3125);t.default=function(e,t,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n}},7535:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(6902);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.DOUBLE_CHANCE,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},7307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(6642);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.HT_FT,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},1718:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2782);t.default=function(e,t,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n}},5132:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9883);t.default=function(e,t,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n}},7344:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9883);t.default=function(e,t,n){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n}},1855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(9883);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.PENALTY_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},1732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7321);t.default=function(e,t,n,i){this.matchId=null,this.market=null,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.market=t,this.prediction=new r.default,this.prediction.value=n,this.prediction.playerId=i}},5814:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7974),i=n(9883);t.default=function(e,t){this.matchId=null,this.market=r.MarketEnum.RED_CARD_MATCH,this.matchType="FOOTBALL",this.prediction=null,this.matchId=e,this.prediction=new i.default,this.prediction.value=t}},4119:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.settledAt=null,this.resettledAt=null,this.status=null,this.outcome=null,this.points=0}},5908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.no=0,this.yes=0}},2726:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1406),a=n(2532),o=n(3792),u=n(595),c=n(4545),l=n(4272),d=n(2524),h=n(5013),p=n(1399);t.default=function(e,t){var n=this;this.fixturesRemapper=null,this.footballHttps=null,this.matchFacade=null,this.playerFacade=null,this.predictorService=null,this.remapRequestBody=function(e){var t={};return t.game_instance_id=e.gameInstanceId,t.fixtures=e.fixtures.map((function(e){return n.fixturesRemapper.remapFixturesRequest(e)})),e instanceof p.default&&e.tiebreaker&&(t.tiebreaker={},t.tiebreaker.golden_goal=e.tiebreaker.goldenGoal?e.tiebreaker.goldenGoal:null),t},this.remapResponseArrayBody=function(e){return r(n,void 0,void 0,(function(){var t,n,r,s,o,u,c=this;return i(this,(function(i){switch(i.label){case 0:return e.length?(t="OWN_GOAL",n=[],r=[],s={},o=[],e.forEach((function(e){e.fixtures.forEach((function(e){n.push(e.match_id),e.player_id&&e.player_id!==t&&r.push(e.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:s=i.sent(),i.label=3;case 3:return e.forEach((function(e){var n=new a.default,r=[];n.id=e.id,n.gameInstanceId=e.game_instance_id,n.gameType=e.game_type,n.wager=e.wager,n.totalFixtures=e.total_fixtures,n.settledFixtures=e.settled_fixtures,n.userId=e.user_id,e.fixtures.forEach((function(e){var n=new d.default;e.target?n.market=c.predictorService.convertMarketForResponseModel(e.market,e.target):n.market=e.market,n.matchId=u[e.match_id].id,n.matchType=e.match_type,n.matchModel=u[e.match_id],delete n.matchModel.availableMarkets,void 0!==e.goals_home&&void 0!==e.goals_away?n.prediction.value=e.goals_home.toString()+":"+e.goals_away.toString():n.prediction.value=e.prediction,n.prediction.playerId=e.player_id?e.player_id:null,n.prediction.playerId&&n.prediction.playerId!==t&&(n.prediction.playerModel=s[n.prediction.playerId],n.prediction.playerId=s[n.prediction.playerId].id),n.result=c.fixturesRemapper.remapResult(e.result),r.push(n)})),n.fixtures=r,n.status=e.status,e.tiebreaker?n.tiebreaker.goldenGoal=e.tiebreaker.golden_goal:n.tiebreaker=null,n.points=e.points,n.createdAt=e.created_at,n.updatedAt=e.updated_at,o.push(n)})),[2,o];case 4:return[2,e]}}))}))},this.remapResponseObjBody=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return(t=new a.default).id=e.id,t.gameInstanceId=e.game_instance_id,t.gameType=e.game_type,t.wager=e.wager,t.totalFixtures=e.total_fixtures,t.settledFixtures=e.settled_fixtures,t.userId=e.user_id,n=t,[4,this.fixturesRemapper.remapFixturesResponse(e.fixtures)];case 1:return n.fixtures=r.sent(),t.status=e.status,e.tiebreaker?t.tiebreaker.goldenGoal=e.tiebreaker.golden_goal:t.tiebreaker=null,t.points=e.points,t.createdAt=e.created_at,t.updatedAt=e.updated_at,[2,t]}}))}))},this.remapPredictionModel=function(e){var t=new o.default;return t.fullTimeOneXTwo=e.FT_1X2,t.halfTimeOneXTwo=e.HT_1X2,t.bothTeamsScore=e.BOTH_TEAMS_SCORE,t.overZeroPointFiveGoals=e.OVER_GOALS_0_5,t.overOnePointFiveGoals=e.OVER_GOALS_1_5,t.overTwoPointFiveGoals=e.OVER_GOALS_2_5,t.overThreePointFiveGoals=e.OVER_GOALS_3_5,t.overFourPointFiveGoals=e.OVER_GOALS_4_5,t.overFivePointFiveGoals=e.OVER_GOALS_5_5,t.overSixPointFiveGoals=e.OVER_GOALS_6_5,t.overSixPointFiveCorners=e.OVER_CORNERS_6_5,t.overSevenPointFiveCorners=e.OVER_CORNERS_7_5,t.overEightPointFiveCorners=e.OVER_CORNERS_8_5,t.overNinePointFiveCorners=e.OVER_CORNERS_9_5,t.overTenPointFiveCorners=e.OVER_CORNERS_10_5,t.overElevenPointFiveCorners=e.OVER_CORNERS_11_5,t.overTwelvePointFiveCorners=e.OVER_CORNERS_12_5,t.overThirteenPointFiveCorners=e.OVER_CORNERS_13_5,t.doubleChance=e.DOUBLE_CHANCE,t.halfTimeFullTime=e.HT_FT,t.playerScore=e.PLAYER_SCORE,t.playerYellowCard=e.PLAYER_YELLOW_CARD,t.playerRedCard=e.PLAYER_RED_CARD,t.redCardMatch=e.RED_CARD_MATCH,t.penaltyMatch=e.PENALTY_MATCH,t.playerScoreFirstGoal=e.PLAYER_SCORE_FIRST_GOAL,t.cornersMatch=e.CORNERS_MATCH,t.correctScore=e.CORRECT_SCORE,t.correctScoreHalfTime=e.CORRECT_SCORE_HT,t.correctScoreAdvanced=e.CORRECT_SCORE_ADVANCED,t.playerScoreHattrick=e.PLAYER_SCORE_HATTRICK,t.playerScoreTwice=e.PLAYER_SCORE_TWICE,t},this.footballHttps=new u.default(e),this.matchFacade=new c.default(e,this.footballHttps,t),this.playerFacade=new l.default(e,this.footballHttps,t),this.predictorService=new h.default(e,t),this.fixturesRemapper=new s.default(this.matchFacade,this.playerFacade,this.predictorService)}},3950:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.gameInstanceId=null,this.fixtures=null}},2532:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7640);t.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 r.default,this.points=null,this.createdAt=null,this.updatedAt=null}},7782:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6147);t.default=function(e){var t=this;this.limit=null,this.startAfter=null,this.status=null,this.type=null,this.matchIds=null,this.constructFiltersUrl=function(){var e="",n=!1;return t.status&&(n=Object.values(r.StatusEnum).some((function(e){return t.status.includes(e)}))),t.limit&&(e+="&",e+="limit="+t.limit),t.startAfter&&(e+="&",e+="start_after="+t.startAfter),t.status&&n&&(e+="&",e+="status="+t.status.join(",")),t.type&&(e+="&",e+="game_types="+t.type),t.matchIds&&(e+="&",e+="match_ids="+t.matchIds.join(",")),e},this.limit=e.limit?e.limit:null,this.startAfter=e.startAfter?e.startAfter:null,this.status=e.status?e.status:null,this.type=e.type?e.type:null,this.matchIds=e.matchIds?e.matchIds:null}},3792:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5908);t.default=function(){this.fullTimeOneXTwo={},this.halfTimeOneXTwo={},this.bothTeamsScore=new r.default,this.doubleChance={},this.halfTimeFullTime={},this.playerScore={},this.playerYellowCard={},this.playerRedCard={},this.redCardMatch=new r.default,this.penaltyMatch=new r.default,this.playerScoreFirstGoal={},this.cornersMatch={},this.correctScore={},this.correctScoreHalfTime={},this.correctScoreAdvanced={},this.playerScoreHattrick={},this.playerScoreTwice={},this.overZeroPointFiveGoals=new r.default,this.overOnePointFiveGoals=new r.default,this.overTwoPointFiveGoals=new r.default,this.overThreePointFiveGoals=new r.default,this.overFourPointFiveGoals=new r.default,this.overFivePointFiveGoals=new r.default,this.overSixPointFiveGoals=new r.default,this.overSixPointFiveCorners=new r.default,this.overSevenPointFiveCorners=new r.default,this.overEightPointFiveCorners=new r.default,this.overNinePointFiveCorners=new r.default,this.overTenPointFiveCorners=new r.default,this.overElevenPointFiveCorners=new r.default,this.overTwelvePointFiveCorners=new r.default,this.overThirteenPointFiveCorners=new r.default}},9378:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.matchId=null,this.matchType=null,this.predictions=null}},9679:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2726),i=n(9378);t.default=function(e,t){var n=this;this.remapPredictions=null,this.remapResponse=function(e){var t=new i.default;return t.matchId=e.match_id,t.matchType=e.match_type,t.predictions=n.remapPredictions.remapPredictionModel(e.predictions),t},this.remapPredictions=new r.default(e,t)}},7321:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=!1,this.playerId=null}},9883:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=!1}},8038:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},3125:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},6902:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},6642:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},2782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null}},1259:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2793),a=n(8900),o=n(2929),u=n(7686);t.default=function(e){var t=this;this.predictorHttps=null,this.clientHttps=null,this.predictorFacade=null,this.idMapping=null,this.makeFootballPrediction=function(e,n,s,a){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.makeFootballPrediction(e,n,s,a)];case 1:return[2,t.sent()]}}))}))},this.getMatchSummary=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMatchSummary(e,n)];case 1:return[2,t.sent()]}}))}))},this.getMarketSummary=function(e,n,s,a){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMarketSummary(e,n,s,a)];case 1:return[2,t.sent()]}}))}))},this.getConfig=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.predictorFacade.getConfig()];case 1:return[2,e.sent()]}}))}))},this.deleteFootballPrediction=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getMyPredictions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMyPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyCurrentPredictions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMyCurrentPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyPastPredictions=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMyPastPredictions(e)];case 1:return[2,t.sent()]}}))}))},this.getMyPredictionsForMatches=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getMyPredictionsForMatches(e,n)];case 1:return[2,t.sent()]}}))}))},this.getUserPredictions=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getUserPredictions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getUserCurrentPredictions=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getUserCurrentPredictions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getUserPastPredictions=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getUserPastPredictions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getUserPredictionsForMatches=function(e,n,s,a){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getUserPredictionsForMatches(e,n,s,a)];case 1:return[2,t.sent()]}}))}))},this.getPredictionById=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorFacade.getPredictionById(e)];case 1:return[2,t.sent()]}}))}))},this.idMapping=new a.default(e),this.predictorHttps=new s.default(e,this.idMapping),this.clientHttps=new u.default(e),this.predictorFacade=new o.default(e,this.predictorHttps,this.clientHttps,this.idMapping)}},5013:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},a=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var o=n(7974),u=n(3792),c=n(8452),l=n(5908),d=n(8950),h=n(6890),p=n(595),f=n(4545),m=n(7782),v=n(7299),y=n(712),g=n(4119),w=n(3751),b=n(7243),_=n(4272),E=n(1180),I=n(5765),M=n(6147),O=n(5318),T=n(4946),R=n(6409),S=n(1260),P=n(6247);t.default=function(e,t){var n=this;this.footballHttps=null,this.idMapping=null,this.matchFacade=null,this.playerFacade=null,this.profileNamespace=null,this.remapMatchIdToNative=function(e){return i(n,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(e,"match","native")];case 1:return[2,t.sent().match]}}))}))},this.remapPlayerIdToNative=function(e){return i(n,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.idMapping.getEntityIdsBySchemaId(e,"player","native")];case 1:return[2,t.sent().player[0]]}}))}))},this.remapPlayerIdMapToNative=function(e){return i(n,void 0,void 0,(function(){var t,n,r,i;return s(this,(function(s){switch(s.label){case 0:return t={},n=(0,y.transformIdsToBeUnique)(e),[4,this.idMapping.getEntityIdsBySchemaId(n,"player","native")];case 1:return r=s.sent(),i=r.player,n.forEach((function(e,n){return t[e]=i[n]})),[2,t]}}))}))},this.remapPlayerIdToIdSchema=function(e){return i(n,void 0,void 0,(function(){var t,n,r,i,a,o,u,c,l,d,h,p,f,m,v,y,g,w,b;return s(this,(function(s){switch(s.label){case 0:for(t=["playerScore","playerYellowCard","playerRedCard","playerScoreFirstGoal","playerScoreHattrick","playerScoreTwice"],n=[],r=0,i=Object.entries(e);r<i.length;r++)if(a=i[r],o=a[0],u=a[1],t.includes(o))for(c=0,l=Object.keys(u);c<l.length;c++)"NOBODY"!==(d=l[c])&&"OWN_GOAL"!==d&&n.push(d);return n.length?[4,this.playerFacade.getPlayersMapWithNativeIds(n)]:[2,e];case 1:for(h=s.sent(),p=0,f=Object.entries(e);p<f.length;p++)if(m=f[p],v=m[0],y=m[1],t.includes(v))for(g=0,w=Object.keys(y);g<w.length;g++)"NOBODY"!==(b=w[g])&&"OWN_GOAL"!==b&&(y[h[b].id]=y[b],y[h[b].id].model=h[b],this.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&delete y[b]);return[2,e]}}))}))},this.convertMarket=function(e){for(var t=Object.keys(new u.default),n=Object.values(o.MarketEnum),r=0;r<n.length;r++)e===n[r]&&(e=t[r]);return e},this.convertMarketForResponseModel=function(e,t){return e+"_"+t.toString()},this.getMarketSummary=function(e,t,r){return i(n,void 0,void 0,(function(){var n,i,a,u,c,d,h,p,f=this;return s(this,(function(s){switch(s.label){case 0:if(n=this.convertMarket(t),(i={}).matchId=e.matchId,i.matchType=e.matchType,!Object.keys(e.predictions).includes(n))throw new Error("You have passed invalid market");return i[n]=e.predictions[n],o.playerMarkets.includes(t)&&r?(a="","OWN_GOAL"===r||"NOBODY"===r?[3,2]:[4,this.idMapping.idMappingFacade.getEntitiesByIds({player:[r]},this.idMapping.idSchema,"native")]):[3,6];case 1:u=s.sent(),a=u.player[0],s.label=2;case 2:return a&&i[n][a]?[4,this.playerFacade.getPlayersMapWithNativeIds([a])]:[3,4];case 3:return c=s.sent(),i[n][a].model=c[a],[2,i[n][a]];case 4:return a?(i[n][a]=new l.default,[2,i[n][a]]):[2,i[n][r]];case 5:return[3,10];case 6:return!o.playerMarkets.includes(t)||r?[3,10]:(d=Object.keys(i[n]).filter((function(e){return"NOBODY"!==e&&"OWN_GOAL"!==e}))).length?[4,this.playerFacade.getPlayersMapWithNativeIds(d)]:[3,8];case 7:return p=s.sent(),[3,9];case 8:p={},s.label=9;case 9:h=p,Object.keys(h).length&&Object.keys(i[n]).forEach((function(e){"NOBODY"!==e&&"OWN_GOAL"!==e&&(i[n][h[e].id]=i[n][e],i[n][h[e].id].model=h[e],f.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&delete i[n][e])})),s.label=10;case 10:return[2,i]}}))}))},this.remapCompetitionsFromConfig=function(e){return i(n,void 0,void 0,(function(){var t,n,r,i,a,o,u,l;return s(this,(function(s){switch(s.label){case 0:return e instanceof c.default?(t={competition:e.fullCoverageCompetitions},n={competition:e.successRateScopes.competitions},r={team:e.successRateScopes.teams},[4,this.idMapping.idMappingFacade.getEntitiesByIds(t,"native",this.idMapping.idSchema)]):[3,4];case 1:return i=s.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(n,"native",this.idMapping.idSchema)];case 2:return a=s.sent(),[4,this.idMapping.idMappingFacade.getEntitiesByIds(r,"native",this.idMapping.idSchema)];case 3:return o=s.sent(),e.fullCoverageCompetitions=i.competition,e.successRateScopes.competitions=a.competition,e.successRateScopes.teams=o.team,[2,e];case 4:return e instanceof E.default||e instanceof I.default?(u={competition:e.competitionsWhitelist},[4,this.idMapping.idMappingFacade.getEntitiesByIds(u,"native",this.idMapping.idSchema)]):[3,6];case 5:return l=s.sent(),e.competitionsWhitelist=l.competition,[2,e];case 6:return[2]}}))}))},this.remapMatchIdsFixtures=function(e){return i(n,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:return Array.isArray(e.data)?e.data.length>0?(t=[],n=[],e.data.forEach((function(e){e instanceof w.default||e instanceof d.default||e instanceof b.default||e instanceof P.default?(e.fixtures.forEach((function(e){return t.push(e.matchId)})),e instanceof b.default&&e.fixtures.forEach((function(e){e.prediction.playerId&&"OWN_GOAL"!==e.prediction.playerId&&n.push(e.prediction.playerId)}))):e instanceof h.default&&e.results.forEach((function(e){return t.push(e.matchId)}))})),[4,this.refactorResponseArrModel(e,t,n)]):[3,2]:[3,4];case 1:case 5:return[2,r.sent()];case 2:return[2,e];case 3:return[3,6];case 4:return[4,this.refactorResponseObjModel(e)];case 6:return[2]}}))}))},this.refactorResponseArrModel=function(e,t,r){return i(n,void 0,void 0,(function(){var n,i,a,o=this;return s(this,(function(s){switch(s.label){case 0:return n=[],[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return i=s.sent(),a={},r.length>0?[4,this.playerFacade.getPlayersMapWithNativeIds(r)]:[3,3];case 2:a=s.sent(),s.label=3;case 3:return e.data.forEach((function(e){e instanceof w.default||e instanceof d.default||e instanceof b.default?(e.fixtures.forEach((function(t){o.handleMatchModel(i,t),e instanceof b.default&&t.prediction.playerId&&"OWN_GOAL"!==t.prediction.playerId&&(t.prediction.playerModel=a[t.prediction.playerId],t.prediction.playerId=a[t.prediction.playerId].id)})),n.push(e)):e instanceof h.default&&(e.results.forEach((function(e){e.matchModel=i[e.matchId],delete e.matchModel.availableMarkets,e.matchId=e.matchModel.id})),n.push(e))})),e.data=n,[2,e]}}))}))},this.refactorResponseObjModel=function(e){return i(n,void 0,void 0,(function(){var t,n,r=this;return s(this,(function(i){switch(i.label){case 0:return t=[],e.fixtures.forEach((function(e){return t.push(e.matchId)})),[4,this.matchFacade.getMatchesMapWithNativeIds(t)];case 1:return n=i.sent(),e.fixtures.forEach((function(e){return r.handleMatchModel(n,e)})),[2,e]}}))}))},this.getCurrentGameId=function(e){var t=new Date;if(e.data.length>1){var n=[];return e.data.forEach((function(e){return n.push(e.predictionsCutoff)})),e.data.sort((function(e,n){var r=[e.predictionsCutoff,n.predictionsCutoff].map((function(e){return Math.abs(new Date(e)-t)}));return r[0]-r[1]}))[0].id}return e.data[0].id},this.initGameTypePredictions=function(e,t){var n={type:e,limit:null,startAfter:null};return t&&(n=r(r({},n),{limit:t.limit,startAfter:t.startAfter})),new m.default(n)},this.initGameFilters=function(e,t,n){if(t&&n)return t.type=e,t.gameIds=n,new v.default(t);if(t&&!n)return t.type=e,new v.default(t);if(!t&&n){var r={type:e,gameIds:n};return new v.default(r)}return r={type:e},new v.default(r)},this.addPredictionProp=function(e,t){return i(n,void 0,void 0,(function(){var n=this;return s(this,(function(r){switch(r.label){case 0:return t.data.forEach((function(t){e.data.forEach((function(e){t.id===e.game_instance_id&&(t.predictionId=e.id,t.outcome=e.status,t.fixtures.forEach((function(t,r){void 0!==e.fixtures[r].goals_home&&void 0!==e.fixtures[r].goals_away?t.prediction.value=e.fixtures[r].goals_home+":"+e.fixtures[r].goals_away:t.prediction.value=e.fixtures[r].prediction,e.fixtures[r].player_id?t.prediction.playerId=e.fixtures[r].player_id:e.fixtures[r].target&&(t.prediction.target=e.fixtures[r].target),t.prediction.result=n.remapResult(e.fixtures[r].result)})),t.predictionsMadeAt=e.created_at,t.points=e.points,t instanceof d.default&&(e.tiebreaker?t.predictionTiebreaker.goldenGoal=e.tiebreaker.golden_goal:t.predictionTiebreaker=e.tiebreaker))}))})),t.meta.pagination.nextPageStartsAfter=e.meta.pagination.next_page_starts_after,[4,this.remapMatchIdsFixtures(t)];case 1:return[2,r.sent()]}}))}))},this.remapResult=function(e){var t=new g.default;return t.settledAt=e.settled_at,t.resettledAt=e.resettled_at,t.status=e.status,t.outcome=e.outcome,t.points=e.points,t},this.areIdsExceeded=function(e){return e.length>10},this.initPredictionsFilters=function(e,t,r){switch(t){case"user":e&&(e=new m.default(e));break;case"current":if(e)n.deleteUnexpectedProperties(e),e.status=[M.StatusEnum.ACTIVE],e=new m.default(e);else{var i={status:[M.StatusEnum.ACTIVE]};e=new m.default(i)}break;case"past":e?(n.deleteUnexpectedProperties(e),e.status=M.pastStatuses,e=new m.default(e)):(i={status:M.pastStatuses},e=new m.default(i));break;case"matches":e?(n.deleteUnexpectedProperties(e),e.matchIds=r,e=new m.default(e)):(i={matchIds:r},e=new m.default(i))}return e},this.completeGameMarketResults=function(e,t){return i(n,void 0,void 0,(function(){var n,r,i,u,c,l,d,h,p=this;return s(this,(function(s){switch(s.label){case 0:switch(t){case"MATCH_QUIZ":return[3,1];case"TOP_X":return[3,5]}return[3,9];case 1:return n={},r=e.results[0].matchId,i=e.results.map((function(e){return o.playerMarkets.includes(e.market)&&!e.result.includes("OWN_GOAL")?a([],e.result,!0):[]})).flat(),[4,this.matchFacade.getMatchesMapWithNativeIds([r])];case 2:return u=s.sent(),i.length?[4,this.playerFacade.getPlayersMapWithNativeIds(i)]:[3,4];case 3:n=s.sent(),s.label=4;case 4:return e.results=e.results.map((function(e){if(e.matchModel=u[e.matchId]?u[e.matchId]:null,e.playerModels&&Object.keys(n).length&&(t=e.result).forEach((function(t){var r=n[t];e.playerModels.push(r)})),p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&(p.remapMatchIdForResultsMarkets(u,e),e.playerModels&&Object.keys(n).length)){var t=e.result;e.result=t.map((function(e){return n[e].id}))}return e})),[2,e];case 5:return c=e.results.map((function(e){return e.matchId})),[4,this.matchFacade.getMatchesMapWithNativeIds(c)];case 6:return l=s.sent(),e.results=e.results.map((function(e){return e.matchModel=l[e.matchId]?l[e.matchId]:null,p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&p.remapMatchIdForResultsMarkets(l,e),e})),e.tieBreakers.goldenGoals.length?(d=e.tieBreakers.goldenGoals.map((function(e){return e.playerId})),[4,this.playerFacade.getPlayersMapWithNativeIds(d)]):[3,8];case 7:h=s.sent(),e.tieBreakers.goldenGoals=e.tieBreakers.goldenGoals.map((function(e){return e.matchModel=l[e.matchId],e.playerModel=h[e.playerId],p.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&(e.matchId=l[e.matchId].id,e.playerId=h[e.playerId].id),e})),s.label=8;case 8:return[2,e];case 9:return[2]}}))}))},this.completeContestWinners=function(e){return i(n,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:return t=e.userList.map((function(e){return e.profileId})),[4,this.profileNamespace.getByIds(t)];case 1:return n=r.sent(),e.userList.forEach((function(e){var t=n.filter((function(t){return t.id===e.profileId}))[0];delete t.interests,e.profileModel=t})),[2,e]}}))}))},this.handleMatchModel=function(e,t){e[t.matchId]?(t.matchModel=e[t.matchId],delete t.matchModel.availableMarkets,t.matchId=t.matchModel.id):(t.matchModel=null,n.idMapping.idSchema!==T.IdSchemaEnum.NATIVE&&n.idMapping.idMappingFacade.getEntityById(t.matchId,"match","native").then((function(e){t.matchId=e[S.ID_TYPES[n.idMapping.idSchema]]})))},this.remapMatchIdForResultsMarkets=function(e,t){e[t.matchId]?t.matchId=e[t.matchId].id:n.idMapping.idMappingFacade.getEntityById(t.matchId,"match","native").then((function(e){t.matchId=e[S.ID_TYPES[n.idMapping.idSchema]]}))},this.deleteUnexpectedProperties=function(e){return e.status&&(console.warn(O.WarningMessages.UNEXPECTED_STATUS_PROP),delete e.status),e.type&&(console.warn(O.WarningMessages.UNEXPECTED_TYPE_PROP),delete e.type),e},this.footballHttps=new p.default(e),this.idMapping=t,this.matchFacade=new f.default(e,this.footballHttps,t),this.playerFacade=new _.default(e,this.footballHttps,t),this.profileNamespace=new R.default(e)}},2310:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4021),i=n(4904),s=n(8097),a=n(5318),o=n(7974),u=n(1976),c=n(1206),l=n(5274),d=n(1465),h=n(7535),p=n(1718),f=n(7307),m=n(5132),v=n(7344),y=n(1855),g=n(1732),w=n(5814),b=n(3950),_=n(1260),E=n(7640),I=n(2535);t.default=function(e){var t=this;this.errorHandlingMode=null,this.validateBodyFields=function(e,n){var r=Object.keys(n),i=Object.keys(new b.default);switch(e){case"MATCH_QUIZ":r.forEach((function(e){i.includes(e)||t.throwInvalidParamException([e])}));break;case"TOP_X":var s=n;s.fixtures.forEach((function(e){return t.validateMarketTopX(e.market)})),r.includes("tiebreaker")&&s.tiebreaker&&t.validateTiebreaker(s.tiebreaker),r.forEach((function(e){"tiebreaker"===e||i.includes(e)||t.throwInvalidParamException([e])}))}var a=i.filter((function(e){return!r.includes(e)}));return a.length&&t.throwMissingFieldsException("game prediction body",a),n.fixtures.forEach((function(e){t.validateFixtureFields(e)})),n},this.validateFixture=function(e,n,r,i){t.validateMarket(n);var s=Object.values(u.OneXTwoEnum),a=Object.values(u.HalfTimeFullTimeEnum),b=Object.values(u.DoubleChanceEnum);if(n===o.MarketEnum.FT_1X2||n===o.MarketEnum.HT_1X2){if(s.includes(r))return new p.default(e,n,r)}else if(n===o.MarketEnum.HT_FT){if(a.includes(r))return new f.default(e,r)}else if(n===o.MarketEnum.DOUBLE_CHANCE){if(b.includes(r))return new h.default(e,r)}else if(n===o.MarketEnum.CORRECT_SCORE||n===o.MarketEnum.CORRECT_SCORE_ADVANCED||n===o.MarketEnum.CORRECT_SCORE_HT){if("string"==typeof r&&/\d+:\d+/.test(r))return new d.default(e,n,r)}else if(n===o.MarketEnum.CORNERS_MATCH){if("number"==typeof r)return new l.default(e,r)}else if(n===o.MarketEnum.BOTH_TEAMS_SCORE){if(t.isPredictionBoolean(r))return new c.default(e,r)}else if(n===o.MarketEnum.RED_CARD_MATCH){if(t.isPredictionBoolean(r))return new w.default(e,r)}else if(n===o.MarketEnum.PENALTY_MATCH){if(t.isPredictionBoolean(r))return new y.default(e,r)}else if(o.playerMarkets.includes(n)){var _="OWN_GOAL";if(t.validatePlayerId(n,i),n===o.playerMarketNobodyPrediction&&t.isPredictionBoolean(r)){var E=i&&i===_?_:i;return new g.default(e,n,r,E)}if(i&&t.isPredictionBoolean(r))return new g.default(e,n,r,i)}else if(o.MarketsOverGoals.includes(n)){if(t.isPredictionBoolean(r))return new v.default(e,n,r)}else if(o.MarketsOverCorners.includes(n)&&t.isPredictionBoolean(r))return new m.default(e,n,r);t.throwInvalidPredictionException(r,n)},this.validateFixtureFields=function(e){var n=Object.keys(e);n.forEach((function(e){_.validFixtureFields.includes(e)||t.throwInvalidParamException([e])}));var r=_.validFixtureFields.filter((function(e){if("matchType"!==e&&!n.includes(e))return e}));r.length&&t.throwMissingFieldsException("fixtures",r),t.validatePredictionKey(e.market,e.prediction)},this.validateTiebreaker=function(e){var n=Object.keys(e);n.length&&"object"==typeof e||t.throwInvalidType("tiebreaker","object");var r=Object.keys(new E.default)[0];n.forEach((function(e){r!==e&&t.throwInvalidParamException([e])})),n.includes(r)||t.throwMissingFieldsException("tiebreaker",[r]),"number"!=typeof e.goldenGoal&&t.throwInvalidType("goldenGoal","number")},this.validatePredictionKey=function(e,n){if("object"==typeof n){var r=Object.keys(n),i=["value"];if(r.length||t.throwMissingFieldsException("prediction",i),1!==r.length||r.includes(i[0])||t.throwInvalidParamException(r),r.length>1){o.playerMarkets.includes(e)&&i.push("playerId");var s=r.filter((function(e){return!i.includes(e)}));s.length&&t.throwInvalidParamException(s)}}else t.throwInvalidType("prediction","object")},this.validatePlayerId=function(e,n){var r="playerId";e!==o.playerMarketNobodyPrediction&&(n||t.throwInvalidParamException([r]),"string"!=typeof n&&t.throwInvalidType(r,"string"))},this.validateMarket=function(e){Object.values(o.MarketEnum).includes(e)||t.throwInvalidMarketException(e)},this.validateMarketTopX=function(e){e!==o.MarketEnum.CORRECT_SCORE&&e!==o.MarketEnum.CORRECT_SCORE_ADVANCED&&t.throwInvalidMarketException(e,"TOP_X")},this.isPredictionBoolean=function(e){return"boolean"==typeof e},this.throwInvalidPredictionException=function(e,n){var o=(0,a.invalidPredictionMessage)(e,n);if("default"===t.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_PREDICTION,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidMarketException=function(e,n){var o;if(o=n&&"TOP_X"===n?(0,a.invalidMarketTopXMessage)(e):(0,a.invalidMarketMessage)(e),"default"===t.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_MARKET,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidParamException=function(e){var n=(0,a.invalidFieldMessage)(e);if("default"===t.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,n);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,n).response},this.throwMissingFieldsException=function(e,n){var o=(0,a.missingFieldsMessage)(e,n);if("default"===t.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_FIELD,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.throwInvalidType=function(e,n){var o=(0,a.invalidTypeMessage)(e,n);if("default"===t.errorHandlingMode)throw new s.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o);throw new I.default(r.ErrorCodes.BAD_METHOD_CALL,i.ErrorStatuses.INVALID_TYPE,o).response},this.errorHandlingMode=e}},4831:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});var a=n(9072),o=n(7232),u=n(4268);t.default=function(e,t,n,c,l,d){var h=this;this.idsRemapper=null,this.profileHttps=null,this.profileService=null,this.localStorage=null,this.profileFacade=null,this.ownProfile=null,this.modified=!1,this.expireAt=0,this.promises=[],this.isFetching=!1,this.getOwnProfile=function(){return r(h,void 0,void 0,(function(){var e,t,n;return i(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(e=Math.floor(Date.now()/1e3),this.ownProfile&&!(this.expireAt<e))return[3,7];this.isFetching=!0,this.expireAt=Math.floor(Date.now()/1e3)+600,r.label=3;case 3:return r.trys.push([3,5,,6]),[4,this.profileFacade.getOwn()];case 4:return t=r.sent(),this.setOwnProfile(t),[3,6];case 5:throw n=r.sent(),this.isFetching=!1,n;case 6:return this.modified=!1,this.isFetching=!1,[2,this.ownProfile];case 7:return[2,this.ownProfile]}}))}))},this.delay=function(e){return new Promise((function(t){setTimeout(t,e)}))},this.setOwnProfile=function(e){h.ownProfile=e},this.getInfo=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return e=n.sent(),delete(t=JSON.parse(JSON.stringify(e))).interests,[2,t]}}))}))},this.showInterests=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return e=n.sent(),t=JSON.parse(JSON.stringify(e)),[4,this.idsRemapper.remapInterests(t.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return e=n.sent(),t=JSON.parse(JSON.stringify(e)),[4,this.idsRemapper.showFullInterests(t.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowers(e)];case 1:return[2,t.sent()]}}))}))},this.getFollowing=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowing(e)];case 1:return[2,t.sent()]}}))}))},this.follow=function(e){return r(h,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.follow(e)];case 1:return t=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,t]}}))}))},this.unfollow=function(e){return r(h,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.profileFacade.unfollow(e)];case 1:return t=r.sent(),[4,this.profileFacade.updateOwnProfile()];case 2:return n=r.sent(),this.setOwnProfile(n),[2,t]}}))}))},this.getStats=function(){return r(h,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getStats()];case 1:return e=t.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(e)];case 2:return[2,t.sent()]}}))}))},this.getBadges=function(){return r(h,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getBadges()];case 1:return[2,e.sent()]}}))}))},this.addInterestPromise=function(e){return r(h,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return r.sent(),t=null,"custom"===e.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(e)];case 2:return t=r.sent(),[3,4];case 3:t=e,r.label=4;case 4:return n=this.ownProfile.interests.filter((function(e){return e.id!==t.id||e.type!==t.type||e.source!==t.source})),this.ownProfile.interests=s([],n,!0),this.ownProfile.interests.push(t),[2,this]}}))}))},this.addInterest=function(e){return h.promises.push(h.addInterestPromise(e)),h},this.removeInterestPromise=function(e){return r(h,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return n.sent(),t=null,"custom"===e.source?[3,3]:[4,this.idsRemapper.remapInterestToNative(e)];case 2:return t=n.sent(),[3,4];case 3:t=e,n.label=4;case 4:return this.ownProfile.interests=this.ownProfile.interests.filter((function(e){return e.id!==t.id||e.type!==t.type||e.source!==t.source})),[2,this]}}))}))},this.removeInterest=function(e){return h.promises.push(h.removeInterestPromise(e)),h},this.setBirthdatePromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),this.ownProfile.birthDate=e||null,[2,this]}}))}))},this.setBirthdate=function(e){return h.promises.push(h.setBirthdatePromise(e)),h},this.setGenderPromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),this.ownProfile.gender="male"===e||"female"===e?e:"unspecified",[2,this]}}))}))},this.setGender=function(e){return h.promises.push(h.setGenderPromise(e)),h},this.setNicknamePromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),this.ownProfile.nickname=e,[2,this]}}))}))},this.setNickname=function(e){return h.promises.push(h.setNicknamePromise(e)),h},this.setNamePromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),this.ownProfile.name=e,[2,this]}}))}))},this.setName=function(e){return h.promises.push(h.setNamePromise(e)),h},this.setCountryPromise=function(e){return r(h,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.modified=!0,[4,this.getOwnProfile()];case 1:return t.sent(),e&&!this.ownProfile.country?(this.ownProfile.country=new a.default,this.ownProfile.country.id=e):e&&this.ownProfile.country?this.ownProfile.country.id=e:this.ownProfile.country=null,[2,this]}}))}))},this.setCountry=function(e){return h.promises.push(h.setCountryPromise(e)),h},this.showFullnessProfile=function(){return r(h,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getOwnProfile()];case 1:return e=n.sent(),t=JSON.parse(JSON.stringify(e)),[2,this.profileFacade.showFullnessProfile(t)]}}))}))},this.update=function(){return r(h,void 0,void 0,(function(){var e,t,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return 0===this.promises.length?[2,this.ownProfile]:[4,Promise.all(this.promises)];case 1:return i.sent(),[4,this.profileFacade.getOwn()];case 2:return e=i.sent(),[4,this.getOwnProfile()];case 3:return t=i.sent(),n=this.profileService.extractUpdatedProps(e,t),this.modified=!1,this.expireAt=0,Object.keys(n).length?[4,this.profileHttps.updateProfile(n)]:[3,5];case 4:return r=i.sent(),s=JSON.parse(JSON.stringify(r)),this.setOwnProfile(s),this.localStorage.setOwnProfile(s),delete r.interests,[2,r];case 5:return delete(a=JSON.parse(JSON.stringify(this.ownProfile))).interests,[2,a]}}))}))},this.idsRemapper=e,this.localStorage=t,this.profileHttps=n,this.profileService=new u.default,this.profileFacade=new o.default(t,n,c)}},642:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(7232);t.default=function(e,t,n,a){var o=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.profileFacade=null,this.profileId="",this.setId=function(e){return o.profileId=e,o},this.getProfile=function(){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileFacade.getById(this.profileId)];case 1:return[2,e.sent()]}}))}))},this.getInfo=function(){return r(o,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.getProfile()];case 1:return delete(e=t.sent()).interests,[2,e]}}))}))},this.showInterests=function(){return r(o,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return e=n.sent(),t=JSON.parse(JSON.stringify(e)),[4,this.idsRemapper.remapInterests(t.interests)];case 2:return[2,n.sent()]}}))}))},this.showFullInterests=function(){return r(o,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.getProfile()];case 1:return e=n.sent(),t=JSON.parse(JSON.stringify(e)),[4,this.idsRemapper.showFullInterests(t.interests)];case 2:return[2,n.sent()]}}))}))},this.getFollowers=function(e){return r(o,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowers(e,this.profileId)];case 1:return[2,t.sent()]}}))}))},this.getFollowing=function(e){return r(o,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getFollowing(e,this.profileId)];case 1:return[2,t.sent()]}}))}))},this.showFullnessProfile=function(){return r(o,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.getProfile()];case 1:return e=t.sent(),[2,this.profileFacade.showFullnessProfile(e)]}}))}))},this.getStats=function(e){return r(o,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.activityHttps.getStats(this.profileId,e)];case 1:return t=n.sent(),[4,this.idsRemapper.remapSuccessRatesEntities(t)];case 2:return[2,n.sent()]}}))}))},this.getBadges=function(){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.profileHttps.getBadges(this.profileId)];case 1:return[2,e.sent()]}}))}))},this.idsRemapper=e,this.profileHttps=n,this.activityHttps=a,this.profileFacade=new s.default(t,n,a)}},7232:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(9037),a=n(9523);t.default=function(e,t,n){var o=this;this.isBrowser=!1,this.localStorage={},this.profileHttps=null,this.activityHttps=null,this.getOwn=function(){return r(o,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=this.getLocalStorageData("profile"))?[2,JSON.parse(JSON.stringify(e))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getProfile()];case 2:return n=i.sent(),this.localStorage.setOwnProfile(n),[2,n];case 3:throw t=i.sent(),console.warn("There was a problem retrieving your profile: ",t),t;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getProfile()];case 6:return[2,n=i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving your profile: ",r),r;case 8:return[2]}}))}))},this.updateOwnProfile=function(){return r(o,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile()];case 1:return e=n.sent(),this.localStorage.setOwnProfile(e),[2,e];case 2:throw t=n.sent(),console.warn("There was a problem retrieving your profile: ",t),t;case 3:return[2]}}))}))},this.getByIds=function(e,t){return r(o,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=t||!1,[4,this.profileHttps.getProfiles(e,t)];case 1:return[2,r.sent()];case 2:throw n=r.sent(),console.warn("There was a problem retrieving the selected profiles: "+e.join(",")+" ",n),n;case 3:return[2]}}))}))},this.getById=function(e){return r(o,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.getProfile(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem retrieving the selected profile: "+e+" ",t),t;case 3:return[2]}}))}))},this.getCountries=function(e){return r(o,void 0,void 0,(function(){var t,n,r,s;return i(this,(function(i){switch(i.label){case 0:return e=e||!1,this.isBrowser?(t=this.localStorage.getProfileCountries())&&t.length>0?[2,t]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getCountries(e)];case 2:return n=i.sent(),this.localStorage.setProfileCountries(n),[2,n];case 3:throw r=i.sent(),console.warn("There was a problem retrieving profile countries: ",r),r;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getCountries(e)];case 6:return[2,i.sent()];case 7:throw s=i.sent(),console.warn("There was a problem retrieving profile countries: ",s),s;case 8:return[2]}}))}))},this.getFollowers=function(e,t){return r(o,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),e&&(e=new a.default(e)),[4,this.profileHttps.getFollowers(e,t)];case 1:return n=i.sent(),(r=n.data.map((function(e){return e.followerId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return s=i.sent(),o=n.data.map((function(e){return s.forEach((function(t){e.followerId===t.id&&(e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar)})),e})),n.data=o,[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(e,t){return r(o,void 0,void 0,(function(){var n,r,s,o,u;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,4,,5]),e&&(e=new a.default(e)),[4,this.profileHttps.getFollowing(e,t)];case 1:return n=i.sent(),(r=n.data.map((function(e){return e.followingId}))).length?[4,this.getByIds(r)]:[3,3];case 2:return s=i.sent(),o=n.data.map((function(e){return s.forEach((function(t){e.followingId===t.id&&(e.name=t.name,e.nickname=t.nickname,e.avatar=t.avatar)})),e})),n.data=o,[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(e){return r(o,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.follow(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem following profiles: "+e.join(",")+" ",t),t;case 3:return[2]}}))}))},this.unfollow=function(e){return r(o,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.profileHttps.unfollow(e)];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.warn("There was a problem unfollowing profiles: "+e.join(",")+" ",t),t;case 3:return[2]}}))}))},this.showFullnessProfile=function(e){var t=new s.default,n=0;return e.avatar&&(t.breakdown.addedAvatar.completed=!0,n+=t.breakdown.addedAvatar.percentage),e.birthDate&&(t.breakdown.addedBirthdate.completed=!0,n+=t.breakdown.addedBirthdate.percentage),e.country&&(t.breakdown.addedCountry.completed=!0,n+=t.breakdown.addedCountry.percentage),e.gender&&(t.breakdown.addedGender.completed=!0,n+=t.breakdown.addedGender.percentage),e.interests&&e.interests.length>0&&(e.interests.find((function(e){return"team"===e.type&&e.favourite}))&&(t.breakdown.teamFavourite.completed=!0,n+=t.breakdown.teamFavourite.percentage),e.interests.find((function(e){return"team"===e.type}))&&(t.breakdown.teamFollowed.completed=!0,n+=t.breakdown.teamFollowed.percentage),e.interests.find((function(e){return"player"===e.type&&e.favourite}))&&(t.breakdown.playerFavourite.completed=!0,n+=t.breakdown.playerFavourite.percentage),e.interests.find((function(e){return"player"===e.type}))&&(t.breakdown.playerFollowed.completed=!0,n+=t.breakdown.playerFollowed.percentage),e.interests.find((function(e){return"competition"===e.type&&e.favourite}))&&(t.breakdown.competitionFavourite.completed=!0,n+=t.breakdown.competitionFavourite.percentage),e.interests.find((function(e){return"competition"===e.type}))&&(t.breakdown.competitionFollowed.completed=!0,n+=t.breakdown.competitionFollowed.percentage)),t.totalPercentage=n,t},this.getStats=function(){return r(o,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=this.getLocalStorageData("statistics"))&&Object.keys(e).length?[2,JSON.parse(JSON.stringify(e))]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.activityHttps.getStats()];case 2:return t=i.sent(),this.localStorage.setProfileStats(t),[2,t];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.activityHttps.getStats()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile statistics: ",r),r;case 8:return[2]}}))}))},this.getBadges=function(){return r(o,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return this.isBrowser?(e=this.getLocalStorageData("badges"))?[2,e]:[3,1]:[3,5];case 1:return i.trys.push([1,3,,4]),[4,this.profileHttps.getBadges()];case 2:return t=i.sent(),this.localStorage.setProfileBadges(t),[2,t];case 3:throw n=i.sent(),console.warn("There was a problem retrieving own profile badges: ",n),n;case 4:return[3,8];case 5:return i.trys.push([5,7,,8]),[4,this.profileHttps.getBadges()];case 6:return[2,i.sent()];case 7:throw r=i.sent(),console.warn("There was a problem retrieving own profile badges: ",r),r;case 8:return[2]}}))}))},this.getLocalStorageData=function(e){var t=Math.floor(Date.now()/1e3),n=o.localStorage.getExpiration("profile",e);switch(e){case"profile":if(n>t)return o.localStorage.getOwnProfile();case"statistics":if(n>t)return o.localStorage.getProfileStats();case"badges":if(n>t)return o.localStorage.getProfileBadges();default:return null}},this.isBrowser="undefined"!=typeof window,this.localStorage=e,this.profileHttps=t,this.activityHttps=n}},9523:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=this;this.limit=0,this.startAfter=null,this.constructFilterUrl=function(){var e="";return t.limit&&(e=(e+="&")+"limit="+t.limit),t.startAfter&&(e=(e+="&")+"start_after="+t.startAfter),e},this.limit=e.limit?e.limit:20,this.startAfter=e.startAfter?e.startAfter:null}},4782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.avatar=null,this.followerId=null,this.name=null,this.nickname=null,this.profileId=null}},1712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.profile_ids=[]}},3106:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.avatar=null,this.followingId=null,this.name=null,this.nickname=null,this.profileId=null}},6620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7312);t.default=function(){this.teamFollowed=new r.default(10),this.teamFavourite=new r.default(15),this.playerFollowed=new r.default(10),this.playerFavourite=new r.default(10),this.competitionFollowed=new r.default(10),this.competitionFavourite=new r.default(5),this.addedBirthdate=new r.default(10),this.addedGender=new r.default(10),this.addedCountry=new r.default(10),this.addedAvatar=new r.default(10)}},7312:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){this.completed=!1,this.percentage=e}},9037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6620);t.default=function(){this.breakdown=new r.default}},9072:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.name=null,this.assets=null}},3546:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.id=null,this.name=null,this.nickname=null,this.avatar=null,this.gender=null,this.country=null,this.birthDate=null,this.interests=[],this.followingCount=0,this.followersCount=0}},6277:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1553),i=n(4782);t.default=function(){var e=this;this.followersFromResponse=function(t){var n=new r.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.remapResponse(t)})),n},this.remapResponse=function(e){var t=new i.default;return t.avatar=e.avatar,t.followerId=e.follower_id,t.name=e.name,t.profileId=e.profile_id,t}}},8673:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1553),i=n(3106);t.default=function(){var e=this;this.followResponse=function(t){return t.map((function(t){return e.remapResponse(t)}))},this.followingFromResponse=function(t){var n=new r.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.remapResponse(t)})),n},this.remapResponse=function(e){var t=new i.default;return t.avatar=e.avatar,t.followingId=e.following_id,t.name=e.name,t.profileId=e.profile_id,t.nickname=e.nickname,t}}},441:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3546);t.default=function(){var e=this;this.profilesFromResponse=function(t){return t?t.map((function(t){return e.fullProfileFromResponse(t)})):null},this.fullProfileFromResponse=function(e){var t=new r.default;return t.id=e.id,t.name=e.name,t.nickname=e.nickname,t.avatar=e.avatar,t.gender=e.gender,t.country=e.country,t.birthDate=e.birth_date,t.interests=e.interests?e.interests:[],t.followingCount=e.following_count,t.followersCount=e.followers_count,t}}},1316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5123);t.default=function(){this.successRates=new r.default}},9826:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.model=null}},5123:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){}},6409:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4275),a=n(8900),o=n(7232),u=n(5601),c=n(4831),l=n(642),d=n(4289),h=n(595),p=n(1022),f=n(4912);t.default=function(e){var t=this;this.idsRemapper=null,this.profileHttps=null,this.activityHttps=null,this.footballHttps=null,this.footballFacade=null,this.idMapping=null,this.localStorage=null,this.profileFacade=null,this.ownProfileBuilder=null,this.profileBuilder=null,this.getOwn=function(){return t.ownProfileBuilder},this.getById=function(e){return t.profileBuilder.setId(e)},this.getCountries=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getCountries(e)];case 1:return[2,t.sent()]}}))}))},this.getByIds=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileFacade.getByIds(e,n)];case 1:return[2,t.sent()]}}))}))},this.profileHttps=new s.default(e),this.activityHttps=new p.default(e),this.footballHttps=new h.default(e),this.idMapping=new a.default(e),this.localStorage=new u.default(e),this.footballFacade=new d.default(e,this.localStorage,this.footballHttps,this.idMapping),this.profileFacade=new o.default(this.localStorage,this.profileHttps,this.activityHttps),this.idsRemapper=new f.default(e,this.footballFacade),this.ownProfileBuilder=new c.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps,this.idMapping,this.footballFacade),this.profileBuilder=new l.default(this.idsRemapper,this.localStorage,this.profileHttps,this.activityHttps)}},4268:function(e,t){"use strict";var n=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){var e=this;this.extractUpdatedProps=function(t,n){var r=["name","nickname","gender"],i={};return Object.keys(t).forEach((function(s){if(r.includes(s)&&t[s]!==n[s])i[s]=n[s];else if("birthDate"===s)(null===n[s]||null===t[s]&&n[s]||t[s]!==n[s])&&(i.birth_date=n[s]);else if("country"===s)null===n[s]?i.country_id=n[s]:(null===t[s]&&n[s]||t[s].id!==n[s].id)&&(i.country_id=n[s].id);else if("interests"===s){var a=t[s],o=n[s];o.length&&e.isNewInterest(a,o)?i[s]=e.updateInterests(a,o):!o.length&&a.length?i[s]=o:a.length===o.length||e.isNewInterest(a,o)||(i[s]=o)}})),i},this.updateInterests=function(t,r){if(t.length===r.length){var i=e.extractSameAndNewInterests(t,r),s=i[0],a=i[1];return n(n([],a,!0),s,!0)}return r},this.isNewInterest=function(t,n){var r=!1;return e.extractSameAndNewInterests(t,n)[0].length?r=!0:r},this.extractSameAndNewInterests=function(e,t){var n=t.filter((function(t){return e.some((function(e){return t.id===e.id&&t.type===e.type&&t.source===e.source&&t.favourite===e.favourite}))}));return[t.filter((function(t){return!e.some((function(e){return t.id===e.id&&t.type===e.type&&t.source===e.source&&t.favourite===e.favourite}))})),n]}}},853:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GameStatusEnum=void 0,(n=t.GameStatusEnum||(t.GameStatusEnum={})).OPEN="OPEN",n.LIVE="LIVE",n.PENDING="PENDING",n.CANCELED="CANCELED",n.CLOSED="CLOSED",n.SETTLED="SETTLED"},9502:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(4946),a=n(2793),o=n(5013),u=n(853),c=n(7299),l=n(1553),d=n(1399),h=n(7782),p=n(7686),f=n(2310),m=n(8097),v=n(4904),y=n(5318),g=n(4021),w=n(2535);t.default=function(e,t){var n=this;this.idMapping=null,this.predictorHttps=null,this.predictorService=null,this.predictorValidator=null,this.clientHttps=null,this.errorHandlingMode=null,this.getConfig=function(){return r(n,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return[4,this.clientHttps.getConfig(p.FeatureConfigType.TOP_X)];case 1:return e=t.sent(),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,3]:[4,this.predictorService.remapCompetitionsFromConfig(e)];case 2:return[2,t.sent()];case 3:return[2,e]}}))}))},this.getGames=function(e,t){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return t=t||!1,n=this.predictorService.initGameFilters("TOP_X",e),[4,this.predictorHttps.getGames(n,t)];case 1:return r=i.sent(),[4,this.predictorService.remapMatchIdsFixtures(r)];case 2:return[2,i.sent()]}}))}))},this.getGameById=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return t=t||!1,[4,this.predictorHttps.getGameById(e,t)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getGamePredictions=function(e,t,s){return r(n,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return s=s||!1,t&&(t.type&&delete t.type,t.status&&delete t.status,t=new h.default(t)),[4,this.predictorHttps.getGamePredictions(e,s,t)];case 1:return[2,n.sent()]}}))}))},this.getGameResults=function(e,t,s){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return s=s||!1,t&&(t=new c.default(t)),[4,this.predictorHttps.getGameResults(e,s,t)];case 1:return n=r.sent(),[4,this.predictorService.remapMatchIdsFixtures(n)];case 2:return[2,r.sent()]}}))}))},this.getCurrentGameResults=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return e=e||!1,t={status:u.GameStatusEnum.OPEN,type:"TOP_X"},t=new c.default(t),[4,this.predictorHttps.getGames(t,e)];case 1:return n=i.sent(),r=this.predictorService.getCurrentGameId(n),[4,this.getGameResults(r,null,e)];case 2:return[2,i.sent().data[0]]}}))}))},this.play=function(e){return r(n,void 0,void 0,(function(){var t,n,r,a,o=this;return i(this,(function(i){switch(i.label){case 0:return t=new d.default(e),(t=this.predictorValidator.validateBodyFields("TOP_X",t)).fixtures=t.fixtures.map((function(e){return o.predictorValidator.validateFixture(e.matchId,e.market,e.prediction.value)})),this.idMapping.idSchema===s.IdSchemaEnum.NATIVE?[3,2]:(n=[],t.fixtures.forEach((function(e){return n.push(e.matchId)})),[4,this.predictorService.remapMatchIdToNative(n)]);case 1:r=i.sent(),t.fixtures.forEach((function(e){return e.matchId=r.shift()})),i.label=2;case 2:return[4,this.predictorHttps.makeFootballPrediction(t)];case 3:return(a=i.sent()).fixtures.forEach((function(e){e.matchId=e.matchModel.id})),[2,a]}}))}))},this.delete=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.predictorHttps.deleteFootballPrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGameEditions=function(e,t){return r(n,void 0,void 0,(function(){var n,r,s,a,o;return i(this,(function(i){switch(i.label){case 0:return e&&e.limit&&this.validateLimitFilterOnGames(e.limit),t=t||!1,n=this.predictorService.initGameTypePredictions("TOP_X",e),r=[],[4,this.predictorHttps.getMyPredictionsNoRemap(n)];case 1:return(s=i.sent()).data.length>0?(s.data.forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),a=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(a,t)]):[3,4];case 2:return o=i.sent(),[4,this.predictorService.addPredictionProp(s,o)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getMyGamePrediction=function(e){return r(n,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getMyPredictions(t)];case 1:return(n=i.sent()).data.length>0?[2,(r=n.data.filter((function(t){return t.gameInstanceId===e}))).length?r[0]:null]:[2,null]}}))}))},this.getUserGameEditions=function(e,t,s){return r(n,void 0,void 0,(function(){var n,r,a,o,u;return i(this,(function(i){switch(i.label){case 0:return t&&t.limit&&this.validateLimitFilterOnGames(t.limit),s=s||!1,n=this.predictorService.initGameTypePredictions("TOP_X",t),r=[],[4,this.predictorHttps.getUserPredictionsNoRemap(e,n)];case 1:return(a=i.sent()).data.length>0?(a.data.forEach((function(e){e.game_instance_id&&r.push(e.game_instance_id)})),o=this.predictorService.initGameFilters("TOP_X",null,r),[4,this.predictorHttps.getUserGameEditions(o,s)]):[3,4];case 2:return u=i.sent(),[4,this.predictorService.addPredictionProp(a,u)];case 3:return[2,i.sent()];case 4:return[2,new l.default]}}))}))},this.getUserGamePrediction=function(e,t,s){return r(n,void 0,void 0,(function(){var n,r,a;return i(this,(function(i){switch(i.label){case 0:return s=s||!1,n=this.predictorService.initGameTypePredictions("TOP_X"),[4,this.predictorHttps.getUserPredictions(e,s,n)];case 1:return(r=i.sent()).data.length>0?[2,(a=r.data.filter((function(e){return e.gameInstanceId===t}))).length?a[0]:null]:[2,null]}}))}))},this.getMarketsResultsForGame=function(e,t){return r(n,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getMarketResultsForGame(e,t)];case 1:return n=r.sent(),[4,this.predictorService.completeGameMarketResults(n,"TOP_X")];case 2:return[2,r.sent()]}}))}))},this.getGameWinners=function(e){return r(n,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.predictorHttps.getContestWinners(e)];case 1:return t=r.sent(),[4,this.getGameById(e)];case 2:return n=r.sent(),t.contestModel=n,[2,this.predictorService.completeContestWinners(t)]}}))}))},this.validateLimitFilterOnGames=function(e){if("default"===n.errorHandlingMode&&e>50)throw new m.default(g.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,y.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED);if("standard"===n.errorHandlingMode&&e>50)throw new w.default(g.ErrorCodes.BAD_METHOD_CALL,v.ErrorStatuses.EXCEEDED_LENGTH,y.ErrorMessages.QUERY_PARAM_FILTERS_LIMIT_EXCEEDED).response},this.idMapping=t,this.errorHandlingMode=e.errorHandlingMode,this.predictorValidator=new f.default(e.errorHandlingMode),this.predictorHttps=new a.default(e,t),this.predictorService=new o.default(e,t),this.clientHttps=new p.default(e)}},1180:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.enabled=!1,this.minFixtures=null,this.maxFixtures=null,this.competitionsWhitelist=null}},7482:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6899);t.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default}},5967:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6899),i=n(3381);t.default=function(){this.matchId=null,this.matchType=null,this.market=null,this.matchModel=null,this.matchStatus=new r.default,this.prediction=new i.default}},6247:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.adContent=null,t.labels=null,t.customFields=null,t}return i(t,e),t}(n(3751).default);t.default=s},6890:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.userId=null,this.points=null,this.results=[],this.tiebreaker=null}},6160:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.matchId=null,this.matchModel=null,this.outcome=null}},7299:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var s=n(4800),a=n(853),o=function(e){function t(t){var n=e.call(this,t)||this;return n.status=null,n.type=null,n.gameIds=null,n.sortOrder=null,n.constructFiltersUrl=function(){var t=e.prototype.constructMainFiltersUrl.call(n);return n.status&&Object.values(a.GameStatusEnum).includes(n.status)&&(t+="&",t+="status="+n.status),n.type&&(t+="&",t+="type="+n.type),n.gameIds&&n.gameIds.length>0&&(t+="&",t+="game_ids="+n.gameIds.join(",")),n.sortOrder&&(t+="&",t+="sort_order="+n.sortOrder),t},n.status=t.status?t.status:null,n.type=t.type?t.type:null,n.gameIds=t.gameIds?t.gameIds:null,n.sortOrder=t.sortOrder?t.sortOrder:null,n}return i(t,e),t}(s.default);t.default=o},3751:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(439),i=n(4916);t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.scheduleOpenAt=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new i.default,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.images=new r.default,this.createdAt=null,this.updatedAt=null}},4780:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7482),i=n(8410),s=n(5967),a=n(6890),o=n(6160),u=n(3751),c=n(7243),l=n(8950),d=n(7640),h=n(1553),p=n(670),f=n(7974),m=n(4916),v=n(3483),y=n(1784),g=n(824),w=n(6899),b=n(6247);t.default=function(){var e=this;this.remapPaginatedGames=function(t){var n=new h.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},this.remapGamesListResponse=function(t){var n=new u.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,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):null,n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.images=t.images,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapGameByIdResponse=function(t){var n=new b.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,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):null,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.images=t.images,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapFixturesResponse=function(e){var t=new r.default;return t.matchId=e.match_id,t.matchType=e.match_type,t.market=e.market,t.matchStatus.type=e.match_status.type,t.matchStatus.subType=e.match_status.sub_type,t},this.remapPaginatedUserTopXEditions=function(t){var n=new h.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},this.remapUserTopXEditionsResponse=function(t){var n=new l.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,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):null,n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.images=t.images,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapTopXFixturesResponse=function(e){var t=new s.default;return t.matchId=e.match_id,t.matchType=e.match_type,t.market=e.market,t.matchStatus.type=e.match_status.type,t.matchStatus.subType=e.match_status.sub_type,t},this.remapPaginatedUserMathQuizEditions=function(t){var n=new h.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},this.remapUserMatchQuizEditionsResponse=function(t){var n=new c.default;return n.id=t.id,n.title=t.title,n.description=t.description,n.type=t.type,n.status=t.status,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):null,n.excludedProfileIds=t.excluded_profile_ids,n.rules=t.rules,n.flags=t.flags,n.images=t.images,n.createdAt=t.created_at,n.updatedAt=t.updated_at,n},this.remapMatchQuizFixturesResponse=function(e){var t=new i.default;return t.matchId=e.match_id,t.matchType=e.match_type,t.market=e.market,t.matchStatus.type=e.match_status.type,t.matchStatus.subType=e.match_status.sub_type,t},this.remapPaginatedGameResults=function(t){var n=new h.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},this.remapGameResults=function(t){var n=new a.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},this.remapGameMarketsResults=function(t){var n=new p.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},this.remapContestWinners=function(t){var n=new y.default;return n.contestId=t.contest_id,n.contestType=t.contest_type,n.description=t.description,n.userList=t.user_list.map((function(t){return e.remapUserListWinners(t)})),n},this.remapUserListWinners=function(e){var t=new g.default;return t.position=e.position,t.profileId=e.profile_id,t.note=e.note,t.tags=e.tags,t},this.remapTieBreakers=function(e){var t={goldenGoals:[]};return t.goldenGoals=e.golden_goals.map((function(e){return{minute:e.minute,matchId:e.match_id,matchModel:null,playerId:e.player_id,playerModel:null,goalType:e.goal_type}})),t},this.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},this.remapMarketsResultsMatchStatus=function(e){var t=new w.default;return t.type=e.type,t.subType=e.sub_type,t},this.remapMarketResult=function(e,t){return f.endMarkMarkets.includes(e)?t[0]:f.playerMarkets.includes(e)?t:"true"===t[0]||"false"!==t[0]&&void 0},this.deleteUnusefulField=function(t){return f.playerMarkets.includes(t.market)&&!e.isPlayerMarketWithNoResult(t.market,t.result)||delete t.playerModels,t},this.isPlayerMarketWithNoResult=function(e,t){return f.playerMarkets.includes(e)&&0===t.length},this.remapResults=function(e){var t=new o.default;return t.matchId=e.match_id,t.outcome=e.outcome,t},this.remapTiebreaker=function(e){var t=new d.default;return t.goldenGoal=e.golden_goal,t},this.remapTimeTiebreaker=function(e){var t=new m.default;return t.timeTiebreaker=e,t},this.remapRelated=function(e){return e.map((function(e){var t=new v.default;return t.entityId=e.entity_id,t.entityType=e.entity_type,t}))}}},8950:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4916),i=n(7640);t.default=function(){this.id=null,this.title=null,this.description=null,this.type=null,this.status=null,this.outcome=null,this.predictionsCutoff=null,this.fixtures=[],this.tiebreaker=new r.default,this.predictionId=null,this.participantsCount=0,this.related=null,this.excludedProfileIds=null,this.rules=null,this.flags=null,this.points=null,this.createdAt=null,this.updatedAt=null,this.predictionsMadeAt=null,this.scheduleOpenAt=null,this.images=null,this.predictionTiebreaker=new i.default}},7640:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.goldenGoal=null}},4916:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.timeTiebreaker=!1}},1784:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.contestId="",this.contestType="GAME",this.contestModel=null,this.description="",this.userList=[]}},824:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.position="",this.profileId="",this.profileModel=null,this.note="",this.tags=[]}},3381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(){this.value=null,this.result=null}},1399:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1465);t.default=function(e){var t=this;this.gameInstanceId=null,this.fixtures=[],this.tiebreaker=null,this.gameInstanceId=e.gameInstanceId,e.fixtures.forEach((function(e){return t.fixtures.push(new r.default(e.matchId,e.market,e.prediction.value))})),this.tiebreaker=e.tiebreaker?e.tiebreaker:null}},9596:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8900),a=n(9502);t.default=function(e){var t=this;this.topXFacade=null,this.idMapping=null,this.getConfig=function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.topXFacade.getConfig()];case 1:return[2,e.sent()]}}))}))},this.getGames=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGames(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGameById=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGameById(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGamePredictions=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGamePredictions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getGameResults=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGameResults(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getCurrentGameResults=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getCurrentGameResults(e)];case 1:return[2,t.sent()]}}))}))},this.play=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.play(e)];case 1:return[2,t.sent()]}}))}))},this.delete=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.delete(e)];case 1:return[2,t.sent()]}}))}))},this.getMyGameEditions=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getMyGameEditions(e,n)];case 1:return[2,t.sent()]}}))}))},this.getMyGamePrediction=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getMyGamePrediction(e)];case 1:return[2,t.sent()]}}))}))},this.getUserGameEditions=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getUserGameEditions(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getUserGamePrediction=function(e,n,s){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getUserGamePrediction(e,n,s)];case 1:return[2,t.sent()]}}))}))},this.getMarketsResultsForGame=function(e,n){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getMarketsResultsForGame(e,n)];case 1:return[2,t.sent()]}}))}))},this.getGameWinners=function(e){return r(t,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.topXFacade.getGameWinners(e)];case 1:return[2,t.sent()]}}))}))},this.idMapping=new s.default(e),this.topXFacade=new a.default(e,this.idMapping)}},4806:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var a=n(4946),o=n(712);t.default=function(e,t,n){var u=this;this.idMapping=null,this.idSchema=null,this.native=a.IdSchemaEnum.NATIVE,this.footballFacade=null,this.remapSuccessRatesEntities=function(e){return i(u,void 0,void 0,(function(){var t,n,r,i,a,o;return s(this,(function(s){switch(s.label){case 0:return t=e.successRates,n={competition:this.getIdsKeys(t.byFootballCompetition),team:this.getIdsKeys(t.byFootballTeam)},Object.values(n.competition).length?(r=e.successRates.byFootballCompetition,i=e.successRates,[4,this.setModels(r,n.competition,"competition")]):[3,2];case 1:i.byFootballCompetition=s.sent(),s.label=2;case 2:return Object.values(n.team).length?(a=e.successRates.byFootballTeam,o=e.successRates,[4,this.setModels(a,n.team,"team")]):[3,4];case 3:o.byFootballTeam=s.sent(),s.label=4;case 4:return[2,e]}}))}))},this.setModels=function(e,t,n){return i(u,void 0,void 0,(function(){var i,a;return s(this,(function(s){switch(s.label){case 0:switch(i=null,t=(0,o.sortArrayInAscOrder)(t),n){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 i=s.sent(),[3,5];case 3:return[4,this.footballFacade.getTeamsMapWithNativeIds(t)];case 5:return Object.keys(e).forEach((function(t){var n,s=i.get(t);(a=r(r({},a),((n={})[s.id]=e[t],n)))[s.id].model=s})),[2,a]}}))}))},this.getIdsKeys=function(e){var t=JSON.parse(JSON.stringify(e));return Object.keys(t)},this.remapInterestsToIdSchema=function(e){return i(u,void 0,void 0,(function(){var t,n,r,i,a,o,u,c,l,d;return s(this,(function(s){switch(s.label){case 0:return this.idSchema===this.native?[3,3]:e&&e.length>0?(t={},n={},e.forEach((function(e){t.hasOwnProperty(e.type)||(t[e.type]=[],n[e.type]=[]),t[e.type].push(e.id),n[e.type].push(e)})),[4,this.remapIdsObj(t,this.native,this.idSchema)]):[3,2];case 1:for(r=s.sent(),i=[],a=function(e,t){t.forEach((function(t,n){t.id=r[e][n],i.push(t)}))},o=0,u=Object.entries(n);o<u.length;o++)c=u[o],l=c[0],d=c[1],a(l,d);return[2,i];case 2:case 3:return[2,e]}}))}))},this.remapInterestToNative=function(e){return i(u,void 0,void 0,(function(){var t,n,r,i;return s(this,(function(s){switch(s.label){case 0:return this.idSchema===this.native?[3,2]:(t={},n=e.id,r=e.type,t[r]=[n],[4,this.remapIdsObj(t,this.idSchema,this.native)]);case 1:return i=s.sent(),e.id=i[r][0],[2,e];case 2:return[2,e]}}))}))},this.inquiryCustomInterests=function(e){var t=[];return e&&e.length>0&&(t=e.filter((function(e){return"CUSTOM"===e.source.toLocaleUpperCase()}))),t},this.remapInterests=function(e){return i(u,void 0,void 0,(function(){var t,n,r;return s(this,(function(i){switch(i.label){case 0:return(t=this.inquiryCustomInterests(e))&&t.length>0?(n=e.filter((function(e){return"CUSTOM"!==e.source.toLocaleUpperCase()})),[4,this.remapInterestsToIdSchema(n)]):[3,2];case 1:return r=i.sent(),t.forEach((function(e){return r.push(e)})),[2,r];case 2:return[4,this.remapInterestsToIdSchema(e)];case 3:return[2,i.sent()]}}))}))},this.showFullInterests=function(e){return i(u,void 0,void 0,(function(){var t,n,r,i,a,o,u,c;return s(this,(function(s){switch(s.label){case 0:return t=[],e&&e.length>0?(n=this.inquiryCustomInterests(e),t.push(n),r=e.filter((function(e){return"CUSTOM"!==e.source.toLocaleUpperCase()})),[4,this.getInterestsEntitiesMap(r)]):[3,2];case 1:return i=s.sent(),a=i.competitionsMap,o=i.teamsMap,u=i.playersMap,c=r.map((function(e){var t=null;return"competition"===e.type?((t=a.get(e.id))&&(e.id=t.id),e.model=t,e):"team"===e.type?((t=o.get(e.id))&&(e.id=t.id),e.model=t,e):"player"===e.type?(u?(e.model=u[e.id],e.id=u[e.id].id):e.model=t,e):void 0})),t.push(c),[2,t.flat()];case 2:return[2,t]}}))}))},this.getInterestsEntitiesMap=function(e){return i(u,void 0,void 0,(function(){var t,n,r,i,a,u,c;return s(this,(function(s){switch(s.label){case 0:return t=[],n=[],r=[],i=new Map,a=new Map,u=null,e.forEach((function(e){"competition"===e.type?t.push(e.id):"team"===e.type?n.push(e.id):"player"===e.type&&r.push(e.id)})),t.length?(c=(0,o.sortArrayInAscOrder)(t),[4,this.footballFacade.getCompetitionsMapWithNativeIds(c)]):[3,2];case 1:i=s.sent(),s.label=2;case 2:return n.length?(c=(0,o.sortArrayInAscOrder)(n),[4,this.footballFacade.getTeamsMapWithNativeIds(c)]):[3,4];case 3:a=s.sent(),s.label=4;case 4:return r.length?(c=(0,o.sortArrayInAscOrder)(r),[4,this.footballFacade.getPlayersMapWithNativeIds(c)]):[3,6];case 5:u=s.sent(),s.label=6;case 6:return[2,{competitionsMap:i,teamsMap:a,playersMap:u}]}}))}))},this.remapIdsObj=function(e,t,n){return i(u,void 0,void 0,(function(){return s(this,(function(r){switch(r.label){case 0:return[4,this.idMapping.idMappingFacade.getEntitiesByIds(e,t,n)];case 1:return[2,r.sent()]}}))}))},this.idMapping=n,this.idSchema=e.idSchema,this.footballFacade=t}},4912:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{u(r.next(e))}catch(e){s(e)}}function o(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}};Object.defineProperty(t,"__esModule",{value:!0});var s=n(8900),a=n(4806);t.default=function(e,t){var n=this;this.idMapping=null,this.profileOperations=null,this.remapSuccessRatesEntities=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileOperations.remapSuccessRatesEntities(e)];case 1:return[2,t.sent()]}}))}))},this.remapInterestToNative=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileOperations.remapInterestToNative(e)];case 1:return[2,t.sent()]}}))}))},this.remapInterests=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileOperations.remapInterests(e)];case 1:return[2,t.sent()]}}))}))},this.showFullInterests=function(e){return r(n,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.profileOperations.showFullInterests(e)];case 1:return[2,t.sent()]}}))}))},this.idMapping=new s.default(e),this.profileOperations=new a.default(e,t,this.idMapping)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.FansUnitedSDK=void 0;var t=n(6409),i=n(6595),s=n(8808),a=n(4946),o=n(1259),u=n(2962),c=n(9627),l=n(2671),d=n(9377),h=n(9596),p=n(267),f=n(7302),m=n(2141),v=n(7070),y=n(9580);e.FansUnitedSDK=function(e){var n=(new i.default).validate(e);if(n.idSchema.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.idSchema.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.idSchema.message.text),e.idSchema=a.IdSchemaEnum.NATIVE),n.environment.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.environment.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.environment.message.text),e.environment=l.EnvironmentEnum.PROD),n.lang.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.lang.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.lang.message.text),e.lang=d.LangEnum.EN),n.errorHandlingMode.validation!==c.ValidationResponseEnum.MISSING_VALUE&&n.errorHandlingMode.validation!==c.ValidationResponseEnum.INVALID_VALUE||(console.warn(n.errorHandlingMode.message.text),e.errorHandlingMode=y.ErrorHandlingModeEnum.DEFAULT),n.authProvider.validation===c.ValidationResponseEnum.INVALID_VALUE&&console.warn(n.authProvider.message.text),n.isValid)return{profile:new t.default(e),football:new s.default(e),predictor:new o.default(e),loyalty:new u.default(e),topX:new h.default(e),matchQuiz:new p.default(e),activity:new f.default(e)};g(n)};var g=function(e){var t="authProvider",n="isValid";Object.keys(e).forEach((function(r){var i=e[r];if(r!==n&&r!==t){if(i.message.type===m.LogEnum.ERROR)throw new Error(i.message.text)}else r!==n&&r===t&&Object.keys(new v.default).forEach((function(e){if(i[e].message.type===m.LogEnum.ERROR)throw new Error(i[e].message.text)}))}))}})(),r})()}));
2
2
  //# sourceMappingURL=index.js.map