function GCB_loadScript(url,success){var script=document.createElement('script');script.src=url;var head=document.getElementsByTagName('head')[0],done=false;head.appendChild(script);script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){done=true;success();script.onload=script.onreadystatechange=null;head.removeChild(script);}};}
function GCB_disableRightClick(){document.addEventListener('contextmenu',function(event){event.preventDefault();});}
function GCB_main(){console.log('%c------ Blocky: Fraud Country Blocker by Effective Apps is Initializing ------','color: cyan');console.log('%c------ Contact us at support@effectify.co for help and questions about the app ------','color: cyan');if(window.GCB_SCRIPT_INJECTED===undefined){window.isLs=GCB_isLSAvailable();window.GCB_SCRIPT_INJECTED=true;if('6'==='7'&&null===GCB_getLsWithExpiry('gcb_payg_i')){jQuery.get('https://app.blocky-app.com/ri/3bb7a40eb89111f0982f02e2faff8be5.js');GCB_setLsWithExpiry('gcb_payg_i','true',604800000);}
window.GCB_BLOCKED_COUNTRIES='';window.GCB_BLOCKED_IPS='136.158.31.2,136.158.31.192,136.158.30.15,180.190.212.26,180.190.229.97,23.27.183.23,23.27.183.13,180.195.68.89,112.201.132.200,103.235.95.173,23.27.183.11,23.27.183.*,112.198.97.67,180.190.47.148,112.198.67.71,180.195.146.5,38.68.135.178,38.96.255.200,175.176.93.161,175.176.92.21,158.62.5.253,112.209.193.9,203.177.237.145,131.226.101.71,163.172.217.84,185.244.210.66,195.123.210.25,161.49.215.182,131.226.101.120,64.226.63.253,112.206.105.19,49.145.249.229,143.110.216.24,138.199.16.133,118.99.2.11';window.GCB_WHITELISTED_IPS='136.158.31.246';window.EFFECTIVE_APPS_GCB_BLOCKED_MESSAGE=`
Restricted Access
Sorry, you cannot visit our store from your current location.
`;window.EFFECTIVE_APPS_GCB_IB_BLOCKED=false;window.EFFECTIVE_APPS_GCB_CB_BLOCKED=false;if('False'==='True'){GCB_disableRightClick();}
if(location.href.indexOf('gcb_preview=true')>-1){blockPage(false);return;}
if(location.href.indexOf('gcb_override=true')>-1&&'True'==='True'){GCB_setLsWithExpiry('gcb_override','true',300000);}
if((typeof Shopify!=='undefined'&&Shopify.hasOwnProperty('designMode')&&Shopify.designMode)||document.getElementById('admin-bar-iframe')!==null||document.getElementById('PBarNextFrame')!==null||document.getElementById('PBarNextFrameWrapper')!==null){return;}
if('True'==='True'&&GCB_getLsWithExpiry('gcb_override')==='true'){return;}
if('False'==='True'){GCB_superBlocker();}
if('False'==='True'||'False'==='True'){try{GCB_getGeolocationCountry(runCBCRLogic);}
catch(err){}}
else{GCB_getGeolocationCountry(function(geolocationCountry,ipAddress){GCB_lIp(ipAddress,geolocationCountry,false);})}
if('True'==='True'){try{GCB_getIPAddress(runIBLogic);}
catch(err){}}
else{GCB_getIPAddress(function(ipAddress,geolocationCountry){GCB_lIp(ipAddress,geolocationCountry,false);})}}}
function GCB_rCr(callback){jQuery.get('https://app.blocky-app.com/rcr/3bb7a40eb89111f0982f02e2faff8be5');callback();}
function GCB_rCb(){jQuery.get('https://app.blocky-app.com/rcb/3bb7a40eb89111f0982f02e2faff8be5');}
function GCB_rIb(){jQuery.get('https://app.blocky-app.com/rib/3bb7a40eb89111f0982f02e2faff8be5');}
function blockPage(saveLS=true){window.GCB_BLOCKED_PAGE_INTERVAL=setInterval(function(){document.querySelector("html").innerHTML=window.EFFECTIVE_APPS_GCB_BLOCKED_MESSAGE;},1000);if(saveLS){GCB_setLsWithExpiry('effective_apps_gcb_blocked','true',604800000);}}
function runCBCRLogic(geolocationCountry,ipAddress){if('False'==='True'){let redirectionRules=JSON.parse('[]');for(var i=0;i-1){if(location.href.indexOf(rule['url'])===-1){GCB_rCr(function(){location.href=rule['url'];});}
break;}}}
if('False'==='True'){let blockedCountries=window.GCB_BLOCKED_COUNTRIES.split(',');let whitelistedIpAddresses=window.GCB_WHITELISTED_IPS.split(',');if(whitelistedIpAddresses.indexOf(ipAddress)>-1){GCB_lIp(ipAddress,geolocationCountry,false);return;}
else if(window.GCB_WHITELISTED_IPS.indexOf("*")>-1){for(let whitelistedIpPattern of whitelistedIpAddresses){var wlIpPattern=whitelistedIpPattern.replaceAll('*','(\\d{1,3})').replaceAll('.','\\.');var wlIpRegex=new RegExp(wlIpPattern,'gm');if(ipAddress.match(wlIpRegex)!==null){GCB_lIp(ipAddress,geolocationCountry,false);return;}}}
if(blockedCountries.indexOf(geolocationCountry)>-1&&window.EFFECTIVE_APPS_GCB_IB_BLOCKED===false){window.EFFECTIVE_APPS_GCB_CB_BLOCKED=true;GCB_rCb();blockPage();GCB_lIp(ipAddress,geolocationCountry,true);return;}
else{GCB_lIp(ipAddress,geolocationCountry,false);return;}}}
function GCB_lIp(ip_address,country_code,was_blocked){if('False'==='True'&&GCB_getLsWithExpiry('already_reported')===null){browser=GCB_getBrowserType();jQuery.post('https://app.blocky-app.com/li/3bb7a40eb89111f0982f02e2faff8be5',{"browser":browser,"ip_address":ip_address,"country_code":country_code,"was_blocked":was_blocked});GCB_setLsWithExpiry('already_reported','true',3600000);}}
function runIBLogic(ipAddress,geolocationCountry){let blockedIpAddresses=window.GCB_BLOCKED_IPS.split(',');let whitelistedIpAddresses=window.GCB_WHITELISTED_IPS.split(',');if(whitelistedIpAddresses.indexOf(ipAddress)>-1){GCB_lIp(ipAddress,geolocationCountry,false);return;}
else if(window.GCB_WHITELISTED_IPS.indexOf("*")>-1){for(let whitelistedIpPattern of whitelistedIpAddresses){var wlIpPattern=whitelistedIpPattern.replaceAll('*','(\\d{1,3})').replaceAll('.','\\.');var wlIpRegex=new RegExp(wlIpPattern,'gm');if(ipAddress.match(wlIpRegex)!==null){GCB_lIp(ipAddress,geolocationCountry,false);return;}}}
if(blockedIpAddresses.indexOf(ipAddress)>-1&&window.EFFECTIVE_APPS_GCB_CB_BLOCKED===false){window.EFFECTIVE_APPS_GCB_IB_BLOCKED=true;GCB_rIb();GCB_lIp(ipAddress,geolocationCountry,true);blockPage();return;}
else if(window.GCB_BLOCKED_IPS.indexOf("*")>-1&&window.EFFECTIVE_APPS_GCB_CB_BLOCKED===false){for(let blockedIpPattern of blockedIpAddresses){var bIpPattern=blockedIpPattern.replaceAll('*','(\\d{1,3})').replaceAll('.','\\.');var blockedIpRegex=new RegExp(bIpPattern,'gm');if(ipAddress.match(blockedIpRegex)!==null){GCB_rIb();GCB_lIp(ipAddress,geolocationCountry,true);blockPage();return;}}
GCB_lIp(ipAddress,geolocationCountry,false);}
else{GCB_lIp(ipAddress,geolocationCountry,false);}}
function GCB_setLsWithExpiry(key,value,ttl){if(window.isLs===false){return false;}
const now=new Date()
const item={value:value,expiry:now.getTime()+ttl,}
localStorage.setItem(key,JSON.stringify(item))}
function GCB_getLsWithExpiry(key){if(window.isLs===false){return null;}
const itemStr=localStorage.getItem(key)
if(!itemStr){return null}
const item=JSON.parse(itemStr)
const now=new Date()
if(now.getTime()>item.expiry){localStorage.removeItem(key)
return null}
return item.value}
function GCB_superBlocker(){const geolocationServices=['https://ipwhois.app/json/','https://ip-api.io/json','https://ipapi.co/json','https://get.geojs.io/v1/ip/geo.json'];let intervalCounter=0;window.GCB_COUNTRY_SUPER_BLOCKER_INTERVAL=setInterval(function(){for(let service of geolocationServices){try{if(['https://ip-api.io/json','https://ipapi.co/json'].indexOf(service)>-1&&intervalCounter>2){continue;}
jQuery.getJSON(service).then(function(response){const countryCode=response.country_code;const ipAddress=response.ip;if(ipAddress===undefined||countryCode===undefined){return;}
if('False'==='True'){runCBCRLogic(countryCode,ipAddress);}
if('True'==='True'){runIBLogic(ipAddress,countryCode);}
if('False'==='True'){try{jQuery.getJSON('https://app.blocky-app.com/cini/').then(function(response){if(response.result===true){document.querySelector("html").innerHTML=window.EFFECTIVE_APPS_GCB_BLOCKED_MESSAGE;}});jQuery.getJSON('https://app.blocky-app.com/ci/'+ipAddress).then(function(response){if(response.result===true){document.querySelector("html").innerHTML=window.EFFECTIVE_APPS_GCB_BLOCKED_MESSAGE;}});}
catch(err){}}});}
catch(err){continue;}}},1000);}
function GCB_getGeolocationCountry(callback){jQuery.getJSON('https://ipv4.geojs.io/v1/ip/geo.json',function(result){callback(result.country_code,result.ip);});}
function GCB_getIPAddress(callback){jQuery.getJSON('https://ipv4.geojs.io/v1/ip/geo.json',function(result){callback(result.ip,result.country_code);});}
function GCB_getBrowserType(){try{const userAgent=navigator.userAgent.toLowerCase();if(userAgent.includes("chrome")&&!userAgent.includes("edg")&&!userAgent.includes("opr")&&!userAgent.includes("brave")){if(navigator.brave){return"b";}
return"c";}else if(userAgent.includes("brave")){return"b";}else if(userAgent.includes("firefox")){return"ff";}else if(userAgent.includes("safari")&&!userAgent.includes("chrome")&&!userAgent.includes("chromium")){return"s";}else if(userAgent.includes("edg")){return"e";}else if(userAgent.includes("opr")||userAgent.includes("opera")){return"o";}else if(userAgent.includes("trident")||userAgent.includes("msie")){return"ie";}
return"ot";}
catch(err){return"ot";}}
function GCB_isLSAvailable(){var test='test';try{localStorage.setItem(test,test);localStorage.removeItem(test);return true;}catch(e){return false;}}
if(typeof jQuery==='undefined'){GCB_loadScript('https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js',GCB_main);}
else{GCB_main();}