{"version":3,"sources":["scripts/InitSideGameConsolePage.js"],"names":["OBJSIDEGAMEIN","CasinoCDN","CasinoImageGameCDN","CasinoMobileDevice","LastUpdate","enableSquareLayout","getLastPlayedSidegame","localStorage","getItem","JSON","parse","saveLastSidegame","idGame","idProvider","setItem","stringify","SetSideGameConsole","obj","$","support","cors","ajax","url","type","contentType","dataType","async","crossDomain","success","response","CasinoCDNImageGame","CasinoRevision","Revision","CasinoMinify","Minify","rel","href","appendTo","getScripts","getSideGames","names","callback","received","realCallback","length","i","cache","result","urlReq","restCall","setSideGames","$HtmlHeader","append","$HtmlSideGames","$HtmlData","wf","container","width","p","UrlSideGame","sID","lastPlayedSidegame","getAspectRatio","hf","each","v","newLabel","isSideTagExpired","SideGame","NewExpire","IdGame","IdProvider","Game","getSideProviderResource","Img","html","addCss","Swiper","slidesPerView","spaceBetween","pagination","el","dynamicBullets","dynamicMainBullets","autoplay","delay","disableOnInteraction","loop","sendFrameHeight","tooltip","setTimeout","window","parent","postMessage","iframeHeight","height","SetGame","attr","css","top","GetSideCardGame","json","animate","$HtmlGame","$HtmlNew","$HtmlJackpot","clickgame","$HtmlAdd","ExclusiveExpire","$HtmlInfo","addClass","InEvidenza","Jackpot","img","location","addSuffix","addPath","indexOf","ProviderResource","toLowerCase","replace","lzw_encode","s","currChar","dict","data","split","out","phrase","code","push","charCodeAt","String","fromCharCode","join","lzw_decode","oldPhrase","currCode","charAt","showPreloadCnt","show","hidePreloadCnt","hide","date","dateNow","Date","dateExpire","getTime"],"mappings":"AAAA,IAAIA,cAAeC,UAAY,KAAMC,mBAAqB,KAAMC,oBAAqB,EAAOC,WAAa,GACrGC,oBAAqB,EACzB,SAASC,wBACL,GAAyB,oBAAd,SACHC,aAAaC,QAAQ,gBACrB,OAAOC,KAAKC,MAAMH,aAAaC,QAAQ,iBAOnD,SAASG,iBAAiBC,EAAQC,GACL,oBAAd,SACPN,aAAaO,QAAQ,eAAgBL,KAAKM,UAAU,CAAEH,OAAQA,EAAQC,W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AW,IACFZ,EAAKhF,GAGL+E,EAAKa,GAAYb,EAAKa,GAAaD,EAAYb,EAE5DI,EAAIG,KAAKF,GACTL,EAAWK,EAAOU,OAAO,GACzBd,EAAKK,GAAQO,EAAYb,EACzBM,IACAO,EAAYR,EAEhB,OAAOD,EAAIO,KAAK,IAEpB,SAASK,iBACLzH,EAAE,YAAY0H,OAElB,SAASC,iBACL3H,EAAE,YAAY4H,OAIlB,SAAS3E,iBAAiB4E,GACtB,IAAIC,EAAU,IAAIC,KACdC,EAAa,IAAID,KAAY,IAAPF,GAC1B,OAAIC,EAAQG,UAAYD,EAAWC","sourcesContent":["var OBJSIDEGAMEIN, CasinoCDN = null, CasinoImageGameCDN = null, CasinoMobileDevice = false, LastUpdate = \"\"; \r\nvar enableSquareLayout = true; \r\nfunction getLastPlayedSidegame() {\r\n if (typeof (Storage) !== \"undefined\") { \r\n if (localStorage.getItem(\"LastSidegame\")) {\r\n return JSON.parse(localStorage.getItem(\"LastSidegame\"));\r\n }\r\n }\r\n \r\n return undefined;\r\n}\r\n\r\nfunction saveLastSidegame(idGame, idProvider) {\r\n if (typeof (Storage) !== \"undefined\") {\r\n localStorage.setItem(\"LastSidegame\", JSON.stringify({ idGame: idGame, idProvider: idProvider}))\r\n }\r\n}\r\n\r\nfunction SetSideGameConsole(obj) {\r\n OBJSIDEGAMEIN = obj; \r\n $.support.cors = true;\r\n $.ajax({\r\n url: obj.url + \"rest/configurationbetflag\",\r\n type: \"GET\",\r\n contentType: \"application/json; charset=utf-8\",\r\n dataType: \"json\",\r\n async: true,\r\n crossDomain: true,\r\n success: function (response) {\r\n LastUpdate = response[0].LastUpdate; \r\n CasinoCDN = response[0].CasinoCDN;\r\n CasinoImageGameCDN = response[0].CasinoCDNImageGame; \r\n var CasinoRevision = response[0].Revision; \r\n var CasinoMinify = response[0].Minify;\r\n \r\n $('', {\r\n rel: 'stylesheet',\r\n type: 'text/css',\r\n href: CasinoCDN + 'styles/SideGameConsoleNew' + CasinoMinify +'.css' + CasinoRevision\r\n }).appendTo('head');\r\n var scriptToAdd = [\r\n CasinoCDN + \"scripts/plugin/LazyLoad.js\",\r\n CasinoCDN + \"scripts/ajax.js\" + CasinoRevision,\r\n ];\r\n\r\n getScripts(scriptToAdd, getSideGames)\r\n \r\n // getSideGames(response);\r\n }\r\n });\r\n}\r\n\r\nfunction getScripts(names, callback) {\r\n var received = 0;\r\n var realCallback = function () {\r\n received++;\r\n if (received === names.length) {\r\n $(callback);\r\n }\r\n };\r\n for (var i = 0; i < names.length; i++) { \r\n $.ajax({\r\n cache: true,\r\n url: names[i],\r\n dataType: 'script',\r\n success: realCallback\r\n });\r\n }\r\n}\r\n\r\nfunction getSideGames(result) {\r\n var urlReq = OBJSIDEGAMEIN.url + \"rest/sidegames/0\";\r\n restCall(urlReq, setSideGames); \r\n}\r\n\r\nfunction setSideGames(result) {\r\n var $HtmlHeader = $(\"
\");\r\n $HtmlHeader.append(\"
Sidegames
\");\r\n var $HtmlSideGames = $(\"
\");\r\n var $HtmlData = $(\"
\");\r\n\r\n var wf = $(OBJSIDEGAMEIN.container).width();\r\n var p = 1.34;\r\n\r\n var UrlSideGame = \"\";\r\n if (OBJSIDEGAMEIN.sID != \"\") {\r\n UrlSideGame = OBJSIDEGAMEIN.url + \"sidegameconsole.aspx?init=true&sID=\" + OBJSIDEGAMEIN.sID;\r\n var lastPlayedSidegame = getLastPlayedSidegame();\r\n if (lastPlayedSidegame != null) {\r\n p = getAspectRatio(lastPlayedSidegame.idProvider);\r\n UrlSideGame = OBJSIDEGAMEIN.url + \"sidegameconsole.aspx?gID=\" + lastPlayedSidegame.idGame + \"&pID=\" + lastPlayedSidegame.idProvider + \"&sID=\" + OBJSIDEGAMEIN.sID;\r\n }\r\n else {\r\n p = getAspectRatio(6);\r\n UrlSideGame = OBJSIDEGAMEIN.url + \"sidegameconsole.aspx?gID=31197&pID=6&sID=\" + OBJSIDEGAMEIN.sID;\r\n }\r\n } else {\r\n p = 1.34;\r\n UrlSideGame = OBJSIDEGAMEIN.url + \"sidegameconsole.aspx?init=true\";\r\n }\r\n var hf = (wf * p);\r\n\r\n // controllare se ho già giocato allora cambio l'ordine\r\n // var alreadyPlayed = OBJSIDEGAMEIN.sID;\r\n var alreadyPlayed = true;\r\n if (alreadyPlayed) {\r\n $.each(result, function (i, v) {\r\n var newLabel = \"\";\r\n if (!isSideTagExpired(v.SideGame.NewExpire)) {\r\n newLabel = \"

New

\";\r\n }\r\n $HtmlSideGames.append(\r\n \"
\" +\r\n \"
\" +newLabel + \"\\\"side
\" +\r\n \"
\"\r\n );\r\n });\r\n\r\n $HtmlData.append(\r\n \"
\" +\r\n \"
\" +\r\n $HtmlSideGames.html() +\r\n \"
\" +\r\n \"
\" +\r\n // \"
\" +\r\n // \"
\" +\r\n \"
\"\r\n );\r\n } else {\r\n $.each(result, function (i, v) {\r\n $HtmlSideGames.append(GetSideCardGame(v[\"SideGame\"]));\r\n });\r\n $HtmlData.append(\r\n \"
\" +\r\n $HtmlSideGames.html() +\r\n \"
\"\r\n );\r\n }\r\n\r\n var addCss = \"\";\r\n if (enableSquareLayout) {\r\n addCss = \"square-layout\";\r\n }\r\n\r\n $(OBJSIDEGAMEIN.container).html(\r\n \"
\" +\r\n $HtmlHeader.html() +\r\n (alreadyPlayed ? $HtmlData.html() : \"\") +\r\n \"
\" +\r\n \"\" +\r\n \"
\" +\r\n (!alreadyPlayed ? $HtmlData.html() : \"\") +\r\n \"
\"\r\n );\r\n\r\n if (alreadyPlayed) {\r\n // var SwiperSideGameConsole = new Swiper('.SideGameConsole-wrapper', {\r\n // slidesPerView: 5,\r\n // spaceBetween: 0,\r\n // slidesPerGroup: 1,\r\n // loop: true,\r\n // loopFillGroupWithBlank: true,\r\n // navigation: {\r\n // nextEl: '.swiper-button-next',\r\n // prevEl: '.swiper-button-prev',\r\n // }\r\n // });\r\n var SwiperSideGameConsole = new Swiper('.SideGameConsole-wrapper', {\r\n slidesPerView: 3.5,\r\n // slidesPerGroup: 4,\r\n spaceBetween: 4,\r\n // slidesPerColumnFill: \"row\",\r\n // loop: true,\r\n pagination: {\r\n el: '.swiper-pagination',\r\n type: 'bullets',\r\n dynamicBullets: true,\r\n dynamicMainBullets: 5\r\n },\r\n autoplay: {\r\n delay: 6000,\r\n disableOnInteraction: false\r\n },\r\n loop: true\r\n // navigation: {\r\n // nextEl: '.swiper-button-next',\r\n // prevEl: '.swiper-button-prev',\r\n // }\r\n });\r\n }\r\n\r\n sendFrameHeight();\r\n $('[data-toggle=\"tooltip\"]').tooltip({ html: true });\r\n}\r\n\r\nfunction sendFrameHeight() {\r\n setTimeout(() => {\r\n window.parent.postMessage({ iframeHeight: $(\"#sidegamesContainer\").height() }, \"*\");\r\n }, 500);\r\n}\r\n\r\nfunction getAspectRatio(idProvider) {\r\n var p = 1.34;\r\n switch (idProvider) {\r\n case 6:\r\n case \"6\":\r\n case 1024:\r\n case \"1024\":\r\n p = 2.32;\r\n break;\r\n case 10:\r\n case \"10\":\r\n p = 1.34; \r\n break;\r\n case 94:\r\n case \"94\":\r\n p = 2.1; \r\n break;\r\n }\r\n return p;\r\n}\r\n\r\nfunction SetGame(IdGame, IdProvider) {\r\n if (OBJSIDEGAMEIN.sID != \"\") {\r\n var UrlSideGame = OBJSIDEGAMEIN.url + \"sidegameconsole.aspx?gID=\" + IdGame + \"&pID=\" + IdProvider + \"&sID=\" + OBJSIDEGAMEIN.sID; \r\n var wf = $(OBJSIDEGAMEIN.container).width();\r\n var p = getAspectRatio(IdProvider);\r\n saveLastSidegame(IdGame, IdProvider);\r\n var hf = (wf * p); \r\n $(\"#SideGameConsole\").attr('src', UrlSideGame);\r\n $(\"#SideGameConsole\").css('height', hf + \"px\");\r\n sendFrameHeight();\r\n } else {\r\n window.top.postMessage(\"login\", \"*\");\r\n }\r\n}\r\n\r\nfunction GetSideCardGame(json, css, animate) {\r\n var $HtmlGame = $(\"
\");\r\n var $HtmlNew = $(\"
\");\r\n var $HtmlJackpot = $(\"
\");\r\n var clickgame = \"SetGame(\" + json.IdGame + \", \" + json.IdProvider + \");\";\r\n var $HtmlAdd = $(\"
\");\r\n if (!isSideTagExpired(json.ExclusiveExpire)) {\r\n $HtmlInfo.append(\"

Esclusivo

\");\r\n } \r\n\r\n if (!isSideTagExpired(json.NewExpire)) {\r\n $HtmlInfo.append(\"

New

\");\r\n } \r\n\r\n //var addClass = \"animated \";\r\n //if (animate == null) {\r\n // addClass = addClass + \"fadeIn \";\r\n //} else {\r\n // addClass = addClass + animate + \" \";\r\n //}\r\n var addClass = \"\";\r\n if (animate != null) { \r\n addClass = animate + \" \";\r\n }\r\n if (json.InEvidenza != \"0\") {\r\n addClass = addClass + \"ie\" + json.InEvidenza + \" \";\r\n }\r\n if (css != null) {\r\n addClass = addClass + css;\r\n }\r\n //if (json.BonusBloccato == \"1\") {\r\n // addClass = addClass + \" nobonus\";\r\n // $HtmlAdd.append(\"
\\\"Gioca\\\"GIOCABILE SOLO CON SALDO REALE
\");\r\n //}\r\n \r\n if (json.Jackpot != \"\") { \r\n $HtmlJackpot.append(\"
JACKPOT \" + json.Jackpot + \"€
\");\r\n }\r\n $HtmlGame.append(\r\n \"
\" +\r\n $HtmlNew.html() +\r\n $HtmlAdd.html() +\r\n \"
\" +\r\n \"
\\\"Gioca\\\"
\" +\r\n \"\\\"\"\" +\r\n $HtmlJackpot.html() +\r\n \"
\" +\r\n \"
\"+\r\n \"
\" +\r\n \"
\" +\r\n \"

\" + json.Game + \"

\" +\r\n \"
\" +\r\n \"
\"\r\n );\r\n return $HtmlGame.html();\r\n}\r\n\r\nfunction getSideProviderResource(idProvider, img, location) {\r\n var addSuffix = \"\";\r\n var addPath = \"\";\r\n if (enableSquareLayout) {\r\n addSuffix = \"-square\";\r\n addPath = \"square/\";\r\n }\r\n\r\n if (img.indexOf(\".svg\") != -1) {\r\n return CasinoCDN + \"image/svg/\" + idProvider + \"/\" + img;\r\n }\r\n var ProviderResource = CasinoImageGameCDN + \"image/game\";\r\n switch (location) {\r\n case \"icon\":\r\n ProviderResource += \"/img-xxs/\"\r\n break;\r\n case \"cart\":\r\n ProviderResource += \"/img-og/\"\r\n break;\r\n case \"card\":\r\n /*switch (breakpoint) {\r\n case \"xl\":\r\n ProviderResource += \"/img-xl/\"\r\n break;\r\n case \"lg\":\r\n case \"md\":\r\n ProviderResource += \"/img-xs/\"\r\n break;\r\n case \"xs\":\r\n case \"sm\":\r\n ProviderResource += \"/img-md/\"\r\n break;\r\n }*/\r\n // ProviderResource += \"/img-md/\"\r\n ProviderResource += \"/img-md\" + addSuffix + \"/\" + addPath;\r\n break;\r\n }\r\n if (img) { img = img.toLowerCase().replace(\".png\", \".jpg\"); }\r\n\r\n return ProviderResource + idProvider + \"/\" + img;\r\n}\r\nfunction lzw_encode(s) {\r\n var dict = {};\r\n var data = (s + \"\").split(\"\");\r\n var out = [];\r\n var currChar;\r\n var phrase = data[0];\r\n var code = 256;\r\n for (var i = 1; i < data.length; i++) {\r\n currChar = data[i];\r\n if (dict[phrase + currChar] != null) {\r\n phrase += currChar;\r\n }\r\n else {\r\n out.push(phrase.length > 1 ? dict[phrase] : phrase.charCodeAt(0));\r\n dict[phrase + currChar] = code;\r\n code++;\r\n phrase = currChar;\r\n }\r\n }\r\n out.push(phrase.length > 1 ? dict[phrase] : phrase.charCodeAt(0));\r\n for (var i = 0; i < out.length; i++) {\r\n out[i] = String.fromCharCode(out[i]);\r\n }\r\n return out.join(\"\");\r\n}\r\nfunction lzw_decode(s) {\r\n var dict = {};\r\n var data = (s + \"\").split(\"\");\r\n var currChar = data[0];\r\n var oldPhrase = currChar;\r\n var out = [currChar];\r\n var code = 256;\r\n var phrase;\r\n for (var i = 1; i < data.length; i++) {\r\n var currCode = data[i].charCodeAt(0);\r\n if (currCode < 256) {\r\n phrase = data[i];\r\n }\r\n else {\r\n phrase = dict[currCode] ? dict[currCode] : (oldPhrase + currChar);\r\n }\r\n out.push(phrase);\r\n currChar = phrase.charAt(0);\r\n dict[code] = oldPhrase + currChar;\r\n code++;\r\n oldPhrase = phrase;\r\n }\r\n return out.join(\"\");\r\n}\r\nfunction showPreloadCnt() {\r\n $(\".preload\").show();\r\n}\r\nfunction hidePreloadCnt() {\r\n $(\".preload\").hide();\r\n }\r\n\r\n \r\nfunction isSideTagExpired(date) {\r\n var dateNow = new Date();\r\n var dateExpire = new Date(date * 1000);\r\n if (dateNow.getTime() > dateExpire.getTime()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}"],"file":"InitSideGameConsolePage.min.js"}