function loadUtilityScript(e,t){const a="/wp-content/plugins/v7/js/";let i=!1;if(document.querySelectorAll('script[src*="'+e+'"]').length>0)return i=!0,!0;try{const n=[];e.startsWith("event-")||e.startsWith("memcached-")||e.startsWith("cache")||e.startsWith("request-")?n.push(window.location.origin+a+"utils/"+e):n.push(window.location.origin+a+e),e.startsWith("event-")||e.startsWith("memcached-")||e.startsWith("cache")||e.startsWith("request-")?n.push("/wp-content/plugins/v7/js/utils/"+e):n.push("/wp-content/plugins/v7/js/"+e),n.push(t);const o=document.createElement("script");let s=0;const r=function(){s++,s<n.length?o.src=n[s]:createUtilityModuleFallback(e)};return o.onload=function(){i=!0},o.onerror=function(){r()},o.src=n[0],o.async=!1,o.id="utility-script-"+e.replace(".js",""),document.head.appendChild(o),!1}catch(t){return createUtilityModuleFallback(e),!1}}function createUtilityModuleFallback(e){window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},"event-utils.js"===e?window.LiveScoreApp.Utils.EventUtils=window.LiveScoreApp.Utils.EventUtils||{setupMainAppEventListeners:function(e){jQuery("#all-matches").on("click",function(){if(jQuery("#all-matches").addClass("active"),jQuery("#live-matches").removeClass("active"),jQuery(".date-picker-container").addClass("visible"),window.LiveScoreApp.LiveScores){window.LiveScoreApp.LiveScores.setIsAllMatchesSelected(!0);const e=jQuery("#date-picker").val().split("/");window.LiveScoreApp.LiveScores.setIsSwitchingTab(!0),window.LiveScoreApp.LiveScores.fetchLiveScores(e[0],e[1],e[2],"all")}jQuery("#match-details").hide()}),jQuery("#live-matches").on("click",function(){jQuery("#live-matches").addClass("active"),jQuery("#all-matches").removeClass("active"),jQuery(".date-picker-container").removeClass("visible"),window.LiveScoreApp.LiveScores&&(window.LiveScoreApp.LiveScores.setIsAllMatchesSelected(!1),window.LiveScoreApp.LiveScores.setIsSwitchingTab(!0),window.LiveScoreApp.LiveScores.fetchLiveScores(null,null,null,"live")),jQuery("#match-details").hide()})},setupMatchDetailsEventListeners:function(e,t){const a=window.LiveScoreApp?.Utils?.EventUtils;a&&"function"==typeof a.setupMatchDetailsEventListeners?a.setupMatchDetailsEventListeners(e,t):(jQuery(".live-scores-menu-item").on("click",function(){const t=jQuery(this).data("tab");jQuery(".live-scores-menu-item").removeClass("active").attr("aria-selected","false"),jQuery(this).addClass("active").attr("aria-selected","true"),window.LiveScoreApp.Modules.MatchDetails&&"function"==typeof window.LiveScoreApp.Modules.MatchDetails.updateTabContent?window.LiveScoreApp.Modules.MatchDetails.updateTabContent(e,t):window.LiveScoreApp.Modules.MatchDetailsTabs&&"function"==typeof window.LiveScoreApp.Modules.MatchDetailsTabs.updateTabContent?window.LiveScoreApp.Modules.MatchDetailsTabs.updateTabContent(e,t):(jQuery(".live-scores-tab-content").removeClass("live-scores-active"),jQuery("#tab-"+t).addClass("live-scores-active")),window.LiveScoreApp.Modules.MatchDetails&&window.LiveScoreApp.Modules.MatchDetails.updateTabContent(e,t)}),jQuery(".live-scores-back-button").on("click.matchDetails",function(e){e.preventDefault(),e.stopPropagation(),t&&t.closeMatchDetails?t.closeMatchDetails():jQuery("#match-details").hide()}))},cleanupMatchDetailsEventListeners:function(){jQuery(".live-scores-menu-item").off("click")},cleanupAllEventListeners:function(){jQuery("#all-matches").off("click"),jQuery("#live-matches").off("click"),jQuery(".live-scores-menu-item").off("click"),jQuery(".live-scores-back-icon").off("click")}}:"memcached-sync.js"===e?window.LiveScoreApp.Utils.MemcachedSync=window.LiveScoreApp.Utils.MemcachedSync||{scheduleSyncWithServer:function(){return!1},performServerSync:function(){return!1},getSyncStatus:function(){return{lastSync:0,pendingSync:!1,queueLength:0,metrics:{successCount:0,failureCount:0},status:{isUrgent:!1}}}}:"cache.js"===e?window.LiveScoreApp.Utils.Cache=window.LiveScoreApp.Utils.Cache||{CACHE_PREFIX:{LIVESCORE:"LS_",DETAIL:"DT_",STANDING:"ST_",LINEUP:"LU_",STATISTIC:"STAT_",JERSEY:"JER_",H2H:"H2H_",PERFORMANCE:"PERF_"},setToCacheByType:function(e,t){return!1},getFromCacheByType:function(e){return null},deleteCacheItem:function(){return!1},clearCacheByType:function(){return!1},getCacheStats:function(){return{totalEntries:0,totalSizeKB:0,typeBreakdown:{}}}}:"request-queue.js"===e&&(window.LiveScoreApp.Utils.RequestQueue=window.LiveScoreApp.Utils.RequestQueue||{queue:[],isProcessing:!1,enqueue:function(e){if(!e||"function"!=typeof e)return Promise.reject(new Error("Invalid request function"));Date.now(),Math.random().toString(36).substr(2,9);try{const t=e();return t&&t.then,Promise.resolve(t)}catch(e){return Promise.reject(e)}},add:function(e){if(!e||"function"!=typeof e.execute)return{id:null,status:"invalid"};const t="req_"+Date.now()+"_"+Math.random().toString(36).substr(2,9);try{e.execute(function(t){e.callback&&e.callback(t)})}catch(t){e.errorCallback&&e.errorCallback(t)}return{id:t,status:"executed"}},clearQueue:function(){this.queue=[],this.isProcessing=!1},getQueueStatus:function(){return{queueLength:this.queue.length,isProcessing:this.isProcessing}}})}!function(){"use strict";window.debugEnabled=!1,window.forceDebug=!1,window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.debugMode=!0;var e=console.log;console.log=function(){var t=Array.prototype.slice.call(arguments);window.LiveScoreApp&&!0===window.LiveScoreApp.debugMode&&e.apply(console,t)};var t=console.warn;console.warn=function(){var e=Array.prototype.slice.call(arguments);e[0]&&String(e[0]),window.LiveScoreApp&&!0===window.LiveScoreApp.debugMode&&t.apply(console,e)};var a=console.error;console.error=function(){a.apply(console,Array.prototype.slice.call(arguments))}}(),window.translations={tournaments:{"Euro, Group A":"Euro 2024 - A Grubu","Euro, Group B":"Euro 2024 - B Grubu","Euro, Group C":"Euro 2024 - C Grubu","Euro, Group D":"Euro 2024 - D Grubu","Euro, Group E":"Euro 2024 - E Grubu","Euro, Group F":"Euro 2024 - F Grubu","LaLiga 2, Promotion Playoffs":"LaLiga 2, Yükselme Playoffları","FIFA World Cup":"FIFA Dünya Kupası","UEFA Champions League":"UEFA Şampiyonlar Ligi","UEFA Champions League, Knockout stage":"UEFA Şampiyonlar Ligi, Eleme Aşaması","UEFA Champions League, Knockout Phase":"UEFA Şampiyonlar Ligi, Eleme Aşaması","UEFA Champions League, Playoff Round":"UEFA Şampiyonlar Ligi, Playoff Turu","UEFA Champions League, Qualification":"UEFA Şampiyonlar Ligi, Elemeler","UEFA Europa League":"UEFA Avrupa Ligi","UEFA Conference League":"UEFA Konferans Ligi","UEFA Europa League, Qualification":"UEFA Avrupa Ligi, Elemeler","UEFA Europa League, Knockout stage":"UEFA Avrupa Ligi, Eleme Aşaması","UEFA Europa League, Knockout Phase":"UEFA Avrupa Ligi, Eleme Aşaması","UEFA Europa League, Playoff Round":"UEFA Avrupa Ligi, Playoff Turu","UEFA Conference League, Knockout stage":"UEFA Konferans Ligi, Eleme Aşaması","UEFA Europa Conference League, Knockout Phase":"UEFA Konferans Ligi, Eleme Aşaması","UEFA Conference League, Knockout Phase":"UEFA Konferans Ligi, Eleme Aşaması","UEFA Europa Conference League, Qualification Playoff":"UEFA Avrupa Konferans Ligi, Eleme Playoff","UEFA Conference League, Qualification":"UEFA Konferans Ligi, Elemeler","UEFA Nations League, Finals":"UEFA Uluslar Ligi, Finaller","Copa America":"Copa America","Copa Libertadores, Qualification":"Copa Libertadores, Elemeler","Copa Libertadores, Knockout stage":"Copa Libertadores, Eleme Aşaması","CONMEBOL Copa América, Knockout stage":"CONMEBOL Copa América, Eleme Turu","UEFA European Championship":"UEFA Avrupa Şampiyonası","Euro, Knockout stage":"Avrupa Şampiyonası Eleme Aşaması","Coupe de France":"Fransa Kupası","Africa Cup of Nations":"Afrika Uluslar Kupası","CONCACAF Gold Cup":"CONCACAF Altın Kupa","AFC Asian Cup":"AFC Asya Kupası","Oceania Nations Cup":"Okyanusya Uluslar Kupası","English Premier League":"İngiltere Premier Ligi","EFL Championship":"EFL Championship","EFL League One":"EFL League One","EFL League Two":"EFL League Two","La Liga":"La Liga","Segunda División":"Segunda División","Serie A":"Serie A","Serie B":"Serie B",Bundesliga:"Bundesliga","2. Bundesliga":"2. Bundesliga","3. Liga":"3. Liga","Ligue 1":"Ligue 1","Ligue 2":"Ligue 2",Eredivisie:"Eredivisie","Eerste Divisie":"Eerste Divisie","Primeira Liga":"Primeira Liga","Liga Portugal 2":"Liga Portugal 2","Brasileirão Série A":"Brezilya Serie A","Brasileirão Série B":"Brezilya Serie B","Brasileirão Série C":"Brezilya Serie C","Brasileirão Série D, Group A1":"Brezilya Serie D, Grup A1","Brasileirão Série D, Group A2":"Brezilya Serie D, Grup A2","Brasileirão Série D, Group A3":"Brezilya Serie D, Grup A3","Brasileirão Série D, Group A4":"Brezilya Serie D, Grup A4","Brasileirão Série D, Group A5":"Brezilya Serie D, Grup 5","Brasileirão Série D, Group A6":"Brezilya Serie D, Grup A6","Brasileirão Série D, Group A7":"Brezilya Serie D, Grup A7","Brasileirão Série D, Group A8":"Brezilya Serie D, Grup A8","Argentine Primera División":"Arjantin Primera División","Primera Nacional":"Primera Nacional","Torneo Federal A, Group 1":"Torneo Federal A, Group 1","Torneo Federal A, Group 2":"Torneo Federal A, Group 2","Torneo Federal A, Group 3":"Torneo Federal A, Group 3","Torneo Federal A, Group 4":"Torneo Federal A, Group 4","Riotercerense - Primera A, Apertura":"Riotercerense - Primera A, Apertura","Copa Simón Bolívar, Fase 1 - Oruro, Zona A":"Copa Simón Bolívar, Fase 1 - Oruro, Zona A","Major League Soccer":"Major League Soccer","USL Championship":"USL Championship","USL League One":"USL League One",NASL:"NASL","A-League":"A-League","Scottish Premiership":"İskoçya Premiership","Scottish Championship":"İskoçya Championship","Belgian Pro League":"Belçika Pro Ligi","Belgian First Division B":"Belçika Birinci Lig B","Swiss Super League":"İsviçre Süper Ligi","Swiss Challenge League":"İsviçre Challenge Ligi","Russian Premier League":"Rusya Premier Ligi","Russian Football National League":"Rusya Futbol Ulusal Ligi","Turkish Süper Lig":"Türkiye Süper Lig","Trendyol Süper Lig":"Türkiye Süper Lig","Super Lig":"Türkiye Süper Lig","TFF First League":"TFF Birinci Lig","Greek Super League":"Yunanistan Süper Ligi","Greek Football League":"Yunanistan Futbol Ligi","Ukrainian Premier League":"Ukrayna Premier Ligi","Ukrainian First League":"Ukrayna Birinci Lig","Danish Superliga":"Danimarka Süper Ligi","Danish 1st Division":"Danimarka 1. Lig","Norwegian Eliteserien":"Norveç Eliteserien","Norwegian First Division":"Norveç Birinci Lig","Swedish Allsvenskan":"İsveç Allsvenskan",Superettan:"Superettan","Polish Ekstraklasa":"Polonya Ekstraklasa","I liga":"I liga","Czech First League":"Çekya Birinci Ligi","Czech National Football League":"Çekya Ulusal Futbol Ligi","Croatian First League":"Hırvatistan Birinci Ligi","Croatian Second Football League":"Hırvatistan İkinci Futbol Ligi","Austrian Bundesliga":"Avusturya Bundesliga","Austrian First League":"Avusturya Birinci Ligi","Hungarian NB I":"Macaristan NB I","Hungarian NB II":"Macaristan NB II","Romanian Liga I":"Romanya Liga I","Romanian Liga II":"Romanya Liga II","Bulgarian First League":"Bulgaristan Birinci Ligi","Bulgarian Second League":"Bulgaristan İkinci Ligi","Serbian SuperLiga":"Sırbistan Süper Lig","Serbian First League":"Sırbistan Birinci Lig","Slovak Super Liga":"Slovakya Süper Lig","Slovak First League":"Slovakya Birinci Lig","Slovenian PrvaLiga":"Slovenya PrvaLiga","Slovenian Second League":"Slovenya İkinci Ligi","Cypriot First Division":"Kıbrıs Birinci Ligi","Cypriot Second Division":"Kıbrıs İkinci Ligi","Israeli Premier League":"İsrail Premier Ligi","Liga Leumit":"Liga Leumit","Kazakhstan Premier League":"Kazakistan Premier Ligi","Belarusian Premier League":"Belarus Premier Ligi","Georgian Erovnuli Liga":"Gürcistan Erovnuli Ligi","Armenian Premier League":"Ermenistan Premier Ligi","Azerbaijan Premier League":"Azerbaycan Premier Ligi","Qatar Stars League":"Katar Yıldızlar Ligi","Qatari Second Division":"Katar İkinci Ligi","Saudi Professional League":"Suudi Arabistan Profesyonel Ligi","Saudi First Division League":"Suudi Birinci Lig","UAE Pro League":"BAE Pro Ligi","UAE First Division League":"BAE Birinci Lig","J1 League":"J1 Ligi","J2 League":"J2 Ligi","K League 1":"K Ligi 1","K League 2":"K Ligi 2","Chinese Super League":"Çin Süper Ligi","China League One":"Çin Birinci Ligi","China League 1":"Çin Lig 1","Indian Super League":"Hindistan Süper Ligi","I-League":"I-League","Thai League 1":"Tayland Ligi 1","Thai League 2":"Tayland Ligi 2","Vietnam V.League 1":"Vietnam V.League 1","Vietnam V.League 2":"Vietnam V.League 2","Malaysian Super League":"Malezya Süper Ligi","Malaysian Premier League":"Malezya Premier Ligi","Indonesian Liga 1":"Endonezya Liga 1","Indonesian Liga 2":"Endonezya Liga 2","Singapore Premier League":"Singapur Premier Ligi","Philippines Football League":"Filipinler Futbol Ligi","Myanmar National League":"Myanmar Ulusal Ligi","Cambodian League":"Kamboçya Ligi","Bangladesh Premier League":"Bangladeş Premier Ligi","Pakistani Premier League":"Pakistan Premier Ligi","Iraq Premier League":"Irak Premier Ligi","Jordanian Pro League":"Ürdün Pro Ligi","Lebanese Premier League":"Lübnan Premier Ligi","Syrian Premier League":"Suriye Premier Ligi","Omani Professional League":"Umman Profesyonel Ligi","Kuwait Premier League":"Kuveyt Premier Ligi","Bahraini Premier League":"Bahreyn Premier Ligi","Yemeni League":"Yemen Ligi","Egyptian Premier League":"Mısır Premier Ligi","Egyptian Second Division":"Mısır İkinci Ligi","Tunisian Ligue Professionnelle 1":"Tunus Ligue Professionnelle 1","Tunisian Ligue Professionnelle 2":"Tunus Ligue Professionnelle 2","Algerian Ligue Professionnelle 1":"Cezayir Ligue Professionnelle 1","Algerian Ligue Professionnelle 2":"Cezayir Ligue Professionnelle 2","Moroccan Botola Pro":"Fas Botola Pro","Moroccan Botola 2":"Fas Botola 2","South African Premier Division":"Güney Afrika Premier Division","South African National First Division":"Güney Afrika Ulusal Birinci Lig","Nigerian Professional Football League":"Nijerya Profesyonel Futbol Ligi","Ghana Premier League":"Gana Premier Ligi","Kenyan Premier League":"Kenya Premier Ligi","Tanzanian Premier League":"Tanzanya Premier Ligi","Ugandan Premier League":"Uganda Premier Ligi","Zambian Premier League":"Zambiya Premier Ligi","Zimbabwe Premier Soccer League":"Zimbabve Premier Soccer Ligi","Ivory Coast Ligue 1":"Fildişi Sahili Ligue 1","Ivory Coast Ligue 2":"Fildişi Sahili Ligue 2","Senegal Premier League":"Senegal Premier Ligi","Cameroonian Elite One":"Kamerun Elite One","Cameroonian Elite Two":"Kamerun Elite Two","DR Congo Linafoot":"DR Kongo Linafoot","Libyan Premier League":"Libya Premier Ligi","Libyan Second Division":"Libya İkinci Ligi","Sudanese Premier League":"Sudan Premier Ligi","Sudanese Second Division":"Sudan İkinci Ligi","Malawian Super League":"Malavi Süper Ligi","Premier League":"Premier Lig","Canadian Premier League":"Kanada Premier Ligi","Ethiopian Women's Premier League":"Etiyopya Kadınlar Premier Ligi","Club Friendly Games":"Kulüp Hazırlık Maçları","Mozambican Moçambola":"Mozambik Moçambola","Club Friendly Games, Women":"Kulüp Hazırlık Maçları, Kadın","International Friendly Games, Women":"Uluslararası Hazırlık Maçları, Kadın","U19 Friendly Games, Women":"U19 Hazırlık Maçları, Kadın","U19 Friendly Games":"U19 Hazırlık Maçları","U19 European Championship, Group A":"U19 Avrupa Şampiyonası, Grup A","U19 European Championship, Group B":"U19 Avrupa Şampiyonası, Grup B","U19 European Championship, Group C":"U19 Avrupa Şampiyonası, Grup C","U19 European Championship, Group D":"U19 Avrupa Şampiyonası, Grup D","U17 Club Friendly Games":"U17 Kulüp Hazırlık Maçları","World Cup Qualification, CONMEBOL":"Dünya Kupası Elemeleri, CONMEBOL","UEFA Nations League, League A, Gr. 1":"UEFA Uluslar Ligi, Lig A, Gr. 1","UEFA Nations League, League A, Gr. 2":"UEFA Uluslar Ligi, Lig A, Gr. 2","UEFA Nations League, League A, Gr. 3":"UEFA Uluslar Ligi, Lig A, Gr. 3","Africa Cup of Nations, Qualification, Group A":"Afrika Uluslar Kupası, Elemeleri, A Grubu","Africa Cup of Nations, Qualification, Group B":"Afrika Uluslar Kupası, Elemeleri, B Grubu","Africa Cup of Nations, Qualification, Group C":"Afrika Uluslar Kupası, Elemeleri, C Grubu","Africa Cup of Nations, Qualification, Group D":"Afrika Uluslar Kupası, Elemeleri, D Grubu","Africa Cup of Nations, Qualification, Group E":"Afrika Uluslar Kupası, Elemeleri, E Grubu","Africa Cup of Nations, Qualification, Group F":"Afrika Uluslar Kupası, Elemeleri, F Grubu","Africa Cup of Nations, Qualification, Group G":"Afrika Uluslar Kupası, Elemeleri, G Grubu","Africa Cup of Nations, Qualification, Group H":"Afrika Uluslar Kupası, Elemeleri, H Grubu","Africa Cup of Nations, Qualification, Group I":"Afrika Uluslar Kupası, Elemeleri, I Grubu","Africa Cup of Nations, Qualification, Group J":"Afrika Uluslar Kupası, Elemeleri, J Grubu","Africa Cup of Nations, Qualification, Group K":"Afrika Uluslar Kupası, Elemeleri, K Grubu","Int. Friendly Games":"Uluslararası Hazırlık Maçları","U21 Friendly Games":"U21 Hazırlık Maçları","U23 Friendly Games":"U23 Hazırlık Maçları","UEFA Nations League, League A, Gr. 3":"UEFA Uluslar Ligi, Lig A, Gr. 3","UEFA Nations League, League B, Gr. 3":"UEFA Uluslar Ligi, Lig B, Gr. 3","UEFA Champions League, Women, Qualification":"UEFA Şampiyonlar Ligi, Kadınlar, Elemeleri","Turkiye Kupasi, Qualification":"Türkiye Kupası, Elemeleri","CAF Champions League, Qualification":"CAF Şampiyonlar Ligi, Elemeleri","FIFA World Cup, Qualification CAF, Group A":"FIFA Dünya Kupası, CAF Elemeleri, A Grubu","FIFA World Cup, Qualification CAF, Group B":"FIFA Dünya Kupası, CAF Elemeleri, B Grubu","FIFA World Cup, Qualification CAF, Group C":"FIFA Dünya Kupası, CAF Elemeleri, C Grubu","FIFA World Cup, Qualification CAF, Group D":"FIFA Dünya Kupası, CAF Elemeleri, D Grubu","FIFA World Cup, Qualification CAF, Group E":"FIFA Dünya Kupası, CAF Elemeleri, E Grubu","FIFA World Cup, Qualification CAF, Group F":"FIFA Dünya Kupası, CAF Elemeleri, F Grubu","Turkiye Kupasi, Knockout stage":"Türkiye Kupası, Eleme aşaması","Super Kupa":"Süper Kupa","U18 Friendly Games, Women":"U18 Dostluk Maçları, Kadın",LaLiga:"La Liga","EFL Cup":"İngiltere Lig Kupası",EURO:"Avrupa Şampiyonası","EURO, Qualification":"Avrupa Şampiyonası Elemeleri","Supercopa de España":"İspanya Süper Kupası","Community Shield":"İngiltere Community Shield","UEFA Nations League":"UEFA Uluslar Ligi","World Cup Qual. UEFA":"Dünya Kupası Elemeleri, UEFA","FA Cup":"İngiltere FA Kupası","DFB Pokal":"Almanya Kupası","FIFA Club World Cup":"FIFA Kulüpler Dünya Kupası","Premier League Asia Trophy":"Premier Lig Asya Kupası","Copa del Rey":"İspanya Kral Kupası","Carabao Cup":"İngiltere Lig Kupası","DFL Super Cup":"Almanya Süper Kupası","UEFA Super Cup":"UEFA Süper Kupa"},teams:{Poland:"Polonya",Netherlands:"Hollanda",Serbia:"Sırbistan",Afghanistan:"Afganistan",Albania:"Arnavutluk",Algeria:"Cezayir",Andorra:"Andorra",Angola:"Angola","Antigua and Barbuda":"Antigua ve Barbuda",Argentina:"Arjantin",Armenia:"Ermenistan",Australia:"Avustralya",Austria:"Avusturya",Azerbaijan:"Azerbaycan",Bahamas:"Bahamalar",Bahrain:"Bahreyn",Bangladesh:"Bangladeş",Barbados:"Barbados",Belarus:"Belarus",Belgium:"Belçika",Belize:"Belize",Benin:"Benin",Bhutan:"Butan",Bolivia:"Bolivya","Bosnia and Herzegovina":"Bosna-Hersek",Botswana:"Botsvana",Brazil:"Brezilya",Brunei:"Brunei",Bulgaria:"Bulgaristan","Burkina Faso":"Burkina Faso",Burundi:"Burundi","Cabo Verde":"Yeşil Burun Adaları",Cambodia:"Kamboçya",Cameroon:"Kamerun",Canada:"Kanada","Central African Republic":"Orta Afrika Cumhuriyeti",Chad:"Çad",Chile:"Şili",China:"Çin",Colombia:"Kolombiya",Comoros:"Komorlar","Congo Republic":"Kongo","Congo DR":"Kongo DC","Costa Rica":"Kosta Rika",Croatia:"Hırvatistan",Cuba:"Küba",Cyprus:"Kıbrıs",Czechia:"Çekya",Denmark:"Danimarka",Djibouti:"Cibuti",Dominica:"Dominika","Dominican Republic":"Dominik Cumhuriyeti",England:"İngiltere",Ecuador:"Ekvador",Egypt:"Mısır","El Salvador":"El Salvador","Equatorial Guinea":"Ekvator Ginesi",Eritrea:"Eritre",Estonia:"Estonya",Eswatini:"Esvatini",Ethiopia:"Etiyopya",Fiji:"Fiji",Finland:"Finlandiya",France:"Fransa",Gabon:"Gabon",Gambia:"Gambiya",Georgia:"Gürcistan",Germany:"Almanya",Ghana:"Gana",Greece:"Yunanistan",Grenada:"Grenada",Guatemala:"Guatemala",Guinea:"Gine","Guinea-Bissau":"Gine-Bissau",Guyana:"Guyana",Haiti:"Haiti",Honduras:"Honduras","Hong Kong":"Hong Kong",Hungary:"Macaristan",Iceland:"İzlanda",India:"Hindistan",Indonesia:"Endonezya",Iran:"İran",Iraq:"Irak",Ireland:"İrlanda",Israel:"İsrail",Italy:"İtalya",Jamaica:"Jamaika",Japan:"Japonya",Jordan:"Ürdün",Kazakhstan:"Kazakistan",Kenya:"Kenya",Kuwait:"Kuveyt",Kyrgyzstan:"Kırgızistan",Laos:"Laos",Latvia:"Letonya",Lebanon:"Lübnan",Lesotho:"Lesotho",Liberia:"Liberya",Libya:"Libya",Liechtenstein:"Lihtenştayn",Lithuania:"Litvanya",Luxembourg:"Lüksemburg",Macau:"Makao",Madagascar:"Madagaskar",Malawi:"Malavi",Malaysia:"Malezya",Maldives:"Maldivler",Mali:"Mali",Malta:"Malta",Mauritania:"Moritanya",Mauritius:"Mauritius",Mexico:"Meksika",Moldova:"Moldova",Mongolia:"Moğolistan",Montenegro:"Karadağ",Morocco:"Fas",Mozambique:"Mozambik",Myanmar:"Myanmar",Namibia:"Namibya",Nepal:"Nepal","New Zealand":"Yeni Zelanda",Nicaragua:"Nikaragua",Niger:"Nijer",Nigeria:"Nijerya","North Korea":"Kuzey Kore","North Macedonia":"Kuzey Makedonya",Norway:"Norveç",Oman:"Umman",Pakistan:"Pakistan",Palestine:"Filistin",Panama:"Panama","Papua New Guinea":"Papua Yeni Gine",Paraguay:"Paraguay",Peru:"Peru",Philippines:"Filipinler",Poland:"Polonya",Portugal:"Portekiz",Qatar:"Katar",Romania:"Romanya",Russia:"Rusya",Rwanda:"Ruanda","Saint Kitts and Nevis":"Saint Kitts ve Nevis","Saint Lucia":"Saint Lucia","Saint Vincent and the Grenadines":"Saint Vincent ve Grenadinler","San Marino":"San Marino","Sao Tome and Principe":"Sao Tome ve Principe","Saudi Arabia":"Suudi Arabistan",Senegal:"Senegal",Serbia:"Sırbistan",Seychelles:"Seyşeller",Scotland:"İskoçya","Sierra Leone":"Sierra Leone",Singapore:"Singapur",Slovakia:"Slovakya",Slovenia:"Slovenya","Solomon Islands":"Solomon Adaları",Somalia:"Somali","South Africa":"Güney Afrika","South Korea":"Güney Kore","South Sudan":"Güney Sudan",Spain:"İspanya","Sri Lanka":"Sri Lanka",Sudan:"Sudan",Suriname:"Surinam",Sweden:"İsveç",Switzerland:"İsviçre",Syria:"Suriye","Chinese Taipei":"Çin Taipei",Tajikistan:"Tacikistan",Tanzania:"Tanzanya",Thailand:"Tayland","East Timor":"Doğu Timor",Togo:"Togo","Trinidad and Tobago":"Trinidad ve Tobago",Tunisia:"Tunus",Turkey:"Türkiye",Turkmenistan:"Türkmenistan",Uganda:"Uganda",Ukraine:"Ukrayna","United Arab Emirates":"Birleşik Arap Emirlikleri","United Kingdom":"Birleşik Krallık","United States":"Amerika Birleşik Devletleri",Uruguay:"Uruguay",Uzbekistan:"Özbekistan",Vanuatu:"Vanuatu",Venezuela:"Venezuela",Vietnam:"Vietnam",Yemen:"Yemen",Zambia:"Zambiya",Zimbabwe:"Zimbabve","Northern Ireland":"Kuzey İrlanda","Bosnia & Herzegovina":"Bosna - Hersek","Faroe Islands":"Faroe Adaları",Gibraltar:"Cebelitarık","Côte d'Ivoire":"Fildişi Sahili","DR Congo":"Demokratik Kongo","Cape Verde":"Yeşil Burun Adaları",Wales:"Galler"},statistics:{"Match overview":"Maç Özeti",Shots:"Şutlar",Attack:"Atak",Defending:"Defans","Ball possession":"Topa Sahip Olma","Expected goals":"Gol Beklentisi (xG)","Big chances":"Büyük Fırsatlar","Total shots":"Toplam Şutlar","Goalkeeper saves":"Kaleci Kurtarışları","Corner kicks":"Kornerler",Fouls:"Fauller",Passes:"Paslar",Tackles:"Müdahaleler","Free kicks":"Serbest Vuruşlar","Yellow cards":"Sarı Kartlar","Red cards":"Kırmızı Kartlar","Shots on target":"Kaleyi Bulan Şutlar","Hit woodwork":"Direkten Dönen Şutlar","Shots off target":"Kaleyi Bulmayan Şutlar","Blocked shots":"Engellenen Şutlar","Shots inside box":"Ceza Sahası İçinden Şutlar","Shots outside box":"Ceza Sahası Dışından Şutlar","Big chances scored":"Büyük Fırsatlar","Big chances missed":"Kaçırılan Büyük Fırsatlar","Through balls":"Ara Paslar","Touches in penalty area":"Ceza Sahasında Topla Buluşma","Fouled in final third":"3.Bölgede Yapılan Faul",Offsides:"Ofsaytlar","Accurate passes":"İsabetli Paslar","Throw-ins":"Taç Atışları","Final third phase":"3.Bölgeye Verilen Pas","Final third entries":"Rakip Ceza Sahasına Girme","Long balls":"Uzun Paslar",Crosses:"Ortalar",Duels:"İkili Mücadeleler",Dispossessed:"Top Kaybı","Ground duels":"Yerde Mücadeleler","Aerial duels":"Hava Mücadeleleri",Dribbles:"Top Sürme","Tackles won":"Kazanılan Müdahaleler","Total tackles":"Toplam Müdahaleler",Interceptions:"Top Kesme",Recoveries:"Top Kazanma",Clearances:"Top Uzaklaştırma",Goalkeeping:"Kalecilik","Total saves":"Toplam Kurtarış","Goals prevented":"Engellenen Goller","Big saves":"Büyük Kurtarışlar","High claims":"Havadan Top Alma","Goal kicks":"Kale Vuruşları",Punches:"Uzaklaştırma","Penalty saves":"Kurtarılan Penaltı","Errors lead to a shot":"Şuta Neden Olan Hata"},streaks:{"Without clean sheet":"Gol Yenilen Maç","No goals conceded":"Gol Yenmeyen Maç","No goals scored":"Hiç gol atılmamış","More than 2.5 goals":"2.5 Gol Üst","More than 3.5 goals":"3.5 Gol Üst","More than 4.5 goals":"4.5 Gol Üst","Less than 2.5 goals":"2.5 Gol Alt","Less than 3.5 goals":"3.5 Gol Alt","Less than 4.5 goals":"4.5 Gol Alt","Both teams scoring":"Karşılıklı Gol","Less than 4.5 cards":"4.5 Kart Alt","Less than 3.5 cards":"3.5 Kart Alt","Less than 2.5 cards":"2.5 Kart Alt","More than 4.5 cards":"4.5 Kart Üst","More than 3.5 cards":"3.5 Kart Üst","More than 2.5 cards":"2.5 Kart Üst","More than 7.5 corners":"7.5 Korner Üst","More than 8.5 corners":"8.5 Korner Üst","More than 9.5 corners":"9.5 Korner Üst","More than 10.5 corners":"10.5 Korner Üst","More than 11.5 corners":"11.5 Korner Üst","More than 12.5 corners":"12.5 Korner Üst","Less than 7.5 corners":"7.5 Korner Alt","Less than 8.5 corners":"8.5 Korner Alt","Less than 9.5 corners":"9.5 Korner Alt","Less than 10.5 corners":"10.5 Korner Alt","Less than 11.5 corners":"11.5 Korner Alt","Less than 12.5 corners":"12.5 Korner Alt",Losses:"Mağlubiyet",Wins:"Galibiyet","No losses":"Mağlubiyetsiz","No wins":"Galibiyetsiz","First to score":"İlk Gol Atan","First half winner":"İlk Yarı Kazananı","First half loser":"İlk Yarı Kaybedeni","First to concede":"İlk Gol Yiyen"},playerstatistics:{rating:"Puan",puan:"Puan",minutesPlayed:"Oynanan Dakika",mins:"dakika",goals:"Gol",gol:"Gol",goalAssist:"Asist",assists:"Asist",asist:"Asist",expectedAssists:"Asist Beklentisi (xA)",expectedGoals:"Beklenen Gol (xG)",totalPass:"Toplam Pas",accuratePass:"İsabetli Pas Sayısı",keyPass:"Kilit Pas",totalCross:"Toplam Orta",accurateCross:"İsabetli Orta Sayısı",totalLongBalls:"Toplam Uzun Top",accurateLongBalls:"İsabetli Uzun Top Sayısı",onTargetScoringAttempt:"İsabetli Şut",shotOffTarget:"İsabetsiz Şut",blockedScoringAttempt:"Engellenen Şut",bigChanceCreated:"Yaratılan Net Pozisyon",bigChanceMissed:"Kaçırılan Net Pozisyon",hitWoodwork:"Direkten Dönen Şut",totalContest:"Top Sürme Girişimi",wonContest:"Başarılı Top Sürme",totalTackle:"Müdahale",interceptionWon:"Top Kapma",totalClearance:"Uzaklaştırma",outfielderBlock:"Blok",duelWon:"İkili Mücadele (Kazanılan)",duelLost:"Kaybedilen İkili Mücadele",aerialWon:"Hava Topu Mücadelesi (Kazanılan)",aerialLost:"Kaybedilen Hava Topu Mücadelesi",wasFouled:"Kazandırılan Faul",fouls:"Yapılan Faul",totalOffside:"Ofsayt",touches:"Topla Buluşma",possessionLostCtrl:"Top Kaybı",saves:"Kurtarış",goalsPrevented:"Engellenen Goller",goodHighClaim:"Hava Topu Alma",totalKeeperSweeper:"Toplam Kale Terkedişi",accurateKeeperSweeper:"Başarılı Kale Terkedişi",savedShotsFromInsideTheBox:"Ceza Sahası İçi Kurtarış",punches:"Yumruklama",penaltyConceded:"Neden Olunan Penaltı",dispossessed:"Kaptirılan Top",challengeLost:"Adam Kaçırma",ballRecovery:"Geri Kazanma",totalShots:"Toplam Şut",shotsOnTarget:"İsabetli Şut",totalBallCarriesDistance:"Toplam Taşıma Mesafesi",ballCarriesCount:"Topla İlerleme",totalProgression:"Toplam İlerleme",progressiveBallCarriesCount:"İleriye Top Sürme",penaltySave:"Kurtarılan Penaltı",savedShotsFromOutsideTheBox:"Ceza Sahası Dışı Kurtarış",accurateOwnHalfPasses:"Kendi Yarı Sahasında İsabetli Pas",totalOwnHalfPasses:"Kendi Yarı Sahasında Toplam Pas",accurateOppositionHalfPasses:"Rakip Yarı Sahada İsabetli Pas",totalOppositionHalfPasses:"Rakip Yarı Sahada Toplam Pas",appearances:"Maç",yellowCards:"Sarı Kart",redCards:"Kırmızı Kart",shotsOffTarget:"İsabetsiz Şut",successfulDribbles:"Başarılı Dribling",tackles:"Müdahale",interceptions:"Top Kapma",goalsConceded:"Yenilen Gol",cleanSheets:"Gol Yemeyen Maç",penaltyGoals:"Penaltıdan Gol",totalRating:"Toplam Puan",countRating:"Puan Alan Maç",bigChancesCreated:"Yaratılan Net Pozisyon",bigChancesMissed:"Kaçırılan Net Pozisyon",goalsAssistsSum:"Gol+Asist",accuratePasses:"İsabetli Pas",inaccuratePasses:"İsabetsiz Pas",totalPasses:"Toplam Pas",accuratePassesPercentage:"Pas İsabet %",accurateFinalThirdPasses:"Son Üçte İsabetli Pas",successfulDribblesPercentage:"Dribling İsabet %",directRedCards:"Doğrudan Kırmızı Kart",accurateCrosses:"İsabetli Orta",accurateCrossesPercentage:"Orta İsabet %",groundDuelsWon:"Yer Mücadelesi Kazanılan",groundDuelsWonPercentage:"Yer Mücadelesi Kazanma %",aerialDuelsWon:"Hava Topu Mücadelesi Kazanılan",aerialDuelsWonPercentage:"Hava Topu Kazanma %",totalDuelsWon:"Toplam Mücadele Kazanılan",totalDuelsWonPercentage:"Toplam Mücadele Kazanma %",goalConversionPercentage:"Gol Çevirme %",penaltiesTaken:"Alınan Penaltı",penaltyWon:"Kazandırılan Penaltı",shotFromSetPiece:"Sabit Operasyondan Şut",freeKickGoal:"Serbest Vuruştan Gol",goalsFromInsideTheBox:"Ceza Sahası İçi Gol",goalsFromOutsideTheBox:"Ceza Sahası Dışı Gol",shotsFromInsideTheBox:"Ceza Sahası İçi Şut",shotsFromOutsideTheBox:"Ceza Sahası Dışı Şut",headedGoals:"Başla Gol",leftFootGoals:"Sol Ayakla Gol",rightFootGoals:"Sağ Ayakla Gol",accurateLongBallsPercentage:"Uzun Top İsabet %",clearances:"Uzaklaştırma",errorLeadToGoal:"Hatası Gol Oldu",errorLeadToShot:"Hatası Şuta Çekildi",possessionLost:"Top Kaybı",possessionWonAttThird:"Hücum Üçünde Geri Kazanma",totalChippedPasses:"Chip Pas",accurateChippedPasses:"İsabetli Chip Pas",blockedShots:"Engellenen Şut",passToAssist:"Asiste Asist Pas",cleanSheet:"Gol Yemeyen",penaltyFaced:"Karşı Karşıya Gelinilen Penaltı",savedShotsFromInsideTheBox:"Ceza İçi Kurtarış",goalsConcededInsideTheBox:"Ceza İçi Yenilen",goalsConcededOutsideTheBox:"Ceza Dışı Yenilen",runsOut:"Kale Terkedişi",successfulRunsOut:"Başarılı Kale Terkedişi",highClaims:"Hava Topu Alma",crossesNotClaimed:"Alma Başarısız Orta",matchesStarted:"Başlayan Maç",penaltyConversion:"Penaltı Çevirme %",setPieceConversion:"Sabit Operasyon Çevirme %",totalAttemptAssist:"Toplam Asist Denemesi",dribbledPast:"Oynanılan",attemptPenaltyMiss:"Ceza İçi Miss Şut",attemptPenaltyPost:"Ceza İçi Direk Vuran",attemptPenaltyTarget:"Ceza İçi Hedefe",tacklesWon:"Kazanılan Müdahale",tacklesWonPercentage:"Müdahale Kazanma %",scoringFrequency:"Gol Sıklığı",yellowRedCards:"Sarı-Kırmızı Kart",savesCaught:"Yakalama Kurtarış",savesParried:"Parlaması Kurtarış",totwAppearances:"TOTW Maç",goalKicks:"Gol Atışı",outfielderBlocks:"Blok",offsides:"Ofsayt"},characteristics:{1:"Başlık/Kafa",2:"Teknik Yetenek",3:"Orta Atışı",4:"Şut",5:"Pas",6:"Pas",7:"Dribling",8:"Güç",9:"Hız",10:"Konumlandırma",11:"Oyun Kurma",12:"Savunma",13:"Yüksek Pressing",14:"Fiziksel Güç",15:"Boşluk Bulma",16:"İstikrar",17:"Çalışma Temposu",18:"Disiplin",19:"Top Kontrolü",20:"Bitiricilik",21:"Liderlik",22:"Vizyon",23:"Hareketlilik",24:"Duran Top",25:"Hücum Tehdidi",26:"Yoğun Oyun Stili"},attributes:{attacking:"Hücum",technical:"Teknik",tactical:"Taktik",defending:"Savunma",creativity:"Yaratıcılık"},positions:{GK:"Kaleci",CB:"Merkez Bek",LB:"Sol Bek",RB:"Sağ Bek",LWB:"Sol Kanat Bek",RWB:"Sağ Kanat Bek",CM:"Orta Saha",CDM:"Defansif Orta Saha",CAM:"Hücum Orta Saha","CM-L":"Orta Saha (Sol)","CM-R":"Orta Saha (Sağ)",LM:"Sol Ortasaha",RM:"Sağ Ortasaha",LW:"Sol Kanat",RW:"Sağ Kanat",LF:"Sol Forvet",RF:"Sağ Forvet",CF:"Santral Forvet",ST:"Forvet",AM:"Hücum Orta Saha",DM:"Defansif Orta Saha",M:"Ortasaha",W:"Kanat",MR:"Orta Sağ",ML:"Orta Sol",DR:"Savunma Sağ",DL:"Savunma Sol",AR:"Sağ Ön",AL:"Sol Ön",AMC:"Hücümcu Orta",DMC:"Savunmacı Orta",AC:"Merkez Forvet",DC:"Savunma Merkezi",MC:"Orta Merkez"},injuryReasons:{"Muscle Injury":"Kas Sakatlığı","Knee Injury":"Diz Sakatlığı","Ankle Injury":"Ayak Bileği Sakatlığı","Back Injury":"Sırt Sakatlığı","Foot Injury":"Ayak Sakatlığı",Hamstring:"Arka Bacak Kası","ACL Knee Injury":"Ön Çapraz Bağ Sakatlığı","Thigh Injury":"Uyluk Sakatlığı","Calf Injury":"Baldır Sakatlığı","Groin Injury":"Kasık Sakatlığı","Shoulder Injury":"Omuz Sakatlığı","Hip Injury":"Kalça Sakatlığı","Head Injury":"Kafa Sakatlığı","Wrist Injury":"El Bileği Sakatlığı","Achilles Tendon Injury":"Aşil Tendonu Sakatlığı",Concussion:"Beyin Sarsıntısı","Fractured Leg":"Bacak Kırığı","Fractured Foot":"Ayak Kırığı","Heart Condition":"Kalp Rahatsızlığı",Illness:"Hastalık",Suspended:"Cezalı","Red Card Suspension":"Kırmızı Kart Cezası",Missing:"Eksik","Unknown Injury":"Bilinmeyen Sakatlık"},transferFees:{Unknown:"Bilinmiyor",Free:"Bedelsiz","Free transfer":"Bedelsiz Transfer",Loan:"Kiralık","Loan fee":"Kiralık Bedeli","End of loan":"Kiralık Sonu","Contract termination":"Sözleşme Feshi","Swap deal":"Takas",Draft:"Draft"},bestPlayerCategories:{rating:"En Yüksek Rating",goals:"En Çok Gol",assists:"En Çok Asist",yellowCards:"En Çok Sarı Kart",redCards:"En Çok Kırmızı Kart",minutesPlayed:"En Çok Süre",appearances:"En Çok Maç",expectedGoals:"Beklenen Gol (xG)",expectedAssists:"Beklenen Asist (xA)",goalsAssistsSum:"Gol + Asist Toplamı",penaltyGoals:"Penaltı Golü",freeKickGoal:"Serbest Vuruş Golü",scoringFrequency:"Gol Sıklığı (dk)",totalShots:"Toplam Şut",shotsOnTarget:"İsabetli Şut",bigChancesMissed:"Kaçırılan Büyük Fırsat",bigChancesCreated:"Yaratılan Büyük Fırsat",accuratePasses:"İsabetli Pas",keyPasses:"Kilit Pas",accurateLongBalls:"İsabetli Uzun Top",successfulDribbles:"Başarılı Çalım",penaltyWon:"Kazanılan Penaltı",tackles:"Top Kapma",interceptions:"Top Kesme",clearances:"Uzaklaştırma",possessionLost:"Top Kaybı",cleanSheet:"Gol Yememe",goalsConceded:"Yenilen Gol",saves:"Kurtarış",errorsLeadingToGoal:"Gole Yol Açan Hata",penaltiesTaken:"Kullanılan Penaltı",penaltyConversion:"Penaltı Dönüşüm %",setPieceConversion:"Duran Top Dönüşüm %",totalCross:"Toplam Orta",accurateCross:"İsabetli Orta",totalDuelsWon:"Kazanılan İkili Mücadele",aerialDuelsWon:"Kazanılan Hava Topu",foulsCommitted:"Yapılan Faul",wasFouled:"Kazanılan Faul",offsides:"Ofsayt",goalConversionPercentage:"Gol Dönüşüm %",totwAppearances:"Haftanın 11'i"},matchStatus:{"1st half":"İlk Yarı","2nd half":"İkinci Yarı",Halftime:"Devre Arası","Half Time":"Devre Arası",HT:"Devre Arası",Started:"Başladı",Ended:"Bitti","Extra time":"Uzatma","1st extra":"Uzatma 1. Yarı","2nd extra":"Uzatma 2. Yarı","Extra 1st half":"Uzatma 1. Yarı","Extra 2nd half":"Uzatma 2. Yarı",Penalties:"Penaltılar",Penalty:"Penaltılar","Awaiting penalties":"Penaltı Bekleniyor",Interrupted:"Durduruldu",Suspended:"Askıya Alındı",Postponed:"Ertelendi",Canceled:"İptal Edildi",Cancelled:"İptal Edildi",Delayed:"Gecikti",Abandoned:"Tatil Edildi","Not started":"Başlamadı",AP:"Uzatma Sonrası",AET:"Uzatma Sonrası",FT:"Maç Sonu","Full Time":"Maç Sonu"}},window.formations={"4-4-2":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:10,y:30},{x:35,y:30},{x:65,y:30},{x:90,y:30},{x:35,y:45},{x:65,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:10,y:70},{x:35,y:70},{x:65,y:70},{x:90,y:70},{x:35,y:55},{x:65,y:55}]},"4-5-1":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:10,y:30},{x:35,y:30},{x:50,y:30},{x:65,y:30},{x:90,y:30},{x:50,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:10,y:70},{x:35,y:70},{x:50,y:70},{x:65,y:70},{x:90,y:70},{x:50,y:55}]},"4-3-3":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:20,y:30},{x:50,y:30},{x:80,y:30},{x:10,y:45},{x:50,y:45},{x:90,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:20,y:70},{x:50,y:70},{x:80,y:70},{x:10,y:55},{x:50,y:55},{x:90,y:55}]},"4-1-4-1":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:50,y:25},{x:10,y:30},{x:35,y:30},{x:65,y:30},{x:90,y:30},{x:50,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:50,y:65},{x:10,y:70},{x:35,y:70},{x:65,y:70},{x:90,y:70},{x:50,y:55}]},"4-2-3-1":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:25,y:30},{x:75,y:30},{x:10,y:35},{x:50,y:35},{x:90,y:35},{x:50,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:25,y:70},{x:75,y:70},{x:10,y:65},{x:50,y:65},{x:90,y:65},{x:50,y:55}]},"4-4-1-1":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:10,y:30},{x:35,y:30},{x:65,y:30},{x:90,y:30},{x:50,y:35},{x:50,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:10,y:70},{x:35,y:70},{x:65,y:70},{x:90,y:70},{x:50,y:65},{x:50,y:55}]},"4-2-2-2":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:30,y:25},{x:70,y:25},{x:20,y:30},{x:80,y:30},{x:35,y:45},{x:65,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:30,y:65},{x:70,y:65},{x:20,y:70},{x:80,y:70},{x:35,y:55},{x:65,y:55}]},"4-3-2-1":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:15,y:30},{x:50,y:30},{x:85,y:30},{x:35,y:40},{x:65,y:40},{x:50,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:15,y:70},{x:50,y:70},{x:85,y:70},{x:35,y:60},{x:65,y:60},{x:50,y:55}]},"4-4-2 Diamond":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:40,y:25},{x:20,y:30},{x:60,y:30},{x:40,y:40},{x:35,y:45},{x:65,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:40,y:65},{x:20,y:70},{x:60,y:70},{x:40,y:60},{x:35,y:55},{x:65,y:55}]},"3-5-2":{home:[{x:50,y:7},{x:15,y:17},{x:50,y:17},{x:85,y:17},{x:10,y:30},{x:30,y:30},{x:50,y:30},{x:70,y:30},{x:90,y:30},{x:35,y:45},{x:65,y:45}],away:[{x:50,y:94},{x:15,y:83},{x:50,y:83},{x:85,y:83},{x:10,y:70},{x:30,y:70},{x:50,y:70},{x:70,y:70},{x:90,y:70},{x:35,y:55},{x:65,y:55}]},"5-3-2":{home:[{x:50,y:7},{x:10,y:17},{x:25,y:17},{x:50,y:17},{x:75,y:17},{x:90,y:17},{x:25,y:30},{x:50,y:30},{x:75,y:30},{x:35,y:45},{x:65,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:25,y:83},{x:50,y:83},{x:75,y:83},{x:90,y:83},{x:25,y:70},{x:50,y:70},{x:75,y:70},{x:35,y:55},{x:65,y:55}]},"3-4-3":{home:[{x:50,y:7},{x:15,y:17},{x:50,y:17},{x:85,y:17},{x:10,y:30},{x:35,y:30},{x:65,y:30},{x:90,y:30},{x:20,y:45},{x:50,y:45},{x:80,y:45}],away:[{x:50,y:94},{x:15,y:83},{x:50,y:83},{x:85,y:83},{x:10,y:70},{x:35,y:70},{x:65,y:70},{x:90,y:70},{x:20,y:55},{x:50,y:55},{x:80,y:55}]},"5-4-1":{home:[{x:50,y:7},{x:10,y:17},{x:25,y:17},{x:50,y:17},{x:75,y:17},{x:90,y:17},{x:10,y:30},{x:35,y:30},{x:65,y:30},{x:90,y:30},{x:50,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:25,y:83},{x:50,y:83},{x:75,y:83},{x:90,y:83},{x:10,y:70},{x:35,y:70},{x:65,y:70},{x:90,y:70},{x:50,y:55}]},"3-4-2-1":{home:[{x:50,y:7},{x:15,y:17},{x:50,y:17},{x:85,y:17},{x:10,y:30},{x:35,y:30},{x:65,y:30},{x:90,y:30},{x:30,y:40},{x:70,y:40},{x:50,y:45}],away:[{x:50,y:94},{x:15,y:83},{x:50,y:83},{x:85,y:83},{x:10,y:70},{x:35,y:70},{x:65,y:70},{x:90,y:70},{x:30,y:60},{x:70,y:60},{x:50,y:55}]},"3-4-1-2":{home:[{x:50,y:7},{x:15,y:17},{x:50,y:17},{x:85,y:17},{x:10,y:30},{x:35,y:30},{x:65,y:30},{x:90,y:30},{x:50,y:40},{x:35,y:45},{x:65,y:45}],away:[{x:50,y:94},{x:15,y:83},{x:50,y:83},{x:85,y:83},{x:10,y:70},{x:35,y:70},{x:65,y:70},{x:90,y:70},{x:50,y:60},{x:35,y:55},{x:65,y:55}]},"3-2-4-1":{home:[{x:50,y:7},{x:15,y:17},{x:50,y:17},{x:85,y:17},{x:25,y:25},{x:75,y:25},{x:10,y:30},{x:35,y:30},{x:65,y:30},{x:90,y:30},{x:50,y:45}],away:[{x:50,y:94},{x:15,y:83},{x:50,y:83},{x:85,y:83},{x:25,y:65},{x:75,y:65},{x:10,y:70},{x:35,y:70},{x:65,y:70},{x:90,y:70},{x:50,y:55}]},"3-3-1-3":{home:[{x:50,y:7},{x:15,y:17},{x:50,y:17},{x:85,y:17},{x:15,y:30},{x:50,y:30},{x:85,y:30},{x:50,y:40},{x:15,y:45},{x:50,y:45},{x:85,y:45}],away:[{x:50,y:94},{x:15,y:83},{x:50,y:83},{x:85,y:83},{x:15,y:70},{x:50,y:70},{x:85,y:70},{x:50,y:60},{x:15,y:55},{x:50,y:55},{x:85,y:55}]},"4-3-1-2":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:30,y:30},{x:50,y:30},{x:70,y:30},{x:50,y:40},{x:35,y:45},{x:65,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:30,y:70},{x:50,y:70},{x:70,y:70},{x:50,y:60},{x:35,y:55},{x:65,y:55}]},"3-5-1-1":{home:[{x:50,y:7},{x:15,y:17},{x:50,y:17},{x:85,y:17},{x:10,y:30},{x:30,y:30},{x:50,y:30},{x:70,y:30},{x:90,y:30},{x:50,y:37},{x:50,y:45}],away:[{x:50,y:94},{x:15,y:83},{x:50,y:83},{x:85,y:83},{x:10,y:70},{x:30,y:70},{x:50,y:70},{x:70,y:70},{x:90,y:70},{x:50,y:63},{x:50,y:55}]},"4-1-3-2":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:50,y:25},{x:20,y:35},{x:50,y:35},{x:80,y:35},{x:35,y:45},{x:65,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:50,y:65},{x:20,y:65},{x:50,y:65},{x:80,y:65},{x:35,y:55},{x:65,y:55}]},"4-2-4":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:30,y:30},{x:70,y:30},{x:10,y:45},{x:35,y:45},{x:65,y:45},{x:90,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:30,y:70},{x:70,y:70},{x:10,y:55},{x:35,y:55},{x:65,y:55},{x:90,y:55}]},"5-2-3":{home:[{x:50,y:7},{x:10,y:17},{x:30,y:17},{x:50,y:17},{x:70,y:17},{x:90,y:17},{x:35,y:30},{x:65,y:30},{x:20,y:45},{x:50,y:45},{x:80,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:30,y:83},{x:50,y:83},{x:70,y:83},{x:90,y:83},{x:35,y:70},{x:65,y:70},{x:20,y:55},{x:50,y:55},{x:80,y:55}]},"3-1-4-2":{home:[{x:50,y:7},{x:20,y:17},{x:50,y:17},{x:80,y:17},{x:50,y:25},{x:20,y:35},{x:40,y:35},{x:60,y:35},{x:80,y:35},{x:35,y:45},{x:65,y:45}],away:[{x:50,y:94},{x:20,y:83},{x:50,y:83},{x:80,y:83},{x:50,y:75},{x:20,y:65},{x:40,y:65},{x:60,y:65},{x:80,y:65},{x:35,y:55},{x:65,y:55}]},"4-1-2-3":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:50,y:25},{x:35,y:32},{x:65,y:32},{x:20,y:45},{x:50,y:42},{x:80,y:45}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:50,y:75},{x:35,y:68},{x:65,y:68},{x:20,y:55},{x:50,y:58},{x:80,y:55}]},"3-2-5":{home:[{x:50,y:7},{x:20,y:17},{x:50,y:17},{x:80,y:17},{x:35,y:25},{x:65,y:25},{x:10,y:40},{x:30,y:35},{x:50,y:38},{x:70,y:35},{x:90,y:40}],away:[{x:50,y:94},{x:20,y:83},{x:50,y:83},{x:80,y:83},{x:35,y:75},{x:65,y:75},{x:10,y:60},{x:30,y:65},{x:50,y:62},{x:70,y:65},{x:90,y:60}]},"3-6-1":{home:[{x:50,y:7},{x:20,y:17},{x:50,y:17},{x:80,y:17},{x:20,y:30},{x:40,y:30},{x:60,y:30},{x:80,y:30},{x:35,y:38},{x:65,y:38},{x:50,y:45}],away:[{x:50,y:94},{x:20,y:83},{x:50,y:83},{x:80,y:83},{x:20,y:70},{x:40,y:70},{x:60,y:70},{x:80,y:70},{x:35,y:62},{x:65,y:62},{x:50,y:55}]},"2-3-5":{home:[{x:50,y:7},{x:30,y:17},{x:70,y:17},{x:20,y:25},{x:50,y:25},{x:80,y:25},{x:10,y:40},{x:30,y:35},{x:50,y:38},{x:70,y:35},{x:90,y:40}],away:[{x:50,y:94},{x:30,y:83},{x:70,y:83},{x:20,y:75},{x:50,y:75},{x:80,y:75},{x:10,y:60},{x:30,y:65},{x:50,y:62},{x:70,y:65},{x:90,y:60}]},"4-6-0":{home:[{x:50,y:7},{x:10,y:17},{x:35,y:17},{x:65,y:17},{x:90,y:17},{x:25,y:27},{x:75,y:27},{x:10,y:35},{x:35,y:35},{x:65,y:35},{x:90,y:35}],away:[{x:50,y:94},{x:10,y:83},{x:35,y:83},{x:65,y:83},{x:90,y:83},{x:25,y:73},{x:75,y:73},{x:10,y:65},{x:35,y:65},{x:65,y:65},{x:90,y:65}]},"2-5-3":{home:[{x:50,y:7},{x:30,y:17},{x:70,y:17},{x:10,y:27},{x:30,y:27},{x:50,y:27},{x:70,y:27},{x:90,y:27},{x:30,y:42},{x:50,y:45},{x:70,y:42}],away:[{x:50,y:94},{x:30,y:83},{x:70,y:83},{x:10,y:73},{x:30,y:73},{x:50,y:73},{x:70,y:73},{x:90,y:73},{x:30,y:58},{x:50,y:55},{x:70,y:58}]}},window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Modules=window.LiveScoreApp.Modules||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Config=function(){function e(){const e=function(){if(window.LiveScoreApp&&window.LiveScoreApp.lastLiveCount)return window.LiveScoreApp.lastLiveCount;const e=document.getElementById("live-matches");if(e){const t=e.textContent.match(/\((\d+)\)/);if(t)return parseInt(t[1],10)}let t=0;if(window.LiveScoreApp&&window.LiveScoreApp.LiveMatches){for(const[e,a]of window.LiveScoreApp.LiveMatches.entries())"inprogress"===a.status&&t++;return t}return 100}();let t=1,a=1,i=1;return e<=50?(t=1,a=1,i=1):e<=100?(t=.8,a=1.2,i=.8):e<=150?(t=.6,a=1.5,i=.6):e<=200?(t=.4,a=2,i=.4):e<=300?(t=.3,a=2.5,i=.3):(t=.2,a=3,i=.2),{liveCount:e,multiplier:t,cleanupSpeed:a,retentionSpeed:i}}const t=e(),a={delay:Math.max(25,Math.floor(50/t.cleanupSpeed)),maxRetries:2,retryDelay:Math.max(100,Math.floor(200/t.cleanupSpeed)),batchSize:3,maxRequestsPerMinute:360,priorityQueueSize:Math.floor(50*t.multiplier),normalQueueSize:Math.floor(100*t.multiplier),timeoutDuration:Math.max(5e3,Math.floor(8e3*t.multiplier)),maxConcurrentRequests:Math.min(15,Math.floor(12*t.cleanupSpeed))},i={maxCacheEntries:Math.floor(1500*t.multiplier),maxCacheSizeKB:Math.floor(25e3*t.multiplier),cleanupInterval:Math.floor(12e4/t.cleanupSpeed),emergencyCleanupThreshold:Math.floor(2e4*t.multiplier),_dynamicInfo:{basedOnLiveMatches:t.liveCount,appliedMultiplier:t.multiplier,appliedCleanupSpeed:t.cleanupSpeed,appliedRetentionSpeed:t.retentionSpeed},recalculate:function(){const t=e();this.maxCacheEntries=Math.floor(1500*t.multiplier),this.maxCacheSizeKB=Math.floor(25e3*t.multiplier),this.cleanupInterval=Math.floor(12e4/t.cleanupSpeed),this.emergencyCleanupThreshold=Math.floor(2e4*t.multiplier),this.liveMatchesConfig.cleanupInterval=Math.floor(15e3/t.cleanupSpeed),this.liveMatchesConfig.maxLiveMatches=Math.max(1500,Math.ceil(2.5*t.liveCount)),this.liveMatchesConfig.finishedMatchRetention=Math.floor(12e4*t.retentionSpeed),this.liveMatchesConfig.notStartedMatchRetention=Math.floor(6e5*t.retentionSpeed),this.liveMatchesConfig.canceledMatchRetention=Math.floor(18e4*t.retentionSpeed),this.liveMatchesConfig.postponedMatchRetention=Math.floor(18e5*t.retentionSpeed),this._dynamicInfo={basedOnLiveMatches:t.liveCount,appliedMultiplier:t.multiplier,appliedCleanupSpeed:t.cleanupSpeed,appliedRetentionSpeed:t.retentionSpeed}},compressLargeData:!0,compressionThresholdKB:5,memcachedIntegration:!0,memcachedSyncInterval:6e4,disableDebugLogs:!1,liveMatchesConfig:{maxLiveMatches:Math.max(1500,Math.ceil(2.5*t.liveCount)),maxInProgressMatches:Math.floor(200*t.multiplier),maxFinishedMatches:Math.floor(30*t.multiplier),maxNotStartedMatches:Math.floor(120*t.multiplier),cleanupInterval:Math.floor(15e3/t.cleanupSpeed),emergencyCleanupInterval:Math.floor(5e3/t.cleanupSpeed),inProgressRetention:0,finishedMatchRetention:Math.floor(12e4*t.retentionSpeed),notStartedMatchRetention:Math.floor(6e5*t.retentionSpeed),canceledMatchRetention:Math.floor(18e4*t.retentionSpeed),postponedMatchRetention:Math.floor(18e5*t.retentionSpeed),memoryPressureThreshold:Math.floor(150*t.multiplier),criticalMemoryThreshold:Math.floor(200*t.multiplier)}};return window.LiveScoreApp.debugMode=!1,{requestConfig:a,animationDurations:{scoreFlash:3e3},optimizationSettings:i,updateDynamicSettings:function(){if(i.recalculate){i.recalculate();const t=e();return Object.assign(a,{delay:Math.max(25,Math.floor(50/t.cleanupSpeed)),retryDelay:Math.max(100,Math.floor(200/t.cleanupSpeed)),batchSize:Math.min(12,Math.floor(8*t.cleanupSpeed)),maxRequestsPerMinute:Math.floor(200*t.cleanupSpeed),priorityQueueSize:Math.floor(50*t.multiplier),normalQueueSize:Math.floor(100*t.multiplier),timeoutDuration:Math.max(5e3,Math.floor(8e3*t.multiplier)),maxConcurrentRequests:Math.min(15,Math.floor(12*t.cleanupSpeed))}),!0}return!1},getDynamicInfo:function(){return i._dynamicInfo},setLiveMatchCount:function(e){window.LiveScoreApp.lastLiveCount=e,this.updateDynamicSettings()}}}(),function(){"use strict";window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Constants=window.LiveScoreApp.Constants||{},window.LiveScoreApp.Constants.CACHE_TTL={LIVE_SCORES:{live:6e3,finished:36e5,scheduled:1e4,paused:15e3},MATCH_INCIDENTS:{live:6e4,finished:36e5,scheduled:0},ATTACK_MOMENTUM:{live:6e4,finished:36e5,scheduled:0},LINEUPS:{live:15e3,finished:36e5,scheduled:36e5},STATISTICS:{live:6e4,finished:36e5,scheduled:0},H2H:{live:3e5,finished:36e5,scheduled:36e5},STREAKS:{live:12e4,finished:36e5,scheduled:3e5},STANDINGS:{live:3e5,finished:36e5,scheduled:36e5},HISTORICAL_MATCHES:{finished:36e5,notstarted:6e5},LEAGUE_DATA:864e5,TEAM_INFO:6048e5,JERSEY_COLORS:6048e5,LIVE_MINUTE_TEXT:6e3,LIVE_TEXT:6e3,SCORE_FLASH:3e3},window.LiveScoreApp.Constants.getCacheTTL=function(e,t,a){return void 0!==(a=a||{}).override?a.override:this._getNormalTTL(e,t)},window.LiveScoreApp.Constants._getNormalTTL=function(e,t){t=t||"live";const a=this.CACHE_TTL[e];if(!a)return 0;if("number"==typeof a)return a;if("object"==typeof a){const e=a[t];return void 0===e?a.live||0:e}return 0},window.LiveScoreApp.Constants.getCacheTTLFinished=function(e){return this.getCacheTTL(e,"finished")},window.LiveScoreApp.Constants.getAllTTLs=function(){return JSON.parse(JSON.stringify(this.CACHE_TTL))},window.LiveScoreApp.Constants.toSeconds=function(e){return Math.round(e/1e3)},window.LiveScoreApp.Constants.toMilliseconds=function(e){return 1e3*e},window.LiveScoreApp.Constants.validateTTLConsistency=function(){return new Promise(function(e){const t=window.LiveScoreApp.Constants.getAllTTLs(),a=new FormData;a.append("action","validate_cache_ttls"),a.append("frontend_ttls",JSON.stringify(t)),a.append("_wpnonce",window.liveScoresNonce||""),fetch(window.ajaxurl||"/wp-admin/admin-ajax.php",{method:"POST",body:a}).then(e=>e.json()).then(a=>{a.success&&a.data?e({isConsistent:!0===a.data.is_consistent,frontendTTLs:t,backendTTLs:a.data.backend_ttls||{},mismatches:a.data.mismatches||[]}):e({isConsistent:!1,frontendTTLs:t,backendTTLs:{},mismatches:["Validation endpoint error"]})}).catch(a=>{e({isConsistent:null,frontendTTLs:t,backendTTLs:{},mismatches:["Fetch error: "+a.message]})})})},window.LiveScoreApp.Constants.logTTLs=function(e){if(e=!1!==e);else{const e={};for(const t in this.CACHE_TTL){const a=this.CACHE_TTL[t];e[t]="number"==typeof a?a+"ms":"(status-dependent, see details)"}}},window.LiveScoreApp.Constants.verifyCompatibility=function(){const e=["LIVE_SCORES","MATCH_INCIDENTS","ATTACK_MOMENTUM","LINEUPS","STATISTICS","H2H","STANDINGS","LIVE_TEXT"];let t=!0;for(let a=0;a<e.length;a++){const i=e[a];this.CACHE_TTL[i]||(t=!1)}let a=!1;for(const e in this.CACHE_TTL){const t=this.CACHE_TTL[e];if("number"==typeof t&&t<0)a=!0;else if("object"==typeof t)for(const e in t)t[e]<0&&(a=!0)}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){window.LiveScoreApp.Constants.verifyCompatibility()}):window.LiveScoreApp.Constants.verifyCompatibility()}(),"undefined"!=typeof module&&module.exports&&(module.exports=window.LiveScoreApp.Constants),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.jQuery=function(){var e="undefined"!=typeof jQuery?jQuery:void 0!==n?n:null;if(!e)var t=0,a=setInterval(function(){"undefined"!=typeof jQuery?(e=jQuery,clearInterval(a)):++t>100&&clearInterval(a)},50);let i=null;function n(t){return i?i(t):e(t)}return{$:n,getElement:function(e){return n(e)},ajax:function(t){return i?i.ajax(t):e.ajax(t)},when:function(...t){return i?i.when(...t):e.when(...t)},ready:function(t){e(document).ready(t)},getJQuery:()=>i||e,setWpjQuery:function(e){i=e}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.DeviceDetect=function(){let e={},t=!1;function a(){e={},t=!1}return window.addEventListener("resize",function(){t=!1},{passive:!0}),window.addEventListener("orientationchange",function(){t=!1,setTimeout(a,300)},{passive:!0}),{isTouchDevice:function(){return"isTouchDevice"in e||(e.isTouchDevice="ontouchstart"in window||navigator.maxTouchPoints>0||window.matchMedia&&window.matchMedia("(pointer: coarse)").matches),e.isTouchDevice},isMobile:function(){return t&&"isMobile"in e||(e.isMobile=window.innerWidth<=768),e.isMobile},isTablet:function(){return t&&"isTablet"in e||(e.isTablet=window.innerWidth>768&&window.innerWidth<=1024),e.isTablet},isDesktop:function(){return t&&"isDesktop"in e||(e.isDesktop=window.innerWidth>1024),e.isDesktop},isLandscape:function(){return t&&"isLandscape"in e||(e.isLandscape=window.innerWidth>window.innerHeight),e.isLandscape},isIOS:function(){return"isIOS"in e||(e.isIOS=/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),e.isIOS},isAndroid:function(){return"isAndroid"in e||(e.isAndroid=/Android/i.test(navigator.userAgent)),e.isAndroid},isStandalone:function(){return"isStandalone"in e||(e.isStandalone=window.matchMedia("(display-mode: standalone)").matches||!0===window.navigator.standalone),e.isStandalone},getBreakpoint:function(){return window.innerWidth<=768?"mobile":window.innerWidth<=1024?"tablet":"desktop"},hasHoverSupport:function(){return"hasHover"in e||(e.hasHover=window.matchMedia("(hover: hover)").matches),e.hasHover},invalidateCache:a}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.Cache=function(){window.LiveScoreApp.Config;const e=window.LiveScoreApp.Utils.TimerManager,t=new Map;let a=0,i=0,n=0,o=0,s=!1,r=[],c=0,l=null;function d(){return!l&&window.LiveScoreApp.Utils.MemcachedSync&&(l=window.LiveScoreApp.Utils.MemcachedSync),l}const u={GENERAL:"cache_",LINEUP:"lineup_",JERSEY:"jersey_",LIVESCORE:"liveScore_",MATCH_DETAIL:"matchDetail_",STATISTIC:"statistic_",H2H:"h2h_",STREAKS:"streaks_",STANDING:"standing_",LIVE_MINUTE_:"LIVE_MINUTE_"};function p(){let e=0,a={};for(let[i,n]of t.entries()){const t=i.split("_")[0]+"_";e+=n.size||0,a[t]||(a[t]={count:0,size:0}),a[t].count++,a[t].size+=n.size||0}return{totalSize:e,entriesCount:t.size,typeStats:a}}function m(){if(s)return new Promise(e=>{r.push(e)});const e=Date.now();if(e-c<5e3)return{removedCount:0,cacheTypeCleanup:{},skipped:!0,reason:"throttled"};s=!0,c=e;try{return function(){const e=Date.now();let a=0;const i={},n=window.LiveScoreApp.Config;for(let[n,o]of t.entries()){const s=n.split("_")[0]+"_";e-o.timestamp-o.duration>500&&(t.delete(n),a++,i[s]||(i[s]={count:0}),i[s].count++)}const s=p();if(s.totalSize>n.optimizationSettings.maxCacheSizeKB||s.entriesCount>n.optimizationSettings.maxCacheEntries){const o=Array.from(t.entries()).sort((t,a)=>{const i=t[1].lastAccessed||t[1].timestamp,n=a[1].lastAccessed||a[1].timestamp,o=(e-i)*(t[1].size||1);return(e-n)*(a[1].size||1)-o}),r=Math.max(0,(s.totalSize-n.optimizationSettings.maxCacheSizeKB)/n.optimizationSettings.maxCacheSizeKB),c=Math.max(0,(s.entriesCount-n.optimizationSettings.maxCacheEntries)/n.optimizationSettings.maxCacheEntries),l=Math.min(.5,Math.max(.1,.5*Math.max(r,c))),d=Math.ceil(o.length*l);for(let e=0;e<d&&e<o.length;e++){const n=o[e][0],s=n.split("_")[0]+"_";t.delete(n),a++,i[s]||(i[s]={count:0}),i[s].count++}}if(o++,a>0)try{const n=d();if(n&&"function"==typeof n.scheduleSyncWithServer){const o={removedCount:a,totalSize:s.totalSize,cacheSize:t.size,timestamp:e,cacheTypes:i};setTimeout(()=>{n.scheduleSyncWithServer(o)},0)}}catch(e){}return{removedCount:a,cacheTypeCleanup:i,totalSize:s.totalSize,entriesCount:s.entriesCount}}()}finally{if(s=!1,r.length>0){const e=[...r];r=[],setTimeout(()=>{const t={removedCount:0,cacheTypeCleanup:{},fromQueue:!0};e.forEach(e=>e(t))},0)}}}function h(){const t=window.LiveScoreApp.Config.optimizationSettings.cleanupInterval||36e5;e?e.setInterval(()=>{m()},t,"cache-periodic-cleanup"):setInterval(()=>{m()},t)}return setTimeout(h,5e3),{getFromCacheByType:function(e,n=u.GENERAL){const o=n+e;if(s){const e=t.get(o);return e&&Date.now()-e.timestamp<e.duration?(a++,e.lastAccessed=Date.now(),e.data):(i++,null)}const r=t.get(o);if(r){const e=Date.now();if(e-r.timestamp<r.duration+500)return a++,r.lastAccessed=e,r.data;t.delete(o)}return i++,null},setToCacheByType:function(e,r,c,l=u.GENERAL){if(null==r)return;if(!function(e,t,a){if("object"==typeof t&&null!==t){if(Array.isArray(t)&&0===t.length)return!0;if(!Array.isArray(t)&&0===Object.keys(t).length)return!0}switch(a){case u.MATCH_DETAIL:return Array.isArray(t)?!(t.length>0&&"object"!=typeof t[0]):"object"==typeof t;case u.STATISTIC:return"object"==typeof t&&!Array.isArray(t);case u.LIVESCORE:return!(!t||"object"!=typeof t&&!Array.isArray(t));default:return!("string"==typeof t&&t.length>100&&-1!==t.indexOf("<!DOCTYPE"))}}(0,r,l))return;if("object"==typeof r&&null!==r&&r.request_id&&r.match_id){const e=window.LiveScoreApp&&window.LiveScoreApp.Utils?window.LiveScoreApp.Utils.RequestIdGenerator:null;if(e&&!e.validateResponse(r.match_id,r.request_id))return}const d=l+e;let p=0;try{p="string"==typeof r?r.length/1024:JSON.stringify(r).length/1024}catch(e){p=10}const h=window.LiveScoreApp.Config.optimizationSettings.maxCacheEntries||1500;t.size>=h&&!s&&m(),t.size>=2*h&&(t.clear(),a=0,i=0,n=0,o++);const v={data:r,timestamp:Date.now(),lastAccessed:Date.now(),duration:Math.min(c,72e5),size:p};if(t.set(d,v),window.LiveScoreApp&&window.LiveScoreApp.Monitoring&&window.LiveScoreApp.Monitoring.trackCacheWrite({key:e,success:!0,size_kb:p.toFixed(2),ttl_ms:c,timestamp:(new Date).toISOString()}),n++,!s){const e=window.LiveScoreApp.Config.optimizationSettings._dynamicInfo,t=e&&e.basedOnLiveMatches>200;(n%(t?15:25)==0||p>(t?100:500))&&setTimeout(function(){m()},100),window.performance&&window.performance.memory&&window.performance.memory.usedJSHeapSize/1048576>(t?150:300)&&setTimeout(function(){m()},0)}},cleanupCache:m,clearCacheByType:function(e){return function(e,a=!1){if(s)return 0;const i=Date.now();let n=0;const o={};for(let[s,r]of t.entries())s.startsWith(e)&&(i-r.timestamp>r.duration||a)&&(t.delete(s),n++,o[e]||(o[e]={count:0}),o[e].count++);if(n>0)try{const e=d();if(e&&"function"==typeof e.scheduleSyncWithServer){const a={removedCount:n,totalSize:p().totalSize,cacheSize:t.size,timestamp:i,cacheTypes:o};setTimeout(()=>{e.scheduleSyncWithServer(a)},0)}}catch(e){}return n}(e,!0)},deleteCacheItem:function(e){if(t.has(e)){t.delete(e);try{const t=d();if(t&&"function"==typeof t.scheduleSyncWithServer){const a={action:"delete",cacheKey:e,timestamp:Date.now()};setTimeout(()=>{t.scheduleSyncWithServer(a)},0)}}catch(e){}return!0}return!1},getCacheStats:function(){const e=p();return{totalEntries:t.size,totalSizeKB:e.totalSize.toFixed(2),hits:a,misses:i,typeBreakdown:e.typeStats,writeCount:n,cleanupCount:o}},CACHE_PREFIX:u,CACHE_TYPES:{MATCH_DETAILS:{prefix:"matchDetail_",ttl:function(e){return e?36e5:3e5},description:"Maç detayları (canlı: 5 dakika, bitti: 1 saat)"},MATCH_INCIDENTS:{prefix:"matchDetail_",ttl:function(e){return e?36e5:6e5},description:"Maç olayları (canlı: 10 dakika, bitti: 1 saat)"},ATTACK_MOMENTUM:{prefix:"matchDetail_",ttl:function(e){return e?36e5:6e5},description:"Baskı grafiği (canlı: 10 dakika, bitti: 1 saat)"},MATCH_STATISTICS:{prefix:"statistic_",ttl:function(e){return e?36e5:3e5},description:"Maç istatistikleri (canlı: 5 dakika, bitti: 1 saat)"},STANDINGS:{prefix:"standing_",ttl:function(){return 36e5},description:"Puan durumu (1 saat)"},LINEUPS:{prefix:"lineup_",ttl:function(){return 36e5},description:"Kadro bilgileri (1 saat)"},TEAM_PERFORMANCE:{prefix:"statistic_",ttl:function(){return 36e5},description:"Takım performansı (1 saat)"},H2H_DATA:{prefix:"h2h_",ttl:function(){return 36e5},description:"Baş-başa istatistikler (1 saat)"},STREAKS_DATA:{prefix:"statistic_",ttl:function(){return 36e5},description:"Takım serileri (1 saat)"}},emergencyCleanup:function(){const e=t.size;return t.clear(),a=0,i=0,n=0,o++,{removedCount:e}},getCacheSize:function(){const e=p();return{entries:t.size,sizeKB:e.totalSize,typeBreakdown:e.typeStats}},stopPeriodicCleanup:function(){e&&e.clearInterval("cache-periodic-cleanup")},startPeriodicCleanup:function(){h()}}}(),window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.Cache&&(window.LiveScoreApp.Utils.Cache._getFromCacheByTypeOriginal=window.LiveScoreApp.Utils.Cache.getFromCacheByType),!window.getCache&&window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.Cache&&(window.getCache=function(e,t){try{const a=window.LiveScoreApp.Utils.Cache.getFromCacheByType(e);return null!=a?a:t||null}catch(e){return t||null}},window.putCache=function(e,t,a){try{return!(!window.LiveScoreApp.Utils.Cache||"function"!=typeof window.LiveScoreApp.Utils.Cache.setToCacheByType)&&window.LiveScoreApp.Utils.Cache.setToCacheByType(e,t)}catch(e){return!1}}),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.RequestQueue=function(){const e=window.LiveScoreApp.Config;let t=!1,a=[],i=null,n=0,o=0,s=0,r=Date.now();const c=new Map;function l(i,n={}){const o=Date.now();return o-r>6e4&&(s=0,r=o),s>=e.requestConfig.maxRequestsPerMinute&&!n.urgent?new Promise((e,t)=>{setTimeout(()=>{l(i,n).then(e).catch(t)},5e3)}):(s++,new Promise((e,o)=>{const s="live"===n.type||n.urgent?"unshift":"push";a[s](function(){try{const t=i();return t&&"function"==typeof t.then?t.then(e).catch(o):(e(t),Promise.resolve(t))}catch(e){return o(e),Promise.reject(e)}}),t||d()}))}function d(){t||0===a.length||(t=!0,performance.now(),function s(){if(0===a.length)return void(t=!1);const r=Math.min(e.requestConfig.batchSize,a.length),c=[];for(let e=0;e<r;e++)c.push(a.shift());const l=c.map(e=>(n++,o++,e().then(e=>(n--,e)).catch(e=>{throw n--,e})));Promise.all(l).then(()=>{i=setTimeout(s,e.requestConfig.delay)}).catch(t=>{i=setTimeout(s,e.requestConfig.delay)})}())}return{enqueue:l,enqueueHighPriority:function(e){return new Promise((i,n)=>{a.unshift(function(){try{const t=e();return t&&"function"==typeof t.then?t.then(i).catch(n):(i(t),Promise.resolve(t))}catch(e){return n(e),Promise.reject(e)}}),t||d()})},processQueue:d,clearQueue:function(){a=[],t=!1,i&&(clearTimeout(i),i=null),c.clear(),n=0},getStats:function(){return{queueLength:a.length,isProcessing:t,activeRequests:n,totalRequests:o,requestsPerMinute:s,retryCount:c.size}},enqueueRequest:l}}(),window.RequestQueueManager=window.LiveScoreApp.Utils.RequestQueue,window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.NetworkAware=function(){"use strict";const e=[];let t=!1;function a(){return navigator.connection||navigator.mozConnection||navigator.webkitConnection||null}function i(t){for(var a=0;a<e.length;a++)try{e[a](t)}catch(e){}}function n(){return!1!==navigator.onLine}function o(){var e=a();return e?e.effectiveType:null}return{init:function(){if(!t){t=!0,window.addEventListener("online",function(){i("online"),window.LiveScoreApp.debugMode}),window.addEventListener("offline",function(){i("offline"),window.LiveScoreApp.debugMode});var e=a();e&&e.addEventListener&&e.addEventListener("change",function(){i("connectionchange"),window.LiveScoreApp.debugMode}),window.LiveScoreApp.debugMode}},isOnline:n,getConnectionType:o,getAdaptiveTimeout:function(e){var t=o();if(!t)return e;switch(t){case"4g":default:return e;case"3g":return 1.5*e;case"2g":return 2.5*e;case"slow-2g":return 3*e}},isPageVisible:function(){return"hidden"!==document.visibilityState},addListener:function(t){"function"==typeof t&&e.push(t)},getConnectionQuality:function(){if(!n())return 0;var e=o();if(!e)return 3;switch(e){case"4g":default:return 3;case"3g":return 2;case"2g":case"slow-2g":return 1}}}}(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){window.LiveScoreApp.Utils.NetworkAware.init()}):window.LiveScoreApp.Utils.NetworkAware.init(),function(e){"use strict";if(!e.RequestQueueManager)return;const t={queueManager:null,init:function(){return this.queueManager||(this.queueManager=e.RequestQueueManager),this.queueManager},validateResponse:function(e,t){return e&&"object"==typeof e?void 0===e.success?{success:!0,data:e,_validation:"unwrapped"}:(e.success&&!e.data&&0!==e.data&&""!==e.data&&(e.data=null),e):{success:!1,data:null,_validation:"invalid_shape"}},request:function(t,a={},i={}){this.queueManager||this.init();const n={action:t,...a},o=this;let s=i.timeout||3e4;const r=e.LiveScoreApp&&e.LiveScoreApp.Utils&&e.LiveScoreApp.Utils.NetworkAware;return r&&"function"==typeof r.getAdaptiveTimeout&&(s=r.getAdaptiveTimeout(s)),this.queueManager.enqueue(()=>r&&"function"==typeof r.isOnline&&!r.isOnline()?Promise.reject({status:0,statusText:"offline",message:"No network connection"}):jQuery.ajax({type:"POST",url:e.ajaxurl||"/wp-admin/admin-ajax.php",data:n,dataType:"json",timeout:s}),{type:i.type||"normal",urgent:i.urgent||!1}).then(function(e){return o.validateResponse(e,t)})},getStats:function(){return this.queueManager||this.init(),this.queueManager.getStats()}};e.QueuedAjax=t,document.addEventListener("DOMContentLoaded",function(){t.init()})}(window),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.Translator={translateStreak:function(e){return window.translations.streaks?.[e]||e},translateName:function(e,t){return window.translations?.[e]?.[t]||t},truncateText:function(e,t){return e.length>t?e.substring(0,t-3)+"...":e},truncateTextForElement:function(e,t){return e.length>t?e.substr(0,t-3)+"...":e}},window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.DomUtils=function(){function e(e,t){let a;return function(){const i=this,n=arguments;clearTimeout(a),a=setTimeout(()=>e.apply(i,n),t)}}var t=null;function a(){null===t&&(t=requestAnimationFrame(function e(){n(),t=requestAnimationFrame(e)}))}function i(){null!==t&&(cancelAnimationFrame(t),t=null)}function n(){var e=document.getElementById("match-details");if(e)if(e.classList&&e.classList.contains("detail-closed"))i();else{var t=window.innerWidth,a=window.innerHeight;if(t<=768)e.classList.remove("desktop-mode"),e.classList.add("mobile-mode"),e.style.transform="",e.style.top="",e.style.maxHeight="";else{e.classList.remove("mobile-mode"),e.classList.add("desktop-mode");var n=document.getElementById("live-scores"),o=20;n&&(o=Math.max(20,n.getBoundingClientRect().top)),e.style.top=o+"px",e.style.maxHeight=a-o-60+"px",e.style.transform="translateX(0) scale(1)"}}}const o=e(n,100);let s=0;function r(){s=window.scrollY||window.pageYOffset,document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.top=-s+"px",document.documentElement.style.overflow="hidden",document.documentElement.style.height="100%"}function c(){document.body.style.overflow="",document.body.style.position="",document.body.style.width="",document.body.style.top="",document.documentElement.style.overflow="",document.documentElement.style.height="",window.scrollTo(0,s)}let l=!1;function d(){l||(l=!0,requestAnimationFrame(function(){try{n()}finally{l=!1}}))}let u=null,p=null;function m(){const e=document.getElementById("match-details");if(!e)return;p&&p.abort(),p=new AbortController;const t=p.signal;let a=0,i=0,n=0,o=!1;e.addEventListener("touchstart",function(e){e.touches.length>1||(a=e.touches[0].clientY,i=e.touches[0].clientX,n=Date.now()),o=!1},{passive:!0,signal:t}),e.addEventListener("touchmove",function(t){if(t.touches.length>1)return void(o=!1);const n=t.touches[0].clientY,s=t.touches[0].clientX,r=n-a,c=Math.abs(s-i);if(r>20&&c<20&&r>0){o=!0,t.preventDefault(),e.classList.add("swiping");const a=200,i=Math.max(.2,1-r/a);e.style.opacity=i,e.style.transform="translateY("+r+"px)"}else(r<-20||c>40)&&(o=!1,e.classList.remove("swiping"))},{passive:!1,signal:t}),e.addEventListener("touchend",function(t){if(!o)return e.style.opacity="1",e.style.transform="translateY(0)",void e.classList.remove("swiping");const i=t.changedTouches[0].clientY-a,s=Date.now()-n,r=Math.abs(i)/Math.max(1,s);i>=80||r>=.5?(e.classList.remove("swiping"),"function"==typeof window.LiveScoreApp.Modules?.MatchDetails?.closeMatchDetails&&window.LiveScoreApp.Modules.MatchDetails.closeMatchDetails()):(e.style.opacity="1",e.style.transform="translateY(0)",e.classList.remove("swiping"))},{passive:!0,signal:t}),e.addEventListener("touchcancel",function(t){e.style.opacity="1",e.style.transform="translateY(0)",e.classList.remove("swiping"),o=!1},{passive:!0,signal:t})}function h(){const e=window.LiveScoreApp.Utils.jQuery;e&&(window.LiveScoreApp.Modules.MatchDetails&&window.LiveScoreApp.Modules.MatchDetails.setCurrentTab(null),e.$(".live-scores-tab-content").removeClass("live-scores-active entering exiting slide-left slide-right").css("display",""),e.$(".live-scores-menu-item").removeClass("active").removeAttr("aria-selected"))}function v(){[{wrapper:".nav-scroll-wrapper",scrollable:".tournament-nav"},{wrapper:".players-tabs-wrapper",scrollable:".players-tabs"}].forEach(function(e){document.querySelectorAll(e.wrapper).forEach(function(t){var a=t.querySelector(e.scrollable);function i(){var e=a.scrollLeft,i=a.scrollWidth-a.clientWidth;i<=2?t.classList.remove("can-scroll-left","can-scroll-right"):(t.classList.toggle("can-scroll-left",e>4),t.classList.toggle("can-scroll-right",e<i-4))}a&&(a.addEventListener("scroll",i,{passive:!0}),window.addEventListener("resize",i,{passive:!0}),requestAnimationFrame(i))})})}function y(){document.querySelectorAll(".tournament-nav, .players-tabs").forEach(function(e){var t,a,i=!1;e.addEventListener("mousedown",function(n){0===n.button&&(i=!0,e.style.cursor="grabbing",e.style.userSelect="none",t=n.pageX-e.offsetLeft,a=e.scrollLeft)}),e.addEventListener("mouseleave",function(){i&&(i=!1,e.style.cursor="",e.style.userSelect="")}),e.addEventListener("mouseup",function(){i&&(i=!1,e.style.cursor="",e.style.userSelect="")}),e.addEventListener("mousemove",function(n){if(i){n.preventDefault();var o=1.5*(n.pageX-e.offsetLeft-t);e.scrollLeft=a-o}}),e.addEventListener("click",function(t){Math.abs(e.scrollLeft-a)>5&&(t.preventDefault(),t.stopPropagation())},!0)})}return"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){v(),y()}):requestAnimationFrame(function(){v(),y()}),{throttle:function(e,t){let a;return function(){const i=arguments;a||(e.apply(this,i),a=!0,setTimeout(()=>a=!1,t))}},debounce:e,adjustMatchDetailsPosition:n,debouncedAdjustMatchDetailsPosition:o,startPositioningLoop:a,stopPositioningLoop:i,onMatchDetailsOpen:function(){var e=document.getElementById("match-details");e&&(window.innerWidth<=768&&r(),e.style.display="block",n(),a(),setTimeout(function(){var t=window.LiveScoreApp.Utils.jQuery;if(window.innerWidth<=768)e&&e.classList&&e.classList.add("entrance-animation");else{var a=window.pageYOffset||document.documentElement.scrollTop,i=Math.max(0,a-100);t&&t.$?t.$("html, body").stop(!0,!1).animate({scrollTop:i},400,"swing"):window.scrollTo({top:i,behavior:"smooth"})}},50))},onMatchDetailsClose:function(){i();var e=document.getElementById("match-details");e&&(e.style.display="none",e.style.transform="",e.style.top="",e.style.maxHeight=""),c()},lockBodyScroll:r,unlockBodyScroll:c,setupDomEventListeners:function(){window.addEventListener("resize",d,{passive:!0}),window.addEventListener("scroll",d,{passive:!0}),document.addEventListener("DOMContentLoaded",n),m(),function(){function e(){clearTimeout(u),u=setTimeout(function(){var e=window.LiveScoreApp.Utils.DeviceDetect;e&&"function"==typeof e.invalidateCache&&e.invalidateCache(),n();var t=.01*window.innerHeight;document.documentElement.style.setProperty("--vh",t+"px");var a=document.getElementById("match-details");a&&!a.classList.contains("detail-closed")&&(a.scrollTop=0)},300)}window.addEventListener("orientationchange",e,{passive:!0}),screen.orientation&&screen.orientation.addEventListener&&screen.orientation.addEventListener("change",e)}()},cleanupDomEventListeners:function(){window.removeEventListener("resize",d),window.removeEventListener("scroll",d),document.removeEventListener("DOMContentLoaded",n),p&&(p.abort(),p=null)},setupTouchSwipeHandler:m,addTournamentFlag:function(e){if(!e||!e.length)return;const t="https://cdn.sporkolik.net/flags/"+(e.data("alpha2")||"world")+".png";if(0===e.find(".live-scores-tournament-flag").length){const a=e.find(".live-scores-tournament-name").text()||"Turnuva";e.prepend('<img src="'+t+'" alt="'+a.trim()+' bayrağı" class="live-scores-tournament-flag" width="24" height="24">')}},attachMatchClickEvents:function(e){const t=window.LiveScoreApp.Utils.jQuery;if(!t)return;const a=window.LiveScoreApp.LiveScores,i=window.LiveScoreApp.ScriptManager;a&&i&&(t.$("#live-scores").off("click",".live-scores-match").on("click",".live-scores-match",function(n){n.preventDefault();const o=t.$(this),s=o.data("match-id");if(!s)return;o.find(".live-scores-team").each(function(e){const a=t.$(this).find(".live-scores-score"),i=0===e?"home":"away",n=parseInt(a.text())||0;void 0===a.attr(`data-old-score-${i}`)&&a.attr(`data-old-score-${i}`,n)});const r=function(){const i=window.LiveScoreApp.Modules.MatchDetails;i&&(a.getSelectedMatchId()===s?("function"==typeof i.closeMatchDetails?i.closeMatchDetails():t.$("#match-details").hide(),a.setSelectedMatchId(null),h(),setTimeout(function(){a.setSelectedMatchId(s),i.updateMatchDetails(s),e&&"function"==typeof e.updatePerformanceMetric&&e.updatePerformanceMetric("userInteraction","match-card-reclick")},50)):window.LiveScoreApp.Modules.MatchDetails&&"function"==typeof window.LiveScoreApp.Modules.MatchDetails.closeMatchDetails?(i.closeMatchDetails(),setTimeout(function(){i.updateMatchDetails(s),a.setSelectedMatchId(s),e&&"function"==typeof e.updatePerformanceMetric&&e.updatePerformanceMetric("userInteraction","match-card-click")},50)):(i.updateMatchDetails(s),a.setSelectedMatchId(s)),"function"==typeof i.checkAndFetchLineups&&setTimeout(function(){i.checkAndFetchLineups(s)},1e3))};if(window.LiveScoreApp.Modules.MatchDetails&&"function"==typeof window.LiveScoreApp.Modules.MatchDetails.updateMatchDetails)r();else{const e="/wp-content/plugins/v7/js/modules/match-details.js";i.loadScript(e,"MatchDetails",{onLoad:function(){r()},onError:function(e){t.$("#match-details").html("<p>Maç detayları yüklenirken bir hata oluştu. Lütfen daha sonra tekrar deneyin.</p>").show()}})}}),t.$(window).off("scroll").on("scroll",function(){a.getSelectedMatchId()||t.$("#match-details").hide();const i=Date.now();i-(window.lastScrollCleanupTime||0)>3e5&&(window.lastScrollCleanupTime=i,e&&"function"==typeof e.cleanupOnScroll&&e.cleanupOnScroll())}))},resetTabStates:h,setupMatchDetailsUI:function(e){const t=window.LiveScoreApp.Utils.jQuery;if(!t)return;const a=t.$("#match-details");t.$("#attack-momentum-chart").css("display",""),n(),"notstarted"===e&&t.$('.live-scores-menu-item[data-tab="details"]').hide(),a.show(),h(),"finished"===e&&t.$(".live-scores-match-time").text("Bitti"),window.matchDetailsEventSetup||(t.$(window).on("resize.matchDetails scroll.matchDetails",n),window.matchDetailsEventSetup=!0,window.addEventListener("beforeunload",function(){t.$(window).off("resize.matchDetails scroll.matchDetails"),window.matchDetailsEventSetup=!1}))}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.Compression=function(){const e=window.LiveScoreApp.Config;function t(e){if(!e||"string"!=typeof e)return e;try{return e.replace(/\s+/g," ").replace(/\>\s+\</g,"><").replace(/\s+\/\>/g,"/>").trim()}catch(t){return e}}function a(a){if(!e.optimizationSettings.compressLargeData)return a;try{return"string"==typeof a?t(a):a&&"object"==typeof a?JSON.parse(JSON.stringify(a)):a}catch(e){return a}}const i=function(){const e={compressedRequests:0,originalSizeTotal:0,compressedSizeTotal:0,savedBytes:0};return{updateStats:function(t,a){e.compressedRequests++,e.originalSizeTotal+=t,e.compressedSizeTotal+=a,e.savedBytes+=t-a},getStats:function(){return{...e}},logStats:function(){return e}}}();return{compressHtml:t,compressDataForCache:a,getOptimizedCache:function(e,t){return window.LiveScoreApp.Utils.Cache.getFromCacheByType(e,t)||null},setOptimizedCache:function(e,t,i,n){const o=window.LiveScoreApp.Utils.Cache,s=a(t);o.setToCacheByType(e,s,i,n)},compressData:function(e){if(null==e)return{compressed:!1,data:e};try{const t=JSON.stringify(e);if(t.length<10240)return{compressed:!1,data:e};const a=JSON.stringify(e),i=t.length;if(i-a.length<1024)return{compressed:!1,data:e};const n=btoa(encodeURIComponent(a));return{compressed:!0,type:"json-compact",data:n,originalSize:i,compressedSize:n.length}}catch(t){return{compressed:!1,data:e}}},decompressData:function(e){if(!e||null===e||!e.compressed)return e&&void 0!==e.data?e.data:e;try{if("json-compact"===e.type){const t=decodeURIComponent(atob(e.data));return JSON.parse(t)}return e.data}catch(t){return e.data||null}},optimizeResponse:function(e,t){if(!e||"object"!=typeof e)return e;if(JSON.stringify(e).length/1024<10)return e;const a={...e};switch(t){case"live":a.events&&Array.isArray(a.events)&&(a.events=a.events.map(e=>({id:e.id,customId:e.customId,status:e.status,tournament:{name:e.tournament.name,uniqueTournament:{id:e.tournament.uniqueTournament.id,name:e.tournament.uniqueTournament.name}},homeTeam:{id:e.homeTeam.id,name:e.homeTeam.name,shortName:e.homeTeam.shortName},awayTeam:{id:e.awayTeam.id,name:e.awayTeam.name,shortName:e.awayTeam.shortName},homeScore:e.homeScore,awayScore:e.awayScore,startTimestamp:e.startTimestamp,time:e.time})));break;case"match":if(a.event){const e=a.event;a.event={id:e.id,customId:e.customId,status:e.status,homeTeam:{id:e.homeTeam.id,name:e.homeTeam.name},awayTeam:{id:e.awayTeam.id,name:e.awayTeam.name},homeScore:e.homeScore,awayScore:e.awayScore,startTimestamp:e.startTimestamp,time:e.time}}break;case"incidents":a.incidents&&Array.isArray(a.incidents)&&(a.incidents=a.incidents.map(e=>{const t={...e};return t.player&&"object"==typeof t.player&&(t.player={...t.player,statistics:void 0,detailedStats:void 0}),["playerIn","playerOut","assist"].forEach(e=>{t[e]&&"object"==typeof t[e]&&(t[e]={...t[e],statistics:void 0,detailedStats:void 0})}),t}));break;case"h2h":a.events&&Array.isArray(a.events)&&(a.events=a.events.map(e=>({id:e.id,startTimestamp:e.startTimestamp,tournament:{name:e.tournament.name},homeTeam:{id:e.homeTeam.id,name:e.homeTeam.name},awayTeam:{id:e.awayTeam.id,name:e.awayTeam.name},homeScore:e.homeScore,awayScore:e.awayScore})))}return a},updateCompressionStats:i.updateStats,getCompressionStats:i.getStats,logCompressionStats:i.logStats}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.ExtraTimeTracker=window.LiveScoreApp.ExtraTimeTracker||{matches:new Map,initialized:!1,intervalId:null},window.LiveScoreApp.Utils.calculateAggregatedWinner=function(e){if(!e||!e.homeScore||!e.awayScore)return 0;let t=0,a=0;void 0!==e.homeScore.aggregated&&void 0!==e.awayScore.aggregated?(t=e.homeScore.aggregated,a=e.awayScore.aggregated):void 0!==e.homeScore.display&&void 0!==e.awayScore.display&&(t=e.homeScore.display,a=e.awayScore.display);let i=0;return t>a?i=1:a>t?i=2:void 0!==e.homeScore.penalties&&void 0!==e.awayScore.penalties&&(e.homeScore.penalties>e.awayScore.penalties?i=1:e.awayScore.penalties>e.homeScore.penalties&&(i=2)),i},window.LiveScoreApp.Utils.MinuteCalculator=function(){const e=window.LiveScoreApp.Utils.jQuery,t=window.LiveScoreApp.ExtraTimeTracker,a=window.LiveScoreApp.Utils.Cache,i=(window.LiveScoreApp.Config,"LIVE_MINUTE_");let n=5e3;try{window.LiveScoreApp&&window.LiveScoreApp.Constants&&"function"==typeof window.LiveScoreApp.Constants.getCacheTTL&&(n=window.LiveScoreApp.Constants.getCacheTTL("LIVE_TEXT","live"))}catch(e){}function o(e){return e&&"string"==typeof e?e.replace(/\s+/g," ").replace(/>\s+</g,"><").trim().toLowerCase():""}function s(e,a){if(!t.matches.has(e)&&a){const i=a.time&&a.time.extra?Math.ceil(a.time.extra/60):0,n=(a.time&&a.time.currentPeriodStartTimestamp?a.time.currentPeriodStartTimestamp:0)+(a.statusTime.max-a.statusTime.initial),o=Math.floor(Date.now()/1e3),s=Math.max(0,o-n),r=Math.floor(s/60),c=Math.floor(s%60);t.matches.set(e,{extraTime:i,elapsedMinutes:r,elapsedSeconds:c,normalTimeEnd:n,lastUpdate:o})}return t.initialized||r(),t.matches.get(e)||{extraTime:0,elapsedMinutes:0,elapsedSeconds:0}}function r(){t.intervalId&&(clearInterval(t.intervalId),t.intervalId=null),t.intervalId=setInterval(function(){const e=Math.floor(Date.now()/1e3);t.matches.forEach((t,a)=>{const i=e-t.lastUpdate;if(i>=1){let n=60*t.elapsedMinutes+t.elapsedSeconds+i;t.elapsedMinutes=Math.floor(n/60),t.elapsedSeconds=Math.floor(n%60),t.lastUpdate=e,c(a)}})},5e3),t.initialized=!0}function c(a){const i=t.matches.get(a);if(i&&e&&e.$){const t=e.$("#match-details .live-scores-match-time");if(t.length&&t.data("match-id")===a){const e=`${i.elapsedMinutes}:${i.elapsedSeconds<10?"0"+i.elapsedSeconds:i.elapsedSeconds}`;t.find(".extra-time-elapsed").text(e)}const n=e.$(`.live-scores-match[data-match-id="${a}"]`);if(n.length){const e=n.find(".live-scores-minute, .minute");if(e.length&&e.find(".extra-time-elapsed").length){const t=`${i.elapsedMinutes}:${i.elapsedSeconds<10?"0"+i.elapsedSeconds:i.elapsedSeconds}`;e.find(".extra-time-elapsed").text(t)}}}}function l(e,t,a,i){if((!e||""===e.trim())&&t&&(t.includes("started")||"Started"===t||"1st half"===t||"2nd half"===t))return"";const n=e?e.trim():"";if(n&&n.match(/(İY|UZT İY|Pen|Başlamadı|Ertelendi|Gecikme|İptal)/))return n;const o=(e||"").replace(/['\s]/g,"");if("Halftime"===t)return"İY";if("Extra time halftime"===t)return"UZT İY";if("Penalties"===t)return"Pen. Bek.";if("1nd extra"===t||"2nd extra"===t){const e="1nd extra"===t?"UZ1":"UZ2",a=o.replace(/UZ1|UZ2/g,"").trim(),i=parseInt(a);return isNaN(i)?e+"'":"UZ1"===e&&i>105||"UZ2"===e&&i>120?e+" "+("UZ1"===e?105:120)+"+'":e+" "+i+"'"}if(o.includes("+"))return o;{const e=parseInt(o);return isNaN(e)?o.includes("'")?o:o+"'":"1st half"===t&&e>45?"45+'":"2nd half"===t&&e>90?"90+'":e+"'"}}return{formatMinute:l,getFormattedMinute:function(e){const t=e.data("status"),a=e.data("status-description")||"",i=e.find(".live-scores-minute, .minute").text()||"",n=e.data("match-id");let o=null;o=window.LiveScoreApp.LiveMatches&&window.LiveScoreApp.LiveMatches.get(n)?window.LiveScoreApp.LiveMatches.get(n):{statusTime:{initial:e.data("initial-time")||0,max:e.data("max-time")||5400,timestamp:e.data("timestamp")||0,extra:e.data("extra-time")||0},time:{currentPeriodStartTimestamp:e.data("period-start")||0}};const s=e.find(".live-scores-score");["notstarted","postponed","delayed","canceled"].includes(t)?s.addClass("hidden"):s.removeClass("hidden");const r=e.find(".live-scores-minute, .minute").html()||"";let c="";c="notstarted"===t?'<span class="match-status match-status-notstarted">Başlamadı</span>':"finished"===t?'<span class="match-status match-status-finished">Bitti</span>':"postponed"===t?'<span class="match-status match-status-postponed">Ertelendi</span>':"delayed"===t?'<span class="match-status match-status-postponed">Gecikme</span>':"canceled"===t?'<span class="match-status match-status-postponed">İptal</span>':l(i,a);const d=r.includes("match-status-live"),u=c.includes("match-status-live");return d&&u?r:c},updateMinuteDisplay:function(e,t,a,i,n){const s=e.html()||"",r=l(t,a);o(s)!==o(r)&&e.html(r)},getFormattedExtraTime:function(e,t){const a=s(e,t),i=`${a.elapsedMinutes}:${a.elapsedSeconds<10?"0"+a.elapsedSeconds:a.elapsedSeconds}`;return{extraTime:a.extraTime,elapsedTime:i}},initExtraTimeData:s,startAutoUpdate:r,stopAutoUpdate:function(){t.intervalId&&(clearInterval(t.intervalId),t.intervalId=null),t.initialized=!1},updateExtraTimeUI:c,getCachedLiveText:function(e,t){const o=`${e}_${t}`;if(!a||"function"!=typeof a.getFromCacheByType)return"";let s=a.getFromCacheByType(o,i);return s||(s="","function"==typeof a.setToCacheByType&&a.setToCacheByType(o,s,n,i)),s}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.SecurityUtils=function(){"use strict";function e(e){if(!e||"string"!=typeof e)return"";const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};return e.replace(/[&<>"'\/]/g,function(e){return t[e]})}function t(a){if(!a||"object"!=typeof a)return a;const i=Array.isArray(a)?[]:{};for(const n in a)if(a.hasOwnProperty(n)){const o=a[n];i[n]="string"==typeof o?e(o):null!==o&&"object"==typeof o?t(o):o}return i}return{escapeHtml:e,escapeUrlParam:function(e){return e&&"string"==typeof e?encodeURIComponent(e):""},sanitizeObject:t,validateMatchData:function(a){if(!a||"object"!=typeof a)return{};const i={},n=["matchId","homeTeamName","awayTeamName","matchStatus"],o=["homeTeamName","awayTeamName","matchTime","matchStatus","league","city","stadium","referee","homeTeamImage","awayTeamImage"],s=["homeRedCards","awayRedCards"];for(const e of n)void 0===a[e]||a[e];for(const t of o)a[t]&&"string"==typeof a[t]?i[t]=e(a[t]):a[t]&&(i[t]=a[t]);for(const e of s)void 0!==a[e]&&null!==a[e]?(i[e]=parseInt(a[e],10)||0,i[e]<0&&(i[e]=0)):i[e]=0;a.homeScore&&"object"==typeof a.homeScore&&(i.homeTeamScore=a.homeScore.current||0,i.homeTeamDisplayScore=a.homeScore.display||0,i.homeAggregatedScore=a.homeScore.aggregated||null,i.homePenaltiesScore=a.homeScore.penalties||null),a.awayScore&&"object"==typeof a.awayScore&&(i.awayTeamScore=a.awayScore.current||0,i.awayTeamDisplayScore=a.awayScore.display||0,i.awayAggregatedScore=a.awayScore.aggregated||null,i.awayPenaltiesScore=a.awayScore.penalties||null);for(const e in a)if(!i.hasOwnProperty(e)&&a.hasOwnProperty(e)){if("homeScore"===e||"awayScore"===e)continue;"object"==typeof a[e]&&null!==a[e]?i[e]=t(a[e]):i[e]=a[e]}return i},renderTemplate:function(e,t){return"string"==typeof e&&t?e.replace(/\$\{([^}]+)\}/g,function(e,a){const i=a.split(".");let n=t;for(const e of i){if(!n||"object"!=typeof n||!(e in n))return"";n=n[e]}return"string"==typeof n?n:null==n?"":String(n)}):""},sanitizeHtml:function(e,t=["div","span","p","br","strong","em","i","header","nav","button","h1","h2","h3","a","ul","li"]){if("string"!=typeof e)return"";const a=document.createElement("div");return a.innerHTML=e,function e(a){for(let i=a.children.length-1;i>=0;i--){const n=a.children[i],o=n.tagName.toLowerCase();if(["script","iframe","style","link","meta","object","embed"].includes(o))n.remove();else if(t.includes(o)){const t=["onload","onerror","onclick","onmouseover","on"];for(const e of t)for(let t=0;t<n.attributes.length;t++)n.attributes[t].name.startsWith(e)&&(n.removeAttribute(n.attributes[t].name),t--);e(n)}else{for(;n.firstChild;)a.insertBefore(n.firstChild,n);n.remove()}}}(a),a.innerHTML},validateApiResponse:function(e){return!(!e||"object"!=typeof e)&&"status"in e&&"data"in e},isValidUrl:function(e){if("string"!=typeof e)return!1;try{const t=new URL(e);return["http:","https:"].includes(t.protocol)}catch(e){return!1}},createSafeEventHandler:function(e,t){const a=JSON.parse(JSON.stringify(t||{}));return function(t){try{e.call(this,t,a)}catch(e){}}},version:"1.0.0",name:"SecurityUtils"}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.RequestIdGenerator=function(){"use strict";const e={},t={},a={generated:0,validated:0,failed:0,cleaned:0};function i(){const e=Date.now(),i=[];for(const a in t){const n=t[a];(e-n.timestamp>3e4||n._scheduleDelete&&e>=n._scheduleDelete)&&i.push(a)}i.forEach(function(e){delete t[e]}),a.cleaned+=i.length;const n=Object.keys(t);if(n.length>200){const e=n.sort(function(e,a){return t[e].timestamp-t[a].timestamp}).slice(0,Math.ceil(40));e.forEach(function(e){delete t[e]}),a.cleaned+=e.length,window.LiveScoreApp.debugMode}return i.length}return{generateId:function(n,o){void 0===o&&(o="get_match_details");var s="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});return e[n+"_"+o]=s,t[s]={matchId:n,type:o,timestamp:Date.now(),status:"pending"},a.generated++,Object.keys(t).length%50==0&&i(),window.LiveScoreApp.debugMode,s},getIdByMatchId:function(t,a){if(a)return e[t+"_"+a]||null;var i=t+"_";for(var n in e)if(0===n.indexOf(i))return e[n];return null},validateResponse:function(i,n){if(!n)return!1;var o=t[n];if(!o)return!1;if(String(o.matchId)!==String(i))return a.failed++,!1;var s=i+"_"+o.type,r=e[s];return!!r&&(r!==n?(a.failed++,window.LiveScoreApp.debugMode,!1):(a.validated++,window.LiveScoreApp.debugMode,!0))},markCompleted:function(e,a){return void 0===a&&(a="completed"),!!t[e]&&(t[e].status=a,t[e].completedAt=Date.now(),!0)},clearId:function(t){var a=t+"_",i=!1;for(var n in e)0===n.indexOf(a)&&(delete e[n],i=!0);return i&&window.LiveScoreApp.debugMode,i},clearAll:function(){var t=Object.keys(e).length;for(var a in e)delete e[a];return window.LiveScoreApp.debugMode,t},cancelByMatchId:function(a){var i=a+"_",n=!1;for(var o in e)if(0===o.indexOf(i)){var s=e[o];t[s]&&(t[s].status="cancelled",t[s].cancelledAt=Date.now(),t[s]._scheduleDelete=Date.now()+1e3),delete e[o],n=!0}return!!n&&(window.LiveScoreApp.debugMode,!0)},getDebugInfo:function(){var i=Object.values(t),n=i.filter(function(e){return"pending"===e.status}).length,o=i.filter(function(e){return"completed"===e.status}).length,s=i.filter(function(e){return"cancelled"===e.status}).length;return{totalTrackedRequests:Object.keys(t).length,activeMatchRequests:Object.keys(e).length,requestIdMap:Object.assign({},e),stats:{generated:a.generated,validated:a.validated,failed:a.failed,cleaned:a.cleaned,pending:n,completed:o,cancelled:s}}},cleanupOldRequests:i,_reset:function(){var i={requestIdMap:Object.assign({},e),requestMetadata:Object.assign({},t)};for(var n in e)delete e[n];for(var o in t)delete t[o];return a.generated=0,a.validated=0,a.failed=0,a.cleaned=0,i}}}(),"undefined"!=typeof module&&module.exports&&(module.exports=window.LiveScoreApp.Utils.RequestIdGenerator),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.MemcachedSync=function(){let e=0,t=!1,a=[],i={successCount:0,failureCount:0,lastResponse:null,avgResponseTime:0,totalResponseTime:0},n={isUrgent:!1,lastSkippedTime:0,totalSkippedRequests:0,serverResponseTime:0,nextSyncTime:0};function o(i,o=!1){const r=Date.now(),c=window.LiveScoreApp.Config;if(i&&(a.push(i),(i.totalSize>c.optimizationSettings.memcachedUrgentThreshold||i.removedCount>200)&&(o=!0),i.protectSpecialScores&&(i.protectedPatterns=i.protectedPatterns||["matchAggregateScore_","matchPreviousScore_","matchPenaltyScore_"])),n.isUrgent=o||n.isUrgent,t)return;const l=r-e,d=n.isUrgent?3e4:3e5;if(l<d){const e=d-l;return n.nextSyncTime=r+e,t=!0,void setTimeout(()=>{s()},e)}s()}function s(){const o=window.LiveScoreApp.Config,s=Date.now();if(t=!1,e=s,n.nextSyncTime=0,0===a.length)return;if(!o.optimizationSettings.memcachedIntegration||!window.LiveScoresAjax)return void(a=[]);const r={removedCount:0,totalSize:0,cacheSize:0,timestamp:e,forceCleanup:n.isUrgent,aggressiveMode:!1,protectSpecialScores:!0,protectedPatterns:["matchAggregateScore_","matchPreviousScore_","matchPenaltyScore_"],cacheTypes:{}};let c=0,l=0,d={};a.forEach(e=>{e.removedCount&&(r.removedCount+=e.removedCount,l=Math.max(l,e.removedCount)),e.totalSize&&(c+=e.totalSize,r.totalSize=Math.max(r.totalSize,e.totalSize)),e.cacheSize&&(r.cacheSize=Math.max(r.cacheSize,e.cacheSize)),e.cacheTypes&&Object.keys(e.cacheTypes).forEach(t=>{d[t]||(d[t]=0),d[t]+=e.cacheTypes[t].count||0})}),Object.keys(d).forEach(e=>{r.cacheTypes[e]||(r.cacheTypes[e]={count:0}),r.cacheTypes[e].count=d[e]}),(c>8e3||l>300||i.failureCount>2)&&(r.aggressiveMode=!0),a=[],n.isUrgent=!1;try{jQuery.ajax({url:window.LiveScoresAjax.ajax_url,type:"POST",async:!0,timeout:5e3,data:{action:"sync_memcached_cleanup",cleanup_stats:JSON.stringify(r)},success:function(e){const t=Date.now(),a=t-s;i.successCount++,i.lastResponse=e,i.totalResponseTime+=a,i.avgResponseTime=i.totalResponseTime/i.successCount,n.serverResponseTime=a,e&&e.data&&e.data.next_scheduled&&(n.nextSyncTime=1e3*e.data.next_scheduled),e&&e.data&&"skipped"===e.data.status&&(n.totalSkippedRequests++,n.lastSkippedTime=t)},error:function(e,t,a){i.failureCount++,i.failureCount}})}catch(e){i.failureCount++}}return{scheduleSyncWithServer:o,performServerSync:s,forceSyncWithServer:function(){a=[];const e=window.LiveScoreApp.Utils.Cache.getCacheStats(),t={removedCount:Math.max(100,Math.ceil(.1*e.totalEntries)),totalSize:e.totalSizeKB||1e3,cacheSize:e.totalEntries||100,forceCleanup:!0,aggressiveMode:!0,timestamp:Date.now(),cacheTypes:{}};return e.typeBreakdown&&Object.keys(e.typeBreakdown).forEach(a=>{t.cacheTypes[a]={count:e.typeBreakdown[a].count||0}}),o(t,!0),!0},getSyncStatus:function(){return{lastSync:e,pendingSync:t,queueLength:a.length,metrics:i,status:n,nextSync:n.nextSyncTime}},getMetrics:function(){return i}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.EventUtils=function(){const e=window.LiveScoreApp.Utils.jQuery,t=(window.LiveScoreApp.Utils.Cache,window.LiveScoreApp.Config,{mainApp:!1,matchDetails:!1,tabs:!1,custom:{}});function a(){e.$(".live-scores-back-button").off("click.matchDetails"),e.$(".live-scores-back-button").off("click"),e.$(document).off("click","#match-details .live-scores-back-button"),e.$(".live-scores-menu-item").off("click.matchDetails").off("keydown.matchDetails"),e.$("#performance-button").off("click.matchDetails"),e.$("#h2h-button").off("click.matchDetails"),e.$("#team-streaks-button").off("click.matchDetails"),e.$("#h2h-streaks-button").off("click.matchDetails"),e.$(document).off("keydown.matchDetails"),setTimeout(()=>{if(window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.DomUtils&&"function"==typeof window.LiveScoreApp.Utils.DomUtils.cleanupDomEventListeners)try{window.LiveScoreApp.Utils.DomUtils.cleanupDomEventListeners(),window.LiveScoreApp.debugMode}catch(e){}},300),t.matchDetails=!1}function i(){e.$("#match-details").addClass("detail-closed"),e.$("#match-details").hide(),window.LiveScoreApp.Modules.MatchDetailsTabs&&window.LiveScoreApp.Modules.MatchDetailsTabs.cleanupIntervals(),a()}function n(){e.$("#all-matches").off("click.mainApp"),e.$("#live-matches").off("click.mainApp"),document.getElementById("date-picker").removeEventListener("change"),t.mainApp=!1}return{setupMainAppEventListeners:function(a={}){if(t.mainApp)return;const i=window.LiveScoreApp.LiveScores,n=window.LiveScoreApp.Utils.TimerManager;if(i){if(e.$("#all-matches").on("click.mainApp",function(){n&&n.clearInterval("main-score-update"),e.$("#all-matches").addClass("active"),e.$("#live-matches").removeClass("active"),e.$(".switch-menu").removeClass("indicator-right"),e.$(".date-picker-container").addClass("visible"),e.$("#quick-date-bar").addClass("visible"),i.setIsAllMatchesSelected(!0);const t=e.$("#date-picker").val().split("/");i.setIsSwitchingTab(!0),i.fetchLiveScores(t[0],t[1],t[2],"all"),e.$("#match-details").hide(),a.clearCacheSmart&&"function"==typeof a.clearCacheSmart&&a.clearCacheSmart(["STANDING","JERSEY"]),a.onTabChange&&"function"==typeof a.onTabChange&&a.onTabChange("all"),a.updatePerformanceMetric&&"function"==typeof a.updatePerformanceMetric&&a.updatePerformanceMetric("userInteraction","all-matches-click")}),e.$("#live-matches").on("click.mainApp",function(){n&&i&&"function"==typeof i.startMainTimer&&i.startMainTimer(),e.$("#live-matches").addClass("active"),e.$("#all-matches").removeClass("active"),e.$(".switch-menu").addClass("indicator-right"),e.$(".date-picker-container").removeClass("visible"),e.$("#quick-date-bar").removeClass("visible"),"function"==typeof window.resetLeagueFilter&&window.resetLeagueFilter(),i.setIsAllMatchesSelected(!1),i.setIsSwitchingTab(!0),i.fetchLiveScores(null,null,null,"live"),e.$("#match-details").hide(),a.clearCacheSmart&&"function"==typeof a.clearCacheSmart&&a.clearCacheSmart(["STANDING","JERSEY"]),a.onTabChange&&"function"==typeof a.onTabChange&&a.onTabChange("live"),a.updatePerformanceMetric&&"function"==typeof a.updatePerformanceMetric&&a.updatePerformanceMetric("userInteraction","live-matches-click")}),"function"==typeof flatpickr)try{flatpickr("#date-picker",{dateFormat:"d/m/Y",defaultDate:"today",locale:flatpickr.l10ns.tr,onChange:function(t,n,o){if(!t||!t.length)return;const s=n.split("/");i.setIsSwitchingTab(!0),i.fetchLiveScores(s[0],s[1],s[2],"all").then(()=>{a.updatePerformanceMetric&&"function"==typeof a.updatePerformanceMetric&&a.updatePerformanceMetric("dataLoaded","date-change")}).catch(t=>{e.$("#live-scores").html("<p>Veriler yüklenirken bir hata oluştu. Lütfen tekrar deneyin.</p>")}),a.onDateChange&&"function"==typeof a.onDateChange&&a.onDateChange(t[0]),window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.UI&&"function"==typeof window.LiveScoreApp.Modules.UI.updateBrowserURL&&window.LiveScoreApp.Modules.UI.updateBrowserURL("all",t[0]),a.clearCacheSmart&&"function"==typeof a.clearCacheSmart&&a.clearCacheSmart(["LIVESCORE"])}})}catch(t){e.$("#date-picker").attr("type","date")}else e.$("#date-picker").attr("type","date");document.getElementById("date-picker").addEventListener("change",function(e){const t=e.target.value;if(t&&/^\d{2}\/\d{2}\/\d{4}$/.test(t)){const[e,i,n]=t.split("/"),o=new Date(`${n}-${i}-${e}`);a.onDateChange&&"function"==typeof a.onDateChange&&a.onDateChange(o),window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.UI&&"function"==typeof window.LiveScoreApp.Modules.UI.updateBrowserURL&&window.LiveScoreApp.Modules.UI.updateBrowserURL("all",o),a.updatePerformanceMetric&&"function"==typeof a.updatePerformanceMetric&&a.updatePerformanceMetric("userInteraction","date-manual-change")}}),t.mainApp=!0}},setupMatchDetailsEventListeners:function(n,o={}){a(),e.$(".live-scores-back-button").off("click"),e.$(".live-scores-back-button").off("click.matchDetails"),e.$(document).off("click","#match-details .live-scores-back-button");const s=window.LiveScoreApp.Components||{},r=window.LiveScoreApp.Modules.MatchDetails;e.$(".live-scores-menu-item").on("click.matchDetails",function(){const t=e.$(this).data("tab");(r?r.getCurrentTab():null)!==t&&(e.$(".live-scores-menu-item").removeClass("active").attr("aria-selected","false"),e.$(this).addClass("active").attr("aria-selected","true"),r&&"function"==typeof r.updateTabContent?r.updateTabContent(n,t):window.LiveScoreApp.Modules.MatchDetailsTabs&&"function"==typeof window.LiveScoreApp.Modules.MatchDetailsTabs.updateTabContent&&window.LiveScoreApp.Modules.MatchDetailsTabs.updateTabContent(n,t))}),e.$(".live-scores-menu-item").on("keydown.matchDetails",function(t){const a=e.$(".live-scores-menu-item"),i=e.$(this),n=a.index(i);let o;switch(t.keyCode){case 37:case 38:t.preventDefault(),o=n>0?a.eq(n-1):a.eq(a.length-1),o.click().focus();break;case 39:case 40:t.preventDefault(),o=n<a.length-1?a.eq(n+1):a.eq(0),o.click().focus();break;case 36:t.preventDefault(),a.eq(0).click().focus();break;case 35:t.preventDefault(),a.eq(a.length-1).click().focus()}}),e.$(".live-scores-back-button").on("click.matchDetails",function(e){if(e.preventDefault(),e.stopPropagation(),"function"==typeof o.closeMatchDetails)o.closeMatchDetails(n);else{const e=window.LiveScoreApp?.Modules?.MatchDetails;e&&"function"==typeof e.closeMatchDetails?e.closeMatchDetails(n):i()}}),e.$("#performance-button").on("click.matchDetails",function(){e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),s&&s.History&&s.History.fetchPerformanceData(n)}),e.$("#h2h-button").on("click.matchDetails",function(){if(e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),s&&s.H2H){const t="finished"===e.$('.live-scores-match[data-match-id="'+n+'"]').data("status");s.H2H.fetchH2HData(n,t)}}),e.$("#team-streaks-button").on("click.matchDetails",function(){if(e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),s&&s.Streaks){const t="finished"===e.$('.live-scores-match[data-match-id="'+n+'"]').data("status");s.Streaks.fetchTeamStreaksData(n,t)}}),e.$("#h2h-streaks-button").on("click.matchDetails",function(){if(e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),s&&s.Streaks){const t="finished"===e.$('.live-scores-match[data-match-id="'+n+'"]').data("status");s.Streaks.fetchH2HStreaksData(n,t)}}),window.innerWidth<=768||/Android|webOS|iPhone|iPad|iPod/.test(navigator.userAgent)||e.$(document).on("keydown.matchDetails",function(e){27===e.keyCode&&o.closeMatchDetails&&"function"==typeof o.closeMatchDetails&&o.closeMatchDetails()}),t.matchDetails=!0},cleanupMainAppEventListeners:n,cleanupMatchDetailsEventListeners:a,cleanupAllEventListeners:function(){n(),a()},closeMatchDetails:i,getActiveEventListeners:function(){return Object.assign({},t)}}}(),window.LiveScoreApp._checkBackButtonAttachment||(window.LiveScoreApp._checkBackButtonAttachment=function(){Date.now();const e=jQuery(".live-scores-back-button");if(e.length,0===e.length)return!1;const t=jQuery._data(e[0],"events"),a=t&&t.click&&t.click.some(e=>e.namespace.includes("matchDetails"));return e.each((e,t)=>{jQuery(t)}),a}),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.PollingCoordinator=function(){"use strict";const e=new Map;let t=!1;function a(t){const a=e.get(t);a&&(c(a),e.delete(t),window.LiveScoreApp.debugMode)}function i(){e.forEach(function(e){c(e)})}function n(){t=!0,i(),window.LiveScoreApp.debugMode}function o(){t=!1;let a=0;e.forEach(function(i){i.lastFetch>0&&(setTimeout(function(){!t&&e.has(i.name)&&r(i)},2e3*a),a++)}),window.LiveScoreApp.debugMode}function s(){let t=0;return e.forEach(function(e){e.isActive&&t++}),t}function r(e){if(e.isActive)return;const a=window.LiveScoreApp.Utils.TimerManager,i=function(){if("hidden"!==document.visibilityState&&!t&&("function"!=typeof e.shouldPoll||e.shouldPoll())){e.lastFetch=Date.now();try{e.fetchFn()}catch(e){}}};a&&"function"==typeof a.setNamedInterval?e.timerId=a.setNamedInterval(i,e.interval,"poll_"+e.name):e.timerId=setInterval(i,e.interval),e.isActive=!0}function c(e){if(!e.isActive&&!e.timerId)return;const t=window.LiveScoreApp.Utils.TimerManager;t&&"function"==typeof t.clearNamedInterval?t.clearNamedInterval("poll_"+e.name):e.timerId&&clearInterval(e.timerId),e.timerId=null,e.isActive=!1}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState?n():o()}),{register:function(t,i){t&&i&&"function"==typeof i.fetchFn&&(e.has(t)&&a(t),e.set(t,{name:t,fetchFn:i.fetchFn,interval:i.interval||3e4,shouldPoll:i.shouldPoll||(()=>!0),matchId:i.matchId||null,timerId:null,isActive:!1,lastFetch:0}),window.LiveScoreApp.debugMode)},unregister:a,start:function(a){const i=e.get(a);!i||i.isActive||t||r(i)},stop:function(t){const a=e.get(t);a&&c(a)},startAll:function(a){if(t)return;let i=0;e.forEach(function(n){a&&n.matchId!==a||n.isActive||(setTimeout(function(){!t&&e.has(n.name)&&r(n)},2e3*i),i++)})},stopAll:i,pauseAll:n,resumeAll:o,cleanupForMatch:function(t){e.forEach(function(e,i){e.matchId===t&&a(i)})},cleanupAll:function(){i(),e.clear()},getRegisteredCount:function(){return e.size},getActiveCount:s,getStatus:function(){const a={};return e.forEach(function(e,t){a[t]={isActive:e.isActive,interval:e.interval,matchId:e.matchId,lastFetch:e.lastFetch?new Date(e.lastFetch).toISOString():null}}),{isPaused:t,registered:e.size,active:s(),pollers:a}}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.PlayerModuleLoader=function(){"use strict";var e=!1,t=!1,a=null,i="?v="+Date.now(),n=["/wp-content/plugins/v7/js/components/player-charts.js"+i,"/wp-content/plugins/v7/js/components/player-popup.js"+i];function o(){return t?Promise.resolve({PlayerCharts:window.LiveScoreApp.Components.PlayerCharts,PlayerPopup:window.LiveScoreApp.Components.PlayerPopup,cached:!0}):e?a:(e=!0,a=function(e){if(!e||0===e.length)return Promise.resolve();var t=0;return function a(){if(t>=e.length)return Promise.resolve();var i,n=e[t];return t++,(i=n,new Promise(function(e,t){var a=i.split("?")[0],n=document.querySelector('script[src^="'+a+'"]');n&&n.parentNode.removeChild(n);var o=document.createElement("script");o.src=i,o.type="text/javascript",o.async=!1,o.charset="utf-8";var s=setTimeout(function(){o.onerror=null,o.onload=null,t(new Error("Script load timeout: "+i))},15e3);o.onload=function(){clearTimeout(s),e()},o.onerror=function(){clearTimeout(s),t(new Error("Failed to load script: "+i))},document.head.appendChild(o)})).then(function(){return a()})}()}(n).then(function(){t=!0,e=!1;var a=window.LiveScoreApp.Components.PlayerCharts,i=window.LiveScoreApp.Components.PlayerPopup;return a&&i?{PlayerCharts:a,PlayerPopup:i,cached:!1}:Promise.reject(new Error("Modules loaded but undefined"))}).catch(function(t){return e=!1,Promise.reject(t)}))}return{load:function(e){o().then(function(t){e&&"function"==typeof e&&e(null,t)}).catch(function(t){e&&"function"==typeof e&&e(t,null)})},loadAsync:function(){return o()},isReady:function(){return t},version:"1.0.0"}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.LazySectionLoader=function(){"use strict";var e=!1,t=null,a=[{selector:".player-page",action:"render_player_lazy_sections",getParams:function(e){return{player_id:parseInt(e.dataset.playerId,10)||0,tournament_id:parseInt(e.dataset.tournamentId,10)||0,season_id:parseInt(e.dataset.seasonId,10)||0}},isValid:function(e){return e.player_id>0}},{selector:".team-page",action:"render_team_lazy_sections",getParams:function(e){return{team_id:parseInt(e.dataset.teamId,10)||0,tournament_id:parseInt(e.dataset.tournamentId,10)||0,season_id:parseInt(e.dataset.seasonId,10)||0}},isValid:function(e){return e.team_id>0}},{selector:".tournament-page",action:"render_tournament_lazy_sections",getParams:function(e){return{tournament_id:parseInt(e.dataset.tournamentId,10)||0,season_id:parseInt(e.dataset.seasonId,10)||0}},isValid:function(e){return e.tournament_id>0}}];function i(e,t){var a=e.querySelector(".lazy-skeleton");a&&(a.innerHTML=t,a.classList.remove("skeleton-shimmer")),e.removeAttribute("data-lazy-endpoint")}function n(e,t,a,n,s){if(0!==n.length){var r=Date.now(),c=window.LiveScoresAjax&&window.LiveScoresAjax.ajax_url||"/wp-admin/admin-ajax.php",l=new FormData;l.append("action",t),Object.keys(a).forEach(function(e){l.append(e,a[e])}),n.forEach(function(e){l.append("sections[]",e)});var d="undefined"!=typeof AbortController?new AbortController:null,u=d?setTimeout(function(){d.abort()},1e4):null;fetch(c,{method:"POST",body:l,signal:d?d.signal:void 0}).then(function(e){if(u&&clearTimeout(u),!e.ok)throw new Error("HTTP "+e.status);return e.json()}).then(function(c){c.success&&c.data?(n.forEach(function(t){var a=e.querySelector('[data-lazy-endpoint="'+t+'"]');if(a){var n=c.data[t];if(n&&n.length>0){var o=document.createElement("div");o.innerHTML=n;var s=o.firstElementChild;s&&a.parentNode.replaceChild(s,a)}else i(a,'<p class="no-data-message">Veri bulunamadı.</p>')}}),"function"==typeof window.__playerPageInitCharts&&setTimeout(window.__playerPageInitCharts,200),function(e){if(window.UserInteractionMonitor&&window.UserInteractionMonitor.getMetrics)try{var t=window.UserInteractionMonitor.getMetrics();t&&t.webVitals&&(t.webVitals.lazySectionLoad=Math.round(e))}catch(e){}}(Date.now()-r)):o(e,n,t,a,s)}).catch(function(i){o(e,n,t,a,s)})}}function o(e,t,a,o,s){s?t.forEach(function(t){var a=e.querySelector('[data-lazy-endpoint="'+t+'"]');a&&i(a,'<p class="no-data-message">Veri yüklenemedi.</p>')}):setTimeout(function(){var i=[];t.forEach(function(t){e.querySelector('[data-lazy-endpoint="'+t+'"]')&&i.push(t)}),i.length>0&&n(e,a,o,i,!0)},5e3)}function s(e,a,i,o){"undefined"!=typeof IntersectionObserver?(t=new IntersectionObserver(function(o){var s=[];o.forEach(function(e){if(e.isIntersecting){var a=e.target.dataset.lazyEndpoint;a&&s.push(a),t.unobserve(e.target)}}),s.length>0&&n(e,a,i,s,!1)},{rootMargin:"200px"}),o.forEach(function(a){var i=e.querySelector('[data-lazy-endpoint="'+a+'"]');i&&t.observe(i)})):setTimeout(function(){n(e,a,i,o,!1)},700)}function r(){if(!e)for(var t=0;t<a.length;t++){var o=a[t],r=document.querySelector(o.selector);if(r){var c=r.querySelectorAll("[data-lazy-endpoint]");if(0!==c.length){var l=o.getParams(r);if(o.isValid(l)){e=!0;var d={1:[],2:[],3:[]};return c.forEach(function(e){var t=parseInt(e.dataset.lazyPriority,10)||3;(t<1||t>3)&&(t=3),d[t].push(e.dataset.lazyEndpoint)}),d[1].length>0&&function(e){setTimeout(function(){n(r,o.action,l,e,!1)},300)}(d[1]),d[2].length>0&&function(e){setTimeout(function(){n(r,o.action,l,e,!1)},700)}(d[2]),void(d[3].length>0&&s(r,o.action,l,d[3]))}c.forEach(function(e){i(e,'<p class="no-data-message">Sayfa parametreleri eksik.</p>')})}}}}function c(){var e=document.querySelectorAll("[data-lazy-endpoint]");0!==e.length&&e.forEach(function(e){i(e,'<p class="no-data-message">Veri yüklenemedi. Lütfen sayfayı yenileyin.</p>')})}return"loading"===document.readyState?document.addEventListener("DOMContentLoaded",r):setTimeout(r,100),window.addEventListener("load",function(){setTimeout(c,15e3)}),{init:r}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Modules=window.LiveScoreApp.Modules||{},window.LiveScoreApp.Modules.UI=function(){const e=window.LiveScoreApp.Utils.jQuery,t=window.LiveScoreApp.Utils.Cache,a=window.LiveScoreApp.Utils.DomUtils,i=(window.LiveScoreApp.Utils.RequestQueue,window.LiveScoreApp.Config);let n=!1,o={pageLoadTime:0,interactionCount:0,lastUserInteraction:0,memoryUsage:[]},s=!1;function r(e){return e&&"object"==typeof e&&e.hasOwnProperty("success")&&void 0!==e.data?e.data:e}function c(e,t){let a,i,n;const o=`${String(t.getDate()).padStart(2,"0")}.${String(t.getMonth()+1).padStart(2,"0")}.${t.getFullYear()}`;"live"===e?(a=`Canlı Skor - ${o} Güncel Maç Bilgileri`,n=`Canlı Skor - ${o}`,i=`Bugünün (${o}) canlı skor bilgilerini öğrenin. Canlı skorlar ve detaylı maç bilgileri burada.`):"all"===e&&(a=`Tüm Maçlar - ${o} Tarihinde oynanacak maçların canlı skor ve istatistik verileri`,n=`Tüm Maçlar - ${o}`,i=`${o} tarihinde oynanacak tüm maçların bilgilerini görün. Skorlar ve analizler burada.`),document.title=a;const s=document.getElementById("live-scores-page-title");s&&(s.textContent=n);let r=null;if(r=document.querySelector("h1.entry-title.td-page-title span"),r||(r=document.querySelector("h1.entry-title span")),!r){const e=document.querySelector("h1.entry-title");e&&(r=e.querySelector("span"))}if(r||(r=document.querySelector("h1.td-page-title span")),!r){const e=document.querySelector("h1.entry-title");e&&!e.querySelector("span")&&(r=e)}if(!r){const e=document.querySelectorAll("h1");for(let t of e)if(t.textContent.includes("Canlı")||t.textContent.includes("Tüm")||t.classList.toString().includes("page-title")||t.classList.toString().includes("entry-title")){const e=t.querySelector("span");if(e){r=e;break}r=t;break}}if(r)if("SPAN"===r.tagName)r.textContent=n;else if("H1"===r.tagName){const e=r.querySelector("span");e?e.textContent=n:r.textContent=n}const c=document.querySelector("meta[name='description']");if(c)c.setAttribute("content",i);else{const e=document.createElement("meta");e.setAttribute("name","description"),e.setAttribute("content",i),document.head.appendChild(e)}}function l(e=[]){if(!t)return;const a=e.map(e=>t.CACHE_PREFIX[e]?t.CACHE_PREFIX[e]:e);if(Object.values(t.CACHE_PREFIX).filter(e=>!a.includes(e)).forEach(e=>{t.clearCacheByType(e)}),window.gc)try{window.gc()}catch(e){}}function d(e){return window.LiveScoreApp&&window.LiveScoreApp[e]?window.LiveScoreApp[e]:null}function u(e){const t=d("LiveScores");if(!t)return;const a=d("Modules")&&d("Modules").MetaTags;e&&e instanceof Date&&!isNaN(e.getTime())||(e=new Date);try{a&&"function"==typeof a.updateMetaTags?a.updateMetaTags(t.getCurrentTab(),e):c(t.getCurrentTab(),e)}catch(t){const a=e.getDate().toString().padStart(2,"0"),i=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getFullYear();document.title=`Tüm Maçlar - ${a}/${i}/${n} Tarihli Maçlar`}f(t.getCurrentTab(),e)}function p(e){const t=d("LiveScores");if(!t)return;t.getCurrentTab()!==e&&(t.setCurrentTab(e),"live"===e&&window.LiveScoreApp.hasHistoricalDataLoaded&&(window.LiveScoreApp.hasHistoricalDataLoaded=!1));const a=d("Modules")&&d("Modules").MetaTags;let i=new Date;if("all"===e){const e=document.getElementById("date-picker");e&&e._flatpickr&&e._flatpickr.selectedDates.length&&(i=e._flatpickr.selectedDates[0])}a&&"function"==typeof a.updateMetaTags?a.updateMetaTags(e,i):c(e,i),f(e,i)}function m(){t&&"function"==typeof t.cleanupCache&&window.requestAnimationFrame(function(){t.cleanupCache()})}function h(a,n){const o=a;if(t.getFromCacheByType(o,t.CACHE_PREFIX.STATISTIC))return e.$(".statistics-tab").show(),void(n&&"function"==typeof n&&n(!0));var s,c;(s="get_match_statistics",c={match_id:a},window.QueuedAjax&&"function"==typeof window.QueuedAjax.request?window.QueuedAjax.request(s,c).then(r):new Promise(function(e,t){jQuery.ajax({url:LiveScoresAjax.ajax_url,method:"POST",data:Object.assign({action:s,nonce:LiveScoresAjax.nonce},c),success:function(t){e(r(t))},error:function(e,a,i){t(new Error(i||a||"AJAX error"))}})})).then(function(a){const s=a&&a.statistics&&Array.isArray(a.statistics)&&a.statistics.length>0;if(s){if(JSON.stringify(a).length/1024>500&&i.optimizationSettings.compressLargeData){const e=d("Components")&&d("Components").Statistics;e&&"function"==typeof e.compressStatisticsData&&(a=e.compressStatisticsData(a))}const e=window.LiveScoreApp.Constants.getCacheTTL("STATISTICS","live");t.setToCacheByType(o,a,e,t.CACHE_PREFIX.STATISTIC)}e.$(".statistics-tab").toggle(s),n&&"function"==typeof n&&n(s)}).catch(function(e){n&&"function"==typeof n&&n(!1)})}function v(){if(n)return;n=!0,o.pageLoadTime=window.performance&&window.performance.timing?window.performance.timing.domContentLoadedEventEnd-window.performance.timing.navigationStart:0;const e=window.LiveScoreApp.Utils.TimerManager;e?e.setInterval(function(){const e=w();window.LiveScoreApp.debugMode,t&&"function"==typeof t.getCacheStats&&(e.cacheStats=t.getCacheStats()),window.performance&&window.performance.memory&&(e.memoryUsage.push({timestamp:Date.now(),usedJSHeapSize:window.performance.memory.usedJSHeapSize/1048576,totalJSHeapSize:window.performance.memory.totalJSHeapSize/1048576}),e.memoryUsage.length>10&&e.memoryUsage.shift())},36e5,"ui-performance-monitoring"):setInterval(function(){const e=w();window.LiveScoreApp.debugMode,t&&"function"==typeof t.getCacheStats&&(e.cacheStats=t.getCacheStats()),window.performance&&window.performance.memory&&(e.memoryUsage.push({timestamp:Date.now(),usedJSHeapSize:window.performance.memory.usedJSHeapSize/1048576,totalJSHeapSize:window.performance.memory.totalJSHeapSize/1048576}),e.memoryUsage.length>10&&e.memoryUsage.shift())},36e5)}function y(e,t){if(n)switch(e){case"userInteraction":o.interactionCount++,o.lastUserInteraction=Date.now(),o.lastInteractionType=t;break;case"dataLoaded":o.dataLoadEvents||(o.dataLoadEvents=[]),o.dataLoadEvents.push({type:t,timestamp:Date.now()}),o.dataLoadEvents.length>10&&o.dataLoadEvents.shift();break;default:o.customMetrics||(o.customMetrics={}),o.customMetrics[e]=t}}function w(){return Object.assign({},o)}function f(e,t){if("all"===e){const e=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),i=t.getFullYear(),n=`${window.location.origin}/canli-skor/${e}/${a}/${i}/`;window.history.pushState({day:e,month:a,year:i,type:"all"},"",n)}else{const e=`${window.location.origin}/canli-skor`;window.history.pushState({type:"live"},"",e)}}return{setupEventListeners:function t(){const n=document.getElementById("all-matches"),o=document.getElementById("live-matches");n&&o?(window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.EventUtils&&"function"==typeof window.LiveScoreApp.Utils.EventUtils.setupMainAppEventListeners?window.LiveScoreApp.Utils.EventUtils.setupMainAppEventListeners({clearCacheSmart:l,onTabChange:p,onDateChange:u,updatePerformanceMetric:y}):function(){if(!s){if(e.$("#all-matches").off("click.ui-classic"),e.$("#live-matches").off("click.ui-classic"),e.$("#date-picker").off("change.ui-classic"),e.$("#all-matches").on("click.ui-classic",function(){e.$("#all-matches").addClass("active"),e.$("#live-matches").removeClass("active"),e.$(".switch-menu").removeClass("indicator-right"),e.$(".date-picker-container").addClass("visible"),e.$("#quick-date-bar").addClass("visible");const t=d("LiveScores");if(!t)return;t.setIsAllMatchesSelected(!0);const a=e.$("#date-picker").val().split("/");t.setIsSwitchingTab(!0),t.fetchLiveScores(a[0],a[1],a[2],"all"),e.$("#match-details").hide(),l(["STANDING","JERSEY"]),p("all"),y("userInteraction","all-matches-click")}),e.$("#live-matches").on("click.ui-classic",function(){e.$("#live-matches").addClass("active"),e.$("#all-matches").removeClass("active"),e.$(".switch-menu").addClass("indicator-right"),e.$(".date-picker-container").removeClass("visible"),e.$("#quick-date-bar").removeClass("visible"),"function"==typeof window.resetLeagueFilter&&window.resetLeagueFilter();const t=d("LiveScores");t&&(t.setIsAllMatchesSelected(!1),t.setIsSwitchingTab(!0),t.fetchLiveScores(null,null,null,"live"),e.$("#match-details").hide(),l(["STANDING","JERSEY"]),p("live"),y("userInteraction","live-matches-click"))}),"function"==typeof flatpickr)try{flatpickr("#date-picker",{dateFormat:"d/m/Y",defaultDate:"today",locale:flatpickr.l10ns.tr,onChange:function(t,a,i){if(!t||!t.length)return;var n=document.getElementById("quick-date-bar");n&&n.querySelectorAll(".qd-pill").forEach(function(e){e.getAttribute("data-date")===a?e.classList.add("qd-active"):e.classList.remove("qd-active")});if(!(t[0]instanceof Date)||isNaN(t[0].getTime()))return void(document.title="Tüm Maçlar - Tarih Yükleniyor...");const o=a.split("/"),s=d("LiveScores");if(!s)return;const r=d("Modules")&&d("Modules").MetaTags;if(document.title="Maçlar Yükleniyor... - Canlı Skor",r&&"function"==typeof r.updateMetaTags)try{r.updateMetaTags("all",t[0])}catch(e){document.title=`Tüm Maçlar - ${o[0]}/${o[1]}/${o[2]}`}s.setIsSwitchingTab(!0);const c=s.fetchLiveScores(o[0],o[1],o[2],"all");let p=`Tüm Maçlar - ${o[0]}/${o[1]}/${o[2]} Tarihi`;(function(){if("Maçlar Yükleniyor... - Canlı Skor"===document.title||"undefined"===document.title||document.title.includes("undefined")||""===document.title)if(r&&"function"==typeof r.updateMetaTags)try{r.updateMetaTags("all",t[0])}catch(e){document.title=p}else document.title=p})(),c.then(()=>{("Maçlar Yükleniyor... - Canlı Skor"===document.title||"undefined"===document.title||document.title.includes("undefined"))&&r&&"function"==typeof r.updateMetaTags&&r.updateMetaTags("all",t[0]),y("dataLoaded","date-change")}).catch(t=>{e.$("#live-scores").html("<p>Veriler yüklenirken bir hata oluştu. Lütfen tekrar deneyin.</p>"),("Maçlar Yükleniyor... - Canlı Skor"===document.title||"undefined"===document.title||document.title.includes("undefined"))&&(r&&"function"==typeof r.updateMetaTags?r.updateMetaTags("all",new Date):document.title="Tüm Maçlar - Canlı Skor ve İstatistik Verileri")}),window.LiveScoreApp.hasHistoricalDataLoaded&&(window.LiveScoreApp.hasHistoricalDataLoaded=!1),u(t[0]),l(["LIVESCORE"])}})}catch(t){e.$("#date-picker").attr("type","date")}else e.$("#date-picker").attr("type","date");s=!0}}(),a&&"function"==typeof a.setupDomEventListeners&&a.setupDomEventListeners(),function(){var e=document.getElementById("quick-date-bar");if(e&&!(e.children.length>0)){var t=["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],a=new Date;a.setHours(0,0,0,0);for(var i=-3;i<=3;i++){var n=new Date(a);n.setDate(n.getDate()+i);var o=document.createElement("button");o.type="button",o.className="qd-pill"+(0===i?" qd-active":""),o.setAttribute("data-date",r(n.getDate())+"/"+r(n.getMonth()+1)+"/"+n.getFullYear());var s;s=-1===i?"Dün":0===i?"Bugün":1===i?"Yarın":n.getDate()+" "+["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"][n.getMonth()],o.innerHTML=s+'<span class="qd-day">'+t[n.getDay()]+"</span>",e.appendChild(o)}e.addEventListener("click",function(t){var a=t.target.closest(".qd-pill");if(a){e.querySelectorAll(".qd-pill").forEach(function(e){e.classList.remove("qd-active")}),a.classList.add("qd-active");var i=a.getAttribute("data-date").split("/"),n=document.getElementById("date-picker");n&&n._flatpickr&&n._flatpickr.setDate(new Date(parseInt(i[2]),parseInt(i[1])-1,parseInt(i[0])),!0)}})}function r(e){return e<10?"0"+e:""+e}}(),function(){const t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches,a=localStorage.getItem("theme");("dark"===a||!a&&t)&&document.body.classList.add("dark-mode"),e.$(".theme-toggle").on("click",function(){document.body.classList.toggle("dark-mode");const e=document.body.classList.contains("dark-mode")?"dark":"light";localStorage.setItem("theme",e)})}(),i&&i.optimizationSettings&&i.optimizationSettings.logPerformanceStats&&v()):setTimeout(t,500)},cleanupClassicEventListeners:function(){s&&(e.$("#all-matches").off("click.ui-classic"),e.$("#live-matches").off("click.ui-classic"),e.$("#date-picker").off("change.ui-classic"),s=!1)},addTournamentFlag:function(e){a.addTournamentFlag(e)},attachMatchClickEvents:function(){a.attachMatchClickEvents({updatePerformanceMetric:y,checkAndFetchStatistics:h,cleanupOnScroll:m})},onTabChange:p,onDateChange:u,checkAndFetchStatistics:h,enablePerformanceMonitoring:v,getPerformanceStats:w,updateBrowserURL:f}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Modules=window.LiveScoreApp.Modules||{},window.LiveScoreApp.Modules.ScoreUpdater=function(){const e=window.LiveScoreApp.Config,t=window.LiveScoreApp.Utils.jQuery,a=window.LiveScoreApp.Utils.Translator,i=new Map,n=new Map,o=new Map,s=new Map,r=new Map,c=new Map,l=new Map,d=new Map;let u=null;function p(e,a,i){const n=(u&&u.length||(u=t.$("#score-aria-live"),u.length||(u=t.$('<div id="score-aria-live" aria-live="polite" aria-atomic="true" class="sr-only" style="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;"></div>'),t.$("body").append(u))),u),o="home"===a?i.find(".live-scores-team.home .live-scores-name").text().trim():i.find(".live-scores-team.away .live-scores-name").text().trim(),s=i.find(".live-scores-team.home .live-scores-score").text().trim(),r=i.find(".live-scores-team.away .live-scores-score").text().trim(),c="goal"===e?`Gol! ${o}. Skor: ${s} - ${r}`:`Gol iptal! ${o}. Skor: ${s} - ${r}`;n.text(c)}function m(e){if(n.has(e)){const t=n.get(e);for(const[e,a]of t)clearTimeout(a);n.delete(e)}}function h(e=6e5){const t=Date.now();let a=0;for(const[n,s]of i)t-s.lastUpdate>e&&(i.delete(n),m(n),o.has(n)&&o.delete(n),a++);if(i.size>400){const e=Array.from(i.entries()).sort((e,t)=>e[1].lastUpdate-t[1].lastUpdate),t=i.size-340;e.slice(0,t).forEach(([e])=>{i.delete(e),m(e),o.has(e)&&o.delete(e),a++})}for(const[i,n]of o)if(t-n.lastUpdate>e){o.delete(i);const e="home-"+i,t="away-"+i;s.has(e)&&s.delete(e),s.has(t)&&s.delete(t),a++}if(o.size>300){const e=Array.from(o.entries()).sort((e,t)=>e[1].lastUpdate-t[1].lastUpdate),t=o.size-255;e.slice(0,t).forEach(([e])=>{o.delete(e),a++})}for(const[i,n]of r)t-n>e&&(r.delete(i),a++);if(r.size>200){const e=Array.from(r.entries()).sort((e,t)=>e[1]-t[1]),t=r.size-170;e.slice(0,t).forEach(([e])=>{r.delete(e),a++})}for(const[e,t]of l)window.LiveScoreApp.LiveMatches.has(e)||(l.delete(e),a++);if(l.size>400){for(const[e]of l)window.LiveScoreApp.LiveMatches.has(e)||(l.delete(e),a++);if(l.size>400){const e=Array.from(l.keys()),t=l.size-340;for(let i=0;i<t&&e.length>0;i++){const t=Math.floor(Math.random()*e.length),i=e.splice(t,1)[0];l.delete(i),a++}}}for(const[i,n]of c)n.timestamp&&t-n.timestamp>e&&(c.delete(i),a++);for(const[i,n]of s)t-n>e&&(s.delete(i),a++);return a>10&&window.LiveScoreApp.debugMode,a}function v(e,t){return e.text().trim()!==t&&(e.text(t),!0)}function y(t,a,i,o){o||(o=t.hasClass("home")?"home":"away"),n.has(i)||n.set(i,new Map);const s=n.get(i);if(s.has(o)){if((t.hasClass("flash-goal")?"goal":t.hasClass("flash-cancel")?"cancel":null)===a)return;clearTimeout(s.get(o)),t.removeClass("flash-goal flash-cancel")}t[0].offsetWidth,t.addClass(`flash-${a}`);const c=setTimeout(()=>{if(t.removeClass(`flash-${a}`),n.has(i)){const e=n.get(i);e.delete(o),0===e.size&&n.delete(i)}},e.animationDurations.scoreFlash);s.set(o,c),r.set(o,Date.now())}function w(e){const t=e.data("match-id");if(!t)return;const a=window.LiveScoreApp.LiveMatches.get(t.toString());if(a&&a.homeScore&&a.awayScore&&(void 0!==a.homeScore.aggregated||void 0!==a.awayScore.aggregated||a.previousLegEventId)){let i=0;if(window.LiveScoreApp.Utils.calculateAggregatedWinner)i=window.LiveScoreApp.Utils.calculateAggregatedWinner(a);else{const e=void 0!==a.homeScore.aggregated?a.homeScore.aggregated:0,t=void 0!==a.awayScore.aggregated?a.awayScore.aggregated:0;e>t?i=1:t>e?i=2:void 0!==a.homeScore.penalties&&void 0!==a.awayScore.penalties&&(a.homeScore.penalties>a.awayScore.penalties?i=1:a.awayScore.penalties>a.homeScore.penalties&&(i=2))}e.attr("data-aggregated-winner-code",i),a.aggregatedWinnerCode=i,window.LiveScoreApp.LiveMatches.set(t.toString(),a),e.find(".qualified-icon").remove(),1===i?e.find(".live-scores-team.home .live-scores-name").append('<i class="fas fa-arrow-up qualified-icon" title="Tur Atlayan Takım"></i>'):2===i&&e.find(".live-scores-team.away .live-scores-name").append('<i class="fas fa-arrow-up qualified-icon" title="Tur Atlayan Takım"></i>')}}return{updateMatchStatus:function(t){window.LiveScoreApp.Utils.calculateAggregatedWinner;const a=t.data("status"),u=t.data("match-id");if(!u)return;const m=t.find(".live-scores-minute, .minute"),f=function(e){return l.get(e)||null}(u)||a;if(f!==a&&function(e,t){l.set(e,t)}(u,a),"notstarted"===a)t.find(".live-scores-team .live-scores-score").addClass("hidden"),v(m,"Başlamadı");else if("finished"===a)v(m,"Bitti");else if("postponed"===a)t.find(".live-scores-team .live-scores-score").addClass("hidden"),v(m,"Ertelendi");else if("delayed"===a)t.find(".live-scores-team .live-scores-score").addClass("hidden"),v(m,"Gecikme");else if("canceled"===a)t.find(".live-scores-team .live-scores-score").addClass("hidden"),v(m,"İptal");else{const e=window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.MinuteCalculator;if(e){const a=m.html()||"",i=e.getFormattedMinute(t),n=t.data("match-id"),o=a.replace(/\s+/g," ").trim(),s=i.replace(/\s+/g," ").trim(),r=d.get(n)||"";o!==s&&s!==r&&(m.addClass("updating"),setTimeout(()=>{m.html(i),m.removeClass("updating")},75),d.set(n,s))}else{let e=m.text().replace("'",""),a=parseInt(e);if(isNaN(a))""===e.trim()&&""!==(m.html()||"")&&m.html("");else{const e=t.data("status-description")||"";let i=null;switch(e){case"Halftime":i="İY";break;case"Extra time halftime":i="UZT İY";break;case"1nd extra":case"2nd extra":const t="1nd extra"===e?"UZ1":"UZ2";i=a>105&&"UZ1"===t?t+" 105+'":a>120&&"UZ2"===t?t+" 120+'":t+" "+a+"'";break;case"Penalties":i="Pen";break;default:i="1st half"===e&&a>45?"45+'":"2nd half"===e&&a>90?"90+'":a+"'"}i&&m.html(i)}}}const g=t.find(".live-scores-team.home .live-scores-score"),S=t.find(".live-scores-team.away .live-scores-score");function A(e){const t=parseInt(e.trim(),10);return isNaN(t)?null:t}const L=A(g.text()),b=A(S.text());if(!i.has(u))return void i.set(u,{home:L,away:b,lastUpdate:Date.now()});const C=i.get(u),x=C.home,k=C.away,T=Date.now()-C.lastUpdate>3e5;function M(){i.set(u,{home:null!==L?L:C.home,away:null!==b?b:C.away,lastUpdate:Date.now()})}o.has(u)||o.set(u,{homeLast:[],awayLast:[],lastUpdate:Date.now()});const E=o.get(u);if(Date.now()-E.lastUpdate>3e5&&(E.homeLast=[],E.awayLast=[]),null!==L&&(E.homeLast.push(L),E.homeLast.length>3&&E.homeLast.shift()),null!==b&&(E.awayLast.push(b),E.awayLast.length>3&&E.awayLast.shift()),E.lastUpdate=Date.now(),o.set(u,E),!T&&null!==L&&L!==x){const e=E.homeLast;if(e.length>0&&e[e.length-1]===L)M();else{M();const a=L-x;if(Math.abs(a)>2)return;let i=L>x;if(!i&&e.length>1){const t=x-L,a=Date.now(),o="home-"+u;if(e.length>=2&&e[e.length-1]<e[e.length-2]){const e=n.get(u);e&&e.has(o)&&(g.hasClass("flash-goal")||a-(r.get(o)||0)<5e3)?i=!0:s.set(o,a)}else t>1?i=!0:s.has(o)?(s.get(o),i=!0):i=!0}y(g,i?"goal":"cancel",u,"home"),p(i?"goal":"cancel","home",t)}}if(!T&&null!==b&&b!==k){const e=E.awayLast;if(e.length>0&&e[e.length-1]===b)L!==x&&null!==L||M();else{L!==x&&null!==L||M();const a=b-k;if(Math.abs(a)>2)return;let i=b>k;if(!i&&e.length>1){const t=k-b,a=Date.now(),o="away-"+u;if(e.length>=2&&e[e.length-1]<e[e.length-2]){const e=n.get(u);e&&e.has(o)&&(S.hasClass("flash-goal")||a-(r.get(o)||0)<5e3)?i=!0:s.set(o,a)}else t>1?i=!0:s.has(o)?(s.get(o),i=!0):i=!0}y(S,i?"goal":"cancel",u,"away"),p(i?"goal":"cancel","away",t)}}if(L!==x&&null!==L||b!==k&&null!==b||M(),w(t),Math.random()<.2){const t=e.optimizationSettings._dynamicInfo;h(t?Math.floor(18e4*t.appliedRetentionSpeed):12e4)}if(window.scoreUpdateCounter||(window.scoreUpdateCounter=0),window.scoreUpdateCounter++,window.scoreUpdateCounter%30==0){const t=e.optimizationSettings._dynamicInfo;h(t?Math.floor(12e4*t.appliedRetentionSpeed):9e4),window.scoreUpdateCounter=0;const a=Date.now(),i=t?Math.floor(3e5*t.appliedRetentionSpeed):24e4;for(const[e,t]of s)a-t>i&&s.delete(e)}i.size+o.size+r.size+l.size+c.size+s.size>1500&&(h(12e4),i.size,o.size,r.size,l.size,c.size,s.size)},flashScoreCard:y,getMatchData:function(e){return{homeTeamName:a.translateName("teams",e.find(".live-scores-team.home .live-scores-name").text()),homeTeamCountry:e.find(".live-scores-team.home .live-scores-team-country").text(),awayTeamName:a.translateName("teams",e.find(".live-scores-team.away .live-scores-name").text()),awayTeamCountry:e.find(".live-scores-team.away .live-scores-team-country").text(),homeTeamScore:e.find(".live-scores-team.home .live-scores-score").text(),awayTeamScore:e.find(".live-scores-team.away .live-scores-score").text(),matchTime:e.find(".live-scores-minute").text(),matchStatus:e.data("status"),homeTeamLogo:e.find(".live-scores-team.home .team-logo").attr("src"),awayTeamLogo:e.find(".live-scores-team.away .team-logo").attr("src"),homeRedCards:e.data("home-red-cards")||0,awayRedCards:e.data("away-red-cards")||0}},cleanupStaleScores:h,clearMatchAnimations:m,updateQualifiedTeam:w,_clearFormattedMinuteCache:function(e){d.has(e)&&d.delete(e)},emergencyCleanup:function(){const e=i.size,t=n.size,a=o.size,d=s.size,u=r.size,p=l.size;return i.clear(),n.clear(),o.clear(),s.clear(),r.clear(),l.clear(),c.clear(),{globalScores:e,animations:t,history:a,alerts:d,animationTimes:u,statusTracker:p}},getMapSizes:function(){return{globalScores:i.size,matchAnimations:n.size,scoreHistory:o.size,lastCancelAlert:s.size,lastAnimationTime:r.size,matchStatusTracker:l.size,animationQueue:c.size,total:i.size+n.size+o.size+s.size+r.size+l.size+c.size}}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Modules=window.LiveScoreApp.Modules||{},window.LiveScoreApp.Modules.MetaTags=function(){function e(e){try{e&&"string"==typeof e&&"undefined"!==e&&!e.includes("undefined")||(e="Canlı Skor"),window.tdLocalCache||(window.tdLocalCache={}),window.tdLocalCache.data||(window.tdLocalCache.data={}),window.tdLocalCache.data.page_title=e,window.td_data||(window.td_data={}),window.td_data.page_title=e,window.tdLocalCache&&window.tdLocalCache.data&&!window.tdLocalCache.data.td_data&&(window.tdLocalCache.data.td_data={}),window.tdLocalCache&&window.tdLocalCache.data&&window.tdLocalCache.data.td_data&&(window.tdLocalCache.data.td_data.page_title=e),document.title=e,("undefined"===document.title||document.title.includes("undefined"))&&(document.title=e)}catch(e){document.title="Canlı Skor"}}function t(e,t){const a=String(t.getDate()).padStart(2,"0"),i=String(t.getMonth()+1).padStart(2,"0"),n=t.getFullYear();let o;"live"===e?o=window.location.origin+"/canli-skor":"all"===e&&(o=`${window.location.origin}/canli-skor/${a}/${i}/${n}/`);let s=document.querySelector("link[rel='canonical']");s?s.setAttribute("href",o):(s=document.createElement("link"),s.setAttribute("rel","canonical"),s.setAttribute("href",o),document.head.appendChild(s))}return{updateMetaTags:function(a,i){try{if(!(i instanceof Date)||isNaN(i.getTime())){const i=new Date,n=String(i.getDate()).padStart(2,"0"),o=`${n}.${String(i.getMonth()+1).padStart(2,"0")}.${i.getFullYear()}`;document.title="live"===a?`Canlı Skor - ${o} Güncel Maç Bilgileri`:"all"===a?`Tüm Maçlar - ${o} Tarihinde oynanacak maçların canlı skor ve istatistik verileri`:"Canlı Skor - Futbol Maçları";const s="live"===a?`Bugünün (${o}) canlı skor bilgilerini öğrenin. Canlı skorlar ve detaylı maç bilgileri burada.`:`${o} tarihinde oynanacak tüm maçların bilgilerini görün. Skorlar ve analizler burada.`,r=document.querySelector("meta[name='description']");if(r)r.setAttribute("content",s);else{const e=document.createElement("meta");e.setAttribute("name","description"),e.setAttribute("content",s),document.head.appendChild(e)}return t(a,i),void e(document.title)}const n=String(i.getDate()).padStart(2,"0"),o=`${n}.${String(i.getMonth()+1).padStart(2,"0")}.${i.getFullYear()}`;let s,r;"live"===a?(s=`Canlı Skor - ${o} Güncel Maç Bilgileri`,r=`Bugünün (${o}) canlı skor bilgilerini öğrenin. Canlı skorlar ve detaylı maç bilgileri burada.`):"all"===a?(s=`Tüm Maçlar - ${o} Tarihinde oynanacak maçların canlı skor ve istatistik verileri`,r=`${o} tarihinde oynanacak tüm maçların bilgilerini görün. Skorlar ve analizler burada.`):(s=`Canlı Skor - ${o} Futbol Maçları`,r=`${o} tarihli futbol maçları ve canlı skor bilgileri.`),document.title=s,document.title&&"undefined"!==document.title&&!document.title.includes("undefined")||(document.title=s);const c=document.querySelector("meta[name='description']");if(c)c.setAttribute("content",r);else{const e=document.createElement("meta");e.setAttribute("name","description"),e.setAttribute("content",r),document.head.appendChild(e)}t(a,i),function(e,t){try{let a=e;"live"===t?a=e.split(" Güncel")[0]:"all"===t&&(a=e.split(" Tarihinde")[0]);const i=document.getElementById("live-scores-page-title");i&&(i.textContent=a);let n=null;if(n=document.querySelector("h1.entry-title.td-page-title span"),n||(n=document.querySelector("h1.entry-title span")),!n){const e=document.querySelector("h1.entry-title");e&&(n=e.querySelector("span"))}if(n||(n=document.querySelector("h1.td-page-title span")),!n){const e=document.querySelector("h1.entry-title");e&&!e.querySelector("span")&&(n=e)}if(!n){const e=document.querySelectorAll("h1");for(let t of e)if(t.textContent.includes("Canlı")||t.textContent.includes("Tüm")||t.classList.toString().includes("page-title")||t.classList.toString().includes("entry-title")){n=t.querySelector("span")||t;break}}if(n)if("SPAN"===n.tagName)n.textContent=a;else if("H1"===n.tagName){const e=n.querySelector("span");e?e.textContent=a:n.textContent=a}}catch(e){}}(s,a),e(s)}catch(t){const i=new Date,n=`${String(i.getDate()).padStart(2,"0")}.${String(i.getMonth()+1).padStart(2,"0")}.${i.getFullYear()}`,o="live"===a?`Canlı Skor - ${n}`:`Tüm Maçlar - ${n}`;document.title=o,e(o)}},updateCanonicalURL:t,updateMetaDescriptionForIncidents:function(e,t){if(!e||0===e.length||!t)return;const a=e.slice(0,3).map(function(e){const t="goal"===e.type?"⚽":"🟨";return e.minute+"' "+t+" "+(e.player||"Oyuncu")}).join(" • "),i=((t.homeTeam||"Ev Sahibi")+" vs "+(t.awayTeam||"Misafir")+" - "+a+" - Canlı maç detayları ve istatistikleri...").substring(0,160);let n=document.querySelector('meta[name="description"]');n?n.setAttribute("content",i):(n=document.createElement("meta"),n.setAttribute("name","description"),n.setAttribute("content",i),document.head.appendChild(n))}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Modules=window.LiveScoreApp.Modules||{},window.LiveScoreApp.Modules.SEO=function(){const e=window.LiveScoreApp.Utils.jQuery;function t(e){return e&&"object"==typeof e&&e.hasOwnProperty("success")&&void 0!==e.data?e.data:e}function a(){var a,n;(a="get_super_lig_next_matches",n={},window.QueuedAjax&&"function"==typeof window.QueuedAjax.request?window.QueuedAjax.request(a,n).then(t):new Promise(function(e,i){jQuery.ajax({url:LiveScoresAjax.ajax_url,method:"POST",data:Object.assign({action:a,nonce:LiveScoresAjax.nonce},n),success:function(a){e(t(a))},error:function(e,t,a){i(new Error(a||t||"AJAX error"))}})})).then(function(t){if(t&&t.events&&t.events.length>0){const e=t.events[0].roundInfo.round,a=t.events.filter(t=>t.roundInfo.round===e);localStorage.setItem("nextWeekMatches",JSON.stringify(a)),localStorage.setItem("nextWeekMatchesTime",Date.now().toString()),i(a)}else e.$("#next-week-matches").append("<p>Önümüzdeki haftanın maçları bulunamadı.</p>")}).catch(function(){e.$("#next-week-matches").append("<p>Sunucuya erişim sırasında bir hata oluştu. Lütfen daha sonra tekrar deneyin.</p>")})}function i(t){let a="<ul>";t.forEach(e=>{const t=new Date(1e3*e.startTimestamp),i=t.toLocaleDateString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric"}),n=t.toLocaleDateString("tr-TR",{weekday:"long"}),o=t.getHours().toString().padStart(2,"0")+":"+t.getMinutes().toString().padStart(2,"0");a+=`<li>${e.homeTeam.name} vs ${e.awayTeam.name} - ${i} ${n} ${o}</li>`}),a+="</ul>",e.$("#next-week-matches").append(a)}return{appendSeoText:function(){e.$("#live-scores").append('\n            <div id="seo-text" style="color: #6c757d; font-size: 14px; margin-top: 20px;">\n                <h2><strong>Canlı Skor</strong> ve Güncel Futbol Maç Sonuçları</h2>\n                <p>\n                    Futbol tutkunları için <strong>canlı skor</strong> takibi vazgeçilmezdir. Sitemizde, Türkiye Süper Lig başta olmak üzere Premier Lig, La Liga, Serie A ve Bundesliga gibi \n                    en popüler futbol liglerinin <strong>canlı skor</strong>larını anında takip edebilirsiniz. Güncel maç sonuçları, anlık skorlar ve takımların son durumları hakkında \n                    en doğru bilgileri buradan alabilirsiniz.\n                </p>\n                <p>\n                    <strong>Canlı skor</strong> servisimizi kullanarak maçların her anında yaşanan gelişmeleri öğrenebilir, gol bilgileri, kartlar ve oyuncu değişiklikleri gibi tüm olayları anlık olarak görebilirsiniz. Sitemizdeki <em>canlı skor</em> servisi, maçların başlamasından itibaren sürekli güncellenir ve sizlere en doğru sonuçları sunar.\n                </p>\n                <h3><strong>Gelecek hafta oynanacak süper lig maçları</strong> ve maç saatleri</h3>\n                <div id="next-week-matches"></div>\n                <p>\n                    Yalnızca oynananacak maçlar değil, <strong>canlı skor ve canlı istatistik</strong> bilgileri de futbol severler için önemlidir. Hangi takımların karşılaşacağını, maç tarihlerini ve saatlerini sitemizden öğrenerek bir sonraki hafta için hazırlıklı olabilirsiniz. <em>Gelecek hafta maçları</em> ile ilgili güncel bilgilere ve analizlere buradan ulaşabilirsiniz.\n                </p>\n                <p>\n                    Ayrıca, her takımın <em>maç kadroları</em> ve dizilişleri hakkında detaylı bilgilere de sitemizde ulaşabilirsiniz. Hangi oyuncuların sahada olacağını, sakat veya cezalı oyuncu durumlarını burada bulabilirsiniz.\n                </p>\n                <h3><strong>Canlı Skor</strong> ve Anlık Maç İstatistikleri</h3>\n                <p>\n                    <strong>Canlı skor</strong> servisi ile dünya futbolunu yakından takip edin. Özellikle <em>canlı maç sonuçları</em>, gol bilgileri ve maç içi istatistiklerle birlikte maçın tüm detaylarına sitemizden erişebilirsiniz. \n                    Maçları kaçırmamak için <strong>anlık skorlar</strong> ve maç takibi servisimize göz atmayı unutmayın. Her hafta, tüm futbol liglerinin en güncel bilgilerini buradan öğrenebilirsiniz.\n                </p>\n                <p>\n                    Futbolun heyecanını canlı tutmak için en önemli unsurlardan biri <strong>canlı skor</strong> takibidir. Hangi takımın öne geçtiğini, hangi oyuncunun gol attığını ve maçın gidişatını anbean öğrenmek istiyorsanız doğru yerdesiniz.\n                </p>\n            </div>');var t=localStorage.getItem("nextWeekMatches"),n=localStorage.getItem("nextWeekMatchesTime");t&&n&&Date.now()-parseInt(n,10)<1728e5?i(JSON.parse(t)):a()},fetchSuperLigNextWeekMatches:a,displayMatchesInSeoText:i}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Modules=window.LiveScoreApp.Modules||{},window.LiveScoreApp.Modules.MatchDetailsTabs=function(){const e=window.LiveScoreApp.Utils.jQuery,t=(window.LiveScoreApp.Utils.RequestQueue,window.LiveScoreApp.Utils.Cache),a=(window.LiveScoreApp.Config,window.LiveScoreApp.Components||{});window.LiveScoreApp.Modules.MatchDetailsData;let i=null,n=null,o=null;function s(e,t){return window.QueuedAjax&&"function"==typeof window.QueuedAjax.request?window.QueuedAjax.request(e,t).then(r):new Promise(function(a,i){jQuery.ajax({url:LiveScoresAjax.ajax_url,method:"POST",data:Object.assign({action:e,nonce:LiveScoresAjax.nonce},t),success:function(e){a(r(e))},error:function(e,t,a){i(new Error(a||t||"AJAX error"))}})})}function r(e){return e&&"object"==typeof e&&e.hasOwnProperty("success")&&void 0!==e.data?e.data:e}function c(t,s){const r=window.LiveScoreApp.Modules.MatchDetails,c=r?r.getCurrentTab():null;var p,m;c!==s&&(m=s,function(t){if(t){switch(t){case"lineups":a?.Lineups?.stopRatingAutoUpdate&&a.Lineups.stopRatingAutoUpdate();break;case"details":window.LiveScoreApp.Modules.MatchDetails&&"function"==typeof window.LiveScoreApp.Modules.MatchDetails.stopDetailHeaderUpdatePolling&&window.LiveScoreApp.Modules.MatchDetails.stopDetailHeaderUpdatePolling(),a?.AttackMomentum?.stopAutoUpdate&&a.AttackMomentum.stopAutoUpdate(),n&&(clearInterval(n),n=null),i&&(clearInterval(i),i=null),e.$("#attack-momentum-chart, #match-incidents").removeClass("loading");break;case"standings":o&&(clearInterval(o),o=null),a?.Standings?.stopPolling&&a.Standings.stopPolling();break;case"statistics":a?.Statistics?.stopAutoUpdate&&a.Statistics.stopAutoUpdate()}"details"!==t&&function(t){const a=e.$("#tab-"+t);if(!a.length)return;const i=a.outerHeight();i>0&&a.css("min-height",i+"px"),a.empty(),a.attr("data-needs-reload","true")}(t)}}(p=c),function(t,a){const i=["details","lineups","statistics","standings","history"],n=(t?i.indexOf(t):-1)<i.indexOf(a)?"slide-right":"slide-left",o=t?e.$("#tab-"+t):null,s=e.$("#tab-"+a);o&&o.length&&(o.addClass("exiting "+n),setTimeout(()=>{o.removeClass("live-scores-active exiting "+n),o.css("display","none")},150)),s.css("display","block"),requestAnimationFrame(()=>{s.addClass("live-scores-active entering "+n),setTimeout(()=>{s.removeClass("entering "+n)},350)})}(p,m),r&&r.setCurrentTab(s),function(t,i){const n=e.$("#tab-"+i);switch("true"===n.attr("data-needs-reload")&&(n.css("min-height",""),n.removeAttr("data-needs-reload")),l(i)&&"details"!==i&&d(i),i){case"details":u(t);break;case"lineups":y(t);break;case"statistics":const i=e.$('.live-scores-match[data-match-id="'+t+'"]');w(t,i.length>0&&"finished"===i.data("status")),v(t);break;case"standings":g(t);break;case"history":e.$("#h2h-button").length||(e.$("#tab-history").html('<div class="history-buttons"><button id="performance-button">Performans</button><button id="h2h-button" class="active">H2H</button><button id="team-streaks-button">Takım Serileri</button><button id="h2h-streaks-button">H2H Serileri</button></div><div id="history-content"></div>'),function(t){e.$("#performance-button").on("click.matchDetails",function(){e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),a&&a.History&&a.History.fetchPerformanceData(t)}),e.$("#h2h-button").on("click.matchDetails",function(){if(e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),a&&a.H2H){const i="finished"===e.$('.live-scores-match[data-match-id="'+t+'"]').data("status");a.H2H.fetchH2HData(t,i)}}),e.$("#team-streaks-button").on("click.matchDetails",function(){e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),a&&a.Streaks&&a.Streaks.fetchTeamStreaksData(t)}),e.$("#h2h-streaks-button").on("click.matchDetails",function(){if(e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),a&&a.Streaks){const i="finished"===e.$('.live-scores-match[data-match-id="'+t+'"]').data("status");a.Streaks.fetchH2HStreaksData(t,i)}})}(t)),setTimeout(function(){e.$("#h2h-button").click()},0)}}(t,s))}function l(t){return e.$("#tab-"+t).is(":empty")||!e.$("#tab-"+t).children().not(".loading-spinner, .skeleton-match, .skeleton-pulse, .skeleton-pulse-slow").length}function d(t){const i={lineups:"getLineupSkeleton",standings:"getStandingsSkeleton",history:"getH2HSkeleton"}[t];let n='<div class="loading-spinner"></div>';a.Skeleton&&i&&"function"==typeof a.Skeleton[i]&&(n=a.Skeleton[i]()),e.$("#tab-"+t).html(n)}async function u(t){const i=e.$("#tab-details"),n="finished"===e.$('.live-scores-match[data-match-id="'+t+'"]').data("status"),o=window.LiveScoreApp?.currentMatchDetailsData?.[t],s=function(t){const a=window.LiveScoreApp?.Utils?.Cache;if(!a)return null;const i=`${t}_${e.$('.live-scores-match[data-match-id="'+t+'"]').data("tournament-id")}_attack_momentum`,n=a.getFromCacheByType(i,a.CACHE_PREFIX.MATCH_DETAIL);return n&&n.graphPoints&&Array.isArray(n.graphPoints)&&n.graphPoints.length>0?n:null}(t),r=function(e){const t=window.LiveScoreApp?.Utils?.Cache;if(!t)return null;const a=`${e}_incidents`,i=t.getFromCacheByType(a,t.CACHE_PREFIX.MATCH_DETAIL);return i&&Array.isArray(i)&&i.length>0?i:null}(t),c=s&&s.graphPoints&&s.graphPoints.length>0,l=r&&Array.isArray(r)&&r.length>0;if(c&&l)return e.$("#attack-momentum-chart, #match-incidents").css("display","block"),i.html('<div id="attack-momentum-chart" class="tab-section top-section"></div><div id="match-incidents" class="tab-section bottom-section"></div>'),p(s),m(r),void h(0,{success:!0,fromCache:!0},{success:!0,fromCache:!0},o);let d="";d=a.Skeleton&&"function"==typeof a.Skeleton.getAttackMomentumSkeleton?a.Skeleton.getAttackMomentumSkeleton():'<div class="loading-spinner"></div>',i.html(d),i.addClass("loading"),e.$("#attack-momentum-chart, #match-incidents").css("display","block"),i.html('<div id="attack-momentum-chart" class="tab-section top-section"></div><div id="match-incidents" class="tab-section bottom-section"></div>'),i.addClass("loading");try{let e,d;c?(p(s),e=Promise.resolve({success:!0,fromCache:!0})):e=function(e,t){return a?.AttackMomentum?.updateAttackMomentumTab?a.AttackMomentum.updateAttackMomentumTab(e,t,e=>{}).then(e=>({success:e,type:"attack-momentum"})):Promise.resolve({success:!1,type:"attack-momentum"})}(t,n),l?(m(r),d=Promise.resolve({success:!0,fromCache:!0})):d=function(e,t){return new Promise(i=>{a?.MatchIncidents?.updateMatchIncidentsTab?a.MatchIncidents.updateMatchIncidentsTab(e,t,e=>{i({success:e,type:"match-incidents"})}):i({success:!1,type:"match-incidents"})})}(t,n);Date.now();const[u,v]=await Promise.all([e,d]);Date.now(),h(0,u,v,o),i.removeClass("loading")}catch(e){i.removeClass("loading"),i.html("<p>Detay verileri yüklenirken bir hata oluştu.</p>")}}function p(e){const t=window.LiveScoreApp.Utils.jQuery;a?.AttackMomentum?.renderAttackMomentumChart&&(t.$("#attack-momentum-chart").show(),a.AttackMomentum.renderAttackMomentumChart(e.graphPoints,e.homeTeamLogo,e.awayTeamLogo,e.incidents||[],e.tournamentId,null,null))}function m(e){a?.MatchIncidents?.renderMatchIncidents&&a.MatchIncidents.renderMatchIncidents(e)}function h(t,a,i,n){let o=!0===n?.hasAttackMomentum,s=!0===n?.hasMatchIncidents;!o&&a?.success&&(o=!0),!s&&i?.success&&(s=!0);const r=e.$('.live-scores-menu-item[data-tab="details"]'),c=e.$("#tab-details");!1===o&&!1===s&&!1===a?.success&&!1===i?.success?(r.hide(),c.hide()):!o&&!s&&a&&i||(r.show(),c.show())}function v(t){const a=e.$('.live-scores-match[data-match-id="'+t+'"]'),i=a.length>0?a.data("status"):null,n=e.$('.live-scores-menu-item[data-tab="statistics"]'),o=e.$("#tab-statistics");"notstarted"===i?(n.hide(),o.hide()):(n.show(),o.show())}function y(t){const i=e.$("#tab-lineups");l("lineups")&&(d("lineups"),i.addClass("loading")),a?.Lineups?.updateLineupsTab&&(a.Lineups.updateLineupsTab(t),i.removeClass("loading"),a.Lineups.startRatingAutoUpdate&&setTimeout(()=>{a.Lineups.startRatingAutoUpdate(t)},2e3))}function w(t,i){const n=e.$("#tab-statistics");l("statistics")&&(d("statistics"),n.addClass("loading")),a.Statistics?.updateStatisticsTab?(a.Statistics.updateStatisticsTab(t,i),n.removeClass("loading")):a.Statistics?.loadModules?a.Statistics.loadModules().then(e=>{e&&a.Statistics.updateStatisticsTab?(a.Statistics.updateStatisticsTab(t,i),n.removeClass("loading")):(f("İstatistik modülleri yüklenemedi."),n.removeClass("loading"))}).catch(e=>{f("İstatistik yükleme hatası: "+e.message),n.removeClass("loading")}):function(t,a){const i=function(){const e=document.getElementsByTagName("script");for(let t=0;t<e.length;t++){const a=e[t].src;if(-1!==a.indexOf("/js/"))return a.substring(0,a.indexOf("/js/")+4)}return null}();if(!i)return void f("JavaScript dosya yolu bulunamadı.");const n=document.createElement("script");n.src=i+"components/statistics.js",n.async=!0,n.onload=()=>{setTimeout(()=>{window.LiveScoreApp.Components?.Statistics?w(t,a):f("İstatistik modülü doğru yüklenemedi.")},100)},n.onerror=()=>{f("İstatistik modülü yüklenemedi."),e.$("#tab-statistics").removeClass("loading")},document.head.appendChild(n)}(t,i)}function f(t){const a=e.$("#tab-statistics");a.html("<p>"+t+"</p>"),a.removeClass("loading")}function g(i){const n=e.$("#tab-standings");if(l("standings")&&(d("standings"),n.addClass("loading")),!1===window.LiveScoreApp.hasStandingsData){const a=e.$('.live-scores-match[data-match-id="'+i+'"]'),n=a.data("tournament-id"),o=a.data("season-id"),s=a.data("group-id")||0;if(!n||!o)return e.$(".standings-tab").hide(),void e.$("#tab-standings").empty();{const a=`standings_check_${n}_${o}_${s}`,i=t.getFromCacheByType(a,t.CACHE_PREFIX.STANDING);if(i&&!0===i.exists)window.LiveScoreApp.hasStandingsData=!0;else if(i&&!1===i.exists)return e.$(".standings-tab").hide(),void e.$("#tab-standings").empty()}}const o=e.$('.live-scores-match[data-match-id="'+i+'"]'),s=o.data("tournament-id"),r=o.data("season-id"),c=o.data("group-id")||0;if(!s||!r)return e.$(".standings-tab").hide(),void e.$("#tab-standings").empty();const u=`standings_check_${s}_${r}_${c}`,p=t.getFromCacheByType(u,t.CACHE_PREFIX.STANDING);if(p&&!1===p.exists)return window.LiveScoreApp.hasStandingsData=!1,e.$(".standings-tab").hide(),void e.$("#tab-standings").empty();p&&!0===p.exists&&(window.LiveScoreApp.hasStandingsData=!0),a?.Standings?.updateStandingsTab?(a.Standings.updateStandingsTab(i),n.removeClass("loading")):S(i)}function S(i){const n=e.$('.live-scores-match[data-match-id="'+i+'"]'),o=n.data("tournament-id"),r=n.data("season-id");if(!o||!r)return void e.$(".standings-tab").hide();if(a?.Standings?.checkAndFetchStandings)return void a.Standings.checkAndFetchStandings(i);const c=`standings_check_${o}_${r}_${n.data("group-id")||0}`,l=t.getFromCacheByType(c,t.CACHE_PREFIX.STANDING);l?e.$(".standings-tab").toggle(l.exists):e.$(".standings-tab").data("checking")||(e.$(".standings-tab").data("checking",!0),s("get_standings_data",{tournament_id:o,season_id:r,type:"total",match_status:n.length&&n.data("status")||""}).then(function(a){e.$(".standings-tab").removeData("checking");try{if(!a||204===a.status||!1===a.hasData||null===a.standings){e.$(".standings-tab").hide();const a=window.LiveScoreApp.Constants.getCacheTTL("STANDINGS","live"),i={exists:!1,timestamp:Date.now(),reason:"204_no_content"};return void t.setToCacheByType(c,i,a,t.CACHE_PREFIX.STANDING)}const i=a&&a.standings&&a.standings[0]&&a.standings[0].rows&&a.standings[0].rows.length>0;e.$(".standings-tab").toggle(i);const n={exists:i,timestamp:Date.now()},o=window.LiveScoreApp.Constants.getCacheTTL("STANDINGS","live");t.setToCacheByType(c,n,o,t.CACHE_PREFIX.STANDING)}catch(t){e.$(".standings-tab").hide()}}).catch(function(a){e.$(".standings-tab").removeData("checking"),e.$(".standings-tab").hide();const i=window.LiveScoreApp.Constants.getCacheTTL("STANDINGS","live"),n={exists:!1,timestamp:Date.now(),error:!0};t.setToCacheByType(c,n,i/3,t.CACHE_PREFIX.STANDING)}))}let A=null;return{updateTabContent:c,updateDetailsTab:u,updateLineupsTab:y,updateStatisticsTab:w,updateStandingsTab:g,checkAndFetchLineups:function(i){if(a?.Lineups?.checkAndFetchLineups)return void a.Lineups.checkAndFetchLineups(i);const n=e.$('.live-scores-match[data-match-id="'+i+'"]').data("status")||"notstarted",o=t.getFromCacheByType(i,t.CACHE_PREFIX.LINEUP);let r=3e5;"inprogress"===n||"interrupted"===n?r=6e4:"finished"===n&&(r=36e5);let c=!1;if(o){const t=o.timestamp||0;if(c=Date.now()-t<r,c)return void e.$(".lineups-tab").show()}e.$(".lineups-tab").data("checking")||(e.$(".lineups-tab").data("checking",!0),s("get_match_lineups",{match_id:i,match_status:n||""}).then(function(a){e.$(".lineups-tab").removeData("checking");try{if(!a||204===a.status||!1===a.hasData||null===a.data)return e.$(".lineups-tab").hide(),void window.LiveScoreApp.debugMode;let o=!1;if(a&&"object"==typeof a&&a.home&&a.away&&a.home.players&&a.away.players&&Array.isArray(a.home.players)&&Array.isArray(a.away.players)&&a.home.players.length>0&&a.away.players.length>0&&(o=!0),o){e.$(".lineups-tab").show();let o="lineups";"inprogress"===n||"interrupted"===n?o="lineups_live":"finished"===n&&(o="lineups_finished");const s={exists:!0,timestamp:Date.now(),match_status:n,home_count:a.home.players.length,away_count:a.away.players.length},r=window.LiveScoreApp.Constants.getCacheTTL("LINEUPS","live");t.setToCacheByType(i,s,r,t.CACHE_PREFIX.LINEUP),window.LiveScoreApp.debugMode}else e.$(".lineups-tab").hide(),window.LiveScoreApp.debugMode}catch(t){e.$(".lineups-tab").hide()}}).catch(function(t){e.$(".lineups-tab").removeData("checking"),e.$(".lineups-tab").hide(),window.LiveScoreApp.debugMode}))},checkAndFetchStandings:S,checkDetailsTabVisibility:h,checkStatisticsTabVisibility:v,cleanupIntervals:function(){clearInterval(n),clearInterval(i),o&&(clearInterval(o),o=null),a?.Standings?.stopPolling&&a.Standings.stopPolling(),a?.Lineups?.stopRatingAutoUpdate&&a.Lineups.stopRatingAutoUpdate()},setupTabSwipeGestures:function(){const t=window.LiveScoreApp.Utils.DeviceDetect;if(t&&!t.isTouchDevice())return;const a=document.getElementById("match-details");if(!a)return;A&&A.abort(),A=new AbortController;const i=A.signal,n=["details","lineups","statistics","standings","history"];let o=0,s=0,r=0,l=!1,d=!1;a.addEventListener("touchstart",function(e){e.touches.length>1||(o=e.touches[0].clientX,s=e.touches[0].clientY,r=Date.now(),l=!1,d=!1)},{passive:!0,signal:i}),a.addEventListener("touchmove",function(e){if(e.touches.length>1||d)return;const t=e.touches[0].clientX-o,a=Math.abs(e.touches[0].clientY-s),i=Math.abs(t);i>30*Math.min(window.devicePixelRatio||1,3)&&i>1.5*a&&(l=!0)},{passive:!0,signal:i}),a.addEventListener("touchend",function(t){if(!l||d)return;d=!0;const a=t.changedTouches[0].clientX-o,i=Date.now()-r,s=Math.abs(a),u=50*Math.min(window.devicePixelRatio||1,3),p=s/Math.max(1,i);if(s<u&&p<.3)return;const m=window.LiveScoreApp.Modules.MatchDetails,h=m?m.getCurrentTab():"details",v=n.filter(function(t){const a=e.$('.live-scores-menu-item[data-tab="'+t+'"]');return a.length&&a.is(":visible")}),y=v.indexOf(h);if(-1===y)return;let w;if(w=a<0?y+1:y-1,w<0||w>=v.length)return;const f=v[w],g=window.LiveScoreApp.LiveScores,S=g&&"function"==typeof g.getSelectedMatchId?g.getSelectedMatchId():null;S&&(c(S,f),e.$(".live-scores-menu-item").removeClass("active").attr("aria-selected","false"),e.$('.live-scores-menu-item[data-tab="'+f+'"]').addClass("active").attr("aria-selected","true"))},{passive:!0,signal:i})},cleanupTabSwipeGestures:function(){A&&(A.abort(),A=null)}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Modules=window.LiveScoreApp.Modules||{},window.LiveScoreApp.Modules.MatchDetailsData=function(){const e=window.LiveScoreApp.Modules.ScoreUpdater,t=window.LiveScoreApp.Utils.Cache;window.LiveScoreApp.Config;let a=window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.RequestQueue;const i=window.LiveScoreApp.Utils.jQuery,n=window.LiveScoreApp.Utils.Compression;let o=null,s=null;function r(){o=null,s=null;try{i.$("#attack-momentum-chart").length&&i.$("#attack-momentum-chart").css("display",""),i.$(".live-scores-tab-content").removeClass("live-scores-active entering exiting slide-left slide-right").css("display",""),i.$(".live-scores-menu-item").removeClass("active")}catch(e){}}function c(e,n,o){if(!n)return void o("N/A");const s=`matchDetail_previousScore_${e}`,r=t.getFromCacheByType(s,t.CACHE_PREFIX.MATCH_DETAIL);r?o(r):a.enqueue(function(){return i.ajax({url:LiveScoresAjax.ajax_url,type:"POST",data:{action:"get_match_details",match_id:n},success:function(e){let a="N/A";if(e.success&&e.data){const t=e.data;void 0!==t.homeTeamScore&&void 0!==t.awayTeamScore&&null!==t.homeTeamScore&&null!==t.awayTeamScore&&(a=t.homeTeamScore+" - "+t.awayTeamScore)}(a.includes("null")||"null - null"===a)&&(a="N/A");const i=window.LiveScoreApp.Constants.getCacheTTL("MATCH_INCIDENTS","finished");t.setToCacheByType(s,a,i,t.CACHE_PREFIX.MATCH_DETAIL),o(a)},error:function(e,t,a){o("N/A")}})})}return{resetPreviousValues:r,loadMatchDetails:function(t,a,i){r();const c=window.LiveScoreApp.Utils.Cache,l=`${c.CACHE_PREFIX.MATCH_DETAIL}matchDetail_previousScore_${t}`,d=`${c.CACHE_PREFIX.MATCH_DETAIL}matchDetail_aggregateScore_${t}`,u=`${c.CACHE_PREFIX.MATCH_DETAIL}matchDetail_penaltyScore_${t}`;"function"==typeof c.deleteCacheItem&&(c.deleteCacheItem(l),c.deleteCacheItem(d),c.deleteCacheItem(u));const p=e.getMatchData(a);p.matchId=t,p.matchStatus=a.data("status"),p.tournamentId=a.data("tournament-id"),p.seasonId=a.data("season-id"),p.groupId=a.data("group-id")||0,p.tournamentName=a.parents(".live-scores-tournament-card").find(".live-scores-tournament-title").text(),p.homeTeamId=a.data("home-team-id"),p.awayTeamId=a.data("away-team-id"),p.aggregatedWinnerCode=a.data("aggregated-winner-code")||0;try{if(c&&"function"==typeof c.getFromCacheByType&&c.CACHE_PREFIX){const e=`matchDetail_aggregateScore_${t}`,a=c.getFromCacheByType(e,c.CACHE_PREFIX.MATCH_DETAIL);a&&void 0!==a.homeScore&&void 0!==a.awayScore&&(p.homeAggregatedScore=a.homeScore,p.awayAggregatedScore=a.awayScore);const i=`matchDetail_previousScore_${t}`,n=c.getFromCacheByType(i,c.CACHE_PREFIX.MATCH_DETAIL);n&&n.score&&(o=n.eventId,s=n.score,p.previousScore=n.score,p.previousLegEventId=n.eventId);const r=`matchDetail_penaltyScore_${t}`,l=c.getFromCacheByType(r,c.CACHE_PREFIX.MATCH_DETAIL);l&&void 0!==l.homeScore&&void 0!==l.awayScore&&(p.homePenaltiesScore=l.homeScore,p.awayPenaltiesScore=l.awayScore)}}catch(e){}const m=`matchDetail_${t}`;i(n.getOptimizedCache(m,c.CACHE_PREFIX.MATCH_DETAIL)||null,p)},fetchMatchDetailsFromServer:function e(r,l){const d=window.LiveScoreApp.Utils.RequestIdGenerator,u=d?d.generateId(r,"get_match_details"):null,p=(a||(a=window.LiveScoreApp.Utils.RequestQueue),!a&&window.LiveScoreApp&&window.LiveScoreApp.Utils&&(window.LiveScoreApp.Utils.RequestQueue={enqueue:function(e){if(!e||"function"!=typeof e)return Promise.reject(new Error("Invalid request function"));try{const t=e();return t&&t.then,Promise.resolve(t)}catch(e){return Promise.reject(e)}},add:function(e){if(!e||"function"!=typeof e.execute)return Promise.reject(new Error("Invalid request"));try{return e.execute(function(t){e.callback&&e.callback(t)}),Promise.resolve()}catch(t){return e.errorCallback&&e.errorCallback(t),Promise.reject(t)}},clearQueue:function(){}},a=window.LiveScoreApp.Utils.RequestQueue),a);if(!p||"function"!=typeof p.enqueue){return(e._retryCount=(e._retryCount||0)+1)<30?void setTimeout(()=>{e(r,l)},100):(e._retryCount=0,i.ajax({url:LiveScoresAjax.ajax_url,type:"POST",data:{action:"get_match_details",match_id:r,request_id:u},success:l,error:function(e){l&&l({error:!0})}}))}e._retryCount=0,i.ajax({url:LiveScoresAjax.ajax_url,type:"POST",data:{action:"get_match_details",match_id:r,request_id:u},success:function(e){if(window.LiveScoreApp.DetailClosingFlags&&window.LiveScoreApp.DetailClosingFlags.isClosing(r))return;if(window.LiveScoreApp.detailClosing)return;if((window.LiveScoreApp.LiveScores?window.LiveScoreApp.LiveScores.getSelectedMatchId():null)!==r)return;const a=e&&e.data&&e.data.request_id||e.request_id;if(!u||d.validateResponse(r,a))if(e.success){var p=e.data;if(null!==p.previousLegEventId?(o=p.previousLegEventId,c(r,p.previousLegEventId,function(a){if(!(window.LiveScoreApp.DetailClosingFlags&&window.LiveScoreApp.DetailClosingFlags.isClosing(r)||window.LiveScoreApp.detailClosing||(window.LiveScoreApp.LiveScores?window.LiveScoreApp.LiveScores.getSelectedMatchId():null)!==r)){if(s=a,p.previousScore=a,a&&"N/A"!==a){const e=window.LiveScoreApp.Constants.getCacheTTL("MATCH_INCIDENTS","live");t.setToCacheByType(`matchDetail_previousScore_${r}`,{score:a,eventId:p.previousLegEventId},e,t.CACHE_PREFIX.MATCH_DETAIL)}l&&l(e)}})):l&&l(e),void 0!==p.aggregatedWinnerCode&&window.LiveScoreApp.LiveMatches&&window.LiveScoreApp.LiveMatches.has(r.toString())){const e=window.LiveScoreApp.LiveMatches.get(r.toString());e.aggregatedWinnerCode=p.aggregatedWinnerCode,window.LiveScoreApp.LiveMatches.set(r.toString(),e)}if(null!==p.homeAggregatedScore&&null!==p.awayAggregatedScore){const e=window.LiveScoreApp.Constants.getCacheTTL("MATCH_INCIDENTS","live");t.setToCacheByType(`matchDetail_aggregateScore_${r}`,{homeScore:p.homeAggregatedScore,awayScore:p.awayAggregatedScore},e,t.CACHE_PREFIX.MATCH_DETAIL)}if(null!==p.homePenaltiesScore&&null!==p.awayPenaltiesScore&&void 0!==p.homePenaltiesScore&&void 0!==p.awayPenaltiesScore){const e=window.LiveScoreApp.Constants.getCacheTTL("MATCH_INCIDENTS","live");t.setToCacheByType(`matchDetail_penaltyScore_${r}`,{homeScore:p.homePenaltiesScore,awayScore:p.awayPenaltiesScore},e,t.CACHE_PREFIX.MATCH_DETAIL)}const a=window.LiveScoreApp.Constants.getCacheTTL("LINEUPS","live"),d=i.$("#match-details").html();n.setOptimizedCache(`matchDetail_${r}`,d,a,t.CACHE_PREFIX.MATCH_DETAIL)}else i.$("#match-details").hide(),window.LiveScoreApp.LiveScores&&window.LiveScoreApp.LiveScores.setSelectedMatchId(null),l&&l(null);else window.LiveScoreApp&&window.LiveScoreApp.Monitoring&&window.LiveScoreApp.Monitoring.trackCacheWriteFailure({endpoint:"match_details",matchId:r,reason:"request_id_mismatch",expected_id:u,received_id:e.request_id,timestamp:(new Date).toISOString()})},error:function(e,t,a){i.$("#match-details").hide(),window.LiveScoreApp.LiveScores&&window.LiveScoreApp.LiveScores.setSelectedMatchId(null),l&&l(null)}})},fetchPreviousLegScore:c,clearTabCache:function(e,a=!1){const i=`${t.CACHE_PREFIX.MATCH_DETAIL}matchDetail_${e}`,n=`${t.CACHE_PREFIX.LINEUP}${e}`,r=`${t.CACHE_PREFIX.STATISTIC}${e}`,c=`${t.CACHE_PREFIX.STANDING}standings_check_${e}`;t.deleteCacheItem(i),t.deleteCacheItem(n),t.deleteCacheItem(r),t.deleteCacheItem(c);const l=["ALL","1ST","2ND"];for(const a of l){const i=`${t.CACHE_PREFIX.STATISTIC}${e}_${a}`;t.deleteCacheItem(i)}if(window.LiveScoreApp.debugMode,a){const a=`${t.CACHE_PREFIX.MATCH_DETAIL}matchDetail_previousScore_${e}`,i=`${t.CACHE_PREFIX.MATCH_DETAIL}matchDetail_aggregateScore_${e}`,n=`${t.CACHE_PREFIX.MATCH_DETAIL}matchDetail_penaltyScore_${e}`;t.deleteCacheItem(a),t.deleteCacheItem(i),t.deleteCacheItem(n),window.LiveScoreApp.debugMode,o=null,s=null}},hasValidAttackMomentumData:function(e){const a=`${e}`,i=t.getFromCacheByType(a,t.CACHE_PREFIX.GENERAL);return i&&i.graphPoints&&Array.isArray(i.graphPoints)&&i.graphPoints.length>0},getPreviousLegEventId:function(){return o},getPreviousScore:function(){return s}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Modules=window.LiveScoreApp.Modules||{},window.LiveScoreApp.Modules.MatchDetailsEvents=function(){const e=window.LiveScoreApp.Utils.jQuery,t=(window.LiveScoreApp.Utils.EventUtils,window.LiveScoreApp.Components||{});function a(e){window.LiveScoreApp._closeMatchDetailsLogs||(window.LiveScoreApp._closeMatchDetailsLogs=[]),window.LiveScoreApp._closeMatchDetailsLogs.push(e),window.LiveScoreApp._closeMatchDetailsLogs.length>100&&window.LiveScoreApp._closeMatchDetailsLogs.shift()}function i(){const t=document.getElementById("match-details");t&&(t.style.opacity="1",t.style.transform="translateY(0)",t.classList.remove("swiping")),window.LiveScoreApp.Modules.MatchDetailsTabs&&"function"==typeof window.LiveScoreApp.Modules.MatchDetailsTabs.cleanupTabSwipeGestures&&window.LiveScoreApp.Modules.MatchDetailsTabs.cleanupTabSwipeGestures(),e.$(".live-scores-back-button").off("click.matchDetails"),e.$(".live-scores-back-button").off("click"),e.$(document).off("click","#match-details .live-scores-back-button"),window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.EventUtils&&"function"==typeof window.LiveScoreApp.Utils.EventUtils.cleanupMatchDetailsEventListeners?window.LiveScoreApp.Utils.EventUtils.cleanupMatchDetailsEventListeners():(e.$(".live-scores-menu-item").off("click.matchDetails"),e.$(".live-scores-back-button").off("click.matchDetails"),e.$("#performance-button").off("click.matchDetails"),e.$("#h2h-button").off("click.matchDetails"),e.$("#team-streaks-button").off("click.matchDetails"),e.$("#h2h-streaks-button").off("click.matchDetails"),e.$(document).off("keydown.matchDetails"))}function n(){const e=window.LiveScoreApp?.Modules?.MatchDetails;e&&"function"==typeof e.closeMatchDetails?e.closeMatchDetails():window.LiveScoreApp.Utils.jQuery.$("#match-details").hide()}return{setupEventListeners:function(o){const s=Date.now();a(`[${s}] MatchDetailsEvents.setupEventListeners() STARTED for matchId=${o}`),a(`[${s}] Calling cleanupEventListeners()`);try{i(),a(`[${s}] cleanupEventListeners() succeeded`)}catch(e){a(`[${s}] ERROR in cleanupEventListeners(): ${e.message}`)}if(a(`[${s}] Removing old back button handlers`),e.$(".live-scores-back-button").off("click"),e.$(".live-scores-back-button").off("click.matchDetails"),e.$(document).off("click","#match-details .live-scores-back-button"),window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.EventUtils&&"function"==typeof window.LiveScoreApp.Utils.EventUtils.setupMatchDetailsEventListeners){a(`[${s}] EventUtils.setupMatchDetailsEventListeners() available, calling it`);try{window.LiveScoreApp.Utils.EventUtils.setupMatchDetailsEventListeners(o,{closeMatchDetails:n}),a(`[${s}] EventUtils.setupMatchDetailsEventListeners() returned successfully`)}catch(e){a(`[${s}] ERROR in EventUtils.setupMatchDetailsEventListeners(): ${e.message}`)}}else{a(`[${s}] WARNING: EventUtils.setupMatchDetailsEventListeners NOT available, using fallback`);try{!function(a){i(),e.$(".live-scores-menu-item").on("click.matchDetails",function(){const t=e.$(this).data("tab"),i=window.LiveScoreApp.Modules.MatchDetails;(i?i.getCurrentTab():null)!==t&&(e.$(".live-scores-menu-item").removeClass("active"),e.$(this).addClass("active"),e.$(".live-scores-tab-content").removeClass("live-scores-active entering exiting slide-left slide-right").css("display",""),e.$("#tab-"+t).addClass("live-scores-active"),i&&"function"==typeof i.updateTabContent?i.updateTabContent(a,t):window.LiveScoreApp.Modules.MatchDetailsTabs&&"function"==typeof window.LiveScoreApp.Modules.MatchDetailsTabs.updateTabContent&&window.LiveScoreApp.Modules.MatchDetailsTabs.updateTabContent(a,t))}),e.$(".live-scores-back-button").on("click.matchDetails",function(e){e.preventDefault(),e.stopPropagation(),window.LiveScoreApp.Modules.MatchDetailsData&&"function"==typeof window.LiveScoreApp.Modules.MatchDetailsData.resetPreviousValues&&window.LiveScoreApp.Modules.MatchDetailsData.resetPreviousValues(),n()}),e.$(".live-scores-back-button").on("touchstart.matchDetails",function(t){e.$(this).addClass("touch-active")}),e.$(".live-scores-back-button").on("touchend.matchDetails",function(t){e.$(this).removeClass("touch-active"),t.preventDefault(),t.stopPropagation(),window.LiveScoreApp.Modules.MatchDetailsData&&"function"==typeof window.LiveScoreApp.Modules.MatchDetailsData.resetPreviousValues&&window.LiveScoreApp.Modules.MatchDetailsData.resetPreviousValues(),n()}),e.$("#performance-button").on("click.matchDetails",function(){e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),t&&t.History&&t.History.fetchPerformanceData(a)}),e.$("#h2h-button").on("click.matchDetails",function(){if(e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),t&&t.H2H){const i="finished"===e.$('.live-scores-match[data-match-id="'+a+'"]').data("status");t.H2H.fetchH2HData(a,i)}}),e.$("#team-streaks-button").on("click.matchDetails",function(){e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),t&&t.Streaks&&t.Streaks.fetchTeamStreaksData(a)}),e.$("#h2h-streaks-button").on("click.matchDetails",function(){if(e.$(".history-buttons button").removeClass("active"),e.$(this).addClass("active"),t&&t.Streaks){const i="finished"===e.$('.live-scores-match[data-match-id="'+a+'"]').data("status");t.Streaks.fetchH2HStreaksData(a,i)}}),e.$(document).on("keydown.matchDetails",function(e){27===e.keyCode&&n()})}(o),a(`[${s}] setupClassicEventListeners() completed`)}catch(e){a(`[${s}] ERROR in setupClassicEventListeners(): ${e.message}`)}}a(`[${s}] MatchDetailsEvents.setupEventListeners() COMPLETED`),window.LiveScoreApp.Modules.MatchDetailsTabs&&"function"==typeof window.LiveScoreApp.Modules.MatchDetailsTabs.setupTabSwipeGestures&&window.LiveScoreApp.Modules.MatchDetailsTabs.setupTabSwipeGestures()},cleanupEventListeners:i,closeMatchDetails:n}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Modules=window.LiveScoreApp.Modules||{},window.LiveScoreApp.Modules.MatchDetailsUI=function(){const e=window.LiveScoreApp.Utils.DomUtils,t=(window.LiveScoreApp.Utils.Translator,window.LiveScoreApp.Utils.jQuery),a=(window.LiveScoreApp.Config,window.LiveScoreApp.Utils.Cache),i=(window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton,window.LiveScoreApp.Utils.MinuteCalculator),n=window.LiveScoreApp.Utils.SecurityUtils;function o(e){if(!e||"string"!=typeof e)return e;const t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#x2F;":"/","&#47;":"/"};return e.replace(/&amp;|&lt;|&gt;|&quot;|&#39;|&#x2F;|&#47;/g,function(e){return t[e]})}return{generateMatchDetailsHTML:function(e){const t=n&&"function"==typeof n.validateMatchData?n.validateMatchData(e):e;let a="";if("inprogress"!==e.matchStatus||e.matchTime&&""!==e.matchTime.trim()){if(e.matchTime)if(e.matchTime.includes('<span class="match-status'))a=e.matchTime;else if(i){const t="finished"===e.matchStatus?"finished":"notstarted"===e.matchStatus?"notstarted":"inprogress"===e.matchStatus?"Started":"";a=i.formatMinute(e.matchTime,t)}else{let t="";e.matchTime.includes("UZT1")||e.matchTime.includes("UZT2")?t=' <span class="blinking-quote">\'</span>':e.matchTime.match(/Bitti|Başlamadı|Ertelendi|Gecikme/)||(t='<span class="blinking-quote">\'</span>'),a=e.matchTime.replace("'","")+t}}else a="";let s="",r="";e.homeRedCards>0&&(s=1===e.homeRedCards?' <i class="fas fa-square red-card-icon"></i>':' <i class="fas fa-square red-card-icon"></i> x'+e.homeRedCards),e.awayRedCards>0&&(r=1===e.awayRedCards?' <i class="fas fa-square red-card-icon"></i>':' <i class="fas fa-square red-card-icon"></i> x'+e.awayRedCards);let c="",l="";1===e.aggregatedWinnerCode?c=' <span class="md-qualified" title="Tur Atlayan Takım">✓</span>':2===e.aggregatedWinnerCode&&(l=' <span class="md-qualified" title="Tur Atlayan Takım">✓</span>');const d=window.LiveScoreApp.Components.Standings;let u=null,p=null;if(e.tournamentId&&e.seasonId){const t=`standings_check_${e.tournamentId}_${e.seasonId}_${e.groupId||0}`,a=window.LiveScoreApp.Utils.Cache.getFromCacheByType(t,window.LiveScoreApp.Utils.Cache.CACHE_PREFIX.STANDING);if(a&&!0===a.exists){const t=["knockout","final","qualification","playoff","play-off","eleme","elemeler","group stage","group","grup","kupa","kupası","cup","çeyrek","çeyrek final","quarter","yarifinal","yarı final","semi","round of","preliminary","ön eleme"];let a=!0;if(e.tournamentName){const i=e.tournamentName.toLowerCase();for(let e=0;e<t.length;e++)if(i.includes(t[e])){a=!1;break}}if(a){const t=`standings_${e.tournamentId}_${e.seasonId}_total${e.groupId?"_"+e.groupId:""}`,a=window.LiveScoreApp.Utils.Cache.getFromCacheByType(t,window.LiveScoreApp.Utils.Cache.CACHE_PREFIX.STANDING);if(a&&a.rows&&a.rows.length>0)for(let t=0;t<a.rows.length;t++)a.rows[t].team&&a.rows[t].team.id==e.homeTeamId&&(u=a.rows[t].position),a.rows[t].team&&a.rows[t].team.id==e.awayTeamId&&(p=a.rows[t].position)}}}let m=o(t.homeTeamName),h=o(t.awayTeamName);if(d&&"function"==typeof d.getTeamPosition&&e.tournamentId&&e.seasonId){const t=`standings_check_${e.tournamentId}_${e.seasonId}_${e.groupId||0}`,a=window.LiveScoreApp.Utils.Cache.getFromCacheByType(t,window.LiveScoreApp.Utils.Cache.CACHE_PREFIX.STANDING);if(a&&!0===a.exists){const t=["knockout","final","qualification","playoff","play-off","eleme","elemeler","group stage","group","grup","kupa","kupası","cup","çeyrek","çeyrek final","quarter","yarifinal","yarı final","semi","round of","preliminary","ön eleme"];let a=!0;if(e.tournamentName){const i=e.tournamentName.toLowerCase();for(let e=0;e<t.length;e++)if(i.includes(t[e])){a=!1;break}}if(a){const t=`standings_${e.tournamentId}_${e.seasonId}_total${e.groupId?"_"+e.groupId:""}`,a=window.LiveScoreApp.Utils.Cache.getFromCacheByType(t,window.LiveScoreApp.Utils.Cache.CACHE_PREFIX.STANDING);if(a&&a.rows&&a.rows.length>0)for(let t=0;t<a.rows.length;t++)a.rows[t].team.id==e.homeTeamId&&(u=a.rows[t].position),a.rows[t].team.id==e.awayTeamId&&(p=a.rows[t].position)}}}null!==u&&(m=`${m} (${u})`),null!==p&&(h=`${h} (${p})`);const v=void 0!==e.homeTeamDisplayScore?e.homeTeamDisplayScore:e.homeTeamScore,y=void 0!==e.awayTeamDisplayScore?e.awayTeamDisplayScore:e.awayTeamScore;let w="";const f=[];if(e.homeScore&&"object"==typeof e.homeScore&&e.awayScore&&"object"==typeof e.awayScore){if(void 0!==e.homeScore.aggregated&&void 0!==e.awayScore.aggregated&&null!==e.homeScore.aggregated&&null!==e.awayScore.aggregated){const t=e.homeScore.aggregated+"-"+e.awayScore.aggregated;f.push(`<span class="aggregate-ims" title="Toplam Skor (Iki Aşamalı)"><strong>İMS:</strong> ${t}</span>`)}if(void 0!==e.homeScore.penalties&&void 0!==e.awayScore.penalties&&null!==e.homeScore.penalties&&null!==e.awayScore.penalties){const t=e.homeScore.penalties+"-"+e.awayScore.penalties;f.push(`<span class="aggregate-penalty" title="Penaltı Ataması"><strong>Pen:</strong> ${t}</span>`)}}f.length>0&&(w=f.join(" "));let g="";return null!==e.homePenaltiesScore&&null!==e.awayPenaltiesScore&&void 0!==e.homePenaltiesScore&&void 0!==e.awayPenaltiesScore&&(g=`<span class="aggregate-penalty" title="Penaltı Atışı"><strong>Pen:</strong> ${e.homePenaltiesScore}-${e.awayPenaltiesScore}</span>`),`\n            <div class="md-hero${"inprogress"===e.matchStatus?" md-hero--live":""}">\n                <div class="md-hero__topbar">\n                    <button class="md-hero__btn live-scores-back-button" aria-label="Geri Git">\n                        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M19 12H5"/><polyline points="12 19 5 12 12 5"/></svg>\n                    </button>\n                    <div class="md-hero__tournament">\n                        ${e.tournamentName?'<span class="md-hero__tournament-name">'+e.tournamentName+"</span>":""}\n                    </div>\n                    <a class="md-hero__btn match-detail-expand-btn" href="#" id="match-detail-expand" aria-label="Maç Sayfasını Aç" title="Maç Sayfasını Aç">\n                        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg>\n                    </a>\n                </div>\n                <h1 class="sr-only" id="match-detail-heading">${m} vs ${h} Maç Detayları</h1>\n                <div class="md-hero__scoreboard">\n                    <div class="md-hero__team md-hero__team--home">\n                        <div class="md-hero__logo">\n                            <img src="${e.homeTeamLogo}" alt="${m}" width="52" height="52">\n                        </div>\n                        <span class="md-hero__name" title="${m}">${m}${c}${s}</span>\n                    </div>\n                    <div class="md-hero__center">\n                        <div class="md-hero__score">\n                            <span class="md-hero__score-num">${v}</span>\n                            <span class="md-hero__score-sep">-</span>\n                            <span class="md-hero__score-num">${y}</span>\n                        </div>\n                        ${w||g?'<div class="md-hero__extra">'+(w||"")+(g||"")+"</div>":""}\n                        <div class="md-hero__status">\n                            <div class="live-scores-match-time">${a}</div>\n                            <div class="previous-leg-score"></div>\n                        </div>\n                    </div>\n                    <div class="md-hero__team md-hero__team--away">\n                        <div class="md-hero__logo">\n                            <img src="${e.awayTeamLogo}" alt="${h}" width="52" height="52">\n                        </div>\n                        <span class="md-hero__name" title="${h}">${h}${l}${r}</span>\n                    </div>\n                </div>\n                <a class="md-hero__cta" href="#" id="match-detail-expand-cta" aria-label="Detaylı Maç Sayfası">\n                    <span>Detaylı Maç Sayfası</span>\n                    <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><polyline points="12 5 19 12 12 19"/></svg>\n                </a>\n            </div>\n            <div class="live-scores-match-detail-content">\n                <nav class="live-scores-menu" role="tablist" aria-label="Maç Detayları Seçenekleri" aria-labelledby="match-detail-heading">\n                    <button class="live-scores-menu-item" role="tab" aria-selected="true" aria-controls="tab-details" id="tab-details-button" data-tab="details">Ayrıntılar</button>\n                    <button class="live-scores-menu-item lineups-tab" role="tab" aria-selected="false" aria-controls="tab-lineups" id="tab-lineups-button" data-tab="lineups">Kadrolar</button>\n                    <button class="live-scores-menu-item statistics-tab" role="tab" aria-selected="false" aria-controls="tab-statistics" id="tab-statistics-button" data-tab="statistics">İstatistik</button>\n                    <button class="live-scores-menu-item standings-tab" role="tab" aria-selected="false" aria-controls="tab-standings" id="tab-standings-button" data-tab="standings">Puan Durumu</button>\n                    <button class="live-scores-menu-item history-tab" role="tab" aria-selected="false" aria-controls="tab-history" id="tab-history-button" data-tab="history">Geçmiş</button>\n                </nav>\n                <div id="tab-details" class="live-scores-tab-content" style="display:none;">\n                    <div id="attack-momentum-chart" style="display:none;"><canvas id="momentumChart"></canvas></div>\n                    <div id="match-incidents"></div>\n                </div>\n                <div id="tab-lineups" class="live-scores-tab-content" style="display:none;"></div>\n                <div id="tab-statistics" class="live-scores-tab-content" style="display:none;"></div>\n                <div id="tab-standings" class="live-scores-tab-content" style="display:none;"></div>\n                <div id="tab-history" class="live-scores-tab-content" style="display:none;">\n                    <div class="history-buttons">\n                        <button id="performance-button">Performans</button>\n                        <button id="h2h-button" class="active">H2H</button>\n                        <button id="team-streaks-button">Takım Serileri</button>\n                        <button id="h2h-streaks-button">H2H Serileri</button>\n                    </div>\n                    <div id="history-content"></div>\n                </div>\n            </div>`},setupMatchDetailsUI:function(a){t.$("#attack-momentum-chart").removeAttr("style"),e.setupMatchDetailsUI(a)},resetTabStates:function(){e.resetTabStates()},updateWithServerData:function(e,n){if(!e||!e.success)return;const o=e.data;void 0!==o.aggregatedWinnerCode&&(t.$("#match-details .qualified-icon").remove(),1===o.aggregatedWinnerCode?t.$("#match-details .live-scores-team.home .live-scores-team-name").append('<i class="fas fa-arrow-up qualified-icon" title="Tur Atlayan Takım"></i>'):2===o.aggregatedWinnerCode&&t.$("#match-details .live-scores-team.away .live-scores-team-name").append('<i class="fas fa-arrow-up qualified-icon" title="Tur Atlayan Takım"></i>'));const s=`matchDetail_previousScore_${n}`;let r=null;try{a&&"function"==typeof a.getFromCacheByType&&a.CACHE_PREFIX&&(r=a.getFromCacheByType(s,a.CACHE_PREFIX.MATCH_DETAIL))}catch(e){}const c=r&&r.score&&"null"!==r.score&&"null - null"!==r.score&&"-"!==r.score&&""!==r.score.trim(),l=o.previousScore&&"null"!==o.previousScore&&"null - null"!==o.previousScore&&"-"!==o.previousScore&&""!==o.previousScore.trim();if(c)d(r.score);else if(l&&null!==o.previousLegEventId){d(o.previousScore);try{if(a&&"function"==typeof a.setToCacheByType&&a.CACHE_PREFIX){const e=window.LiveScoreApp.Constants.getCacheTTL("MATCH_INCIDENTS","live");a.setToCacheByType(s,{score:o.previousScore,eventId:o.previousLegEventId},e,a.CACHE_PREFIX.MATCH_DETAIL)}}catch(e){}}else t.$("#match-details .previous-leg-score").remove();function d(e){const a=t.$("#match-details .live-scores-match-time");a.next(".previous-leg-score").length?a.next(".previous-leg-score").text(`İMS: ${e}`):a.after(`<div class="previous-leg-score">İMS: ${e}</div>`)}if(void 0!==o.homeTeamDisplayScore&&void 0!==o.awayTeamDisplayScore){const e=t.$("#match-details .md-hero__score-num");e.length>=2&&(e.eq(0).text(o.homeTeamDisplayScore),e.eq(1).text(o.awayTeamDisplayScore))}else if(void 0!==o.homeTeamScore&&void 0!==o.awayTeamScore){const e=t.$("#match-details .md-hero__score-num");e.length>=2&&(e.eq(0).text(o.homeTeamScore),e.eq(1).text(o.awayTeamScore))}if(o.matchTime){const e=t.$("#match-details .live-scores-match-time"),a=(e.html()||"").trim();let s=o.matchTime;o.matchTime.includes('<span class="match-status')||(i?s=i.formatMinute(o.matchTime,"finished"===o.matchStatus?"finished":"notstarted"===o.matchStatus?"notstarted":"2nd half",n,o):o.matchTime.match(/Bitti|Başlamadı|Ertelendi|Gecikme/)||(s=o.matchTime.replace("'","")+'<span class="blinking-quote">\'</span>')),a!==s.trim()&&e.html(s),e.attr("data-match-id",n)}const u=`matchDetail_aggregateScore_${n}`;let p=null;try{a&&"function"==typeof a.getFromCacheByType&&a.CACHE_PREFIX&&(p=a.getFromCacheByType(u,a.CACHE_PREFIX.MATCH_DETAIL))}catch(e){}const m=p&&null!==p.homeScore&&void 0!==p.homeScore&&null!==p.awayScore&&void 0!==p.awayScore,h=null!==o.homeAggregatedScore&&void 0!==o.homeAggregatedScore&&null!==o.awayAggregatedScore&&void 0!==o.awayAggregatedScore;if(m)v(p.homeScore,p.awayScore);else if(h){v(o.homeAggregatedScore,o.awayAggregatedScore);try{if(a&&"function"==typeof a.setToCacheByType&&a.CACHE_PREFIX){const e=window.LiveScoreApp.Constants.getCacheTTL("MATCH_INCIDENTS","live");a.setToCacheByType(u,{homeScore:o.homeAggregatedScore,awayScore:o.awayAggregatedScore},e,a.CACHE_PREFIX.MATCH_DETAIL)}}catch(e){}}else t.$("#match-details .md-hero__extra .aggregate-ims").remove();function v(e,a){const i=`<span class="aggregate-ims" title="Toplam Skor (İki Aşamalı)"><strong>Top:</strong> ${e}-${a}</span>`,n=t.$("#match-details .md-hero__extra");if(n.length){const e=n.find(".aggregate-ims");e.length?e.replaceWith(i):n.prepend(i)}else t.$("#match-details .md-hero__center .md-hero__score").after(`<div class="md-hero__extra">${i}</div>`)}const y=`matchDetail_penaltyScore_${n}`;let w=null;try{a&&"function"==typeof a.getFromCacheByType&&a.CACHE_PREFIX&&(w=a.getFromCacheByType(y,a.CACHE_PREFIX.MATCH_DETAIL))}catch(e){}const f=w&&null!==w.homeScore&&void 0!==w.homeScore&&null!==w.awayScore&&void 0!==w.awayScore,g=null!==o.homePenaltiesScore&&void 0!==o.homePenaltiesScore&&null!==o.awayPenaltiesScore&&void 0!==o.awayPenaltiesScore;if(f)S(w.homeScore,w.awayScore);else if(g){S(o.homePenaltiesScore,o.awayPenaltiesScore);try{if(a&&"function"==typeof a.setToCacheByType&&a.CACHE_PREFIX){const e=window.LiveScoreApp.Constants.getCacheTTL("MATCH_INCIDENTS","live");a.setToCacheByType(y,{homeScore:o.homePenaltiesScore,awayScore:o.awayPenaltiesScore},e,a.CACHE_PREFIX.MATCH_DETAIL)}}catch(e){}}else t.$("#match-details .md-hero__extra .aggregate-penalty").remove();function S(e,a){const i=`<span class="aggregate-penalty" title="Penaltı Atışı"><strong>Pen:</strong> ${e}-${a}</span>`,n=t.$("#match-details .md-hero__extra");if(n.length){const e=n.find(".aggregate-penalty");e.length?e.replaceWith(i):n.append(i)}else t.$("#match-details .md-hero__center .md-hero__score").after(`<div class="md-hero__extra">${i}</div>`)}}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.Skeleton=function(){function e(e=5){let t="";for(let a=0;a<e;a++)t+='\n            <div class="live-scores-match skeleton-match">\n                <div class="live-scores-time-container">\n                    <div class="live-scores-time skeleton-pulse"></div>\n                    <div class="live-scores-minute skeleton-pulse"></div>\n                </div>\n                <div class="live-scores-teams">\n                    <div class="live-scores-team">\n                        <div class="team-logo skeleton-pulse"></div>\n                        <div class="live-scores-name skeleton-pulse"></div>\n                        <div class="live-scores-score skeleton-pulse"></div>\n                    </div>\n                    <div class="live-scores-team">\n                        <div class="team-logo skeleton-pulse"></div>\n                        <div class="live-scores-name skeleton-pulse"></div>\n                        <div class="live-scores-score skeleton-pulse"></div>\n                    </div>\n                </div>\n            </div>';return t}function t(t=2){let a="";for(let i=0;i<t;i++)a+=`\n            <div class="live-scores-tournament">\n                <div class="live-scores-tournament-card">\n                    <div class="live-scores-tournament-flag skeleton-pulse"></div>\n                    <h3 class="live-scores-tournament-title skeleton-pulse"></h3>\n                </div>\n                ${e(Math.floor(3*Math.random())+2)}\n            </div>`;return a}function a(){let e='\n        <div class="statistics-period-selection" style="background-color: #f5f5f5; border-radius: 10px; padding: 6px;">\n            <div class="skeleton-pulse" style="width: 80px; height: 30px; border-radius: 8px; margin: 0 5px; flex: 1;"></div>\n            <div class="skeleton-pulse" style="width: 80px; height: 30px; border-radius: 8px; margin: 0 5px; flex: 1;"></div>\n            <div class="skeleton-pulse" style="width: 80px; height: 30px; border-radius: 8px; margin: 0 5px; flex: 1;"></div>\n        </div>';e+='\n        <div style="margin: 20px 0 25px 0;">\n            <div class="skeleton-pulse" style="width: 70%; height: 20px; border-radius: 8px; margin: 0 auto 16px auto; border-left: 3px solid #f0f0f0;"></div>\n        ';for(let t=0;t<3;t++)e+='\n            <div class="live-scores-stat-row" style="margin-bottom: 24px;">\n                <div class="skeleton-pulse" style="width: 50%; height: 16px; margin: 0 auto 10px auto;"></div>\n                <div class="live-scores-stat-bar-container" style="height: 10px; background-color: #f0f0f0; border-radius: 10px; overflow: hidden;">\n                    <div class="skeleton-pulse" style="width: 100%; height: 10px;"></div>\n                </div>\n                <div style="display: flex; justify-content: space-between; margin-top: 5px;">\n                    <div class="skeleton-pulse" style="width: 30px; height: 18px; border-radius: 4px;"></div>\n                    <div class="skeleton-pulse" style="width: 30px; height: 18px; border-radius: 4px;"></div>\n                </div>\n            </div>';e+='\n            <div class="skeleton-pulse" style="width: 60%; height: 20px; border-radius: 8px; margin: 30px auto 20px auto; border-left: 3px solid #f0f0f0;"></div>\n        ';for(let t=0;t<2;t++)e+='\n            <div class="live-scores-stat-row" style="margin-bottom: 24px;">\n                <div class="skeleton-pulse" style="width: 45%; height: 16px; margin: 0 auto 10px auto;"></div>\n                <div style="display: flex; justify-content: space-between; align-items: center; margin-top: 10px;">\n                    <div style="display: flex; flex-direction: column; align-items: center; width: 48%;">\n                        <div class="skeleton-pulse-slow" style="width: 60px; height: 60px; border-radius: 50%;"></div>\n                        <div class="skeleton-pulse" style="width: 40px; height: 14px; margin-top: 8px;"></div>\n                    </div>\n                    <div style="display: flex; flex-direction: column; align-items: center; width: 48%;">\n                        <div class="skeleton-pulse-slow" style="width: 60px; height: 60px; border-radius: 50%;"></div>\n                        <div class="skeleton-pulse" style="width: 40px; height: 14px; margin-top: 8px;"></div>\n                    </div>\n                </div>\n            </div>';return e+="</div>",e}function i(){let e='\n        <div class="history-buttons">\n            <div class="skeleton-pulse" style="width: 80px; height: 30px; border-radius: 5px; margin: 0 5px;"></div>\n            <div class="skeleton-pulse" style="width: 80px; height: 30px; border-radius: 5px; margin: 0 5px;"></div>\n            <div class="skeleton-pulse" style="width: 80px; height: 30px; border-radius: 5px; margin: 0 5px;"></div>\n        </div>\n        <div class="h2h-content">';for(let t=0;t<5;t++)e+='\n            <div class="h2h-match-card match-card">\n                <div class="h2h-time-container time-container">\n                    <div class="h2h-time time skeleton-pulse" style="width: 60px; height: 14px;"></div>\n                </div>\n                <div class="h2h-teams teams">\n                    <div class="h2h-team team">\n                        <div class="h2h-team-logo team-logo skeleton-pulse"></div>\n                        <div class="h2h-team-name team-name skeleton-pulse" style="width: 120px; height: 14px;"></div>\n                    </div>\n                    <div class="h2h-score-card score-card skeleton-pulse"></div>\n                    <div class="h2h-team team">\n                        <div class="h2h-team-logo team-logo skeleton-pulse"></div>\n                        <div class="h2h-team-name team-name skeleton-pulse" style="width: 120px; height: 14px;"></div>\n                    </div>\n                </div>\n            </div>';return e+="</div>",e}function n(){let e='<div class="performance-container">';for(let t=0;t<2;t++){e+='<div class="performance-team">';for(let t=0;t<4;t++)e+='\n                <div class="performance-card">\n                    <div class="match-date">\n                        <div class="skeleton-pulse" style="width: 80px; height: 12px;"></div>\n                        <div class="tournament-name skeleton-pulse" style="width: 120px; height: 12px;"></div>\n                    </div>\n                    <div class="match-teams">\n                        <div class="team-score-row">\n                            <div class="team">\n                                <div class="team-logo skeleton-pulse"></div>\n                                <div class="team-name skeleton-pulse" style="width: 100px; height: 14px;"></div>\n                            </div>\n                            <div class="match-score skeleton-pulse" style="width: 20px; height: 18px;"></div>\n                        </div>\n                        <div class="team-score-row">\n                            <div class="team">\n                                <div class="team-logo skeleton-pulse"></div>\n                                <div class="team-name skeleton-pulse" style="width: 100px; height: 14px;"></div>\n                            </div>\n                            <div class="match-score skeleton-pulse" style="width: 20px; height: 18px;"></div>\n                        </div>\n                    </div>\n                </div>';e+="</div>"}return e+="</div>",e}function o(){let e='\n        <div class="standings-period-selection">\n            <div class="skeleton-pulse" style="width: 80px; height: 30px; border-radius: 5px; margin: 0 5px; display: inline-block;"></div>\n            <div class="skeleton-pulse" style="width: 80px; height: 30px; border-radius: 5px; margin: 0 5px; display: inline-block;"></div>\n        </div>\n        <table class="standings-table">\n            <thead>\n                <tr>\n                    <th class="position-cell skeleton-pulse"></th>\n                    <th class="team-cell skeleton-pulse"></th>\n                    <th class="matches-cell skeleton-pulse"></th>\n                    <th class="wins-cell skeleton-pulse"></th>\n                    <th class="draws-cell skeleton-pulse"></th>\n                    <th class="losses-cell skeleton-pulse"></th>\n                    <th class="goals-cell skeleton-pulse"></th>\n                    <th class="points-cell skeleton-pulse"></th>\n                </tr>\n            </thead>\n            <tbody>';for(let t=0;t<8;t++)e+='\n                <tr>\n                    <td class="position-cell skeleton-pulse"></td>\n                    <td class="team-cell skeleton-pulse"></td>\n                    <td class="matches-cell skeleton-pulse"></td>\n                    <td class="wins-cell skeleton-pulse"></td>\n                    <td class="draws-cell skeleton-pulse"></td>\n                    <td class="losses-cell skeleton-pulse"></td>\n                    <td class="goals-cell skeleton-pulse"></td>\n                    <td class="points-cell skeleton-pulse"></td>\n                </tr>';return e+="\n            </tbody>\n        </table>",e}function s(){let e="";for(let t=0;t<6;t++)e+=`\n            <div class="incident ${t%2==0?"home-incident":"away-incident"}">\n                <div class="incident-time skeleton-pulse" style="width: 30px; height: 14px;"></div>\n                <div class="incident-details">\n                    <div class="skeleton-pulse" style="width: 16px; height: 16px; border-radius: 50%; margin-right: 5px;"></div>\n                    <div class="incident-player skeleton-pulse" style="width: 100px; height: 14px;"></div>\n                </div>\n            </div>`;return e}return document.addEventListener("DOMContentLoaded",function(){const e=document.createElement("div");e.className="skeleton-pulse",e.style.position="absolute",e.style.left="-9999px",e.style.width="20px",e.style.height="20px",document.body.appendChild(e);const t=window.getComputedStyle(e);if(t.animation||t.webkitAnimation);else if(!document.getElementById("skeleton-inline-styles")){const e=document.createElement("style");e.id="skeleton-inline-styles",e.textContent='\n            /* Temel skeleton çerçevesi */\n            .skeleton-match,\n            .skeleton-tournament,\n            .skeleton-pulse,\n            .skeleton-pulse-slow {\n                background-color: #e9ecef;\n                border-radius: 4px;\n                position: relative;\n                overflow: hidden;\n            }\n\n            /* Pulse Animation - Hızlı */\n            .skeleton-pulse::after {\n                content: "";\n                display: block;\n                position: absolute;\n                top: 0;\n                left: 0;\n                right: 0;\n                bottom: 0;\n                background: linear-gradient(90deg, \n                            rgba(255, 255, 255, 0) 0%, \n                            rgba(255, 255, 255, 0.4) 50%, \n                            rgba(255, 255, 255, 0) 100%);\n                animation: pulse 1.5s ease-in-out infinite;\n            }\n\n            /* Pulse Animation - Yavaş */\n            .skeleton-pulse-slow::after {\n                content: "";\n                display: block;\n                position: absolute;\n                top: 0;\n                left: 0;\n                right: 0;\n                bottom: 0;\n                background: linear-gradient(90deg, \n                            rgba(255, 255, 255, 0) 0%, \n                            rgba(255, 255, 255, 0.4) 50%, \n                            rgba(255, 255, 255, 0) 100%);\n                animation: pulse 2.5s ease-in-out infinite;\n            }\n\n            @keyframes pulse {\n                0% {\n                    transform: translateX(-100%);\n                }\n                100% {\n                    transform: translateX(100%);\n                }\n            }\n            ',document.head.appendChild(e)}document.body.removeChild(e)}),{getMatchCardSkeleton:e,getTournamentSkeleton:t,getMatchDetailsSkeleton:function(){return'\n        <div class="md-hero">\n            <div class="md-hero__topbar">\n                <div class="skeleton-pulse" style="width: 24px; height: 24px; border-radius: 50%;"></div>\n                <div class="skeleton-pulse" style="width: 120px; height: 14px; border-radius: 8px;"></div>\n                <div class="skeleton-pulse" style="width: 24px; height: 24px; border-radius: 50%;"></div>\n            </div>\n            <div class="md-hero__scoreboard">\n                <div class="md-hero__team">\n                    <div class="md-hero__logo skeleton-pulse"></div>\n                    <div class="skeleton-pulse" style="width: 70px; height: 13px; border-radius: 6px; margin-top: 6px;"></div>\n                </div>\n                <div class="md-hero__center">\n                    <div class="skeleton-pulse" style="width: 90px; height: 40px; border-radius: 10px;"></div>\n                    <div class="skeleton-pulse" style="width: 60px; height: 14px; border-radius: 8px; margin-top: 6px;"></div>\n                </div>\n                <div class="md-hero__team">\n                    <div class="md-hero__logo skeleton-pulse"></div>\n                    <div class="skeleton-pulse" style="width: 70px; height: 13px; border-radius: 6px; margin-top: 6px;"></div>\n                </div>\n            </div>\n        </div>\n        <div class="live-scores-menu">\n            <div class="live-scores-menu-item skeleton-pulse"></div>\n            <div class="live-scores-menu-item skeleton-pulse"></div>\n            <div class="live-scores-menu-item skeleton-pulse"></div>\n            <div class="live-scores-menu-item skeleton-pulse"></div>\n        </div>\n        <div class="live-scores-tab-content live-scores-active">\n            <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 10px;"></div>\n            <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 10px;"></div>\n            <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 10px;"></div>\n            <div class="skeleton-pulse" style="width: 90%; height: 20px;"></div>\n        </div>'},getStatisticsSkeleton:a,getLineupSkeleton:function(){return'\n        <div class="team-info-card home-team-info-card">\n            <div class="team-info">\n                <div class="team-name skeleton-pulse" style="width: 50%; height: 16px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="team-coach skeleton-pulse" style="width: 70%; height: 14px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="team-formation skeleton-pulse" style="width: 30%; height: 14px; background-color: rgba(220,255,220,0.4);"></div>\n            </div>\n        </div>\n        <div class="lineup-field-image-container" style="width: 100%; height: auto; position: relative;">\n            <img src="/images/mac/soccer-field.png" class="lineup-field-image" style="width: 100%; height: auto;" alt="Saha Görseli" width="360" height="540">\n            \n            \x3c!-- Ev sahibi takımı pozisyon yerleşimleri (Yumuşak renkte) --\x3e\n            <div class="skeleton-players home-players">\n                \x3c!-- Kaleci pozisyonu --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 50%; top: 7%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                \n                \x3c!-- Defans pozisyonları - Örnek 4-4-2 için --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 10%; top: 17%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 17%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 17%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 90%; top: 17%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                \n                \x3c!-- Orta saha pozisyonları --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 10%; top: 30%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 30%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 30%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 90%; top: 30%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                \n                \x3c!-- Forvet pozisyonları --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 45%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 45%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n            </div>\n            \n            \x3c!-- Deplasman takımı pozisyon yerleşimleri (Yumuşak renkte) --\x3e\n            <div class="skeleton-players away-players">\n                \x3c!-- Kaleci pozisyonu --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 50%; top: 94%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                \n                \x3c!-- Defans pozisyonları - Örnek 4-4-2 için --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 10%; top: 83%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 83%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 83%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 90%; top: 83%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                \n                \x3c!-- Orta saha pozisyonları --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 10%; top: 70%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 70%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 70%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 90%; top: 70%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                \n                \x3c!-- Forvet pozisyonları --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 55%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 55%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n            </div>\n        </div>\n        <div class="team-info-card away-team-info-card">\n            <div class="team-info">\n                <div class="team-name skeleton-pulse" style="width: 50%; height: 16px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="team-coach skeleton-pulse" style="width: 70%; height: 14px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="team-formation skeleton-pulse" style="width: 30%; height: 14px; background-color: rgba(220,255,220,0.4);"></div>\n            </div>\n        </div>\n        \n        \x3c!-- Yedek oyuncular bölümü iskelet yapısı --\x3e\n        <div class="substitutes-wrapper" style="margin-top: 20px; display: flex; justify-content: space-between;">\n            <div style="width: 48%;">\n                <div class="skeleton-pulse" style="width: 100%; height: 30px; margin-bottom: 10px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 5px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 5px; background-color: rgba(220,255,220,0.4);"></div>\n            </div>\n            <div style="width: 48%;">\n                <div class="skeleton-pulse" style="width: 100%; height: 30px; margin-bottom: 10px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 5px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 5px; background-color: rgba(220,255,220,0.4);"></div>\n            </div>\n        </div>'},getH2HSkeleton:i,getPerformanceSkeleton:n,getStandingsSkeleton:o,getIncidentsSkeleton:s,getSkeleton:function(r,c={}){switch(r){case"matchCard":default:return e(c.count||5);case"tournament":return t(c.count||2);case"matchDetails":return'\n        <div class="md-hero">\n            <div class="md-hero__topbar">\n                <div class="skeleton-pulse" style="width: 24px; height: 24px; border-radius: 50%;"></div>\n                <div class="skeleton-pulse" style="width: 120px; height: 14px; border-radius: 8px;"></div>\n                <div class="skeleton-pulse" style="width: 24px; height: 24px; border-radius: 50%;"></div>\n            </div>\n            <div class="md-hero__scoreboard">\n                <div class="md-hero__team">\n                    <div class="md-hero__logo skeleton-pulse"></div>\n                    <div class="skeleton-pulse" style="width: 70px; height: 13px; border-radius: 6px; margin-top: 6px;"></div>\n                </div>\n                <div class="md-hero__center">\n                    <div class="skeleton-pulse" style="width: 90px; height: 40px; border-radius: 10px;"></div>\n                    <div class="skeleton-pulse" style="width: 60px; height: 14px; border-radius: 8px; margin-top: 6px;"></div>\n                </div>\n                <div class="md-hero__team">\n                    <div class="md-hero__logo skeleton-pulse"></div>\n                    <div class="skeleton-pulse" style="width: 70px; height: 13px; border-radius: 6px; margin-top: 6px;"></div>\n                </div>\n            </div>\n        </div>\n        <div class="live-scores-menu">\n            <div class="live-scores-menu-item skeleton-pulse"></div>\n            <div class="live-scores-menu-item skeleton-pulse"></div>\n            <div class="live-scores-menu-item skeleton-pulse"></div>\n            <div class="live-scores-menu-item skeleton-pulse"></div>\n        </div>\n        <div class="live-scores-tab-content live-scores-active">\n            <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 10px;"></div>\n            <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 10px;"></div>\n            <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 10px;"></div>\n            <div class="skeleton-pulse" style="width: 90%; height: 20px;"></div>\n        </div>';case"statistics":return a();case"lineup":return'\n        <div class="team-info-card home-team-info-card">\n            <div class="team-info">\n                <div class="team-name skeleton-pulse" style="width: 50%; height: 16px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="team-coach skeleton-pulse" style="width: 70%; height: 14px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="team-formation skeleton-pulse" style="width: 30%; height: 14px; background-color: rgba(220,255,220,0.4);"></div>\n            </div>\n        </div>\n        <div class="lineup-field-image-container" style="width: 100%; height: auto; position: relative;">\n            <img src="/images/mac/soccer-field.png" class="lineup-field-image" style="width: 100%; height: auto;" alt="Saha Görseli" width="360" height="540">\n            \n            \x3c!-- Ev sahibi takımı pozisyon yerleşimleri (Yumuşak renkte) --\x3e\n            <div class="skeleton-players home-players">\n                \x3c!-- Kaleci pozisyonu --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 50%; top: 7%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                \n                \x3c!-- Defans pozisyonları - Örnek 4-4-2 için --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 10%; top: 17%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 17%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 17%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 90%; top: 17%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                \n                \x3c!-- Orta saha pozisyonları --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 10%; top: 30%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 30%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 30%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 90%; top: 30%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                \n                \x3c!-- Forvet pozisyonları --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 45%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 45%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(220,240,255,0.3); border: 1px solid rgba(200,220,255,0.5);"></div>\n                </div>\n            </div>\n            \n            \x3c!-- Deplasman takımı pozisyon yerleşimleri (Yumuşak renkte) --\x3e\n            <div class="skeleton-players away-players">\n                \x3c!-- Kaleci pozisyonu --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 50%; top: 94%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                \n                \x3c!-- Defans pozisyonları - Örnek 4-4-2 için --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 10%; top: 83%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 83%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 83%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 90%; top: 83%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                \n                \x3c!-- Orta saha pozisyonları --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 10%; top: 70%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 70%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 70%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 90%; top: 70%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                \n                \x3c!-- Forvet pozisyonları --\x3e\n                <div class="skeleton-player" style="position: absolute; left: 35%; top: 55%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n                <div class="skeleton-player" style="position: absolute; left: 65%; top: 55%; transform: translate(-50%, -50%);">\n                    <div class="skeleton-player-circle" style="width: 22px; height: 22px; border-radius: 50%; background-color: rgba(255,240,240,0.3); border: 1px solid rgba(255,220,220,0.5);"></div>\n                </div>\n            </div>\n        </div>\n        <div class="team-info-card away-team-info-card">\n            <div class="team-info">\n                <div class="team-name skeleton-pulse" style="width: 50%; height: 16px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="team-coach skeleton-pulse" style="width: 70%; height: 14px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="team-formation skeleton-pulse" style="width: 30%; height: 14px; background-color: rgba(220,255,220,0.4);"></div>\n            </div>\n        </div>\n        \n        \x3c!-- Yedek oyuncular bölümü iskelet yapısı --\x3e\n        <div class="substitutes-wrapper" style="margin-top: 20px; display: flex; justify-content: space-between;">\n            <div style="width: 48%;">\n                <div class="skeleton-pulse" style="width: 100%; height: 30px; margin-bottom: 10px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 5px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 5px; background-color: rgba(220,255,220,0.4);"></div>\n            </div>\n            <div style="width: 48%;">\n                <div class="skeleton-pulse" style="width: 100%; height: 30px; margin-bottom: 10px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 5px; background-color: rgba(220,255,220,0.4);"></div>\n                <div class="skeleton-pulse" style="width: 100%; height: 20px; margin-bottom: 5px; background-color: rgba(220,255,220,0.4);"></div>\n            </div>\n        </div>';case"h2h":return i();case"performance":return n();case"standings":return o();case"incidents":return s()}}}}(),document.addEventListener("DOMContentLoaded",function(){if(document.querySelector("#skeleton-inline-styles"))return;const e=document.createElement("div");e.className="skeleton-pulse",e.style.position="absolute",e.style.left="-9999px",e.style.width="20px",e.style.height="20px",document.body.appendChild(e);const t=window.getComputedStyle(e),a=t.animation||t.webkitAnimation;if(document.body.removeChild(e),a)return;const i=document.createElement("style");i.id="skeleton-inline-styles",i.innerHTML='\n        /* Temel skeleton çerçevesi */\n        .skeleton-match,\n        .skeleton-tournament,\n        .skeleton-pulse,\n        .skeleton-pulse-slow {\n            background-color: #e9ecef;\n            border-radius: 4px;\n            position: relative;\n            overflow: hidden;\n        }\n\n        /* Pulse Animation - Hızlı */\n        .skeleton-pulse::after {\n            content: "";\n            display: block;\n            position: absolute;\n            top: 0;\n            left: 0;\n            right: 0;\n            bottom: 0;\n            background: linear-gradient(90deg, \n                        rgba(255, 255, 255, 0) 0%, \n                        rgba(255, 255, 255, 0.4) 50%, \n                        rgba(255, 255, 255, 0) 100%);\n            animation: pulse 1.5s ease-in-out infinite;\n        }\n\n        /* Pulse Animation - Yavaş */\n        .skeleton-pulse-slow::after {\n            content: "";\n            display: block;\n            position: absolute;\n            top: 0;\n            left: 0;\n            right: 0;\n            bottom: 0;\n            background: linear-gradient(90deg, \n                        rgba(255, 255, 255, 0) 0%, \n                        rgba(255, 255, 255, 0.4) 50%, \n                        rgba(255, 255, 255, 0) 100%);\n            animation: pulse 2.5s ease-in-out infinite;\n        }\n\n        @keyframes pulse {\n            0% {\n                transform: translateX(-100%);\n            }\n            100% {\n                transform: translateX(100%);\n            }\n        }\n\n        /* Skeleton boyutları */\n        .skeleton-match .live-scores-time {\n            width: 45px;\n            height: 14px;\n            margin: 4px auto;\n        }\n\n        .skeleton-match .live-scores-minute {\n            width: 30px;\n            height: 12px;\n            margin: 0 auto;\n        }\n\n        .skeleton-match .team-logo {\n            width: 20px;\n            height: 20px;\n            border-radius: 50%;\n        }\n\n        .skeleton-match .live-scores-name {\n            width: 100px;\n            height: 14px;\n            margin: 4px 0;\n        }\n\n        .skeleton-match .live-scores-score {\n            width: 20px;\n            height: 18px;\n            margin-left: auto;\n        }\n\n        /* Turnuva skeleton özellikleri */\n        .skeleton-match .live-scores-tournament-flag {\n            width: 24px;\n            height: 24px;\n            border-radius: 50%;\n        }\n\n        .skeleton-match .live-scores-tournament-title {\n            width: 200px;\n            height: 18px;\n            margin-left: 10px;\n        }\n\n        /* Maç detayları skeleton özellikleri */\n        .match-details-team-logo.skeleton-pulse {\n            width: 75px;\n            height: 75px;\n            border-radius: 50%;\n            margin: 0 auto 10px auto;\n        }\n\n        .match-details-team-name.skeleton-pulse {\n            width: 100px;\n            height: 16px;\n            margin: 5px auto;\n        }\n\n        .live-scores-team-score.skeleton-pulse {\n            width: 30px;\n            height: 30px;\n            margin: 10px auto;\n        }\n\n        .live-scores-match-time.skeleton-pulse {\n            width: 60px;\n            height: 18px;\n            margin: 5px auto;\n        }\n\n        .previous-leg-score.skeleton-pulse {\n            width: 80px;\n            height: 14px;\n            margin: 5px auto;\n        }\n\n        /* Sekmeler için skeleton */\n        .live-scores-menu-item.skeleton-pulse {\n            width: 70px;\n            height: 20px;\n            display: inline-block;\n            margin: 0 10px;\n        }\n\n        /* Mobil uyumlu boyutlar */\n        @media (max-width: 768px){\n            .match-details-team-logo.skeleton-pulse {\n                width: 50px;\n                height: 50px;\n            }\n            \n            .skeleton-match .live-scores-name {\n                width: 80px;\n            }\n        }',document.head.appendChild(i)}),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.AttackMomentum=function(){const e=window.LiveScoreApp.Utils.Cache,t=(window.LiveScoreApp.Config,window.LiveScoreApp.Utils.RequestQueue,window.LiveScoreApp.Utils.jQuery),a=(window.LiveScoreApp.Utils.Compression,new Map);function i(e){return a.has(e)||a.set(e,{chart:null,data:null,interval:null}),a.get(e)}function n(e,t="background"){const a=e>=0;return"background"===t?a?"rgba(0, 180, 0, 0.3)":"rgba(0, 0, 200, 0.3)":"border"===t?a?"rgba(0, 180, 0, 1)":"rgba(0, 0, 200, 1)":"rgba(0, 0, 0, 0.5)"}function o(e){if(!e||!Array.isArray(e))return{labels:[],data:[],backgroundColors:[],borderColors:[]};const t=[],a=[],i=[],o=[];for(let s=1;s<=90;s++){t.push(s);const r=e.find(e=>e.minute==s),c=r?r.value:0;a.push(c),i.push(n(c,"background")),o.push(n(c,"border"))}return e.filter(e=>e.minute>90).forEach(e=>{t.push(e.minute),a.push(e.value),i.push(n(e.value,"background")),o.push(n(e.value,"border"))}),{labels:t,data:a,backgroundColors:i,borderColors:o}}function s(e){const t={},a={},i={},n={};return Array.isArray(e)?(e.forEach((e,o)=>{if(!e.time&&0!==e.time)return;const s=e.time,r=!0===e.isHome,c="cancelled"===e.status||!0===e.isCancelled;"goal"===e.incidentType&&(c?(a[s]||(a[s]={home:0,away:0}),r?a[s].home++:a[s].away++):(t[s]||(t[s]={home:0,away:0}),r?t[s].home++:t[s].away++)),"card"===e.incidentType&&"red"===e.incidentClass&&(i[s]||(i[s]={home:0,away:0}),r?i[s].home++:i[s].away++),"card"===e.incidentType&&"yellowRed"===e.incidentClass&&(n[s]||(n[s]={home:0,away:0}),r?n[s].home++:n[s].away++)}),{goalsByMinute:t,cancelledGoalsByMinute:a,cardsByMinute:i,yellowRedsByMinute:n}):{goalsByMinute:t,cancelledGoalsByMinute:a,cardsByMinute:i,yellowRedsByMinute:n}}function r(e){if(!e||"object"!=typeof e)return!1;if(!0!==e.success)return!1;if(!e.data||"object"!=typeof e.data)return!1;e.data.incidents=function(e){if(Array.isArray(e))return e;if(e&&"object"==typeof e){const t=Object.values(e);let a=null;for(let e=0;e<t.length;e++){const i=t[e];if(Array.isArray(i)&&0!==i.length&&i.some(e=>"object"==typeof e&&null!==e&&"incidentType"in e)){a=i;break}}return Array.isArray(a)?a:t.filter(e=>e&&"object"==typeof e&&!Array.isArray(e))}return[]}(e.data.incidents);const t=function(e){if(!Array.isArray(e))return!1;if(0===e.length)return!0;for(let t=0;t<e.length;t++){const a=e[t];if(!a||"object"!=typeof a)return!1;if("number"!=typeof a.minute)return!1;if("number"!=typeof a.value)return!1}return!0}(e.data.graphPoints),a=function(e){if(!Array.isArray(e))return!1;if(0===e.length)return!0;for(let t=0;t<e.length;t++){const a=e[t];if(!a||null===a||"object"!=typeof a||Array.isArray(a))return!1}return!0}(e.data.incidents);return!e.data.tournamentId||function(e){if(null==e)return!1;if("string"!=typeof e&&"number"!=typeof e)return!1;const t=String(e).trim();!/^\d+$/.test(t)||parseInt(t,10)}(e.data.tournamentId),!t&&a?(e.data.graphPoints=[],!0):!!t&&(a||(e.data.incidents=[]),!0)}function c(e,t,a){let i="";if(t.goals>0){const e=parseInt(t.goals,10)||0;i+=`<span class="incident-icon goal-icon" data-count="${e}" title="Gol (${e}x)">⚽</span>`}if(t.cancelledGoals>0){const e=parseInt(t.cancelledGoals,10)||0;i+=`<span class="incident-icon cancelled-goal-icon" data-count="${e}" title="İptal edilen gol (${e}x)">❌</span>`}if(t.reds>0){const e=parseInt(t.reds,10)||0;i+=`<span class="incident-icon red-card-icon" data-count="${e}" title="Kırmızı Kart (${e}x)"></span>`}if(t.yellowReds>0){const e=parseInt(t.yellowReds,10)||0;i+=`<span class="incident-icon yellow-red-card-icon" data-count="${e}" title="2. Sarı=Kırmızı (${e}x)"></span>`}return i?`<div class="incident-icons ${a}">${i}</div>`:""}function l(e,a,i,n,o,s,r){const l=t.$("#attack-momentum-graph-canvas");if(!l.length)return;if(!(r&&r.chartArea&&r.scales&&r.scales.x))return;t.$(".incident-icons-container").remove();const d=r.chartArea,u=r.scales.x,p=r.canvas,m=p.offsetLeft,h=p.offsetTop+d.top,v=d.bottom-d.top;let y=0;const w=new Set;Object.keys(e).forEach(e=>w.add(parseInt(e,10))),Object.keys(a).forEach(e=>w.add(parseInt(e,10))),Object.keys(i).forEach(e=>w.add(parseInt(e,10))),Object.keys(n).forEach(e=>w.add(parseInt(e,10)));const f=Array.from(w).sort((e,t)=>e-t).map(t=>{const s=e[t],r=a[t],l=i[t],p=n[t];let h="",v="";s&&(h+=c(0,{goals:s.home,cancelledGoals:0,reds:0,yellowReds:0},"top"),v+=c(0,{goals:s.away,cancelledGoals:0,reds:0,yellowReds:0},"bottom"),y+=s.home+s.away),r&&(h+=c(0,{goals:0,cancelledGoals:r.home,reds:0,yellowReds:0},"top"),v+=c(0,{goals:0,cancelledGoals:r.away,reds:0,yellowReds:0},"bottom"),y+=r.home+r.away),l&&(h+=c(0,{goals:0,cancelledGoals:0,reds:l.home,yellowReds:0},"top"),v+=c(0,{goals:0,cancelledGoals:0,reds:l.away,yellowReds:0},"bottom"),y+=l.home+l.away),p&&(h+=c(0,{goals:0,cancelledGoals:0,reds:0,yellowReds:p.home},"top"),v+=c(0,{goals:0,cancelledGoals:0,reds:0,yellowReds:p.away},"bottom"),y+=p.home+p.away);const w=o.indexOf(t);let f;if(-1!==w)f=m+u.getPixelForValue(w);else{const e=d.right-d.left,a=Math.max(...o)||90;f=m+d.left+t/a*e}return`\n                <div class="minute-incident-overlay" style="left: ${f}px;">\n                    ${h}\n                    ${v}\n                </div>\n            `}).filter(e=>e).join("");if(f){const e=`position:absolute; top:${h}px; left:0; width:100%; height:${v}px; pointer-events:none; z-index:100; overflow:visible;`,a=t.$(`<div class="incident-icons-container" style="${e}">${f}</div>`);l.append(a)}}function d(e,t){const a=e?"finished":"live";return window.LiveScoreApp.Constants.getCacheTTL("ATTACK_MOMENTUM",a)}function u(a,n,o){n||(p(),p(a),i(a).interval=setInterval(function(){if("hidden"===document.visibilityState)return;const i=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails?window.LiveScoreApp.Modules.MatchDetails:null;if("details"===(i?i.getCurrentTab():null)){const n=`${a}_${o}_attack_momentum`,s=e.CACHE_PREFIX.MATCH_DETAIL+n;e.deleteCacheItem&&e.deleteCacheItem(s);const c=document.getElementById("momentumChart")&&window.momentumChart,l=window.LiveScoreApp.Utils.RequestIdGenerator,u=l?l.generateId(a,"get_attack_momentum_auto"):null;("undefined"!=typeof QueuedAjax&&QueuedAjax?QueuedAjax.request("get_attack_momentum",{match_id:a,request_id:u}):t.ajax({url:"/wp-admin/admin-ajax.php",type:"POST",data:{action:"get_attack_momentum",match_id:a,request_id:u,nonce:window.liveScoresNonce||""}})).then(function(s){var p=s.data&&s.data.request_id?s.data.request_id:s.request_id;if((!u||!p||l.validateResponse(a,p))&&r(s)&&s&&s.success&&s.data&&s.data.graphPoints&&s.data.graphPoints.length>0&&c&&i&&"details"===i.getCurrentTab()){const a=t.$(".attack-momentum-team-logo.home-team-logo img").attr("src"),i=t.$(".attack-momentum-team-logo.away-team-logo img").attr("src"),r={graphPoints:s.data.graphPoints,homeTeamLogo:a,awayTeamLogo:i,incidents:(s.data.incidents||[]).filter((e,t,a)=>a.findIndex(t=>t.minute===e.minute&&t.type===e.type)===t),tournamentId:s.data.tournamentId||o},c=d(!1);c>0&&e.setToCacheByType(n,r,c,e.CACHE_PREFIX.MATCH_DETAIL),m(s.data.graphPoints,s.data.incidents,s.data.tournamentId||o)}}).catch(function(e){})}},3e4))}function p(e=null){if(e){const t=a.get(e);t&&t.interval&&(clearInterval(t.interval),t.interval=null)}else a.forEach(e=>{e.interval&&(clearInterval(e.interval),e.interval=null)}),window.attackMomentumUpdateInterval&&(clearInterval(window.attackMomentumUpdateInterval),window.attackMomentumUpdateInterval=null)}function m(e,a,i=null){if(!window.momentumChart||!e||!e.length)return;const n=o(e);n.labels.length>window.momentumChart.data.labels.length&&(window.momentumChart.data.labels=n.labels),window.momentumChart.data.datasets[0].data=n.data,window.momentumChart.data.datasets[0].backgroundColor=n.backgroundColors,window.momentumChart.data.datasets[0].borderColor=n.borderColors,window.momentumChart.update("none");const r=t.$('.live-scores-match[data-match-id="'+window.currentMatchId+'"]').find(".live-scores-team.home").data("team-id");if(a&&a.length>0){const{goalsByMinute:e,cancelledGoalsByMinute:t,cardsByMinute:i,yellowRedsByMinute:o}=s(a);window.momentumChart._incidentData={goalsByMinute:e,cancelledGoalsByMinute:t,cardsByMinute:i,yellowRedsByMinute:o,labels:n.labels,homeTeamId:r},l(e,t,i,o,n.labels,0,window.momentumChart)}}function h(a,i,n){const o=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails?window.LiveScoreApp.Modules.MatchDetails:null,s=t.$('.live-scores-match[data-match-id="'+a+'"]'),c=s.data("tournament-id"),l=`${a}_${c}_attack_momentum`,p=e.getFromCacheByType(l,e.CACHE_PREFIX.MATCH_DETAIL),m=o?o.getCurrentTab():null;if(p){try{t.$("#attack-momentum-chart").show(),v(p.graphPoints,p.homeTeamLogo,p.awayTeamLogo,p.incidents||[],p.tournamentId,null,a),u(a,i,p.tournamentId);const e=p.graphPoints&&Array.isArray(p.graphPoints)&&p.graphPoints.length>0;n(e)}catch(e){n(!1)}return}const h=s.data("status"),y=s.find(".live-scores-team.home .team-logo").attr("src"),w=s.find(".live-scores-team.away .team-logo").attr("src"),f=s.data("status"),g=d("finished"===f||"cancelled"===f);if("notstarted"===h)return t.$("#attack-momentum-chart").html(""),void n(!1);"details"===m&&t.$("#attack-momentum-chart").empty().show();const S=window.LiveScoreApp.Utils.RequestIdGenerator,A=S?S.generateId(a,"get_attack_momentum"):null;return("undefined"!=typeof QueuedAjax&&QueuedAjax?QueuedAjax.request("get_attack_momentum",{match_id:a,request_id:A,match_status:h||"",tournament_id:c||""}):t.ajax({url:"/wp-admin/admin-ajax.php",type:"POST",data:{action:"get_attack_momentum",match_id:a,request_id:A,match_status:h||"",tournament_id:c||"",nonce:window.liveScoresNonce||""}})).then(function(o){if(!r(o))return t.$("#attack-momentum-chart").html("<p>Hücum verisi yüklenemedi. Lütfen sayfayı yenileyin.</p>"),void n(!1);const s=o&&o.data&&o.data.graphPoints&&o.data.graphPoints.length>0;if(o&&o.data&&o.data.incidents&&o.data.incidents.length,s){const s={graphPoints:o.data.graphPoints,homeTeamLogo:y,awayTeamLogo:w,incidents:o.data.incidents||[],tournamentId:o.data.tournamentId||c};g>0&&e.setToCacheByType(l,s,g,e.CACHE_PREFIX.MATCH_DETAIL),"details"===m?(t.$("#attack-momentum-chart").show(),v(s.graphPoints,y,w,s.incidents,s.tournamentId,n,a),i||u(a,i,s.tournamentId)):n(!0)}else o&&o.data&&o.data.message?(t.$("#attack-momentum-chart").html(`<p>${o.data.message}</p>`).show(),n(!1)):(g>0&&e.setToCacheByType(l,{graphPoints:[],homeTeamLogo:y,awayTeamLogo:w},g,e.CACHE_PREFIX.MATCH_DETAIL),"details"===m&&t.$("#attack-momentum-chart").hide(),n(!1))}).catch(function(e){n(!1)})}function v(e,a,n,r=[],c,d,u){if(!e||0===e.length)return t.$("#attack-momentum-chart").hide(),void(d&&d(!1));t.$("#attack-momentum-chart").show(),window.momentumChartData={graphPoints:e,homeTeamLogo:a,awayTeamLogo:n,incidents:r,tournamentId:c,matchId:u,callbackFn:d},t.$("#attack-momentum-chart").html(""),window.LiveScoreApp&&window.LiveScoreApp.loadChartJS?window.LiveScoreApp.loadChartJS(function(e){if(e){const e=t.$('.live-scores-match[data-match-id="'+window.currentMatchId+'"]');if(0===e.length)return void(d&&d(!1));const a=e.find(".live-scores-team.home").data("team-id"),n=window.momentumChartData||{},r=n.homeTeamLogo||"",c=n.awayTeamLogo||"",u=n.matchId;!function(e,a,n,r=[],c,d,u){if(!e||0===e.length)return void t.$("#attack-momentum-chart").hide();const p=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails?window.LiveScoreApp.Modules.MatchDetails:null;if("details"!==(p?p.getCurrentTab():null))return;const m=t.$("#attack-momentum-chart");if(0===m.length)return;m.show(),m.html(`\n            <div id="attack-momentum-graph-container">\n                <div class="attack-momentum-team-logo home-team-logo">\n                    <img src="${a}" width="30" height="30" alt="Ev sahibi takım logosu">\n                </div>\n                <div id="attack-momentum-graph-canvas">\n                    <canvas id="momentumChart" role="img" aria-label="Maç baskı grafiği — ev sahibi ve deplasman takımı dakika bazlı baskı yoğunluğu"></canvas>\n                </div>\n                <div class="attack-momentum-team-logo away-team-logo">\n                    <img src="${n}" width="30" height="30" alt="Deplasman takım logosu">\n                </div>\n                <div class="attack-momentum-legend">\n                    <div class="legend-item">\n                        <span class="legend-color home-color"></span>\n                        <span class="legend-text">Ev Sahibi Baskısı</span>\n                    </div>\n                    <div class="legend-item">\n                        <span class="legend-color away-color"></span>\n                        <span class="legend-text">Deplasman Baskısı</span>\n                    </div>\n                </div>\n            </div>\n        `);const h=document.getElementById("momentumChart");if(!h)return;const v=h.getContext("2d");if(!v)return;const y=o(e),w={id:"teamLogoPositioner",afterDraw:function(e){const t=document.getElementById("attack-momentum-graph-container");if(!t||!e.chartArea)return;const a=t.querySelector(".home-team-logo"),i=t.querySelector(".away-team-logo");if(!a&&!i)return;const n=e.chartArea,o=document.getElementById("attack-momentum-graph-canvas");if(!o)return;const s=o.offsetTop+n.top,r=n.bottom-n.top;if(a){const e=s+r/4-10;a.style.top=e+"px",a.style.bottom="auto"}if(i){const e=s+3*r/4-10;i.style.top=e+"px",i.style.bottom="auto"}}},f={id:"customBackground",beforeDraw:function(e){const t=e.ctx,a=e.chartArea,i=a.top,n=a.bottom,o=a.left,s=a.right,r=(i+n)/2;if(t.save(),t.fillStyle="rgba(0, 180, 0, 0.15)",t.fillRect(o,i,s-o,r-i),t.fillStyle="rgba(0, 0, 200, 0.15)",t.fillRect(o,r,s-o,n-r),y.labels.length>0){if(y.labels.length>=45){const e=o+(s-o)*(44/(y.labels.length-1));t.strokeStyle="rgba(0, 0, 0, 0.5)",t.lineWidth=2,t.setLineDash([6,6]),t.beginPath(),t.moveTo(e,i),t.lineTo(e,n),t.stroke()}if(y.labels.length>=90){const e=o+(s-o)*(89/(y.labels.length-1));t.strokeStyle="rgba(0, 0, 0, 0.5)",t.lineWidth=2,t.setLineDash([6,6]),t.beginPath(),t.moveTo(e,i),t.lineTo(e,n),t.stroke()}t.strokeStyle="rgba(0, 0, 0, 0.2)",t.lineWidth=1,t.setLineDash([3,3]),[15,30,60,75].forEach(e=>{if(y.labels.length>=e){const a=o+(s-o)*((e-1)/(y.labels.length-1));t.beginPath(),t.moveTo(a,i),t.lineTo(a,n),t.stroke()}})}t.restore()}},g=u?i(u):null;if(g&&g.chart)try{"undefined"!=typeof Chart&&g.chart instanceof Chart&&g.chart.destroy(),g.chart=null}catch(e){g.chart=null}if(window.momentumChart)try{"undefined"!=typeof Chart&&window.momentumChart instanceof Chart&&window.momentumChart.destroy(),window.momentumChart=null}catch(e){window.momentumChart=null}const S=t.$(window).width();let A=5;S<=480?A=15:S<=768&&(A=10);let L=null;if(r&&r.length>0)try{const e=s(r);L={goalsByMinute:e.goalsByMinute,cancelledGoalsByMinute:e.cancelledGoalsByMinute,cardsByMinute:e.cardsByMinute,yellowRedsByMinute:e.yellowRedsByMinute,labels:y.labels,homeTeamId:c}}catch(e){}const b={id:"incidentIconPositioner",afterDraw:function(e){const t=e._incidentData||L;if(!t)return;if(!e.chartArea||!e.scales||!e.scales.x)return;const a=e.chartArea,i=a.left+"|"+a.top+"|"+a.right+"|"+a.bottom;e._lastAreaKey!==i&&(e._lastAreaKey=i,e._incidentData||(e._incidentData=t),l(t.goalsByMinute,t.cancelledGoalsByMinute,t.cardsByMinute,t.yellowRedsByMinute,t.labels,t.homeTeamId,e))}};try{const e=new Chart(v,{type:"bar",data:{labels:y.labels,datasets:[{label:"Baskı Grafiği",data:y.data,backgroundColor:y.backgroundColors,borderColor:y.borderColors,borderWidth:1}]},options:{responsive:!0,maintainAspectRatio:!1,scales:{x:{grid:{display:!1},ticks:{display:!0,callback:function(e,t){return S<=480?0===e||45===e||90===e?e+"'":"":t%A===0?e:""},font:{size:S<=768?10:12,family:"Arial, sans-serif"}},title:{display:!0,text:"Dakika",font:{size:S<=768?12:14,family:"Arial, sans-serif"}}},y:{beginAtZero:!0,min:-100,max:100,display:!1}},interaction:{intersect:!1,mode:"index"},plugins:{legend:{display:!1},tooltip:{enabled:!1},title:{display:!0,text:"Baskı Grafiği",font:{size:S<=768?16:18,weight:"bold",family:"Arial, sans-serif"},padding:{top:10,bottom:15}}}},plugins:[f,w,b]});r&&r.length,g&&(g.chart=e),window.momentumChart=e,d&&"function"==typeof d&&d(!0)}catch(e){return t.$("#attack-momentum-chart").html(""),void(d&&"function"==typeof d&&d(!1))}}(n.graphPoints,r,c,n.incidents,a,d,u)}else d&&d(!1)}):d&&d(!1)}return"undefined"!=typeof window&&(window.addEventListener("beforeunload",p),window.addEventListener("unload",p),document.addEventListener("visibilitychange",function(){document.hidden&&p()})),{fetchAttackMomentum:h,renderAttackMomentumChart:v,updateAttackMomentumTab:function(e,t,a){return window.console&&window.console.log&&window.console.log("[🔴🔴🔴 DIRECT CONSOLE] updateAttackMomentumTab START",{matchId:e,isFinished:t}),window.currentMatchId=e,new Promise(i=>{const n=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails?window.LiveScoreApp.Modules.MatchDetails:null;if("details"!==(n?n.getCurrentTab():null))return a&&a(!1),void i(!1);h(e,t,function(e){a&&a(e),i(e)})})},setupAutoUpdate:u,stopAutoUpdate:p,updateChartData:m,cleanupIntervals:p}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.Lineups=function(){const e=window.LiveScoreApp.Utils.Cache,t=(window.LiveScoreApp.Config,window.LiveScoreApp.Utils.RequestQueue,window.LiveScoreApp.Utils.Translator),a=window.LiveScoreApp.Utils.jQuery,i=window.LiveScoreApp.Utils.PlayerModuleLoader,n=window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton;function o(e,t){return"undefined"!=typeof QueuedAjax&&QueuedAjax?QueuedAjax.request(e,t).then(s):a.ajax({url:"/wp-admin/admin-ajax.php",type:"POST",data:Object.assign({action:e,nonce:window.liveScoresNonce||""},t)}).then(s)}function s(e){return e&&void 0!==e.success&&e.data?e.data:e}function r(e,t={}){window.LiveScoreApp&&window.LiveScoreApp.debugMode}function c(e,t={}){window.LiveScoreApp&&window.LiveScoreApp.debugMode||e.includes("Error")||e.includes("Failed")}const l=new Map;function d(e){const t=window.LiveScoreApp.currentMatchDetailsData?.[e];return{home:t&&t.homeManagerName||null,away:t&&t.awayManagerName||null}}function u(e){const t=d(e);if(!t.home&&!t.away)return!1;const i=a.$("#tab-lineups");let n=!1;if(t.home){const e=i.find(".home-team-info-card .team-coach");e.length&&-1!==e.text().indexOf("Bilinmiyor")&&(e.text("Teknik Direktör: "+t.home),n=!0)}if(t.away){const e=i.find(".away-team-info-card .team-coach");e.length&&-1!==e.text().indexOf("Bilinmiyor")&&(e.text("Teknik Direktör: "+t.away),n=!0)}return n}function p(){n&&"function"==typeof n.getLineupSkeleton?a.$("#tab-lineups").html(n.getLineupSkeleton()):window.LiveScoreApp.loadSkeletonUI?(a.$("#tab-lineups").html('<div class="loading-spinner"></div>'),window.LiveScoreApp.loadSkeletonUI(function(e){e&&"function"==typeof e.getLineupSkeleton&&a.$("#tab-lineups").html(e.getLineupSkeleton())})):a.$("#tab-lineups").html('<div class="loading-spinner"></div>')}function m(e,t,a,i){let n=v(t,a);if(e.length>n.length&&(c("Oyuncu sayısı ("+e.length+") pozisyon sayısından ("+n.length+") fazla, 4-4-2 formatına geçiliyor"),n=v("4-4-2",a)),e.length>n.length&&(n=function(e,t){const a=[],i=t?7:94,n=t?1:-1;a.push({x:50,y:i});const o=e-1,s=Math.ceil(o/3);let r=1;for(let t=0;t<3&&r<e;t++){const o=i+n*(10+15*t),c=Math.min(s,e-r);for(let e=0;e<c;e++){const t=10+80/(c-1||1)*e;a.push({x:Math.min(90,Math.max(10,t)),y:o}),r++}}return a}(e.length,a)),!n||!n.length)return c("Pozisyon bilgisi oluşturulamadı"),"<p>Kadro görüntülenemiyor. Lütfen daha sonra tekrar deneyin.</p>";const o=a?n:n.map(e=>({...e,x:100-e.x}));return function(e,t,a){if(e&&!(e.length<2)){t=t||8,a=a||10;for(let i=0;i<e.length;i++)for(let n=i+1;n<e.length;n++){const o=Math.abs(e[i].x-e[n].x),s=Math.abs(e[i].y-e[n].y);if(o<t&&s<a)if(s<3){const a=(t-o)/2+1;e[i].x<e[n].x?(e[i].x=Math.max(2,e[i].x-a),e[n].x=Math.min(98,e[n].x+a)):(e[n].x=Math.max(2,e[n].x-a),e[i].x=Math.min(98,e[i].x+a))}else{const t=(a-s)/2+1;e[i].y<e[n].y?(e[i].y=Math.max(2,e[i].y-t),e[n].y=Math.min(98,e[n].y+t)):(e[n].y=Math.max(2,e[n].y-t),e[i].y=Math.min(98,e[i].y+t))}}}}(o),e.map((t,a)=>{const n=o[a],s=t.player&&t.player.id||0,r=s?"https://cdn.sporkolik.net/players/"+s+".png":"https://cdn.sporkolik.net/players/default_player.png",c=t.jerseyNumber||"N/A";let l;l=t.player&&t.player.shortName&&""!==t.player.shortName.trim()?t.player.shortName:t.player&&t.player.name&&""!==t.player.name.trim()?t.player.name:"N/A";let d="";t.statistics&&t.statistics.rating?d=t.statistics.rating.toFixed(1):t.statistics&&0===t.statistics.rating&&(d="0.0");const u=""!==d?`<div class="player-rating">${d}</div>`:"",p=t.statistics&&void 0!==t.statistics.minutesPlayed&&t.statistics.minutesPlayed>0&&!t.substitute&&function(){const a=function(e){let t=0;return e&&Array.isArray(e)&&e.forEach(e=>{e.statistics&&e.statistics.minutesPlayed&&(t=Math.max(t,e.statistics.minutesPlayed))}),t||90}(e);return t.statistics.minutesPlayed<a}()?'<i class="fa-solid fa-sort-down substitution-icon"></i>':"",m=t.statistics&&t.statistics.minutesPlayed&&t.substitute?'<i class="fa-solid fa-sort-up substitution-icon"></i>':"";return`<div class="player clickable-player" style="left:${n.x}%; top:${n.y}%" data-match-id="${i}" data-player-id="${t.player.id}">\n                        ${u}\n                        <img src="${r}" alt="${l}" class="player-photo" width="36" height="36" onerror="this.onerror=null;this.src='https://cdn.sporkolik.net/players/default_player.png';">\n                        ${p}\n                        ${m}\n                        <span class="player-number">${c}</span>\n                        <span class="player-name">${l}</span>\n                    </div>`}).join("")}function h(e,a,i,n){return e&&0!==e.length?`\n            <div class="substitutes-container-wrapper">\n                <div class="substitutes-container ${i?"home-substitutes":"away-substitutes"}">\n                    <div class="substitutes-header">${t.translateName("teams",a)} Yedekleri</div>\n                    <div class="substitutes-list">\n                        ${e.map(e=>{const t=e.jerseyNumber||"N/A";let a;a=e.player&&e.player.shortName&&""!==e.player.shortName.trim()?e.player.shortName:e.player&&e.player.name&&""!==e.player.name.trim()?e.player.name:"N/A";const i=e.statistics&&e.statistics.minutesPlayed>0,o=i?'<i class="fa-solid fa-sort-up substitution-icon-substitute"></i>':"";return`\n                <div class="substitute-player ${i?"substitute-entered":""}" data-match-id="${n||"unknown"}" data-player-id="${e.player?e.player.id:"unknown"}">\n                    <span class="substitute-number">${t}</span>\n                    <span class="substitute-name">${a}</span>\n                    ${o}\n                </div>\n            `}).join("")}\n                    </div>\n                </div>\n            </div>\n        `:""}function v(e,t){return window.formations?window.formations[e]?t?window.formations[e].home:window.formations[e].away:window.formations["4-4-2"]?(c('Diziliş "'+e+"\" bulunamadı, formations.js'teki 4-4-2 kullanılıyor"),t?window.formations["4-4-2"].home:window.formations["4-4-2"].away):(c("formations.js'te 4-4-2 dizilişi bulunamadı!"),[]):(c("formations.js dosyası yüklenmemiş!"),[])}async function y(t){try{const i=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails?window.LiveScoreApp.Modules.MatchDetails:null;if(!i||"lineups"!==i.getCurrentTab())return!1;if(a.$("#tab-lineups").data("updating"))return!1;a.$("#tab-lineups").data("updating",!0);const n=await o("get_match_lineups",{match_id:t,match_status:"inprogress"});if(!(n&&204!==n.status&&!1!==n.hasData&&n.home&&n.away&&Array.isArray(n.home.players)&&Array.isArray(n.away.players)))return a.$("#tab-lineups").removeData("updating"),!1;let s=!1;const r=n.home.players||[],c=n.away.players||[];if([...r,...c].forEach(e=>{const t=e.jerseyNumber||"N/A",i=e.player&&e.player.shortName&&""!==e.player.shortName.trim()?e.player.shortName:e.player&&e.player.name?e.player.name:"N/A";let n="";e.statistics&&void 0!==e.statistics.rating&&(n=e.statistics.rating.toFixed(1));const o=!0===e.substitute,r=o?a.$(`.substitute-player:contains("${t}"):contains("${i}")`):a.$(`.player:contains("${t}"):contains("${i}")`);r.length>0&&r.each(function(){const e=a.$(this);if(o)return;const t=e.find(".player-rating"),i=t.length?t.text():"";""!==n&&n!==i&&(t.length?(t.text(n),t.addClass("rating-updated"),setTimeout(()=>{t.removeClass("rating-updated")},3e3)):(e.prepend(`<div class="player-rating rating-updated">${n}</div>`),setTimeout(()=>{e.find(".player-rating").removeClass("rating-updated")},3e3)),s=!0)})}),a.$("#tab-lineups").removeData("updating"),s)try{e.CACHE_PREFIX.LINEUP;const a=e.getFromCacheByType(t,e.CACHE_PREFIX.LINEUP);if("string"==typeof a);else if(a&&"object"==typeof a){const a=window.LiveScoreApp.Constants.getCacheTTL("LINEUPS","live");e.setToCacheByType(t,n,a,e.CACHE_PREFIX.LINEUP)}}catch(e){}return s}catch(e){return a.$("#tab-lineups").removeData("updating"),c("Silent rating update error:",{matchId:t,error:e.message||e}),!1}}function w(){window.lineupRatingInterval&&(clearInterval(window.lineupRatingInterval),window.lineupRatingInterval=null)}return a.$(document).on("click",".clickable-player, .substitute-player",function(){const e=a.$(this).data("match-id"),t=a.$(this).data("player-id");if(!e||!t||"unknown"===e||"unknown"===t)return void c("Geçersiz oyuncu veya maç ID'si:",{matchId:e,playerId:t});let n="N/A",o="N/A",s="N/A",r="notstarted";const l=a.$("#match-details");if(l.length){const t=l.find(".live-scores-team .live-scores-team-name");t.length>=2&&(n=a.$(t[0]).attr("title")||a.$(t[0]).text().trim()||"N/A",o=a.$(t[1]).attr("title")||a.$(t[1]).text().trim()||"N/A");const i=window.LiveScoreApp.LiveMatches&&window.LiveScoreApp.LiveMatches.get(String(e));if(i&&i.startTimestamp){const e=new Date(1e3*i.startTimestamp);s=e.toLocaleDateString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric"})}else{const e=a.$("#date-picker").val();e&&(s=e)}}if("N/A"===n){const t=a.$('.live-scores-match[data-match-id="'+e+'"]');if(t.length){const e=t.find(".live-scores-team.home .live-scores-name").text().trim(),a=t.find(".live-scores-team.away .live-scores-name").text().trim();e&&(n=e),a&&(o=a)}}const d=a.$('.live-scores-match[data-match-id="'+e+'"]');if(d.length&&(r=d.data("status")||"notstarted"),e&&t){const l=a.$(this).find(".player-rating"),d=l.length?l.text().trim():"";window.LiveScoreApp.Components.PlayerPopup&&"function"==typeof window.LiveScoreApp.Components.PlayerPopup.openPlayerPopup?window.LiveScoreApp.Components.PlayerPopup.openPlayerPopup(e,t,n,o,s,r,d):i&&"function"==typeof i.loadAsync?i.loadAsync().then(function(a){window.LiveScoreApp.Components.PlayerPopup&&"function"==typeof window.LiveScoreApp.Components.PlayerPopup.openPlayerPopup?window.LiveScoreApp.Components.PlayerPopup.openPlayerPopup(e,t,n,o,s,r,d):c("PlayerPopup modülü yüklendikten sonra tanımsız kaldı.")}).catch(function(e){c("PlayerPopup/PlayerCharts yükleme hatası:",e)}):c("PlayerModuleLoader kullanılabilir değil.")}}),{fetchLineups:function(e,n,s){if(!e)return void("function"==typeof s&&s(!1,null));i&&"function"==typeof i.loadAsync&&!i.isReady()&&i.loadAsync().then(function(){}).catch(function(e){});const r=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails?window.LiveScoreApp.Modules.MatchDetails:null,l=r?r.getCurrentTab():null;if(!r||"lineups"!==l)return void("function"==typeof s&&s(!1,null));a.$('.live-scores-match[data-match-id="'+e+'"]').data("status");const v=window.LiveScoreApp._prefetchedLineups?.[e],y=v&&Date.now()-v.timestamp<12e4;y&&delete window.LiveScoreApp._prefetchedLineups[e],y||p();const w=function(e){try{const t=a.$('.live-scores-match[data-match-id="'+e+'"]');if(0===t.length)return null;const i=t.find(".live-scores-team.home .live-scores-name").text().trim(),n=t.find(".live-scores-team.away .live-scores-name").text().trim();return i&&n?{homeTeamName:i,awayTeamName:n,homeTeamRaw:i,awayTeamRaw:n,homeCoach:t.attr("data-home-coach")||"",awayCoach:t.attr("data-away-coach")||""}:null}catch(e){return null}}(e);if(!w)return a.$("#tab-lineups").html("<p>Kadrolar bilgisi mevcut değil.</p>"),void("function"==typeof s&&s(!1,null));let f=t.translateName("teams",w.homeTeamRaw||"Bilinmiyor"),g=t.translateName("teams",w.awayTeamRaw||"Bilinmiyor");const S=d(e);let A=S.home||"Bilinmiyor",L=S.away||"Bilinmiyor";function b(t){if(!t||204===t.status||!1===t.hasData||null===t.data)return a.$("#tab-lineups").html("<p>Bu maç için kadro bilgisi henüz mevcut değil.</p>"),void("function"==typeof s&&s(!1,null));if(!(t.home&&t.away&&Array.isArray(t.home.players)&&Array.isArray(t.away.players)&&0!==t.home.players.length&&0!==t.away.players.length))return a.$("#tab-lineups").html("<p>Kadro bilgileri henüz tamamlanmamış.</p>"),void("function"==typeof s&&s(!1,null));if(t.home.manager&&t.home.manager.name&&(A=t.home.manager.name),t.away.manager&&t.away.manager.name&&(L=t.away.manager.name),"Bilinmiyor"===A||"Bilinmiyor"===L){const t=d(e);"Bilinmiyor"===A&&t.home&&(A=t.home),"Bilinmiyor"===L&&t.away&&(L=t.away)}let i=t.home.formation,n=t.away.formation;i&&""!==i.trim()||(i="4-4-2"),n&&""!==n.trim()||(n="4-4-2");const o=t.home.players.filter(e=>!e.substitute),r=t.away.players.filter(e=>!e.substitute),c=t.home.players.filter(e=>e.substitute),p=t.away.players.filter(e=>e.substitute),v=`\n                                    <div class="team-info-card home-team-info-card">\n                                        <div class="team-info">\n                                            <span class="team-name">${f}</span>\n                                            <span class="team-coach">Teknik Direktör: ${A}</span>\n                                            <span class="team-formation">Diziliş: ${i}</span>\n                                        </div>\n                                    </div>\n                                    <div class="lineup-field-image-container" style="width: 100%; height: auto;">\n                                        <img src="/images/mac/soccer-field.png" class="lineup-field-image" width="360" height="540" style="width: 100%; height: auto;" alt="Saha Görseli">\n                                        <div class="home-team-players">${m(o,i,!0,e)}</div>\n                                        <div class="away-team-players">${m(r,n,!1,e)}</div>\n                                    </div>\n                                    <div class="team-info-card away-team-info-card">\n                                        <div class="team-info">\n                                            <span class="team-name">${g}</span>\n                                            <span class="team-coach">Teknik Direktör: ${L}</span>\n                                            <span class="team-formation">Diziliş: ${n}</span>\n                                        </div>\n                                    </div><div class="substitutes-wrapper">\n                                        ${h(c,f,!0,e)}\n                                        ${h(p,g,!1,e)}\n                                    </div>`;if("lineups"===l&&(a.$("#tab-lineups").html(v),u(e)),"function"==typeof s&&s(!0,v),"Bilinmiyor"===A||"Bilinmiyor"===L){let t=0;const a=15,i=setInterval(function(){t++,(u(e)||t>=a)&&clearInterval(i)},500)}var y;(y=t)&&(y.home&&y.home.players&&Array.isArray(y.home.players)&&y.home.players.forEach(e=>{if(e.statistics){const t=e.statistics.minutesPlayed,a=e.statistics.rating;e.statistics={minutesPlayed:t,rating:a}}if(e.player){const t=e.player.name,a=e.player.shortName;e.player={name:t,shortName:a}}}),y.away&&y.away.players&&Array.isArray(y.away.players)&&y.away.players.forEach(e=>{if(e.statistics){const t=e.statistics.minutesPlayed,a=e.statistics.rating;e.statistics={minutesPlayed:t,rating:a}}if(e.player){const t=e.player.name,a=e.player.shortName;e.player={name:t,shortName:a}}}))}y?b(v.response):o("get_match_lineups",{match_id:e,match_status:n?"finished":"live"}).then(function(e){b(e)}).catch(function(t){a.$("#tab-lineups").html("<p>Kadro bilgileri alınırken bir hata oluştu.</p>"),c("Lineups fetch error:",{matchId:e,error:t}),"function"==typeof s&&s(!1,null)})},generatePlayerHTML:m,generateSubstituteHTML:h,updateLineupsTab:function(t){if(window.LiveScoreApp.Modules.MatchDetails&&"lineups"===window.LiveScoreApp.Modules.MatchDetails.getCurrentTab())if(a.$("#tab-lineups").children().not(".loading-spinner, .skeleton-pulse, .skeleton-pulse-slow").length||p(),window.LiveScoreApp.Components)try{const n=window.LiveScoreApp.Components.Lineups;if(n&&"function"==typeof n.fetchLineups){const o=e.getFromCacheByType(t,e.CACHE_PREFIX.LINEUP);if(o){const e=(i=o)?"string"==typeof i?i:i.html?i.html:i.data&&"string"==typeof i.data?i.data:null:null;if(e)return a.$("#tab-lineups").html(e),void u(t)}!function(e,t){t.fetchLineups(e,!1)}(t,n)}else a.$("#tab-lineups").html("<p>Kadro bilgisi alınamadı. Modül yüklenemedi.</p>")}catch(e){a.$("#tab-lineups").html("<p>Kadro bilgisi alınamadı. Lütfen daha sonra tekrar deneyin.</p>")}else a.$("#tab-lineups").html("<p>Komponenet modülleri yüklenemedi</p>");var i},checkAndFetchLineups:function(t){const i=window.LiveScoreApp.Constants.getCacheTTL("LINEUPS","live"),n=e.getFromCacheByType(t,e.CACHE_PREFIX.LINEUP);if(n&&Date.now()-(n.timestamp||0)<i)return void a.$(".lineups-tab").show();const s="lineups-checking-"+t;window.LiveScoreApp.activeRequests&&window.LiveScoreApp.activeRequests[s]||(window.LiveScoreApp.activeRequests||(window.LiveScoreApp.activeRequests={}),window.LiveScoreApp.activeRequests[s]=!0,o("get_match_lineups",{match_id:t,match_status:""}).then(function(i){delete window.LiveScoreApp.activeRequests[s];try{if(!i||204===i.status||!1===i.hasData)return a.$(".lineups-tab").hide(),void r();if(!(i.home&&i.away&&Array.isArray(i.home.players)&&Array.isArray(i.away.players)&&0!==i.home.players.length&&0!==i.away.players.length))return a.$(".lineups-tab").hide(),void r();a.$(".lineups-tab").show();const o={exists:!0,timestamp:Date.now(),home_count:i.home.players.length,away_count:i.away.players.length},s=window.LiveScoreApp.Constants.getCacheTTL("LINEUPS","live");e.setToCacheByType(t,o,s,e.CACHE_PREFIX.LINEUP),window.LiveScoreApp._prefetchedLineups=window.LiveScoreApp._prefetchedLineups||{},window.LiveScoreApp._prefetchedLineups[t]={response:i,timestamp:Date.now()};var n={};i.home.players.forEach(function(e){e.player&&e.player.id&&(n[e.player.id]=!0)}),i.away.players.forEach(function(e){e.player&&e.player.id&&(n[e.player.id]=!1)}),window.LiveScoreApp._playerTeamMap=window.LiveScoreApp._playerTeamMap||{},window.LiveScoreApp._playerTeamMap[t]=n,r(0,{home:i.home.players.length,away:i.away.players.length})}catch(e){c("Lineups check error:",e),a.$(".lineups-tab").hide()}}).catch(function(e){delete window.LiveScoreApp.activeRequests[s],a.$(".lineups-tab").hide(),c("Lineups check request failed:",{matchId:t,error:e})}))},applyManagerNamesFromStore:u,silentRatingUpdate:y,startRatingAutoUpdate:function(e){w(),"finished"!==a.$('.live-scores-match[data-match-id="'+e+'"]').data("status")&&(y(e).then(e=>{}),window.lineupRatingInterval=setInterval(()=>{if("hidden"===document.visibilityState)return;const t=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails;t&&"lineups"===t.getCurrentTab()&&y(e).then(e=>{})},29e3))},stopRatingAutoUpdate:w,cleanupResources:function(){w(),l.forEach((e,t)=>{if(e&&"string"==typeof e&&e.startsWith("blob:"))try{URL.revokeObjectURL(e)}catch(e){}}),l.clear()}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Modules=window.LiveScoreApp.Modules||{},window.LiveScoreApp.DetailClosingFlags=window.LiveScoreApp.DetailClosingFlags||{userFlags:{},_getUserFlags:function(e){return this.userFlags[e]||(this.userFlags[e]={}),this.userFlags[e]},set:function(e,t,a,i="unknown"){const n=this._getUserFlags(e);a?(n[t]={isClosing:!0,timestamp:Date.now(),setBy:i},window.LiveScoreApp.debugMode):delete n[t]},isClosing:function(e,t){const a=this._getUserFlags(e);return!!a[t]&&(Date.now()-a[t].timestamp>500?(delete a[t],!1):a[t].isClosing)},clear:function(e,t,a="unknown"){const i=this._getUserFlags(e);i[t]&&(delete i[t],window.LiveScoreApp.debugMode)},clearUserFlags:function(e){this.userFlags[e]&&(delete this.userFlags[e],window.LiveScoreApp.debugMode)},clearAll:function(){this.userFlags={},window.LiveScoreApp.debugMode},getState:function(e=null){if(e){const t=this._getUserFlags(e);return{userId:e,flags:Object.assign({},t),keyCount:Object.keys(t).length}}const t=Object.values(this.userFlags).reduce((e,t)=>e+Object.keys(t).length,0);return{users:Object.keys(this.userFlags).length,totalFlags:t,userDetails:Object.assign({},this.userFlags)}}},window.LiveScoreApp.ScriptManager=window.LiveScoreApp.ScriptManager||{loadedScripts:new Set,activeScripts:new Map,tabOpenCount:0,CLEANUP_THRESHOLD:50,loadScript:function(e,t,a={}){return this.loadedScripts.has(e)?Promise.resolve():new Promise((i,n)=>{const o=document.createElement("script");o.src=e,o.async=!0,o.setAttribute("data-module",t),o.setAttribute("data-managed","true"),o.onload=()=>{this.loadedScripts.add(e),this.activeScripts.set(t,{path:e,loadedAt:Date.now(),scriptId:o.getAttribute("data-managed"),isLoaded:!0}),a.onLoad&&"function"==typeof a.onLoad&&a.onLoad(),a.removeAfterLoad&&setTimeout(()=>{try{o.remove()}catch(e){}},100),i()},o.onerror=()=>{const t=new Error(`Script yükleme hatası: ${e}`);a.onError&&"function"==typeof a.onError&&a.onError(t),n(t)},document.head.appendChild(o)})},cleanupOldScripts:function(e){if(!e){const t=window.LiveScoreApp.Config,a=t&&t.optimizationSettings._dynamicInfo;e=a&&a.basedOnLiveMatches>200?6e4:3e5}const t=Date.now();let a=0;for(const[i,n]of this.activeScripts)if(window.LiveScoreApp.Modules[i]&&t-n.loadedAt>e)try{document.querySelectorAll(`script[data-module="${i}"][data-managed="true"]`).forEach(e=>e.remove()),this.activeScripts.delete(i),a++,window.LiveScoreApp.debugMode}catch(e){}return a},emergencyCleanup:function(){const e={totalActive:this.activeScripts.size,totalLoaded:this.loadedScripts.size,totalInDOM:document.querySelectorAll('script[data-managed="true"]').length},t=this.cleanupAllScripts(),a=document.querySelectorAll('script[data-managed="fallback"], script[data-managed="legacy"]');let i=0;a.forEach(e=>{try{e.remove(),i++}catch(e){}});const n={totalActive:this.activeScripts.size,totalLoaded:this.loadedScripts.size,totalInDOM:document.querySelectorAll('script[data-managed="true"]').length};return{scriptsRemoved:t+i,fallbackScriptsRemoved:i,beforeStats:e,afterStats:n,memoryFreed:!0}},checkMemoryHealth:function(){const e=document.querySelectorAll('script[data-managed="true"]').length,t=this.countOrphanedScripts();return{isHealthy:0===t&&e<10,totalManagedScripts:e,activeScripts:this.activeScripts.size,orphanedScripts:t,loadedScripts:this.loadedScripts.size,memoryLeakRisk:t>5?"high":t>2?"medium":"low",recommendedAction:t>3?"emergency_cleanup":t>0?"cleanup_suggested":"healthy"}},cleanupAllScripts:function(){let e=0;return document.querySelectorAll('script[data-managed="true"]').forEach(t=>{try{t.remove(),e++}catch(e){}}),this.activeScripts.clear(),this.loadedScripts.clear(),e},getStatus:function(){const e={};for(const[t,a]of this.activeScripts)e[t]={path:a.path,loadedAt:a.loadedAt,scriptId:a.scriptId,isLoaded:a.isLoaded,age:Date.now()-a.loadedAt,moduleExists:!!window.LiveScoreApp.Modules[t]};return{loadedScripts:Array.from(this.loadedScripts),activeScripts:e,totalLoaded:this.loadedScripts.size,totalActive:this.activeScripts.size,memoryOptimized:!0,orphanedScriptsInDOM:this.countOrphanedScripts(),totalManagedScriptsInDOM:document.querySelectorAll('script[data-managed="true"]').length}},countOrphanedScripts:function(){const e=document.querySelectorAll('script[data-managed="true"]');let t=0;return e.forEach(e=>{const a=e.getAttribute("data-module");a&&!this.activeScripts.has(a)&&t++}),t}},window.LiveScoreApp.ModuleLoadStatus=window.LiveScoreApp.ModuleLoadStatus||{pendingActions:[],addPendingAction:function(e){this.pendingActions.push(e),this.processActionsIfReady()},processActionsIfReady:function(){if(this.areAllModulesReady())for(;this.pendingActions.length>0;){const e=this.pendingActions.shift();try{e()}catch(e){}}},areAllModulesReady:function(){return window.LiveScoreApp.Modules.MatchDetailsUI&&window.LiveScoreApp.Modules.MatchDetailsEvents&&window.LiveScoreApp.Modules.MatchDetailsData&&window.LiveScoreApp.Modules.MatchDetailsTabs}},window.LiveScoreApp.Modules.MatchDetails=function(){let e=null,t=!1;window.LiveScoreApp.Modules.ScoreUpdater;const a=window.LiveScoreApp.Utils.jQuery,i=window.LiveScoreApp.Utils.DomUtils,n=window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton,o=window.LiveScoreApp.Utils.MinuteCalculator;function s(e,t){return window.QueuedAjax&&"function"==typeof window.QueuedAjax.request?window.QueuedAjax.request(e,t).then(r):new Promise(function(a,i){jQuery.ajax({url:LiveScoresAjax.ajax_url,method:"POST",data:Object.assign({action:e,nonce:LiveScoresAjax.nonce},t),success:function(e){a(r(e))},error:function(e,t,a){i(new Error(a||t||"AJAX error"))}})})}function r(e){return e&&"object"==typeof e&&e.hasOwnProperty("success")&&void 0!==e.data?e.data:e}function c(){try{const e=a.$("#match-details");e.length&&!e.attr("data-initialized")&&(e.addClass("detail-closed"),e.hide(),e.attr("data-initialized","true"),window.LiveScoreApp.debugMode)}catch(e){}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c):c();let l=!1;function d(e){if(!l){var t=document.querySelector('.live-scores-match[data-match-id="'+e+'"]'),a=t?t.querySelector(".match-card__link"):null,i=a?a.getAttribute("href"):"";history.pushState({matchDetailOpen:!0,matchId:e},"",i||""),l=!0}}function u(){l=!1}let p=!1;function m(e){const t=a.$('.live-scores-match[data-match-id="'+e+'"]'),i=a.$("#match-details"),n=window.LiveScoreApp.LiveScores?window.LiveScoreApp.LiveScores.getSelectedMatchId():null,s=window.LiveScoreApp&&window.LiveScoreApp.detailClosing;if(!t.length||!i.is(":visible")||e!==n||s)return;const r=window.LiveScoreApp.Utils.Cache,c=(window.LiveScoreApp.Config,window.LiveScoreApp.Modules.MatchDetailsData,window.LiveScoreApp.LiveMatches?window.LiveScoreApp.LiveMatches.get(e.toString()):null),l=c&&(null!=c.homeAggregatedScore&&null!=c.awayAggregatedScore||null!=c.homePenaltiesScore&&null!=c.awayPenaltiesScore||null!=c.previousLegEventId);try{if(l&&r&&"function"==typeof r.getFromCacheByType&&r.CACHE_PREFIX){const t=`matchAggregateScore_${e}`,a=r.getFromCacheByType(t,r.CACHE_PREFIX.MATCH_DETAIL);if(a&&void 0!==a.homeScore&&void 0!==a.awayScore){const e=`Top: (${a.homeScore} - ${a.awayScore})`;i.find(".total-score").length?i.find(".total-score").text(e):i.append(`<div class="total-score">${e}</div>`)}const n=`matchPreviousScore_${e}`,o=r.getFromCacheByType(n,r.CACHE_PREFIX.MATCH_DETAIL);if(o&&o.score&&"null"!==o.score&&"null - null"!==o.score&&"-"!==o.score&&"N/A"!==o.score){const e=i.find(".live-scores-match-time");e.next(".previous-leg-score").length?e.next(".previous-leg-score").text(`İMS: ${o.score}`):e.after(`<div class="previous-leg-score">İMS: ${o.score}</div>`)}const s=`matchPenaltyScore_${e}`,c=r.getFromCacheByType(s,r.CACHE_PREFIX.MATCH_DETAIL);if(c&&void 0!==c.homeScore&&void 0!==c.awayScore){const e=`Pen: ${c.homeScore}-${c.awayScore}`;i.find(".penalties-score").length?i.find(".penalties-score").text(e):i.find(".live-scores-match-time-container").append(`<div class="penalties-score">${e}</div>`)}}}catch(e){}try{let a=window.LiveScoreApp.LiveMatches.get(e.toString()),n="",s="";a&&a.homeScore&&a.awayScore?(n=a.homeScore.display,s=a.awayScore.display):(n=t.find(".live-scores-team.home .live-scores-score").text().trim(),s=t.find(".live-scores-team.away .live-scores-score").text().trim());const r=t.data("status"),c=i.find(".live-scores-team-score").eq(0),l=i.find(".live-scores-team-score").eq(1);c.text()!==n&&c.text(n),l.text()!==s&&l.text(s);const u=i.find(".live-scores-match-time");if("finished"===r)"Bitti"!==u.text()&&u.text("Bitti");else if(o){const e=(u.html()||"").trim(),a=o.getFormattedMinute(t).trim();e!==a&&u.html(a)}else{const e=t.find(".live-scores-minute, .minute").text(),a=e.match(/Bitti|Başlamadı|Ertelendi|Gecikme/)?"":'<span class="blinking-quote">\'</span>',i=e.replace("'","")+a;u.html()!==i&&u.html(i)}const p=t.data("home-red-cards"),m=t.data("away-red-cards");void 0!==p&&d(".home",p),void 0!==m&&d(".away",m)}catch(e){}function d(e,t){try{const a=i.find(`.live-scores-team${e} .live-scores-team-name`);let n=a.text();n=n.replace(/\s*<i class="fas fa-square red-card-icon"><\/i>\s*x\d*|\s*<i class="fas fa-square red-card-icon"><\/i>/g,""),n=n.replace(/\s*⚫\sx\d*|\s*⚫/g,"");let o="";t>0&&(o=1===t?' <i class="fas fa-square red-card-icon"></i>':' <i class="fas fa-square red-card-icon"></i> x'+t),a.html(n+o)}catch(e){}}}function h(e){v();const t=window.LiveScoreApp.Constants.getCacheTTL("LIVE_SCORES","live")||6e3,i=Math.max(t-1e3,5e3);window.detailHeaderUpdateInterval=window.setInterval(function(){const t=a.$("#match-details");t&&t.is(":visible")?m(e):v()},i),window.LiveScoreApp.debugMode}function v(){window.detailHeaderUpdateInterval&&(window.clearInterval(window.detailHeaderUpdateInterval),window.detailHeaderUpdateInterval=null,window.LiveScoreApp.debugMode)}return window.addEventListener("popstate",function(e){const t=document.getElementById("match-details");t&&!t.classList.contains("detail-closed")&&"none"!==t.style.display&&(p=!0,u(),window.LiveScoreApp.Modules.MatchDetails&&"function"==typeof window.LiveScoreApp.Modules.MatchDetails.closeMatchDetails&&window.LiveScoreApp.Modules.MatchDetails.closeMatchDetails(),p=!1)}),{updateMatchDetails:function(o){if(t)return;t=!0;const r=a.$('.live-scores-match[data-match-id="'+o+'"]');if(!r.length){const e=a.$("#match-details");return e.addClass("detail-closed"),e.hide(),void(t=!1)}try{window.LiveScoreApp.Utils.MinuteCalculator&&"function"==typeof window.LiveScoreApp.Utils.MinuteCalculator.stopAutoUpdate&&window.LiveScoreApp.Utils.MinuteCalculator.stopAutoUpdate()}catch(e){}e=null,window.LiveScoreApp.hasStandingsData=void 0,window.LiveScoreApp.Components?.Standings?.stopPolling&&window.LiveScoreApp.Components.Standings.stopPolling(),a.$("#attack-momentum-chart").css("display","");try{const e=r.data("tournament-id"),t=r.data("season-id"),i=r.data("group-id")||0;if(e&&t){const n=window.LiveScoreApp.Utils.Cache,o=`standings_check_${e}_${t}_${i}`,c=n.getFromCacheByType(o,n.CACHE_PREFIX.STANDING);c&&!0===c.exists&&(a.$(".standings-tab").show(),window.LiveScoreApp.hasStandingsData=!0);const l=async function(){const c="total";try{const l=await s("get_standings_data",{tournament_id:e,season_id:t,type:c});if(l&&l.standings&&l.standings.length>0){let s;if(s=i?l.standings.find(e=>e.tournament.id==i):l.standings[0],s&&s.rows&&s.rows.length>0){window.LiveScoreApp.Config;const l=`standings_${e}_${t}_${c}${i?"_"+i:""}`,d="finished"===r.data("status")?"finished":"live",u="finished"===d?1/0:window.LiveScoreApp.Constants.getCacheTTL("STANDINGS",d);n.setToCacheByType(l,s,u,n.CACHE_PREFIX.STANDING);const p={exists:!0,timestamp:Date.now()};return n.setToCacheByType(o,p,u,n.CACHE_PREFIX.STANDING),a.$(".standings-tab").show(),!0}}}catch(e){}return!1};c&&!0===c.exists||setTimeout(function(){l().catch(e=>{})},1e3)}else a.$(".standings-tab").hide(),window.LiveScoreApp.hasStandingsData=!1}catch(e){}try{const e=r.data("status");if("notstarted"===e);else{const t="finished"===e,i=async function(){try{const e=await s("get_match_statistics",{match_id:o,period:"ALL",match_status:t?"finished":"live"});if(e&&e.statistics&&e.statistics.length>0){const i=window.LiveScoreApp.Utils.Cache,n=`${o}_ALL`,s=window.LiveScoreApp.Constants.getCacheTTL("STATISTICS",t?"finished":"live");return i.setToCacheByType(n,e,s,i.CACHE_PREFIX.STATISTIC),i.setToCacheByType(`${o}_1ST`,e,s,i.CACHE_PREFIX.STATISTIC),i.setToCacheByType(`${o}_2ND`,e,s,i.CACHE_PREFIX.STATISTIC),a.$(".statistics-tab").show(),!0}}catch(e){}return!1};setTimeout(function(){i().catch(e=>{})},1e3)}}catch(e){}const c=window.LiveScoreApp.ModuleLoader;if(c&&"function"==typeof c.setupMatchDetailsEventListeners&&c.setupMatchDetailsEventListeners(o,{closeMatchDetails:function(e){window.LiveScoreApp.Modules.MatchDetails&&"function"==typeof window.LiveScoreApp.Modules.MatchDetails.closeMatchDetails&&window.LiveScoreApp.Modules.MatchDetails.closeMatchDetails()}}),window.LiveScoreApp.ModuleLoadStatus.addPendingAction(function(){const e=window.LiveScoreApp.Modules.MatchDetailsUI,t=(window.LiveScoreApp.Modules.MatchDetailsEvents,window.LiveScoreApp.Modules.MatchDetailsData);t.loadMatchDetails(o,r,function(n,s){const c=window.LiveScoreApp.Utils.SecurityUtils,l=c&&"function"==typeof c.validateMatchData?c.validateMatchData(s):s;if(n){let t=n;c&&"function"==typeof c.sanitizeHtml&&(t=c.sanitizeHtml(n)),a.$("#match-details").html(t).appendTo("body"),a.$("#match-details").removeClass("detail-closed"),a.$("#match-details").show(),d(o),i.onMatchDetailsOpen(),e.setupMatchDetailsUI(s.matchStatus||r.data("status"));const l=window.LiveScoreApp.ModuleLoader;return l&&"function"==typeof l.setupMatchDetailsEventListeners&&l.setupMatchDetailsEventListeners(o,{closeMatchDetails:function(e){window.LiveScoreApp.Modules.MatchDetails&&"function"==typeof window.LiveScoreApp.Modules.MatchDetails.closeMatchDetails&&window.LiveScoreApp.Modules.MatchDetails.closeMatchDetails()}}),void m(o)}const u=e.generateMatchDetailsHTML(l);a.$("#match-details").html(u).appendTo("body");var p=document.querySelector('.live-scores-match[data-match-id="'+o+'"]'),v=p?p.querySelector(".match-card__link"):null,y=document.getElementById("match-detail-expand"),w=document.getElementById("match-detail-expand-cta");if(v){var f=v.getAttribute("href");y&&(y.href=f,y.target="_blank",y.rel="noopener"),w&&(w.href=f,w.target="_blank",w.rel="noopener")}a.$("#match-details").removeClass("detail-closed"),a.$("#match-details").show(),d(o),i.onMatchDetailsOpen(),e.setupMatchDetailsUI(s.matchStatus);const g=window.LiveScoreApp.ModuleLoader;g&&"function"==typeof g.setupMatchDetailsEventListeners&&g.setupMatchDetailsEventListeners(o,{closeMatchDetails:function(e){window.LiveScoreApp.Modules.MatchDetails&&"function"==typeof window.LiveScoreApp.Modules.MatchDetails.closeMatchDetails&&window.LiveScoreApp.Modules.MatchDetails.closeMatchDetails()}}),h(o),t.fetchMatchDetailsFromServer(o,function(t){if((!window.LiveScoreApp.DetailClosingFlags||!window.LiveScoreApp.DetailClosingFlags.isClosing(o))&&!window.LiveScoreApp.detailClosing&&(window.LiveScoreApp.LiveScores?window.LiveScoreApp.LiveScores.getSelectedMatchId():null)===o&&t&&t.success){e.updateWithServerData(t,o),m(o);const a=t.data||{},i=!0===a.hasAttackMomentum;a.matchStatus,window.LiveScoreApp.currentMatchDetailsData||(window.LiveScoreApp.currentMatchDetailsData={}),window.LiveScoreApp.currentMatchDetailsData[o]={hasAttackMomentum:i,hasMatchIncidents:!0===a.hasMatchIncidents,homeManagerName:a.homeManagerName||null,awayManagerName:a.awayManagerName||null,customId:a.customId||null},(a.homeManagerName||a.awayManagerName)&&"lineups"===(window.LiveScoreApp.Modules.MatchDetails?window.LiveScoreApp.Modules.MatchDetails.getCurrentTab():null)&&window.LiveScoreApp.Components?.Lineups?.applyManagerNamesFromStore&&window.LiveScoreApp.Components.Lineups.applyManagerNamesFromStore(o)}})})}),!window.LiveScoreApp.ModuleLoadStatus.areAllModulesReady()){n&&"function"==typeof n.getMatchDetailsSkeleton?a.$("#match-details").html(n.getMatchDetailsSkeleton()).appendTo("body"):window.LiveScoreApp.loadSkeletonUI?(a.$("#match-details").html('<div class="loading-spinner"></div>').appendTo("body"),window.LiveScoreApp.loadSkeletonUI(function(e){e&&a.$("#match-details").html(e.getMatchDetailsSkeleton())})):a.$("#match-details").html('<div class="loading-spinner"></div>').appendTo("body"),a.$("#match-details").show();let e="/wp-content/plugins/v7/js/";if(window.LiveScoresAjax&&window.LiveScoresAjax.plugin_url)e=window.LiveScoresAjax.plugin_url+"js/";else if(document.currentScript&&document.currentScript.src){const t=document.currentScript.src.match(/(.*\/js\/modules\/)/);t&&(e=t[1].replace(/\/modules\/$/,""))}else{const t=document.querySelectorAll("script[src]");for(const a of t)if(a.src.includes("match-details.js")){const t=a.src.match(/(.*\/js\/modules\/)/);if(t){e=t[1].replace(/\/modules\/$/,"");break}}if("/wp-content/plugins/v7/js/"===e)for(const a of t)if(a.src.includes("/plugins/")&&a.src.includes("/js/")){const t=a.src.match(/(.*(\/plugins\/[^\/]+\/)js\/)/);if(t){e=t[1].replace(/\/js\/$/,"/js/");break}}}const t=[{name:"MatchDetailsUI",path:"modules/match-details-ui.js"},{name:"MatchDetailsEvents",path:"modules/match-details-events.js"},{name:"MatchDetailsData",path:"modules/match-details-data.js",waitFor:"RequestQueue"},{name:"MatchDetailsTabs",path:"modules/match-details-tabs.js"},{name:"Standings",path:"modules/standings.js",namespace:"Components"},{name:"History",path:"modules/history.js",namespace:"Components"}];t.forEach(function(t){if((!t.waitFor||window.LiveScoreApp.Utils[t.waitFor])&&!window.LiveScoreApp.Modules[t.name]){const a=e+t.path+"?t="+Date.now();window.LiveScoreApp.ScriptManager.loadScript(a,t.name,{onLoad:function(){t.namespace,window.LiveScoreApp.ModuleLoadStatus.processActionsIfReady()},onError:function(e){}}).catch(e=>{})}}),t.forEach(function(t){if(t.waitFor&&window.LiveScoreApp.Utils[t.waitFor]&&!window.LiveScoreApp.Modules[t.name]){const a=e+t.path+"?t="+Date.now();window.LiveScoreApp.ScriptManager.loadScript(a,t.name,{onLoad:function(){window.LiveScoreApp.ModuleLoadStatus.processActionsIfReady()},onError:function(e){}}).catch(e=>{})}})}setTimeout(function(){t=!1},300)},updateMatchDetailScores:m,startDetailHeaderUpdatePolling:h,stopDetailHeaderUpdatePolling:v,updateTabContent:function(e,t){if(window.LiveScoreApp.ScriptManager.tabOpenCount++,window.LiveScoreApp.ScriptManager.tabOpenCount>=window.LiveScoreApp.ScriptManager.CLEANUP_THRESHOLD){const e=3e4;window.LiveScoreApp.ScriptManager.cleanupOldScripts(e),window.LiveScoreApp.ScriptManager.tabOpenCount=0}window.LiveScoreApp.Modules.MatchDetailsTabs&&window.LiveScoreApp.Modules.MatchDetailsTabs.updateTabContent(e,t)},checkAndFetchLineups:function(e){window.LiveScoreApp.Modules.MatchDetailsTabs&&window.LiveScoreApp.Modules.MatchDetailsTabs.checkAndFetchLineups(e)},checkAndFetchStandings:function(e){window.LiveScoreApp.Modules.MatchDetailsTabs&&window.LiveScoreApp.Modules.MatchDetailsTabs.checkAndFetchStandings(e)},getCurrentTab:function(){return e},setCurrentTab:function(t){e=t},clearTabCache:function(e){window.LiveScoreApp.Modules.MatchDetailsData&&window.LiveScoreApp.Modules.MatchDetailsData.clearTabCache(e)},closeMatchDetails:function(){if(l&&!p)return u(),void history.back();u();let t=null;if(window.LiveScoreApp.LiveScores&&"function"==typeof window.LiveScoreApp.LiveScores.getSelectedMatchId&&(t=window.LiveScoreApp.LiveScores.getSelectedMatchId()),t){const e=window.LiveScoreApp.Utils.RequestIdGenerator;e&&"function"==typeof e.cancelByMatchId&&e.cancelByMatchId(t),window.LiveScoreApp.DetailClosingFlags.set(t,!0,"closeMatchDetails")}if(t&&window.LiveScoreApp.Modules.MatchDetailsData&&"function"==typeof window.LiveScoreApp.Modules.MatchDetailsData.clearTabCache&&window.LiveScoreApp.Modules.MatchDetailsData.clearTabCache(t,!0),v(),window.LiveScoreApp.Utils.MinuteCalculator&&"function"==typeof window.LiveScoreApp.Utils.MinuteCalculator.stopAutoUpdate&&window.LiveScoreApp.Utils.MinuteCalculator.stopAutoUpdate(),window.LiveScoreApp.Modules.MatchDetailsData&&"function"==typeof window.LiveScoreApp.Modules.MatchDetailsData.resetPreviousValues&&window.LiveScoreApp.Modules.MatchDetailsData.resetPreviousValues(),e=null,t&&window.LiveScoreApp.backgroundPreFetchInProgress&&delete window.LiveScoreApp.backgroundPreFetchInProgress[t],window.LiveScoreApp.LiveScores&&"function"==typeof window.LiveScoreApp.LiveScores.setSelectedMatchId&&window.LiveScoreApp.LiveScores.setSelectedMatchId(null),window.LiveScoreApp.Utils.EventUtils&&"function"==typeof window.LiveScoreApp.Utils.EventUtils.closeMatchDetails)window.LiveScoreApp.Utils.EventUtils.closeMatchDetails();else{const e=a.$("#match-details");e.length&&(e.addClass("detail-closed"),e.hide()),window.LiveScoreApp.Modules.MatchDetailsTabs&&window.LiveScoreApp.Modules.MatchDetailsTabs.cleanupIntervals()}const i=window.LiveScoreApp.Components||{};var n;i.MatchIncidents&&"function"==typeof i.MatchIncidents.cleanupIntervals&&i.MatchIncidents.cleanupIntervals(),i.AttackMomentum&&"function"==typeof i.AttackMomentum.cleanupIntervals&&i.AttackMomentum.cleanupIntervals(),i.Statistics&&"function"==typeof i.Statistics.cleanupIntervals&&i.Statistics.cleanupIntervals(),window.LiveScoreApp.Utils.RequestQueue&&"function"==typeof window.LiveScoreApp.Utils.RequestQueue.clearQueue&&window.LiveScoreApp.Utils.RequestQueue.clearQueue(),window.LiveScoreApp.ScriptManager&&setTimeout(function(){const e=window.LiveScoreApp.Config,t=e&&e.optimizationSettings._dynamicInfo,a=t&&t.basedOnLiveMatches>200?3e4:6e4;window.LiveScoreApp.ScriptManager.cleanupOldScripts(a)},100),n=t,setTimeout(function(){a.$("#attack-momentum-chart").length&&a.$("#attack-momentum-chart").css("display",""),a.$(".live-scores-tab-content").removeClass("live-scores-active entering exiting slide-left slide-right").css("display",""),a.$(".live-scores-menu-item").removeClass("active"),n&&window.LiveScoreApp.DetailClosingFlags.clear(n,"closeMatchDetails-timeout"),window.LiveScoreApp.detailClosing=!1},150)},cleanupScripts:function(){if(window.LiveScoreApp.ScriptManager){const e=window.LiveScoreApp.Config,t=e&&e.optimizationSettings._dynamicInfo,a=t&&t.basedOnLiveMatches>200?6e4:3e5;return window.LiveScoreApp.ScriptManager.cleanupOldScripts(a)}return 0},emergencyScriptCleanup:function(){return window.LiveScoreApp.ScriptManager?(window.LiveScoreApp.ScriptManager.activeScripts.size,window.LiveScoreApp.ScriptManager.cleanupAllScripts()):0},getScriptStatus:function(){return window.LiveScoreApp.ScriptManager?window.LiveScoreApp.ScriptManager.getStatus():{error:"ScriptManager not available"}}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.MatchIncidents=function(){const e=window.LiveScoreApp.Utils.Cache,t=(window.LiveScoreApp.Config,window.LiveScoreApp.Utils.RequestQueue,window.LiveScoreApp.Utils.jQuery);window.LiveScoreApp.Utils.Compression;let a=null;function i(e){if(!e||"string"!=typeof e)return e||"";const t=document.createElement("div");return t.textContent=e,t.innerHTML}function n(e,t="Oyuncu"){return e?e.player&&e.player.shortName?i(e.player.shortName):e.player&&e.player.fullName?i(e.player.fullName):e.playerName?i(e.playerName):t:t}function o(e,t="Oyuncu"){return e?e.shortName?i(e.shortName):e.fullName?i(e.fullName):e.name?i(e.name):t:t}function s(i,n){n?a=null:(a=i,r(),window.matchIncidentsUpdateInterval=setInterval(function(){if("hidden"===document.visibilityState)return;const a=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails?window.LiveScoreApp.Modules.MatchDetails:null;if("details"===(a?a.getCurrentTab():null)){const o=window.LiveScoreApp.Utils.RequestIdGenerator,s=t.$("#match-incidents").children().clone(!0),r=s.length>0&&!s.hasClass("loading-spinner")&&!s.is("p"),c=`${i}_incidents`;e.deleteCacheItem(`${e.CACHE_PREFIX.MATCH_DETAIL}${c}`);const u=o?o.generateId(i,"get_match_incidents_auto"):null;("undefined"!=typeof QueuedAjax&&QueuedAjax?QueuedAjax.request("get_match_incidents",{match_id:i,request_id:u}):t.ajax({url:"/wp-admin/admin-ajax.php",type:"POST",data:{action:"get_match_incidents",match_id:i,request_id:u,nonce:window.liveScoresNonce||""}})).then(function(s){if(!(window.LiveScoreApp.DetailClosingFlags&&window.LiveScoreApp.DetailClosingFlags.isClosing(i)||window.LiveScoreApp.detailClosing||(window.LiveScoreApp.LiveScores?window.LiveScoreApp.LiveScores.getSelectedMatchId():null)!==i)){var m=s.data&&s.data.request_id?s.data.request_id:s.request_id;if((!u||o.validateResponse(i,m))&&a&&"details"===a.getCurrentTab()&&s&&s.success&&s.data&&s.data.incidents&&s.data.incidents.length>0){const a=n?"finished":"live",i=window.LiveScoreApp.Constants.getCacheTTL("MATCH_INCIDENTS",a);if(e.setToCacheByType(c,s.data.incidents,i,e.CACHE_PREFIX.MATCH_DETAIL),r){const e=d(s.data.incidents);e!==l&&(p(s.data.incidents),l=e,t.$("#match-incidents").addClass("content-refreshed"),setTimeout(function(){t.$("#match-incidents").removeClass("content-refreshed")},1500))}else p(s.data.incidents)}}})}},3e4),window.matchIncidentsUpdateInterval.matchId=i)}function r(){window.matchIncidentsUpdateInterval&&(clearInterval(window.matchIncidentsUpdateInterval),window.matchIncidentsUpdateInterval=null)}function c(a,i,n,o={}){const s=!0===o.isBackgroundFetch,r=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails?window.LiveScoreApp.Modules.MatchDetails:null,c=s?"details":r?r.getCurrentTab():null,l=t.$('.live-scores-match[data-match-id="'+a+'"]').data("status");if("notstarted"===l)return"details"!==c||s||t.$("#match-incidents").html("<p>Maç henüz başlamamış, olaylar mevcut değil.</p>"),void n(!1);const d=`${a}_incidents`,u=e.getFromCacheByType(d,e.CACHE_PREFIX.MATCH_DETAIL);if(u&&Array.isArray(u)){if(s){const e=Array.isArray(u)&&u.length>0;return n(e),Promise.resolve()}if("function"==typeof t.$("#match-incidents").html&&"details"===c)return p(u),Promise.resolve().then(()=>{const e=Array.isArray(u)&&u.length>0;n(e)}),Promise.resolve()}return s||"details"!==c||t.$("#match-incidents").empty(),("undefined"!=typeof QueuedAjax&&QueuedAjax?QueuedAjax.request("get_match_incidents",{match_id:a,match_status:l||""}):t.ajax({url:"/wp-admin/admin-ajax.php",type:"POST",data:{action:"get_match_incidents",match_id:a,match_status:l||"",nonce:window.liveScoresNonce||""}})).then(function(o){if(!window.LiveScoreApp.detailClosing)if(o&&o.success&&o.data){let r=[];if(Array.isArray(o.data)?r=o.data:o.data.incidents&&Array.isArray(o.data.incidents)?r=o.data.incidents:o.data.incidents&&"object"==typeof o.data.incidents&&o.data.incidents.incidents&&Array.isArray(o.data.incidents.incidents)&&(r=o.data.incidents.incidents),0===r.length&&window.momentumChartData&&Array.isArray(window.momentumChartData.incidents)&&window.momentumChartData.incidents.length>0&&window.momentumChartData.matchId===a&&(r=window.momentumChartData.incidents),0===r.length&&setTimeout(function(){if(window.momentumChartData&&Array.isArray(window.momentumChartData.incidents)&&window.momentumChartData.incidents.length>0&&window.momentumChartData.matchId===a){const t=window.momentumChartData.incidents,a=i?"finished":"live",n=window.LiveScoreApp.Constants.getCacheTTL("MATCH_INCIDENTS",a);e.setToCacheByType(d,t,n,e.CACHE_PREFIX.MATCH_DETAIL),"details"===c&&p(t)}},500),r.length>0){const t=i?"finished":"live",a=window.LiveScoreApp.Constants.getCacheTTL("MATCH_INCIDENTS",t);e.setToCacheByType(d,r,a,e.CACHE_PREFIX.MATCH_DETAIL),"details"!==c||s||p(r),Promise.resolve().then(()=>{const e=Array.isArray(r)&&r.length>0;n(e)})}else o.data.message?("details"!==c||s||t.$("#match-incidents").html("<p>"+o.data.message+"</p>"),n(!1)):("details"!==c||s||t.$("#match-incidents").html("<p>Bu maç için maç olayları verisi bulunamadı.</p>"),n(!1))}else"details"!==c||s||t.$("#match-incidents").html("<p>Bu maç için maç olayları verisi bulunamadı.</p>"),n(!1)}).catch(function(e){s||"details"!==c||t.$("#match-incidents").html("<p>Maç olayları yüklenirken bir hata oluştu. Lütfen daha sonra tekrar deneyin.</p>"),n(!1)})}let l=null;function d(e){return e&&e.length?e.map(function(e){return[e.incidentType||"",e.time||"",e.addedTime||"",e.isHome?"1":"0",e.homeScore||"",e.awayScore||"",e.incidentClass||"",e.player?e.player.shortName||e.player.name||"":e.playerName||"",e.text||"",e.status||""].join("|")}).join(";;"):""}function u(e,t,a,i){let n=e?e+", ":"";return"goal"===t?n+="Goal by "+(a||"Unknown player"):"card"===t?n+="Card given to "+(a||"Unknown player"):"substitution"===t?n+="Substitution: "+(a||"Unknown player"):"varDecision"===t?n+="VAR Decision: "+(a||"Review"):"penaltyShootout"===t&&(n+="Penalty: "+(a||"Unknown player")),i&&(n+=", Score: "+i),n}function p(e){window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails&&window.LiveScoreApp.Modules.MatchDetails;const a=window.LiveScoreApp.LiveScores?window.LiveScoreApp.LiveScores.getSelectedMatchId():null,s=a?window.LiveScoreApp._playerTeamMap&&window.LiveScoreApp._playerTeamMap[a]:null;s&&e.forEach(function(e){if("period"!==e.incidentType&&"injuryTime"!==e.incidentType){var t=e.player&&e.player.id||e.playerIn&&e.playerIn.id||e.playerOut&&e.playerOut.id;t&&void 0!==s[t]&&e.isHome!==s[t]&&(e.isHome=s[t])}});let r="";e.forEach(function(e){let t="";"penaltyShootout"!==e.incidentType&&(void 0!==e.time&&null!==e.time&&e.time<0?t="Kulübede":(t=e.time?e.time+"'":"",e.addedTime&&999!==e.addedTime&&(t+=" +"+e.addedTime)));const a=e.incidentType;e.isHome;let s="",c="";if("period"===a)"HT"===e.text?(t="İlk Yarı Sonu "+e.homeScore+" - "+e.awayScore,c='<article class="incident general-incident" style="background-color: #e0e0e0;" role="status" aria-label="İlk Yarı Sonu '+e.homeScore+" - "+e.awayScore+'"><time class="incident-details center-incident">'+t+"</time></article>"):"FT"===e.text?(t="Maç Sonu "+e.homeScore+" - "+e.awayScore,c='<article class="incident general-incident" style="background-color: #e0e0e0;" role="status" aria-label="Maç Sonu '+e.homeScore+" - "+e.awayScore+'"><time class="incident-details center-incident">'+t+"</time></article>"):"ET"===e.text?(t="Uzatma Sonu "+e.homeScore+" - "+e.awayScore,c='<article class="incident general-incident" style="background-color: #e0e0e0;" role="status" aria-label="Uzatma Sonu '+e.homeScore+" - "+e.awayScore+'"><time class="incident-details center-incident">'+t+"</time></article>"):"PEN"===e.text&&(t="Penaltılar "+e.homeScore+" - "+e.awayScore,c='<article class="incident general-incident" style="background-color: #e0e0e0;" role="status" aria-label="Penaltılar '+e.homeScore+" - "+e.awayScore+'"><time class="incident-details center-incident">'+t+"</time></article>");else if("injuryTime"===a){const t=window.translations&&window.translations.playerstatistics&&window.translations.playerstatistics.mins?window.translations.playerstatistics.mins:"dakika",a="+"+e.length+" "+t;c='<article class="incident general-incident" role="status" aria-label="Injury time '+a+'"><time class="incident-details center-incident">'+a+"</time></article>"}else if("penaltyShootout"===a){const t=e.player?i(e.player.shortName):e.playerName?i(e.playerName):"-";"scored"===e.incidentClass?s='<i class="fas fa-futbol goal-icon"></i>':"missed"===e.incidentClass?s='<i class="fas fa-times-circle penalty-missed-icon"></i>':"goalkeeperSave"===e.incidentClass&&(s='<i class="fas fa-hand-paper goalkeeper-save-icon"></i>');const a=e.homeScore+" - "+e.awayScore;c=e.isHome?'<article class="incident home-incident" aria-label="'+u("Penalty","penaltyShootout",t,a)+'"><time class="incident-time">PEN</time><p class="incident-details home-incident">'+s+' <span class="incident-player">'+t+'</span> <span class="incident-score">'+a+"</span></p></article>":'<article class="incident away-incident" aria-label="'+u("Penalty","penaltyShootout",t,a)+'"><p class="incident-details away-incident"><span class="incident-score">'+a+'</span> <span class="incident-player">'+t+"</span> "+s+'</p><time class="incident-time">PEN</time></article>'}else if("varDecision"===a){s='<i class="fas fa-tv var-icon"></i>';let a="";if(a="penaltyNotAwarded"===e.incidentClass?!1===e.confirmed?"Penaltı İncelemesi":"Penaltı İptal Edildi":"redCardGiven"===e.incidentClass?!1===e.confirmed?"Kırmızı Kart İptal Edildi":"Kırmızı Kart Onaylandı":"redCardCancelled"===e.incidentClass?"Kırmızı Kart İptal Edildi":"penaltyAwarded"===e.incidentClass?!1===e.confirmed?"Penaltı İptal Edildi":"Penaltı Verildi":"cardUpgrade"===e.incidentClass?!1===e.confirmed?"Kart Değişikliği İptal Edildi":"Kart Yükseltildi":"cardDowngrade"===e.incidentClass?!1===e.confirmed?"Kart Değişikliği İptal Edildi":"Kart İndirildi":"goalNotAwarded"===e.incidentClass?"Gol Verilmedi":"goalAwarded"===e.incidentClass?!1===e.confirmed?"Gol Verilmedi":"Gol Verildi":!1===e.confirmed?"VAR İncelemesi Sonrası İptal":"VAR İncelemesi Sonrası Onay",e.isHome){const n=void 0!==e.homeScore&&void 0!==e.awayScore?e.homeScore+" - "+e.awayScore:"",o=e.player?i(e.player.shortName):"-";c='<article class="incident home-incident" aria-label="'+u(t,"varDecision",o,n)+'"><time class="incident-time">'+t+'</time><p class="incident-details home-incident">'+s+" "+a+' <span class="incident-score">'+n+'</span> <span class="incident-player">'+o+"</span></p></article>"}else{const n=void 0!==e.homeScore&&void 0!==e.awayScore?e.homeScore+" - "+e.awayScore:"",o=e.player?i(e.player.shortName):"-";c='<article class="incident away-incident" aria-label="'+u(t,"varDecision",o,n)+'"><p class="incident-details away-incident"><span class="incident-player">'+o+"</span> "+a+' <span class="incident-score">'+n+"</span> "+s+'</p><time class="incident-time">'+t+"</time></article>"}}else{const r="cancelled"===e.status||!0===e.isCancelled;let l;s=function(e,t,a){if("goal"===e)return a?'<i class="fas fa-times-circle cancelled-goal-icon" title="İptal edilen gol"></i>':"penalty"===t?'<i class="fas fa-futbol penalty-goal-icon"></i>':"ownGoal"===t?'<i class="fas fa-futbol own-goal-icon" style="color: red;"></i>':'<i class="fas fa-futbol goal-icon"></i>';if("card"===e){if("yellow"===t)return'<i class="fas fa-square yellow-card-icon"></i>';if("red"===t)return'<i class="fas fa-square red-card-icon"></i>';if("yellowRed"===t)return'<i class="fas fa-square yellow-card-icon"></i> <i class="fas fa-square red-card-icon"></i>'}else{if("substitution"===e)return'<i class="fas fa-exchange-alt incident-substitution-icon"></i>';if("inGamePenalty"===e&&"missed"===t)return'<i class="fas fa-times-circle penalty-missed-icon"></i>'}return""}(a,e.incidentClass,r),l="goal"===a?n(e,"Gol"):"card"===a?n(e,"Kart"):"inGamePenalty"===a?n(e,"Penaltı"):n(e),e.isHome?(c='<article class="incident home-incident'+(r?" cancelled-incident":"")+'" aria-label="'+u(t,a,l,void 0!==e.homeScore?e.homeScore+" - "+e.awayScore:"")+'"><time class="incident-time">'+t+'</time><p class="incident-details home-incident">'+s,"goal"===a||"card"===a||"inGamePenalty"===a?("goal"===a&&void 0!==e.homeScore&&void 0!==e.awayScore&&(c+='<span class="incident-score">'+e.homeScore+" - "+e.awayScore+"</span>"),c+='<span class="incident-player">'+(r?"<s>":"")+l+(r?"</s>":"")+"</span>","goal"===a&&e.assist1&&e.assist1.shortName&&(c+='<span class="assist">(Asist: '+i(e.assist1.shortName)+")</span>")):"substitution"===a&&(c+='<span class="incident-player-out">'+o(e.playerOut)+'</span><i class="fas fa-arrow-right"></i><span class="incident-player-in">'+o(e.playerIn)+"</span>"),c+="</p></article>"):(c='<article class="incident away-incident'+(r?" cancelled-incident":"")+'" aria-label="'+u(t,a,l,void 0!==e.homeScore?e.homeScore+" - "+e.awayScore:"")+'"><p class="incident-details away-incident">',"goal"===a||"card"===a||"inGamePenalty"===a?("goal"===a&&void 0!==e.homeScore&&void 0!==e.awayScore&&(c+='<span class="incident-score">'+e.homeScore+" - "+e.awayScore+"</span>"),c+='<span class="incident-player">'+(r?"<s>":"")+l+(r?"</s>":"")+"</span>","goal"===a&&e.assist1&&e.assist1.shortName&&(c+='<span class="assist">(Asist: '+i(e.assist1.shortName)+")</span>")):"substitution"===a&&(c+='<span class="incident-player-out">'+o(e.playerOut)+'</span><i class="fas fa-arrow-right"></i><span class="incident-player-in">'+o(e.playerIn)+"</span>"),c+=" "+s+'</p><time class="incident-time">'+t+"</time></article>")}r+=c}),""===r?(t.$("#match-incidents").html(""),l=""):(t.$("#match-incidents").html(r),l=d(e))}return"undefined"!=typeof window&&(window.addEventListener("beforeunload",r),window.addEventListener("unload",r),document.addEventListener("visibilitychange",function(){document.hidden?r():a&&!window.matchIncidentsUpdateInterval&&s(a,!1)})),{fetchMatchIncidents:c,renderMatchIncidents:p,updateMatchIncidentsTab:function(e,t,a,i={}){if(window.LiveScoreApp.detailClosing)return void(a&&a(!1));const n=window.LiveScoreApp.Utils.RequestIdGenerator;return n&&n.generateId(e,"get_match_incidents"),c(e,t,function(i){a&&a(i),t||s(e,t)},i)},setupAutoUpdate:s,cleanupIntervals:r}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.PullToRefresh=function(){var e=!1,t=null,a=0,i=0,n=!1,o=!1,s=null;function r(e){if(!(o||e.touches.length>1)){var t=document.getElementById("match-details");t&&!t.classList.contains("detail-closed")&&""!==t.innerHTML.trim()||(window.pageYOffset||document.documentElement.scrollTop)>5||(a=e.touches[0].clientY,n=!0)}}function c(e){if(n&&!o){var t=.4*(e.touches[0].clientY-a);if(t<0)return n=!1,void(s&&(s.style.height="0",s.classList.remove("pulling")));if((window.pageYOffset||document.documentElement.scrollTop)>5)n=!1;else if(t>10&&e.preventDefault(),i=Math.min(t,120),s){s.classList.add("pulling"),s.style.height=i+"px";var r=s.querySelector(".ptr-text");r&&(r.textContent=i>=70?"Bırakın yenilensin":"Yenilemek için çekin");var c=s.querySelector(".ptr-spinner");if(c){var l=i/120*360;c.style.transform="rotate("+l+"deg)"}}}}function l(){n&&(n=!1,i>=70&&!o?function(){if(o=!0,s){s.classList.remove("pulling"),s.classList.add("refreshing");var e=s.querySelector(".ptr-text");e&&(e.textContent="Yenileniyor...")}var t=window.LiveScoreApp.LiveScores;if(t&&"function"==typeof t.fetchLiveScores)if(t.getIsAllMatchesSelected&&t.getIsAllMatchesSelected()){var a=window.LiveScoreApp.Utils.jQuery.$("#date-picker").val();if(a){var i=a.split("/");t.fetchLiveScores(i[0],i[1],i[2],"all")}}else t.fetchLiveScores(null,null,null,"live");setTimeout(function(){o=!1,d()},1500)}():d(),i=0)}function d(){s&&(s.classList.remove("pulling","refreshing"),s.style.height="0")}return{init:function(){var a=window.LiveScoreApp.Utils.DeviceDetect;if((!a||a.isTouchDevice())&&!e){e=!0,function(){if(!s){(s=document.createElement("div")).className="ptr-indicator",s.innerHTML='<div class="ptr-spinner"></div><span class="ptr-text">Yenilemek için çekin</span>';var e=document.createElement("style");e.textContent=[".ptr-indicator {","  position: fixed; top: 0; left: 0; right: 0;","  height: 0; overflow: hidden;","  display: flex; align-items: center; justify-content: center; gap: 8px;","  background: linear-gradient(135deg, #e3f2fd, #bbdefb);","  color: #1565c0; font-size: 13px; font-weight: 600;","  z-index: 10000; transition: height 0.2s ease;","  box-shadow: 0 2px 8px rgba(0,0,0,0.1);","}",".ptr-indicator.pulling { transition: none; }",".ptr-indicator.refreshing { height: 50px !important; }",".ptr-spinner {","  width: 20px; height: 20px;","  border: 2px solid #90caf9; border-top-color: #1565c0;","  border-radius: 50%;","}",".ptr-indicator.refreshing .ptr-spinner {","  animation: ptr-spin 0.8s linear infinite;","}","@keyframes ptr-spin { to { transform: rotate(360deg); }}","@media (prefers-reduced-motion: reduce){","  .ptr-spinner { animation: none !important; }","}"].join("\n"),document.head.appendChild(e),document.body.appendChild(s)}}(),t&&t.abort();var i=(t=new AbortController).signal;document.getElementById("live-scores")&&(document.addEventListener("touchstart",r,{passive:!0,signal:i}),document.addEventListener("touchmove",c,{passive:!1,signal:i}),document.addEventListener("touchend",l,{passive:!0,signal:i}))}},destroy:function(){t&&(t.abort(),t=null),s&&s.parentNode&&(s.parentNode.removeChild(s),s=null),e=!1,o=!1,n=!1}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.StatisticsModules=window.LiveScoreApp.Components.StatisticsModules||{},window.LiveScoreApp.Components.StatisticsModules.Data=function(){let e,t,a,i,n,o=null;function s(){try{return e=window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.Cache,t=window.LiveScoreApp.Config||{},a=window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.RequestQueue,i=window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.jQuery,n=window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.RequestIdGenerator,!!(e&&a&&i)}catch(e){return!1}}let r=s();function c(t,a,o=!0,c="ALL"){return new Promise(async(o,l)=>{try{if(r||(r=s()),!r)return l(new Error("Gerekli modüller bulunamadı"));if(!window.LiveScoresAjax)return l(new Error("LiveScoresAjax bulunamadı"));const d=t+"_"+c,u=e.getFromCacheByType(d,e.CACHE_PREFIX.STATISTIC);if(u)return o(u);try{const s=n?n.generateId(t,"get_match_statistics_"+c):null;let r=await("undefined"!=typeof QueuedAjax&&QueuedAjax?QueuedAjax.request("get_match_statistics",{match_id:t,period:c,match_status:a?"finished":"live",request_id:s}):i.ajax({url:"/wp-admin/admin-ajax.php",type:"POST",data:{action:"get_match_statistics",match_id:t,period:c,match_status:a?"finished":"live",request_id:s,nonce:window.liveScoresNonce||""}}));if(r&&void 0!==r.success&&r.data&&(r=r.data),r&&r.statistics&&r.statistics.length>0){const t=a?"finished":"live",i=window.LiveScoreApp.Constants.getCacheTTL("STATISTICS",t);return e.setToCacheByType(d,r,i,e.CACHE_PREFIX.STATISTIC),o(r)}return e.setToCacheByType(d,{noData:!0},6e4,e.CACHE_PREFIX.STATISTIC),o({noData:!0})}catch(e){return l(e)}}catch(e){return l(e)}})}return{fetchStatistics:c,fetchStatisticsSilently:function(e,t,a="ALL"){return c(e,t,!1,a)},cancelActiveRequest:function(){return!(!o||"function"!=typeof o.abort||(o.abort(),o=null,0))}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.StatisticsModules=window.LiveScoreApp.Components.StatisticsModules||{},window.LiveScoreApp.Components.StatisticsModules.UI=function(){const e=window.LiveScoreApp.Utils.jQuery,t=window.LiveScoreApp.Utils.Translator,a=window.LiveScoreApp.Utils?.SecurityUtils;window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton;let i=!1;async function n(t=""){if(e&&e.$&&e.$(".statistics-tab").is(":hidden"))return;const a=`\n            <div class="statistics-error-container" style="padding: 15px; border: 1px solid #f5c6cb; border-radius: 6px; background-color: #f8d7da; color: #721c24; margin: 10px 0;">\n                <h4 style="margin-top: 0;">İstatistik Bilgisi Alınamadı</h4>\n                <p>${t||"İstatistik bilgisi alınamadı. Lütfen daha sonra tekrar deneyin."}</p>\n                <button id="statistics-retry-button" style="background-color: #007bff; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; margin-top: 10px;">Yeniden Dene</button>\n            </div>\n        `;return e.$("#tab-statistics").html(a),e.$("#statistics-retry-button").on("click",function(){const t=e.$("#match-details").data("match-id");if(t){if(window.LiveScoreApp.Utils.Cache){const e=window.LiveScoreApp.Utils.Cache.CACHE_PREFIX.STATISTIC+t;window.LiveScoreApp.Utils.Cache.deleteCacheItem(e)}if("function"==typeof window.refreshStatisticsTabNow)window.refreshStatisticsTabNow(t);else{const a=window.LiveScoreApp.Components.Statistics;a&&"function"==typeof a.updateStatisticsTab?a.updateStatisticsTab(t):e.$("#tab-statistics").html("<p>Yeniden deneme başarısız. Sayfayı yenileyip tekrar deneyiniz.</p>")}}}),Promise.resolve()}async function o(t){try{if(!t)return await n("Cevap boş alındı"),!1;if(!t.statistics)return e.$("#tab-statistics").html('<div style="background:#f5f5f5; padding:10px; font-size:12px; overflow:auto; max-height:300px;"><pre>API Response Debug:\n'+JSON.stringify(t,null,2).substring(0,1e3)+"...</pre></div>"),await n("API response format bilinmiyor. Lütfen geliştiriciyle iletişime geçin."),!1;if(!Array.isArray(t.statistics))return await n("İstatistik verisi dizi formunda değil"),!1;if(0===t.statistics.length)return e.$("#tab-statistics").html("<p>Bu maç için istatistik verisi mevcut değil.</p>"),!0;e.$("#tab-statistics").empty();const a='\n                <div class="statistics-period-selection">\n                    <button id="all-period" class="active">TÜMÜ</button>\n                    <button id="first-half">1. Yarı</button>\n                    <button id="second-half">2. Yarı</button>\n                </div>\n                <div id="statistics-content"></div>\n            ';e.$("#tab-statistics").html(a);let i=t.statistics.some(e=>"ALL"===e.period),o=t.statistics.some(e=>"1ST"===e.period),r=t.statistics.some(e=>"2ND"===e.period);return i||e.$("#all-period").hide(),o||e.$("#first-half").hide(),r||e.$("#second-half").hide(),await s(t,"ALL"),e.$("#all-period").addClass("active"),!0}catch(e){return await n("İstatistik görünümü hazırlanırken hata oluştu."),!1}}async function s(a,n){try{if(i)return!1;i=!0;let o='<div class="live-scores-statistics-content">',s=!0;return a&&a.statistics&&Array.isArray(a.statistics)?a.statistics.forEach(function(e){e&&"object"==typeof e&&e.period===n&&e.groups&&Array.isArray(e.groups)&&e.groups.length>0&&(s=!1,e.groups.forEach(function(e){e&&"object"==typeof e&&(o+=`<div class="live-scores-stat-group"><h4>${t.translateName("statistics",e.groupName)}</h4>`,e.statisticsItems&&Array.isArray(e.statisticsItems)&&e.statisticsItems.length>0?e.statisticsItems.forEach(function(e){e&&"object"==typeof e&&(2===e.renderType?o+=c(e):o+=r(e))}):o+="<p>Bu grup için istatistik verisi bulunamadı.</p>",o+="</div>")}))}):s=!0,s&&(o+="<p>Bu periyot için istatistik verisi bulunamadı.</p>"),o+="</div>",e.$("#statistics-content").html(o),i=!1,!0}catch(e){return i=!1,!1}}function r(e){const i=parseFloat(e.homeValue)||0,n=parseFloat(e.awayValue)||0,o=i+n,s=0===o?0:Math.round(i/o*100),r=0===o?0:Math.round(n/o*100),c=a?.escapeHtml(e.name)||e.name;return`\n            <div class="live-scores-stat-row">\n                <div class="live-scores-stat-label">${t.translateName("statistics",c)}</div>\n                <div class="live-scores-stat-bar-container">\n                    <div class="live-scores-stat-bar home" style="width:${s}%;"></div>\n                    <div class="live-scores-stat-bar away" style="width:${r}%;"></div>\n                    <div class="live-scores-stat-value home">${i}</div>\n                    <div class="live-scores-stat-value away">${n}</div>\n                </div>\n            </div>\n        `}function c(e){let a=0,i=0;if("number"==typeof e.homeValue&&"number"==typeof e.awayValue)a=e.homeValue,i=e.awayValue;else if("string"==typeof e.home&&e.home.includes("%"))a=parseInt(e.home)||0,i=parseInt(e.away)||0;else{const t=/(\d+)\/(\d+)\s*\((\d+)%\)/,n=/(\d+)\/(\d+)\s*\((\d+)%\)/,o="string"==typeof e.home?e.home.match(t):null,s="string"==typeof e.away?e.away.match(n):null;if(o&&s)a=parseInt(o[3])||0,i=parseInt(s[3])||0;else{if("number"!=typeof e.homeValue||"number"!=typeof e.awayValue)return r(e);a=e.homeValue,i=e.awayValue}}const n=a>i?"higher":"",o=i>a?"higher":"",s=a+i;return`\n            <div class="live-scores-stat-row circular-stat">\n                <div class="live-scores-stat-label">${t.translateName("statistics",e.name)}</div>\n                <div class="circular-stat-container">\n                    <div class="circular-stat-item">\n                        <svg viewBox="0 0 36 36" class="circular-chart ${n}">\n                            <circle class="circle-bg" cx="18" cy="18" r="15.9155" />\n                            <circle class="circle home-circle" cx="18" cy="18" r="15.9155" \n                                    style="stroke-dasharray: ${a}, ${s};" />\n                            <text x="18" y="20.35" class="percentage">${a}%</text>\n                        </svg>\n                    </div>\n                    <div class="circular-stat-item">\n                        <svg viewBox="0 0 36 36" class="circular-chart ${o}">\n                            <circle class="circle-bg" cx="18" cy="18" r="15.9155" />\n                            <circle class="circle away-circle" cx="18" cy="18" r="15.9155" \n                                    style="stroke-dasharray: ${i}, ${s};" />\n                            <text x="18" y="20.35" class="percentage">${i}%</text>\n                        </svg>\n                    </div>\n                </div>\n            </div>\n        `}return{showLoadingState:function(){return new Promise(e=>{e(!0)})},showErrorState:n,initializeStatistics:o,renderStatistics:s,renderBarStat:r,renderCircularStat:c,updateStatisticsTab:async function(e){try{const e=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails?window.LiveScoreApp.Modules.MatchDetails:null;return!(!e||"statistics"!==e.getCurrentTab())}catch(e){return!1}},renderContent:async function(t){try{if("string"==typeof t)return e.$("#tab-statistics").html(t),!0;if(!t)return await n("Veri alınamadı"),!1;const a=window.LiveScoreApp.Components.StatisticsModules.Utils;return a&&"function"==typeof a.isValidStatisticsData&&!a.isValidStatisticsData(t)?(await n("Geçersiz istatistik verisi"),!1):await o(t)}catch(e){return await n("İçerik hazırlanırken hata oluştu."),!1}},silentUpdateContent:async function(t){try{if(!t)return!1;if("string"==typeof t){if(t.trim().startsWith("<"))return e.$("#tab-statistics").html(t),!0;try{t=JSON.parse(t)}catch(e){return!1}}if(!t.statistics)return!1;if(!Array.isArray(t.statistics)){if("object"!=typeof t.statistics)return!1;t.statistics=[t.statistics]}if(!t.statistics.some(e=>e&&"string"==typeof e.period&&["ALL","1ST","2ND"].includes(e.period)&&e.groups&&Array.isArray(e.groups)))return!1;const a=e.$(".statistics-period-selection button.active");let i="ALL";if(a.length){const e=a.attr("id");"first-half"===e?i="1ST":"second-half"===e&&(i="2ND")}const n=e.$("#statistics-content").scrollTop(),o=e.$("#statistics-content .live-scores-stat-row:hover").length>0?e.$("#statistics-content .live-scores-stat-row:hover").index():-1;if(!await s(t,i))return!1;if(e.$("#statistics-content").scrollTop(n),-1!==o)try{e.$("#statistics-content .live-scores-stat-row").eq(o).addClass("just-updated"),setTimeout(()=>{e.$("#statistics-content .just-updated").removeClass("just-updated")},100)}catch(e){}return!0}catch(e){return!1}},getCurrentActivePeriod:function(){const t=e.$(".statistics-period-selection button.active");if(t.length){const e=t.attr("id");if("first-half"===e)return"1ST";if("second-half"===e)return"2ND"}return"ALL"}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.StatisticsModules=window.LiveScoreApp.Components.StatisticsModules||{},window.LiveScoreApp.Components.StatisticsModules.Events=function(){const e=window.LiveScoreApp.Utils.jQuery;let t={isProcessing:!1};async function a(t){try{return e.$(".statistics-period-selection button").removeClass("active"),e.$(t).addClass("active"),!0}catch(e){return!1}}async function i(i){try{const n=window.LiveScoreApp.Components.StatisticsModules.UI;return e.$(".statistics-period-selection").off("click"),e.$(".statistics-period-selection").on("click","button",async function(o){if(!t.isProcessing){t.isProcessing=!0;try{const t=e.$(this),o=t.attr("id");if(!t.hasClass("active")&&n&&"function"==typeof n.renderStatistics){let e="ALL";"first-half"===o?e="1ST":"second-half"===o&&(e="2ND"),await n.renderStatistics(i,e),await a(this)}}catch(e){}finally{t.isProcessing=!1}}}),!0}catch(e){return!1}}async function n(e){try{return!!e&&await i(e)}catch(e){return!1}}async function o(){try{return e.$("#all-period, #first-half, #second-half").off("click"),t.isProcessing=!1,!0}catch(e){return!1}}return{setActiveButton:a,setupPeriodButtons:i,setupEventListeners:n,cleanupEventListeners:o,initializeEvents:async function(e){try{return await o(),!e||await n(e)}catch(e){return!1}}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.StatisticsModules=window.LiveScoreApp.Components.StatisticsModules||{},window.LiveScoreApp.Components.StatisticsModules.Utils=function(){const e=window.LiveScoreApp.Utils.Translator;function t(e){if(!e||"object"!=typeof e)return!1;if(!Array.isArray(e.statistics))return!1;if(0===e.statistics.length)return!0;return e.statistics.every(e=>!(!e||"object"!=typeof e)&&(!(!e.period||"string"!=typeof e.period)&&(!["period"].some(t=>{const a=e[t];if(!a||"string"!=typeof a)return!1;const i=a.toLowerCase();return i.includes("<script")||i.includes("onerror=")||i.includes("onload=")||i.includes("javascript:")})&&(e.groups&&Array.isArray(e.groups),!0))))}async function a(e){try{return t(e)}catch(e){return!1}}function i(e,a){if(!t(e))return[];const i=e.statistics.filter(e=>e.period===a);return i.length>0?i:[]}async function n(e,t){try{return i(e,t)}catch(e){return[]}}function o(t,a){try{return e&&"function"==typeof e.translateName&&e.translateName(t,a)||a}catch(e){return a}}function s(e){if(!Array.isArray(e))return[];const t=["possession","shots","shotsOnTarget","corners","fouls","yellowCards","redCards","offsides","passes"];return[...e].sort((e,a)=>{const i=t.indexOf(e.groupName),n=t.indexOf(a.groupName);return-1!==i&&-1!==n?i-n:-1!==i?-1:-1!==n?1:e.groupName.localeCompare(a.groupName)})}return{isValidStatisticsData:t,filterStatisticsByPeriod:i,calculatePercentage:function(e,t,a=0){if("number"==typeof e&&"number"==typeof t||(e=parseFloat(e)||0,t=parseFloat(t)||0),0===t)return a;const i=e/t*100;return Math.round(i)},safeParseFloat:function(e){if("number"==typeof e)return e;if(!e||"-"===e)return 0;const t=parseFloat(e.toString().replace(/[^\d.-]/g,""));return isNaN(t)?0:t},safeTranslate:o,parseCircularStatValue:function(e){if(!e||"string"!=typeof e)return null;const t=e.match(/(\d+)\/(\d+)\s*\((\d+)%\)/);return t&&4===t.length?{value:parseInt(t[1]),total:parseInt(t[2]),percentage:parseInt(t[3])}:null},sortStatisticGroups:s,validateStatisticsData:a,filterStatisticsByPeriodAsync:n,translateAsync:async function(e,t){try{return o(e,t)}catch(e){return t}},sortStatisticGroupsAsync:async function(e){try{return s(e)}catch(t){return Array.isArray(e)?[...e]:[]}},processStatisticsData:async function(e,t,i=null){try{if(!await a(e))throw new Error("Geçersiz istatistik verisi");const s=await n(e,t);if(i&&s.length>0&&s[0].groups){const e=s[0].groups.filter(e=>e.groupName===i||o("statistics",e.groupName)===i);if(e.length>0){const t=JSON.parse(JSON.stringify(s[0]));return t.groups=e,{statistics:[t]}}}return{statistics:s}}catch(e){return{statistics:[]}}}}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.StatisticsModules=window.LiveScoreApp.Components.StatisticsModules||{},window.LiveScoreApp.Components.Statistics=function(){const e=window.LiveScoreApp.Utils.Cache,t=window.LiveScoreApp.Config,a=window.LiveScoreApp.Utils.jQuery;let i,n,o,s,r=!1,c=null,l=null,d=null,u=!1,p={inProgress:!1,lastUpdate:null};function m(){let e=[];return window.LiveScoreApp.Components.StatisticsModules.Data||e.push("Data"),window.LiveScoreApp.Components.StatisticsModules.UI||e.push("UI"),window.LiveScoreApp.Components.StatisticsModules.Events||e.push("Events"),window.LiveScoreApp.Components.StatisticsModules.Utils||e.push("Utils"),e}function h(t){const a=["ALL","1ST","2ND"];for(const i of a){const a=e.CACHE_PREFIX.STATISTIC+t+"_"+i;e.deleteCacheItem(a)}const i=e.CACHE_PREFIX.STATISTIC+t;return e.deleteCacheItem(i),!0}function v(){const e=window.LiveScoreApp.Modules.MatchDetails,t=e?e.getCurrentTab():null;return!(!e||"statistics"!==t)}function y(e,a=5e3){const i=t.requestConfig&&t.requestConfig.timeoutDuration||5e3;return new Promise(t=>{const n=document.createElement("script");n.src=e,n.async=!1;let o=setTimeout(()=>{t&&t(!1),t=null},a||i);n.onload=()=>{clearTimeout(o),t&&t(!0)},n.onerror=e=>{clearTimeout(o),t&&t(!1)},document.head.appendChild(n)})}function w(){return new Promise(e=>{if(r)return e(!0);const a=window.location.origin+"/wp-content/plugins/v7/js/components/statistics/",c=(new Date).getTime();let l=m();if(0===l.length)return i=window.LiveScoreApp.Components.StatisticsModules.Data,n=window.LiveScoreApp.Components.StatisticsModules.UI,o=window.LiveScoreApp.Components.StatisticsModules.Events,s=window.LiveScoreApp.Components.StatisticsModules.Utils,r=!0,e(!0);const d=[{name:"statistics-data.js",ref:"Data"},{name:"statistics-ui.js",ref:"UI"},{name:"statistics-events.js",ref:"Events"},{name:"statistics-utils.js",ref:"Utils"}].filter(e=>l.includes(e.ref));if(0===d.length)return r=!0,e(!0);const u=d.map(e=>new Promise(i=>{const n=`${a}${e.name}?ver=${c}`,o=t.requestConfig&&t.requestConfig.timeoutDuration||7e3;y(n,o).then(t=>{t?i(!0):y(`/wp-content/plugins/v7/js/components/statistics/${e.name}?ver=${c}`,Math.floor(.7*o)).then(e=>{i(e)})})}));Promise.all(u).then(t=>{i=window.LiveScoreApp.Components.StatisticsModules.Data||null,n=window.LiveScoreApp.Components.StatisticsModules.UI||null,o=window.LiveScoreApp.Components.StatisticsModules.Events||null,s=window.LiveScoreApp.Components.StatisticsModules.Utils||null,t.every(e=>!0===e);const a=t.some(e=>!0===e);r=a||!!(i&&n&&o&&s),e(r)}).catch(t=>{e(!1)})})}function f(e){if(l===e)return u;const t=a.$('.live-scores-match[data-match-id="'+e+'"]');if(!t.length){try{const t=window.LiveScoreApp&&window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails;if(t&&(t.currentMatchId||window.LiveScoreApp.LiveScores?.getSelectedMatchId?.())===e)return u}catch(e){}return!1}return"finished"===t.data("status")}async function g(t){if(S(),f(t))return;const a=e.getFromCacheByType(t,e.CACHE_PREFIX.STATISTIC);if(a&&!0===a.noData){const a=e.CACHE_PREFIX.STATISTIC+t;e.deleteCacheItem(a)}const i=29e3;let n=i;const o=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(o){const e=o.effectiveType||o.type;"4g"===e||"wifi"===e?n=i:"3g"===e?n=Math.max(9e4,i):"2g"!==e&&"slow-2g"!==e||(n=Math.max(12e4,i))}if((navigator.getBattery||navigator.battery&&navigator.battery.level)&&(async()=>{try{const e=await(navigator.getBattery?.())||navigator.battery;e&&e.level<.2&&(n=Math.max(n,45e3))}catch(e){}})().catch(()=>{}),r&&v())try{await A(t)}catch(e){}c=setInterval(async function(){if("hidden"!==document.visibilityState&&v())if(f(t))S();else if(!p.inProgress)try{if(!r&&!await w())return;await A(t)}catch(e){}},n)}function S(){c&&(clearInterval(c),c=null),i&&"function"==typeof i.cancelActiveRequest&&i.cancelActiveRequest()}async function A(t){if(p.inProgress)return!1;p.inProgress=!0;try{if(h(t),!v())return p.inProgress=!1,!1;if(!i||"function"!=typeof i.fetchStatisticsSilently)return p.inProgress=!1,!1;const o=await i.fetchStatisticsSilently(t,u,"ALL");if(o&&!0===o.noData)return p.lastUpdate=Date.now(),p.inProgress=!1,!0;if(o&&o.statistics&&o.statistics.length>0){const a=u?"finished":"live",i=window.LiveScoreApp.Constants.getCacheTTL("STATISTICS",a);e.setToCacheByType(`${t}_1ST`,o,i,e.CACHE_PREFIX.STATISTIC),e.setToCacheByType(`${t}_2ND`,o,i,e.CACHE_PREFIX.STATISTIC)}if(a.$(".statistics-tab").show(),"string"==typeof o&&0===o.indexOf("<"))return h(t),p.inProgress=!1,!1;if(!n||"function"!=typeof n.silentUpdateContent)return p.inProgress=!1,!1;const s=await n.silentUpdateContent(o);return p.lastUpdate=Date.now(),p.inProgress=!1,s}catch(e){return p.inProgress=!1,!1}}return{fetchStatistics:async function(e,t){try{if(await w()&&i)return await i.fetchStatistics(e,t,!0,"ALL");throw new Error('\n                    <div class="statistics-warning">\n                        <h4>İstatistik verileri yüklenemedi</h4>\n                        <p>Gerekli modüller yüklenemedi. Lütfen sayfayı yenileyip tekrar deneyin.</p>\n                    </div>\n                ')}catch(e){throw e}},updateStatisticsTab:async function c(p,y){try{if(!1===y){const e=a.$('.live-scores-match[data-match-id="'+p+'"]');if("notstarted"===(e.length>0?e.data("status"):null))return}if(d&&d.abort(),d=new AbortController,l&&l!==p&&h(l),window.LiveScoreApp.Modules.MatchDetails,S(),l=p,null==y){const e=a.$('.live-scores-match[data-match-id="'+p+'"]');u=e.length>0&&"finished"===e.data("status")}else u=y;let f=null,A=!1;if(!v())return void S();const L=["ALL","1ST","2ND"];for(const t of L){const a=p+"_"+t,i=e.getFromCacheByType(a,e.CACHE_PREFIX.STATISTIC);if(i&&!0!==i.noData){f=i;break}}if(f){const e=n&&"function"==typeof n.renderContent,t=o&&"function"==typeof o.initializeEvents;if(e&&t){let e=!1;if("string"==typeof f)a.$("#tab-statistics").html(f),e=!0;else try{n.renderContent(f),o.initializeEvents(f),e=!0}catch(t){e=!1}if(e){if(u)return;return void g(p)}f=null}else f=null}a.$("#tab-statistics").empty(),A=!1;const b=[100,250,500];for(let e=0;e<b.length&&(A=await w(),!A)&&e!==b.length-1;e++){const t=b[e];await new Promise(e=>setTimeout(e,t))}if(A){if(!v())return void S();f=null;for(const t of L){const a=p+"_"+t,i=e.getFromCacheByType(a,e.CACHE_PREFIX.STATISTIC);if(i&&!0!==i.noData){f=i;break}}if(f){try{"string"==typeof f?a.$("#tab-statistics").html(f):n&&"function"==typeof n.renderContent&&o&&"function"==typeof o.initializeEvents?(n.renderContent(f),o.initializeEvents(f)):a.$("#tab-statistics").html(`<pre>${JSON.stringify(f,null,2)}</pre>`)}catch(e){}if(u)return;return void g(p)}try{if(l!==p)return;if(!v())return void S();const t=await i.fetchStatistics(p,y,!0,"ALL");if(t&&t.statistics&&t.statistics.length>0){const a=y?"finished":"live",i=window.LiveScoreApp.Constants.getCacheTTL("STATISTICS",a);e.setToCacheByType(`${p}_1ST`,t,i,e.CACHE_PREFIX.STATISTIC),e.setToCacheByType(`${p}_2ND`,t,i,e.CACHE_PREFIX.STATISTIC)}const s=["1ST","2ND"].map(e=>i.fetchStatistics(p,y,!1,e).catch(()=>null));if(l!==p)return;if(Promise.allSettled(s).catch(()=>{}),t&&!0===t.noData)return void(v()&&a.$("#tab-statistics").html('<div style="text-align:center;padding:40px 20px;color:#888;"><p>Bu maç için istatistik verisi bulunmuyor.</p></div>'));if(l!==p)return;if("string"==typeof t)a.$("#tab-statistics").html(t);else if(n&&"function"==typeof n.renderContent&&o&&"function"==typeof o.initializeEvents)try{n.renderContent(t),o.initializeEvents(t)}catch(e){}else a.$("#tab-statistics").html(`<pre>${JSON.stringify(t,null,2)}</pre>`);g(p)}catch(e){if(e&&e.isTimeout)return void n.showErrorState("Sunucudan yanıt alınamadı. İnternet bağlantınızı kontrol edin ve tekrar deneyin.");if(e&&204===e.status)return void(v()&&a.$("#tab-statistics").html('<div style="text-align:center;padding:40px 20px;color:#888;"><p>Bu maç için istatistik verisi bulunmuyor.</p></div>'));n.showErrorState();const s=15*(t.requestConfig.retryDelay||200);setTimeout(()=>{v()&&(h(p),i&&"function"==typeof i.fetchStatistics&&i.fetchStatistics(p,u).then(e=>{e&&("string"==typeof e?a.$("#tab-statistics").html(e):n&&"function"==typeof n.renderContent&&o&&"function"==typeof o.initializeEvents?(n.renderContent(e),o.initializeEvents(e)):a.$("#tab-statistics").html(`<pre>${JSON.stringify(e,null,2)}</pre>`))}).catch(e=>{}))},s)}}else{a.$("#tab-statistics").html('\n                <div class="statistics-error-message" style="padding: 15px; border: 1px solid #f5c6cb; border-radius: 6px; background-color: #f8d7da; color: #721c24; margin: 10px 0;">\n                    <h4 style="margin-top: 0;">İstatistik Modülleri Yüklenemedi</h4>\n                    <p>İstatistik verilerini göstermek için gerekli dosyalar yüklenemedi. Lütfen:</p>\n                    <ol>\n                        <li>Sayfayı yenileyin ve tekrar deneyin</li>\n                        <li>Tarayıcı önbelleğini temizleyin</li>\n                        <li>Farklı bir tarayıcı kullanmayı deneyin</li>\n                    </ol>\n                    <button onclick="window.refreshStatisticsTabNow()" style="background-color: #007bff; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer;">Yeniden Dene</button>\n                </div>\n                ');const e=window.LiveScoreApp.Components.StatisticsModules;if(e){let l=m();const d=!(!e.Data||!e.UI);if((0===l.length||d)&&(e.Data&&(i=e.Data),e.UI&&(n=e.UI),e.Events&&(o=e.Events),e.Utils&&(s=e.Utils),d)){r=!0,l.length>0&&(o||(o={initializeEvents:function(){try{return a.$(".statistics-period-selection button").off("click").on("click",function(){a.$(".statistics-period-selection button").removeClass("active"),a.$(this).addClass("active")}),!0}catch(e){return!1}}},window.LiveScoreApp.Components.StatisticsModules.Events=o),s||(s={isValidStatisticsData:function(e){return!!e&&!!e.statistics&&Array.isArray(e.statistics)}},window.LiveScoreApp.Components.StatisticsModules.Utils=s)),a.$("#tab-statistics").html('<div class="loading-spinner"></div>');const e=t.requestConfig&&t.requestConfig.delay||500;return setTimeout(()=>c(p),e),!0}}}}catch(e){}},loadModules:w,startAutoUpdate:g,stopAutoUpdate:S,performSilentUpdate:A}}(),window.refreshStatisticsTabNow=async function(e){try{if(!e&&window.LiveScoreApp.Modules.MatchDetails){const t=window.LiveScoreApp.Utils.jQuery.$("#match-details").data("match-id");t&&(e=t)}if(!e)return"Güncelleme yapılamadı: Geçerli maç ID'si bulunamadı";const t=window.LiveScoreApp.Components.Statistics;if(t){t.stopAutoUpdate();const a=window.LiveScoreApp.Utils.Cache;if(a){const t=["ALL","1ST","2ND"];for(const i of t)a.deleteCacheItem(a.CACHE_PREFIX.STATISTIC+e+"_"+i);a.deleteCacheItem(a.CACHE_PREFIX.STATISTIC+e)}await t.startAutoUpdate(e);const i=await t.performSilentUpdate(e);return i?`Statistics tabı güncellendi: MatchID: ${e}`:"Statistics tabı güncelleme denendi, sonuç: "+(i?"Başarılı":"Başarısız")}return"Güncelleme yapılamadı: Statistics modülü bulunamadı"}catch(e){return`Güncelleme sırasında hata: ${e.message}`}},window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.H2H=function(){const e=window.LiveScoreApp.Utils.Cache,t=window.LiveScoreApp.Config,a=window.LiveScoreApp.Modules.ScoreUpdater,i=window.LiveScoreApp.Utils.jQuery,n=window.LiveScoreApp.Utils.Translator,o=window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton;function s(e,t){return"undefined"!=typeof QueuedAjax&&QueuedAjax?QueuedAjax.request(e,t).then(r):i.ajax({url:"/wp-admin/admin-ajax.php",type:"POST",data:Object.assign({action:e,nonce:window.liveScoresNonce||""},t)}).then(r)}function r(e){return e&&void 0!==e.success&&e.data?e.data:e}let c=null,l=null,d=null,u=null,p=null,m={};function h(){return!c&&window.LiveScoreApp.Utils.MemcachedSync&&(c=window.LiveScoreApp.Utils.MemcachedSync),c}function v(){return!l&&window.LiveScoreApp.Utils.Compression&&(l=window.LiveScoreApp.Utils.Compression),l}function y(){return!d&&window.LiveScoreApp.Utils.SkeletonLoader&&(d=window.LiveScoreApp.Utils.SkeletonLoader),d}const w=e.CACHE_PREFIX.H2H;function f(e,t="all",a=null){if(!Array.isArray(e)||0===e.length)return{homeWins:0,awayWins:0,draws:0,total:0};let i=a;if(!i&&e[0]&&e[0].homeTeam&&(i=e[0].homeTeam.id),!i)return{homeWins:0,awayWins:0,draws:0,total:0};const n=e.filter(e=>function(e){const t=e.homeScore&&void 0!==e.homeScore.display?e.homeScore.display:null,a=e.awayScore&&void 0!==e.awayScore.display?e.awayScore.display:null;if(null===t||null===a)return!1;if("-"===t||"-"===a||"ERT."===t||"ERT."===a||"İPT."===t||"İPT."===a)return!1;const i=parseInt(t),n=parseInt(a);return!isNaN(i)&&!isNaN(n)&&(!e.status||!e.status.type||("finished"===e.status.type||100===e.status.code||e.status.description&&("Ended"===e.status.description||e.status.description.includes("Ended")),!0))}(e)).filter(e=>{if("all"===t)return!0;const a=e.homeTeam?e.homeTeam.id:null,n=e.awayTeam?e.awayTeam.id:null;return"home"===t?a===i:"away"===t&&n===i});window.LiveScoreApp.debugMode;const o=n.reduce((e,t)=>{const a=t.homeTeam?t.homeTeam.id:null,n=t.awayTeam?t.awayTeam.id:null,o=parseInt(t.homeScore.display),s=parseInt(t.awayScore.display);let r;if(a===i)r=o>s?"homeWins":o<s?"awayWins":"draws";else{if(n!==i)return e;r=s>o?"awayWins":s<o?"homeWins":"draws"}return e[r]++,e.total++,e},{homeWins:0,awayWins:0,draws:0,total:0});return window.LiveScoreApp.debugMode,o}function g(t,n){if(!i.$("#history-content").length)return;const s=t,r=e.getFromCacheByType(s,w);if(r)if(window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.Translator&&"function"==typeof window.LiveScoreApp.Utils.Translator.truncateText)try{return void C(r)}catch(t){return e.clearCacheByType(w),void i.$("#history-content").html("<p>H2H verisi yeniden yükleniyor...</p>")}else window.LiveScoreApp.debugMode;const c=y();c?c.showH2HSkeleton():o&&"function"==typeof o.getH2HSkeleton?i.$("#history-content").html(o.getH2HSkeleton()):i.$("#history-content").html('<div class="loading-spinner"></div>');const l=i.$('.live-scores-match[data-match-id="'+t+'"]');if(!l.length)return void i.$("#history-content").html("<p>Maç bilgisi bulunamadı.</p>");const d=function(e){try{if(a&&"function"==typeof a.getMatchData)return a.getMatchData(e)}catch(e){}return e.length?{homeTeamName:e.find(".live-scores-team.home .live-scores-name").text().trim(),awayTeamName:e.find(".live-scores-team.away .live-scores-name").text().trim(),homeTeamLogo:e.find(".live-scores-team.home .team-logo").attr("src"),awayTeamLogo:e.find(".live-scores-team.away .team-logo").attr("src"),homeTeamId:e.data("home-team-id"),awayTeamId:e.data("away-team-id")}:null}(l);if(!d)return void i.$("#history-content").html("<p>Maç verisi alınamadı.</p>");const u=window.LiveScoreApp.currentMatchDetailsData?.[t];if(u&&u.customId){const e=u.customId;return m[t]=e,void L(e,d,t)}("undefined"!=typeof QueuedAjax&&QueuedAjax?QueuedAjax.request("get_match_details",{match_id:t}):i.ajax({url:"/wp-admin/admin-ajax.php",type:"POST",data:{action:"get_match_details",match_id:t,nonce:window.liveScoresNonce||""}})).then(function(e){if(!e.success)return void S(t,d);const a=e.data&&e.data.customId;a?(m[t]=a,L(a,d,t)):S(t,d)}).catch(function(e){S(t,d)})}function S(e,t){const a=y();a?a.showH2HSkeleton():i.$("#history-content").html('<div class="loading-spinner"></div>'),i.ajax({url:LiveScoresAjax.proxy_url,method:"GET",data:{action:"match_details",match_id:e},success:function(a){let i=a;if("string"==typeof a)try{i=JSON.parse(a)}catch(e){return void A("Veri işleme hatası.")}const n=i&&i.event&&i.event.customId;n?L(n,t,e):A("H2H verisi bu maç için mevcut değildir.")},error:function(e,t,a){A("H2H verisi yüklenemedi. Lütfen daha sonra tekrar deneyin.")}})}function A(e){i.$("#history-content").html('<p style="color: #ff6b6b; padding: 10px; text-align: center;">'+esc_html(e)+"</p>")}function L(a,n,o){a?s("get_h2h_data",{custom_id:a}).then(function(s){if(s&&s.events&&Array.isArray(s.events)){const i=v();let r=s;i&&"function"==typeof i.optimizeResponse&&(r=i.optimizeResponse(s,"h2h")),JSON.stringify(r).length/1024>500&&t.optimizationSettings.compressLargeData&&(r.events=b(r.events));const c={events:r.events,homeTeamLogo:n.homeTeamLogo||"https://cdn.sporkolik.net/teams/default.png",awayTeamLogo:n.awayTeamLogo||"https://cdn.sporkolik.net/teams/default.png",homeTeamName:n.homeTeamName,awayTeamName:n.awayTeamName,referenceTeamId:n.homeTeamId},l=window.LiveScoreApp.Constants.getCacheTTL("H2H","live");e.setToCacheByType(o,c,l,w);const d=h();if(d&&"function"==typeof d.scheduleSyncWithServer)try{const e={type:"h2h_data",key:a,size:JSON.stringify(c).length/1024,timestamp:Date.now(),cacheType:w,dataCount:c.events?c.events.length:0};setTimeout(()=>{d.scheduleSyncWithServer(e)},0)}catch(e){}C(c)}else i.$("#history-content").html("<p>H2H verisi mevcut değil.</p>")}).catch(function(e){var t=e&&e.message||"Unknown error";i.$("#history-content").html("<p>H2H verisi alınamadı. Lütfen daha sonra tekrar deneyin.</p>");const n=h();if(n&&"function"==typeof n.scheduleSyncWithServer)try{const e={type:"h2h_error",key:a,error:t,timestamp:Date.now()};setTimeout(()=>{n.scheduleSyncWithServer(e)},0)}catch(e){}}):i.$("#history-content").html("<p>H2H verisi alınamadı (customId eksik).</p>")}function b(e){let t=e.sort((e,t)=>(t.startTimestamp||0)-(e.startTimestamp||0));return t.length>20&&(t=t.slice(0,20)),t.map(e=>({startTimestamp:e.startTimestamp,status:e.status,tournament:{name:e.tournament?e.tournament.name:"Bilinmiyor"},homeTeam:{id:e.homeTeam?e.homeTeam.id:null,name:e.homeTeam?e.homeTeam.name:"Bilinmiyor",shortName:e.homeTeam?e.homeTeam.shortName:null},awayTeam:{id:e.awayTeam?e.awayTeam.id:null,name:e.awayTeam?e.awayTeam.name:"Bilinmiyor",shortName:e.awayTeam?e.awayTeam.shortName:null},homeScore:e.homeScore,awayScore:e.awayScore,homeRedCards:e.homeRedCards||0,awayRedCards:e.awayRedCards||0}))}function C(e){try{window.currentH2HData=e.events,window.currentH2HReferenceTeamId=e.referenceTeamId,i.$("#history-content").html(M(e.events,e.homeTeamLogo,e.awayTeamLogo,e.referenceTeamId)),x(),k("all")}catch(e){i.$("#history-content").html('<p class="error-message">H2H verileri gösterilirken hata oluştu.</p>')}}function x(){i.$(".h2h-filter-button").off("click").on("click",function(){const e=i.$(this).data("filter");i.$(".h2h-filter-button").removeClass("active"),i.$(this).addClass("active"),"all"===e?i.$(".h2h-match-card").show():(i.$(".h2h-match-card").hide(),i.$(`.h2h-match-card[data-match-type="${e}"]`).show()),k(e)})}function k(e){const t=i.$(".h2h-match-card:visible").filter(function(){const e=i.$(this);return!(e.hasClass("live-match")||e.find(".blinking-quote").length>0||"inprogress"===e.data("status")||"notstarted"===e.data("status"))&&(e.hasClass("finished-match")||"finished"===e.data("status")||"unknown"===e.data("status"))}),a=t.length;let n=null,o=null;t.each(function(){const e=i.$(this).find(".time").text();if(e&&"Tarih bilinmiyor"!==e)try{const t=e.split(".");if(3===t.length){const e=parseInt(t[2]);isNaN(e)||((null===n||e<n)&&(n=e),(null===o||e>o)&&(o=e))}}catch(e){}});let s=`Geçmiş Karşılaşmalar (${a})`;null!==n&&null!==o&&(s+=` (${n} - ${o})`),"home"===e?s+=" - İç Saha":"away"===e&&(s+=" - Deplasman"),i.$(".h2h-summary-title").text(s),T()}function T(){const e=i.$(".h2h-filter-button.active").data("filter")||"all";if(!window.currentH2HData)return;const t=f(window.currentH2HData,e,window.currentH2HReferenceTeamId),a=t.total>0?t.homeWins/t.total*100:0,n=t.total>0?t.draws/t.total*100:0,o=t.total>0?t.awayWins/t.total*100:0;i.$(".match-history-segment.home-wins").css("width",a+"%").attr("title","Ev Sahibi Galibiyet: "+t.homeWins).text(a>=10?t.homeWins:""),i.$(".match-history-segment.draws").css("width",n+"%").attr("title","Beraberlik: "+t.draws).text(n>=10?t.draws:""),i.$(".match-history-segment.away-wins").css("width",o+"%").attr("title","Deplasman Galibiyet: "+t.awayWins).text(o>=10?t.awayWins:""),i.$(".legend-item:eq(0)").html(`<span class="match-history-color home-wins"></span>Ev Sahibi (${t.homeWins})`),i.$(".legend-item:eq(1)").html(`<span class="match-history-color draws"></span>Beraberlik (${t.draws})`),i.$(".legend-item:eq(2)").html(`<span class="match-history-color away-wins"></span>Deplasman (${t.awayWins})`)}function M(e,t,a,i){let o='<div class="h2h-content">';if(!Array.isArray(e)||0===e.length)return o+"<p>Geçmiş maç verisi bulunamadı.</p></div>";t=t||"https://cdn.sporkolik.net/teams/default.png",a=a||"https://cdn.sporkolik.net/teams/default.png";const s=i||(e[0]&&e[0].homeTeam?e[0].homeTeam.id:null),r=f(e,"all",s),c=r.total>0?r.homeWins/r.total*100:0,l=r.total>0?r.draws/r.total*100:0,d=r.total>0?r.awayWins/r.total*100:0;o+='<div class="h2h-summary">';let u=null,p=null;e.forEach(e=>{if(e.startTimestamp){const t=new Date(1e3*e.startTimestamp).getFullYear();(null===u||t<u)&&(u=t),(null===p||t>p)&&(p=t)}});const m=u&&p?` (${u} - ${p})`:"";return o+=`<div class="h2h-summary-title">Geçmiş Karşılaşmalar (${e.length})${m}</div>`,o+=`\n            <div class="match-history-stats">\n                <div class="match-history-stats-bar">\n                    <div class="match-history-segment home-wins" style="width: ${c}%;" title="Ev Sahibi Galibiyet: ${r.homeWins}">${c>=10?r.homeWins:""}</div>\n                    <div class="match-history-segment draws" style="width: ${l}%;" title="Beraberlik: ${r.draws}">${l>=10?r.draws:""}</div>\n                    <div class="match-history-segment away-wins" style="width: ${d}%;" title="Deplasman Galibiyet: ${r.awayWins}">${d>=10?r.awayWins:""}</div>\n                </div>\n                <div class="match-history-stats-legend">\n                    <div class="legend-item"><span class="match-history-color home-wins"></span>Ev Sahibi (${r.homeWins})</div>\n                    <div class="legend-item"><span class="match-history-color draws"></span>Beraberlik (${r.draws})</div>\n                    <div class="legend-item"><span class="match-history-color away-wins"></span>Deplasman (${r.awayWins})</div>\n                </div>\n            </div>\n        `,o+='\n            <div class="h2h-filter-buttons">\n                <button class="h2h-filter-button active" data-filter="all">Tümü</button>\n                <button class="h2h-filter-button" data-filter="home">İç Saha</button>\n                <button class="h2h-filter-button" data-filter="away">Deplasman</button>\n            </div>\n        ',o+='<div class="h2h-match-cards-container">',e.forEach(i=>{if(!i||!i.homeTeam||!i.awayTeam)return;let s=null;try{s=i.startTimestamp?new Date(1e3*i.startTimestamp):null}catch(e){s=null}let r=s?s.toLocaleDateString("tr-TR",{day:"2-digit",month:"2-digit",year:"numeric"}):"Tarih bilinmiyor",c="",l="";try{c=n.translateName("teams",i.homeTeam.shortName&&""!==i.homeTeam.shortName.trim()?i.homeTeam.shortName:i.homeTeam.name),l=n.translateName("teams",i.awayTeam.shortName&&""!==i.awayTeam.shortName.trim()?i.awayTeam.shortName:i.awayTeam.name)}catch(e){c=i.homeTeam.name||"Bilinmiyor",l=i.awayTeam.name||"Bilinmiyor"}let d=i.homeScore&&void 0!==i.homeScore.display?i.homeScore.display:null,u=i.awayScore&&void 0!==i.awayScore.display?i.awayScore.display:null,p="";i.homeRedCards>0&&(p=' <i class="fa fa-square h2h-red-card-icon"></i>'.repeat(i.homeRedCards));let m="";i.awayRedCards>0&&(m=' <i class="fa fa-square h2h-red-card-icon"></i>'.repeat(i.awayRedCards));const h=i.homeTeam.id===e[0].homeTeam.id?"home":"away",v=i.status&&("inprogress"===i.status.type||"notstarted"===i.status.type),y=i.status&&"finished"===i.status.type;o+=`\n                <div class="h2h-match-card match-card ${v?"live-match":""} ${y?"finished-match":""}" \n                    data-match-type="${h}" \n                    data-status="${i.status?i.status.type:"unknown"}">\n                    <div class="time-container">\n                        <div class="time">${r}</div>\n                    </div>\n                    <div class="teams">\n                        <div class="team home">\n                            <img src="${t}" class="team-logo" width="20" height="20" alt="${c} logo">\n                            <span class="team-name">${c}</span>\n                            ${p}\n                            <span class="score score-card" style="${null===d?"visibility:hidden":""}">${null!==d?d:""}</span>\n                        </div>\n                        <div class="team away">\n                            <img src="${a}" class="team-logo" width="20" height="20" alt="${l} logo">\n                            <span class="team-name">${l}</span>\n                            ${m}\n                            <span class="score score-card" style="${null===u?"visibility:hidden":""}">${null!==u?u:""}</span>\n                        </div>\n                    </div>\n                </div>\n            `}),o+="</div>",o+="</div>",o}function E(){u&&(clearInterval(u),u=null,window.LiveScoreApp.debugMode)}return{fetchH2HData:g,generateH2HHTML:M,compressH2HData:b,setupFilterButtons:x,updateHeaderWithFilteredMatchInfo:k,updateStatisticsBar:T,setupAutoUpdate:function(t,a){if(a)return void E();E();const n=window.LiveScoreApp.Constants&&window.LiveScoreApp.Constants.getCacheTTL?window.LiveScoreApp.Constants.getCacheTTL("H2H","live"):3e5,o=Math.max(n-1e3,6e4);p=t,u=setInterval(()=>{if("hidden"===document.visibilityState)return;const a=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails;if(!a||"h2h"!==a.getCurrentTab())return;if(0===i.$("#h2h-"+t).length)return void E();const n=`${t}_h2h`,o=e.CACHE_PREFIX.H2H+n;try{e.deleteCacheItem&&e.deleteCacheItem(o);const a=m[t];a?function(t,a){t&&a&&s("get_h2h_data",{custom_id:t}).then(function(t){if(t&&t.events&&Array.isArray(t.events)){renderH2HTable(t,a);const i=`${a}_h2h`,n=e.CACHE_PREFIX.H2H+i;if(e.setCacheItem&&e.getCacheTTL)try{const a=e.getCacheTTL("H2H","live")||3e5;e.setCacheItem(n,JSON.stringify(t),a)}catch(e){}}}).catch(function(e){})}(a,t):g(t)}catch(e){}},o),window.LiveScoreApp.debugMode},stopAutoUpdate:E,getMemcachedSync:h,getCompression:v,getSkeletonLoader:y}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.Streaks=function(){const e=window.LiveScoreApp.Utils.Cache,t=window.LiveScoreApp.Modules.ScoreUpdater,a=window.LiveScoreApp.Utils.Translator,i=(window.LiveScoreApp.Config,window.LiveScoreApp.Utils.jQuery),n=window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton;let o=null,s=null,r=null,c=null,l=null;function d(){return!o&&window.LiveScoreApp.Utils.MemcachedSync&&(o=window.LiveScoreApp.Utils.MemcachedSync),o}function u(){return!s&&window.LiveScoreApp.Utils.Compression&&(s=window.LiveScoreApp.Utils.Compression),s}function p(){return!r&&window.LiveScoreApp.Utils.SkeletonLoader&&(r=window.LiveScoreApp.Utils.SkeletonLoader),r}function m(e,t){return window.QueuedAjax&&"function"==typeof window.QueuedAjax.request?window.QueuedAjax.request(e,t).then(h):new Promise(function(a,i){jQuery.ajax({url:LiveScoresAjax.ajax_url,method:"POST",data:Object.assign({action:e,nonce:LiveScoresAjax.nonce},t),success:function(e){a(h(e))},error:function(e,t,a){i(new Error(a||t||"AJAX error"))}})})}function h(e){return e&&"object"==typeof e&&e.hasOwnProperty("success")&&void 0!==e.data?e.data:e}function v(t,a){const o=`teamStreaks_${t}`,s=e.getFromCacheByType(o,e.CACHE_PREFIX.H2H);if(s&&window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.Translator&&"function"==typeof window.LiveScoreApp.Utils.Translator.truncateText)try{return void i.$("#history-content").html(y(s,"general",t))}catch(e){}const r=p();r?r.showStreaksSkeleton():n&&"function"==typeof n.getH2HSkeleton?i.$("#history-content").html(n.getH2HSkeleton()):i.$("#history-content").html('<div class="loading-spinner"></div>'),m("get_streaks_data",{match_id:t}).then(function(a){if(a&&a.general){const n=u();let s=a.general;n&&"function"==typeof n.optimizeResponse&&(s=n.optimizeResponse(a.general,"match"));const r=window.LiveScoreApp.Constants.getCacheTTL("STREAKS","live");e.setToCacheByType(o,s,r,e.CACHE_PREFIX.STREAKS);const c=d();if(c&&"function"==typeof c.scheduleSyncWithServer)try{const t={type:"team_streaks_data",key:o,size:JSON.stringify(s).length/1024,timestamp:Date.now(),cacheType:e.CACHE_PREFIX.H2H,dataCount:Array.isArray(s)?s.length:0};setTimeout(()=>{c.scheduleSyncWithServer(t)},0)}catch(e){}i.$("#history-content").html(y(s,"general",t))}else i.$("#history-content").html("<p>Seri verisi mevcut değil.</p>")}).catch(function(e){i.$("#history-content").html("<p>Seri verisi alınamadı. Lütfen daha sonra tekrar deneyin.</p>");const t=d();if(t&&"function"==typeof t.scheduleSyncWithServer)try{const a={type:"team_streaks_error",key:o,error:e&&e.message||"Unknown error",timestamp:Date.now()};setTimeout(()=>{t.scheduleSyncWithServer(a)},0)}catch(e){}})}function y(e,n,o){const s=i.$('.live-scores-match[data-match-id="'+o+'"]'),r=t.getMatchData(s);let c='<div class="streaks-content">';return Array.isArray(e)&&e.length>0?e.forEach(e=>{let t="";"general"===n?t=a.translateName("teams","home"===e.team?r.homeTeamName:r.awayTeamName):"head2head"===n&&(t=a.translateName("teams","both"===e.team?`${r.homeTeamName} & ${r.awayTeamName}`:"home"===e.team?r.homeTeamName:r.awayTeamName));const i=a.translateStreak(e.name);c+=`\n                    <div class="streak-card custom-h2h-match-card match-card">\n                        <div class="team">\n                            <span class="team-name">${t}</span>\n                            <span class="team-streak">${i}</span>\n                            <span class="streak-value">${e.value}</span>\n                        </div>\n                    </div>`}):c+="<p>Seri verisi mevcut değil.</p>",c+="</div>",c}function w(){c&&(clearInterval(c),c=null,window.LiveScoreApp.debugMode)}return{fetchTeamStreaksData:v,fetchH2HStreaksData:function(t,a){const o=`h2hStreaks_${t}`,s=e.getFromCacheByType(o,e.CACHE_PREFIX.H2H);if(s&&window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.Translator&&"function"==typeof window.LiveScoreApp.Utils.Translator.truncateText)try{return void i.$("#history-content").html(y(s,"head2head",t))}catch(e){}const r=p();r?r.showStreaksSkeleton():n&&"function"==typeof n.getH2HSkeleton?i.$("#history-content").html(n.getH2HSkeleton()):i.$("#history-content").html('<div class="loading-spinner"></div>'),m("get_streaks_data",{match_id:t}).then(function(a){if(a&&a.head2head){const n=u();let s=a.head2head;n&&"function"==typeof n.optimizeResponse&&(s=n.optimizeResponse(a.head2head,"match"));const r=window.LiveScoreApp.Constants.getCacheTTL("H2H","live");e.setToCacheByType(o,s,r,e.CACHE_PREFIX.H2H);const c=d();if(c&&"function"==typeof c.scheduleSyncWithServer)try{const t={type:"h2h_streaks_data",key:o,size:JSON.stringify(s).length/1024,timestamp:Date.now(),cacheType:e.CACHE_PREFIX.H2H,dataCount:Array.isArray(s)?s.length:0};setTimeout(()=>{c.scheduleSyncWithServer(t)},0)}catch(e){}i.$("#history-content").html(y(s,"head2head",t))}else i.$("#history-content").html("<p>Seri verisi mevcut değil.</p>")}).catch(function(e){i.$("#history-content").html("<p>Seri verisi alınamadı. Lütfen daha sonra tekrar deneyin.</p>");const t=d();if(t&&"function"==typeof t.scheduleSyncWithServer)try{const a={type:"h2h_streaks_error",key:o,error:e&&e.message||"Network or server error",timestamp:Date.now()};setTimeout(()=>{t.scheduleSyncWithServer(a)},0)}catch(e){}})},generateStreaksHTML:y,setupAutoUpdate:function(t,a){a?w():(w(),l=t,c=setInterval(()=>{if("hidden"===document.visibilityState)return;const a=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MatchDetails;if(!a||"streaks"!==a.getCurrentTab())return;if(0===i.$("#streaks-"+t).length)return void w();const n=`teamStreaks_${t}`,o=e.CACHE_PREFIX.H2H+n;try{e.deleteCacheItem&&e.deleteCacheItem(o),v(t)}catch(e){}},29e3),window.LiveScoreApp.debugMode)},stopAutoUpdate:w,getMemcachedSync:d,getCompression:u,getSkeletonLoader:p}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.Standings=function(){const e=window.LiveScoreApp.Utils.Cache,t=window.LiveScoreApp.Utils.Translator,a=(window.LiveScoreApp.Config,window.LiveScoreApp.Utils.jQuery),i=(window.LiveScoreApp.Utils.RequestQueue,window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton);function n(e,t){return"undefined"!=typeof QueuedAjax&&QueuedAjax?QueuedAjax.request(e,t).then(o):a.ajax({url:"/wp-admin/admin-ajax.php",type:"POST",data:Object.assign({action:e,nonce:window.liveScoresNonce||""},t)}).then(o)}function o(e){return e&&void 0!==e.success&&e.data?e.data:e}let s=null;function r(t,i,n,o=204,s=!1,r=!1){window.LiveScoreApp.hasStandingsData=!1,a.$(".standings-tab").hide(),a.$("#tab-standings").empty();const c=`standings_check_${t}_${i}_${n||0}`,l={exists:!1,timestamp:Date.now(),status:o||204};s&&(l.error=!0);const d=r?"finished":"live",u=window.LiveScoreApp.Constants.getCacheTTL("STANDINGS",d),p=s?u/3:u;window.LiveScoreApp.Utils.Compression?window.LiveScoreApp.Utils.Compression.setOptimizedCache(c,l,p,e.CACHE_PREFIX.STANDING):e.setToCacheByType(c,l,p,e.CACHE_PREFIX.STANDING)}function c(e){if(!e||!e.text)return"";const t=e.text.trim();if(!t)return"";const a=t.toLowerCase();return a.includes("champions league")&&!a.includes("qualification")?"promotion-champions":a.includes("champions league")&&a.includes("qualification")?"promotion-champions-qual":a.includes("europa league")||a.includes("uefa europa")?"promotion-europa":a.includes("conference")?"promotion-conference":a.includes("relegation")?"promotion-relegation":a.includes("next group")||a.includes("main round")?"promotion-next-round":"playoffs"===a?"promotion-playoffs":a.includes("qualification playoff")?"promotion-qualification-playoffs":a.includes("qualif")||"qualified"===a?"promotion-qualified":""}function l(t,n,o,s,r){const c=a.$('.live-scores-match[data-match-id="'+t+'"]'),l=c.data("tournament-id"),p=c.data("season-id"),m=c.data("group-id");if(!l||!p)return;const h=`standings_${l}_${p}_${n}${m?"_"+m:""}`,v=e.getFromCacheByType(h,e.CACHE_PREFIX.STANDING);if(v&&window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.Translator&&"function"==typeof window.LiveScoreApp.Utils.Translator.truncateText)try{return void u(v,n,s,r)}catch(e){}i&&"function"==typeof i.getStandingsSkeleton?a.$("#tab-standings").html(i.getStandingsSkeleton()):window.LiveScoreApp.loadSkeletonUI?(a.$("#tab-standings").html('<div class="loading-spinner"></div>'),window.LiveScoreApp.loadSkeletonUI(function(e){e&&"function"==typeof e.getStandingsSkeleton&&a.$("#tab-standings").html(e.getStandingsSkeleton())})):a.$("#tab-standings").html('<div class="loading-spinner"></div>'),d(l,p,m,n,h,o,s,r).catch(()=>{a.$("#tab-standings").html("<p>Puan durumu mevcut değil.</p>")})}function d(t,i,o,s,c,l,d,p){if(!t||!i)return a.$(".standings-tab").hide(),window.LiveScoreApp.hasStandingsData=!1,Promise.resolve();const m=null!==e.getFromCacheByType(c,e.CACHE_PREFIX.STANDING);return n("get_standings_data",{tournament_id:t,season_id:i,type:s,match_status:l?"finished":"inprogress"}).then(function(n){const m=window.LiveScoreApp.LiveScores?window.LiveScoreApp.LiveScores.getSelectedMatchId():null,h=m?a.$('.live-scores-match[data-match-id="'+m+'"]'):null;if(h&&h.length){const e=h.data("tournament-id"),a=h.data("season-id");if(e&&a&&(String(e)!==String(t)||String(a)!==String(i)))return}if(!n||204!==n.status&&!1!==n.hasData&&null!==n.standings)if(n&&n.standings&&Array.isArray(n.standings)&&n.standings.length>0){let m;if(m=o?n.standings.find(e=>e.tournament.id==o):n.standings[0],m&&m.rows&&m.rows.length>0){const t=window.LiveScoreApp.Constants.getCacheTTL("STANDINGS",l?"finished":"live"),i=l?1/0:t;e.setToCacheByType(c,m,i,e.CACHE_PREFIX.STANDING),window.LiveScoreApp.hasStandingsData=!0,a.$(".standings-tab").show(),u(m,s,d,p)}else r(t,i,o,204,!1,l)}else r(t,i,o,204,!1,l);else r(t,i,o,n.status||204,!1,l)}).catch(function(e){m||r(t,i,o,0,!0,l)})}function u(e,i,n,o){try{if(!e||!e.rows||0===e.rows.length)return a.$("#tab-standings").html("<p>Puan durumu bilgisi mevcut değil.</p>"),void a.$(".standings-tab").hide();const s=a.$('.live-scores-match[data-match-id="'+window.LiveScoreApp.LiveScores.getSelectedMatchId()+'"]');s.data("tournament-id"),s.data("season-id"),s.data("group-id");let r=`\n            <div class="standings-period-selection">\n                <button data-type="total" class="${"total"===i?"active":""}">Genel</button>\n                <button data-type="home" class="${"home"===i?"active":""}">İç Saha</button>\n                <button data-type="away" class="${"away"===i?"active":""}">Deplasman</button>\n            </div>\n            <div class="standings-table-container">\n            <table class="standings-table">\n                <thead>\n                    <tr>\n                        <th class="position-cell">#</th>\n                        <th class="team-cell">Takım</th>\n                        <th class="matches-cell tooltip" data-tooltip="Oynanan Maç Sayısı" title="Oynanan Maç Sayısı">O</th>\n                        <th class="wins-cell tooltip" data-tooltip="Galibiyet" title="Galibiyet">G</th>\n                        <th class="draws-cell tooltip" data-tooltip="Beraberlik" title="Beraberlik">B</th>\n                        <th class="losses-cell tooltip" data-tooltip="Mağlubiyet" title="Mağlubiyet">M</th>\n                        <th class="goals-cell tooltip" data-tooltip="Atılan Gol / Yenen Gol" title="Atılan Gol / Yenen Gol">A/Y</th>\n                        <th class="points-cell tooltip" data-tooltip="Puan" title="Puan">P</th>\n                    </tr>\n                </thead>\n                <tbody>\n        `;e.rows.forEach(function(e){const a=e.team.id,i=`https://cdn.sporkolik.net/teams/${a}.png`,s=e.team.shortName||e.team.name,l=t.truncateText(s,25),d=t.translateName("teams",l);r+=`\n                <tr class="${a===n||a===o?"highlighted-row":""}">\n                    <td class="position-cell ${c(e.promotion)}" data-label="#">${e.position}</td>\n                    <td class="team-cell" data-label="Takım">\n                        <img src="${i}" alt="${d} logo" class="team-logo" width="20" height="20" onerror="this.onerror=null;this.src='https://cdn.sporkolik.net/teams/default.png';">\n                        ${d}\n                    </td>\n                    <td class="matches-cell" data-label="O">${e.matches}</td>\n                    <td class="wins-cell" data-label="G">${e.wins}</td>\n                    <td class="draws-cell" data-label="B">${e.draws}</td>\n                    <td class="losses-cell" data-label="M">${e.losses}</td>\n                    <td class="goals-cell" data-label="A/Y">${e.scoresFor}:${e.scoresAgainst}</td>\n                    <td class="points-cell" data-label="P">${e.points}</td>\n                </tr>\n            `}),r+="\n                </tbody>\n            </table>\n            </div>\n        ";let d="";const u=e.rows.some(e=>e.promotion&&e.promotion.text),p=[];u&&e.rows.forEach(e=>{if(e.promotion&&e.promotion.text){const t=c(e.promotion);t&&!p.includes(t)&&p.push(t)}}),u&&p.length>0&&(d=function(e){let t='\n                <div class="standings-legend">\n                    <div class="legend-title">Puan Durumu Açıklamaları:</div>\n                    <div class="legend-items">\n            ';const a={"promotion-champions":"Şampiyonlar Ligi","promotion-champions-qual":"Şampiyonlar Ligi Elemesi","promotion-europa":"UEFA Avrupa Ligi Elemesi","promotion-conference":"Konferans Ligi Elemesi","promotion-relegation":"Küme Düşme Hattı","promotion-next-round":"Bir Sonraki Tur","promotion-playoffs":"Play-Off","promotion-qualification-playoffs":"Play-Off Elemesi","promotion-qualified":"Kalifiye"};return e.forEach(e=>{a[e]&&(t+=`\n                        <div class="legend-item">\n                            <span class="legend-color ${e}"></span>\n                            <span class="legend-text">${a[e]}</span>\n                        </div>\n                    `)}),t+="\n                    </div>\n                </div>\n            ",t}(p)),r+=d,a.$("#tab-standings").html(r),a.$(".standings-period-selection button").off("click").on("click",function(){const e=a.$(this).data("type"),t=window.LiveScoreApp.LiveScores.getSelectedMatchId(),i=a.$('.live-scores-match[data-match-id="'+t+'"]');l(t,e,!!i.length&&"finished"===i.data("status"),n,o)}),a.$(".custom-tooltip").remove(),a.$(".tooltip").off("mouseenter mouseleave").on({mouseenter:function(){a.$(".custom-tooltip").remove();const e=a.$(this).data("tooltip");if(e){const t=a.$('<div class="custom-tooltip"></div>');t.text(e),a.$("body").append(t),a.$(document).on("mousemove.tooltip",function(e){t.css({top:e.pageY-t.outerHeight()-15,left:e.pageX-t.outerWidth()/2})});const i=a.$(this).offset(),n=a.$(this).outerWidth();t.css({top:i.top-t.outerHeight()-10,left:i.left+n/2-t.outerWidth()/2})}},mouseleave:function(){a.$(".custom-tooltip").remove(),a.$(document).off("mousemove.tooltip")}})}catch(e){a.$("#tab-standings").html("<p>Puan durumu gösterilirken hata oluştu.</p>"),a.$(".standings-tab").hide()}}function p(){s&&(clearInterval(s),s=null)}return{updateStandingsTab:function(t){const i=a.$('.live-scores-match[data-match-id="'+t+'"]'),o=i.data("tournament-id"),r=i.data("season-id"),c=i.data("group-id"),d="total",u="finished"===i.data("status"),m=i.data("home-team-id"),h=i.data("away-team-id");l(t,d,u,m,h),function(t,a,i,o){["home","away"].forEach(function(s){const r=`standings_${t}_${a}_${s}${i?"_"+i:""}`;e.getFromCacheByType(r,e.CACHE_PREFIX.STANDING)||n("get_standings_data",{tournament_id:t,season_id:a,type:s}).then(function(t){if(t&&t.standings&&Array.isArray(t.standings)&&t.standings.length>0){let a;if(a=i?t.standings.find(function(e){return e.tournament.id==i}):t.standings[0],a&&a.rows&&a.rows.length>0){const t=window.LiveScoreApp.Constants.getCacheTTL("STANDINGS",o?"finished":"live"),i=o?1/0:t;e.setToCacheByType(r,a,i,e.CACHE_PREFIX.STANDING)}}}).catch(function(){})})}(o,r,c,u),p(),u||(s=setInterval(function(){if("hidden"!==document.visibilityState&&"standings"===a.$(".live-scores-tab-btn.active").data("tab")){var i="standings_"+o+"_"+r+"_"+d+(c?"_"+c:""),n=e.CACHE_PREFIX.STANDING+i;e.deleteCacheItem(n),l(t,d,u,m,h)}},3e4))},fetchStandings:l,checkAndFetchStandings:function(t){const i=a.$('.live-scores-match[data-match-id="'+t+'"]'),o=i.data("tournament-id"),s=i.data("season-id"),c=i.data("group-id")||0,l=!!i.length&&"finished"===i.data("status");if(!o||!s)return window.LiveScoreApp.hasStandingsData=!1,void a.$(".standings-tab").hide();const d=`standings_check_${o}_${s}_${c}`,u=e.getFromCacheByType(d,e.CACHE_PREFIX.STANDING);if(u)return window.LiveScoreApp.hasStandingsData=!0===u.exists,void a.$(".standings-tab").toggle(!0===u.exists);if(a.$(".standings-tab").hide(),a.$(".standings-tab").data("checking"))return;a.$(".standings-tab").data("checking",!0);const p=i.length&&i.data("status")||"";n("get_standings_data",{tournament_id:o,season_id:s,type:"total",match_status:p}).then(function(t){if(a.$(".standings-tab").removeData("checking"),t&&(204===t.status||!1===t.hasData||null===t.standings))return void r(o,s,c,t.status||204,!1,l);const i=t&&t.standings&&Array.isArray(t.standings)&&t.standings.length>0&&t.standings[0]&&t.standings[0].rows&&t.standings[0].rows.length>0;window.LiveScoreApp.hasStandingsData=i,a.$(".standings-tab").toggle(i);const n=window.LiveScoreApp.Constants.getCacheTTL("STANDINGS",l?"finished":"live"),u={exists:i,timestamp:Date.now()};window.LiveScoreApp.Utils.Compression?window.LiveScoreApp.Utils.Compression.setOptimizedCache(d,u,n,e.CACHE_PREFIX.STANDING):e.setToCacheByType(d,u,n,e.CACHE_PREFIX.STANDING)}).catch(function(){a.$(".standings-tab").removeData("checking"),r(o,s,c,400,!0,l)})},getTeamPosition:function(t,i,n,o=0){if(!t||!i||!n)return null;const s=`standings_check_${i}_${n}_${o}`,r=e.getFromCacheByType(s,e.CACHE_PREFIX.STANDING);if(!r||!0!==r.exists){const s=a.$('.live-scores-match[data-tournament-id="'+i+'"][data-season-id="'+n+'"]');if(s.length>0){s.data("match-id"),d(i,n,o,"total",`standings_${i}_${n}_total${o?"_"+o:""}`,!0,null,null);const a=e.getFromCacheByType(`standings_${i}_${n}_total${o?"_"+o:""}`,e.CACHE_PREFIX.STANDING);if(a&&a.rows&&a.rows.length>0)for(let e=0;e<a.rows.length;e++)if(a.rows[e].team.id==t)return a.rows[e].position}return null}const c=`standings_${i}_${n}_total${o?"_"+o:""}`,l=e.getFromCacheByType(c,e.CACHE_PREFIX.STANDING);if(!l||!l.rows||!l.rows.length)return null;for(let e=0;e<l.rows.length;e++)if(l.rows[e].team.id==t)return l.rows[e].position;return null},setNoStandingsData:r,stopPolling:p}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Components=window.LiveScoreApp.Components||{},window.LiveScoreApp.Components.History=function(){const e=window.LiveScoreApp.Utils.Cache,t=window.LiveScoreApp.Utils.Translator,a=(window.LiveScoreApp.Config,window.LiveScoreApp.Utils.RequestQueue,window.LiveScoreApp.Modules.ScoreUpdater,window.LiveScoreApp.Utils.jQuery),i=window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton;let n=null,o=null,s=null;function r(){return!n&&window.LiveScoreApp.Utils.MemcachedSync&&(n=window.LiveScoreApp.Utils.MemcachedSync),n}function c(){return!o&&window.LiveScoreApp.Utils.Compression&&(o=window.LiveScoreApp.Utils.Compression),o}function l(){return!s&&window.LiveScoreApp.Utils.SkeletonLoader&&(s=window.LiveScoreApp.Utils.SkeletonLoader),s}function d(e){return e&&"object"==typeof e&&e.hasOwnProperty("success")&&void 0!==e.data?e.data:e}function u(e){return(t="get_team_performance",i={team_id:e},window.QueuedAjax&&"function"==typeof window.QueuedAjax.request?window.QueuedAjax.request(t,i).then(d):new Promise(function(e,a){jQuery.ajax({url:LiveScoresAjax.ajax_url,method:"POST",data:Object.assign({action:t,nonce:LiveScoresAjax.nonce},i),success:function(t){e(d(t))},error:function(e,t,i){a(new Error(i||t||"AJAX error"))}})})).then(function(e){return e&&e.events?e:a.getJQuery().Deferred().reject("Invalid API response")});var t,i}function p(e,t,i,n){const o=e.events.sort((e,t)=>t.startTimestamp-e.startTimestamp).slice(0,10),s=t.events.sort((e,t)=>t.startTimestamp-e.startTimestamp).slice(0,10);let r=`\n            <div class="performance-filter-buttons">\n                <button class="performance-filter-button active" data-filter="all">Tümü</button>\n                <button class="performance-filter-button" data-filter="home">İç Saha</button>\n                <button class="performance-filter-button" data-filter="away">Deplasman</button>\n            </div>\n            <div class="performance-container">\n                <div class="performance-team home-performance">\n                    ${f(o,i)}\n                </div>\n                <div class="performance-team away-performance">\n                    ${f(s,n)}\n                </div>\n            </div>\n        `;a.$("#history-content").html(r),m(o,s,i,n)}function m(e,t,i,n){a.$(".performance-filter-button").off("click").on("click",function(){const o=a.$(this).data("filter");a.$(".performance-filter-button").removeClass("active"),a.$(this).addClass("active");const s=h(e,o,i),r=h(t,o,n);a.$(".home-performance").html(f(s,i)),a.$(".away-performance").html(f(r,n)),v(s,r,i,n)}),v(e,t,i,n)}function h(e,t,a){return"all"===t?e:e.filter(e=>"home"===t?e.homeTeam.id===a:"away"===t&&e.awayTeam.id===a)}function v(e,t,i,n){const o=y(e,i),s=y(t,n);let r=w(o,0,"home");a.$(".home-performance .team-performance-stats").remove(),a.$(".home-performance").prepend(r);let c=w(s,0,"away");a.$(".away-performance .team-performance-stats").remove(),a.$(".away-performance").prepend(c)}function y(e,t){let a=0,i=0,n=0;return e.forEach(e=>{if(e.status&&"finished"===e.status.type&&void 0!==e.homeScore?.current&&null!==e.homeScore?.current&&void 0!==e.awayScore?.current&&null!==e.awayScore?.current&&"-"!==e.homeScore.current&&"-"!==e.awayScore.current){const o=parseInt(e.homeScore.current),s=parseInt(e.awayScore.current);isNaN(o)||isNaN(s)||(e.homeTeam.id===t?o>s?a++:o<s?n++:i++:e.awayTeam.id===t&&(s>o?a++:s<o?n++:i++))}}),{wins:a,draws:i,losses:n,total:a+i+n}}function w(e,t,a){const i=e.total,n=i>0?e.wins/i*100:0,o=i>0?e.draws/i*100:0,s=i>0?e.losses/i*100:0;return`\n            <div class="team-performance-stats">\n                <div class="team-performance-title">${"home"===a?"Ev Sahibi":"Deplasman"} - Son ${i} Maç: ${e.wins} Galibiyet - ${e.draws} Beraberlik - ${e.losses} Mağlubiyet</div>\n                <div class="match-history-stats-bar">\n                    <div class="match-history-segment wins" style="width: ${n}%;" title="Galibiyet: ${e.wins}">${n>=10?e.wins:""}</div>\n                    <div class="match-history-segment draws" style="width: ${o}%;" title="Beraberlik: ${e.draws}">${o>=10?e.draws:""}</div>\n                    <div class="match-history-segment losses" style="width: ${s}%;" title="Mağlubiyet: ${e.losses}">${s>=10?e.losses:""}</div>\n                </div>\n            </div>\n        `}function f(e,a){let i="";return e&&0!==e.length?(e.forEach(e=>{const n=new Date(1e3*e.startTimestamp).toLocaleDateString(),o=t.translateName("teams",t.truncateText(e.homeTeam.shortName||e.homeTeam.name,25)),s=t.translateName("teams",t.truncateText(e.awayTeam.shortName||e.awayTeam.name,25)),r=`https://cdn.sporkolik.net/teams/${e.homeTeam.id}.png`,c=`https://cdn.sporkolik.net/teams/${e.awayTeam.id}.png`;let l,d;"finished"===e.status.type?(l=void 0!==e.homeScore?.current&&null!==e.homeScore?.current?e.homeScore.current:"Yok",d=void 0!==e.awayScore?.current&&null!==e.awayScore?.current?e.awayScore.current:"Yok"):"postponed"===e.status.type?(l="ERT.",d="ERT."):"canceled"===e.status.type?(l="İPT.",d="İPT."):(l="-",d="-");const u=window.translations.tournaments[e.tournament.name]||t.truncateText(e.tournament.name,30);let p="loss";if(e.status&&"finished"===e.status.type&&void 0!==e.homeScore?.current&&null!==e.homeScore?.current&&void 0!==e.awayScore?.current&&null!==e.awayScore?.current&&"-"!==e.homeScore.current&&"ERT."!==e.awayScore.current&&"İPT."!==e.awayScore.current){const t=parseInt(e.homeScore.current),i=parseInt(e.awayScore.current);isNaN(t)||isNaN(i)||(e.homeTeam.id===a?p=t>i?"win":t<i?"loss":"draw":e.awayTeam.id===a&&(p=i>t?"win":i<t?"loss":"draw"))}i+=`\n                <div class="performance-card ${p}" data-match-type="${e.homeTeam.id===a?"home":"away"}">\n                    <div class="match-date">\n                        <span>${n}</span> \n                        <span class="tournament-name">${u}</span>\n                    </div>\n                    <div class="match-teams">\n                        <div class="team team-score-row">\n                            <img src="${r}" class="team-logo" alt="${o} logo" width="20" height="20" onerror="this.onerror=null;this.src='https://cdn.sporkolik.net/teams/default.png';">\n                            <span class="team-name">${o}</span>\n                            <span class="match-score">${l}</span>\n                        </div>\n                        <div class="team team-score-row">\n                            <img src="${c}" class="team-logo" alt="${s} logo" width="20" height="20" onerror="this.onerror=null;this.src='https://cdn.sporkolik.net/teams/default.png';">\n                            <span class="team-name">${s}</span>\n                            <span class="match-score">${d}</span>\n                        </div>\n                    </div>\n                </div>\n            `}),i||"<p>Performans verisi bulunamadı.</p>"):"<p>Performans verisi bulunamadı.</p>"}return{fetchPerformanceData:function(t){const n=`performance_${t}`,o=e.getFromCacheByType(n,e.CACHE_PREFIX.GENERAL);if(o)return void p(o.homeData,o.awayData,o.homeTeamId,o.awayTeamId);const s=l();s?s.showPerformanceSkeleton():i&&"function"==typeof i.getPerformanceSkeleton?a.$("#history-content").html(i.getPerformanceSkeleton()):a.$("#history-content").html('<div class="loading-spinner"></div>');const d=a.$('.live-scores-match[data-match-id="'+t+'"]'),m=d.data("home-team-id"),h=d.data("away-team-id");m&&h?a.when(u(m),u(h)).done(function(t,a){const i=c();let o=t,s=a;i&&"function"==typeof i.optimizeResponse&&(o=i.optimizeResponse(t,"match"),s=i.optimizeResponse(a,"match"));const l={homeData:o,awayData:s,homeTeamId:m,awayTeamId:h},d=window.LiveScoreApp.Constants.getCacheTTL("STATISTICS","live");e.setToCacheByType(n,l,d,e.CACHE_PREFIX.GENERAL);const u=r();if(u&&"function"==typeof u.scheduleSyncWithServer)try{const t={type:"performance_data",key:n,size:JSON.stringify(l).length/1024,timestamp:Date.now(),cacheType:e.CACHE_PREFIX.GENERAL,dataCount:(o.events?o.events.length:0)+(s.events?s.events.length:0)};setTimeout(()=>{u.scheduleSyncWithServer(t)},0)}catch(e){}p(o,s,m,h)}).fail(function(e){a.$("#history-content").html("<p>Performans verisi alınamadı. Lütfen daha sonra tekrar deneyin.</p>");const t=r();if(t&&"function"==typeof t.scheduleSyncWithServer)try{const a={type:"performance_error",key:n,error:e.statusText||"Unknown error",timestamp:Date.now()};setTimeout(()=>{t.scheduleSyncWithServer(a)},0)}catch(e){}}):a.$("#history-content").html("<p>Takım bilgileri alınamadı.</p>")},renderPerformanceData:p,setupPerformanceFilterButtons:m,updatePerformanceStats:v,filterEventsByType:h,getMemcachedSync:r,getCompression:c,getSkeletonLoader:l}}(),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.loadSkeletonUI=function(e){let t="";const a=document.querySelectorAll("script[src]");for(const e of a){const a=e.getAttribute("src");if(a&&a.includes("/js/")){t=a.substring(0,a.lastIndexOf("/js/")+4);break}}!t&&window.LiveScoreApp&&window.LiveScoreApp.Config&&window.LiveScoreApp.Config.baseUrl?t=window.LiveScoreApp.Config.baseUrl+"/js/":t||(t="/wp-content/plugins/v7/js/");const i=t+"components/";let n=!1;if(document.getElementById("skeleton-styles"))n=!0;else{const e=document.createElement("link");e.rel="stylesheet",e.href=i+"skeleton/skeleton-styles.css",e.id="skeleton-styles",document.head.appendChild(e)}if(window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton)"function"==typeof e&&e(window.LiveScoreApp.Components.Skeleton);else if(document.getElementById("skeleton-ui-script")){const t=setInterval(function(){window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton&&(clearInterval(t),"function"==typeof e&&e(window.LiveScoreApp.Components.Skeleton))},50);setTimeout(function(){clearInterval(t),"function"==typeof e&&e(null)},2e3)}else{const t=document.createElement("script");t.src=i+"skeleton/skeleton-ui.js",t.id="skeleton-ui-script",t.onload=function(){setTimeout(function(){"function"==typeof e&&e(window.LiveScoreApp.Components.Skeleton)},n?0:100)},setTimeout(function(){if(!document.getElementById("skeleton-inline-styles-script")){const e=document.createElement("script");e.src=i+"skeleton/skeleton-inline-styles.js",e.id="skeleton-inline-styles-script",document.head.appendChild(e)}},200)}};const pluginBasePath="/wp-content/plugins/v7/js/";function ensureUtilityModulesLoaded(){[{name:"event-utils.js",path:pluginBasePath+"utils/event-utils.js"},{name:"memcached-sync.js",path:pluginBasePath+"utils/memcached-sync.js"},{name:"cache.js",path:pluginBasePath+"utils/cache.js"},{name:"request-queue.js",path:pluginBasePath+"utils/request-queue.js"}].forEach(e=>{let t=!1;"event-utils.js"===e.name?t=window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.EventUtils:"memcached-sync.js"===e.name?t=window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.MemcachedSync:"cache.js"===e.name?t=window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.Cache:"request-queue.js"===e.name&&(t=window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.RequestQueue),t||loadUtilityScript(e.name,e.path)}),setTimeout(function(){[{name:"EventUtils",obj:window.LiveScoreApp?.Utils?.EventUtils},{name:"MemcachedSync",obj:window.LiveScoreApp?.Utils?.MemcachedSync},{name:"Cache",obj:window.LiveScoreApp?.Utils?.Cache},{name:"RequestQueue",obj:window.LiveScoreApp?.Utils?.RequestQueue}].forEach(e=>{e.obj||createUtilityModuleFallback(`${e.name.toLowerCase()}.js`)})},800)}const hasRequestIdGenerator=loadUtilityScript("request-id-generator.js",pluginBasePath+"utils/request-id-generator.js"),hasMemcachedSyncJs=loadUtilityScript("memcached-sync.js",pluginBasePath+"utils/memcached-sync.js"),hasEventUtils=loadUtilityScript("event-utils.js",pluginBasePath+"utils/event-utils.js");function updateMatchScores(e,t){const a=window.pageYOffset;try{const i=e.querySelector(".live-scores-team.home .live-scores-score"),n=t.querySelector(".live-scores-team.home .live-scores-score");if(i&&n&&i.textContent!==n.textContent){const e=parseInt(i.textContent)||0,t=parseInt(n.textContent)||0;i.textContent=n.textContent,t>e&&triggerGoalAnimation(i,"goal")}const o=e.querySelector(".live-scores-team.away .live-scores-score"),s=t.querySelector(".live-scores-team.away .live-scores-score");if(o&&s&&o.textContent!==s.textContent){const e=parseInt(o.textContent)||0,t=parseInt(s.textContent)||0;o.textContent=s.textContent,t>e&&triggerGoalAnimation(o,"goal")}const r=e.querySelector(".live-scores-minute"),c=t.querySelector(".live-scores-minute");if(r&&c){const e=(r.innerHTML||"").trim(),t=(c.innerHTML||"").trim();e!==t&&(r.innerHTML=t)}ScoreUpdater&&"function"==typeof ScoreUpdater.updateMatchStatus&&setTimeout(()=>{try{ScoreUpdater.updateMatchStatus(jQueryUtils.$(e))}catch(e){}},0),Math.abs(window.pageYOffset-a)>5&&window.scrollTo(0,a)}catch(e){}}setTimeout(ensureUtilityModulesLoaded,50),jQuery(document).ready(function(e){if(window.LiveScoreApp&&window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.jQuery&&window.LiveScoreApp.Utils.jQuery.setWpjQuery(e),ensureUtilityModulesLoaded(),!function(){if(!(window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.Cache&&window.LiveScoreApp.Utils.RequestQueue&&window.LiveScoreApp.Utils.Translator&&window.LiveScoreApp.Utils.DomUtils))return window.LiveScoreApp.Utils.Cache||loadUtilityScript("cache.js",pluginBasePath+"utils/cache.js"),window.LiveScoreApp.Utils.RequestQueue||loadUtilityScript("request-queue.js",pluginBasePath+"utils/request-queue.js"),window.LiveScoreApp.Utils.Translator||loadUtilityScript("translator.js",pluginBasePath+"utils/translator.js"),window.LiveScoreApp.Utils.DomUtils||loadUtilityScript("dom-utils.js",pluginBasePath+"utils/dom-utils.js"),!1;if(!window.LiveScoreApp.Modules||!window.LiveScoreApp.Modules.UI||!window.LiveScoreApp.Modules.ScoreUpdater)return!1;if(window.LiveScoreApp.Components||(window.LiveScoreApp.Components={}),!window.LiveScoreApp.Components.Skeleton){const e=pluginBasePath+"components/",t=document.createElement("link");t.rel="stylesheet",t.href=e+"skeleton/skeleton-styles.css",t.id="skeleton-styles",document.head.appendChild(t);const a=document.createElement("script");a.src=e+"skeleton/skeleton-ui.js",a.id="skeleton-ui-script",document.head.appendChild(a),setTimeout(function(){const t=document.createElement("script");t.src=e+"skeleton/skeleton-inline-styles.js",t.id="skeleton-inline-styles-script",document.head.appendChild(t)},200)}if(window.LiveScoreApp.Components){const e=window.LiveScoreApp.Components;if(!e.Lineups){const t=pluginBasePath+"components/",a=document.createElement("script");a.src=t+"lineups.js",document.head.appendChild(a),e.Lineups={fetchLineups:function(e,t,a){const i='\n                            <div class="lineup-warning">\n                                <h4>Kadro verisi geçici olarak kullanılamıyor</h4>\n                                <p>Lineups.js dosyası yüklenemedi. Lütfen tema/eklenti ayarlarını kontrol edin.</p>\n                            </div>\n                        ';return"function"==typeof a&&a(!0,i),i}}}if(!e.Statistics){const t=pluginBasePath+"components/",a=document.createElement("script");a.src=t+"statistics.js",document.head.appendChild(a),e.Statistics={fetchStatistics:function(e,t,a){const i='\n                            <div class="statistics-warning">\n                                <h4>İstatistik verisi geçici olarak kullanılamıyor</h4>\n                                <p>Statistics.js dosyası yüklenemedi. Lütfen tema/eklenti ayarlarını kontrol edin.</p>\n                            </div>\n                        ';return"function"==typeof a&&a(!0,i),i}}}}return!!window.LiveScoreApp.Config&&(window.LiveScoreApp.LiveScores||(window.LiveScoreApp.LiveScores={init:function(){}}),!0)}())return ensureUtilityModulesLoaded(),void setTimeout(function(){try{window.LiveScoreApp&&window.LiveScoreApp.LiveScores&&window.LiveScoreApp.LiveScores.init&&window.LiveScoreApp.LiveScores.init()}catch(e){}},300);try{window.LiveScoreApp.LiveScores.init()}catch(e){}}),window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.ModuleLoader={setupMatchDetailsEventListeners:function(e,t){if(!t||"function"!=typeof t.closeMatchDetails)return;const a=window.LiveScoreApp?.Utils?.EventUtils;if(a&&"function"==typeof a.setupMatchDetailsEventListeners)return a.setupMatchDetailsEventListeners(e,t);try{const a=window.LiveScoreApp?.Utils?.JQueryUtils;a&&(a.$(".live-scores-menu-item").off("click.matchDetails").on("click.matchDetails",function(){const t=a.$(this).data("tab");a.$(".live-scores-menu-item").removeClass("active").attr("aria-selected","false"),a.$(this).addClass("active").attr("aria-selected","true");const i=window.LiveScoreApp?.Modules?.MatchDetailsTabs;i&&"function"==typeof i.updateTabContent&&i.updateTabContent(e,t)}),a.$(".live-scores-back-button").off("click.matchDetails").on("click.matchDetails",function(a){a.preventDefault(),a.stopPropagation(),"function"==typeof t.closeMatchDetails&&t.closeMatchDetails(e)}))}catch(e){}},cleanupMatchDetailsEventListeners:function(){const e=window.LiveScoreApp?.Utils?.EventUtils;if(e&&"function"==typeof e.cleanupMatchDetailsEventListeners)return e.cleanupMatchDetailsEventListeners()}},window.console&&(window.console.log("%c===DIRECT CONSOLE TEST===","color: red; font-size: 14px; font-weight: bold;"),window.console.log("Main.js loaded!")),window.LiveScoreApp||(window.LiveScoreApp={}),window.LiveScoreApp.hasHistoricalDataLoaded=!1,window._matchUpdateQueue=new Map,window._updateDebounceTimers=new Map,window.LiveScoreApp.debouncedUpdate=function(e,t,a=100){window._updateDebounceTimers.has(e)&&clearTimeout(window._updateDebounceTimers.get(e));const i=setTimeout(()=>{t(),window._updateDebounceTimers.delete(e)},a);window._updateDebounceTimers.set(e,i)},window.LiveScoreApp.clearAllPendingUpdates=function(){for(const[e,t]of window._updateDebounceTimers)clearTimeout(t);window._updateDebounceTimers.clear(),window._matchUpdateQueue&&window._matchUpdateQueue.clear()},jQuery(document).ready(function(e){const t=window.LiveScoreApp.Components&&window.LiveScoreApp.Components.Skeleton;window.LiveScoreApp=window.LiveScoreApp||{},window.LiveScoreApp.Utils=window.LiveScoreApp.Utils||{},window.LiveScoreApp.Utils.jQuery?window.LiveScoreApp.Utils.jQuery.setWpjQuery(e):window.LiveScoreApp.Utils.jQuery={$:e,getElement:e,ajax:e.ajax,ready:function(t){e(document).ready(t)},getJQuery:function(){return e},setWpjQuery:function(e){this.$=e}};const a=window.LiveScoreApp.Config,i=window.LiveScoreApp.Utils.Cache,n=window.LiveScoreApp.Utils.RequestQueue,o=window.LiveScoreApp.Modules.UI,s=window.LiveScoreApp.Modules.ScoreUpdater,r=window.LiveScoreApp.Modules.MetaTags,c=window.LiveScoreApp.Modules.MatchDetails,l=window.LiveScoreApp.Modules.SEO,d=window.LiveScoreApp.Utils.jQuery,u=window.LiveScoreApp.Utils.TimerManager;window.LiveScoreApp.LiveMatches=new Map,window.LiveScoreApp.LiveScores=function(){let e=null,p=!1,m=null,h=!0,v=!1,y=null,w={},f=!1,g=0;function S(){return new Promise((e,t)=>{const a=Date.now();let i=0;for(let[e,t]of window.LiveScoreApp.LiveMatches.entries())(!t.timestamp||a-t.timestamp>3e5)&&(window.LiveScoreApp.LiveMatches.delete(e),i++);if(window.LiveScoreApp.LiveMatches.size>1350){const e=Array.from(window.LiveScoreApp.LiveMatches.entries()).sort((e,t)=>(e[1].timestamp||0)-(t[1].timestamp||0)),t=window.LiveScoreApp.LiveMatches.size-1215;e.slice(0,t).forEach(([e])=>{window.LiveScoreApp.LiveMatches.delete(e),i++})}else if(window.LiveScoreApp.LiveMatches.size>1500){const e=Array.from(window.LiveScoreApp.LiveMatches.entries()).sort((e,t)=>(e[1].timestamp||0)-(t[1].timestamp||0)),t=window.LiveScoreApp.LiveMatches.size-1200;e.slice(0,t).forEach(([e])=>{window.LiveScoreApp.LiveMatches.delete(e),i++})}else window.LiveScoreApp.LiveMatches.size>1100&&(Array.from(window.LiveScoreApp.LiveMatches.entries()).sort((e,t)=>(e[1].timestamp||0)-(t[1].timestamp||0)).slice(0,30).forEach(([e])=>{window.LiveScoreApp.LiveMatches.delete(e),i++}),window.LiveScoreApp.debugMode);if(i>0){const e=window.LiveScoreApp.LiveMatches.size;if(window.LiveScoreApp.debugMode,e>1450){const e=12e4;let t=0;for(let[i,n]of window.LiveScoreApp.LiveMatches.entries())(!n.timestamp||a-n.timestamp>e)&&(window.LiveScoreApp.LiveMatches.delete(i),t++)}}d.ajax({url:LiveScoresAjax.ajax_url,type:"POST",data:{action:"get_live_scores",type:"live",translations:window.translations||{}},dataType:"json",timeout:15e3,complete:function(e,t){e.responseText}}).then(function(t){if(!t||!t.success)return void e();const a=[];if(t.data&&t.data.events&&Array.isArray(t.data.events)){let e=0,i=0;for(const n of t.data.events)if(n&&n.id){const t=n.id.toString(),o=window.LiveScoreApp.LiveMatches.has(t);if(!o&&window.LiveScoreApp.LiveMatches.size>=1500){i++;continue}a.push(t),n.timestamp=Date.now(),window.LiveScoreApp.LiveMatches.set(t,n),o||e++}e>0||i>0||window.LiveScoreApp.debugMode;const n=t.data.live_count||0;window.LiveScoreApp.lastLiveCount=n,d.$("#live-matches").text("● CANLI ("+n+")"),window.LiveScoreApp.Config&&window.LiveScoreApp.Config.updateDynamicSettings&&window.LiveScoreApp.Config.updateDynamicSettings()}a.length>0&&a.forEach(e=>{const t=d.$(`.live-scores-match[data-match-id="${e}"]`);t.length&&(t.data("status","inprogress"),t.attr("data-status","inprogress"),window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.ScoreUpdater&&window.LiveScoreApp.Modules.ScoreUpdater.updateMatchStatus(t))}),window.LiveScoreApp.LiveMatches.size,e()}).catch(function(t){e()})})}function A(){const e=window.location.pathname;let t,a,i,n=null;if("/canli-skor"===e||"/canli-skor/"===e)return d.$("#live-matches").addClass("active"),d.$("#all-matches").removeClass("active"),d.$(".date-picker-container").removeClass("visible"),p=!1,m="live",r&&"function"==typeof r.updateMetaTags&&r.updateMetaTags("live",new Date),L(null,null,null,"live"),void(f=!0);const o=e.match(/\/canli-skor\/([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})\/?$/i);if(o&&4===o.length)n={day:o[1],month:o[2],year:o[3],format:"path"};else{const e=new URLSearchParams(window.location.search),t=e.get("day"),a=e.get("month"),i=e.get("year");t&&a&&i&&(n={day:t,month:a,year:i,format:"query"})}if(n){t=n.day,a=n.month,i=n.year;const e=parseInt(t),o=parseInt(a),s=parseInt(i);if(!isNaN(e)&&!isNaN(o)&&!isNaN(s)){d.$("#all-matches").addClass("active"),d.$("#live-matches").removeClass("active"),d.$(".switch-menu").removeClass("indicator-right"),d.$(".date-picker-container").addClass("visible"),p=!0;const c=`${e}/${o}/${s}`,l=document.getElementById("date-picker");l&&l._flatpickr?l._flatpickr.setDate(new Date(s,o-1,e),!0):d.$("#date-picker").val(c),m="all";const u=new Date(s,o-1,e);if(isNaN(u.getTime())){const e=new Date;r&&"function"==typeof r.updateMetaTags?r.updateMetaTags("all",e):document.title="Tüm Maçlar - Canlı Skor ve İstatistik Verileri"}else if(r&&"function"==typeof r.updateMetaTags)try{r.updateMetaTags("all",u)}catch(t){document.title=`Tüm Maçlar - ${e}/${o}/${s} Tarihli Maçlar`}else document.title=`Tüm Maçlar - ${e}/${o}/${s} Tarihli Maçlar`;if(L(t,a,i,"all"),f=!0,"query"===n.format){const n=window.location.pathname,r=`${n.endsWith("/")?n.slice(0,-1):n}/canli-skor/${e}/${o}/${s}/`;window.history.replaceState({day:t,month:a,year:i,type:"all"},"",r)}}}}function L(e,a,o,s="live",r=!0){const l=s+"_"+(e||"")+"_"+(a||"")+"_"+(o||"");if(w[l])return w[l];if(e=(e||"").toString().trim(),a=(a||"").toString().trim(),o=(o||"").toString().trim(),!e||!a||!o){const t=new Date;e=t.getDate().toString(),a=(t.getMonth()+1).toString(),o=t.getFullYear().toString()}e=e.padStart(2,"0"),a=a.padStart(2,"0"),i.CACHE_PREFIX.LIVESCORE;const u=`liveScore_${e}_${a}_${o}_${s}`,p=i.getFromCacheByType(u,i.CACHE_PREFIX.LIVESCORE);if(p){if(("all"===s||v)&&d.$("#live-scores").empty(),(0===document.querySelectorAll(".live-scores-match").length||"all"===s||v)&&(b(p,s),v&&(v=!1)),"live"===s){const e=window.LiveScoreApp.LiveScores?window.LiveScoreApp.LiveScores.getSelectedMatchId():null;e&&c.updateMatchDetailScores(e)}return Promise.resolve(p)}if("all"!==s||h||d.$("#live-scores").empty(),(h||v)&&r){if(t&&"function"==typeof t.getTournamentSkeleton){const e=t.getTournamentSkeleton(3);d.$("#live-scores").html(e)}else window.LiveScoreApp.loadSkeletonUI?(d.$("#live-scores").html('<div class="loading-spinner"></div>'),window.LiveScoreApp.loadSkeletonUI(function(e){if(e){const t=e.getTournamentSkeleton(3);d.$("#live-scores").html(t)}})):d.$("#live-scores").html('<div class="loading-spinner"></div>');h=!1,v=!1}const m=("live"===s?n.enqueueHighPriority:n.enqueue)(function(){return window.LiveScoresAjax&&window.LiveScoresAjax.ajax_url?d.ajax({url:LiveScoresAjax.ajax_url,type:"POST",data:{action:"get_live_scores",day:e,month:a,year:o,type:s,translations:window.translations||{}},dataType:"json",timeout:15e3,complete:function(e,t){e.responseText}}).then(function(t){if(!t||!t.success)throw new Error("Canlı skorlar alınırken hata oluştu.");sessionStorage.setItem("liveRetryCount","0"),d.$("#live-scores").find(".loading-spinner").remove();let n,r=i.CACHE_PREFIX.LIVESCORE;if("live"===s)n=window.LiveScoreApp.Constants.getCacheTTL("LIVE_SCORES","live"),r=i.CACHE_PREFIX.LIVESCORE;else if("all"===s){const t=new Date,s=t.getFullYear()+"-"+String(t.getMonth()+1).padStart(2,"0")+"-"+String(t.getDate()).padStart(2,"0");n=o+"-"+a+"-"+e===s?window.LiveScoreApp.Constants.CACHE_TTL.HISTORICAL_MATCHES.notstarted||6e5:window.LiveScoreApp.Constants.CACHE_TTL.HISTORICAL_MATCHES.finished||36e5,r=i.CACHE_PREFIX.LIVESCORE}else n=6e4,r=i.CACHE_PREFIX.LIVESCORE;if(i.setToCacheByType(u,t.data,n,r),b(t.data,s),"live"===s){if(t.data.events&&Array.isArray(t.data.events))for(const e of t.data.events)if(e&&e.id){const t=e.id.toString();if(!window.LiveScoreApp.LiveMatches.has(t)&&window.LiveScoreApp.LiveMatches.size>=500)continue;e.timestamp=Date.now(),window.LiveScoreApp.LiveMatches.set(t,e)}const e=window.LiveScoreApp.LiveScores?window.LiveScoreApp.LiveScores.getSelectedMatchId():null;e&&c.updateMatchDetailScores(e)}return t.data}).catch(function(t){522===t.status||t.responseText&&-1!==t.responseText.indexOf("<!DOCTYPE")||t.statusText||t.responseText&&t.responseText.substring(0,100),t.responseText;const i=parseInt(sessionStorage.getItem("liveRetryCount")||"0");if(i<3){const t=Math.min(1e3*Math.pow(2,i),8e3);return sessionStorage.setItem("liveRetryCount",(i+1).toString()),d.$("#live-scores").find(".loading-spinner").remove(),d.$("#live-scores").html("<p>Veriler alınırken bir hata oluştu. Yeniden deneniyor...</p>"),setTimeout(()=>{L(e,a,o,s,r)},t),null}return sessionStorage.setItem("liveRetryCount","0"),d.$("#live-scores").find(".loading-spinner").remove(),d.$("#live-scores").html("<p>Veriler yüklenirken bir hata oluştu. Lütfen daha sonra tekrar deneyin.</p>"),0===t.readyState&&d.$("#live-scores").html("<p>Sunucuya bağlanamıyoruz. İnternet bağlantınızı kontrol edin veya daha sonra tekrar deneyin.</p>"),setTimeout(()=>{L(e,a,o,s,r)},1e4),null}):(d.$("#live-scores").html("<p>Ajax URL yapılandırma hatası. Lütfen yönetici ile iletişime geçin.</p>"),Promise.reject(new Error("Ajax URL hatası")))});return w[l]=m,m&&"function"==typeof m.finally?m.finally(function(){delete w[l]}):delete w[l],m}function b(e,t){if(d.$("#live-scores").find(".loading-spinner, .skeleton-match, .skeleton-tournament, .skeleton-pulse").remove(),e&&"object"==typeof e&&!Array.isArray(e)){if(e.events&&Array.isArray(e.events)||(e.events=[]),"live"===t){const t=e.live_count||e.events.length||0;window.LiveScoreApp.lastLiveCount=t,d.$("#live-matches").text("● CANLI ("+t+")"),window.LiveScoreApp.Config&&window.LiveScoreApp.Config.updateDynamicSettings&&window.LiveScoreApp.Config.updateDynamicSettings()}if(0===document.querySelectorAll(".live-scores-match").length)if(e.output&&e.output.trim().length>0)d.$("#live-scores").html(e.output),_();else if(e.events&&0===e.events.length){const e="live"===t?'<div class="live-scores-no-live-events">Şu an oynanan canlı futbol maçı yok</div>':'<div class="live-scores-no-events">Bu tarih için maç bulunamadı</div>';d.$("#live-scores").html(e)}else d.$("#live-scores").html('<div class="live-scores-no-live-events">Veri yüklenirken bir hata oluştu. Lütfen daha sonra tekrar deneyin.</div>');else!function(e,t){if(!e.output)return;const a=document.createElement("div");a.innerHTML=e.output;const i=a.querySelectorAll(".live-scores-match"),n=a.querySelectorAll(".live-scores-tournament-card"),r=new Map,c=new Map;if(document.querySelectorAll(".live-scores-match").forEach(e=>{const t=e.getAttribute("data-match-id");t&&r.set(t,e)}),document.querySelectorAll(".live-scores-tournament-card").forEach(e=>{const t=e.getAttribute("data-group-id");t&&c.set(t,e)}),0===r.size&&i.length>0)return d.$("#live-scores").html(e.output),void _();const l=new Set,u=new Map;i.forEach(e=>{const t=e.getAttribute("data-match-id");if(t&&!l.has(t)){l.add(t);const a=e.getAttribute("data-status");a&&u.set(t,a),r.has(t)?window.LiveScoreApp.debouncedUpdate(t,()=>{(async function(e,t){window._matchUpdateQueue||(window._matchUpdateQueue=new Map);const a=e.getAttribute("data-match-id");if(window._matchUpdateQueue.has(a)){const e=window._matchUpdateQueue.get(a);try{await e}catch(e){}}const i=async function(e,t){return new Promise((a,i)=>{let n;try{n={scores:C(e,t),minute:x(e,t),redCards:k(e,t),status:T(e,t),attributes:M(e,t)}}catch(e){return void i(new Error("Data extraction failed: "+e.message))}const o=window.pageYOffset;requestAnimationFrame(()=>{try{let i=!1;if(!document.contains(e))return void a();n.scores.hasChanges&&((t=n.scores).home.element&&t.home.newValue&&(t.home.element.textContent=t.home.newValue,t.home.hasGoal&&$(t.home.element,"goal")),t.away.element&&t.away.newValue&&(t.away.element.textContent=t.away.newValue,t.away.hasGoal&&$(t.away.element,"goal")),i=!0),n.minute.hasChanges&&(function(e,t){if(t.minute&&t.minute.element){t.minute.element.innerHTML=t.minute.newValue;const a=e.getAttribute("data-match-id");a&&s&&s._clearFormattedMinuteCache&&s._clearFormattedMinuteCache(a)}t.time&&t.time.element&&(t.time.element.textContent=t.time.newValue)}(e,n.minute),i=!0),n.redCards.hasChanges&&(function(e,t){t.home.oldValue!==t.home.newValue&&(e.setAttribute("data-home-red-cards",t.home.newValue),E(e,"home",t.home.newValue)),t.away.oldValue!==t.away.newValue&&(e.setAttribute("data-away-red-cards",t.away.newValue),E(e,"away",t.away.newValue))}(e,n.redCards),i=!0),n.status.hasChanges&&(function(e,t){null!==t.status&&e.setAttribute("data-status",t.status),t.description&&e.setAttribute("data-status-description",t.description)}(e,n.status),i=!0),n.attributes.hasChanges&&(function(e,t){t.changes.forEach(t=>{e.setAttribute(t.attribute,t.value)})}(e,n.attributes),i=!0),i&&(Math.abs(window.pageYOffset-o)>5&&window.scrollTo(0,o),setTimeout(()=>{if(s&&"function"==typeof s.updateMatchStatus)try{s.updateMatchStatus(d.$(e))}catch(e){}},0));try{if(!d.$(e).data("events")||!d.$(e).data("events").click){const e=window.LiveScoreApp.Modules.UI||window.LiveScoreApp.Modules.ui;e&&"function"==typeof e.attachMatchClickEvents?e.attachMatchClickEvents():d.$("#live-scores").off("click",".live-scores-match").on("click",".live-scores-match",function(e){e.preventDefault();const t=d.$(this).attr("data-match-id");t&&window.LiveScoreApp.Modules.MatchDetails&&"function"==typeof window.LiveScoreApp.Modules.MatchDetails.openMatchDetails&&window.LiveScoreApp.Modules.MatchDetails.openMatchDetails(t)})}}catch(e){}a()}catch(e){i(new Error("Atomic update failed: "+e.message))}var t})})}(e,t);window._matchUpdateQueue.set(a,i);try{await i}catch(a){try{await async function(e,t){return new Promise(a=>{const i=window.pageYOffset;try{const n=e.querySelector(".live-scores-team.home .live-scores-score"),o=t.querySelector(".live-scores-team.home .live-scores-score");n&&o&&n.textContent!==o.textContent&&(n.textContent=o.textContent);const s=e.querySelector(".live-scores-team.away .live-scores-score"),r=t.querySelector(".live-scores-team.away .live-scores-score");s&&r&&s.textContent!==r.textContent&&(s.textContent=r.textContent);const c=e.querySelector(".live-scores-minute"),l=t.querySelector(".live-scores-minute");if(c&&l){const e=l.innerHTML;c.innerHTML!==e&&(c.innerHTML=e)}Math.abs(window.pageYOffset-i)>5&&window.scrollTo(0,i),a()}catch(e){a()}})}(e,t)}catch(e){}}finally{window._matchUpdateQueue.delete(a)}})(r.get(t),e).then(()=>{}).catch(a=>{try{updateMatchScores(r.get(t),e)}catch(e){}})},50):function(e,t,a){const i=e.cloneNode(!0),n=e.getAttribute("data-group-id")||"";let s=n?a.get(n):null;if(!s&&n&&t){let e=null;t.forEach(function(t){t.getAttribute("data-group-id")===n&&(e=t)}),e&&(s=function(e){const t=e.cloneNode(!0),a=document.querySelector("#live-scores .live-scores");return a?(a.appendChild(t),o&&"function"==typeof o.addTournamentFlag&&o.addTournamentFlag(d.$(t)),t):null}(e),s&&a.set(n,s))}if(!s){const t=e.getAttribute("data-tournament-id")||"";t&&a.forEach(function(e,a){s||e.getAttribute("data-tournament-id")!==t||(s=e)})}if(!s)return;let r=s,c=s.nextElementSibling;for(;c&&c.classList.contains("live-scores-match");)r=c,c=c.nextElementSibling;r.insertAdjacentElement("afterend",i),function(e){d.$(e).on("click",function(e){e.preventDefault();const t=d.$(this).data("match-id");t&&window.LiveScoreApp.Modules.MatchDetails&&window.LiveScoreApp.Modules.MatchDetails.updateMatchDetails(t)})}(i),i.style.opacity="0",i.style.transform="translateY(-10px)",setTimeout(function(){i.style.transition="all 0.3s ease",i.style.opacity="1",i.style.transform="translateY(0)"},100)}(e,n,c)}}),"live"===t&&function(e,t,a){const i=["finished","canceled","postponed"];t.forEach(e=>{I.has(e)&&I.delete(e)}),e.forEach((e,a)=>{if(!t.has(a)){if(window.LiveScoreApp.DetailClosingFlags&&window.LiveScoreApp.DetailClosingFlags.isClosing(a))return;const t=e.getAttribute("data-status");if(i.includes(t))I.delete(a),e.style.transition="all 0.3s ease",e.style.opacity="0",e.style.transform="translateY(-10px)",setTimeout(()=>{D(e),e.remove()},300);else{const t=(I.get(a)||0)+1;if(I.set(a,t),t>=2){I.delete(a),e.setAttribute("data-status","finished"),e.setAttribute("data-status-description","Ended");const t=e.querySelector(".live-scores-minute");t&&(t.innerHTML='<span class="match-status match-status-finished">Bitti</span>'),s&&"function"==typeof s.updateMatchStatus&&s.updateMatchStatus(d.$(e)),setTimeout(()=>{e.style.transition="all 0.3s ease",e.style.opacity="0",e.style.transform="translateY(-10px)",setTimeout(()=>{D(e),e.remove()},300)},2e3)}}}}),a&&a.size>0&&e.forEach((e,n)=>{if(t.has(n)){const t=a.get(n);t&&i.includes(t)&&(I.delete(n),setTimeout(()=>{e.style.transition="all 0.3s ease",e.style.opacity="0",e.style.transform="translateY(-10px)",setTimeout(()=>{D(e),e.remove()},300)},2e3))}})}(r,l,u)}(e,t)}else d.$("#live-scores").html('<div class="live-scores-no-live-events">Veri işlenirken bir hata oluştu. Lütfen daha sonra tekrar deneyin.</div>')}function C(e,t){const a=e.querySelector(".live-scores-team.home .live-scores-score"),i=e.querySelector(".live-scores-team.away .live-scores-score"),n=t.querySelector(".live-scores-team.home .live-scores-score"),o=t.querySelector(".live-scores-team.away .live-scores-score"),s=a?a.textContent:"",r=i?i.textContent:"",c=n?n.textContent:"",l=o?o.textContent:"";return{hasChanges:s!==c||r!==l,home:{element:a,oldValue:s,newValue:c,hasGoal:parseInt(c)>parseInt(s)},away:{element:i,oldValue:r,newValue:l,hasGoal:parseInt(l)>parseInt(r)}}}function x(e,t){const a=e.querySelector(".live-scores-minute"),i=t.querySelector(".live-scores-minute"),n=e.querySelector(".live-scores-time"),o=t.querySelector(".live-scores-time"),s=(a?a.innerHTML:"").trim(),r=(i?i.innerHTML:"").trim(),c=(n?n.textContent:"").trim(),l=(o?o.textContent:"").trim();return{hasChanges:s!==r||c!==l,minute:{element:a,newValue:r},time:{element:n,newValue:l}}}function k(e,t){const a=e.getAttribute("data-home-red-cards")||"0",i=e.getAttribute("data-away-red-cards")||"0",n=t.getAttribute("data-home-red-cards")||"0",o=t.getAttribute("data-away-red-cards")||"0";return{hasChanges:a!==n||i!==o,home:{oldValue:a,newValue:n},away:{oldValue:i,newValue:o}}}function T(e,t){const a=e.getAttribute("data-status"),i=e.getAttribute("data-status-description")||"",n=t.getAttribute("data-status"),o=t.getAttribute("data-status-description")||"";return{hasChanges:a!==n||i!==o,status:n,description:o}}function M(e,t){const a=[];return["data-has-statistics","data-aggregated-winner-code","data-home-formation","data-away-formation"].forEach(i=>{const n=e.getAttribute(i),o=t.getAttribute(i);n!==o&&null!==o&&a.push({attribute:i,value:o})}),{hasChanges:a.length>0,changes:a}}function E(e,t,a){const i=e.querySelector(`.live-scores-team.${t} .live-scores-name`);if(i){i.querySelectorAll(".match-list-red-card-icon").forEach(e=>e.remove());const e=parseInt(a);for(let t=0;t<e;t++){const e=document.createElement("i");e.className="fas fa-square match-list-red-card-icon",e.setAttribute("aria-label","Kırmızı Kart"),i.appendChild(document.createTextNode(" ")),i.appendChild(e)}}}function D(e){let t=e.previousElementSibling;for(;t&&!t.classList.contains("live-scores-tournament-card");)t=t.previousElementSibling;if(!t)return;if("0"===t.style.opacity)return;let a=!1,i=t.nextElementSibling;for(;i&&!i.classList.contains("live-scores-tournament-card");){if(i.classList.contains("live-scores-match")&&"0"!==i.style.opacity){a=!0;break}i=i.nextElementSibling}a||(t.style.transition="all 0.3s ease",t.style.opacity="0",setTimeout(()=>t.remove(),300))}m="live";const I=new Map;function $(e,t){if(s&&"function"==typeof s.flashScoreCard){const a=e.closest(".live-scores-match")?.getAttribute("data-match-id"),i=e.closest(".live-scores-team").classList.contains("home")?"home":"away";s.flashScoreCard(d.$(e),t,a,i)}}function _(){setTimeout(function(){d.$(".live-scores-match, .match-card").each(function(){const t=d.$(this),a=t.data("match-id");a&&(s.updateMatchStatus(t),e===a&&c.updateMatchDetailScores(a))}),d.$(".live-scores-tournament-card").each(function(){o.addTournamentFlag(d.$(this))}),o.attachMatchClickEvents(),l.appendSeoText()},0)}function P(){if(!window.LiveScoreApp.LiveMatches||0===window.LiveScoreApp.LiveMatches.size)return{removedCount:0,totalSize:0};const e=Date.now(),t=a.optimizationSettings.liveMatchesConfig;let i=0;const n=window.LiveScoreApp.LiveMatches.size;for(const[a,n]of window.LiveScoreApp.LiveMatches.entries()){if(!n.timestamp){window.LiveScoreApp.LiveMatches.delete(a),i++;continue}const o=e-n.timestamp;let s=!1;switch(n.status||"unknown"){case"finished":s=o>t.finishedMatchRetention;break;case"notstarted":s=o>t.notStartedMatchRetention;break;case"canceled":s=o>t.canceledMatchRetention;break;case"postponed":s=o>t.postponedMatchRetention;break;case"inprogress":s=!1;break;default:s=o>6e5}s&&(window.LiveScoreApp.LiveMatches.delete(a),i++)}const o=window.LiveScoreApp.LiveMatches.size;if(o>t.maxLiveMatches){const e=[];for(const[t,a]of window.LiveScoreApp.LiveMatches.entries())"finished"===a.status&&a.timestamp&&e.push({matchId:t,timestamp:a.timestamp});e.sort((e,t)=>e.timestamp-t.timestamp);const a=o-t.maxLiveMatches,n=Math.min(a,e.length);for(let t=0;t<n;t++)window.LiveScoreApp.LiveMatches.delete(e[t].matchId),i++}return{removedCount:i,totalSize:window.LiveScoreApp.LiveMatches.size,initialSize:n}}return{init:function(){function t(e,t,a){const i=parseInt(e,10),n=parseInt(t,10),o=parseInt(a,10);if(isNaN(i)||isNaN(n)||isNaN(o))return!1;if(n<1||n>12)return!1;if(i<1||i>31)return!1;if(o<2e3||o>2099)return!1;const s=n-1;let r,c;try{if(r=new Date(o,s,i),r.setHours(0,0,0,0),c=new Date,c.setHours(0,0,0,0),isNaN(r.getTime())||isNaN(c.getTime()))return!1}catch(e){return!1}const l=(r.getTime()-c.getTime())/864e5;return Math.abs(l)>=.5}if(o.setupEventListeners(),A(),document.addEventListener("DOMContentLoaded",function(){let e=new Date;if("all"===m){const t=document.getElementById("date-picker");t&&t._flatpickr&&t._flatpickr.selectedDates.length&&(e=t._flatpickr.selectedDates[0])}r.updateMetaTags(m,e),window.LiveScoreApp.fixPageTitle=function(e){if("undefined"===document.title||document.title.includes("undefined")||""===document.title||"Maçlar Yükleniyor... - Canlı Skor"===document.title){const t=window.LiveScoreApp.Modules&&window.LiveScoreApp.Modules.MetaTags,a=window.LiveScoreApp.Utils&&window.LiveScoreApp.Utils.jQuery;if(!t||"function"!=typeof t.updateMetaTags||!a)return document.title=e?"Tüm Maçlar - Canlı Skor ve İstatistik Verileri":"Canlı Skor - Güncel Maç Bilgileri",!0;{const i=e?"all":"live";let n=new Date;if("all"===i&&a.$("#date-picker").length){const e=a.$("#date-picker").val();if(e&&/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(e)){const t=e.split("/");n=new Date(t[2],t[1]-1,t[0]),isNaN(n.getTime())&&(n=new Date)}}try{return t.updateMetaTags(i,n),!0}catch(t){return document.title=e?"Tüm Maçlar - Canlı Skor ve İstatistik Verileri":"Canlı Skor - Güncel Maç Bilgileri",!0}}}return!1};const t=function(){window.LiveScoreApp.fixPageTitle(p)};t(),u?u.setInterval(t,300,"page-title-check"):setInterval(t,300)}),f||L(null,null,null,"live"),window.LiveScoreApp.Components.PullToRefresh&&"function"==typeof window.LiveScoreApp.Components.PullToRefresh.init&&window.LiveScoreApp.Components.PullToRefresh.init(),y=function(){const a=(d.$("#date-picker").val()||"").split("/");if(e){if(g++,g<5)return;g=0}else g=0;p?t(a[0],a[1],a[2])?(h=!0,L(a[0],a[1],a[2],"all",!1),window.LiveScoreApp.hasHistoricalDataLoaded=!0):S().then(()=>{window.LiveScoreApp.statusUpdateCounter||(window.LiveScoreApp.statusUpdateCounter=0),window.LiveScoreApp.statusUpdateCounter++,window.LiveScoreApp.statusUpdateCounter>=5&&(L(a[0],a[1],a[2],"all",!1),window.LiveScoreApp.statusUpdateCounter=0)}):(L(null,null,null,"live",!1),window.LiveScoreApp.hasHistoricalDataLoaded=!1)},u){const e=window.LiveScoreApp.Constants.getCacheTTL("LIVE_SCORES","live");u.setInterval(y,e,"main-score-update")}else{const e=window.LiveScoreApp.Constants.getCacheTTL("LIVE_SCORES","live");setInterval(function(){const e=(d.$("#date-picker").val()||"").split("/");if(p){const a=t(e[0],e[1],e[2]);if(a&&window.LiveScoreApp.hasHistoricalDataLoaded){new Date(parseInt(e[2]),parseInt(e[1])-1,parseInt(e[0]));return void(new Date).setHours(0,0,0,0)}a?(L(e[0],e[1],e[2],"all",!1),window.LiveScoreApp.hasHistoricalDataLoaded=!0):S().then(()=>{window.LiveScoreApp.statusUpdateCounter||(window.LiveScoreApp.statusUpdateCounter=0),window.LiveScoreApp.statusUpdateCounter++,window.LiveScoreApp.statusUpdateCounter>=5&&(L(e[0],e[1],e[2],"all",!1),window.LiveScoreApp.statusUpdateCounter=0)})}else L(null,null,null,"live",!1),window.LiveScoreApp.hasHistoricalDataLoaded=!1},e)}},fetchLiveScores:L,updateLiveMatchesOnly:S,clearTimers:function(){if(window._matchUpdateQueue){for(const[e,t]of window._matchUpdateQueue)window._matchUpdateQueue.delete(e);window._matchUpdateQueue.clear()}window.LiveScoreApp&&window.LiveScoreApp.clearAllPendingUpdates&&window.LiveScoreApp.clearAllPendingUpdates(),u&&(u.clearInterval("page-title-check"),u.clearInterval("main-score-update"),u.clearInterval("livematches-cleanup"))},cleanupCache:i.cleanupCache,performBatchCleanup:i.performBatchCleanup,cleanupCacheByDataType:i.cleanupCacheByDataType,getCacheStats:i.getCacheStats,checkURLParameters:A,startMainTimer:function(){if(u&&y){const e=window.LiveScoreApp.Constants.getCacheTTL("LIVE_SCORES","live");u.clearInterval("main-score-update"),u.setInterval(y,e,"main-score-update")}},cleanupLiveMatches:P,initLiveMatchesCleanup:function(){const e=a.optimizationSettings.liveMatchesConfig;u?u.setInterval(function(){P().removedCount>0&&window.LiveScoreApp.debugMode},e.cleanupInterval,"livematches-cleanup"):setInterval(function(){P().removedCount>0&&window.LiveScoreApp.debugMode},e.cleanupInterval),setTimeout(P,5e3)},getSelectedMatchId:function(){return e},setSelectedMatchId:function(t){e=t},getCurrentTab:function(){return m},setCurrentTab:function(e){m=e},getIsAllMatchesSelected:function(){return p},setIsAllMatchesSelected:function(e){p=e},getIsSwitchingTab:function(){return v},setIsSwitchingTab:function(e){v=e}}}(),window.LiveScoreApp.LiveScores.init(),setTimeout(function(){window.LiveScoreApp.LiveScores.initLiveMatchesCleanup&&window.LiveScoreApp.LiveScores.initLiveMatchesCleanup()},1e3),window.LiveScoreApp.emergencyMemoryCleanup=function(){const e=window.LiveScoreApp.LiveMatches.size,t=Date.now()-12e4;let a=0;for(let[e,i]of window.LiveScoreApp.LiveMatches.entries())(!i.timestamp||i.timestamp<t)&&(window.LiveScoreApp.LiveMatches.delete(e),a++);return window.LiveScoreApp.LiveMatches.size>150&&Array.from(window.LiveScoreApp.LiveMatches.entries()).sort((e,t)=>(e[1].timestamp||0)-(t[1].timestamp||0)).slice(0,100).forEach(([e])=>{window.LiveScoreApp.LiveMatches.delete(e),a++}),{beforeSize:e,afterSize:window.LiveScoreApp.LiveMatches.size,removedCount:a,memoryFreed:!0}},window.LiveScoreApp.getLiveMatchesStats=function(){const e=Date.now();let t=0,a=0,i=e,n=0;for(let[o,s]of window.LiveScoreApp.LiveMatches.entries()){const o=s.timestamp||0;o&&e-o<3e5?t++:a++,o<i&&(i=o),o>n&&(n=o)}return{totalSize:window.LiveScoreApp.LiveMatches.size,validEntries:t,expiredEntries:a,oldestEntryAge:i?Math.floor((e-i)/1e3):0,newestEntryAge:n?Math.floor((e-n)/1e3):0,memoryHealthy:window.LiveScoreApp.LiveMatches.size<280,recommendedAction:window.LiveScoreApp.LiveMatches.size>250?"cleanup_needed":"healthy"}},e(document).ajaxError(function(e,t,a,i){if(window.LiveScoreApp&&window.LiveScoreApp.fixPageTitle){const e=window.LiveScoreApp.LiveScores,t=!(!e||!e.getIsAllMatchesSelected)&&e.getIsAllMatchesSelected();window.LiveScoreApp.fixPageTitle(t),setTimeout(function(){("undefined"===document.title||document.title.includes("undefined")||""===document.title)&&(document.title="Canlı Skor")},100)}})});