diff --git a/website/src/theme/analytics-tracker.js b/website/src/theme/analytics-tracker.js index 3bde418d3c..c8b2e5abf9 100644 --- a/website/src/theme/analytics-tracker.js +++ b/website/src/theme/analytics-tracker.js @@ -1 +1 @@ -"use strict";var d=Object.defineProperty,b=Object.defineProperties,S=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyDescriptors,T=Object.getOwnPropertyNames,y=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var x=(t,e,r)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,U=(t,e)=>{for(var r in e||(e={}))h.call(e,r)&&x(t,r,e[r]);if(y)for(var r of y(e))k.call(e,r)&&x(t,r,e[r]);return t},D=(t,e)=>b(t,I(e));var Q=(t,e)=>{for(var r in e)d(t,r,{get:e[r],enumerable:!0})},R=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of T(e))!h.call(t,i)&&i!==r&&d(t,i,{get:()=>e[i],enumerable:!(o=S(e,i))||o.enumerable});return t};var j=t=>R(d({},"__esModule",{value:!0}),t);var f=(t,e,r)=>new Promise((o,i)=>{var m=a=>{try{s(r.next(a))}catch(l){i(l)}},g=a=>{try{s(r.throw(a))}catch(l){i(l)}},s=a=>a.done?o(a.value):Promise.resolve(a.value).then(m,g);s((r=r.apply(t,e)).next())});var G={};Q(G,{safeTrackPageView:()=>F,trackPageView:()=>V});module.exports=j(G);var n=[];for(u=0;u<256;++u)n.push((u+256).toString(16).slice(1));var u;function P(t,e=0){return(n[t[e+0]]+n[t[e+1]]+n[t[e+2]]+n[t[e+3]]+"-"+n[t[e+4]]+n[t[e+5]]+"-"+n[t[e+6]]+n[t[e+7]]+"-"+n[t[e+8]]+n[t[e+9]]+"-"+n[t[e+10]]+n[t[e+11]]+n[t[e+12]]+n[t[e+13]]+n[t[e+14]]+n[t[e+15]]).toLowerCase()}var c,E=new Uint8Array(16);function w(){if(!c&&(c=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!c))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return c(E)}var z=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),v={randomUUID:z};function C(t,e,r){if(v.randomUUID&&!e&&!t)return v.randomUUID();t=t||{};var o=t.random||(t.rng||w)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=o[i];return e}return P(o)}var p=C;var L="https://snowplow-pixel.tradingview.com",O={e:"pv",aid:"tradingview",p:"web"};function A(){return{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:p()}}]}}function H(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return}}function N(){let t=Date.now().toString(),e=Date.now().toString(),r=btoa(JSON.stringify(A())),o=p(),i=window.location.href,m=document.title,g=document.referrer,s=H();return D(U({},O),{dtm:t,stm:e,cx:r,url:i,page:m,refr:g,tz:s,eid:o})}function q(t){return t.match(/^https:\/\/tradingview\.github\.io\/lightweight-charts/)!==null}function V(){return f(this,null,function*(){if(!q(window.location.href))return;let t=N(),e=new window.URL("i",L);for(let[r,o]of Object.entries(t))e.searchParams.append(r,o);yield window.fetch(e.toString(),{method:"GET"})})}function F(){return f(this,null,function*(){try{yield V()}catch(t){}})} +"use strict";var c=Object.defineProperty,V=Object.defineProperties,_=Object.getOwnPropertyDescriptor,A=Object.getOwnPropertyDescriptors,T=Object.getOwnPropertyNames,x=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;var S=(t,e,n)=>e in t?c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,w=(t,e)=>{for(var n in e||(e={}))h.call(e,n)&&S(t,n,e[n]);if(x)for(var n of x(e))k.call(e,n)&&S(t,n,e[n]);return t},U=(t,e)=>V(t,A(e));var L=(t,e)=>{for(var n in e)c(t,n,{get:e[n],enumerable:!0})},O=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of T(e))!h.call(t,r)&&r!==n&&c(t,r,{get:()=>e[r],enumerable:!(i=_(e,r))||i.enumerable});return t};var Q=t=>O(c({},"__esModule",{value:!0}),t);var f=(t,e,n)=>new Promise((i,r)=>{var u=s=>{try{a(n.next(s))}catch(p){r(p)}},l=s=>{try{a(n.throw(s))}catch(p){r(p)}},a=s=>s.done?i(s.value):Promise.resolve(s.value).then(u,l);a((n=n.apply(t,e)).next())});var K={};L(K,{safeTrackPageView:()=>B,trackPageView:()=>P});module.exports=Q(K);var o=[];for(m=0;m<256;++m)o.push((m+256).toString(16).slice(1));var m;function I(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}var g,R=new Uint8Array(16);function v(){if(!g&&(g=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!g))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return g(R)}var j=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),y={randomUUID:j};function E(t,e,n){if(y.randomUUID&&!e&&!t)return y.randomUUID();t=t||{};var i=t.random||(t.rng||v)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){n=n||0;for(var r=0;r<16;++r)e[n+r]=i[r];return e}return I(i)}var d=E;var N="https://snowplow-pixel.tradingview.com",z={e:"pv",aid:"tradingview",p:"web"};function J(){return{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:d()}}]}}function H(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(t){return}}function q(t){let e=Date.now().toString(),n=Date.now().toString(),i=btoa(JSON.stringify(J())),r=d(),u=window.location.href,l=document.title,a=document.referrer,s=H();return U(w(w({},z),t),{dtm:e,stm:n,cx:i,url:u,page:l,refr:a,tz:s,eid:r})}var b="tradingview_ids",D="tradingview_id_last_used";function C(){if(!window||!window.localStorage)return null;let t=window.localStorage.getItem(b);return t?JSON.parse(t):null}function F(t){return window.localStorage.setItem(D,t.toString()),!0}function G(){if(!window||!window.localStorage)return null;let t=window.localStorage.getItem(D);return t?parseInt(t,10):null}function M(t){return window.localStorage.setItem(b,JSON.stringify(t)),!0}function X(t){return t.match(/^https:\/\/tradingview\.github\.io\/lightweight-charts/)!==null}var Z=30*60*1e3;function P(){return f(this,null,function*(){if(!X(window.location.href))return;let t=C(),e=G(),n=Date.now();F(n),t||(t={duid:d(),sid:d()});let i=!e||n-e>Z;t.sid=i?d():t==null?void 0:t.sid,M(t);let r=q(t),u=new window.URL("i",N);for(let[l,a]of Object.entries(r))u.searchParams.append(l,a);yield window.fetch(u.toString(),{method:"GET",mode:"no-cors"})})}function B(){return f(this,null,function*(){try{yield P()}catch(t){}})}