PageSourceSearch

https://www.abc-compressors.com/wp-content/plugins/sitepress-multi…/dist/js/browser-redirect/app.js?ver=510000

js abc-compressors.com collected 2026-10-09 04:25:31 UTC 4,961 bytes, 1 lines download raw bytes

1(()=>{"use strict";let e=/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,t=/%(23|24|26|2B|5E|60|7C)/g,r=e=>e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent),a={get:e=>{if(!("u"<typeof document))for(let t of document.cookie?document.cookie.split("; "):[]){let a=t.split("="),s=a.slice(1).join("=");'"'===s.charAt(0)&&(s=s.slice(1,-1));try{if(r(a[0])===e)return r(s)}catch{}}},set:(r,a,s={})=>{if("u"<typeof document)return;let i=Object.assign({path:"/"},s);i.expires instanceof Date&&(i.expires=i.expires.toUTCString());let n=encodeURIComponent(String(r)).replace(t,decodeURIComponent).replace(/[()]/g,escape)+"="+encodeURIComponent(String(a)).replace(e,decodeURIComponent);for(let e of Object.keys(i))i[e]&&(n+="; "+e,!0!==i[e]&&(n+="="+String(i[e]).split(";")[0]));return document.cookie=n,n}},s=class{constructor(e,t,r){this.params=e,this.navigator=t,this.window=r}getExpirationDate(){let e=new Date,t=e.getTime();return e.setTime(t+60*this.params.cookie.expiration*6e4),e}hasLanguageIdentities(){return Array.isArray(this.params.languages)&&this.params.languages.length>0}browserTagParts(e){let t=String(e||"").toLowerCase().split("_"),r=t[t.length-1];return{lang:t[0],country:t.length>=2&&/^[a-z]{2}$/.test(r)?r:null}}redirectableLanguages(){let e=this.params.languageUrls||{};return this.params.languages.filter(t=>{let r;return r=String(t.code),!!Object.prototype.hasOwnProperty.call(e,r)&&!!e[r]})}matchSiteLanguage(e){let t=this.redirectableLanguages(),r=String(e||"").toLowerCase(),a=r.replace(/_/g,"-"),s=r.replace(/-/g,"_"),i=t.find(e=>{let t=String(e.code||"").toLowerCase();return t===a||t===s});if(i)return i;let n=t.find(e=>{let t=String(e.locale||"").toLowerCase();return""!==t&&t===s});if(n)return n;let o=this.browserTagParts(r),g=t.filter(e=>""!==String(e.language||"")),l=e=>String(e.language).toLowerCase(),u=g.find(e=>l(e)===o.lang&&(e.country?String(e.country).toLowerCase():null)===o.country);return u||g.find(e=>l(e)===o.lang)||null}redirectUrlForEntry(e){return this.finalRedirectUrl(!!e&&e.url)}finalRedirectUrl(e){if(!e)return!1;let t=this.addQueryVarsToRedirectURL(e)+(this.window.location.hash?this.window.location.hash:"");return!this.isSameAddress(t,this.window.location.href)&&t}getRedirectUrl(e){if(this.hasLanguageIdentities())return this.redirectUrlForEntry(this.matchSiteLanguage(e));let t=!1,r=this.params.languageUrls,a=this.getLanguageParts(e);return void 0===r[e]?void 0!==r[a.lastPart]?t=r[a.lastPart]:void 0!==r[a.firstPart]&&(t=r[a.firstPart]):t=r[e],this.finalRedirectUrl(t)}normalizeAddress(e,t=!1){let r;try{r=new URL(e,this.window.location.href)}catch{return!1}return r.origin+r.pathname.replace(/\/+$/,"")+(t?"":r.search)}isSameAddress(e,t,r=!1){let a=this.normalizeAddress(e,r),s=this.normalizeAddress(t,r);return!1!==a&&a===s}getLanguageParts(e){return{firstPart:e.substr(0,2),lastPart:e.substr(3,2)}}addQueryVarsToRedirectURL(e){let t=new URL(this.window.location),r=new URL(e);for(let e of(t.searchParams.delete("lang"),t.searchParams))r.searchParams.set(e[0],e[1]);return r.toString()}init(){this.areCookiesEnabled()&&!this.doesCookieExists()&&this.getBrowserLanguage(e=>{let t,r=this.hasLanguageIdentities(),a=this.params.pageLanguage.toLowerCase(),s=e.length,i=Object.keys(this.params.languageUrls);for(let n=0;n<s;n++){t=e[n];let s=r?this.matchSiteLanguage(t):null;if((r?t===a||!!s&&String(s.code).toLowerCase()===a:t===a||!i.includes(t)&&this.getLanguageParts(t).firstPart===a)||this.doesReferrerBelongsToSiteURLs()){this.setCookie(t);break}{let e=r?this.redirectUrlForEntry(s):this.getRedirectUrl(t);if(!1!==e){this.setCookie(t),this.window.location=e;break}}}})}doesCookieExists(){let e=this.params.cookie.name;return a.get(e)}doesReferrerBelongsToSiteURLs(){let e=document.referrer;if(!e)return!1;for(let t in this.params.languageUrls)if(this.isSameAddress(e,this.params.languageUrls[t],!0))return!0;return!1}setCookie(e){let t=this.params.cookie,r=t.name,s="/",i="";t.path&&(s=t.path),t.domain&&(i=t.domain);let n={expires:this.getExpirationDate(),path:s,domain:i};a.set(r,e,n)}getBrowserLanguage(e){let t=[];this.navigator.languages&&(t=this.navigator.languages),0===t.length&&(this.navigator.language||this.navigator.userLanguage)&&t.push(this.navigator.language||this.navigator.userLanguage),0===t.length&&(this.navigator.browserLanguage||this.navigator.systemLanguage)&&t.push(this.navigator.browserLanguage||this.navigator.systemLanguage),0===t.length?fetch("?icl_ajx_action=get_browser_language").then(e=>e.json()).then(r=>{r.success&&(t=r.data,e&&"function"==typeof e&&e(t=t.join("|").toLowerCase().replace(/-/g,"_").split("|")))}):e(t=t.join("|").toLowerCase().replace(/-/g,"_").split("|"))}areCookiesEnabled(){let e=void 0!==a;return e&&(a.set("wpml_browser_redirect_test",1),e="1"===a.get("wpml_browser_redirect_test"),a.set("wpml_browser_redirect_test",0)),e}};document.addEventListener("DOMContentLoaded",()=>{new s(wpml_browser_redirect_params,navigator,window).init()})})();

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