var Barclaystm = Barclaystm || {}; (regionstm.version = 4), (regionstm.create_url = function (t, e, r, n, c) { function i() { return Math.floor(2742745743359 * Math.random()); } function a() { return o(i()); } function o(t) { return (t + 78364164096).toString(36); } var m = i(), u = i(), l = 885187064159; (u = ((u = u - (u % 256) + Barclaystm.version) + m) % 2742745743359), (l = (l + m) % 2742745743359); var s = 'https://' + t + '/' + (m = a() + o(m)) + e, h = [(u = o(l) + o(u)) + '=' + r, a() + a() + '=' + n]; return ( void 0 !== c && c.length > 0 && h.push(a() + a() + '=' + c), s + '?' + h.join('&') ); }), (regionstm.beacon = function (t, e, r, n) { var c = 'turn:aa.online-metrix.net?transport=', i = '1:' + e + ':' + r, a = { iceServers: [ { urls: c + 'tcp', username: i, credential: r }, { urls: c + 'udp', username: i, credential: r }, ], }; try { var o = new RTCPeerConnection(a); o.createDataChannel(Math.random().toString()); var m = function () {}, u = function (t) { o.setLocalDescription(t, m, m); }; 'undefined' == typeof Promise || o.createOffer.length > 0 ? o.createOffer(u, m) : o.createOffer().then(u, m), setInterval(function () { o.close(); }, 1e4); } catch (t) {} }), (regionstm.load_tags = function (t, e, r, n) { Barclaystm.beacon(t, e, r, n); var c = document.getElementsByTagName('head').item(0), i = document.createElement('script'); (i.id = 'tmx_tags_js'), i.setAttribute('type', 'text/javascript'); var a = Barclaystm.create_url(t, '.js', e, r, n); i.setAttribute('src', a), Barclaystm.set_csp_nonce(i), c.appendChild(i); }), (regionstm.csp_nonce = null), (regionstm.register_csp_nonce = function (t) { if (void 0 !== t.currentScript && null !== t.currentScript) { var e = t.currentScript.getAttribute('nonce'); null != e && '' !== e ? (regionstm.csp_nonce = e) : void 0 !== t.currentScript.nonce && null !== t.currentScript.nonce && '' !== t.currentScript.nonce && (regionstm.csp_nonce = t.currentScript.nonce); } }), (regionstm.set_csp_nonce = function (t) { null !== Barclaystm.csp_nonce && (t.setAttribute('nonce', Barclaystm.csp_nonce), t.getAttribute('nonce') !== Barclaystm.csp_nonce && (t.nonce = Barclaystm.csp_nonce)); }), (regionstm.cleanup = function () { for (; null !== (hp_frame = document.getElementById('tdz_ifrm')); ) hp_frame.parentElement.removeChild(hp_frame); for (; null !== (tmx_frame = document.getElementById('tmx_tags_iframe')); ) tmx_frame.parentElement.removeChild(tmx_frame); for (; null !== (tmx_script = document.getElementById('tmx_tags_js')); ) tmx_script.parentElement.removeChild(tmx_script); }), (regionstm.P85545F54F1224BBB908337103351B9B7 = function (t, e, r, n) { void 0 !== t && void 0 !== e && void 0 !== r && 8 === e.length && (regionstm.cleanup(), Barclaystm.register_csp_nonce(document), Barclaystm.load_tags(t, e, r, n)); });