// JavaScript Document var FingerprintJS=function(e){"use strict";function t(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function n(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}function r(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function o(e,t){return 0===(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=i(e=n(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=i(e=n(e,[3301882366,444984403]),[0,e[0]>>>1])}function c(e,c){c=c||0;var u,s=(e=e||"").length%16,l=e.length-s,f=[0,c],d=[0,c],h=[0,0],v=[0,0],g=[2277735313,289559509],p=[1291169091,658871167];for(u=0;u>>0).toString(16)).slice(-8)+("00000000"+(f[1]>>>0).toString(16)).slice(-8)+("00000000"+(d[0]>>>0).toString(16)).slice(-8)+("00000000"+(d[1]>>>0).toString(16)).slice(-8)}var u=function(){return(u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=4}function y(){return h(["msWriteProfilerMark"in v,"MSStream"in v,"msLaunchUri"in g,"msSaveBlob"in g])>=3&&!m()}function w(){return h(["webkitPersistentStorage"in g,"webkitTemporaryStorage"in g,0===g.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in v,"BatteryManager"in v,"webkitMediaStream"in v,"webkitSpeechGrammar"in v])>=5}function b(){return h(["ApplePayError"in v,"CSSPrimitiveValue"in v,"Counter"in v,0===g.vendor.indexOf("Apple"),"getStorageUpdates"in g,"WebKitMediaKeys"in v])>=4}function S(){return h(["safari"in v,!("DeviceMotionEvent"in v),!("ongestureend"in v),!("standalone"in g)])>=3}var C=window,A=document;function M(e,t,n){(function(e){return e&&"function"==typeof e.setValueAtTime})(t)&&t.setValueAtTime(n,e.currentTime)}function T(e){return new Promise((function(t,n){e.oncomplete=function(e){return t(e.renderedBuffer)};var r=3,o=function(){switch(e.startRendering(),e.state){case"running":setTimeout((function(){return n(x("timeout"))}),1e3);break;case"suspended":A.hidden||r--,r>0?setTimeout(o,500):n(x("suspended"))}};o()}))}function k(e){for(var t=0,n=4500;n<5e3;++n)t+=Math.abs(e[n]);return t}function x(e){var t=new Error(e);return t.name=e,t}var P=document,I=["monospace","sans-serif","serif"],O=["sans-serif-thin","ARNO PRO","Agency FB","Arabic Typesetting","Arial Unicode MS","AvantGarde Bk BT","BankGothic Md BT","Batang","Bitstream Vera Sans Mono","Calibri","Century","Century Gothic","Clarendon","EUROSTILE","Franklin Gothic","Futura Bk BT","Futura Md BT","GOTHAM","Gill Sans","HELV","Haettenschweiler","Helvetica Neue","Humanst521 BT","Leelawadee","Letter Gothic","Levenim MT","Lucida Bright","Lucida Sans","Menlo","MS Mincho","MS Outlook","MS Reference Specialty","MS UI Gothic","MT Extra","MYRIAD PRO","Marlett","Meiryo UI","Microsoft Uighur","Minion Pro","Monotype Corsiva","PMingLiU","Pristina","SCRIPTINA","Segoe UI Light","Serifa","SimHei","Small Fonts","Staccato222 BT","TRAJAN PRO","Univers CE 55 Medium","Vrinda","ZWAdobeF"],E={fontStyle:"normal",fontWeight:"normal",letterSpacing:"normal",lineBreak:"auto",lineHeight:"normal",textTransform:"none",textAlign:"left",textDecoration:"none",textShadow:"none",whiteSpace:"normal",wordBreak:"normal",wordSpacing:"normal",position:"absolute",left:"-9999px",fontSize:"48px"};function D(e){return e.toDataURL()}var R=navigator,B=window;var L=navigator;var F=window;var G=window;var H=window;var U=document;var W={osCpu:function(){return navigator.oscpu},languages:function(){var e=[],t=L.language||L.userLanguage||L.browserLanguage||L.systemLanguage;if(void 0!==t&&e.push([t]),Array.isArray(L.languages))w()&&h([!("MediaSettingsRange"in v),"RTCEncodedAudioFrame"in v,""+v.Intl=="[object Intl]",""+v.Reflect=="[object Reflect]"])>=3||e.push(L.languages);else if("string"==typeof L.languages){var n=L.languages;n&&e.push(n.split(","))}return e},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return navigator.deviceMemory},screenResolution:function(){var e=[f(F.screen.width),f(F.screen.height)];return e.sort().reverse(),e},availableScreenResolution:function(){if(G.screen.availWidth&&G.screen.availHeight){var e=[f(G.screen.availWidth),f(G.screen.availHeight)];return e.sort().reverse(),e}},hardwareConcurrency:function(){try{var e=f(navigator.hardwareConcurrency);return isNaN(e)?1:e}catch(t){return 1}},timezoneOffset:function(){var e=(new Date).getFullYear();return Math.max(d(new Date(e,0,1).getTimezoneOffset()),d(new Date(e,6,1).getTimezoneOffset()))},timezone:function(){var e;if(null===(e=H.Intl)||void 0===e?void 0:e.DateTimeFormat)return(new H.Intl.DateTimeFormat).resolvedOptions().timeZone},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){if(!m()&&!y())try{return!!window.indexedDB}catch(e){return!0}},openDatabase:function(){return!!window.openDatabase},cpuClass:function(){return navigator.cpuClass},platform:function(){return navigator.platform},plugins:function(){if(m())return[];if(navigator.plugins){for(var e=[],t=0;t=3))return[2,-1];if(!(e=C.OfflineAudioContext||C.webkitOfflineAudioContext))return[2,-2];t=new e(1,44100,44100),(n=t.createOscillator()).type="triangle",M(t,n.frequency,1e4),r=t.createDynamicsCompressor(),M(t,r.threshold,-50),M(t,r.knee,40),M(t,r.ratio,12),M(t,r.reduction,-20),M(t,r.attack,0),M(t,r.release,.25),n.connect(r),r.connect(t.destination),n.start(0),a.label=1;case 1:return a.trys.push([1,3,4,5]),[4,T(t)];case 2:return o=a.sent(),[3,5];case 3:if("timeout"===(i=a.sent()).name||"suspended"===i.name)return[2,-3];throw i;case 4:return n.disconnect(),r.disconnect(),[7];case 5:return[2,k(o.getChannelData(0))]}}))}))},pluginsSupport:function(){return void 0!==navigator.plugins},productSub:function(){return navigator.productSub},emptyEvalLength:function(){return eval.toString().length},errorFF:function(){try{throw"a"}catch(e){try{return e.toSource(),!0}catch(t){return!1}}},vendor:function(){return navigator.vendor},chrome:function(){return void 0!==window.chrome},cookiesEnabled:function(){try{U.cookie="cookietest=1";var e=-1!==U.cookie.indexOf("cookietest=");return U.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(t){return!1}}};function j(e,t,n){return s(this,void 0,void 0,(function(){var r,o,i,a,c,s,f,d,h;return l(this,(function(l){switch(l.label){case 0:r=Date.now(),o={},i=0,a=Object.keys(e),l.label=1;case 1:if(!(i=4},e.isTrident=m,e.isWebKit=b,e.load=J,e.murmurX64Hash128=K,e}({}); function getAd(obj,callback){ //'use strict'; var callbackName = 'jsonp_callback_' + Math.round(100000 * Math.random()); window[callbackName] = function(data) { delete window[callbackName]; document.body.removeChild(s); if(callback) callback(data); }; var url = "https://adshop.quabads.com/js/1.2.1/js-token-gen.php?xai=" + btoa(JSON.stringify(obj)); var s = document.createElement("script"); s.src = url+(url.indexOf('?') >= 0 ? '&' : '?') +"callback="+callbackName; document.body.appendChild(s); }; var slots = document.getElementsByClassName("quabads-slot"); function displayAdvert(slots,myObj) { 'use strict'; for(var i = 0; i < myObj.ads.length; i++){ var advert = myObj.ads[i].ad; var new_div = document.createElement("div"); new_div.innerHTML = advert; if(slots[i].getAttribute("style") !== null) new_div.setAttribute("style", slots[i].getAttribute("style")); new_div.setAttribute("class", slots[i].getAttribute("class")); slots[i].replaceWith(new_div); } } var currentLocation = window.location; if(currentLocation === null) currentLocation = document.location; function getWidth() { return Math.max( document.body.scrollWidth, document.documentElement.scrollWidth, document.body.offsetWidth, document.documentElement.offsetWidth, document.documentElement.clientWidth ); } function getHeight() { return Math.max( document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.documentElement.clientHeight ); } function initFingerprintJS() { //window.fPrint; FingerprintJS.load().then(fp => { // The FingerprintJS agent is ready. // Get a visitor identifier when you'd like to. fp.get().then(result => { // This is the visitor identifier: const visitorId = result.visitorId; console.log(visitorId); }); }); } var advertSlot = (slots,obj)=>{ 'use strict'; getAd(obj, function(data){ displayAdvert(slots,data); }); }; document.addEventListener('DOMContentLoaded', function() { var ads_array = new Array(); FingerprintJS.load().then(fp => { fp.get().then(result => { const visitorId = result.visitorId; for(var i = 0; i < slots.length; i++){ var slot = slots[i]; var slotID = slot.getAttribute("data-slot-id"); var slotPub = slot.getAttribute("data-pub-id"); ads_array.push({ publisher: slotPub, slot: slotID }); } advertSlot(slots,{ finger: visitorId, host: currentLocation.hostname, reader: "dummy_reader", clicker: "dummy_clicker", directory: "dummy_directory", path: currentLocation.pathname, width: getWidth(), height: getHeight(), slot_obj: ads_array }); }); }); }, false);