PageSourceSearch

https://www.rezultati.com/x/js/core_14_2316000000.js

js rezultati.com collected 2026-09-25 07:57:32 UTC 160,010 bytes, 3,188 lines download raw bytes

1/* Copyright (c) 2006-2026 Livesport s.r.o.
2 * You are not allowed to copy or redistribute this file.
3 */
4
5/**
6 * Get existing league ID
7 *
8 * @param object
9 * @param id
10 * @returns Data_Item|null
11 */
12function getExistingLeagueId(object, id)
13{
14	var leagueItem;
15	try
16	{
17		leagueItem = object.getItem(id);
18	}
19	catch(err) {
20		leagueItem = null;
21	}
22
23	return leagueItem;
24}
25
26/** Set league display
27*/
28function expand_collapse_league_load()
29{
30	if (country == null)
31	{
32		var cookie_name = 'fsdc_expand_collapse_league';
33		var tmp_cookie = clientStorage.get(cookie_name);
34
35		// there are leagues in cookie
36		if (tmp_cookie != null && tmp_cookie.length > 0)
37		{
38			// set custom flag for games
39			cjs.dic.get('dataLeagueHolderProxy').getHandler().each(function(index, id)
40			{
41				if (tmp_cookie.match(id) == null)
42				{
43					return;
44				}
45				var leagueItem = getExistingLeagueId(this, id);
46				if (!leagueItem)
47				{
48					return;
49				}
50				if (leagueItem.getValue('ZD') == 'c')
51				{
52					leagueItem.setValue('display', true);
53				}
54				else
55				{
56					leagueItem.setValue('display', false);
57				}
58			});
59		}
60	}
61};
62
63// global variables {{{
64    // config variables
65var cjs = {
66        'classes': {},
67        'noDuelSports': [23,31,32,33,34,35,37,38,39,40,41],
68        'parentSports': {"32":31,"33":31,"38":37,"39":37,"40":37,"41":37},
69        'childSportsCount': 38,
70        'categorySports': [2,16,17,21,25,28,23,31,32,33,34,36,37,38,39,40,41],
71        eventId: null,
72        fromGlobalScope: {},
73        'portable': {},
74        initialFeeds: [],
75        ...cjs,
76        'constants': {
77            'soundSportConfig': {"soccer":{"finished":"commonEndOfGame","correction":"commonCorrection","score-incremented":"commonCheers"},"tennis":{"finished":"tennisGameSetMatch","correction":"commonCorrection","score-incremented":"tennisGameSet","tennis-game":"tennisGame"},"basketball":{"finished":"commonEndOfGame","correction":"commonCorrection"},"hockey":{"finished":"commonEndOfGame","correction":"commonCorrection","score-incremented":"commonCheers"},"american-football":{"finished":"commonEndOfGame","correction":"commonCorrection","score-incremented":"commonCheers"},"baseball":{"finished":"commonEndOfGame","correction":"commonCorrection"},"handball":{"finished":"commonEndOfGame","correction":"commonCorrection"},"rugby-union":{"finished":"commonEndOfGame","correction":"commonCorrection","score-incremented":"commonCheers"},"floorball":{"finished":"commonEndOfGame","correction":"commonCorrection","score-incremented":"commonCheers"},"bandy":{"finished":"commonEndOfGame","correction":"commonCorrection","score-incremented":"commonCheers"},"futsal":{"finished":"commonEndOfGame","correction":"commonCorrection","score-incremented":"commonCheers"},"volleyball":{"correction":"commonCorrection","score-incremented":"commonCheers"},"aussie-rules":{"finished":"commonEndOfGame","correction":"commonCorrection"},"rugby-league":{"finished":"commonEndOfGame","correction":"commonCorrection","score-incremented":"commonCheers"},"cricket":{"finished":"commonEndOfGame","correction":"commonCorrection"},"darts":{"finished":"commonEndOfGame","correction":"commonCorrection"},"snooker":{"finished":"commonEndOfGame","correction":"commonCorrection"},"boxing":{"finished":"commonEndOfGame","correction":"commonCorrection"},"beach-volleyball":{"finished":"commonEndOfGame","correction":"commonCorrection"},"badminton":{"correction":"commonCorrection"},"water-polo":{"finished":"commonEndOfGame","correction":"commonCorrection"},"field-hockey":{"finished":"commonEndOfGame","correction":"commonCorrection"},"table-tennis":{"correction":"commonCorrection"},"beach-soccer":{"finished":"commonEndOfGame","correction":"commonCorrection"},"mma":{"finished":"commonEndOfGame","correction":"commonCorrection"},"netball":{"finished":"commonEndOfGame","correction":"commonCorrection"},"pesapallo":{"finished":"commonEndOfGame","correction":"commonCorrection"},"golf":{"finished":"commonEndOfGame"},"motorsport":[],"motorsport-auto-racing":[],"motorsport-moto-racing":[],"cycling":[],"horse-racing":[],"esports":{"finished":"commonEndOfGame","correction":"commonCorrection"},"winter-sports":[],"winter-sports-ski-jumping":[],"winter-sports-alpine-skiing":[],"winter-sports-cross-country":[],"winter-sports-biathlon":[],"kabaddi":{"finished":"commonEndOfGame","correction":"commonCorrection"}},
78            'sportOddsTypeList': {"1":"1x2","2":"12","3":"12","4":"1x2","5":"12","6":"12","7":"1x2","8":"1x2","9":"1x2","10":"1x2","11":"1x2","12":"12","18":"12","19":"1x2","13":"12","14":"12","15":"12","16":"1x2","17":"12","21":"12","22":"1x2","24":"1x2","25":"12","26":"1x2","28":"12","29":"12","30":"1x2","23":"12","31":"
7812","32":"12","33":"12","34":"12","35":"12","36":"12","37":"12","38":"12","39":"12","40":"12","41":"12","42":"1x2"},
79            ...(cjs && cjs.constants ? cjs.constants : {}),
80        },
81    };
82
83    cjs.ready = new Promise(function (resolve) {
84        if (cjs._dicReady) {
85            resolve();
86        } else {
87            cjs._markReady = resolve;
88        }
89    });
90
91            cjs.search = {
92            'disabledSports': [32,33]        };
93
94        document.lsadvert_display = document.lsadvert_display || function() {};
95    document.displayTrustedAdvert = document.displayTrustedAdvert || function() {};
96    cjs.full_loaded = false;
97    cjs.repair_loaded = false;
98    cjs.hourFormat = 'H:i';
99    cjs.dateTimeFormat = 'd.m. H:i';
100    cjs.fullDateTimeFormat = 'd.m.Y H:i';
101    cjs.fullDateFormat = 'd.m.Y';
102    cjs.fullDateShortFormat = 'd.m.Y';
103    cjs.dateFormat = 'd.m.';
104    cjs.geoIP = null;
105    cjs.geoIPCityName = null;
106    cjs.geoIPSubdivisionName0 = null;
107    cjs.geoIPSubdivisionCode0 = null;
108    cjs.geoIPIsoSubdivisionCode0 = null;
109    cjs.geoIPSubdivisionName1 = null;
110    cjs.prepareGeoIP = function()
111    {
112        if (this.geoIP)
113        {
114            return;
115        }
116        cjs.Api.loader.get("geoIpResolver").call();
117    };
118    var feed_sign = 'SW9D1eZo';
119    // data containers
120    var fs_counter;
121    var fsEventsUpdatedStartTime = {};
122cjs._config = {"js_serial":"2316000000","js":{"time_keep_match_live":180},"app":{"version":"8.38.0","icon_action_svg":"\/res\/_fs\/image\/13_symbols\/action.svg?serial=1760","lang":{"charset":"hr_HR","web":"hr","dc":14,"meta_content":"hr"},"lang_combo":{"enable":false,"project_list":false,"has_lang_from_subdomain":false},"noduel_events":{"mygames":10,"main":{"default":40,"golf":30,"motorsport-auto-racing":40,"motorsport-moto-racing":40,"cycling":10,"winter-sports-ski-jumping":10,"winter-sports-alpine-skiing":10,"winter-sports-cross-country":10,"winter-sports-biathlon":10},"tournament_page":{"winter-sports-ski-jumping":1000,"winter-sports-alpine-skiing":1000,"winter-sports-cross-country":1000,"winter-sports-biathlon":1000},"participant_page":{"meetings":{"winter-sports-ski-jumping":5,"winter-sports-alpine-skiing":5,"winter-sports-cross-country":5,"winter-sports-biathlon":5},"events":{"motorsport-auto-racing":10,"motorsport-moto-racing":10,"cycling":10}},"categories":{"6576":10,"7771":10}},"mygames":{"enable":true,"position":"left","groups":{"enable":false},"past_days":1,"future_days":7,"maximum_count":200},"calendar_range":7,"google_analytics":{"enable":true},"video_highlights_live_icon":{"enable":true},"US_time_format":false,"US_style_win_loss_mark":false,"project_type":{"id":1,"name":"_fs","us_web":false},"popup":false,"js_redirect":false,"myteams":{"enable":true,"maximum_count":200},"has_category_page":[2,21,23,31,32,33,36],"banner":{"zone_list":{"background":{"name":"background","definitions":[{"zoneId":1066,"size":{"width":1920,"height":1200},"breakpoint":{"min":1048,"max":9999}}],"renderer":"wallpaper"},"left_menu_1":{"name":"left_menu_1","definitions":[{"zoneId":37,"size":{"width":140,"height":240},"breakpoint":{"min":640,"max":9999}}]},"left_menu_2":{"name":"left_menu_2","definitions":[{"zoneId":187,"size":{"width":140,"height":240},"breakpoint":{"min":640,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"left_menu_3":{"name":"left_menu_3","definitions":[{"zoneId":3844,"size":{"width":140,"height":240},"breakpoint":{"min":640,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"right_top":{"name":"right_top","definitions":[{"zoneId":5312,"size":{"width":300,"height":600},"breakpoint":{"min":1048,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"right_zone_1":{"name":"right_zone_1","definitions":[{"zoneId":5313,"size":{"width":300,"height":600},"breakpoint":{"min":1048,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"right_zone_2":{"name":"right_zone_2","definitions":[{"zoneId":5314,"size":{"width":300,"height":600},"breakpoint":{"min":1048,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"top":{"name":"top","definitions":[{"zoneId":38,"size":{"width":970,"height":90},"breakpoint":{"min":1048,"max":9999}}],"rendererOptions":{"labelPosition":"Right","displayPlaceholder":true}},"content_bottom":{"name":"content_bottom","definitions":[{"zoneId":279,"size":{"width":480,"he
122ight":480},"breakpoint":{"min":1,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"detail_top":{"name":"detail_top","definitions":[{"zoneId":5076,"size":{"width":970,"height":90},"breakpoint":{"min":1048,"max":9999}}],"rendererOptions":{"labelPosition":"Right","displayPlaceholder":true}},"detail_content":{"name":"detail_content","definitions":[{"zoneId":36,"size":{"width":480,"height":480},"breakpoint":{"min":1,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"responsive_standings_fixed_bottom":{"name":"responsive_standings_fixed_bottom","definitions":[{"zoneId":3558,"size":{"width":320,"height":50},"breakpoint":{"min":320,"max":727},"refreshInterval":45},{"zoneId":3559,"size":{"width":728,"height":90},"breakpoint":{"min":728,"max":999},"refreshInterval":45}]},"detail_background":{"name":"detail_background","definitions":[{"zoneId":19001,"size":{"width":3000,"height":2000},"breakpoint":{"min":1048,"max":9999}}],"renderer":"wallpaper"},"detail_left_menu_1":{"name":"detail_left_menu_1","definitions":[{"zoneId":19009,"size":{"width":140,"height":240},"breakpoint":{"min":640,"max":9999}}]},"detail_left_menu_2":{"name":"detail_left_menu_2","definitions":[{"zoneId":19013,"size":{"width":140,"height":240},"breakpoint":{"min":640,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"detail_left_menu_3":{"name":"detail_left_menu_3","definitions":[{"zoneId":19017,"size":{"width":140,"height":240},"breakpoint":{"min":640,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"detail_right_top":{"name":"detail_right_top","definitions":[{"zoneId":18937,"size":{"width":300,"height":600},"breakpoint":{"min":1048,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"detail_right_zone_1":{"name":"detail_right_zone_1","definitions":[{"zoneId":18939,"size":{"width":300,"height":600},"breakpoint":{"min":1048,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"detail_right_zone_2":{"name":"detail_right_zone_2","definitions":[{"zoneId":18941,"size":{"width":300,"height":600},"breakpoint":{"min":1048,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"detail_right_zone_3":{"name":"detail_right_zone_3","definitions":[{"zoneId":19033,"size":{"width":300,"height":600},"breakpoint":{"min":1048,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"detail_right_zone_4":{"name":"detail_right_zone_4","definitions":[{"zoneId":19037,"size":{"width":300,"height":600},"breakpoint":{"min":1048,"max":9999}}],"rendererOptions":{"displaySkeleton":false}},"detail_box_over_content":{"name":"detail_box_over_content","definitions":[{"zoneId":19005,"size":{"width":688,"height":85},"breakpoint":{"min":728,"max":9999},"rendererOptions":{"sticky":true}},{"zoneId":19041,"size":{"width":320,"height":100},"breakpoint":{"min":320,"max":727}}]},"responsive_fixed_bottom":{"name":"responsive_fixed_bottom","definitions":[{"zoneId":3556,"size":{"width":320,"height":50},"breakpoint":{"min":320,"max":727},"refreshInterval":45},{"zoneId":3557,"size":{"width":728,"height":90},"breakpoint":{"min":728,"max":999},"refreshInterval":45}]},"responsive_detail_fixed_bottom":{"name":"responsive_detail_fixed_bottom","definitions":[{"zoneId":3558,"size":{"width":320,"height":50},"breakpoint":{"min":320,"max":727},"refreshInterval":45,"allowedClientTypes":["mobile","tablet"]},{"zoneId":3559,"size":{"width":728,"height":90},"breakpoint":{"min":728,"max":9999},"refreshInterval":45,"allowedClientTypes":["mobile","tablet"]}]},"premium_square_mobile":{"name":"premium_square_mobile","definitions":[{"zoneId":6146,"size":{"width":480,"height":480},"breakpoint":{"min":300,"max":639}}],"renderer":"dynamic"},"box_over_content":{"name":"box_over_content","definitions":[{"zoneId":9533,"size":{"width":688,"height":85},"breakpoint":{"min":728,"max":9999}},{"zoneId":9535,"size":{"width":320,"height":100},"breakpoint":{"min":320,"max":727}}],"rendererOptions":{"sticky":true}}},"show_advertisement_label":false,"advertisement_label":{"odds_forced_by_geo_ip":[]}},"project":{"id":14,"name":"Rezultati.com","default_geo_ip_country_code":"HR","default_geo_ip_subdivision_code":false},"odds":{"layout":"default","us_layout_excluded_sports":[],"format":"eu","format_list":["eu"],"format_promo_enabled":true,"ah_override":false,"us_handicap":false,"enable":true,"iframe":true,"my_fs":false,"sport_page":false,"hide_tab":false,"odds_disabled_countries":[],"betslip":false,"betslip_detail_window":false,"betslip_window_size":[],"bookmakers_sp_allowed":[16],"light_live_bet_icon":false,"hide_live_bet_icon":false,"odds_comparison_show_copyright":true,"probability_to_win":false,"odds_powered_by_geo_ip":[],"odds_powered_by_geo_ip_subdivision":[],"odds_powered_by_enabled_for_summary":false,"bonus_section_forced_by_geo_ip":[],"prematch_button":{"disabled_geoIps":["GR","IT"]}},"watch":{"enable":false,"prefer_tv_channels":false}
122,"livetable_calendar":{"full_width":false},"redirector":{"types":{"event":1,"tournament_template":2,"participant":3,"player":4,"detail_page":5}},"fs_stats":{"enable":true,"url":{"mygames":"remote-stats.flashscore.com\/mg","adblocked":"","search_stats":"remote-stats.flashscore.com\/ss"}},"empty_logo_small_path":{"logo_team":"image\/empty-logo-team-small.png"},"game_notification_push":{"enable":true},"user_functions":{"server_domain":"lsid.eu","serverAPI":"https:\/\/user-internal-service.intra.livesport.services\/","api_key":"j5fk8N0nJ7aBJxBOTfKcAWVKPDfexqkj","enable":true,"use_only_local":true,"namespace":"flashscore","facebook_app_id":"466605716743915","google_client_id":"394144232373-omdcsllql551d5fko16e29f84s3n40ik.apps.googleusercontent.com","apple_client_id":"com.flashscore.siwa","apple_redirect_uri":"https:\/\/user-login-proxy-service.livesport.services\/api\/v1\/proxy\/apple\/","email_login_enabled":true,"server":"https:\/\/lsid.eu\/"},"user_function":{"use_only_local":false},"registration":{"version":1,"sign_out_in_drop_down":true,"project_has_initial_tou":true,"no_remote":false},"captcha_sitekey":"6LdnlAoTAAAAAIzaLLR8ezPKKnLeM2LozP6OQKj_","european_union_states":{"codes":["BE","BG","CZ","DK","EE","FI","FR","HR","IE","IT","CY","LT","LV","LU","HU","MT","DE","NL","PL","PT","AT","RO","GR","SK","SI","GB","ES","SE"]},"url_prefix":"","sports_without_detail":[35],"tournament_pages":{"enable":true,"disabled_sports":[],"block_summary_match_limit":10,"data_part_match_limit":100},"new_mobile_page":{"enable":true},"box_over_content":{"split":{"columns":3}},"detail_live_betting_strip":{"rotation_time":30000},"sports_with_participant_no_duel_page":[38,39,40,41,32,33,34],"match_comments":{"enable":true},"new_live_betting_icon":{"enable":true,"version":1},"live_streaming":{"disabled_bookmakers_by_geoip":[],"bookmakers_with_disabled_link":[]},"facelift":{"main_class":"flat"},"icon_list":{"info":true,"shirt":true,"tv":true},"react":{"enabled":false,"sports":false},"responsive":{"breakpoint":800,"breakpoint_mobile":640},"tv_program":{"enable":true},"mixed_feed":{"link_to_more_games":false,"homepage_enabled":false},"team_transfers":{"sports":[1,4]},"team_news":{"enabled":true},"feed_sign":"SW9D1eZo","detail":{"window_size":{"width":688,"height":900}},"audio_comments":{"enabled":true,"tabEnabled":false,"format":"HLS"},"tv":false,"apple_sign_in":{"enable":true},"advanced_tennis":{"enable":true,"point_by_point":true},"reversed_time":{"enable":false,"sports":{"3":{"stages":[22,23,24,25],"extra_time_stages":[6],"stage_time":10,"extra_time":5},"4":{"stages":[14,15,16],"extra_time_stages":[6],"stage_time":20,"extra_time":5},"5":{"stages":[22,23,24,25],"extra_time_stages":[6],"stage_time":15,"extra_time":15}}},"player_profile":{"enabled_sports":[1,4,3]},"empty_logo_path":{"face_man":"image\/empty-face-man-share.gif","face_woman":"image\/empty-face-woman-share.gif","logo_team":"image\/empty-logo-team-share.gif"},"team_logo":{"enable":true,"detail":true,"standings":false,"h2h":true,"iframe":true},"lang_box":{"enabled":true,"redirects":{"US":{"title":"Follow our live scores in English!","description":"Go to <a href=\"https:\/\/www.flashscoreusa.com\/\">FlashscoreUSA.com<\/a>","lang_combo":{"--":130},"lang_dialog_translations":{"title":"Enjoy your favorite live scores service even more on the brand new Flashscore USA website!","button":"Confirm and go","stay_button":"I want to stay on Flashscore.com"}},"AU":{"title":"Follow our live scores on our Aussie website!","description":"Go to <a href=\"https:\/\/www.flashscore.com.au\/\">Flashscore.com.au<\/a>"},"UK":{"title":"Follow our live scores on our UK website!","description":"Go to <a href=\"https:\/\/www.flashscore.co.uk\/\">Flashscore.co.uk<\/a>"},"CA":{"title":"Follow our live scores on our Canadian website!","description":"Go to <a href=\"https:\/\/www.flashscore.ca\/\">Flashscore.ca<\/a>"},"DK":{"title":"Følg vores live resultater på dansk.","description":"Gå til <a href=\"https:\/\/www.flashscore.dk\/\">Flashscore.dk<\/a>"},"BG":{"title":"Следвай нашите резултати на български!","description":"Отиди на <a href=\"https:\/\/www.flashscore.bg\/\">Flashscore.bg<\/a>"},"BR":{"title":"Acompanhe nossos resultados ao vivo em português!","description":"Siga para <a href=\"https:\/\/www.flashscore.com.br\/\">Flashscore.com.br<\/a>","lang_combo":{"--":401},"lang_dialog_translations":{"title":"Lançamos um Flashscore Brasil totalmente novo e localizado para você!","redirect":"Clique no botão para confirmar que você deseja acessá-lo.","button":"Confirmar e avançar","stay_button":"Quero continuar no Flashscore.com"}},"DE":{"title":"Verfolge unsere Livescores auf deutsch!","description":"Hier geht es zu <a href=\"https:\/\/www.flashscore.de\/\">Flashscore.de<\/a>"},"AT":{"title":"Folge unseren Live-Ergebnissen auf Deutsch!","description":"Gehe auf <a href=\"https:\/\/www.flashscore.at\/\">Flashscore.at<\/a>"},"CH":{"parent":"DE"},"GR":{"title":"Παρακολουθήστε τα ζωντανά μας αποτελέσματα στα ελληνικά!","de
122scription":"Μεταβείτε στο <a href=\"https:\/\/www.flashscore.gr\/\">Flashscore.gr<\/a>"},"ES-CT":{"parent":"ES"},"ES":{"title":"¡Sigue nuestros marcadores en directo en español!","description":"Accede a <a href=\"https:\/\/www.flashscore.es\/\">Flashscore.es<\/a>"},"BO":{"parent":"ES"},"GF":{"parent":"ES"},"GY":{"parent":"ES"},"PY":{"parent":"ES"},"SR":{"title":"Pratite naše rezultate uživo na srpskom!","description":"Idite na <a href=\"https:\/\/www.livescore.in\/rs\">LiveScore.in\/rs<\/a>"},"UY":{"parent":"ES"},"PA":{"parent":"ES"},"JM":{"parent":"ES"},"GT":{"parent":"ES"},"NI":{"parent":"ES"},"CU":{"parent":"ES"},"PH":{"title":"Sundan ng live ang mga iskor sa Tagalog!","description":"Pumunta sa <a href=\"https:\/\/www.flashscore.ph\/\">Flashscore.ph<\/a>"},"CL":{"title":"¡Sigue nuestros marcadores en vivo en español!","description":"Ingresa a <a href=\"https:\/\/www.flashscore.cl\/\">Flashscore.cl<\/a>"},"CO":{"title":"¡Sigue nuestros marcadores en vivo y en Español!","description":"Ingresa a <a href=\"https:\/\/www.flashscore.co\/\">Flashscore.co<\/a>"},"AR":{"title":"¡Seguí nuestros resultados en vivo en español!","description":"Visitá <a href=\"https:\/\/www.flashscore.com.ar\/\">Flashscore.com.ar<\/a>"},"MX":{"title":"¡Sigue los resultados en vivo en Español!","description":"Ve a <a href=\"https:\/\/www.flashscore.com.mx\/\">Flashscore.com.mx<\/a>"},"VE":{"title":"¡Sigue nuestros marcadores en vivo en Español!","description":"Ve a <a href=\"https:\/\/www.flashscore.com.ve\/\">Flashscore.com.ve<\/a>"},"PE":{"title":"¡Sigue nuestros resultados en vivo en español!","description":"Ve a <a href=\"https:\/\/www.flashscore.pe\/\">Flashscore.pe<\/a>"},"FI":{"title":"Seuraa tuloksiamme livenä suomeksi!","description":"Siirry <a href=\"https:\/\/www.flashscore.fi\/\">Flashscore.fi<\/a>-sivuille!"},"FR":{"title":"Suivez nos scores en direct en français!","description":"Rendez-vous sur <a href=\"https:\/\/www.flashscore.fr\/\">Flashscore.fr<\/a>","lang_combo":{"--":16},"lang_dialog_translations":{"title":"Nous avons lancé un nouveau site web local pour vous, Flashscore France !","redirect":"Cliquez sur le bouton suivant pour confirmer que vous souhaitez accéder au site local.","button":"Confirmez et allez-y","stay_button":"Je veux rester sur Flashscore.com"}},"GE":{"title":"ცოცხალი ანგარიშები ქართულად!","description":"<a href=\"https:\/\/www.flashscore.ge\/\">Flashscore.ge<\/a>"},"MY":{"title":"Ikuti skor langsung kami dalam Bahasa Melayu!","description":"Pergi ke <a href=\"https:\/\/www.flashscore.com.my\/\">Flashscore.com.my<\/a>"},"HR":{"title":"Pratite naše rezultate uživo na hrvatskom!","description":"Idite na <a href=\"https:\/\/www.rezultati.com\/\">Rezultati.com<\/a>"},"LT":{"title":"Sekite rezultatus lietuviškai!","description":"Eikite į <a href=\"https:\/\/www.flashscore.in\/\">Flashscore.in<\/a>"},"HU":{"title":"Kövesd az élő eredményeket magyar nyelven!","description":"Az <a href=\"https:\/\/www.eredmenyek.com\/\">Eredmenyek.com<\/a> megnyitása"},"KO":{"title":"한국어로 실시간 스코어를 확인하세요!","description":"<a href=\"https:\/\/www.flashscore.co.kr\/\">Flashscore.co.kr<\/a>로 이동"},"IN":{"title":"Follow our live scores on our Indian websites!","description":"Go to <a href=\"https:\/\/www.flashscore.in\/\">Flashscore.in<\/a>","lang_combo":{"--":26,"hi":261,"bn":262,"te":265,"ta":263,"kn":264},"lang_dialog_translations":{"title":"We just launched a brand new, fully localised Flashscore India for you!","local_project_title":"New languages available!","perex":"Pick your language and give it try!","button":"Confirm and go","local_project_button":"Confirm","stay_button":"I want to stay on Flashscore.com"}},"IT":{"title":"Segui i nostri risultati in italiano!","description":"Vai su <a href=\"https:\/\/www.flashscore.it\/\">Flashscore.it<\/a>"},"ID":{"title":"Ikutilah Skor langsung kami dalam Bahasa Indonesia!","description":"Kunjungilah <a href=\"https:\/\/www.flashscore.co.id\/\">Flashscore.co.id<\/a>"},"JP":{"title":"ぜひ、私どもの日本版ライブスコアをフォローください!","description":"<a href=\"https:\/\/www.flashscore.co.jp\/\">Flashscore.co.jp<\/a> はこちら"},"KZ":{"title":"Live нәтижелерді Қазақ тілінде бақылаңыз!","description":"<a href=\"https:\/\/www.flashscorekz.com\/\">FlashscoreKZ.com<\/a> желісіне өту"},"NL":{"title":"Volg onze live uitslagen in het Nederlands!","description":"Ga naar <a href=\"https:\/\/www.flashscore.nl\/\">Flashscore.nl<\/a>"}
122,"PL":{"title":"Śledź nasze wyniki na żywo po polsku!","description":"Przejdź na <a href=\"https:\/\/www.flashscore.pl\/\">Flashscore.pl<\/a>","lang_combo":{"--":3},"lang_dialog_translations":{"title":"Właśnie uruchomiliśmy dla Ciebie nowy, lokalny Flashscore Polska","redirect":"Kliknij poniższy przycisk, aby potwierdzić, że chcesz uzyskać dostęp do lokalnej witryny.","button":"Potwierdź i przejdź","stay_button":"Chcę pozostać na Flashscore.com"}},"PT":{"title":"Segue os resultados ao vivo em Português!","description":"Visita <a href=\"https:\/\/www.flashscore.pt\/\">Flashscore.pt<\/a>"},"PT-BR":{"title":"Acompanhe nossos resultados ao vivo em português!","description":"Siga para <a href=\"https:\/\/www.flashscore.com.br\/\">Flashscore.com.br<\/a>"},"RO":{"title":"Urmărește scoruri live în Română!","description":"Du-te pe <a href=\"https:\/\/www.flashscore.ro\/\">Flashscore.ro<\/a>"},"SK":{"title":"Sledujte naše live výsledky v slovenčine!","description":"Prejsť na <a href=\"https:\/\/www.flashscore.sk\/\">Flashscore.sk<\/a>"},"SI":{"title":"Spremljajte rezultate v živo v Slovenščini!","description":"Obiščite <a href=\"https:\/\/www.flashscore.si\/\">Flashscore.si<\/a>"},"SE":{"title":"Följ vår livescore på svenska!","description":"Gå till <a href=\"https:\/\/www.flashscore.se\/\">Flashscore.se<\/a>"},"VN":{"title":"Theo dõi tỷ số trực tiếp bằng Tiếng Việt!","description":"Hãy đến <a href=\"https:\/\/www.flashscore.vn\/\">Flashscore.vn<\/a>"},"UA":{"title":"Стежте за нашими live результатами українською!","description":"Перейти на <a href=\"https:\/\/www.flashscore.ua\/\">Flashscore.ua<\/a>"},"VI":{"title":"Để xem trực tiếp tỉ số bằng tiếng Việt!","description":"Hãy dùng <a href=\"https:\/\/www.flashscore.vn\/\">Flashscore.vn<\/a>"},"TR":{"title":"Canlı skorları Türkçe takip edin!","description":"<a href=\"https:\/\/www.flashscore.com.tr\/\">Flashscore.com.tr<\/a>'ye gidin"},"CZ":{"title":"Sledujte naše live výsledky v češtině!","description":"Přejít na <a href=\"https:\/\/www.livesport.cz\/\">Livesport.cz<\/a>"},"JA":{"title":"私どもの日本版ライブスコアをフォローください!","description":"<a href=\"https:\/\/www.flashscore.co.jp\/\">Flashscore.co.jp<\/a> はこちら。"},"KR":{"title":"한국어로 실시간 스코어를 확인하세요!","description":"<a href=\"https:\/\/www.flashscore.co.kr\/\">Flashscore.co.kr<\/a> 바로가기"}},"show_after_visits":3},"confirmation_box":{"enabled":false},"myfs":{"enabled":true,"newsfeed":{"past_days":14,"count":15,"allowed_counts":[3,15,30]},"refresh_tolerance":4},"swap_participants":{"sports":[],"show_at_sign":false},"legal_age_confirmation":{"enabled":false,"show_age_question":true,"can_rewoke_age_confirm":false,"storage_ttl":7776000,"geo_policies":[]},"gambling":{"gamble_responsibly_footer":{"project_geoip":"","client_geoips":[],"hide_bottom":false,"notices_for_subdivisions":{"USIA":"TRANS_GAMBLE_RESPONSIBLY_FOOTER_IOWA_TEXT","USIL":"TRANS_GAMBLE_RESPONSIBLY_FOOTER_ILLINOIS_TEXT","USMO":"TRANS_GAMBLE_RESPONSIBLY_FOOTER_MISSOURI_TEXT"}},"legal_banner":{"client_geoips":[]}},"last_matches_stats_order":{"3":[595,169,713,541,696,697],"4":[596,541,169,777,715,649,781],"1":[595,596,541,649,965,599,600]},"disabled_pages":{"geoip":["TR","GR"]},"disabled_betting_in_live":{"geoip":[""]},"dark_mode":{"enabled":true,"theme_switcher":true,"dark_is_default":false},"sports_with_flag":[2,14,16,28,25,15,17,21,23],"onetrust":{"show_privacy_shield":true,"enable":true},"myleagues":{"position_of_banner":10},"team_page":{"duel":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,24,25,26,28,29,30,23,33,36,42],"outright_odds":{"enabled":true,"summary_tab":{"enabled":true},"allowed_sports":[1,3,4]}},"fsds":{"client_urls":{"default":"https:\/\/14.ds.lsapp.eu\/pq_graphql","live_odds":"https:\/\/14.ds.lsapp.eu\/pq_graphql","odds":"https:\/\/global.ds.lsapp.eu\/odds\/pq_graphql"},"pushPrefix":"\/fsds\/changes"},"fs_news":{"enabled":false,"widgets":{"live_table":{"enabled":false},"detail":{"enabled":false,"blacklisted_sport_id":[]},"tournament_page_summary_tab":{"enabled":false}},"video_api":{"host":"https:\/\/media.lsmedialib.com"},"source":false,"images":{"cloud":{"endpoint":"https:\/\/livesport-ott-images.ssl.cdn.cra.cz"}},"show_logo_and_source":true},"line_up":{"used_substitutes":{"enabled":true,"sports":[1]},"sports_with_participant_images":[1,3,4],"player_ratings":[1,4],"live_player_ratings":false,"sports_with_live_rating":[1],"fsds_source":[1,3,4],"predicted_line_up":true,"sports_with_lineups_in_summary":[1],"sports_with_lineups_tabs":[1]},"promo_bar":{"multi_language_bar":{"enabled":false,"new_languages":[],"hide_for_geo_ip":[]}}
122,"frontend_logging":{"enable":true,"server":"https:\/\/logging-service.livesport.services\/","token":"Y3uhIv5Ges46mMdAZm53akso95sYOogk","percentage_of_sessions_to_log":1},"static_fs_cdn":{"enabled":true,"url":"https:\/\/static.flashscore.com"},"feed_resolver":{"local":[{"url":"https:\/\/14.flashscore.ninja","weight":1,"countries":["AL","AD","AM","AT","AZ","BY","BE","BA","BG","HR","CY","CZ","DK","EE","FO","FI","FR","GI","GR","HU","IS","IE","IL","IT","KZ","XK","LV","LI","LT","LU","MK","MD","MC","ME","NL","NO","PL","RO","RU","SM","RS","SK","SI","ES","SE","CH","TR","UA","GB"]}],"global":[],"default_url":"https:\/\/global.flashscore.ninja"},"sport_list":{"soccer":1,"tennis":2,"basketball":3,"hockey":4,"american-football":5,"baseball":6,"handball":7,"rugby-union":8,"floorball":9,"bandy":10,"futsal":11,"volleyball":12,"cricket":13,"darts":14,"snooker":15,"boxing":16,"beach-volleyball":17,"aussie-rules":18,"rugby-league":19,"badminton":21,"water-polo":22,"golf":23,"field-hockey":24,"table-tennis":25,"beach-soccer":26,"mma":28,"netball":29,"pesapallo":30,"motorsport":31,"motorsport-auto-racing":32,"motorsport-moto-racing":33,"cycling":34,"horse-racing":35,"esports":36,"winter-sports":37,"winter-sports-ski-jumping":38,"winter-sports-alpine-skiing":39,"winter-sports-cross-country":40,"winter-sports-biathlon":41,"kabaddi":42},"lang_box_dialog":{"enabled":false,"enabled_on_local":false,"hidden_flags_for_geo_ip":[],"langs_with_new_badge":[]},"full_page_match_detail":{"popup_button_tooltip_enabled":true,"popup_button_enabled":true,"open_detail_in_popup":false,"sticky_elements":{"match_header":{"is_sticky":true,"is_responsive_sticky":true}},"title_three_char_name":{"disabled_sports":[13,23]},"indexed_tabs":["summary","lineups","statistics","player-statistics","player-match-statistics","odds"],"live_streaming":{"button_enabled":false}},"default_sport":1,"single_sport":{"enabled":false},"live_table":{"standings_link_without_popup":false},"event_previews":{"enabled":true,"target_blank":true},"match_detail":{"top_statistics":{"enable":true}},"betting_types":{"1":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","OVER_UNDER","BOTH_TEAMS_TO_SCORE","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","OVER_UNDER","BOTH_TEAMS_TO_SCORE","ASIAN_HANDICAP","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","NEXT_GOAL","OVER_UNDER","BOTH_TEAMS_TO_SCORE"],"odds_tab":["HOME_DRAW_AWAY","NEXT_GOAL","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"default_bet_type":"HOME_DRAW_AWAY"},"23":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED","duel_default_bet_type":"HOME_AWAY"},"2":{"prematch_odds":{"summary_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","CORRECT_SCORE","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"4":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"3":{"prematch_odds":{"summary_tab":["HOME_AWAY","HOME_DRAW_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_AWAY","HOME_DRAW_AWAY","OVER_UNDER","ASIAN_HANDICAP","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"6":{"prematch_odds":{"summary_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","HOME_DRAW_AWAY"],"odds_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","CORRECT_SCORE","HOME_DRAW_AWAY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","HOME_DRAW_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"14":{"prematch_odds":{"summary_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","CORRECT_SCORE"],"odds_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","EUROPEAN_HANDICAP","CORRECT_SCORE"]},"live_odds":{"summary_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"15":{"prematch_odds":{"summary_tab":["HOME_AWAY","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_AWAY","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"12":{"prematch_odds":{"summary_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"5":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"18":{"prematch_odds":{"summary_tab":["HOME_AWAY","HOME_DRAW_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_AWAY","HOME_DRAW_AWAY","OVER_UNDER","ASIAN_HANDICAP","EUROPEAN_HANDICAP","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"21":{"prematch_odds":{"summary_tab":["HOME_AWAY"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"10":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","OVER_UNDER","ASIAN_HANDICAP","DOUBLE_CHANCE"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"26":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"17":{"prematch_odds":{"summary_tab":["HOME_AWAY","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_AWAY","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"16":{"prematch_odds":{"summary_tab":["HOME_AWAY","HOME_DRAW_AWAY"],"odds_tab":["HOME_AWAY","HOME_DRAW_AWAY","OVER_UNDER"]},"live_odds":{"summary_tab":["HOME_AWAY","HOME_DRAW_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"13":{"prematch_odds":{"summary_tab":["HOME_AWAY","HOME_DRAW_AWAY"],"odds_tab":["HOME_AWAY","HOME_DRAW_AWAY","OVER_UNDER","DOUBLE_CHANCE","ASIAN_HANDICAP"]},"live_odds":{"summary_tab":["HOME_AWAY","HOME_DRAW_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"34":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":[]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED"},"36":{"prematch_odds":{"summary_tab":["HOME_AWAY"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"24":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"9":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"11":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"7":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"35":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":[]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED"},"42":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"28":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"31":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":[]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED","duel_default_bet_type":"HOME_AWAY"},"32":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":[]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED","duel_default_bet_type":"HOME_AWAY"},"33":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED","duel_default_bet_type":"HOME_AWAY"},"29":{"prematch_odds":{"summary_tab":["HOME_AWAY","HOME_DRAW_AWAY"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_AWAY","HOME_DRAW_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"30":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"19":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"8":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"25":{"prematch_odds":{"summary_tab":["HOME_AWAY"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_AWAY"],"odds_tab":[]},"default_bet_type":"HOME_AWAY"},"22":{"prematch_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP","BOTH_TEAMS_TO_SCORE","TO_QUALIFY","DOUBLE_CHANCE","EUROPEAN_HANDICAP","DRAW_NO_BET","CORRECT_SCORE","HALF_FULL_TIME","ODD_OR_EVEN"]},"live_odds":{"summary_tab":["HOME_DRAW_AWAY","HOME_AWAY","OVER_UNDER","ASIAN_HANDICAP"],"odds_tab":[]},"default_bet_type":"HOME_DRAW_AWAY"},"37":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":[]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED"},"38":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":[]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED"},"39":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":[]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED"},"40":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":[]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED"},"41":{"prematch_odds":{"summary_tab":["TOP_POSITION_MERGED"],"odds_tab":[]},"live_odds":{"summary_tab":[],"odds_tab":[]},"default_bet_type":"TOP_POSITION_MERGED"}},"player_match_stats":{"card_enabled":true,"card_from_lineups_enabled":true,"card_rating_bonuses_enabled":true,"rating_article_link_url":""},"enable_betting_bonuses_in_live":{"geoip":[]},"momentum":{"article_link_url":""},"tournament_page":{"odds_tab":{"enabled":true},"duel":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,24,25,26,28,29,30,23,36,42,33,32,34,35,38,39,40,41]},"badges_rating_scale":[{"data":{"1":{"best":"0033FF","nan":"555E61","scale":{"7.5":"0B7929","7.0":"76B100","6.5":"F3A000","5.8":"EC6B07","0.0":"DC0000"}},"4":{"best":"0033FF","nan":"555E61","scale":{"8.0":"0B7929","7.0":"76B100","6.5":"F3A000","6.0":"EC6B07","0.0":"DC0000"}},"3":{"best":"0033FF","nan":"555E61","scale":{"8.0":"0B7929","7.0":"7
1226B100","6.5":"F3A000","6.0":"EC6B07","0.0":"DC0000"}}}}],"top_bar":{"local_storage_visibility_key":""},"sport_page":{"enabled":false,"duel":[]},"match_prediction":{"enabled":false,"match_insights_enabled":false},"sphinxsearch":{"server_domain":"s.livesport.services","search_path":"\/api\/v2\/search\/","top_search_path":"\/api\/v2\/top-search\/","enable":true,"disabled_sports_in_select":[32,33],"client_server":"s.livesport.services\/api\/v2\/search\/","top_search_client_server":"s.livesport.services\/api\/v2\/top-search\/"}},"ajax":{"sync_time":{"default":10,"update":5,"game":5,"live_tables":10},"goal_duration_time":60,"correction_duration_time":15,"penalty_duration_time":60,"counter_duration_time":60,"scores_changed_duration_time":60,"prematch_odds_sync_time":60,"prematch_odds_cache_time":180,"sql_cache_time":30},"core_debugger":{"internal":false},"mobi":{"geoip_restriction":["GR"]},"push":{"namespace":"fs3_","domain":"fsdatacentre.com","alias":"p1tt2:100, p2tt2:100, p3tt2:100, p4tt2:100, p5tt2:100, p6tt2:100, p7tt2:100, p8tt2:100, p9tt2:100, p10tt2:100","port":443},"portable_apps":{"onelinks":{"login-sign-up-url":"","login-promo-app-form-url":"https:\/\/flashscore.onelink.me\/BvSv\/ivztoxiu","user-controls-app-promo-url":"https:\/\/flashscore.onelink.me\/BvSv\/tdyokl18"}}};cjs.Api.config.initConfig(cjs._config);    reset_env();
123    var ajax = [];
124    // runtime variables
125    var prefered_sport_id;
126    var matches;
127    var sport = null;
128    var sport_id = null;
129    var country = null;
130    var tournament = null;
131    var participant = null;
132    var series = null;
133    cjs.pageTab = null;
134    var updater = null;
135    var category = 0;
136    var sub_category = null;
137    var page_is_initialized = false;
138    var sudate = 0; // selected day server utime (GMT)
139    var tudate;
140    var refresh_utime = 0;
141    var default_tz = default_tz || null;
142    var interval_live = null;
143    var bookmaker_link = '/bookmaker/';
144    var odds_betslip = false;
145    var ODDS_FORMAT_LIST = {"eu":{"id":1,"ident":"eu","name_iframe":"TRANS_ODDS_FORMAT_IFRAME_EU","name_detail":"TRANS_ODDS_FORMAT_DETAIL_EU","name_title":"TRANS_ODDS_FORMAT_TITLE_EU","example":"1.50"},"uk":{"id":2,"ident":"uk","name_iframe":"TRANS_ODDS_FORMAT_IFRAME_UK","name_detail":"TRANS_ODDS_FORMAT_DETAIL_UK","name_title":"TRANS_ODDS_FORMAT_TITLE_UK","example":"1\/2"},"us":{"id":3,"ident":"us","name_iframe":"TRANS_ODDS_FORMAT_IFRAME_US","name_detail":"TRANS_ODDS_FORMAT_DETAIL_US","name_title":"TRANS_ODDS_FORMAT_TITLE_US","example":"-200"},"hk":{"id":4,"ident":"hk","name_iframe":"TRANS_ODDS_FORMAT_IFRAME_HK","name_detail":"TRANS_ODDS_FORMAT_DETAIL_HK","name_title":"TRANS_ODDS_FORMAT_TITLE_HK","example":"0.50"},"ma":{"id":5,"ident":"ma","name_iframe":"TRANS_ODDS_FORMAT_IFRAME_MA","name_detail":"TRANS_ODDS_FORMAT_DETAIL_MA","name_title":"TRANS_ODDS_FORMAT_TITLE_MA","example":"0.50"},"in":{"id":6,"ident":"in","name_iframe":"TRANS_ODDS_FORMAT_IFRAME_IN","name_detail":"TRANS_ODDS_FORMAT_DETAIL_IN","name_title":"TRANS_ODDS_FORMAT_TITLE_IN","example":"-2.00"}};
146    var counter_duration_time = 60;
147    var project_type_id = 1;
148    var project_type_name = '_fs';
149    var locationOrigin = location.origin;
150    if (typeof locationOrigin === "undefined")
151    {
152        locationOrigin = location.protocol + "//" + location.host;
153    }
154    var u_304 = 'd41d8cd98f00b204e9800998ecf8427e';
155    var default_odds_format   = 'eu';
156    var service_status = 0;
157    var ajax_updater = '';
158    var swap = {};
159    var odds_enable = false;
160    var ff_data = '';
161    var sys_interval_checker = null;
162    var counter_update_interval = null;
163    var calendar = {
164        "buttons":{"prev_day":true,"next_day":true},
165        "range":7    };
166    // separators
167    var JS_ROW_END        = '~';
168    var JS_CELL_END        = '¬';
169    var JS_INDEX        = '÷';
170    // tooltip ident
171    var tt = null;
172    var xmt;
173    var xmtpending = false;
174    var componentRefresh = {};
175
176    // push engine
177    var mpe_delivery = 'a';
178
179    var base_image_data_url = 'https://static.flashscore.com/res/image/' + 'data/';
180
181    clientStorage = cjs.Api.clientStorage;
182    cjs.Api.ajaxSyncTime.init(cjs.Api.config.get("ajax", "sync_time") || {});
183    cjs.Api.timezone.initTimezone(
184        cjs.dic.get('util_date'),
185    );
186
187    // iframe top lang box init variables
188    var project_id = 0;
189
190    // odds
191    
192    var odds_betting_types = {"1":1,"2":3,"3":3,"4":1,"5":3,"6":3,"7":1,"8":1,"9":1,"10":1,"11":1,"12":3,"18":3,"19":1,"13":3,"14":3,"15":3,"16":3,"17":3,"21":3,"22":1,"24":1,"25":3,"26":1,"28":3,"29":3,"30":1,"23":101,"31":101,"32":101,"33":101,"34":101,"35":16,"36":3,"37":101,"38":101,"39":101,"40":101,"41":101,"42":1};
193
194    var SPORT_LIST = [];
195    var SPORT_LIST_BY_ID = {};
196    var SPORT_URL_BY_ID = [];
197	SPORT_LIST['soccer'] = 1;
198	SPORT_LIST_BY_ID['1'] = 'soccer';
199	SPORT_URL_BY_ID['1'] = '/nogomet/';
200	SPORT_LIST['tennis'] = 2;
201	SPORT_LIST_BY_ID['2'] = 'tennis';
202	SPORT_URL_BY_ID['2'] = '/tenis/';
203	SPORT_LIST['basketball'] = 3;
204	SPORT_LIST_BY_ID['3'] = 'basketball';
205	SPORT_URL_BY_ID['3'] = '/kosarka/';
206	SPORT_LIST['hockey'] = 4;
207	SPORT_LIST_BY_ID['4'] = 'hockey';
208	SPORT_URL_BY_ID['4'] = '/hokej/';
209	SPORT_LIST['american-football'] = 5;
210	SPORT_LIST_BY_ID['5'] = 'american-football';
211	SPORT_URL_BY_ID['5'] = '/americki-nogomet/';
212	SPORT_LIST['baseball'] = 6;
213	SPORT_LIST_BY_ID['6'] = 'baseball';
214	SPORT_URL_BY_ID['6'] = '/bejzbol/';
215	SPORT_LIST['handball'] = 7;
216	SPORT_LIST_BY_ID['7'] = 'handball';
217	SPORT_URL_BY_ID['7'] = '/rukomet/';
218	SPORT_LIST['rugby-union'] = 8;
219	SPORT_LIST_BY_ID['8'] = 'rugby-union';
220	SPORT_URL_BY_ID['8'] = '/rugby/';
221	SPORT_LIST['floorball'] = 9;
222	SPORT_LIST_BY_ID['9'] = 'floorball';
223	SPORT_URL_BY_ID['9'] = '/floorball/';
224	SPORT_LIST['bandy'] = 10;
225	SPORT_LIST_BY_ID['10'] = 'bandy';
226	SPORT_URL_BY_ID['10'] = '/bandy/';
227	SPORT_LIST['futsal'] = 11;
228	SPORT_LIST_BY_ID['11'] = 'futsal';
229	SPORT_URL_BY_ID['11'] = '/futsal/';
230	SPORT_LIST['volleyball'] = 12;
231	SPORT_LIST_BY_ID['12'] = 'volleyball';
232	SPORT_URL_BY_ID['12'] = '/odbojka/';
233	SPORT_LIST['cricket'] = 13;
234	SPORT_LIST_BY_ID['13'] = 'cricket';
235	SPORT_URL_BY_ID['13'] = '/kriket/';
236	SPORT_LIST['darts'] = 14;
237	SPORT_LIST_BY_ID['14'] = 'darts';
238	SPORT_URL_BY_ID['14'] = '/pikado/';
239	SPORT_LIST['snooker'] = 15;
240	SPORT_LIST_BY_ID['15'] = 'snooker';
241	SPORT_URL_BY_ID['15'] = '/snooker/';
242	SPORT_LIST['boxing'] = 16;
243	SPORT_LIST_BY_ID['16'] = 'boxing';
244	SPORT_URL_BY_ID['16'] = '/boks/';
245	SPORT_LIST['beach-volleyball'] = 17;
246	SPORT_LIST_BY_ID['17'] = 'beach-volleyball';
247	SPORT_URL_BY_ID['17'] = '/odbojka-na-pijesku/';
248	SPORT_LIST['aussie-rules'] = 18;
249	SPORT_LIST_BY_ID['18'] = 'aussie-rules';
250	SPORT_URL_BY_ID['18'] = '/australski-nogomet/';
251	SPORT_LIST['rugby-league'] = 19;
252	SPORT_LIST_BY_ID['19'] = 'rugby-league';
253	SPORT_URL_BY_ID['19'] = '/rugby-league/';
254	SPORT_LIST['badminton'] = 21;
255	SPORT_LIST_BY_ID['21'] = 'badminton';
256	SPORT_URL_BY_ID['21'] = '/badminton/';
257	SPORT_LIST['water-polo'] = 22;
258	SPORT_LIST_BY_ID['22'] = 'water-polo';
259	SPORT_URL_BY_ID['22'] = '/vaterpolo/';
260	SPORT_LIST['golf'] = 23;
261	SPORT_LIST_BY_ID['23'] = 'golf';
262	SPORT_URL_BY_ID['23'] = '/golf/';
263	SPORT_LIST['field-hockey'] = 24;
264	SPORT_LIST_BY_ID['24'] = 'field-hockey';
265	SPORT_URL_BY_ID['24'] = '/hokej-na-travi/';
266	SPORT_LIST['table-tennis'] = 25;
267	SPORT_LIST_BY_ID['25'] = 'table-tennis';
268	SPORT_URL_BY_ID['25'] = '/stolni-tenis/';
269	SPORT_LIST['beach-soccer'] = 26;
270	SPORT_LIST_BY_ID['26'] = 'beach-soccer';
271	SPORT_URL_BY_ID['26'] = '/nogomet-na-pijesku/';
272	SPORT_LIST['mma'] = 28;
273	SPORT_LIST_BY_ID['28'] = 'mma';
274	SPORT_URL_BY_ID['28'] = '/mma/';
275	SPORT_LIST['netball'] = 29;
276	SPORT_LIST_BY_ID['29'] = 'netball';
277	SPORT_URL_BY_ID['29'] = '/netball/';
278	SPORT_LIST['pesapallo'] = 30;
279	SPORT_LIST_BY_ID['30'] = 'pesapallo';
280	SPORT_URL_BY_ID['30'] = '/finski-bejzbol/';
281	SPORT_LIST['motorsport'] = 31;
282	SPORT_LIST_BY_ID['31'] = 'motorsport';
283	SPORT_URL_BY_ID['31'] = '/moto-sportovi/';
284	SPORT_LIST['motorsport-auto-racing'] = 32;
285	SPORT_LIST_BY_ID['32'] = 'motorsport-auto-racing';
286	SPORT_URL_BY_ID['32'] = '/utrke-auta/';
287	SPORT_LIST['motorsport-moto-racing'] = 33;
288	SPORT_LIST_BY_ID['33'] = 'motorsport-moto-racing';
289	SPORT_URL_BY_ID['33'] = '/utrke-motora/';
290	SPORT_LIST['cycling'] = 34;
291	SPORT_LIST_BY_ID['34'] = 'cycling';
292	SPORT_URL_BY_ID['34'] = '/biciklizam/';
293	SPORT_LIST['horse-racing'] = 35;
294	SPORT_LIST_BY_ID['35'] = 'horse-racing';
295	SPORT_URL_BY_ID['35'] = '/utrke-konja/';
296	SPORT_LIST['esports'] = 36;
297	SPORT_LIST_BY_ID['36'] = 'esports';
298	SPORT_URL_BY_ID['36'] = '/esportovi/';
299	SPORT_LIST['winter-sports'] = 37;
300	SPORT_LIST_BY_ID['37'] = 'winter-sports';
301	SPORT_URL_BY_ID['37'] = '/zimski-sportovi/';
302	SPORT_LIST['winter-sports-ski-jumping'] = 38;
303	SPORT_LIST_BY_ID['38'] = 'winter-sports-ski-jumping';
304	SPORT_URL_BY_ID['38'] = '/skijaski-skokovi/';
305	SPORT_LIST['winter-sports-alpine-skiing'] = 39;
306	SPORT_LIST_BY_ID['39'] = 'winter-sports-alpine-skiing';
307	SPORT_URL_BY_ID['39'] = '/alpsko-skijanje/';
308	SPORT_LIST['winter-sports-cross-country'] = 40;
309	SPORT_LIST_BY_ID['40'] = 'winter-sports-cross-country';
310	SPORT_URL_BY_ID['40'] = '/skijasko-trcanje/';
311	SPORT_LIST['winter-sports-biathlon'] = 41;
312	SPORT_LIST_BY_ID['41'] = 'winter-sports-biathlon';
313	SPORT_URL_BY_ID['41'] = '/biatlon/';
314	SPORT_LIST['kabaddi'] = 42;
315	SPORT_LIST_BY_ID['42'] = 'kabaddi';
316	SPORT_URL_BY_ID['42'] = '/kabaddi/';
317
318    var SPORT_SCORE_PART_LIST = window.SPORT_SCORE_PART_LIST || [];
319    var TXT_SPORT = window.TXT_SPORT || [];
320    var TXT_SPORT_MOBILE = window.TXT_SPORT_MOBILE || [];
321    var gamePlanSettings = ["", ""];
322    var tournamentPage = false;
323    var tournamentPageDataPart = 0;
324    var feedIndexes = cjs.constants.FEED;
325
326        //login client init
327    function lsid_init()
328    {
329        cjs.Api.settingsStorage.init(cjs.dic.get('lsidClientFactory').getInstance());
330    }
331    cjs.fromGlobalScope.lsid_init = lsid_init;
332
333    //My leagues init
334    function my_leagues_init(sportId)
335    {
336        var utilTrans = cjs.dic.get('utilTrans');
337        if(typeof cjs.myLeagues == 'undefined')
338        {
339            lsid_init();
340
341            var mlTranslations = {
342                add: utilTrans.translate('TRANS_MY_LEAGUES_PIN') || "",
343                remove: utilTrans.translate('TRANS_MY_LEAGUES_UNPIN') || "",
344                loginNeeded: utilTrans.translate('TRANS_ERROR_AVAILABLE_ONLY_FOR_LOGGED_USER') || "",
345            };
346            cjs.myLeagues = cjs.dic.get("MyLeaguesFactory").create(
347                cjs.dic.get('MyLeaguesClientFactory').create(),
348                cjs.defaultTopLeagues,
349                sportId,
350                mlTranslations,
351                cjs.dic.get("util_sport"),
352                cjs.dic.get("util_page"),
353                cjs.dic.get("util_enviroment"),
354                window.fetch.bind(window),
355                cjs.Api.config,
356            );
357            cjs.myLeagues.registerCallback('add', sort_fs_data);
358            cjs.myLeagues.registerCallback('remove', sort_fs_data);
359
360            var reloadTabContent = function() {
361                cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
362                    reactCalls.reloadTabContent(category);
363                    reactCalls.reloadStaticContent();
364                });
365            };
366            cjs.myLeagues.registerCallback('add', reloadTabContent);
367            cjs.myLeagues.registerCallback('remove', reloadTabContent);
368            cjs.Api.loader.get('myLeagues').fulfill(function(callback) {
369                callback(cjs.myLeagues);
370            });
371        }
372    }
373
374    cjs.fromGlobalScope.my_leagues_init = my_leagues_init;
375
376    function myTeamsInit(sportId)
377    {
378        if (typeof cjs.myTeams == 'undefined' && cjs.Api.config.get('app', 'myteams', 'enable') && !cjs.xmtpending)
379        {
380            cjs.xmtpending = true;
381            lsid_init();
382            cjs.Api.loader.get('xMyTeams').call({}, function(_mt) {
383                cjs.xmt = _mt;
384                cjs.myTeams = _mt;
385                var myGamesChecker = cjs.dic.get('Helper_MyGamesChecker');
386
387                var drawMenu = function(participantKey)
388                {
389                    var participantKeySportId = sportId;
390
391                    if (participantKey)
392                    {
393                        participantKeySportId = parseInt(participantKey.replace(/^([0-9]+)_.* /, '$1'));
394                    }
395
396                    if (sportId == participantKeySportId)
397                    {
398                        cjs.myTeams.animateLeftMenu();
399                    }
400
401                    cjs.myTeams.reloadToggleIcons();
402                };
403
404                cjs.myTeams.registerCallback('dataLoaded', drawMenu);
405                cjs.myTeams.registerCallback('dataLoaded', function() {
406                    sort_fs_data();
407
408                    var myTeamsCount = cjs.myTeams.getCount();
409                    if (myGamesChecker.isMyGames() && myTeamsCount)
410                    {
411                        loadAndShowMygamesContent();
412                    }
413                });
414                cjs.Api.loader.get("loggedInObservable").call((observable) => {
415                    observable.subscribe(() => {
416                        cjs.myTeams.animateLeftMenu();
417                        cjs.myTeams.reloadToggleIcons();
418                    });
419                    observable.subscribe((loggedIn) => {
420                        if (loggedIn) {
421                            cjs.myTeams.animateLeftMenu(true);
422                            cjs.myTeams.synchronize(0).then((data) => {
423                                cjs.myTeams.animateLeftMenu();
424                            });
425                            cjs.myTeams.restartAutoSync();
426                        } else {
427                            cjs.myTeams.stopAutoSync();
428                        }
429                    });
430                });
431                const lsidClient = cjs.dic.get('lsidClientFactory').getInstance();
432                lsidClient.storage.getInnerDataObservable(["myTeams"]).subscribe(
433                    (function(drawMenu) {
434                        return function()
435                        {
436                            cjs.myTeams.reload();
437                            drawMenu();
438                            if (myGamesChecker.isMyGames())
439                            {
440                                redrawLivescore();
441                            }
442                        }
443                    })(drawMenu)
444                );
445
446                cjs.myTeams.registerCallback('remove', drawMenu);
447                drawMenu = null;
448
449                cjs.Api.loader.get('myTeams').fulfill(function(callback) {
450                    callback(cjs.myTeams);
451                });
452            });
453        }
454    }
455
456    cjs.fromGlobalScope.myTeamsInit = myTeamsInit;
457
458    
459// Core functions {{{
460
461    /**
462 * Parse data from input string to data array
463    */
464    function parse(fs_input, update, odds, action)
465    {
466        var dataEventHolder = cjs.dic.get('dataEventHolderProxy').getHolder();
467        var dataLeagueHolder = cjs.dic.get('dataLeagueHolderProxy').getHolder();
468        var dataParticipantHolder = cjs.dic.get('dataParticipantHolder');
469        var myGamesChecker = cjs.dic.get('Helper_MyGamesChecker');
470        var changesHistoryContainer = cjs.dic.get('ChangesHistoryContainer');
471        // test if there is input string
472        if (fs_input == null || fs_input.length < 4 || fs_input == '0')
473        {
474            u_304 = 'd41d8cd98f00b204e9800998ecf8427e';
475            return true;
476        }
477        update = (typeof update == 'undefined' || update == false) ? false : true;
478        odds = (typeof odds == 'undefined' || odds == false) ? false : true;
479        var eventItem, leagueItem, upcomingDrawItem;
480        var rows = fs_input.split(JS_ROW_END);
481        var rows_length = rows.length;
482        var labl_id;
483        var parse_sport_id = sport_id;
484        var parse_sport = sport;
485        var return_val = true;
486        var eventId, tmp;
487        var special = false;
488        var isMyTeamsAction = (typeof cjs.myTeams !== 'undefined' && action === "my-teams-events-data-merged");
489        var isRepairAction = (action == 'repair' || action == 'frepair');
490        var reloadEvents = [];
491        var reloadLeagues = [];
492        var reloadTabContent = false;
493        var sortTabContent = false;
494        var isMyTeamsFeed = action === 'my-teams-events-data-merged';
495        var isMyGamesScope = cjs.dic.get('dataLeagueHolderProxy').getScope() === 'mygames';
496
497        if (!update && !odds && !isRepairAction)
498        {
499            if (rows_length == 1)
500            {
501                rows_length = 0;
502            }
503        }
504
505        // parse data
506        for (var i = 0; i < rows_length; i++)
507        {
508            var row = rows[i].split(JS_CELL_END);
509            var row_length = row.length - 1;
510            var index = row[0].split(JS_INDEX);
511            var indexName, indexValue;
512            if (typeof index[0] !== 'undefined')
513            {
514                indexName = index[0];
515            }
516            if (typeof index[1] !== 'undefined')
517            {
518                indexValue = index[1];
519            }
520
521            // sport
522            if (indexName === feedIndexes.SHAREDINDEXES_SPORT_ID)
523            {
524                parse_sport_id = indexValue;
525                parse_sport = SPORT_LIST_BY_ID[parse_sport_id];
526                continue;
527            }
528            else if (indexName === feedIndexes.DCAPIPARTICIPANTINDEXES_TEAM_INFO || indexName == feedIndexes.DCAPIPARTICIPANTINDEXES_TEAM_INFO_DELETED)
529            {
530                for (var j = 0; j < row_length; j++)
531                {
532                    var tmpIndex = row[j].split(JS_INDEX);
533                    var key = tmpIndex[0];
534                    var value = tmpIndex[1];
535                    if (key == feedIndexes.DCAPIPARTICIPANTINDEXES_TEAM_INFO || key == feedIndexes.DCAPIPARTICIPANTINDEXES_TEAM_INFO_DELETED)
536                    {
537                        var participantData = value.split('|');
538                        var participantId = participantData[0];
539                        var participantItem = dataParticipantHolder.getOrCreateNewParticipant(participantId);
540                        participantItem.reinit(participantData);
541                        participantItem.setDeleted(key == feedIndexes.DCAPIPARTICIPANTINDEXES_TEAM_INFO_DELETED);
542                    }
543                    else if (key == feedIndexes.LOCALIZEKEYINDEXES_PARTICIPANT_EVENTS_CLASS_LOCALIZED_VAR)
544                    {
545                        cjs.Api.dataItemTranslator.updateDictionary(value);
546                    }
547                }
548
549                continue;
550            }
551            else if (!isMyTeamsFeed || isMyGamesScope) {
552                // caption
553                if (indexName === feedIndexes.SHAREDINDEXES_TOURNAMENT_NAME)
554                {
555                    var tmp_labl = {};
556                    var backupedLeagueItem = cjs.dic.getNewInstance('Data_LeagueItem');
557
558                    if (cjs.noDuelSports.includes(parse_sport_id))
559                    {
560                        tmp_labl[feedIndexes.SHAREDINDEXES_EVENT_STAGE_TYPE_ID] = '';
561                        tmp_labl[feedIndexes.SHAREDINDEXES_EVENT_STAGE_ID] = '';
562                        tmp_labl[feedIndexes.SHAREDINDEXES_MATCH_START_UTIME] = '';
563                    }
564
565                    for (var j = 0; j < row_length; j++)
566                    {
567                        var rowParts = row[j].split(JS_INDEX);
568                        if (rowParts.length == 2)
569                        {
570                            tmp_labl[rowParts[0]] = rowParts[1];
571                        }
572                    }
573
574                    //    display status of tournament's games [open/close icon]
575                    tmp_labl['display'] = tmp_labl[feedIndexes.LEAGUEINDEXES_TOURNAMENT_TYPE] != 'c';
576                    tmp_labl['g_count'] = 0;
577                    tmp_labl['sport_id'] = parse_sport_id;
578                    tmp_labl['sport'] = parse_sport;
579                    labl_id = parse_sport_id + '_' + tmp_labl[feedIndexes.SHAREDINDEXES_TOURNAMENT_STAGE_ID];
580
581                    if (isMyTeamsAction)
582                    {
583                        var mgLeagueData = cjs.mygames.getLabels();
584                        if (mgLeagueData[labl_id] != null)
585                        {
586                            tmp_labl['g_count'] = mgLeagueData[labl_id]['g_count'];
587                        }
588                    }
589
590                    if (dataLeagueHolder.hasLeague(labl_id))
591                    {
592                        var backupedLeagueItemData = dataLeagueHolder.getLeague(labl_id).getData();
593                        backupedLeagueItem.reinit(backupedLeagueItemData);
594                        tmp_labl['g_count'] = backupedLeagueItem.getEventC
594ount();
595                    }
596
597                    if (isRepairAction)
598                    {
599                        if (dataLeagueHolder.hasLeague(labl_id))
600                        {
601                            leagueItem = dataLeagueHolder.getLeague(labl_id);
602                            for (var key in tmp_labl)
603                            {
604                                if (key.length > 2 || (key == feedIndexes.SHAREDINDEXES_TOURNAMENT_NAME && tmp_labl[key] == ''))
605                                {
606                                    continue;
607                                }
608                                leagueItem.setValue(key, tmp_labl[key]);
609                            }
610                        }
611                    }
612                    else if (!update)
613                    {
614                        leagueItem = dataLeagueHolder.getOrCreateNewLeague(labl_id);
615                        leagueItem.reinit(tmp_labl);
616                    }
617                    else if (update && labl_id)
618                    {
619                        if (dataLeagueHolder.hasLeague(labl_id))
620                        {
621                            leagueItem = dataLeagueHolder.getLeague(labl_id);
622                            for (var key in tmp_labl)
623                            {
624                                if (key.length > 2 || (key == feedIndexes.SHAREDINDEXES_TOURNAMENT_NAME && tmp_labl[key] == '') || tmp_labl[key] == leagueItem.getValue(key))
625                                {
626                                    continue;
627                                }
628                                leagueItem.setValue(key, tmp_labl[key]);
629                            }
630                        }
631                    }
632
633                    if (leagueItem)
634                    {
635                        leagueItem = cjs.Api.dataItemTranslator.translate(leagueItem, backupedLeagueItem);
636                        reloadLeagues.push(leagueItem.getId());
637                    }
638                }
639                // upcoming draw row in league
640                else if (indexName === feedIndexes.SHAREDINDEXES_UPCOMING_DRAW_ID)
641                {
642                    upcomingDrawItem = cjs.dic.getNewInstance('Data_UpcomingDrawItem');
643                    for (var j = 1; j < row_length; j++)
644                    {
645                        var rowParts = row[j].split(JS_INDEX);
646                        if (rowParts.length != 2)
647                        {
648                            continue;
649                        }
650
651                        var cellKey = rowParts[0];
652                        var cellValue = rowParts[1];
653                        if (cellKey == feedIndexes.DRAWINDEXES_UPCOMING_DRAW_START_TIME)
654                        {
655                            upcomingDrawItem.addEventStartTime(parseInt(cellValue));
656                        }
657                        else
658                        {
659                            if (cellKey == feedIndexes.SHAREDINDEXES_TOURNAMENT_STAGE_ID)
660                            {
661                                labl_id = parse_sport_id + '_' + tmp_labl[feedIndexes.SHAREDINDEXES_TOURNAMENT_STAGE_ID];
662                            }
663                            upcomingDrawItem.setValue(cellKey, cellValue);
664                        }
665                    }
666
667                    if (dataLeagueHolder.hasLeague(labl_id))
668                    {
669                        dataLeagueHolder.getLeague(labl_id).addUpcomingDraw(upcomingDrawItem);
670                    }
671                }
672                else if (indexName === feedIndexes.FULLFEEDINDEXES_MOVED_EVENTS_ID)
673                {
674                    for(var j = 0; j < row_length; j++)
675                    {
676                        switch(row[j].substr(0,2))
677                        {
678                            case feedIndexes.FULLFEEDINDEXES_EVENT_WITH_UPDATED_START:
679                                eventId = 'g_' + parse_sport_id + '_' + row[j].substr(3);
680                            break;
681                            case feedIndexes.FULLFEEDINDEXES_EVENT_WITH_UPDATED_START_AND_END_TIME:
682                                if (eventId)
683                                {
684                                    tmp = (row[j].substr(3) + "").split('|');
685                                    fsEventsUpdatedStartTime[eventId] =
686                                        {
687                                            start_time: parseInt(tmp[0]),
688                                            end_time: tmp[1] ? parseInt(tmp[1]) : null
689                                        };
690                                    eventId = null;
691                                }
692                            break;
693                        }
694                    }
695                    continue;
696                }
697
698                else if (indexName === feedIndexes.STANDINGSSIGNSINDEXES_TABLE_HASH && indexValue === 'repair')
699                {
700                    special = true;
701                    var repairRows = [];
702                    for (var j = i + 1; j < rows_length; j++)
703                    {
704                        repairRows.push(rows[j]);
705                        i++;
706                        if (rows[j].split(JS_CELL_END)[0].split(JS_INDEX)[0] === feedIndexes.SHAREDINDEXES_FEED_SIGNATURE)
707                        {
708                            break;
709                        }
710                    }
711                    continue;
712                }
713                // u_304 code
714                else if (indexName === feedIndexes.SHAREDINDEXES_FEED_SIGNATURE)
715                {
716                    if (typeof action != 'undefined' && action == 'update')
717                    {
718                        u_304 = indexValue;
719                    }
720
721                    rows_length--;
722                    continue;
723                }
724                // refresh utime
725                else if(indexName === feedIndexes.SHAREDINDEXES_REFRESH_UTIME)
726                {
727                    var tmp_refresh_utime = indexValue - 0;
728
729                    if (tmp_refresh_utime > refresh_utime)
730                    {
731                        refresh_utime = tmp_refresh_utime;
732                        return_val = false;
733                    }
734                }
735                // download local update feed
736                else if (indexName === feedIndexes.SHAREDINDEXES_UPDATE_LOCAL_FEED_UPDATED_TIME)
737                {
738                    tmp = indexValue - 0;
739                    if (tmp)
740                    {
741                        cjs.dic.get('Feed_Service_LocalUpdate').setSyncTime(tmp);
742                    }
743                }
744                // no game today, past/upcoming game
745                else if (indexName === feedIndexes.FULLFEEDINDEXES_PAST_FUTURE_GAMES)
746                {
747                    gamePlanSettings = indexValue.split(";");
748                }
749                // game row
750                else if (indexName === feedIndexes.SHAREDINDEXES_EVENT_ID)
751                {
752                    var original_id = indexValue;
753                    var id = 'g_' + parse_sport_id + '_' + original_id;
754                    var backupedEventItem = cjs.dic.getNewInstance('Data_EventItem');
755                    var eventItemExists = dataEventHolder.hasEvent(id);
756
757                    // unknown game on update/repair or odds feed
758
759                    if ((update || isRepairAction || odds) && !eventItemExists)
760                    {
761                        continue;
762                    }
763
764                    reloadEvents.push(id);
765
766                    if (eventItemExists)
767                    {
768                        var backupedEventItemData = dataEventHolder.getItem(id).getData();
769                        backupedEventItem.reinit(backupedEventItemData);
770                    }
771                    // create new event entry
772                    eventItem = dataEventHolder.getOrCreateNewEvent(id);
773                    if (!eventItemExists && !update && !odds && !isRepairAction)
774                    {
775                        if (!myGamesChecker.isMyGames() || !isMyTeamsAction)
776                        {
777                            leagueItem.setValue('g_count', leagueItem.getEventCount() + 1);
778                        }
779                        eventItem.reinit(eventItem.createDefaultMatchItem(parseInt(parse_sport_id), parse_sport, SPORT_SCORE_PART_LIST));
780                        eventItem.setValue('original_id', original_id);
781                        eventItem.setValue('labl_id', labl_id);
782                        eventItem.setValue('sport_id', parse_sport_id);
783                        eventItem.setValue('sport', parse_sport);
784                    }
785
786                    var statsResultsHelper = cjs.dic.getNewInstance('Helper_StatsResultsParser');
787                    for (var j = 1; j < row_length; j++)
788                    {
789                        var rowParts = row[j].split(JS_INDEX);
790                        if (rowParts.length != 2)
791                        {
792                            continue;
793                        }
794
795                        var key = rowParts[0];
796                        var new_value_string = rowParts[1];
797
798                        if (update && [
799                            feedIndexes.ODDSINDEXES_ODDS_1_PREVIOUS,
800                            feedIndexes.ODDSINDEXES_ODDS_0_PREVIOUS,
801                            feedIndexes.ODDSINDEXES_ODDS_2_PREVIOUS,
802                            feedIndexes.ODDSINDEXES_ODDS_10_PREVIOUS,
803                            feedIndexes.ODDSINDEXES_ODDS_02_PREVIOUS,
804                            feedIndexes.ODDSINDEXES_ODDS_AH1_PREVIOUS,
805                            feedIndexes.ODDSINDEXES_ODDS_AH2_PREVIOUS,
806                            feedIndexes.ODDSINDEXES_ODDS_OU1_PREVIOUS,
807                            feedIndexes.ODDSINDEXES_ODDS_OU2_PREVIOUS,
808                            feedIndexes.ODDSINDEXES_ODDS_ML1_PREVIOUS,
809                            feedIndexes.ODDSINDEXES_ODDS_ML2_PREVIOUS].includes(key))
810                        {
811                            continue;
812                        }
813
814                        if ([
815                            feedIndexes.UPDATEINDEXES_HOME_PENALTY_SHOT,
816                            feedIndexes.UPDATEINDEXES_AWAY_PENALTY_SHOT,
817                            feedIndexes.UPDATEINDEXES_HOME_PENALTY_MISSED,
818                            feedIndexes.UPDATEINDEXES_AWAY_PENALTY_MISSED].includes(key))
819                        {
820                            continue;
821                        }
822
823                        var new_value = new_value_string;
824                        if (![
825                            feedIndexes.SHAREDINDEXES_TIME,
826                            feedIndexes.SHAREDINDEXES_GAP,
827                            feedIndexes.SHAREDINDEXES_HOME_CRICKET_RUN_RATE,
828                            feedIndexes.SHAREDINDEXES_AWAY_CRICKET_RUN_RATE,
829                            feedIndexes.RESULTSINDEXES_ROW_VALUE].includes(key))
830                        {
831                            new_value -= 0; // try convert string to number
832                        }
833
834                        if (isNaN(new_value) || new_value_string == '')
835                        {
836                            new_value = new_value_string;
837                        }
838
839                        if ((update || odds) && parseInt(cjs.dic.get('dataEvent').getEventValue(id, feedIndexes.FULLFEEDINDEXES_SWAPPED_PARTICIPANTS)))
840                        {
841                            var swappedParticipantsHandler = cjs.Api.swappedParticipantsHandlerFactory.make(key, new_value, false);
842                            key = swappedParticipantsHandler.getKey();
843                            new_value = swappedParticipantsHandler.getValue();
844                        }
845
846                        if (key === feedIndexes.ODDSINDEXES_EACH_WAY_HANDICAP && reloadLeagues.indexOf(eventItem.getLeagueId()) === -1)
847                        {
848                            reloadLeagues.push(eventItem.getLeagueId());
849                        }
850
851                        if (key === feedIndexes.FULLFEEDINDEXES_TEAM_NAME && (!update && !odds && !special) && typeof participantItem != 'undefined' && eventItem.isValid() && participantItem.getTeamName())
852                        {
853                            new_value = participantItem.getTeamName();
854                        }
855
856                        if (!statsResultsHelper.isStatsResultsIndex(key))
857                        {
858                            if (update && eventItem.getValue(key) !== new_value)
859                            {
860                                changesHistoryContainer.setValueChange(id, key, new_value, eventItem.getValue(key));
861                            }
862
863                            eventItem.setValue(key, new_value);
864                        }
865
866                        // get statsResults
867                        statsResultsHelper.setHomeAndAwayParticipantIdsFromEventItem(eventItem);
868                        statsResultsHelper.processKeyAndValue(key, new_value);
869                    }
870
871                    // update and save statsResults
872                    var statsResults = statsResultsHelper.getStatsResults();
873                    for (var statsResultsKey in statsResults)
874                    {
875                        new_value = statsResults[statsResultsKey];
876                        if (update && eventItem.getValue(statsResultsKey) !== new_value)
877                        {
878                            changesHistoryContainer.setValueChange(id, statsResultsKey, new_value, eventItem.getValue(statsResultsKey));
879                        }
880
881                        eventItem.setValue(statsResultsKey, new_value);
882                    }
883
884                    // penalty
885                    if (action == 'update')
886                    {
887                        for (var j = 1; j < row_length; j++)
888                        {
889                            var key = row[j].substr(0, 2);
890                            if ([
891                                    feedIndexes.UPDATEINDEXES_HOME_PENALTY_SHOT,
892                                    feedIndexes.UPDATEINDEXES_AWAY_PENALTY_SHOT,
893                                    feedIndexes.UPDATEINDEXES_HOME_PENALTY_MISSED,
894                                    feedIndexes.UPDATEINDEXES_AWAY_PENALTY_MISSED].includes(key))
895                            {
896                                var new_value_arr = row[j].substr(3).split(',');
897                                var incidentTime = new_value_arr[1] / 60;
898                                var updatedTime = new_value_arr[2];
899                                var incidentId = new_value_arr[3];
900
901                                if (new_value_arr[0] == eventItem.getStage())
902                                {
903                                    var counterTimeGetter = cjs.Api.loader.get('counterTime');
904                                    counterTimeGetter.call(eventItem, function(counterTime) {
905                                        var interval = 5;
906                                        if (incidentTime >= counterTime - interval && incidentTime <= counterTime + interval)
907                                        {
908                                            new_value = [updatedTime, incidentId];
909                                            if (eventItem.getValue(key) !== new_value)
910                                            {
911                                                changesHistoryContainer.setValueChange(id, key, new_value, eventItem.getValue(key));
912                                                eventItem.setValue(key, new_value);
913                                            }
914                                        }
915                                    });
916                                }
917                            }
918                            else if (cjs.noDuelSports.includes(eventItem.getSportId()))
919                            {
920                                if ([
921                                    feedIndexes.SHAREDINDEXES_EVENT_STAGE_TYPE_ID,
922                                    feedIndexes.SHAREDINDEXES_EVENT_STAGE_ID,
923                                    feedIndexes.SHAREDINDEXES_MATCH_START_UTIME].includes(key))
924                                {
925                                    reloadTabContent = true;
926                                }
927                            }
928                            else if (key === feedIndexes.SHAREDINDEXES_EVENT_STAGE_TYPE_ID
929                                && category !== 0
930                                && changesHistoryContainer.didValueChanged(id, feedIndexes.SHAREDINDEXES_EVENT_STAGE_TYPE_ID))
931                            {
932                                reloadTabContent = true;
933                            }
934                            else if (key === feedIndexes.SHAREDINDEXES_MATCH_START_UTIME
935                                && changesHistoryContainer.didValueChanged(id, feedIndexes.SHAREDINDEXES_MATCH_START_UTIME))
936                            {
937                                reloadTabContent = true;
938                                sortTabContent = true;
939                            }
940                        }
941                    }
942
943                    eventItem = cjs.Api.dataItemTranslator.translate(eventItem, backupedEventItem);
944
945                    var page = cjs.dic.get('util_page');
946                    var check_start_times = category != 5 && typeof action == 'undefined' && !odds && !update && !page.isCountryPage() && !page.isSeasonPage();
947                    var removeEventByTime = check_start_times &&
948                        !cjs.dic.get('utilDate').getMatchDay(eventItem.getStartTime(), eventItem.getEndTime()).includes(parseInt(sudate)) &&
949                        !eventItem.isLive();
950                    var removeEventByInvalidLeague = !eventItem.getLeague().isValid();
951                    if (removeEventByTime || !eventItem.isValid() || removeEventByInvalidLeague)
952                    {
953                        if ((!myGamesChecker.isMyGames() || !isMyTeamsAction) && leagueItem)
954                        {
955                            leagueItem.setValue('g_count', leagueItem.getEventCount() - 1);
956                        }
957                        dataEventHolder.removeEvent(id);
958                        changesHistoryContainer.removeNewData(id);
959                    }
960
961                    if (!update && !odds && !special)
962                    {
963                        if (typeof participantItem != 'undefined' && eventItem.isValid())
964                        {
965                            participantItem.addEventId(eventItem.getId());
966                        }
967                    }
968                }
969            }
970        }
971
972        fs_input = null;
973
974        if (special && repairRows.length > 0)
975        {
976            parse(repairRows.join(JS_ROW_END), false, false, "frepair");
977        }
978
979        var leaguesInHolder = dataLeagueHolder.getReferences();
980        for (var leagueId in leaguesInHolder)
981        {
982            if (!leaguesInHolder[leagueId].isValid())
983            {
984                dataLeagueHolder.removeLeague(leagueId);
985                reloadLeagues.push(leagueId);
986            }
987        }
988
989        var isUpdateAction = update || isRepairAction || odds;
990
991        if (isUpdateAction && cjs.dic.get("util_page").getPageType() != 'player_page')
992        {
993            if (reloadTabContent)
994            {
995                if (sortTabContent)
996                {
997                    sort_fs_data();
998                }
999
1000                cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
1001                    reactCalls.reloadTabContent(category);
1002                });
1003            }
1004            else
1005            {
1006                cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
1007                    for (var reloadEventId in reloadEvents)
1008                    {
1009                        reactCalls.reloadEvent(reloadEvents[reloadEventId]);
1010                    }
1011                    for (var reloadLeagueId in reloadLeagues)
1012                    {
1013                        reactCalls.reloadLeague(reloadLeagues[reloadLeagueId]);
1014                    }
1015                });
1016            }
1017        }
1018
1019        return return_val;
1020    };
1021
1022    function sort_fs_data()
1023    {
1024        cjs.dic.get('dataLeagueHolderProxy').getHandler().resetIds();
1025        var dataHandler = cjs.dic.get('dataEventHolderProxy').getHandler();
1026        var utilPage = cjs.dic.get("util_page");
1027        dataHandler.resetIds();
1028
1029        if (!cjs.dic.get("util_sport").hasCategoryPage(sport_id) && utilPage.isCountryPage())
1030        {
1031            return;
1032        }
1033        dataHandler.sort();
1034    };
1035
1036    /**
1037 * Reset data variables
1038    */
1039    function reset_env()
1040    {
1041        if (typeof cjs !== 'undefined' && cjs.dic != null)
1042        {
1043            cjs.dic.get('dataEventHolderProxy').eachHolder(function(scope, holder)
1044            {
1045                if (!['mygames', 'default', 'temporary'].includes(scope))
1046                {
1047                    return;
1048                }
1049                holder.reinit();
1050            });
1051            cjs.dic.get('dataLeagueHolderProxy').eachHolder(function(scope, holder)
1052            {
1053                if (!['mygames', 'default', 'temporary'].includes(scope))
1054                {
1055                    return;
1056                }
1057                holder.reinit();
1058            });
1059            cjs.dic.get('dataEventHolderProxy').eachHandler(function(scope, handler)
1060            {
1061                if (!['mygames', 'default', 'temporary'].includes(scope))
1062                {
1063                    return;
1064                }
1065                handler.resetIds();
1066            });
1067            cjs.dic.get('dataLeagueHolderProxy').eachHandler(function(scope, handler)
1068            {
1069                if (!['mygames', 'default', 'temporary'].includes(scope))
1070                {
1071                    return;
1072                }
1073                handler.resetIds();
1074            });
1075        }
1076        fs_counter = {};
1077        fsEventsUpdatedStartTime = {};
1078        cjs.calendarDayChanged = false;
1079    };
1080// }}}
1081
1082    /**
1083 * init environment
1084    * @param    string    sport_name                    name of desired sport
1085    * @param    string    [country_id = null]            id of desired country (from left menu)
1086    * @param    string    [tournament_id = null]            id of desired tournament (from left menu)
1087    * @param    bool    [country_order_fin = true]    order set to finished games
1088    */
1089    function init({
1090                      sportId,
1091                      sport_name,
1092                      country_id,
1093                      tournament_id,
1094                      country_tournament_order_fin,
1095                      prev_category,
1096                      prev_date,
1097                      startUpdater,
1098                      participant_id,
1099                      seriesId,
1100                      pushEnabled = true,
1101                  }) {
1102        if(typeof startUpdater == 'undefined')
1103        {
1104            startUpdater = true;
1105        }
1106
1107        var utilPage = cjs.dic.get("util_page");
1108
1109        // XXX Hack to partial work
1110        if (utilPage.isMixed())
1111        {
1112            sport_name = 'soccer';
1113        }
1114
1115        if (dof = clientStorage.get('fs_of_' + cjs.Api.config.get('app', 'lang', 'web'))) {
1116            default_odds_format = dof;
1117        }
1118
1119        ajax_updater = 'update';
1120
1121        if (pushEnabled) {
1122            initPush();
1123        }
1124
1125        var currentTimestamp = cjs.dic.get("util_date").getTimestamp();
1126        refresh_utime = currentTimestamp;
1127
1128        if (typeof SPORT_LIST[sport_name] == 'undefined')
1129        {
1130            return false;
1131        }
1132
1133        if (typeof country_id == 'undefined' || country_id == 0)
1134        {
1135            country_id = null;
1136        }
1137
1138        if (typeof tournament_id == 'undefined' || tournament_id == 0)
1139        {
1140            tournament_id = null;
1141        }
1142
1143        if (typeof participant_id == 'undefined' || participant_id == 0)
1144        {
1145            participant_id = null;
1146        }
1147
1148        if (typeof seriesId == 'undefined' || seriesId == 0)
1149        {
1150            seriesId = null;
1151        }
1152
1153        if (typeof country_tournament_order_fin == 'undefined')
1154        {
1155            country_tournament_order_fin = true;
1156        }
1157
1158        sport_id = sportId;
1159        sport = sport_name;
1160        country = country_id;
1161        utilPage.setCountryId(country_id || 0);
1162        tournament = tournament_id;
1163        participant = participant_id;
1164        utilPage.setParticipantEncodedId(participant_id || '');
1165        series = seriesId;
1166        utilPage.setSeriesEncodedId(seriesId || '');
1167        utilPage.setFullPage(true);
1168        tournamentPage = tournament != null;
1169        utilPage.setTournamentPage(tournamentPage);
1170        utilPage.setTournamentId(tournament_id);
1171
1172        initCategory(prev_category);
1173
1174        // set date
1175        initDate(prev_date);
1176
1177        initFeedRequest();
1178        initLsLoginClient();
1179        initMyGames();
1180
1181        // ajax sync
1182        updater = new CommCore(country, tournament, country_tournament_order_fin, participant, series);
1183        cjs.fromGlobalScope.updater = updater;
1184
1185        initUpdatingMatches(country, startUpdater);
1186        initTooltip();
1187
1188        cjs.Api.loader.get('tv/transactions').call();
1189    };
1190
1191    cjs.fromGlobalScope.init = init;
1192
1193    function initTooltip()
1194    {
1195        if (tt == null) {
1196            tt = new Tooltip();
1197        }
1198
1199        var tooltipElement = document.getElementById("tooltip-1");
1200        if (tooltipElement) {
1201            tooltipElement.addEventListener("mouseleave", function (e) {
1202                cjs.dic.get("util_enviroment").getTooltipObject().hide(e.target);
1203            });
1204        }
1205    }
1206
1207    cjs.fromGlobalScope.initTooltip = initTooltip;
1208
1209    // cjs.push is created asynchronously (on DOMContentLoaded), so typeof cjs.push is not enough to prevent
1210    // a second module - and a second push connection - from being created by a repeated call
1211    var pushCreationStarted = false;
1212
1213    function initPush(fallback)
1214    {
1215        if (typeof cjs.push === 'undefined' && !pushCreationStarted)
1216        {
1217            pushCreationStarted = true;
1218            var pushParameters = {
1219                "domain": 'fsdatacentre.com',
1220                "aliases": 'p1tt2:100, p2tt2:100, p3tt2:100, p4tt2:100, p5tt2:100, p6tt2:100, p7tt2:100, p8tt2:100, p9tt2:100, p10tt2:100',
1221                "port": 443,
1222                "migPush": new PushClient,
1223                "namespace": '/fs/fs3_',
1224                "projectId": 14,
1225                "jsxCompressor": JXG,
1226                "fallbackMethod": fallback || push_fallback,
1227                "fallbackDelay": cjs.Api.ajaxSyncTime.getTime('update'),
1228                "enabled": mpe_delivery == 'p',
1229            };
1230
1231            cjs.Api.loader.get('synchronizationPush').call(pushParameters, function(module) {
1232                cjs.push = module;
1233            });
1234        }
1235    };
1236
1237    cjs.fromGlobalScope.initPush = initPush;
1238
1239    function initStaticPagesGamesNotification()
1240    {
1241                initLsLoginClient();
1242        cjs.disableRedrawUserSettings = true;
1243        
1244        if (cjs.Api.config.get('app', 'game_notification_push' ,'enable'))
1245        {
1246            cjs.gamesNotificationOnly = true;
1247            initPush(function() {});
1248            cjs.Api.loader.get('synchronizationPushInstance').call(function(_push) {
1249                _push.enable(true);
1250                push_connect();
1251                initMyGames();
1252                push_update_subscription();
1253            });
1254        }
1255        else
1256        {
1257            cjs.isStaticPage = true;
1258        }
1259    }
1260
1261    cjs.fromGlobalScope.initStaticPagesGamesNotification = initStaticPagesGamesNotification;
1262
1263    function initUpdatingMatches(country, startUpdater)
1264    {
1265        if (startUpdater)
1266        {
1267            updater.is_updater_started = true;
1268
1269            var param = 'full';
1270
1271            if (country === null)
1272            {
1273                param = 'full';
1274            }
1275            else if (participant !== null)
1276            {
1277                param = 'participant';
1278                // TODO back compatibility for sports not included in FSWEB-12635 (Team page with new data structure)
1279                if ((cjs.Api.config.get('app', 'team_page' ,'duel') || []).includes(sport_id)) {
1280                    return; // TODO not downloading initial feed for team page
1281                }
1282            }
1283            else if (series !== null)
1284            {
1285                param = 'series';
1286            }
1287            else if (tournament !== null)
1288            {
1289                param = 'tournament';
1290            }
1291            else if (country !== null)
1292            {
1293                param = 'country';
1294            }
1295
1296            setupInitialLoading(param);
1297
1298            if (param === 'full')
1299            {
1300                updater.doc_update('full');
1301            }
1302            else
1303            {
1304                setTimeout(function() {
1305                    updater.doc_update(param);
1306                }, 10);
1307            }
1308        }
1309        else
1310        {
1311            try
1312            {
1313                document.displayTrustedAdvert();
1314            }
1315            catch(e) { }
1316        }
1317    };
1318
1319    function initDate(previousDate)
1320    {
1321        var prev_date = parseInt(previousDate);
1322        if (!isNaN(prev_date))
1323            sudate = prev_date;
1324        else
1325        {
1326            prev_date = clientStorage.get('fs_date', 'parent');
1327            if (null !== prev_date) {
1328                prev_date = parseInt(prev_date);
1329                if (!isNaN(prev_date)) {
1330                    sudate = prev_date;
1331                }
1332                clientStorage.drop('fs_date');
1333            }
1334        }
1335    };
1336
1337    function initCategory(previousCategory)
1338    {
1339
1340        var prev_category = parseInt(previousCategory);
1341        if (!isNaN(prev_category))
1342        {
1343            category = prev_category;
1344        }
1345        else
1346        {
1347            var window_location = new String(window.location);
1348            if(window_location.match(/cat=/))
1349            {
1350                var pos = window_location.indexOf('cat=');
1351                prev_category = window_location.substr(pos + 4, 1);
1352
1353                prev_category = cjs.dic.get('util_number').toNumber(prev_category);
1354                category = prev_category;
1355            }
1356        }
1357    };
1358
1359    function initMyGames()
1360    {
1361        if (typeof cjs.mygames === 'undefined')
1362        {
1363            cjs.mygames = cjs.dic.get("MyGamesFactory").create({
1364                storage: clientStorage,
1365                lsid: cjs.dic.get('MyGamesClientFactory').create(),
1366                sportList: SPORT_LIST_BY_ID,
1367                dayGetter: function(){ return sudate; },
1368                getMatchDayFunc: function(startTime, endTime) { return cjs.dic.get('utilDate').getMatchDay(startTime, endTime); },
1369                projectId: project_id,
1370                getGmtOffsetFunc: cjs.Api.timezone.getGmtOffset.bind(cjs.Api.timezone),
1371                eventsUpdatedStartTimeGetter: function(){ return fsEventsUpdatedStartTime; },
1372                dic: cjs.dic,
1373                categoryGetter: function(){ return category; },
1374                sortFsData: function() { sort_fs_data(); },
1375                pushUpdateSubscription: function() { push_update_subscription(); },
1376                translate: cjs.dic.get('utilTrans'),
1377            });
1378
1379            cjs.Api.loader.get('myGames').fulfill(function(callback) {
1380                callback(cjs.mygames);
1381            });
1382        }
1383    };
1384
1385    cjs.fromGlobalScope.initMyGames = initMyGames;
1386
1387    function initLsLoginClient()
1388    {
1389                lsid_init();
1390        cjs.liveTableSettings = cjs.dic.get("LiveTable_Settings");
1391        cjs.liveTableSettings.init(
1392            function(){ return cjs.disableRedrawUserSettings },
1393            function(){ return category },
1394            sort_fs_data
1395        );
1396        if (sport_id !== null) {
1397            my_leagues_init(sport_id);
1398        }
1399
1400        var reloadMyGamesTab = function() {
1401            if (cjs.dic.get('Helper_MyGamesChecker').isMyGames() && !cjs.Api.config.get("app", "myfs", "enabled")) {
1402                cjs.Api.loader.get("myTeams").call(function(_mt) {
1403                    if (_mt.getCount()) {
1404                        _mt.reloadAllParticipants();
1405                    } else {
1406                        loadAndShowMygamesContent();
1407                        _mt.callReactUpdates();
1408                    }
1409                });
1410            } else {
1411                cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
1412                    reactCalls.reloadMyGamesTabCounter();
1413                });
1414            }
1415        };
1416
1417        cjs.Api.loader.get("loggedInObservable").call((observable) => {
1418            observable.subscribe((loggedIn) => {
1419                if(loggedIn) {
1420                    cjs.mygames.load();
1421                    cjs.liveTableSettings.loadUserSettings();
1422                    redrawLivescore();
1423                    reloadMyGamesTab();
1424                    push_update_subscription();
1425                    const seoTop = document.querySelectorAll(".seoTop");
1426                    seoTop.forEach((elem) => {
1427                        elem.style.display = "none";
1428                        elem.classList.add("seoTopHidden");
1429                    });
1430                    document.body.classList.add('isLoggedIn');
1431                    document.body.classList.remove('seoTopWrapperHidden');
1432                } else {
1433                    cjs.mygames.drop();
1434                    cjs.liveTableSettings.restoreDefaults();
1435                    redrawLivescore();
1436                    reloadMyGamesTab();
1437                    push_update_subscription();
1438                }
1439            });
1440        });
1441        const lsidClient = cjs.dic.get('lsidClientFactory').getInstance();
1442        lsidClient.storage.getInnerDataObservable(["myLeagues"]).subscribe(redrawLivescore);
1443        lsidClient.storage.getInnerDataObservable(["mygames"]).subscribe(function()
1444        {
1445            cjs.mygames.load();
1446            redrawLivescore();
1447            reloadMyGamesTab();
1448        });
1449        lsidClient.storage.getInnerDataObservable(["lsSettins"]).subscribe(function()
1450        {
1451            cjs.liveTableSettings.loadUserSettings();
1452            redrawLivescore();
1453        });
1454            };
1455
1456    function initFeedRequest()
1457    {
1458        if (typeof(cjs.feedRequest) !== 'undefined')
1459        {
1460            return;
1461        }
1462
1463        cjs.feedRequest = cjs.dic.getNewInstance("Feed_Request");
1464        cjs.feedLoader = cjs.dic.getNewInstance("Feed_Loader");
1465    };
1466
1467    cjs.fromGlobalScope.initFeedRequest = initFeedRequest;
1468
1469    function redrawLivescore()
1470    {
1471        var isTournamentPage = cjs.dic.get('util_page').isTournamentPage();
1472        if (cjs.redrawLivescoreCalled || (!cjs.full_loaded && !isTournamentPage))
1473        {
1474            return;
1475        }
1476        cjs.redrawLivescoreCalled = true;
1477        setTimeout(function()
1478        {
1479            delete(cjs.redrawLivescoreCalled);
1480            cjs.liveTableSettings.redrawLivescore(true);
1481            cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
1482                reactCalls.reloadStaticContent();
1483            });
1484        }, 100);
1485    };
1486
1487    function init_after_feeds()
1488    {
1489        if(!cjs.full_loaded || !cjs.repair_loaded)
1490            return;
1491
1492        // update counter
1493        if (counter_update_interval === null)
1494        {
1495            counter_update_interval = setInterval('counter_update()', 5 * 1000);
1496        }
1497
1498        set_service_status();
1499    };
1500
1501    function start_updating_odds()
1502    {
1503        if(typeof updater.updating_odds_interval != 'undefined')
1504            stop_updating_odds();
1505        updater.updating_odds_interval = setInterval('updater.doc_update(\'updated-odds\')', cjs.Api.config.get('ajax', 'prematch_odds_sync_time') * 1000);
1506    };
1507
1508    function stop_updating_odds()
1509    {
1510        clearInterval(updater.updating_odds_interval);
1511        delete updater.updating_odds_interval;
1512    };
1513
1514    function setHolderProxyScope(category, defaultScope, myGamesScope)
1515    {
1516        var scope;
1517        var holderEventProxy = cjs.dic.get('dataEventHolderProxy');
1518        var holderLeagueProxy = cjs.dic.get('dataLeagueHolderProxy');
1519        var previousScopeEvent = holderEventProxy.getScope();
1520        var previousScopeLeague = holderLeagueProxy.getScope();
1521        var dataEventHolderOld, dataEventHolderNew, dataLeagueHolderOld, dataLeagueHolderNew;
1522
1523        switch(category)
1524        {
1525            case 5:
1526                scope = myGamesScope;
1527                break;
1528            default:
1529                scope = defaultScope;
1530        }
1531
1532        if (previousScopeEvent !== scope)
1533        {
1534            if (sudate == 0 && previousScopeEvent === previousScopeLeague && previousScopeEvent === defaultScope && scope === myGamesScope)
1535            {
1536                dataEventHolderOld = cjs.dic.get('dataEventHolder');
1537                dataEventHolderNew = cjs.dic.get('dataEventHolderMygames');
1538                dataLeagueHolderOld = cjs.dic.get('dataLeagueHolder');
1539                dataLeagueHolderNew = cjs.dic.get('dataLeagueHolderMygames');
1540                dataEventHolderNew.reinit(dataEventHolderOld.getReferences());
1541                dataLeagueHolderNew.reinit(dataLeagueHolderOld.getReferences());
1542                holderEventProxy.setScope(scope);
1543                holderLeagueProxy.setScope(scope);
1544                holderEventProxy.getHandler().resetIds();
1545                holderLeagueProxy.getHandler().resetIds();
1546            }
1547            else if (sudate == 0 && previousScopeEvent === previousScopeLeague && previousScopeEvent === myGamesScope && scope === defaultScope)
1548            {
1549                holderEventProxy.getHolder().reinit();
1550                holderLeagueProxy.getHolder().reinit();
1551                holderEventProxy.getHandler().resetIds();
1552                holderLeagueProxy.getHandler().resetIds();
1553                holderEventProxy.setScope(scope);
1554                holderLeagueProxy.setScope(scope);
1555            }
1556            else
1557            {
1558                holderEventProxy.getHolder().reinit();
1559                holderLeagueProxy.getHolder().reinit();
1560                holderEventProxy.getHandler().resetIds();
1561                holderLeagueProxy.getHandler().resetIds();
1562                holderEventProxy.setScope(scope);
1563                holderLeagueProxy.setScope(scope);
1564                holderEventProxy.getHolder().reinit();
1565                holderLeagueProxy.getHolder().reinit();
1566                holderEventProxy.getHandler().resetIds();
1567                holderLeagueProxy.getHandler().resetIds();
1568            }
1569        }
1570    };
1571
1572    function updateNonMyGamesTabs()
1573    {
1574        if (updater.last_doc_update_category == 5)
1575        {
1576            if (cjs.dic.get('dataEventHolderProxy').getHolder().hasData())
1577            {
1578                sort_fs_data();
1579                updater.last_doc_update_category = category;
1580            }
1581            else
1582            {
1583                updater.last_doc_update_category = category;
1584                cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
1585                    reactCalls.reloadDay(0);
1586                });
1587            }
1588        }
1589
1590        return true;
1591    };
1592
1593    function display_banners()
1594    {
1595        cjs.Api.loader.get("geoIpResolver").call(function(){
1596            cjs.Api.loader.get("onetrust").call(() => {
1597                cjs.Api.loader.get('boxContentManager').call(function(boxContentManager) {
1598                    boxContentManager.show(cjs.geoIP, cjs.geoIPIsoSubdivisionCode0, ["over_self_promo", "under"], cjs.Api.config.get('app', 'legal_age_confirmation'));
1599                });
1600            });
1601        });
1602    };
1603
1604    function oddsActionsAfterContentGenerated(isOdds)
1605    {
1606        if (isOdds)
1607        {
1608            push_update_subscription(); // hack - tohle neni udelane jeste ciste
1609            cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
1610                reactCalls.loadingState("odds", false);
1611                reactCalls.fullOddsFeedLoaded();
1612            });
1613
1614            // regenerate live sync
1615            if(interval_live != null)
1616            {
1617                clearInterval(interval_live);
1618                interval_live = null;
1619            }
1620        }
1621    }
1622
1623    function pgenerate_odds()
1624    {
1625        setTimeout('updater.doc_update(\'odds\', true)', 100);
1626    };
1627
1628    cjs.fromGlobalScope.detail_open = function (_id, _tab, _checkHolder) {
1629        cjs.Api.loader.get('detail/opener').call({ eventId: _id, tabName: _tab, checkHolder: _checkHolder, isNoDuel: false })
1630    };
1631
1632    function bookmaker_open(link, bookmakerId, betslip)
1633    {
1634        let url;
1635        try {
1636            url = new URL(link, window.location.origin);
1637        } catch (e) {
1638            // console.error(e, url);
1639            return;
1640        }
1641
1642        if (!url.searchParams.has('gicc') || !url.searchParams.has('gisc')) {
1643            url.searchParams.set('gicc', cjs.geoIP);
1644            url.searchParams.set('gisc', cjs.geoIPIsoSubdivisionCode0);
1645        }
1646
1647        if (betslip)
1648        {
1649            var width = 0;
1650            var height = 0;
1651            cjs.Api.loader.get('bookmakerSettings').call(function(module) {
1652                var betslipWindow = module.getBetslipWindow(bookmakerId);
1653                width = betslipWindow.getWidth();
1654                height = betslipWindow.getHeight();
1655            });
1656
1657            var params = '';
1658            if (width && height)
1659            {
1660                params = 'hotkeys=no, resizable=no, toolbar=no, status=no, dependent=yes, scrollbars=1, width=' + width + ', height=' + height;
1661            }
1662            var detail_window = window.open(url, "betslip", params);
1663            if (!detail_window.closed)
1664            {
1665                detail_window.focus();
1666            }
1667        }
1668        else
1669        {
1670            window.open(link);
1671        }
1672    };
1673
1674    function reload(force_reload)
1675    {
1676        if (force_reload || true)
1677        {
1678            var url, message = "reload:" + sudate + "-" + category;
1679            var matches = /^([^#]+)#(.*)\breload:([0-9]+\-[0-9])(.*)$/.exec(parent.location.href);
1680            if (matches)
1681                url = matches[1] + "#" + matches[2] + message + (matches[4].length ? ";" + matches[4] : "");
1682            else
1683            {
1684                matches = /^([^#]+)#(.*)$/.exec(parent.location.href);
1685                if (matches)
1686                    url = matches[1] + "#" + (matches[2].length ? matches[2] + ";" : "") + message;
1687                else
1688                    url = parent.location.href + "#" + message;
1689            }
1690            parent.location.href = url;
1691            parent.location.reload();
1692        }
1693        else
1694            updater.doc_resume();
1695    };
1696
1697    /**
1698 * Correct play time of matches
1699    */
1700    function counter_update()
1701    {
1702        var eventHandler = cjs.dic.get('dataEventHolderProxy').getHandler();
1703        var eventHolder = cjs.dic.get('dataEventHolderProxy').getHolder();
1704        var currentTimestamp = cjs.dic.get("util_date").getTimestamp();
1705        var reloadEvents = {};
1706
1707        eventHandler.each(function(index, id)
1708        {
1709            var eventItem = this.getItem(id);
1710            var periodUpdateUTime = eventItem.getValue(feedIndexes.UPDATEINDEXES_PERIOD_UPDATE_UTIME);
1711
1712            cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
1713                reactCalls.reloadEvent(id);
1714            });
1715
1716            if (typeof fs_counter[id] === "undefined"
1717                && periodUpdateUTime > 0
1718                && periodUpdateUTime > (currentTimestamp - counter_duration_time)
1719                && !eventItem.isScheduled())
1720            {
1721                fs_counter[id] = periodUpdateUTime;
1722                reloadEvents[id] = 1;
1723            }
1724        });
1725
1726        for (var fsDataIndex in fs_counter)
1727        {
1728            if (fs_counter[fsDataIndex] < currentTimestamp - counter_duration_time)
1729            {
1730                if (eventHolder.hasItem(fsDataIndex))
1731                {
1732                    eventHolder.getItem(fsDataIndex).setValue(feedIndexes.UPDATEINDEXES_PERIOD_UPDATE_UTIME, 0);
1733                    reloadEvents[fsDataIndex] = 1;
1734                }
1735                delete fs_counter[fsDataIndex];
1736            }
1737        }
1738
1739        cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
1740            for (var reloadEventId in reloadEvents)
1741            {
1742                reactCalls.reloadEvent(reloadEventId);
1743            }
1744        });
1745    };
1746
1747    function set_calendar_date(value, forceReload)
1748    {
1749        if (!forceReload && value == sudate) return;
1750        sudate = cjs.dic.get('util_number').toNumber(value);
1751        cjs.calendarDayChanged = true;
1752
1753        if (hasRepairFeed(value))
1754        {
1755            delete cjs.gamesNotificationOnly;
1756        }
1757        else
1758        {
1759            cjs.gamesNotificationOnly = true;
1760        }
1761
1762        push_update_subscription();
1763        push_connect(sudate);
1764
1765        setTimeout(function () {
1766            if (!cjs.dic.get('Helper_MyGamesChecker').isMyGames()) {
1767                updater.doc_update();
1768            }
1769        }, 10);
1770    };
1771
1772    /**
1773     * Opens window showing standings or draw for tournament stage.
1774     */
1775    function stats_open(tournament_id, tournament_stage_id, sport_id, stats_type_ident)
1776    {
1777        cjs.Api.loader.get('util/stats/opener').call({tournamentId: tournament_id, tournamentStageId: tournament_stage_id, sportId: sport_id, statsTypeIdent: parseInt(stats_type_ident) || 0});
1778    };
1779
1780    function setAjaxSyncMultiplier(multiplier)
1781    {
1782        if (cjs.Api.ajaxSyncTime.getMultiplier() !== multiplier) {
1783            updater.ajax_time_update = true;
1784        }
1785
1786        cjs.Api.ajaxSyncTime.setMultiplier(multiplier);
1787    };
1788
1789    function set_service_status(value)
1790    {
1791        if(typeof value == 'undefined')
1792            value = service_status;
1793
1794        value = parseInt(value, 10);
1795        cjs.Api.loader.get('Helper_ServiceStatusBox').call(value)
1796        service_status = value;
1797    };
1798
1799
1800// CommCore server communication routines {{{
1801
1802    // CommCore init {{{
1803
1804    /**
1805     * Constructor of the CommCore object.
1806     *
1807     * @param integer time    Interval for check updates
1808     * @param string func    Function to call
1809     * @return object
1810     */
1811    function CommCore(country_id, tournament_id, country_tournament_order_fin, participant_id, seriesId)
1812    {
1813        var currentTimestamp = cjs.dic.get("util_date").getTimestamp();
1814        this.interval_sync    = null;
1815        this.interval_blink = null;
1816        this.interval_counter = null;
1817        this.interval_live = null;
1818        this.last_sync_utime = currentTimestamp;
1819        this.refresh_utime = currentTimestamp;
1820        this.last_doc_update_category = null;
1821        this.last_doc_update_action = null;
1822        this.parse_only = false;
1823        this.ajax_time_update = false;
1824
1825        this.country_id = country_id;
1826        this.tournament_id = tournament_id;
1827        this.country_tournament_order_fin = (country_tournament_order_fin ? true : false);
1828
1829        if (tournament_id != null)
1830        {
1831            this.init_action = 'tournament';
1832        }
1833        else if (typeof participant_id != 'undefined' && participant_id != null)
1834        {
1835            this.init_action = 'participant';
1836        }
1837        else if (typeof seriesId != 'undefined' && seriesId != null)
1838        {
1839            this.init_action = 'series';
1840        }
1841        else if (country_id != null)
1842        {
1843            this.init_action = 'country';
1844        }
1845        else
1846        {
1847            this.init_action = 'full';
1848        }
1849
1850        this.game  = null;
1851        this.content_utime = null;
1852    };
1853    // }}}
1854
1855    /**
1856     * Resume AJAX update after long failure - this is a workaround for frepair feed which is called but no update feed is started afterwards
1857     */
1858    CommCore.prototype.doc_resume = function(forceUpdate)
1859    {
1860        if (forceUpdate || !cjs.dic.get('Helper_MyGamesChecker').isMyGames())
1861        {
1862            updater.doc_update();
1863            updater.set_interval('update');
1864        }
1865        else
1866        {
1867            loadAndShowMygamesContent();
1868        }
1869    };
1870
1871    CommCore.prototype.lastSyncUtimeIsTooOld = function(currentTimestamp, useOddsCacheTime)
1872    {
1873        currentTimestamp = currentTimestamp || cjs.dic.get("util_date").getTimestamp();
1874        var cacheTime = useOddsCacheTime ? cjs.Api.config.get('ajax', 'prematch_odds_cache_time') : cjs.Api.config.get('ajax', 'sql_cache_time');
1875        return !this.ajax_time_update && (this.last_sync_utime + (0.8 * cacheTime) < currentTimestamp);
1876    };
1877
1878    CommCore.prototype.lastSyncUtimeCanBeHandledByRepairFeed = function(currentTimestamp)
1879    {
1880        currentTimestamp = currentTimestamp || cjs.dic.get("util_date").getTimestamp();
1881        return this.last_sync_utime + (0.8 * 300) > currentTimestamp;
1882    };
1883
1884    function referenceSameIdsInHolders(holder1, holder2)
1885    {
1886        var id, ids = holder1.getAllContainerIds();
1887        for (var i = 0, _len = ids.length; i < _len; i++ )
1888        {
1889            id = ids[i];
1890            if (holder2.hasItem(id))
1891            {
1892                holder2.setItem(id, holder1.getItem(id));
1893            }
1894        }
1895    };
1896
1897    // CommCore request functions {{{
1898    CommCore.prototype.doc_update = function(action, get_odds, prefered_sport_id, pageNumber, type, responseCallback)
1899    {
1900        if (category == 5 && (action == 'update' || action == 'repair' || action == 'frepair'))
1901        {
1902            var neededFeeds = [];
1903            neededFeeds = neededFeeds.concat(cjs.mygames.getNeededFeeds(1));
1904
1905            if (neededFeeds.length > 0)
1906            {
1907                for (var i in neededFeeds)
1908                {
1909                    if (sport_id == neededFeeds[i].sport_id)
1910                    {
1911                        continue;
1912                    }
1913
1914                    prefered_sport_id = 0;
1915                    break;
1916                }
1917            }
1918
1919            if (typeof cjs.myTeams != 'undefined')
1920            {
1921                var sports = cjs.myTeams.getSportIds();
1922                if (sports.length > 1 || (sports.length == 1 && sports[0] != prefered_sport_id))
1923                {
1924                    prefered_sport_id = 0;
1925                }
1926            }
1927        }
1928
1929        action = (typeof action == 'undefined' ? updater.init_action : action);
1930
1931        prefered_sport_id = (typeof prefered_sport_id == 'undefined') ? sport_id : prefered_sport_id;
1932
1933        // sys - out of sync update
1934        if(action == 'sys' && ((sudate != 0 && sudate != -1)))
1935            return;
1936
1937        // update - out of sync
1938        if(action == 'update' && (sudate != 0 && sudate != -1))
1939            return;
1940
1941        this.last_doc_update_category = category;
1942        this.last_doc_update_action = action;
1943
1944        switch (action)
1945        {
1946            case 'full':
1947            case 'country':
1948            case 'tournament':
1949                if (tournamentPage === false && ['country', 'tournament'].includes(action))
1950                {
1951                    var eventHolder = cjs.dic.get('dataEventHolder');
1952                    var leagueHolder = cjs.dic.get('dataLeagueHolder');
1953                    var completeEventsHolder = cjs.dic.get('dataEventHolderTemporary');
1954                    var completeLeaguesHolder = cjs.dic.get('dataLeagueHolderTemporary');
1955                    var filteredEventsHolder = cjs.dic.get('dataEventHolderFiltered');
1956                    var filteredLeaguesHolder = cjs.dic.get('dataLeagueHolderFiltered');
1957                    var isCountryTabDefault = category === 0;
1958                    var isCountryTabFinished = category === 6;
1959                    var isCountryTabScheduled = category === 7;
1960                    var afterCallback = function(){
1961                        cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
1962                            reactCalls.loadingState("country", false);
1963                        });
1964                    };
1965                    var myGamesCallback = function(){};
1966
1967                    function filterExistingEventsData(eventHolder, leagueHolder, filteredEventHolder, filteredLeaguesHolder)
1968                    {
1969                        eventHolder.reinit(filteredEventHolder.getReferences());
1970                        leagueHolder.reinit(filteredLeaguesHolder.getReferences());
1971                        cjs.dic.get('dataEventHandler').resetIds();
1972                        cjs.dic.get('dataLeagueHandler').resetIds();
1973                    }
1974
1975                    if (isCountryTabDefault || (isCountryTabFinished && !completeEventsHolder.hasData()))
1976                    {
1977                        afterCallback = function()
1978                        {
1979                            completeEventsHolder.reinit(eventHolder.getReferences());
1980                            completeLeaguesHolder.reinit(leagueHolder.getReferences());
1981                            myGamesCallback();
1982                            cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
1983                                reactCalls.loadingState("country", false);
1984                            });
1985                        };
1986                    }
1987                    else if (eventHolder.hasData())
1988                    {
1989                        if (isCountryTabFinished && completeEventsHolder.hasData())
1990                        {
1991                            filterExistingEventsData(eventHolder, leagueHolder, completeEventsHolder, completeLeaguesHolder);
1992                            updater.generate_data();
1993                            break;
1994                        }
1995                        else if (isCountryTabScheduled && !filteredEventsHolder.hasData())
1996                        {
1997                            afterCallback = function()
1998                            {
1999                                filteredEventsHolder.reinit(eventHolder.getReferences());
2000                                filteredLeaguesHolder.reinit(leagueHolder.getReferences());
2001                                myGamesCallback();
2002                                cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
2003                                    reactCalls.loadingState("country", false);
2004                                });
2005                            };
2006                        }
2007                        else if (isCountryTabScheduled && filteredEventsHolder.hasData())
2008                        {
2009                            filterExistingEventsData(eventHolder, leagueHolder, filteredEventsHolder, filteredLeaguesHolder);
2010                            updater.generate_data();
2011                            break;
2012                        }
2013                    }
2014                }
2015
2016                const disableFeedExecution = [
2017                    action === "full" && cjs.Api.config.get("app", "sport_page", "enabled") && (cjs.Api.config.get("app", "sport_page", "duel") || []).includes(sport_id),
2018                    action === "tournament" && (cjs.Api.config.get("app", "tournament_page", "duel") || []).includes(sport_id),
2019                ];
2020
2021                // Run only on legacy pages, in new SPA pages feed execution is triggered in react
2022                if(!disableFeedExecution.some(Boolean)) {
2023                    resetAndExecuteFeedRequests(prefered_sport_id, action, afterCallback);
2024                }
2025                break;
2026
2027            case 'tournament-fixtures':
2028            case 'tournament-results':
2029                var seasonId = 0;
2030                var initialFeedData = cjs.initialFeeds[action === 'tournament-fixtures' ? 'fixtures' : 'results'];
2031                if (initialFeedData) {
2032                    seasonId = initialFeedData.seasonId || 0;
2033                }
2034
2035                tournamentPageDataPart++;
2036                cjs.feedRequest.execute(action, prefered_sport_id, responseCallback, {
2037                    seasonId: seasonId,
2038                    dataPart: tournamentPageDataPart
2039                });
2040                break;
2041
2042            case 'participant':
2043                // TODO back compatibility for sports not included in FSWEB-12635 (Team page with new data structure)
2044                if (!(cjs.Api.config.get('app', 'team_page' ,'duel') || []).includes(sport_id)) {
2045                    cjs.feedRequest.execute(action, prefered_sport_id, responseCallback, {participantId: participant});
2046                }
2047                break;
2048
2049            case 'series':
2050                cjs.feedRequest.execute(action, prefered_sport_id, responseCallback, {seriesId: series});
2051                break;
2052
2053            case 'participant-fixtures':
2054            case 'participant-fixtures_s':
2055            case 'participant-fixtures_d':
2056            case 'participant-fixtures_m':
2057            case 'participant-results':
2058            case 'participant-results_s':
2059            case 'participant-results_d':
2060            case 'participant-results_m':
2061                cjs.participantPageNumber = cjs.participantPageNumber || 0;
2062                var tennisTypeArr = action.match(/_[sdm]$/);
2063                var tennisType = tennisTypeArr && tennisTypeArr[0] ? tennisTypeArr[0] : '';
2064                cjs.feedRequest.execute(action.split('_')[0], prefered_sport_id, responseCallback, {
2065                        participantId: participant,
2066                        dataPart: ++cjs.participantPageNumber,
2067                        tennisType: tennisType || ''
2068                });
2069                break;
2070
2071            case 'participant-newsfeed':
2072                var ret = cjs.feedRequest.execute(action, prefered_sport_id, responseCallback, {
2073                    participantId: participant,
2074                    pageNumber: pageNumber,
2075                    type: type,
2076                    callback: responseCallback
2077                });
2078                if (ret === false)
2079                {
2080                    return;
2081                }
2082                break;
2083
2084            default:
2085                if (action == 'odds')
2086                {
2087                    cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
2088                        reactCalls.loadingState("odds-calendar", false);
2089                        reactCalls.loadingState("odds", true);
2090                    });
2091                }
2092                var ret = cjs.feedRequest.execute(action, prefered_sport_id, responseCallback);
2093                if (ret === false)
2094                {
2095                    return;
2096                }
2097        }
2098    };
2099
2100    function get_odds_format()
2101    {
2102        if(typeof odds_format_url != 'undefined' && typeof ODDS_FORMAT_LIST[odds_format_url] != 'undefined')
2103        {
2104            prefered_format = odds_format_url;
2105            default_odds_format = prefered_format;
2106        }
2107        else
2108        {
2109            if (['_ass'].includes(project_type_name))
2110            {
2111                var prefered_format = clientStorage.get('fs_of');
2112            }
2113            else
2114            {
2115                var prefered_format = clientStorage.get('fs_of_' + cjs.Api.config.get('app', 'lang', 'web'));
2116            }
2117
2118            if(typeof ODDS_FORMAT_LIST[prefered_format] == 'undefined')
2119                prefered_format = default_odds_format;
2120            else
2121                default_odds_format = prefered_format;
2122        }
2123
2124        return prefered_format;
2125    };
2126    // }}}
2127
2128    // CommCore response functions {{{
2129    CommCore.prototype.response_full = function(r_status, r_headers, r_content, r_trigger, r_custom_headers)
2130    {
2131        CommCore.parse_custom_headers(r_custom_headers);
2132
2133        if(r_trigger == 'headers_hit')
2134            return;
2135
2136        cjs.full_loaded = true;
2137
2138        var mainBookmakerIds = [];
2139        cjs.Api.loader.get('bookmakerSettings').call(function (module) {
2140            mainBookmakerIds = module.getMainBookmakerIds(cjs.geoIP, cjs.geoIPIsoSubdivisionCode0);
2141            cjs.dic.get('Application').setMainBookmakerIds(mainBookmakerIds);
2142        });
2143
2144        updater.setLastSyncUtime(cjs.dic.get("util_date").getTimestamp());
2145        if(updater.is_actual(r_status, r_headers)) { return; }
2146
2147        if(!updater.parse_only)
2148        {
2149            if (tournamentPage === false && ['country', 'tournament'].includes(r_trigger) && cjs.dic.get('dataEventHolderTemporary').hasData())
2150            {
2151                cjs.dic.get('dataEventHolder').reinit();
2152                cjs.dic.get('dataEventHandler').resetIds();
2153                cjs.dic.get('dataLeagueHolder').reinit();
2154                cjs.dic.get('dataLeagueHandler').resetIds();
2155            }
2156            else
2157            {
2158                reset_env();
2159            }
2160        }
2161
2162        ff_data = r_content;
2163
2164        parse(r_content);
2165
2166        if (!updater.parse_only) {
2167            var page = cjs.dic.get('util_page');
2168            if (hasRepairFeed(sudate)) {
2169                var has_data = cjs.dic.get('dataEventHolderProxy').getHolder().hasData();
2170
2171                if (has_data) {
2172                    if (r_trigger === 'full' || r_trigger === 'country' || r_trigger === 'tournament') {
2173                        var feedData = cjs.feedRequest.getFeedData('frepair', sport_id);
2174                        cjs.feedLoader.executeCompleteCallback(feedData.context);
2175                    } else {
2176                        updater.doc_update('frepair');
2177                    }
2178                } else {
2179                    if (cjs.Api.config.get('app', 'odds', 'sport_page') && (['_ass', '_ff', '_sw'].includes(project_type_name) || Number(window.localStorage.getItem("odds_sport_page"))) && !page.isParticipantPage() && !page.isSeriesPage()) {
2180                        updater.generate_data_odds();
2181                        updater.clear_interval('set_interval: odds');
2182                    } else {
2183                        updater.generate_data();
2184                        updater.clear_interval('set_interval: update');
2185                    }
2186                }
2187
2188                if (has_data && r_trigger === 'full') {
2189                    cjs.dic.get('dataEventHolderProxy').getHandler().each(function(index, id) {
2190                        cjs.dic.get('UpdateManager').removeEventLiveStatus(id);
2191                    });
2192                }
2193            } else {
2194                sort_fs_data();
2195                if (cjs.Api.config.get('app', 'odds', 'sport_page') && (['_ass', '_ff', '_sw'].includes(project_type_name) || Number(window.localStorage.getItem("odds_sport_page"))) && !page.isParticipantPage() && !page.isSeriesPage()) {
2196                    updater.generate_data_odds();
2197                } else {
2198                    updater.generate_data();
2199                }
2200            }
2201        }
2202        init_after_feeds();
2203        if (tournamentPage === false && ['country', 'tournament'].includes(r_trigger) && cjs.dic.get('dataEventHolderTemporary').hasData())
2204        {
2205            var eventHolder = cjs.dic.get('dataEventHolder');
2206            var leagueHolder = cjs.dic.get('dataLeagueHolder');
2207            var temporaryEventHolder = cjs.dic.get('dataEventHolderTemporary');
2208            var temporaryLeagueHolder = cjs.dic.get('dataLeagueHolderTemporary');
2209            referenceSameIdsInHolders(eventHolder, temporaryEventHolder);
2210            referenceSameIdsInHolders(leagueHolder, temporaryLeagueHolder);
2211        }
2212
2213        cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
2214            if (cjs.dic.get('Helper_MyGamesChecker').isMyGames()) {
2215                reactCalls.loadingState("fullFeed", false);
2216            } else {
2217                reactCalls.fullFeedLoaded();
2218            }
2219        });
2220    };
2221
2222    CommCore.prototype.response_update = function(r_status, r_headers, r_content, r_trigger, r_custom_headers)
2223    {
2224        if (typeof r_custom_headers != 'undefined' && typeof r_custom_headers['Date'] != 'undefined' && r_custom_headers['Date']) {
2225            var serverTime = new Date(r_custom_headers['Date']).getTime();
2226            if (!isNaN(serverTime)) {
2227                cjs.dic.get("util_date").setServerTimestamp(Math.floor(serverTime / 1000));
2228            }
2229        }
2230        var currentTimestamp = cjs.dic.get("util_date").getTimestamp();
2231
2232        var isRepair = r_trigger == 'repair' || r_trigger == 'frepair';
2233        if (isRepair)
2234        {
2235            cjs.repair_loaded = true;
2236        }
2237
2238        var resync = false;
2239
2240        // check if time from the last sync is not too old. If so, repair data with the update feed
2241        if (updater.lastSyncUtimeIsTooOld(currentTimestamp))
2242        {
2243            // time from the last change can be handled by repair feed
2244            if (updater.lastSyncUtimeCanBeHandledByRepairFeed(currentTimestamp))
2245            {
2246                if (!isRepair)
2247                {
2248                    updater.set_interval('repair', true);
2249                    resync = true;
2250                }
2251            }
2252            // time from the last change is too old. Call initial (e.g. full) feed
2253            else
2254            {
2255                updater.doc_resume(true);
2256                resync = true;
2257            }
2258        }
2259
2260        updater.setLastSyncUtime(currentTimestamp);
2261
2262        cjs.Api.loader.get('util/midnightLiveTableRefresh').call(function(midnight) {
2263            midnight.disableReload();
2264        });
2265
2266        if(resync)
2267            return;
2268
2269        // resync, feed synchronization time changed
2270        if(updater.ajax_time_update && r_trigger != 'frepair')
2271        {
2272            updater.ajax_time_update = false;
2273            updater.set_interval('update');
2274        }
2275
2276        // there is no data
2277        if(updater.is_actual(r_status, r_headers))
2278        {
2279            parse_status = true;
2280        }
2281        // there is new data
2282        else
2283        {
2284            // parse input data
2285            var parse_status = parse(r_content, true, false, r_trigger);
2286        }
2287
2288        // regenerate the whole page with new data
2289        if(r_trigger == 'frepair')
2290        {
2291            sort_fs_data();
2292            if (cjs.Api.config.get('app', 'odds', 'sport_page') && (['_ass', '_ff', '_sw'].includes(project_type_name) || Number(window.localStorage.getItem("odds_sport_page")))) {
2293                updater.generate_data_odds();
2294            } else {
2295                updater.generate_data();
2296            }
2297            var sport_id = 1 * r_content.substring(3, r_content.indexOf(JS_CELL_END, 4));
2298            updater.sync_score_data_with_update(sport_id);
2299            if (cjs.dic.get("util_page").getPageType() === "series_page")
2300            {
2301                cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
2302                    reactCalls.reloadTabContent(category);
2303                });
2304            }
2305        // just update existing content
2306        }
2307        else
2308            cjs.dic.get('UpdateManager').update(r_trigger);
2309
2310        if(r_trigger == 'repair' || mpe_delivery == 'a' && r_trigger == 'frepair')
2311            updater.set_interval('update');
2312
2313        if(!parse_status)
2314            refresh_iframe();
2315
2316        if (r_trigger == 'frepair')
2317        {
2318            init_after_feeds();
2319        }
2320    };
2321
2322    CommCore.prototype.response_odds = function(r_status, r_headers, r_content, r_trigger)
2323    {
2324        updater.setLastSyncUtime(cjs.dic.get("util_date").getTimestamp());
2325        if(updater.is_actual(r_status, r_headers)) { return; }
2326        var parse_status = parse(r_content, false, true);
2327        oddsActionsAfterContentGenerated(true);
2328
2329        if (!parse_status)
2330            updater.set_interval(updater.init_action, true);
2331    };
2332
2333    CommCore.prototype.response_updated_odds = function(r_status, r_headers, r_content, r_trigger)
2334    {
2335        var resync = false;
2336        var currentTimestamp = cjs.dic.get("util_date").getTimestamp();
2337
2338        // check if time from the last sync is not too old. If so, repair odds with the update feed
2339        if(updater.lastSyncUtimeIsTooOld(currentTimestamp, true))
2340        {
2341            // time from the last change can be handled by repair feed
2342            if(updater.lastSyncUtimeCanBeHandledByRepairFeed(currentTimestamp))
2343            {
2344                if(r_trigger != 'repair' && r_trigger != 'frepair')
2345                {
2346                    updater.set_interval('repair', true);
2347                    resync = true;
2348                }
2349            }
2350            // time from the last change is too old. Call initial (e.g. full) feed
2351            else
2352            {
2353                updater.doc_resume(true);
2354                resync = true;
2355            }
2356        }
2357
2358        updater.setLastSyncUtime(currentTimestamp);
2359
2360        if(resync)
2361            return;
2362
2363        // resync, feed synchronization time changed
2364        if(updater.ajax_time_update && r_trigger != 'frepair')
2365        {
2366            updater.ajax_time_update = false;
2367            updater.set_interval('update');
2368        }
2369
2370        // there is no data
2371        if (updater.is_actual(r_status, r_headers)) {
2372            parse_status = true;
2373        }
2374        // there is new data
2375        else {
2376            // parse input data
2377            var parse_status = parse(r_content, true, false, r_trigger);
2378        }
2379
2380        // regenerate the whole page with new data
2381        if (r_trigger == 'frepair') {
2382            var sport_id = parseInt(r_content.substring(3, r_content.indexOf(JS_CELL_END, 4)));
2383
2384            if (['_ass', '_ff', '_sw'].includes(project_type_name)) {
2385                updater.generate_data();
2386            } else {
2387                oddsActionsAfterContentGenerated(true);
2388            }
2389
2390            updater.sync_score_data_with_update(sport_id);
2391            // just update existing content
2392        } else
2393            cjs.dic.get('UpdateManager').update();
2394
2395        if (!parse_status)
2396            refresh_iframe();
2397    };
2398
2399    CommCore.prototype.response_load_odds = function(r_status, r_headers, r_content, r_trigger)
2400    {
2401        updater.setLastSyncUtime(cjs.dic.get("util_date").getTimestamp());
2402        if(updater.is_actual(r_status, r_headers)) { return; }
2403
2404        var parse_status = parse(r_content, false, true);
2405
2406        updater.generate_data();
2407
2408        cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
2409            reactCalls.loadingState("odds", false);
2410            reactCalls.fullOddsFeedLoaded();
2411        });
2412
2413        if (!parse_status)
2414            updater.set_interval(updater.init_action, true);
2415    };
2416
2417    CommCore.prototype.setLastSyncUtime = function(timestamp)
2418    {
2419        this.last_sync_utime = timestamp;
2420    };
2421
2422    CommCore.expectedCacheKeys = {};
2423
2424    CommCore.getExpectedNewCacheKey = function(key)
2425    {
2426
2427        if (typeof CommCore.expectedCacheKeys[key] != 'undefined')
2428        {
2429            return CommCore.expectedCacheKeys[key];
2430        }
2431
2432        return null;
2433    };
2434
2435    CommCore.updateInProgress = {};
2436
2437    CommCore.setUpdateInProgress = function(key,value)
2438    {
2439        CommCore.updateInProgress[key] = value;
2440    };
2441
2442    CommCore.getUpdateInProgress = function(key)
2443    {
2444        if (typeof CommCore.updateInProgress[key] != 'undefined')
2445        {
2446            return CommCore.updateInProgress[key];
2447        }
2448
2449        return null;
2450    };
2451
2452    CommCore.parse_custom_headers = function(r_custom_headers)
2453    {
2454        if (typeof r_custom_headers == 'undefined')
2455        {
2456            return;
2457        }
2458
2459        if (typeof r_custom_headers['X-Geoip2-Country-Code'] != 'undefined' && r_custom_headers['X-Geoip2-Country-Code'])
2460        {
2461            cjs.geoIP = r_custom_headers['X-Geoip2-Country-Code'];
2462        }
2463
2464        if (typeof r_custom_headers['X-Geoip2-City-Name'] != 'undefined' && r_custom_headers['X-Geoip2-City-Name'])
2465        {
2466            cjs.geoIPCityName = r_custom_headers['X-Geoip2-City-Name'];
2467        }
2468
2469        if (typeof r_custom_headers['X-Geoip2-Subdivision-Name-0'] != 'undefined' && r_custom_headers['X-Geoip2-Subdivision-Name-0'])
2470        {
2471            cjs.geoIPSubdivisionName0 = r_custom_headers['X-Geoip2-Subdivision-Name-0'];
2472        }
2473
2474        if (typeof r_custom_headers['X-Geoip2-Subdivision-Code-0'] != 'undefined' && r_custom_headers['X-Geoip2-Subdivision-Code-0'])
2475        {
2476            cjs.geoIPSubdivisionCode0 = r_custom_headers['X-Geoip2-Subdivision-Code-0'];
2477        }
2478
2479        if (typeof r_custom_headers['X-Geoip2-ISO-Subdivision-Code-0'] != 'undefined' && r_custom_headers['X-Geoip2-ISO-Subdivision-Code-0'])
2480        {
2481            cjs.geoIPIsoSubdivisionCode0 = r_custom_headers['X-Geoip2-ISO-Subdivision-Code-0'].replace('-', '');
2482        }
2483
2484        if (typeof r_custom_headers['X-Geoip2-Subdivision-Name-1'] != 'undefined' && r_custom_headers['X-Geoip2-Subdivision-Name-1'])
2485        {
2486            cjs.geoIPSubdivisionName1 = r_custom_headers['X-Geoip2-Subdivision-Name-1'];
2487        }
2488
2489        if (typeof r_custom_headers['Date'] != 'undefined' && r_custom_headers['Date'])
2490        {
2491            var serverTime = new Date(r_custom_headers['Date']).getTime();
2492            if (!isNaN(serverTime)) {
2493                cjs.dic.get("util_date").setServerTimestamp(Math.floor(serverTime / 1000));
2494            }
2495
2496            if (!page_is_initialized)
2497            {
2498                page_utime_init_value(cjs.dic.get("util_date").getTimestamp());
2499            }
2500        }
2501    };
2502
2503    CommCore.prototype.response_sys = function(r_status, r_headers, r_content, r_trigger, r_custom_headers)
2504    {
2505        (r_content.split(JS_CELL_END)).forEach((row) => {
2506            var keyAndValue = row.split(JS_INDEX);
2507            var key = keyAndValue[0] || "";
2508            var value = keyAndValue[1] || "";
2509
2510            switch(key) {
2511                case 'mlp':
2512                    setAjaxSyncMultiplier(parseFloat(value));
2513                    break;
2514                case 'sst':
2515                    set_service_status(parseInt(value));
2516                    break;
2517                case 'stu': {
2518                    cjs.Api.ajaxSyncTime.setUpdateTime(parseInt(value));
2519                    updater.ajax_time_update = true;
2520                    break;
2521                }
2522                case 'utime':
2523                    cjs.dic.get("util_date").setServerTimestamp(parseInt(value));
2524                    break;
2525            }
2526        });
2527    };
2528
2529    // CommCore service functions {{{
2530    CommCore.prototype.is_actual = function(r_status, r_headers_empty)
2531    {
2532        // no content, already have content
2533        if(r_status == 304 || r_status == 204 || r_status == 1223 || r_headers_empty === true)
2534            return true;
2535        return false;
2536    };
2537
2538    CommCore.prototype.set_interval = function(action, useTimeout)
2539    {
2540        if (typeof useTimeout === 'undefined')
2541        {
2542            useTimeout = false;
2543        }
2544
2545        var timerFunction = useTimeout ? setTimeout : setInterval;
2546
2547        // clear previous interval
2548        updater.clear_interval('set_interval: ' + action);
2549
2550        if(action == 'odds')
2551        {
2552            updater.interval_sync = timerFunction('updater.doc_update(\'odds\')', 100);
2553        }
2554        else
2555        {
2556            var ajaxTime = cjs.Api.ajaxSyncTime.getTime(action);
2557            updater.interval_sync = timerFunction('updater.doc_update(\'' + action + '\')', ajaxTime * 1000);
2558        }
2559    };
2560
2561    CommCore.prototype.clear_interval = function(pom)
2562    {
2563        if(updater.interval_sync != null)
2564        {
2565            clearTimeout(updater.interval_sync);
2566            clearInterval(updater.interval_sync);
2567            updater.interval_sync = null;
2568
2569            return true;
2570        }
2571
2572        return false;
2573    };
2574
2575    CommCore.prototype.generate_data_odds = function()
2576    {
2577        cjs.mygames.startStorageSyncTimer();
2578
2579        if (category == 5)
2580        {
2581            start_updating_odds();
2582            return;
2583        }
2584
2585        var page = cjs.dic.get('util_page');
2586        if (!page.isCountryPage() && !page.isSeasonPage())
2587        {
2588            if (cjs.Api.config.get('app', 'odds', 'sport_page') && (['_ass', '_ff', '_sw'].includes(project_type_name) || Number(window.localStorage.getItem("odds_sport_page")))) {
2589                start_updating_odds();
2590            }
2591
2592            var param  = 'full-odds';
2593        }
2594        else
2595        {
2596            if (!page.isSeasonPage())
2597            {
2598                var param  = 'country-odds';
2599            }
2600            else
2601            {
2602                if (!page.isParticipantPage())
2603                {
2604                    var param = 'tournament-odds';
2605                }
2606                else
2607                {
2608                    var param = null;
2609                }
2610            }
2611        }
2612
2613        if (param) {
2614            updater.doc_update(param);
2615        }
2616    };
2617
2618    CommCore.prototype.generate_data = function()
2619    {
2620        cjs.mygames.startStorageSyncTimer();
2621
2622        if (sub_category == 2 || sub_category == 3)
2623        {
2624            cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
2625                reactCalls.loadingState("odds-calendar", true);
2626            });
2627            pgenerate_odds();
2628        }
2629    };
2630
2631    /**
2632     * Synchronizes scores in global fs_data with core update.
2633     *
2634     * This method should be called after repair update and is
2635     * necessary for proper score highlighting when user browses
2636     * between several sports.
2637     *
2638     * @param {Number} sport_id sport indetifier to filter only
2639     * matches associated with that sport
2640     */
2641    CommCore.prototype.sync_score_data_with_update = function(sportId)
2642    {
2643        // list of known score field indentifiers
2644        var scores = [
2645            feedIndexes.SHAREDINDEXES_HOME_CURRENT_RESULT,
2646            feedIndexes.SHAREDINDEXES_AWAY_CURRENT_RESULT,
2647            feedIndexes.SHAREDINDEXES_HOME_RESULT_PERIOD_1,
2648            feedIndexes.SHAREDINDEXES_HOME_RESULT_PERIOD_2,
2649            feedIndexes.SHAREDINDEXES_HOME_RESULT_PERIOD_3,
2650            feedIndexes.SHAREDINDEXES_HOME_RESULT_PERIOD_4,
2651            feedIndexes.SHAREDINDEXES_HOME_RESULT_PERIOD_5,
2652            feedIndexes.SHAREDINDEXES_HOME_RESULT_PERIOD_6,
2653            feedIndexes.SHAREDINDEXES_HOME_RESULT_PERIOD_7,
2654            feedIndexes.SHAREDINDEXES_HOME_RESULT_PERIOD_8,
2655            feedIndexes.SHAREDINDEXES_HOME_RESULT_PERIOD_9,
2656            feedIndexes.FULLFEEDINDEXES_HOME_SCORE_PART_PESAPALLO_FIRST_HALF,
2657            feedIndexes.FULLFEEDINDEXES_HOME_SCORE_PART_PESAPALLO_SECOND_HALF,
2658            feedIndexes.FULLFEEDINDEXES_HOME_SCORE_PART_PESAPALLO_PENALTIES,
2659            feedIndexes.SHAREDINDEXES_HOME_MARTIAL_ARTS_FINISHED,
2660            feedIndexes.SHAREDINDEXES_HOME_MARTIAL_ARTS_FINISHED_ROUND,
2661            feedIndexes.SHAREDINDEXES_HOME_MARTIAL_ARTS_FINISHED_SUB,
2662            feedIndexes.SHAREDINDEXES_AWAY_RESULT_PERIOD_1,
2663            feedIndexes.SHAREDINDEXES_AWAY_RESULT_PERIOD_2,
2664            feedIndexes.SHAREDINDEXES_AWAY_RESULT_PERIOD_3,
2665            feedIndexes.SHAREDINDEXES_AWAY_RESULT_PERIOD_4,
2666            feedIndexes.SHAREDINDEXES_AWAY_RESULT_PERIOD_5,
2667            feedIndexes.SHAREDINDEXES_AWAY_RESULT_PERIOD_6,
2668            feedIndexes.SHAREDINDEXES_AWAY_RESULT_PERIOD_7,
2669            feedIndexes.SHAREDINDEXES_AWAY_RESULT_PERIOD_8,
2670            feedIndexes.SHAREDINDEXES_AWAY_RESULT_PERIOD_9,
2671            feedIndexes.FULLFEEDINDEXES_AWAY_SCORE_PART_PESAPALLO_FIRST_HALF,
2672            feedIndexes.FULLFEEDINDEXES_AWAY_SCORE_PART_PESAPALLO_SECOND_HALF,
2673            feedIndexes.FULLFEEDINDEXES_AWAY_SCORE_PART_PESAPALLO_PENALTIES,
2674            feedIndexes.SHAREDINDEXES_AWAY_MARTIAL_ARTS_FINISHED,
2675            feedIndexes.SHAREDINDEXES_AWAY_MARTIAL_ARTS_FINISHED_ROUND,
2676            feedIndexes.SHAREDINDEXES_AWAY_MARTIAL_ARTS_FINISHED_SUB
2677        ];
2678
2679        var changesHistoryContainer = cjs.dic.get('ChangesHistoryContainer');
2680        cjs.dic.get('dataEventHolderProxy').getHandler().each(function(index, id)
2681        {
2682            var eventItem = this.getItem(id);
2683            var scorePos, scoreIndex, historyScore;
2684            if (eventItem.getSportId() != sportId)
2685            {
2686                return;
2687            }
2688            scorePos = scores.length;
2689            while(scorePos--)
2690            {
2691                scoreIndex = scores[scorePos];
2692                if (eventItem.getValue(scoreIndex) === null)
2693                {
2694                    continue;
2695                }
2696
2697                historyScore = undefined;
2698                if (changesHistoryContainer.hasNewValue(id, scoreIndex))
2699                {
2700                    historyScore = changesHistoryContainer.getNewValue(id, scoreIndex);
2701                }
2702
2703                changesHistoryContainer.setValueChange(id, scoreIndex, eventItem.getValue(scoreIndex), historyScore);
2704            }
2705        });
2706
2707        changesHistoryContainer.removeNewData();
2708    };
2709
2710    // }}}
2711
2712// }}}
2713
2714// pushserver {{{
2715
2716    /**
2717     * Method for switching PUSH <-> AJAX (for debugging, we are now without small green square below liveTable)
2718     */
2719    function sync_change()
2720    {
2721        if (cjs.push)
2722        {
2723            if(cjs.push.isConnected())
2724            {
2725                push_disconnect();
2726                cjs.push.startFallback()
2727            }
2728            else
2729                push_connect();
2730        }
2731    };
2732
2733    function push_init()
2734    {
2735        cjs.Api.loader.get("synchronizationPushInstance").call((sp) => {
2736            // hack - tohle neni udelane dobre a ceka az se predela cely updaterovaci mechanizmus nad ajaxem a pushem {{{
2737            if (cjs.dic.get('dataEventHolderProxy').getHolder().hasData() === false)
2738            {
2739                if (cjs.Api.config.get('app', 'game_notification_push' ,'enable'))
2740                {
2741                    cjs.gamesNotificationOnly = true;
2742                    push_connect();
2743                }
2744                else
2745                {
2746                    push_disconnect();
2747                }
2748            }
2749            if (!sp.isConnected()) {
2750                push_connect();
2751            }
2752            if (cjs.gamesNotificationOnly) {
2753                sp.stopScheduledFallback();
2754            }
2755        });
2756    };
2757
2758    /**
2759 * Switch to a standard ajax syncing
2760     */
2761    function push_fallback(action, fail_msg)
2762    {
2763        if(typeof action == 'undefined' || (action != 'start' && action != 'stop'))
2764            action = 'start';
2765
2766        if(action == 'start')
2767        {
2768            // TODO back compatibility for sports not included in FSWEB-12635 (Team page with new data structure)
2769            if (participant && (cjs.Api.config.get('app', 'team_page' ,'duel') || []).includes(sport_id)) {
2770                return; // TODO not periodically updating via update feed for team page
2771            }
2772
2773            if (updater.interval_sync == null)
2774            {
2775                updater.set_interval('update');
2776            }
2777
2778            updater.doc_update('sys'); // intentionally
2779            sys_interval_checker = setInterval('updater.doc_update(\'sys\')', 60 * 1000);
2780        }
2781        else
2782        {
2783            updater.clear_interval('push working, dissabling ajax');
2784            clearInterval(sys_interval_checker);
2785            push_connect();
2786        }
2787    };
2788
2789    function push_connect()
2790    {
2791        if (cjs.dic.get('dataEventHolderProxy').getHolder().hasData() || typeof cjs.gamesNotificationOnly !== 'undefined')
2792        {
2793            if (cjs.push)
2794            {
2795                cjs.push.connect(sudate);
2796                push_update_subscription();
2797            }
2798        }
2799    };
2800
2801    async function push_update_subscription()
2802    {
2803        if (cjs.push)
2804        {
2805            var subscription = [];
2806            const subjectComposer = cjs.dic.get("subjectNameComposer");
2807
2808            if (typeof cjs.gamesNotificationOnly === 'undefined')
2809            {
2810                subscription.push(subjectComposer.getSysSubject()); // always required
2811                subscription.push(subjectComposer.getServiceSubject()); // always required
2812
2813                var sportIds = [sport_id];
2814                if (cjs.dic.get('Helper_MyGamesChecker').isMyGames())
2815                {
2816                    sportIds = sportIds.concat(cjs.mygames.getSportIds());
2817                    if (cjs.myTeams)
2818                    {
2819                        sportIds = sportIds.concat(cjs.myTeams.getSportIds());
2820                    }
2821                }
2822
2823                var uniqueSportIds = sportIds.filter(function(value, index, self) { return self.indexOf(value) == index; });
2824                for (var i in uniqueSportIds)
2825                {
2826                    var sportId = uniqueSportIds[i];
2827                    subscription.push(subjectComposer.getUpdateSubject(sportId));
2828                    subscription.push(subjectComposer.getUpdateLocalSubject(sportId));
2829                }
2830            }
2831
2832            const accountManagement = await new Promise((resolve) => cjs.Api.loader.get("accountManagement").call(resolve))
2833            if (await accountManagement.isUserLoggedIn())
2834            {
2835                const profile = await accountManagement.getUser().getProfile();
2836                if (profile.id) {
2837                    subscription.push(subjectComposer.getLsidSubject(profile.id));
2838                }
2839            }
2840
2841            if (cjs.Api.config.get('app', 'game_notification_push' ,'enable'))
2842            {
2843                var subscriptionInfo = {};
2844                if (typeof cjs.mygames !== 'undefined')
2845                {
2846                    if(!cjs.mygames.isLoaded()) cjs.mygames.load();
2847                    for (var index in cjs.mygames.getContainer())
2848                    {
2849                        subscription.push(subjectComposer.getGamesSubject(index.split('_')[2]));
2850                        subscriptionInfo[index.split('_')[2]] = {
2851                            sportId: index.split('_')[1],
2852                            timestamp: new Date().getTime()
2853                        };
2854                    }
2855                }
2856                cjs.push.setSubscriptionInfo(subscriptionInfo);
2857            }
2858            cjs.push.updateSubscription(subscription);
2859        }
2860    };
2861
2862    cjs.fromGlobalScope.push_update_subscription = push_update_subscription;
2863
2864    function push_disconnect()
2865    {
2866        if (cjs.push)
2867        {
2868            cjs.push.disconnect();
2869        }
2870    };
2871
2872    function push_refresh()
2873    {
2874        if (hasRepairFeed(sudate))
2875        {
2876            delete cjs.gamesNotificationOnly;
2877        }
2878
2879        push_connect();
2880        push_update_subscription();
2881    };
2882
2883    function refresh_iframe()
2884    {
2885        setTimeout("updater.set_interval('" + updater.init_action + "', true)", (Math.random() * 60 + 20) * 1000);
2886    };
2887
2888// }}}
2889
2890function page_utime_init_value(currentTimestamp)
2891{
2892    refresh_utime = currentTimestamp;
2893    page_is_initialized = true;
2894    counter_update();
2895
2896    if (updater)
2897    {
2898        updater.refresh_utime = currentTimestamp;
2899    }
2900};
2901
2902function switch_odd_format(format)
2903{
2904    clientStorage.store('fs_of_' + cjs.Api.config.get('app', 'lang', 'web'), format, 365*86400, 'self', '/');
2905    default_odds_format = format;
2906}
2907
2908//needed for jsonp callback (don`t remove)
2909function jsonp_cb()
2910{
2911};
2912
2913function getSpreadTrans()
2914{
2915    var spreadTransArr = [];
2916    var utilTrans = cjs.dic.get('utilTrans');
2917
2918    spreadTransArr['full'] = utilTrans.translate('TRANS_ODDS_COMPARISON_ASIAN_HANDICAP');
2919    spreadTransArr['short'] = utilTrans.translate('TRANS_ODDS_COMPARISON_ASIAN_HANDICAP_IFRAME_SHORT');
2920
2921    
2922    return spreadTransArr;
2923};
2924
2925function loadAndShowMygamesContent(downloadFeedsForMovedGames, downloadedFeedsInPrevCall, prevNeedRepair)
2926{
2927    var loadTodayFeed = false;
2928    var feedRequest;
2929    prevNeedRepair = !!prevNeedRepair;
2930    downloadFeedsForMovedGames = !!downloadFeedsForMovedGames;
2931    if (typeof downloadedFeedsInPrevCall === 'undefined')
2932    {
2933        downloadedFeedsInPrevCall = {};
2934    }
2935    updater.last_doc_update_category = 5;
2936
2937    var utilPage = cjs.dic.get("util_page");
2938    var myGamesCount = cjs.mygames.getCount();
2939    var myTeamsCount = 0;
2940    if (cjs.myTeams)
2941    {
2942        myTeamsCount = cjs.myTeams.getCount();
2943    }
2944
2945    loadTodayFeed = myGamesCount > 0;
2946
2947    if (myGamesCount || myTeamsCount)
2948    {
2949        if (sudate != 0)
2950        {
2951            sudate = 0;
2952            push_refresh();
2953        }
2954    }
2955    cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
2956        reactCalls.loadingState('mygames', false);
2957        reactCalls.loadingState('fullFeed', false);
2958    });
2959    if (myGamesCount)
2960    {
2961        cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
2962            reactCalls.loadingStateReset();
2963        });
2964        cjs.feedLoader.reset();
2965        cjs.feedLoader.setBeforeCallback(function(){
2966            updater.parse_only = true;
2967        });
2968
2969        cjs.feedLoader.executeFilterCallback(function(context){
2970            return /^full|^odds/.test(context);
2971        });
2972
2973        var eventHolderProxy = cjs.dic.get('dataEventHolderProxy');
2974        var leagueHolderProxy = cjs.dic.get('dataLeagueHolderProxy');
2975        eventHolderProxy.getHolder().addItemsFromRawObject(cjs.mygames.getData());
2976        leagueHolderProxy.getHolder().addItemsFromRawObject(cjs.mygames.getLabels());
2977        eventHolderProxy.getHandler().resetIds();
2978        leagueHolderProxy.getHandler().resetIds();
2979
2980        var frepair = prevNeedRepair;
2981        var neededFeeds = []; //today feeds
2982        neededFeeds = neededFeeds.concat(cjs.mygames.getNeededFeeds(1));
2983
2984        var tmpSudate = sudate;
2985
2986        for (var i in neededFeeds)
2987        {
2988            if (neededFeeds[i].sport_id == sport_id && !utilPage.isMixed() && !utilPage.isParent() && !loadTodayFeed)
2989            {
2990                continue;
2991            }
2992            feedRequest = cjs.feedRequest.getFeedData('full', neededFeeds[i].sport_id);
2993            if (downloadedFeedsInPrevCall[feedRequest.context] === true)
2994            {
2995                continue;
2996            }
2997            downloadedFeedsInPrevCall[feedRequest.context] = true;
2998            cjs.feedLoader.addIntoQueue(feedRequest);
2999
3000            
3001            frepair = true;
3002        }
3003
3004        var neededFeeds = []; //other feeds
3005        neededFeeds = neededFeeds.concat(cjs.mygames.getNeededFeeds());
3006
3007        for (var i in neededFeeds)
3008        {
3009            feedRequest = cjs.feedRequest.getFeedData('full', neededFeeds[i].sport_id, neededFeeds[i].day);
3010            if (downloadedFeedsInPrevCall[feedRequest.context] === true)
3011            {
3012                continue;
3013            }
3014            downloadedFeedsInPrevCall[feedRequest.context] = true;
3015            cjs.feedLoader.addIntoQueue(feedRequest);
3016            frepair = true;
3017        }
3018
3019        cjs.feedLoader.setAfterCallback(function(){
3020            cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
3021                reactCalls.loadingState('mygames', false);
3022            });
3023            if (downloadFeedsForMovedGames != true)
3024            {
3025                loadAndShowMygamesContent(true, downloadedFeedsInPrevCall, frepair);
3026                return;
3027            }
3028            var feedData = cjs.feedRequest.getFeedData('frepair', 0);
3029            cjs.feedLoader.executeCompleteCallback(feedData.context);
3030            updater.parse_only = false;
3031            expand_collapse_league_load();
3032            if (!frepair)
3033            {
3034                sort_fs_data();
3035            }
3036            if (cjs.mygames.getCount())
3037            {
3038                cjs.mygames.load(true);
3039            }
3040
3041            if (cjs.dic.get('Helper_MyGamesChecker').isMyGames())
3042            {
3043                generateMygames();
3044            }
3045        });
3046
3047        sudate = tmpSudate;
3048        if(frepair && downloadFeedsForMovedGames === true)
3049        {
3050            cjs.feedLoader.addIntoQueue(cjs.feedRequest.getFeedData('frepair', 0));
3051        }
3052        cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
3053            reactCalls.loadingState('mygames', true);
3054        });
3055        cjs.feedLoader.downloadAndExecuteFeeds();
3056    }
3057    else
3058    {
3059        generateMygames();
3060    }
3061};
3062
3063function generateMygames()
3064{
3065    cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
3066        reactCalls.reloadMyGamesTabCounter();
3067        reactCalls.reloadTabContent(5);
3068        reactCalls.loadingState('mygames', false);
3069    });
3070};
3071
3072function show_more_templates()
3073{
3074    const node = document.getElementById("mt");
3075    node.querySelectorAll(".leftMenu__item--hidden").forEach((elem) => elem.classList.remove("leftMenu__item--hidden"))
3076    const showMore = node.querySelector(".show-more");
3077    if (showMore) {
3078        showMore.classList.add("leftMenu__item--hidden");
3079    }
3080};
3081
3082function hasRepairFeed(sd)
3083{
3084    return sd == 0 || sd == -1;
3085};
3086
3087/**
3088 * NEMAZAT!!! VOLA SE V ADMINU GTM
3089 */
3090function runAfterGtmLoaded()
3091{
3092    if (typeof ga !== 'undefined')
3093    {
3094        var tracker = ga.getAll()[0];
3095        var linkerParamValue = tracker.get('linkerParam').replace('_ga=', '');
3096        var twoYears = 3600 * 24 * 365 * 2;
3097        cjs.Api.clientStorage.storeCookie('_lsga', linkerParamValue, twoYears);
3098    }
3099};
3100
3101function setupInitialLoading(action)
3102{
3103    cjs.Api.loader.get('reactCalls').call(function(reactCalls) {
3104        reactCalls.loadingStateReset();
3105        if (action == 'country')
3106        {
3107            reactCalls.loadingState("country", true);
3108        }
3109        else
3110        {
3111            reactCalls.loadingState("fullFeed", true);
3112        }
3113    });
3114}
3115
3116function resetAndExecuteFeedRequests(sportId, feedName, afterCallback)
3117{
3118    cjs.feedLoader.reset();
3119    setupInitialLoading(feedName);
3120    if (feedName !== 'full' || hasRepairFeed(sudate))
3121    {
3122        cjs.feedLoader.addIntoQueue(cjs.feedRequest.getFeedData('frepair', sportId));
3123    }
3124
3125    cjs.feedLoader.addIntoQueue(cjs.feedRequest.getFeedData(feedName, sportId));
3126    cjs.feedLoader.executeFilterCallback(function(contextName){
3127        var pattern = "^" + feedName;
3128        var re = new RegExp(pattern);
3129        return re.test(contextName);
3130    });
3131    cjs.feedLoader.setAfterCallback(afterCallback);
3132    cjs.feedLoader.downloadAndExecuteFeeds();
3133};
3134
3135function clog() {
3136    try
3137    {
3138        if (window.console)
3139        {
3140            for (var i in arguments)
3141            {
3142                // @debug
3143                console.log(arguments[i]);
3144            }
3145        }
3146    }
3147    catch (err) {}
3148};
3149
3150function cerr() {
3151    try
3152    {
3153        for (var i in arguments)
3154        {
3155            // @debug
3156            console.error(arguments[i]);
3157        }
3158    }
3159    catch (err) {
3160
3161    }
3162};
3163
3164function cdir() {
3165    try
3166    {
3167        for (var i in arguments)
3168        {
3169            // @debug
3170            console.dir(arguments[i]);
3171        }
3172    } catch (err) {}
3173};
3174
3175cjs.ready.then(function () {
3176    cjs.Api.loader.get('localizationRedirector').call(function(localizationRedirector) {
3177        localizationRedirector.redirect();
3178    });
3179
3180    cjs.Api.loader.get('tv/channelsStorage').call();
3181
3182    cjs.Api.loader.get('modules/eventTracking/search').call();
3183
3184    cjs.Api.loader.get('cjs').fulfill(function (cjsCallback) {
3185        cjsCallback(cjs);
3186    });
3187});
3188

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.