@openreplay/tracker 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,9 +15,10 @@ export declare type Options = {
15
15
  session_pageno_key: string;
16
16
  local_uuid_key: string;
17
17
  ingestPoint: string;
18
- resourceBaseHref: string;
18
+ resourceBaseHref: string | null;
19
19
  __is_snippet: boolean;
20
20
  __debug_report_edp: string | null;
21
+ __debug_log: boolean;
21
22
  onStart?: (info: OnStartInfo) => void;
22
23
  } & ObserverOptions & WebworkerOptions;
23
24
  declare type Callback = () => void;
@@ -39,7 +40,7 @@ export default class App {
39
40
  private version;
40
41
  private readonly worker?;
41
42
  constructor(projectKey: string, sessionToken: string | null | undefined, opts: Partial<Options>);
42
- private sendDebugReport;
43
+ private _debug;
43
44
  send(message: Message, urgent?: boolean): void;
44
45
  private commit;
45
46
  addCommitCallback(cb: CommitCallback): void;
@@ -52,6 +53,7 @@ export default class App {
52
53
  getHost(): string;
53
54
  getProjectKey(): string;
54
55
  getBaseHref(): string;
56
+ resolveResourceURL(resourceURL: string): string;
55
57
  isServiceURL(url: string): boolean;
56
58
  active(): boolean;
57
59
  private _start;
package/cjs/app/index.js CHANGED
@@ -17,7 +17,7 @@ class App {
17
17
  this.commitCallbacks = [];
18
18
  this._sessionID = null;
19
19
  this.isActive = false;
20
- this.version = '3.4.0';
20
+ this.version = '3.4.1';
21
21
  this.projectKey = projectKey;
22
22
  this.options = Object.assign({
23
23
  revID: '',
@@ -26,9 +26,10 @@ class App {
26
26
  session_pageno_key: '__openreplay_pageno',
27
27
  local_uuid_key: '__openreplay_uuid',
28
28
  ingestPoint: exports.DEFAULT_INGEST_POINT,
29
- resourceBaseHref: '',
29
+ resourceBaseHref: null,
30
30
  __is_snippet: false,
31
31
  __debug_report_edp: null,
32
+ __debug_log: false,
32
33
  obscureTextEmails: true,
33
34
  obscureTextNumbers: false,
34
35
  captureIFrames: false,
@@ -42,12 +43,11 @@ class App {
42
43
  this.ticker = new ticker_1.default(this);
43
44
  this.ticker.attach(() => this.commit());
44
45
  try {
45
- this.worker = new Worker(URL.createObjectURL(new Blob([`"use strict";function t(t){function s(...s){return new t(...s)}return s.prototype=t.prototype,s}const s=new Map;const i=t(class{constructor(t,s,i){this.pageNo=t,this.firstIndex=s,this.timestamp=i,this._id=80}encode(t){return t.uint(80)&&t.uint(this.pageNo)&&t.uint(this.firstIndex)&&t.int(this.timestamp)}});s.set(80,i);const n=t(class{constructor(t){this.timestamp=t,this._id=0}encode(t){return t.uint(0)&&t.uint(this.timestamp)}});s.set(0,n);const e=t(class{constructor(t,s,i){this.url=t,this.referrer=s,this.navigationStart=i,this._id=4}encode(t){return t.uint(4)&&t.string(this.url)&&t.string(this.referrer)&&t.uint(this.navigationStart)}});s.set(4,e);const r=t(class{constructor(t,s){this.width=t,this.height=s,this._id=5}encode(t){return t.uint(5)&&t.uint(this.width)&&t.uint(this.height)}});s.set(5,r);const o=t(class{constructor(t,s){this.x=t,this.y=s,this._id=6}encode(t){return t.uint(6)&&t.int(this.x)&&t.int(this.y)}});s.set(6,o);const h=t(class{constructor(){this._id=7}encode(t){return t.uint(7)}});s.set(7,h);const c=t(class{constructor(t,s,i,n,e){this.id=t,this.parentID=s,this.index=i,this.tag=n,this.svg=e,this._id=8}encode(t){return t.uint(8)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)&&t.string(this.tag)&&t.boolean(this.svg)}});s.set(8,c);const u=t(class{constructor(t,s,i){this.id=t,this.parentID=s,this.index=i,this._id=9}encode(t){return t.uint(9)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)}});s.set(9,u);const a=t(class{constructor(t,s,i){this.id=t,this.parentID=s,this.index=i,this._id=10}encode(t){return t.uint(10)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)}});s.set(10,a);const d=t(class{constructor(t){this.id=t,this._id=11}encode(t){return t.uint(11)&&t.uint(this.id)}});s.set(11,d);const l=t(class{constructor(t,s,i){this.id=t,this.name=s,this.value=i,this._id=12}encode(t){return t.uint(12)&&t.uint(this.id)&&t.string(this.name)&&t.string(this.value)}});s.set(12,l);const g=t(class{constructor(t,s){this.id=t,this.name=s,this._id=13}encode(t){return t.uint(13)&&t.uint(this.id)&&t.string(this.name)}});s.set(13,g);const f=t(class{constructor(t,s){this.id=t,this.data=s,this._id=14}encode(t){return t.uint(14)&&t.uint(this.id)&&t.string(this.data)}});s.set(14,f);const p=t(class{constructor(t,s,i){this.id=t,this.x=s,this.y=i,this._id=16}encode(t){return t.uint(16)&&t.uint(this.id)&&t.int(this.x)&&t.int(this.y)}});s.set(16,p);const m=t(class{constructor(t,s){this.id=t,this.label=s,this._id=17}encode(t){return t.uint(17)&&t.uint(this.id)&&t.string(this.label)}});s.set(17,m);const _=t(class{constructor(t,s,i){this.id=t,this.value=s,this.mask=i,this._id=18}encode(t){return t.uint(18)&&t.uint(this.id)&&t.string(this.value)&&t.int(this.mask)}});s.set(18,_);const y=t(class{constructor(t,s){this.id=t,this.checked=s,this._id=19}encode(t){return t.uint(19)&&t.uint(this.id)&&t.boolean(this.checked)}});s.set(19,y);const v=t(class{constructor(t,s){this.x=t,this.y=s,this._id=20}encode(t){return t.uint(20)&&t.uint(this.x)&&t.uint(this.y)}});s.set(20,v);const S=t(class{constructor(t,s){this.level=t,this.value=s,this._id=22}encode(t){return t.uint(22)&&t.string(this.level)&&t.string(this.value)}});s.set(22,S);const b=t(class{constructor(t,s,i,n,e,r,o,h,c){this.requestStart=t,this.responseStart=s,this.responseEnd=i,this.domContentLoadedEventStart=n,this.domContentLoadedEventEnd=e,this.loadEventStart=r,this.loadEventEnd=o,this.firstPaint=h,this.firstContentfulPaint=c,this._id=23}encode(t){return t.uint(23)&&t.uint(this.requestStart)&&t.uint(this.responseStart)&&t.uint(this.responseEnd)&&t.uint(this.domContentLoadedEventStart)&&t.uint(this.domContentLoadedEventEnd)&&t.uint(this.loadEventStart)&&t.uint(this.loadEventEnd)&&t.uint(this.firstPaint)&&t.uint(this.firstContentfulPaint)}});s.set(23,b);const x=t(class{constructor(t,s,i){this.speedIndex=t,this.visuallyComplete=s,this.timeToInteractive=i,this._id=24}encode(t){return t.uint(24)&&t.uint(this.speedIndex)&&t.uint(this.visuallyComplete)&&t.uint(this.timeToInteractive)}});s.set(24,x);const k=t(class{constructor(t,s,i){this.name=t,this.message=s,this.payload=i,this._id=25}encode(t){return t.uint(25)&&t.string(this.name)&&t.string(this.message)&&t.string(this.payload)}});s.set(25,k);const E=t(class{constructor(t,s){this.name=t,this.payload=s,this._id=27}encode(t){return t.uint(27)&&t.string(this.name)&&t.string(this.payload)}});s.set(27,E);const z=t(class{constructor(t){this.id=t,this._id=28}encode(t){return t.uint(28)&&t.string(this.id)}});s.set(28,z);const I=t(class{constructor(t){this.id=t,this._id=29}encode(t){return t.uint(29)&&t.string(this.id)}});s.set(29,I);const w=t(class{constructor(t,s){this.key=t,this.value=s,this._id=30}encode(t){return t.uint(30)&&t.string(this.key)&&t.string(this.value)}});s.set(30,w);const L=t(class{constructor(t,s,i){this.id=t,this.rule=s,this.index=i,this._id=37}encode(t){return t.uint(37)&&t.uint(this.id)&&t.string(this.rule)&&t.uint(this.index)}});s.set(37,L);const T=t(class{constructor(t,s){this.id=t,this.index=s,this._id=38}encode(t){return t.uint(38)&&t.uint(this.id)&&t.uint(this.index)}});s.set(38,T);const C=t(class{constructor(t,s,i,n,e,r,o){this.method=t,this.url=s,this.request=i,this.response=n,this.status=e,this.timestamp=r,this.duration=o,this._id=39}encode(t){return t.uint(39)&&t.string(this.method)&&t.string(this.url)&&t.string(this.request)&&t.string(this.response)&&t.uint(this.status)&&t.uint(this.timestamp)&&t.uint(this.duration)}});s.set(39,C);const A=t(class{constructor(t,s,i,n){this.name=t,this.duration=s,this.args=i,this.result=n,this._id=40}encode(t){return t.uint(40)&&t.string(this.name)&&t.uint(this.duration)&&t.string(this.args)&&t.string(this.result)}});s.set(40,A);const M=t(class{constructor(t,s){this.key=t,this.value=s,this._id=41}encode(t){return t.uint(41)&&t.string(this.key)&&t.string(this.value)}});s.set(41,M);const R=t(class{constructor(t){this.type=t,this._id=42}encode(t){return t.uint(42)&&t.string(this.type)}});s.set(42,R);const D=t(class{constructor(t,s,i){this.action=t,this.state=s,this.duration=i,this._id=44}encode(t){return t.uint(44)&&t.string(this.action)&&t.string(this.state)&&t.uint(this.duration)}});s.set(44,D);const U=t(class{constructor(t,s){this.mutation=t,this.state=s,this._id=45}encode(t){return t.uint(45)&&t.string(this.mutation)&&t.string(this.state)}});s.set(45,U);const N=t(class{constructor(t,s){this.type=t,this.payload=s,this._id=46}encode(t){return t.uint(46)&&t.string(this.type)&&t.string(this.payload)}});s.set(46,N);const O=t(class{constructor(t,s,i){this.action=t,this.state=s,this.duration=i,this._id=47}encode(t){return t.uint(47)&&t.string(this.action)&&t.string(this.state)&&t.uint(this.duration)}});s.set(47,O);const q=t(class{constructor(t,s,i,n){this.operationKind=t,this.operationName=s,this.variables=i,this.response=n,this._id=48}encode(t){return t.uint(48)&&t.string(this.operationKind)&&t.string(this.operationName)&&t.string(this.variables)&&t.string(this.response)}});s.set(48,q);const H=t(class{constructor(t,s,i,n){this.frames=t,this.ticks=s,this.totalJSHeapSize=i,this.usedJSHeapSize=n,this._id=49}encode(t){return t.uint(49)&&t.int(this.frames)&&t.int(this.ticks)&&t.uint(this.totalJSHeapSize)&&t.uint(this.usedJSHeapSize)}});s.set(49,H);const P=t(class{constructor(t,s,i,n,e,r,o,h){this.timestamp=t,this.duration=s,this.ttfb=i,this.headerSize=n,this.encodedBodySize=e,this.decodedBodySize=r,this.url=o,this.initiator=h,this._id=53}encode(t){return t.uint(53)&&t.uint(this.timestamp)&&t.uint(this.duration)&&t.uint(this.ttfb)&&t.uint(this.headerSize)&&t.uint(this.encodedBodySize)&&t.uint(this.decodedBodySize)&&t.string(this.url)&&t.string(this.initiator)}});s.set(53,P);const B=t(class{constructor(t,s){this.downlink=t,this.type=s,this._id=54}encode(t){return t.uint(54)&&t.uint(this.downlink)&&t.string(this.type)}});s.set(54,B);const J=t(class{constructor(t){this.hidden=t,this._id=55}encode(t){return t.uint(55)&&t.boolean(this.hidden)}});s.set(55,J);const j=t(class{constructor(t,s,i,n,e,r,o){this.timestamp=t,this.duration=s,this.context=i,this.containerType=n,this.containerSrc=e,this.containerId=r,this.containerName=o,this._id=59}encode(t){return t.uint(59)&&t.uint(this.timestamp)&&t.uint(this.duration)&&t.uint(this.context)&&t.uint(this.containerType)&&t.string(this.containerSrc)&&t.string(this.containerId)&&t.string(this.containerName)}});s.set(59,j);const K=t(class{constructor(t,s,i,n){this.id=t,this.name=s,this.value=i,this.baseURL=n,this._id=60}encode(t){return t.uint(60)&&t.uint(this.id)&&t.string(this.name)&&t.string(this.value)&&t.string(this.baseURL)}});s.set(60,K);const G=t(class{constructor(t,s,i){this.id=t,this.data=s,this.baseURL=i,this._id=61}encode(t){return t.uint(61)&&t.uint(this.id)&&t.string(this.data)&&t.string(this.baseURL)}});s.set(61,G);const X=t(class{constructor(t,s){this.type=t,this.value=s,this._id=63}encode(t){return t.uint(63)&&t.string(this.type)&&t.string(this.value)}});s.set(63,X);const F=t(class{constructor(t,s){this.name=t,this.payload=s,this._id=64}encode(t){return t.uint(64)&&t.string(this.name)&&t.string(this.payload)}});s.set(64,F);const Q=t(class{constructor(){this._id=65}encode(t){return t.uint(65)}});s.set(65,Q);const V=t(class{constructor(t,s,i,n){this.id=t,this.rule=s,this.index=i,this.baseURL=n,this._id=67}encode(t){return t.uint(67)&&t.uint(this.id)&&t.string(this.rule)&&t.uint(this.index)&&t.string(this.baseURL)}});s.set(67,V);const W=t(class{constructor(t,s,i,n){this.id=t,this.hesitationTime=s,this.label=i,this.selector=n,this._id=69}encode(t){return t.uint(69)&&t.uint(this.id)&&t.uint(this.hesitationTime)&&t.string(this.label)&&t.string(this.selector)}});s.set(69,W);const Y=t(class{constructor(t,s){this.frameID=t,this.id=s,this._id=70}encode(t){return t.uint(70)&&t.uint(this.frameID)&&t.uint(this.id)}});s.set(70,Y);const Z="function"==typeof TextEncoder?new TextEncoder:{encode(t){const s=t.length,i=new Uint8Array(3*s);let n=-1;for(var e=0,r=0,o=0;o!==s;){if(e=t.charCodeAt(o),o+=1,e>=55296&&e<=56319){if(o===s){i[n+=1]=239,i[n+=1]=191,i[n+=1]=189;break}if(!((r=t.charCodeAt(o))>=56320&&r<=57343)){i[n+=1]=239,i[n+=1]=191,i[n+=1]=189;continue}if(o+=1,(e=1024*(e-55296)+r-56320+65536)>65535){i[n+=1]=240|e>>>18,i[n+=1]=128|e>>>12&63,i[n+=1]=128|e>>>6&63,i[n+=1]=128|63&e;continue}}e<=127?i[n+=1]=0|e:e<=2047?(i[n+=1]=192|e>>>6,i[n+=1]=128|63&e):(i[n+=1]=224|e>>>12,i[n+=1]=128|e>>>6&63,i[n+=1]=128|63&e)}return i.subarray(0,n+1)}};class tt{constructor(t){this.size=t,this.offset=0,this.checkpointOffset=0,this.data=new Uint8Array(t)}checkpoint(){this.checkpointOffset=this.offset}isEmpty(){return 0===this.offset}boolean(t){return this.data[this.offset++]=+t,this.offset<=this.size}uint(t){for(;t>=128;)this.data[this.offset++]=t%256|128,t=Math.floor(t/128);return this.data[this.offset++]=t,this.offset<=this.size}int(t){return t=Math.round(t),this.uint(t>=0?2*t:-2*t-1)}string(t){const s=Z.encode(t),i=s.byteLength;return!(!this.uint(i)||this.offset+i>this.size)&&(this.data.set(s,this.offset),this.offset+=i,!0)}reset(){this.offset=0,this.checkpointOffset=0}flush(){const t=this.data.slice(0,this.checkpointOffset);return this.reset(),t}}let st,it=1e6,nt=4e5,et=new tt(nt),rt="",ot="",ht=0,ct=0,ut=0,at=0,dt=!0;function lt(){return new i(ht,at,ct).encode(et)}const gt=[];let ft,pt=!1,mt=0,_t=8e3,yt=10;function vt(){if(dt||""===ot||""===rt)return;const t=et.flush();pt?gt.push(t):(pt=!0,function t(s){const i=new XMLHttpRequest;i.open("POST",rt+"/v1/web/i",!1),i.setRequestHeader("Authorization","Bearer "+ot),i.onreadystatechange=function(){if(4===this.readyState){if(0==this.status)return;if(this.status>=400)return St(),gt.length=0,403===this.status?void self.postMessage("restart"):void self.postMessage(null);const s=gt.shift();s?t(s):pt=!1}},i.onerror=function(i){if(mt>=yt)return St(),void self.postMessage(null);mt++,setTimeout(()=>t(s),_t)},i.send(s.buffer)}(t)),dt=!0,lt()}function St(){rt="",ot="",clearInterval(st),et.reset()}self.onmessage=({data:t})=>{if(null!==t)return"stop"===t?(vt(),void St()):Array.isArray(t)?void t.forEach(t=>{const i=new(s.get(t._id));if(Object.assign(i,t),i instanceof n?ct=i.timestamp:i instanceof J&&(i.hidden?ft=setTimeout(()=>self.postMessage("restart"),3e5):clearTimeout(ft)),et.checkpoint(),!i.encode(et)&&(vt(),!i.encode(et)))for(;!i.encode(et);){if(nt===it)return console.warn("OpenReplay: beacon size overflow."),et.reset(),void lt();nt=Math.min(2*nt,it),et=new tt(nt),lt()}at++,dt=!1}):(rt=t.ingestPoint||rt,ot=t.token||ot,ht=t.pageNo||ht,ct=t.startTimestamp||ct,ut=t.timeAdjustment||ut,yt=t.connAttemptCount||yt,_t=t.connAttemptGap||_t,it=t.beaconSizeLimit||it,nt=Math.min(it,t.beaconSize||nt),et.isEmpty()&&lt(),void(null==st&&(st=setInterval(vt,2e4))));vt()};
46
+ this.worker = new Worker(URL.createObjectURL(new Blob([`"use strict";function t(t){function s(...s){return new t(...s)}return s.prototype=t.prototype,s}const s=new Map;const i=t(class{constructor(t,s,i){this.pageNo=t,this.firstIndex=s,this.timestamp=i,this._id=80}encode(t){return t.uint(80)&&t.uint(this.pageNo)&&t.uint(this.firstIndex)&&t.int(this.timestamp)}});s.set(80,i);const n=t(class{constructor(t){this.timestamp=t,this._id=0}encode(t){return t.uint(0)&&t.uint(this.timestamp)}});s.set(0,n);const e=t(class{constructor(t,s,i){this.url=t,this.referrer=s,this.navigationStart=i,this._id=4}encode(t){return t.uint(4)&&t.string(this.url)&&t.string(this.referrer)&&t.uint(this.navigationStart)}});s.set(4,e);const r=t(class{constructor(t,s){this.width=t,this.height=s,this._id=5}encode(t){return t.uint(5)&&t.uint(this.width)&&t.uint(this.height)}});s.set(5,r);const o=t(class{constructor(t,s){this.x=t,this.y=s,this._id=6}encode(t){return t.uint(6)&&t.int(this.x)&&t.int(this.y)}});s.set(6,o);const h=t(class{constructor(){this._id=7}encode(t){return t.uint(7)}});s.set(7,h);const c=t(class{constructor(t,s,i,n,e){this.id=t,this.parentID=s,this.index=i,this.tag=n,this.svg=e,this._id=8}encode(t){return t.uint(8)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)&&t.string(this.tag)&&t.boolean(this.svg)}});s.set(8,c);const u=t(class{constructor(t,s,i){this.id=t,this.parentID=s,this.index=i,this._id=9}encode(t){return t.uint(9)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)}});s.set(9,u);const a=t(class{constructor(t,s,i){this.id=t,this.parentID=s,this.index=i,this._id=10}encode(t){return t.uint(10)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)}});s.set(10,a);const d=t(class{constructor(t){this.id=t,this._id=11}encode(t){return t.uint(11)&&t.uint(this.id)}});s.set(11,d);const l=t(class{constructor(t,s,i){this.id=t,this.name=s,this.value=i,this._id=12}encode(t){return t.uint(12)&&t.uint(this.id)&&t.string(this.name)&&t.string(this.value)}});s.set(12,l);const g=t(class{constructor(t,s){this.id=t,this.name=s,this._id=13}encode(t){return t.uint(13)&&t.uint(this.id)&&t.string(this.name)}});s.set(13,g);const f=t(class{constructor(t,s){this.id=t,this.data=s,this._id=14}encode(t){return t.uint(14)&&t.uint(this.id)&&t.string(this.data)}});s.set(14,f);const p=t(class{constructor(t,s,i){this.id=t,this.x=s,this.y=i,this._id=16}encode(t){return t.uint(16)&&t.uint(this.id)&&t.int(this.x)&&t.int(this.y)}});s.set(16,p);const m=t(class{constructor(t,s){this.id=t,this.label=s,this._id=17}encode(t){return t.uint(17)&&t.uint(this.id)&&t.string(this.label)}});s.set(17,m);const _=t(class{constructor(t,s,i){this.id=t,this.value=s,this.mask=i,this._id=18}encode(t){return t.uint(18)&&t.uint(this.id)&&t.string(this.value)&&t.int(this.mask)}});s.set(18,_);const y=t(class{constructor(t,s){this.id=t,this.checked=s,this._id=19}encode(t){return t.uint(19)&&t.uint(this.id)&&t.boolean(this.checked)}});s.set(19,y);const v=t(class{constructor(t,s){this.x=t,this.y=s,this._id=20}encode(t){return t.uint(20)&&t.uint(this.x)&&t.uint(this.y)}});s.set(20,v);const S=t(class{constructor(t,s){this.level=t,this.value=s,this._id=22}encode(t){return t.uint(22)&&t.string(this.level)&&t.string(this.value)}});s.set(22,S);const b=t(class{constructor(t,s,i,n,e,r,o,h,c){this.requestStart=t,this.responseStart=s,this.responseEnd=i,this.domContentLoadedEventStart=n,this.domContentLoadedEventEnd=e,this.loadEventStart=r,this.loadEventEnd=o,this.firstPaint=h,this.firstContentfulPaint=c,this._id=23}encode(t){return t.uint(23)&&t.uint(this.requestStart)&&t.uint(this.responseStart)&&t.uint(this.responseEnd)&&t.uint(this.domContentLoadedEventStart)&&t.uint(this.domContentLoadedEventEnd)&&t.uint(this.loadEventStart)&&t.uint(this.loadEventEnd)&&t.uint(this.firstPaint)&&t.uint(this.firstContentfulPaint)}});s.set(23,b);const x=t(class{constructor(t,s,i){this.speedIndex=t,this.visuallyComplete=s,this.timeToInteractive=i,this._id=24}encode(t){return t.uint(24)&&t.uint(this.speedIndex)&&t.uint(this.visuallyComplete)&&t.uint(this.timeToInteractive)}});s.set(24,x);const E=t(class{constructor(t,s,i){this.name=t,this.message=s,this.payload=i,this._id=25}encode(t){return t.uint(25)&&t.string(this.name)&&t.string(this.message)&&t.string(this.payload)}});s.set(25,E);const k=t(class{constructor(t,s){this.name=t,this.payload=s,this._id=27}encode(t){return t.uint(27)&&t.string(this.name)&&t.string(this.payload)}});s.set(27,k);const I=t(class{constructor(t){this.id=t,this._id=28}encode(t){return t.uint(28)&&t.string(this.id)}});s.set(28,I);const z=t(class{constructor(t){this.id=t,this._id=29}encode(t){return t.uint(29)&&t.string(this.id)}});s.set(29,z);const w=t(class{constructor(t,s){this.key=t,this.value=s,this._id=30}encode(t){return t.uint(30)&&t.string(this.key)&&t.string(this.value)}});s.set(30,w);const T=t(class{constructor(t,s,i){this.id=t,this.rule=s,this.index=i,this._id=37}encode(t){return t.uint(37)&&t.uint(this.id)&&t.string(this.rule)&&t.uint(this.index)}});s.set(37,T);const L=t(class{constructor(t,s){this.id=t,this.index=s,this._id=38}encode(t){return t.uint(38)&&t.uint(this.id)&&t.uint(this.index)}});s.set(38,L);const A=t(class{constructor(t,s,i,n,e,r,o){this.method=t,this.url=s,this.request=i,this.response=n,this.status=e,this.timestamp=r,this.duration=o,this._id=39}encode(t){return t.uint(39)&&t.string(this.method)&&t.string(this.url)&&t.string(this.request)&&t.string(this.response)&&t.uint(this.status)&&t.uint(this.timestamp)&&t.uint(this.duration)}});s.set(39,A);const C=t(class{constructor(t,s,i,n){this.name=t,this.duration=s,this.args=i,this.result=n,this._id=40}encode(t){return t.uint(40)&&t.string(this.name)&&t.uint(this.duration)&&t.string(this.args)&&t.string(this.result)}});s.set(40,C);const M=t(class{constructor(t,s){this.key=t,this.value=s,this._id=41}encode(t){return t.uint(41)&&t.string(this.key)&&t.string(this.value)}});s.set(41,M);const R=t(class{constructor(t){this.type=t,this._id=42}encode(t){return t.uint(42)&&t.string(this.type)}});s.set(42,R);const N=t(class{constructor(t,s,i){this.action=t,this.state=s,this.duration=i,this._id=44}encode(t){return t.uint(44)&&t.string(this.action)&&t.string(this.state)&&t.uint(this.duration)}});s.set(44,N);const D=t(class{constructor(t,s){this.mutation=t,this.state=s,this._id=45}encode(t){return t.uint(45)&&t.string(this.mutation)&&t.string(this.state)}});s.set(45,D);const U=t(class{constructor(t,s){this.type=t,this.payload=s,this._id=46}encode(t){return t.uint(46)&&t.string(this.type)&&t.string(this.payload)}});s.set(46,U);const O=t(class{constructor(t,s,i){this.action=t,this.state=s,this.duration=i,this._id=47}encode(t){return t.uint(47)&&t.string(this.action)&&t.string(this.state)&&t.uint(this.duration)}});s.set(47,O);const q=t(class{constructor(t,s,i,n){this.operationKind=t,this.operationName=s,this.variables=i,this.response=n,this._id=48}encode(t){return t.uint(48)&&t.string(this.operationKind)&&t.string(this.operationName)&&t.string(this.variables)&&t.string(this.response)}});s.set(48,q);const H=t(class{constructor(t,s,i,n){this.frames=t,this.ticks=s,this.totalJSHeapSize=i,this.usedJSHeapSize=n,this._id=49}encode(t){return t.uint(49)&&t.int(this.frames)&&t.int(this.ticks)&&t.uint(this.totalJSHeapSize)&&t.uint(this.usedJSHeapSize)}});s.set(49,H);const P=t(class{constructor(t,s,i,n,e,r,o,h){this.timestamp=t,this.duration=s,this.ttfb=i,this.headerSize=n,this.encodedBodySize=e,this.decodedBodySize=r,this.url=o,this.initiator=h,this._id=53}encode(t){return t.uint(53)&&t.uint(this.timestamp)&&t.uint(this.duration)&&t.uint(this.ttfb)&&t.uint(this.headerSize)&&t.uint(this.encodedBodySize)&&t.uint(this.decodedBodySize)&&t.string(this.url)&&t.string(this.initiator)}});s.set(53,P);const B=t(class{constructor(t,s){this.downlink=t,this.type=s,this._id=54}encode(t){return t.uint(54)&&t.uint(this.downlink)&&t.string(this.type)}});s.set(54,B);const J=t(class{constructor(t){this.hidden=t,this._id=55}encode(t){return t.uint(55)&&t.boolean(this.hidden)}});s.set(55,J);const j=t(class{constructor(t,s,i,n,e,r,o){this.timestamp=t,this.duration=s,this.context=i,this.containerType=n,this.containerSrc=e,this.containerId=r,this.containerName=o,this._id=59}encode(t){return t.uint(59)&&t.uint(this.timestamp)&&t.uint(this.duration)&&t.uint(this.context)&&t.uint(this.containerType)&&t.string(this.containerSrc)&&t.string(this.containerId)&&t.string(this.containerName)}});s.set(59,j);const G=t(class{constructor(t,s,i,n){this.id=t,this.name=s,this.value=i,this.baseURL=n,this._id=60}encode(t){return t.uint(60)&&t.uint(this.id)&&t.string(this.name)&&t.string(this.value)&&t.string(this.baseURL)}});s.set(60,G);const K=t(class{constructor(t,s,i){this.id=t,this.data=s,this.baseURL=i,this._id=61}encode(t){return t.uint(61)&&t.uint(this.id)&&t.string(this.data)&&t.string(this.baseURL)}});s.set(61,K);const X=t(class{constructor(t,s){this.type=t,this.value=s,this._id=63}encode(t){return t.uint(63)&&t.string(this.type)&&t.string(this.value)}});s.set(63,X);const F=t(class{constructor(t,s){this.name=t,this.payload=s,this._id=64}encode(t){return t.uint(64)&&t.string(this.name)&&t.string(this.payload)}});s.set(64,F);const Q=t(class{constructor(){this._id=65}encode(t){return t.uint(65)}});s.set(65,Q);const V=t(class{constructor(t,s,i,n){this.id=t,this.rule=s,this.index=i,this.baseURL=n,this._id=67}encode(t){return t.uint(67)&&t.uint(this.id)&&t.string(this.rule)&&t.uint(this.index)&&t.string(this.baseURL)}});s.set(67,V);const W=t(class{constructor(t,s,i,n){this.id=t,this.hesitationTime=s,this.label=i,this.selector=n,this._id=69}encode(t){return t.uint(69)&&t.uint(this.id)&&t.uint(this.hesitationTime)&&t.string(this.label)&&t.string(this.selector)}});s.set(69,W);const Y=t(class{constructor(t,s){this.frameID=t,this.id=s,this._id=70}encode(t){return t.uint(70)&&t.uint(this.frameID)&&t.uint(this.id)}});s.set(70,Y);const Z="function"==typeof TextEncoder?new TextEncoder:{encode(t){const s=t.length,i=new Uint8Array(3*s);let n=-1;for(var e=0,r=0,o=0;o!==s;){if(e=t.charCodeAt(o),o+=1,e>=55296&&e<=56319){if(o===s){i[n+=1]=239,i[n+=1]=191,i[n+=1]=189;break}if(!((r=t.charCodeAt(o))>=56320&&r<=57343)){i[n+=1]=239,i[n+=1]=191,i[n+=1]=189;continue}if(o+=1,(e=1024*(e-55296)+r-56320+65536)>65535){i[n+=1]=240|e>>>18,i[n+=1]=128|e>>>12&63,i[n+=1]=128|e>>>6&63,i[n+=1]=128|63&e;continue}}e<=127?i[n+=1]=0|e:e<=2047?(i[n+=1]=192|e>>>6,i[n+=1]=128|63&e):(i[n+=1]=224|e>>>12,i[n+=1]=128|e>>>6&63,i[n+=1]=128|63&e)}return i.subarray(0,n+1)}};class tt{constructor(t){this.size=t,this.offset=0,this.checkpointOffset=0,this.data=new Uint8Array(t)}checkpoint(){this.checkpointOffset=this.offset}isEmpty(){return 0===this.offset}boolean(t){return this.data[this.offset++]=+t,this.offset<=this.size}uint(t){for((t<0||t>Number.MAX_SAFE_INTEGER)&&(t=0);t>=128;)this.data[this.offset++]=t%256|128,t=Math.floor(t/128);return this.data[this.offset++]=t,this.offset<=this.size}int(t){return t=Math.round(t),this.uint(t>=0?2*t:-2*t-1)}string(t){const s=Z.encode(t),i=s.byteLength;return!(!this.uint(i)||this.offset+i>this.size)&&(this.data.set(s,this.offset),this.offset+=i,!0)}reset(){this.offset=0,this.checkpointOffset=0}flush(){const t=this.data.slice(0,this.checkpointOffset);return this.reset(),t}}let st,it=1e6,nt=4e5,et=new tt(nt),rt="",ot="",ht=0,ct=0,ut=0,at=0,dt=!0;function lt(){return new i(ht,at,ct).encode(et)}const gt=[];let ft,pt=!1,mt=0,_t=8e3,yt=10;function vt(){if(dt||""===ot||""===rt)return;const t=et.flush();pt?gt.push(t):(pt=!0,function t(s){const i=new XMLHttpRequest;i.open("POST",rt+"/v1/web/i",!1),i.setRequestHeader("Authorization","Bearer "+ot),i.onreadystatechange=function(){if(4===this.readyState){if(0==this.status)return;if(this.status>=400)return St(),gt.length=0,401===this.status?void self.postMessage("restart"):void self.postMessage(null);const s=gt.shift();s?t(s):pt=!1}},i.onerror=function(i){if(mt>=yt)return St(),void self.postMessage(null);mt++,setTimeout(()=>t(s),_t)},i.send(s.buffer)}(t)),dt=!0,lt()}function St(){rt="",ot="",clearInterval(st),et.reset()}self.onmessage=({data:t})=>{if(null!==t)return"stop"===t?(vt(),void St()):Array.isArray(t)?void t.forEach(t=>{const i=new(s.get(t._id));if(Object.assign(i,t),i instanceof n?ct=i.timestamp:i instanceof J&&(i.hidden?ft=setTimeout(()=>self.postMessage("restart"),3e5):clearTimeout(ft)),et.checkpoint(),!i.encode(et)&&(vt(),!i.encode(et)))for(;!i.encode(et);){if(nt===it)return console.warn("OpenReplay: beacon size overflow."),et.reset(),void lt();nt=Math.min(2*nt,it),et=new tt(nt),lt()}at++,dt=!1}):(rt=t.ingestPoint||rt,ot=t.token||ot,ht=t.pageNo||ht,ct=t.startTimestamp||ct,ut=t.timeAdjustment||ut,yt=t.connAttemptCount||yt,_t=t.connAttemptGap||_t,it=t.beaconSizeLimit||it,nt=Math.min(it,t.beaconSize||nt),et.isEmpty()&&lt(),void(null==st&&(st=setInterval(vt,2e4))));vt()};
46
47
  `], { type: 'text/javascript' })));
47
- // this.worker.onerror = e => {
48
- // this.send(new TechnicalInfo("webworker_error", JSON.stringify(e)));
49
- // /* TODO: send report */
50
- // }
48
+ this.worker.onerror = e => {
49
+ this._debug("webworker_error", e);
50
+ };
51
51
  let lastTs = utils_1.timestamp();
52
52
  let fileno = 0;
53
53
  this.worker.onmessage = ({ data }) => {
@@ -64,16 +64,17 @@ class App {
64
64
  this.worker.postMessage(null);
65
65
  }
66
66
  };
67
+ // TODO:on start
67
68
  // TODO: keep better tactics, discard others (look https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)
68
69
  this.attachEventListener(window, 'beforeunload', alertWorker, false);
69
70
  this.attachEventListener(document, 'mouseleave', alertWorker, false, false);
70
71
  this.attachEventListener(document, 'visibilitychange', alertWorker, false);
71
72
  }
72
73
  catch (e) {
73
- this.sendDebugReport("worker_start", e);
74
+ this._debug("worker_start", e);
74
75
  }
75
76
  }
76
- sendDebugReport(context, e) {
77
+ _debug(context, e) {
77
78
  if (this.options.__debug_report_edp !== null) {
78
79
  fetch(this.options.__debug_report_edp, {
79
80
  method: 'POST',
@@ -84,6 +85,9 @@ class App {
84
85
  })
85
86
  });
86
87
  }
88
+ if (this.options.__debug_log) {
89
+ utils_1.warn("OpenReplay errror: ", context, e);
90
+ }
87
91
  }
88
92
  send(message, urgent = false) {
89
93
  if (!this.isActive) {
@@ -112,12 +116,11 @@ class App {
112
116
  fn.apply(this, args);
113
117
  }
114
118
  catch (e) {
115
- app.send(new messages_1.TechnicalInfo("error", JSON.stringify({
116
- time: utils_1.timestamp(),
117
- name: e.name,
118
- message: e.message,
119
- stack: e.stack
120
- })));
119
+ this._debug("safe_fn_call", e);
120
+ // time: timestamp(),
121
+ // name: e.name,
122
+ // message: e.message,
123
+ // stack: e.stack
121
124
  }
122
125
  }; // TODO: correct typing
123
126
  }
@@ -151,15 +154,24 @@ class App {
151
154
  }
152
155
  getBaseHref() {
153
156
  var _a, _b;
154
- if (this.options.resourceBaseHref) {
157
+ if (typeof this.options.resourceBaseHref === 'string') {
155
158
  return this.options.resourceBaseHref;
156
159
  }
160
+ else if (typeof this.options.resourceBaseHref === 'object') {
161
+ //switch between types
162
+ }
157
163
  if (document.baseURI) {
158
164
  return document.baseURI;
159
165
  }
160
166
  // IE only
161
167
  return ((_b = (_a = document.head) === null || _a === void 0 ? void 0 : _a.getElementsByTagName("base")[0]) === null || _b === void 0 ? void 0 : _b.getAttribute("href")) || location.origin + location.pathname;
162
168
  }
169
+ resolveResourceURL(resourceURL) {
170
+ const base = new URL(this.getBaseHref());
171
+ base.pathname += "/" + new URL(resourceURL).pathname;
172
+ base.pathname.replace(/\/+/g, "/");
173
+ return base.toString();
174
+ }
163
175
  isServiceURL(url) {
164
176
  return url.startsWith(this.options.ingestPoint);
165
177
  }
@@ -245,7 +257,7 @@ class App {
245
257
  .catch(e => {
246
258
  this.stop();
247
259
  utils_1.warn("OpenReplay was unable to start. ", e);
248
- this.sendDebugReport("session_start", e);
260
+ this._debug("session_start", e);
249
261
  throw e;
250
262
  });
251
263
  }
package/cjs/index.js CHANGED
@@ -23,13 +23,13 @@ const utils_1 = require("./utils");
23
23
  const DOCS_SETUP = '/installation/setup-or';
24
24
  function processOptions(obj) {
25
25
  if (obj == null) {
26
- console.error(`OpenReplay: invalid options argument type. Please, check documentation on https://docs.openreplay.com${DOCS_SETUP}`);
26
+ console.error(`OpenReplay: invalid options argument type. Please, check documentation on ${utils_1.DOCS_HOST}${DOCS_SETUP}`);
27
27
  return false;
28
28
  }
29
29
  if (typeof obj.projectKey !== 'string') {
30
30
  if (typeof obj.projectKey !== 'number') {
31
31
  if (typeof obj.projectID !== 'number') { // Back compatability
32
- console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check https://docs.openreplay.com${DOCS_SETUP} for more information.`);
32
+ console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check ${utils_1.DOCS_HOST}${DOCS_SETUP} for more information.`);
33
33
  return false;
34
34
  }
35
35
  else {
@@ -43,7 +43,7 @@ function processOptions(obj) {
43
43
  }
44
44
  }
45
45
  if (typeof obj.sessionToken !== 'string' && obj.sessionToken != null) {
46
- console.warn(`OpenReplay: invalid options argument type. Please, check documentation on https://docs.openreplay.com${DOCS_SETUP}`);
46
+ console.warn(`OpenReplay: invalid options argument type. Please, check documentation on ${utils_1.DOCS_HOST}${DOCS_SETUP}`);
47
47
  }
48
48
  return true;
49
49
  }
@@ -69,6 +69,10 @@ class API {
69
69
  if (!utils_1.IN_BROWSER || !processOptions(options)) {
70
70
  return;
71
71
  }
72
+ if (window.__OPENREPLAY__) {
73
+ console.error("OpenReplay: one tracker instance has been initialised already");
74
+ return;
75
+ }
72
76
  if (!options.__DISABLE_SECURE_MODE && location.protocol !== 'https:') {
73
77
  console.error("OpenReplay: Your website must be publicly accessible and running on SSL in order for OpenReplay to properly capture and replay the user session. You can disable this check by setting `__DISABLE_SECURE_MODE` option to `true` if you are testing in localhost. Keep in mind, that asset files on a local machine are not available to the outside world. This might affect tracking if you use css files.");
74
78
  return;
@@ -98,17 +102,17 @@ class API {
98
102
  performance_1.default(this.app, options);
99
103
  scroll_1.default(this.app);
100
104
  longtasks_1.default(this.app);
101
- window.__OPENREPLAY__ = window.__OPENREPLAY__ || this;
105
+ window.__OPENREPLAY__ = this;
102
106
  }
103
107
  else {
104
- console.log("OpenReplay: browser doesn't support API required for tracking.");
108
+ console.log("OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1.");
105
109
  const req = new XMLHttpRequest();
106
110
  const orig = options.ingestPoint || app_1.DEFAULT_INGEST_POINT;
107
111
  req.open("POST", orig + "/v1/web/not-started");
108
112
  // no-cors issue only with text/plain or not-set Content-Type
109
113
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
110
114
  req.send(JSON.stringify({
111
- trackerVersion: '3.4.0',
115
+ trackerVersion: '3.4.1',
112
116
  projectKey: options.projectKey,
113
117
  doNotTrack,
114
118
  // TODO: add precise reason (an exact API missing)
@@ -130,7 +134,7 @@ class API {
130
134
  }
131
135
  start() {
132
136
  if (!utils_1.IN_BROWSER) {
133
- console.error(`OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the \`tracker.start()\` line. Check documentation on https://docs.openreplay.com${DOCS_SETUP}`);
137
+ console.error(`OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the \`tracker.start()\` line. Check documentation on ${utils_1.DOCS_HOST}${DOCS_SETUP}`);
134
138
  return;
135
139
  }
136
140
  if (this.app === null) {
@@ -2,6 +2,7 @@ export interface Options {
2
2
  connAttemptCount?: number;
3
3
  connAttemptGap?: number;
4
4
  beaconSize?: number;
5
+ __debug_log?: boolean;
5
6
  }
6
7
  declare type Settings = {
7
8
  ingestPoint?: string;
@@ -78,6 +78,9 @@ class Writer {
78
78
  return this.offset <= this.size;
79
79
  }
80
80
  uint(value) {
81
+ if (value < 0 || value > Number.MAX_SAFE_INTEGER) {
82
+ value = 0;
83
+ }
81
84
  while (value >= 0x80) {
82
85
  this.data[this.offset++] = value % 0x100 | 0x80;
83
86
  value = Math.floor(value / 128);
@@ -101,7 +101,7 @@ function default_1(app, opts) {
101
101
  app.ticker.attach(reset, 33, false);
102
102
  options.consoleMethods.forEach((method) => {
103
103
  if (consoleMethods.indexOf(method) === -1) {
104
- console.error(`Asayer: unsupported console method ${method}`);
104
+ console.error(`OpenReplay: unsupported console method "${method}"`);
105
105
  return;
106
106
  }
107
107
  const fn = console[method];
package/cjs/utils.d.ts CHANGED
@@ -11,6 +11,7 @@ export declare const warn: {
11
11
  (...data: any[]): void;
12
12
  (message?: any, ...optionalParams: any[]): void;
13
13
  };
14
+ export declare const DOCS_HOST = "https://docs.openreplay.com";
14
15
  export declare function deprecationWarn(nameOfFeature: string, useInstead: string, docsPath?: string): void;
15
16
  export declare function getLabelAttribute(e: Element): string | null;
16
17
  export declare function hasOpenreplayAttribute(e: Element, name: string): boolean;
package/cjs/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hasOpenreplayAttribute = exports.getLabelAttribute = exports.deprecationWarn = exports.warn = exports.log = exports.IN_BROWSER = exports.isURL = exports.normSpaces = exports.stars = exports.timestamp = void 0;
3
+ exports.hasOpenreplayAttribute = exports.getLabelAttribute = exports.deprecationWarn = exports.DOCS_HOST = exports.warn = exports.log = exports.IN_BROWSER = exports.isURL = exports.normSpaces = exports.stars = exports.timestamp = void 0;
4
4
  function timestamp() {
5
5
  return Math.round(performance.now()) + performance.timing.navigationStart;
6
6
  }
@@ -20,13 +20,13 @@ exports.isURL = isURL;
20
20
  exports.IN_BROWSER = !(typeof window === "undefined");
21
21
  exports.log = console.log;
22
22
  exports.warn = console.warn;
23
- const DOCS_HOST = 'https://docs.openreplay.com';
23
+ exports.DOCS_HOST = 'https://docs.openreplay.com';
24
24
  const warnedFeatures = {};
25
25
  function deprecationWarn(nameOfFeature, useInstead, docsPath = "/") {
26
26
  if (warnedFeatures[nameOfFeature]) {
27
27
  return;
28
28
  }
29
- exports.warn(`OpenReplay: ${nameOfFeature} is deprecated. ${useInstead ? `Please, use ${useInstead} instead.` : ""} Visit ${DOCS_HOST}${docsPath} for more information.`);
29
+ exports.warn(`OpenReplay: ${nameOfFeature} is deprecated. ${useInstead ? `Please, use ${useInstead} instead.` : ""} Visit ${exports.DOCS_HOST}${docsPath} for more information.`);
30
30
  warnedFeatures[nameOfFeature] = true;
31
31
  }
32
32
  exports.deprecationWarn = deprecationWarn;
@@ -15,9 +15,10 @@ export declare type Options = {
15
15
  session_pageno_key: string;
16
16
  local_uuid_key: string;
17
17
  ingestPoint: string;
18
- resourceBaseHref: string;
18
+ resourceBaseHref: string | null;
19
19
  __is_snippet: boolean;
20
20
  __debug_report_edp: string | null;
21
+ __debug_log: boolean;
21
22
  onStart?: (info: OnStartInfo) => void;
22
23
  } & ObserverOptions & WebworkerOptions;
23
24
  declare type Callback = () => void;
@@ -39,7 +40,7 @@ export default class App {
39
40
  private version;
40
41
  private readonly worker?;
41
42
  constructor(projectKey: string, sessionToken: string | null | undefined, opts: Partial<Options>);
42
- private sendDebugReport;
43
+ private _debug;
43
44
  send(message: Message, urgent?: boolean): void;
44
45
  private commit;
45
46
  addCommitCallback(cb: CommitCallback): void;
@@ -52,6 +53,7 @@ export default class App {
52
53
  getHost(): string;
53
54
  getProjectKey(): string;
54
55
  getBaseHref(): string;
56
+ resolveResourceURL(resourceURL: string): string;
55
57
  isServiceURL(url: string): boolean;
56
58
  active(): boolean;
57
59
  private _start;
package/lib/app/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { timestamp, log, warn } from '../utils';
2
- import { Timestamp, TechnicalInfo } from '../messages';
2
+ import { Timestamp } from '../messages';
3
3
  import Nodes from './nodes';
4
4
  import Observer from './observer';
5
5
  import Ticker from './ticker';
@@ -14,7 +14,7 @@ export default class App {
14
14
  this.commitCallbacks = [];
15
15
  this._sessionID = null;
16
16
  this.isActive = false;
17
- this.version = '3.4.0';
17
+ this.version = '3.4.1';
18
18
  this.projectKey = projectKey;
19
19
  this.options = Object.assign({
20
20
  revID: '',
@@ -23,9 +23,10 @@ export default class App {
23
23
  session_pageno_key: '__openreplay_pageno',
24
24
  local_uuid_key: '__openreplay_uuid',
25
25
  ingestPoint: DEFAULT_INGEST_POINT,
26
- resourceBaseHref: '',
26
+ resourceBaseHref: null,
27
27
  __is_snippet: false,
28
28
  __debug_report_edp: null,
29
+ __debug_log: false,
29
30
  obscureTextEmails: true,
30
31
  obscureTextNumbers: false,
31
32
  captureIFrames: false,
@@ -39,12 +40,11 @@ export default class App {
39
40
  this.ticker = new Ticker(this);
40
41
  this.ticker.attach(() => this.commit());
41
42
  try {
42
- this.worker = new Worker(URL.createObjectURL(new Blob([`"use strict";function t(t){function s(...s){return new t(...s)}return s.prototype=t.prototype,s}const s=new Map;const i=t(class{constructor(t,s,i){this.pageNo=t,this.firstIndex=s,this.timestamp=i,this._id=80}encode(t){return t.uint(80)&&t.uint(this.pageNo)&&t.uint(this.firstIndex)&&t.int(this.timestamp)}});s.set(80,i);const n=t(class{constructor(t){this.timestamp=t,this._id=0}encode(t){return t.uint(0)&&t.uint(this.timestamp)}});s.set(0,n);const e=t(class{constructor(t,s,i){this.url=t,this.referrer=s,this.navigationStart=i,this._id=4}encode(t){return t.uint(4)&&t.string(this.url)&&t.string(this.referrer)&&t.uint(this.navigationStart)}});s.set(4,e);const r=t(class{constructor(t,s){this.width=t,this.height=s,this._id=5}encode(t){return t.uint(5)&&t.uint(this.width)&&t.uint(this.height)}});s.set(5,r);const o=t(class{constructor(t,s){this.x=t,this.y=s,this._id=6}encode(t){return t.uint(6)&&t.int(this.x)&&t.int(this.y)}});s.set(6,o);const h=t(class{constructor(){this._id=7}encode(t){return t.uint(7)}});s.set(7,h);const c=t(class{constructor(t,s,i,n,e){this.id=t,this.parentID=s,this.index=i,this.tag=n,this.svg=e,this._id=8}encode(t){return t.uint(8)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)&&t.string(this.tag)&&t.boolean(this.svg)}});s.set(8,c);const u=t(class{constructor(t,s,i){this.id=t,this.parentID=s,this.index=i,this._id=9}encode(t){return t.uint(9)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)}});s.set(9,u);const a=t(class{constructor(t,s,i){this.id=t,this.parentID=s,this.index=i,this._id=10}encode(t){return t.uint(10)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)}});s.set(10,a);const d=t(class{constructor(t){this.id=t,this._id=11}encode(t){return t.uint(11)&&t.uint(this.id)}});s.set(11,d);const l=t(class{constructor(t,s,i){this.id=t,this.name=s,this.value=i,this._id=12}encode(t){return t.uint(12)&&t.uint(this.id)&&t.string(this.name)&&t.string(this.value)}});s.set(12,l);const g=t(class{constructor(t,s){this.id=t,this.name=s,this._id=13}encode(t){return t.uint(13)&&t.uint(this.id)&&t.string(this.name)}});s.set(13,g);const f=t(class{constructor(t,s){this.id=t,this.data=s,this._id=14}encode(t){return t.uint(14)&&t.uint(this.id)&&t.string(this.data)}});s.set(14,f);const p=t(class{constructor(t,s,i){this.id=t,this.x=s,this.y=i,this._id=16}encode(t){return t.uint(16)&&t.uint(this.id)&&t.int(this.x)&&t.int(this.y)}});s.set(16,p);const m=t(class{constructor(t,s){this.id=t,this.label=s,this._id=17}encode(t){return t.uint(17)&&t.uint(this.id)&&t.string(this.label)}});s.set(17,m);const _=t(class{constructor(t,s,i){this.id=t,this.value=s,this.mask=i,this._id=18}encode(t){return t.uint(18)&&t.uint(this.id)&&t.string(this.value)&&t.int(this.mask)}});s.set(18,_);const y=t(class{constructor(t,s){this.id=t,this.checked=s,this._id=19}encode(t){return t.uint(19)&&t.uint(this.id)&&t.boolean(this.checked)}});s.set(19,y);const v=t(class{constructor(t,s){this.x=t,this.y=s,this._id=20}encode(t){return t.uint(20)&&t.uint(this.x)&&t.uint(this.y)}});s.set(20,v);const S=t(class{constructor(t,s){this.level=t,this.value=s,this._id=22}encode(t){return t.uint(22)&&t.string(this.level)&&t.string(this.value)}});s.set(22,S);const b=t(class{constructor(t,s,i,n,e,r,o,h,c){this.requestStart=t,this.responseStart=s,this.responseEnd=i,this.domContentLoadedEventStart=n,this.domContentLoadedEventEnd=e,this.loadEventStart=r,this.loadEventEnd=o,this.firstPaint=h,this.firstContentfulPaint=c,this._id=23}encode(t){return t.uint(23)&&t.uint(this.requestStart)&&t.uint(this.responseStart)&&t.uint(this.responseEnd)&&t.uint(this.domContentLoadedEventStart)&&t.uint(this.domContentLoadedEventEnd)&&t.uint(this.loadEventStart)&&t.uint(this.loadEventEnd)&&t.uint(this.firstPaint)&&t.uint(this.firstContentfulPaint)}});s.set(23,b);const x=t(class{constructor(t,s,i){this.speedIndex=t,this.visuallyComplete=s,this.timeToInteractive=i,this._id=24}encode(t){return t.uint(24)&&t.uint(this.speedIndex)&&t.uint(this.visuallyComplete)&&t.uint(this.timeToInteractive)}});s.set(24,x);const k=t(class{constructor(t,s,i){this.name=t,this.message=s,this.payload=i,this._id=25}encode(t){return t.uint(25)&&t.string(this.name)&&t.string(this.message)&&t.string(this.payload)}});s.set(25,k);const E=t(class{constructor(t,s){this.name=t,this.payload=s,this._id=27}encode(t){return t.uint(27)&&t.string(this.name)&&t.string(this.payload)}});s.set(27,E);const z=t(class{constructor(t){this.id=t,this._id=28}encode(t){return t.uint(28)&&t.string(this.id)}});s.set(28,z);const I=t(class{constructor(t){this.id=t,this._id=29}encode(t){return t.uint(29)&&t.string(this.id)}});s.set(29,I);const w=t(class{constructor(t,s){this.key=t,this.value=s,this._id=30}encode(t){return t.uint(30)&&t.string(this.key)&&t.string(this.value)}});s.set(30,w);const L=t(class{constructor(t,s,i){this.id=t,this.rule=s,this.index=i,this._id=37}encode(t){return t.uint(37)&&t.uint(this.id)&&t.string(this.rule)&&t.uint(this.index)}});s.set(37,L);const T=t(class{constructor(t,s){this.id=t,this.index=s,this._id=38}encode(t){return t.uint(38)&&t.uint(this.id)&&t.uint(this.index)}});s.set(38,T);const C=t(class{constructor(t,s,i,n,e,r,o){this.method=t,this.url=s,this.request=i,this.response=n,this.status=e,this.timestamp=r,this.duration=o,this._id=39}encode(t){return t.uint(39)&&t.string(this.method)&&t.string(this.url)&&t.string(this.request)&&t.string(this.response)&&t.uint(this.status)&&t.uint(this.timestamp)&&t.uint(this.duration)}});s.set(39,C);const A=t(class{constructor(t,s,i,n){this.name=t,this.duration=s,this.args=i,this.result=n,this._id=40}encode(t){return t.uint(40)&&t.string(this.name)&&t.uint(this.duration)&&t.string(this.args)&&t.string(this.result)}});s.set(40,A);const M=t(class{constructor(t,s){this.key=t,this.value=s,this._id=41}encode(t){return t.uint(41)&&t.string(this.key)&&t.string(this.value)}});s.set(41,M);const R=t(class{constructor(t){this.type=t,this._id=42}encode(t){return t.uint(42)&&t.string(this.type)}});s.set(42,R);const D=t(class{constructor(t,s,i){this.action=t,this.state=s,this.duration=i,this._id=44}encode(t){return t.uint(44)&&t.string(this.action)&&t.string(this.state)&&t.uint(this.duration)}});s.set(44,D);const U=t(class{constructor(t,s){this.mutation=t,this.state=s,this._id=45}encode(t){return t.uint(45)&&t.string(this.mutation)&&t.string(this.state)}});s.set(45,U);const N=t(class{constructor(t,s){this.type=t,this.payload=s,this._id=46}encode(t){return t.uint(46)&&t.string(this.type)&&t.string(this.payload)}});s.set(46,N);const O=t(class{constructor(t,s,i){this.action=t,this.state=s,this.duration=i,this._id=47}encode(t){return t.uint(47)&&t.string(this.action)&&t.string(this.state)&&t.uint(this.duration)}});s.set(47,O);const q=t(class{constructor(t,s,i,n){this.operationKind=t,this.operationName=s,this.variables=i,this.response=n,this._id=48}encode(t){return t.uint(48)&&t.string(this.operationKind)&&t.string(this.operationName)&&t.string(this.variables)&&t.string(this.response)}});s.set(48,q);const H=t(class{constructor(t,s,i,n){this.frames=t,this.ticks=s,this.totalJSHeapSize=i,this.usedJSHeapSize=n,this._id=49}encode(t){return t.uint(49)&&t.int(this.frames)&&t.int(this.ticks)&&t.uint(this.totalJSHeapSize)&&t.uint(this.usedJSHeapSize)}});s.set(49,H);const P=t(class{constructor(t,s,i,n,e,r,o,h){this.timestamp=t,this.duration=s,this.ttfb=i,this.headerSize=n,this.encodedBodySize=e,this.decodedBodySize=r,this.url=o,this.initiator=h,this._id=53}encode(t){return t.uint(53)&&t.uint(this.timestamp)&&t.uint(this.duration)&&t.uint(this.ttfb)&&t.uint(this.headerSize)&&t.uint(this.encodedBodySize)&&t.uint(this.decodedBodySize)&&t.string(this.url)&&t.string(this.initiator)}});s.set(53,P);const B=t(class{constructor(t,s){this.downlink=t,this.type=s,this._id=54}encode(t){return t.uint(54)&&t.uint(this.downlink)&&t.string(this.type)}});s.set(54,B);const J=t(class{constructor(t){this.hidden=t,this._id=55}encode(t){return t.uint(55)&&t.boolean(this.hidden)}});s.set(55,J);const j=t(class{constructor(t,s,i,n,e,r,o){this.timestamp=t,this.duration=s,this.context=i,this.containerType=n,this.containerSrc=e,this.containerId=r,this.containerName=o,this._id=59}encode(t){return t.uint(59)&&t.uint(this.timestamp)&&t.uint(this.duration)&&t.uint(this.context)&&t.uint(this.containerType)&&t.string(this.containerSrc)&&t.string(this.containerId)&&t.string(this.containerName)}});s.set(59,j);const K=t(class{constructor(t,s,i,n){this.id=t,this.name=s,this.value=i,this.baseURL=n,this._id=60}encode(t){return t.uint(60)&&t.uint(this.id)&&t.string(this.name)&&t.string(this.value)&&t.string(this.baseURL)}});s.set(60,K);const G=t(class{constructor(t,s,i){this.id=t,this.data=s,this.baseURL=i,this._id=61}encode(t){return t.uint(61)&&t.uint(this.id)&&t.string(this.data)&&t.string(this.baseURL)}});s.set(61,G);const X=t(class{constructor(t,s){this.type=t,this.value=s,this._id=63}encode(t){return t.uint(63)&&t.string(this.type)&&t.string(this.value)}});s.set(63,X);const F=t(class{constructor(t,s){this.name=t,this.payload=s,this._id=64}encode(t){return t.uint(64)&&t.string(this.name)&&t.string(this.payload)}});s.set(64,F);const Q=t(class{constructor(){this._id=65}encode(t){return t.uint(65)}});s.set(65,Q);const V=t(class{constructor(t,s,i,n){this.id=t,this.rule=s,this.index=i,this.baseURL=n,this._id=67}encode(t){return t.uint(67)&&t.uint(this.id)&&t.string(this.rule)&&t.uint(this.index)&&t.string(this.baseURL)}});s.set(67,V);const W=t(class{constructor(t,s,i,n){this.id=t,this.hesitationTime=s,this.label=i,this.selector=n,this._id=69}encode(t){return t.uint(69)&&t.uint(this.id)&&t.uint(this.hesitationTime)&&t.string(this.label)&&t.string(this.selector)}});s.set(69,W);const Y=t(class{constructor(t,s){this.frameID=t,this.id=s,this._id=70}encode(t){return t.uint(70)&&t.uint(this.frameID)&&t.uint(this.id)}});s.set(70,Y);const Z="function"==typeof TextEncoder?new TextEncoder:{encode(t){const s=t.length,i=new Uint8Array(3*s);let n=-1;for(var e=0,r=0,o=0;o!==s;){if(e=t.charCodeAt(o),o+=1,e>=55296&&e<=56319){if(o===s){i[n+=1]=239,i[n+=1]=191,i[n+=1]=189;break}if(!((r=t.charCodeAt(o))>=56320&&r<=57343)){i[n+=1]=239,i[n+=1]=191,i[n+=1]=189;continue}if(o+=1,(e=1024*(e-55296)+r-56320+65536)>65535){i[n+=1]=240|e>>>18,i[n+=1]=128|e>>>12&63,i[n+=1]=128|e>>>6&63,i[n+=1]=128|63&e;continue}}e<=127?i[n+=1]=0|e:e<=2047?(i[n+=1]=192|e>>>6,i[n+=1]=128|63&e):(i[n+=1]=224|e>>>12,i[n+=1]=128|e>>>6&63,i[n+=1]=128|63&e)}return i.subarray(0,n+1)}};class tt{constructor(t){this.size=t,this.offset=0,this.checkpointOffset=0,this.data=new Uint8Array(t)}checkpoint(){this.checkpointOffset=this.offset}isEmpty(){return 0===this.offset}boolean(t){return this.data[this.offset++]=+t,this.offset<=this.size}uint(t){for(;t>=128;)this.data[this.offset++]=t%256|128,t=Math.floor(t/128);return this.data[this.offset++]=t,this.offset<=this.size}int(t){return t=Math.round(t),this.uint(t>=0?2*t:-2*t-1)}string(t){const s=Z.encode(t),i=s.byteLength;return!(!this.uint(i)||this.offset+i>this.size)&&(this.data.set(s,this.offset),this.offset+=i,!0)}reset(){this.offset=0,this.checkpointOffset=0}flush(){const t=this.data.slice(0,this.checkpointOffset);return this.reset(),t}}let st,it=1e6,nt=4e5,et=new tt(nt),rt="",ot="",ht=0,ct=0,ut=0,at=0,dt=!0;function lt(){return new i(ht,at,ct).encode(et)}const gt=[];let ft,pt=!1,mt=0,_t=8e3,yt=10;function vt(){if(dt||""===ot||""===rt)return;const t=et.flush();pt?gt.push(t):(pt=!0,function t(s){const i=new XMLHttpRequest;i.open("POST",rt+"/v1/web/i",!1),i.setRequestHeader("Authorization","Bearer "+ot),i.onreadystatechange=function(){if(4===this.readyState){if(0==this.status)return;if(this.status>=400)return St(),gt.length=0,403===this.status?void self.postMessage("restart"):void self.postMessage(null);const s=gt.shift();s?t(s):pt=!1}},i.onerror=function(i){if(mt>=yt)return St(),void self.postMessage(null);mt++,setTimeout(()=>t(s),_t)},i.send(s.buffer)}(t)),dt=!0,lt()}function St(){rt="",ot="",clearInterval(st),et.reset()}self.onmessage=({data:t})=>{if(null!==t)return"stop"===t?(vt(),void St()):Array.isArray(t)?void t.forEach(t=>{const i=new(s.get(t._id));if(Object.assign(i,t),i instanceof n?ct=i.timestamp:i instanceof J&&(i.hidden?ft=setTimeout(()=>self.postMessage("restart"),3e5):clearTimeout(ft)),et.checkpoint(),!i.encode(et)&&(vt(),!i.encode(et)))for(;!i.encode(et);){if(nt===it)return console.warn("OpenReplay: beacon size overflow."),et.reset(),void lt();nt=Math.min(2*nt,it),et=new tt(nt),lt()}at++,dt=!1}):(rt=t.ingestPoint||rt,ot=t.token||ot,ht=t.pageNo||ht,ct=t.startTimestamp||ct,ut=t.timeAdjustment||ut,yt=t.connAttemptCount||yt,_t=t.connAttemptGap||_t,it=t.beaconSizeLimit||it,nt=Math.min(it,t.beaconSize||nt),et.isEmpty()&&lt(),void(null==st&&(st=setInterval(vt,2e4))));vt()};
43
+ this.worker = new Worker(URL.createObjectURL(new Blob([`"use strict";function t(t){function s(...s){return new t(...s)}return s.prototype=t.prototype,s}const s=new Map;const i=t(class{constructor(t,s,i){this.pageNo=t,this.firstIndex=s,this.timestamp=i,this._id=80}encode(t){return t.uint(80)&&t.uint(this.pageNo)&&t.uint(this.firstIndex)&&t.int(this.timestamp)}});s.set(80,i);const n=t(class{constructor(t){this.timestamp=t,this._id=0}encode(t){return t.uint(0)&&t.uint(this.timestamp)}});s.set(0,n);const e=t(class{constructor(t,s,i){this.url=t,this.referrer=s,this.navigationStart=i,this._id=4}encode(t){return t.uint(4)&&t.string(this.url)&&t.string(this.referrer)&&t.uint(this.navigationStart)}});s.set(4,e);const r=t(class{constructor(t,s){this.width=t,this.height=s,this._id=5}encode(t){return t.uint(5)&&t.uint(this.width)&&t.uint(this.height)}});s.set(5,r);const o=t(class{constructor(t,s){this.x=t,this.y=s,this._id=6}encode(t){return t.uint(6)&&t.int(this.x)&&t.int(this.y)}});s.set(6,o);const h=t(class{constructor(){this._id=7}encode(t){return t.uint(7)}});s.set(7,h);const c=t(class{constructor(t,s,i,n,e){this.id=t,this.parentID=s,this.index=i,this.tag=n,this.svg=e,this._id=8}encode(t){return t.uint(8)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)&&t.string(this.tag)&&t.boolean(this.svg)}});s.set(8,c);const u=t(class{constructor(t,s,i){this.id=t,this.parentID=s,this.index=i,this._id=9}encode(t){return t.uint(9)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)}});s.set(9,u);const a=t(class{constructor(t,s,i){this.id=t,this.parentID=s,this.index=i,this._id=10}encode(t){return t.uint(10)&&t.uint(this.id)&&t.uint(this.parentID)&&t.uint(this.index)}});s.set(10,a);const d=t(class{constructor(t){this.id=t,this._id=11}encode(t){return t.uint(11)&&t.uint(this.id)}});s.set(11,d);const l=t(class{constructor(t,s,i){this.id=t,this.name=s,this.value=i,this._id=12}encode(t){return t.uint(12)&&t.uint(this.id)&&t.string(this.name)&&t.string(this.value)}});s.set(12,l);const g=t(class{constructor(t,s){this.id=t,this.name=s,this._id=13}encode(t){return t.uint(13)&&t.uint(this.id)&&t.string(this.name)}});s.set(13,g);const f=t(class{constructor(t,s){this.id=t,this.data=s,this._id=14}encode(t){return t.uint(14)&&t.uint(this.id)&&t.string(this.data)}});s.set(14,f);const p=t(class{constructor(t,s,i){this.id=t,this.x=s,this.y=i,this._id=16}encode(t){return t.uint(16)&&t.uint(this.id)&&t.int(this.x)&&t.int(this.y)}});s.set(16,p);const m=t(class{constructor(t,s){this.id=t,this.label=s,this._id=17}encode(t){return t.uint(17)&&t.uint(this.id)&&t.string(this.label)}});s.set(17,m);const _=t(class{constructor(t,s,i){this.id=t,this.value=s,this.mask=i,this._id=18}encode(t){return t.uint(18)&&t.uint(this.id)&&t.string(this.value)&&t.int(this.mask)}});s.set(18,_);const y=t(class{constructor(t,s){this.id=t,this.checked=s,this._id=19}encode(t){return t.uint(19)&&t.uint(this.id)&&t.boolean(this.checked)}});s.set(19,y);const v=t(class{constructor(t,s){this.x=t,this.y=s,this._id=20}encode(t){return t.uint(20)&&t.uint(this.x)&&t.uint(this.y)}});s.set(20,v);const S=t(class{constructor(t,s){this.level=t,this.value=s,this._id=22}encode(t){return t.uint(22)&&t.string(this.level)&&t.string(this.value)}});s.set(22,S);const b=t(class{constructor(t,s,i,n,e,r,o,h,c){this.requestStart=t,this.responseStart=s,this.responseEnd=i,this.domContentLoadedEventStart=n,this.domContentLoadedEventEnd=e,this.loadEventStart=r,this.loadEventEnd=o,this.firstPaint=h,this.firstContentfulPaint=c,this._id=23}encode(t){return t.uint(23)&&t.uint(this.requestStart)&&t.uint(this.responseStart)&&t.uint(this.responseEnd)&&t.uint(this.domContentLoadedEventStart)&&t.uint(this.domContentLoadedEventEnd)&&t.uint(this.loadEventStart)&&t.uint(this.loadEventEnd)&&t.uint(this.firstPaint)&&t.uint(this.firstContentfulPaint)}});s.set(23,b);const x=t(class{constructor(t,s,i){this.speedIndex=t,this.visuallyComplete=s,this.timeToInteractive=i,this._id=24}encode(t){return t.uint(24)&&t.uint(this.speedIndex)&&t.uint(this.visuallyComplete)&&t.uint(this.timeToInteractive)}});s.set(24,x);const E=t(class{constructor(t,s,i){this.name=t,this.message=s,this.payload=i,this._id=25}encode(t){return t.uint(25)&&t.string(this.name)&&t.string(this.message)&&t.string(this.payload)}});s.set(25,E);const k=t(class{constructor(t,s){this.name=t,this.payload=s,this._id=27}encode(t){return t.uint(27)&&t.string(this.name)&&t.string(this.payload)}});s.set(27,k);const I=t(class{constructor(t){this.id=t,this._id=28}encode(t){return t.uint(28)&&t.string(this.id)}});s.set(28,I);const z=t(class{constructor(t){this.id=t,this._id=29}encode(t){return t.uint(29)&&t.string(this.id)}});s.set(29,z);const w=t(class{constructor(t,s){this.key=t,this.value=s,this._id=30}encode(t){return t.uint(30)&&t.string(this.key)&&t.string(this.value)}});s.set(30,w);const T=t(class{constructor(t,s,i){this.id=t,this.rule=s,this.index=i,this._id=37}encode(t){return t.uint(37)&&t.uint(this.id)&&t.string(this.rule)&&t.uint(this.index)}});s.set(37,T);const L=t(class{constructor(t,s){this.id=t,this.index=s,this._id=38}encode(t){return t.uint(38)&&t.uint(this.id)&&t.uint(this.index)}});s.set(38,L);const A=t(class{constructor(t,s,i,n,e,r,o){this.method=t,this.url=s,this.request=i,this.response=n,this.status=e,this.timestamp=r,this.duration=o,this._id=39}encode(t){return t.uint(39)&&t.string(this.method)&&t.string(this.url)&&t.string(this.request)&&t.string(this.response)&&t.uint(this.status)&&t.uint(this.timestamp)&&t.uint(this.duration)}});s.set(39,A);const C=t(class{constructor(t,s,i,n){this.name=t,this.duration=s,this.args=i,this.result=n,this._id=40}encode(t){return t.uint(40)&&t.string(this.name)&&t.uint(this.duration)&&t.string(this.args)&&t.string(this.result)}});s.set(40,C);const M=t(class{constructor(t,s){this.key=t,this.value=s,this._id=41}encode(t){return t.uint(41)&&t.string(this.key)&&t.string(this.value)}});s.set(41,M);const R=t(class{constructor(t){this.type=t,this._id=42}encode(t){return t.uint(42)&&t.string(this.type)}});s.set(42,R);const N=t(class{constructor(t,s,i){this.action=t,this.state=s,this.duration=i,this._id=44}encode(t){return t.uint(44)&&t.string(this.action)&&t.string(this.state)&&t.uint(this.duration)}});s.set(44,N);const D=t(class{constructor(t,s){this.mutation=t,this.state=s,this._id=45}encode(t){return t.uint(45)&&t.string(this.mutation)&&t.string(this.state)}});s.set(45,D);const U=t(class{constructor(t,s){this.type=t,this.payload=s,this._id=46}encode(t){return t.uint(46)&&t.string(this.type)&&t.string(this.payload)}});s.set(46,U);const O=t(class{constructor(t,s,i){this.action=t,this.state=s,this.duration=i,this._id=47}encode(t){return t.uint(47)&&t.string(this.action)&&t.string(this.state)&&t.uint(this.duration)}});s.set(47,O);const q=t(class{constructor(t,s,i,n){this.operationKind=t,this.operationName=s,this.variables=i,this.response=n,this._id=48}encode(t){return t.uint(48)&&t.string(this.operationKind)&&t.string(this.operationName)&&t.string(this.variables)&&t.string(this.response)}});s.set(48,q);const H=t(class{constructor(t,s,i,n){this.frames=t,this.ticks=s,this.totalJSHeapSize=i,this.usedJSHeapSize=n,this._id=49}encode(t){return t.uint(49)&&t.int(this.frames)&&t.int(this.ticks)&&t.uint(this.totalJSHeapSize)&&t.uint(this.usedJSHeapSize)}});s.set(49,H);const P=t(class{constructor(t,s,i,n,e,r,o,h){this.timestamp=t,this.duration=s,this.ttfb=i,this.headerSize=n,this.encodedBodySize=e,this.decodedBodySize=r,this.url=o,this.initiator=h,this._id=53}encode(t){return t.uint(53)&&t.uint(this.timestamp)&&t.uint(this.duration)&&t.uint(this.ttfb)&&t.uint(this.headerSize)&&t.uint(this.encodedBodySize)&&t.uint(this.decodedBodySize)&&t.string(this.url)&&t.string(this.initiator)}});s.set(53,P);const B=t(class{constructor(t,s){this.downlink=t,this.type=s,this._id=54}encode(t){return t.uint(54)&&t.uint(this.downlink)&&t.string(this.type)}});s.set(54,B);const J=t(class{constructor(t){this.hidden=t,this._id=55}encode(t){return t.uint(55)&&t.boolean(this.hidden)}});s.set(55,J);const j=t(class{constructor(t,s,i,n,e,r,o){this.timestamp=t,this.duration=s,this.context=i,this.containerType=n,this.containerSrc=e,this.containerId=r,this.containerName=o,this._id=59}encode(t){return t.uint(59)&&t.uint(this.timestamp)&&t.uint(this.duration)&&t.uint(this.context)&&t.uint(this.containerType)&&t.string(this.containerSrc)&&t.string(this.containerId)&&t.string(this.containerName)}});s.set(59,j);const G=t(class{constructor(t,s,i,n){this.id=t,this.name=s,this.value=i,this.baseURL=n,this._id=60}encode(t){return t.uint(60)&&t.uint(this.id)&&t.string(this.name)&&t.string(this.value)&&t.string(this.baseURL)}});s.set(60,G);const K=t(class{constructor(t,s,i){this.id=t,this.data=s,this.baseURL=i,this._id=61}encode(t){return t.uint(61)&&t.uint(this.id)&&t.string(this.data)&&t.string(this.baseURL)}});s.set(61,K);const X=t(class{constructor(t,s){this.type=t,this.value=s,this._id=63}encode(t){return t.uint(63)&&t.string(this.type)&&t.string(this.value)}});s.set(63,X);const F=t(class{constructor(t,s){this.name=t,this.payload=s,this._id=64}encode(t){return t.uint(64)&&t.string(this.name)&&t.string(this.payload)}});s.set(64,F);const Q=t(class{constructor(){this._id=65}encode(t){return t.uint(65)}});s.set(65,Q);const V=t(class{constructor(t,s,i,n){this.id=t,this.rule=s,this.index=i,this.baseURL=n,this._id=67}encode(t){return t.uint(67)&&t.uint(this.id)&&t.string(this.rule)&&t.uint(this.index)&&t.string(this.baseURL)}});s.set(67,V);const W=t(class{constructor(t,s,i,n){this.id=t,this.hesitationTime=s,this.label=i,this.selector=n,this._id=69}encode(t){return t.uint(69)&&t.uint(this.id)&&t.uint(this.hesitationTime)&&t.string(this.label)&&t.string(this.selector)}});s.set(69,W);const Y=t(class{constructor(t,s){this.frameID=t,this.id=s,this._id=70}encode(t){return t.uint(70)&&t.uint(this.frameID)&&t.uint(this.id)}});s.set(70,Y);const Z="function"==typeof TextEncoder?new TextEncoder:{encode(t){const s=t.length,i=new Uint8Array(3*s);let n=-1;for(var e=0,r=0,o=0;o!==s;){if(e=t.charCodeAt(o),o+=1,e>=55296&&e<=56319){if(o===s){i[n+=1]=239,i[n+=1]=191,i[n+=1]=189;break}if(!((r=t.charCodeAt(o))>=56320&&r<=57343)){i[n+=1]=239,i[n+=1]=191,i[n+=1]=189;continue}if(o+=1,(e=1024*(e-55296)+r-56320+65536)>65535){i[n+=1]=240|e>>>18,i[n+=1]=128|e>>>12&63,i[n+=1]=128|e>>>6&63,i[n+=1]=128|63&e;continue}}e<=127?i[n+=1]=0|e:e<=2047?(i[n+=1]=192|e>>>6,i[n+=1]=128|63&e):(i[n+=1]=224|e>>>12,i[n+=1]=128|e>>>6&63,i[n+=1]=128|63&e)}return i.subarray(0,n+1)}};class tt{constructor(t){this.size=t,this.offset=0,this.checkpointOffset=0,this.data=new Uint8Array(t)}checkpoint(){this.checkpointOffset=this.offset}isEmpty(){return 0===this.offset}boolean(t){return this.data[this.offset++]=+t,this.offset<=this.size}uint(t){for((t<0||t>Number.MAX_SAFE_INTEGER)&&(t=0);t>=128;)this.data[this.offset++]=t%256|128,t=Math.floor(t/128);return this.data[this.offset++]=t,this.offset<=this.size}int(t){return t=Math.round(t),this.uint(t>=0?2*t:-2*t-1)}string(t){const s=Z.encode(t),i=s.byteLength;return!(!this.uint(i)||this.offset+i>this.size)&&(this.data.set(s,this.offset),this.offset+=i,!0)}reset(){this.offset=0,this.checkpointOffset=0}flush(){const t=this.data.slice(0,this.checkpointOffset);return this.reset(),t}}let st,it=1e6,nt=4e5,et=new tt(nt),rt="",ot="",ht=0,ct=0,ut=0,at=0,dt=!0;function lt(){return new i(ht,at,ct).encode(et)}const gt=[];let ft,pt=!1,mt=0,_t=8e3,yt=10;function vt(){if(dt||""===ot||""===rt)return;const t=et.flush();pt?gt.push(t):(pt=!0,function t(s){const i=new XMLHttpRequest;i.open("POST",rt+"/v1/web/i",!1),i.setRequestHeader("Authorization","Bearer "+ot),i.onreadystatechange=function(){if(4===this.readyState){if(0==this.status)return;if(this.status>=400)return St(),gt.length=0,401===this.status?void self.postMessage("restart"):void self.postMessage(null);const s=gt.shift();s?t(s):pt=!1}},i.onerror=function(i){if(mt>=yt)return St(),void self.postMessage(null);mt++,setTimeout(()=>t(s),_t)},i.send(s.buffer)}(t)),dt=!0,lt()}function St(){rt="",ot="",clearInterval(st),et.reset()}self.onmessage=({data:t})=>{if(null!==t)return"stop"===t?(vt(),void St()):Array.isArray(t)?void t.forEach(t=>{const i=new(s.get(t._id));if(Object.assign(i,t),i instanceof n?ct=i.timestamp:i instanceof J&&(i.hidden?ft=setTimeout(()=>self.postMessage("restart"),3e5):clearTimeout(ft)),et.checkpoint(),!i.encode(et)&&(vt(),!i.encode(et)))for(;!i.encode(et);){if(nt===it)return console.warn("OpenReplay: beacon size overflow."),et.reset(),void lt();nt=Math.min(2*nt,it),et=new tt(nt),lt()}at++,dt=!1}):(rt=t.ingestPoint||rt,ot=t.token||ot,ht=t.pageNo||ht,ct=t.startTimestamp||ct,ut=t.timeAdjustment||ut,yt=t.connAttemptCount||yt,_t=t.connAttemptGap||_t,it=t.beaconSizeLimit||it,nt=Math.min(it,t.beaconSize||nt),et.isEmpty()&&lt(),void(null==st&&(st=setInterval(vt,2e4))));vt()};
43
44
  `], { type: 'text/javascript' })));
44
- // this.worker.onerror = e => {
45
- // this.send(new TechnicalInfo("webworker_error", JSON.stringify(e)));
46
- // /* TODO: send report */
47
- // }
45
+ this.worker.onerror = e => {
46
+ this._debug("webworker_error", e);
47
+ };
48
48
  let lastTs = timestamp();
49
49
  let fileno = 0;
50
50
  this.worker.onmessage = ({ data }) => {
@@ -61,16 +61,17 @@ export default class App {
61
61
  this.worker.postMessage(null);
62
62
  }
63
63
  };
64
+ // TODO:on start
64
65
  // TODO: keep better tactics, discard others (look https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)
65
66
  this.attachEventListener(window, 'beforeunload', alertWorker, false);
66
67
  this.attachEventListener(document, 'mouseleave', alertWorker, false, false);
67
68
  this.attachEventListener(document, 'visibilitychange', alertWorker, false);
68
69
  }
69
70
  catch (e) {
70
- this.sendDebugReport("worker_start", e);
71
+ this._debug("worker_start", e);
71
72
  }
72
73
  }
73
- sendDebugReport(context, e) {
74
+ _debug(context, e) {
74
75
  if (this.options.__debug_report_edp !== null) {
75
76
  fetch(this.options.__debug_report_edp, {
76
77
  method: 'POST',
@@ -81,6 +82,9 @@ export default class App {
81
82
  })
82
83
  });
83
84
  }
85
+ if (this.options.__debug_log) {
86
+ warn("OpenReplay errror: ", context, e);
87
+ }
84
88
  }
85
89
  send(message, urgent = false) {
86
90
  if (!this.isActive) {
@@ -109,12 +113,11 @@ export default class App {
109
113
  fn.apply(this, args);
110
114
  }
111
115
  catch (e) {
112
- app.send(new TechnicalInfo("error", JSON.stringify({
113
- time: timestamp(),
114
- name: e.name,
115
- message: e.message,
116
- stack: e.stack
117
- })));
116
+ this._debug("safe_fn_call", e);
117
+ // time: timestamp(),
118
+ // name: e.name,
119
+ // message: e.message,
120
+ // stack: e.stack
118
121
  }
119
122
  }; // TODO: correct typing
120
123
  }
@@ -148,15 +151,24 @@ export default class App {
148
151
  }
149
152
  getBaseHref() {
150
153
  var _a, _b;
151
- if (this.options.resourceBaseHref) {
154
+ if (typeof this.options.resourceBaseHref === 'string') {
152
155
  return this.options.resourceBaseHref;
153
156
  }
157
+ else if (typeof this.options.resourceBaseHref === 'object') {
158
+ //switch between types
159
+ }
154
160
  if (document.baseURI) {
155
161
  return document.baseURI;
156
162
  }
157
163
  // IE only
158
164
  return ((_b = (_a = document.head) === null || _a === void 0 ? void 0 : _a.getElementsByTagName("base")[0]) === null || _b === void 0 ? void 0 : _b.getAttribute("href")) || location.origin + location.pathname;
159
165
  }
166
+ resolveResourceURL(resourceURL) {
167
+ const base = new URL(this.getBaseHref());
168
+ base.pathname += "/" + new URL(resourceURL).pathname;
169
+ base.pathname.replace(/\/+/g, "/");
170
+ return base.toString();
171
+ }
160
172
  isServiceURL(url) {
161
173
  return url.startsWith(this.options.ingestPoint);
162
174
  }
@@ -242,7 +254,7 @@ export default class App {
242
254
  .catch(e => {
243
255
  this.stop();
244
256
  warn("OpenReplay was unable to start. ", e);
245
- this.sendDebugReport("session_start", e);
257
+ this._debug("session_start", e);
246
258
  throw e;
247
259
  });
248
260
  }
package/lib/index.js CHANGED
@@ -15,17 +15,17 @@ import Scroll from './modules/scroll';
15
15
  import Viewport from './modules/viewport';
16
16
  import Longtasks from './modules/longtasks';
17
17
  import CSSRules from './modules/cssrules';
18
- import { IN_BROWSER, deprecationWarn } from './utils';
18
+ import { IN_BROWSER, deprecationWarn, DOCS_HOST } from './utils';
19
19
  const DOCS_SETUP = '/installation/setup-or';
20
20
  function processOptions(obj) {
21
21
  if (obj == null) {
22
- console.error(`OpenReplay: invalid options argument type. Please, check documentation on https://docs.openreplay.com${DOCS_SETUP}`);
22
+ console.error(`OpenReplay: invalid options argument type. Please, check documentation on ${DOCS_HOST}${DOCS_SETUP}`);
23
23
  return false;
24
24
  }
25
25
  if (typeof obj.projectKey !== 'string') {
26
26
  if (typeof obj.projectKey !== 'number') {
27
27
  if (typeof obj.projectID !== 'number') { // Back compatability
28
- console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check https://docs.openreplay.com${DOCS_SETUP} for more information.`);
28
+ console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check ${DOCS_HOST}${DOCS_SETUP} for more information.`);
29
29
  return false;
30
30
  }
31
31
  else {
@@ -39,7 +39,7 @@ function processOptions(obj) {
39
39
  }
40
40
  }
41
41
  if (typeof obj.sessionToken !== 'string' && obj.sessionToken != null) {
42
- console.warn(`OpenReplay: invalid options argument type. Please, check documentation on https://docs.openreplay.com${DOCS_SETUP}`);
42
+ console.warn(`OpenReplay: invalid options argument type. Please, check documentation on ${DOCS_HOST}${DOCS_SETUP}`);
43
43
  }
44
44
  return true;
45
45
  }
@@ -65,6 +65,10 @@ export default class API {
65
65
  if (!IN_BROWSER || !processOptions(options)) {
66
66
  return;
67
67
  }
68
+ if (window.__OPENREPLAY__) {
69
+ console.error("OpenReplay: one tracker instance has been initialised already");
70
+ return;
71
+ }
68
72
  if (!options.__DISABLE_SECURE_MODE && location.protocol !== 'https:') {
69
73
  console.error("OpenReplay: Your website must be publicly accessible and running on SSL in order for OpenReplay to properly capture and replay the user session. You can disable this check by setting `__DISABLE_SECURE_MODE` option to `true` if you are testing in localhost. Keep in mind, that asset files on a local machine are not available to the outside world. This might affect tracking if you use css files.");
70
74
  return;
@@ -94,17 +98,17 @@ export default class API {
94
98
  Performance(this.app, options);
95
99
  Scroll(this.app);
96
100
  Longtasks(this.app);
97
- window.__OPENREPLAY__ = window.__OPENREPLAY__ || this;
101
+ window.__OPENREPLAY__ = this;
98
102
  }
99
103
  else {
100
- console.log("OpenReplay: browser doesn't support API required for tracking.");
104
+ console.log("OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1.");
101
105
  const req = new XMLHttpRequest();
102
106
  const orig = options.ingestPoint || DEFAULT_INGEST_POINT;
103
107
  req.open("POST", orig + "/v1/web/not-started");
104
108
  // no-cors issue only with text/plain or not-set Content-Type
105
109
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
106
110
  req.send(JSON.stringify({
107
- trackerVersion: '3.4.0',
111
+ trackerVersion: '3.4.1',
108
112
  projectKey: options.projectKey,
109
113
  doNotTrack,
110
114
  // TODO: add precise reason (an exact API missing)
@@ -126,7 +130,7 @@ export default class API {
126
130
  }
127
131
  start() {
128
132
  if (!IN_BROWSER) {
129
- console.error(`OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the \`tracker.start()\` line. Check documentation on https://docs.openreplay.com${DOCS_SETUP}`);
133
+ console.error(`OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the \`tracker.start()\` line. Check documentation on ${DOCS_HOST}${DOCS_SETUP}`);
130
134
  return;
131
135
  }
132
136
  if (this.app === null) {
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/messages/writer.ts","../../src/messages/message.ts","../../src/messages/index.ts","../../src/messages/webworker.ts","../../node_modules/@types/eslint-visitor-keys/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/base.d.ts","../../node_modules/@types/node/ts3.2/fs.d.ts","../../node_modules/@types/node/ts3.2/util.d.ts","../../node_modules/@types/node/ts3.2/globals.d.ts","../../node_modules/@types/node/ts3.2/base.d.ts","../../node_modules/@types/node/ts3.5/globals.global.d.ts","../../node_modules/@types/node/ts3.5/wasi.d.ts","../../node_modules/@types/node/ts3.5/base.d.ts","../../node_modules/@types/node/ts3.7/assert.d.ts","../../node_modules/@types/node/ts3.7/base.d.ts","../../node_modules/@types/node/ts3.7/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/resolve/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"e6ab9b8cc2747eb53fb5bfd339b69857dc2a33415bfbcfbf20f885dd9b43ed5d","8aa4c0659b8a040f765531d17e6cbac53deeb0a7e334d53e80d9dc85cb774546","98dd06c7e91230a93cd752a6a5d75d77c845b72bfc5228f9ff5b24f9ee1019d0","fe729eaf166de740549d4f03414e8edcf5c324e316a1eb20a1da3cbb1f72ad60","725d9be2fd48440256f4deb00649adffdbc5ecd282b09e89d4e200663792c34c","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b",{"version":"2dd7dbacbd70cc156185235140b7b6682c002c1ea678dd87d7a20589d4555fc0","affectsGlobalScope":true},"4ed9f71ddbb5753771ee391f64297078a88f7dfd1480646dcf08c31395778682","61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878","465150173a56b943b2f6d8918e35c89d8386ffd37aa466e486ca54db54d6cee7","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","d4dd0b19ee0338dd4f1603eacb41859b9d5371bfef2b2849cb870d6fd6602bcb","7ecfe97b43aa6c8b8f90caa599d5648bb559962e74e6f038f73a77320569dd78","aad3237c3f99480041cad7ca04d64307c98933996f822342b7c0ee4a78553346","4d4c83f77ac21a72252785baa5328a5612b0b6598d512f68b8cb14f7966d059e","eaa8136bb11fbea5bdaf29e06aa45a1969ddd39fbfb5fe58a01f00d7f1562cd9","e253cd3c7d10c4f600308d0528dd371d7e4165d8295b37a1f38d0ef6c0dfaf60","fb28748ff8d015f52e99daee4f454e57cec1a22141f1257c317f3630a15edeb7","9440dcf960685f7ec10856891a6cebb52a5ae8cef6a2e85daf9476dafd346cbe","5d9394b829cfd504b2fe17287aaad8ce1dcfb2a2183c962a90a85b96da2c1c90","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","6c3857edaeeaaf43812f527830ebeece9266b6e8eb5271ab6d2f0008306c9947","bc6a77e750f4d34584e46b1405b771fb69a224197dd6bafe5b0392a29a70b665","46cac76114704902baa535b30fb66a26aeaf9430f3b3ab44746e329f12e85498","ed4ae81196cccc10f297d228bca8d02e31058e6d723a3c5bc4be5fb3c61c6a34","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","0b6098fedb648cab8091cca2b022a5c729b6ef18da923852033f495907cb1a45",{"version":"0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e","affectsGlobalScope":true},"30ec6f9c683b988c3cfaa0c4690692049c4e7ed7dc6f6e94f56194c06b86f5e1","9f633ecf3e065ff82c19eccab35c8aa1d6d5d1a49af282dc29ef5a64cca34164","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","dd3706b25d06fe23c73d16079e8c66ac775831ef419da00716bf2aee530a04a4","406a63c7e94107394341e97dbdc3312a1ecea75571d067a69eaa213786d9f154","d67e08745494b000da9410c1ae2fdc9965fc6d593fe0f381a47491f75417d457","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","424bc64b2794d9280c1e1f4a3518ba9d285385a16d84753a6427bb469e582eca","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","826d48e49c905cedb906cbde6ccaf758827ff5867d4daa006b5a79e0fb489357","baa711b17f67390c60eac3c70a1391b23a8e3833cb723b2d7336d4817a22455c","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","e4abb8eaa8a7d78236be0f8342404aab076668d20590209e32fdeb924588531e","086bfc0710b044ce1586108ee56c6e1c0d9ca2d325c153bb026cbc850169f593","f409183966a1dd93d3a9cd1d54fbeb85c73101e87cd5b19467c5e37b252f3fd8","b46af749e3574b83bccc0ec829322b15e834ae90b45760eebc75a189c28c0868","12b2608d6074167c331c9c3c6994a57819f6ff934c7fd4527e23aabf56d4c8d1","ffc1cd688606ad1ddb59a40e8f3defbde907af2a3402d1d9ddf69accb2903f07",{"version":"4926e99d2ad39c0bbd36f2d37cc8f52756bc7a5661ad7b12815df871a4b07ba1","affectsGlobalScope":true},"4cef33b2997388559c39b2f98c37e8319ad61e30a1f0edc55c53913f2250bade",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"0b3fef11ea6208c4cb3715c9aa108766ce98fc726bfba68cc23b25ce944ce9c0","255dbc5a5acef2b83b47145042aa0127ebf7fe24cd5ce6afaaaf5c8fc2c5eb96","a8b842671d535d14f533fd8dbfacebceacf5195069d720425d572d5cc5ab3dc4","9779312cffccce68e3ffbaa3a876381dc54a8240d9bdaa448f7eba222ec19392","d522314e80ed71b57e3c2939d3c9594eaae63a4adf028559e6574f6b270b0fee","1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633","64ef5112114bdd77304acb548f93777b263bbf57272776139425a58f68a10775","ecdf947a5111318568ba99f2a87b8498382d8871207f1bc6271ff3b9536a2448","2880728492d6a6baa55411d14cc42fa55714a24b1d1d27ff9a8a610abd47c761"],"options":{"composite":true,"declaration":true,"module":5,"noImplicitAny":true,"noImplicitThis":true,"outDir":"..","rootDir":"../../src","strictNullChecks":true,"target":2},"fileIdsList":[[46,69,75,76],[45,46,69,75,76,84,85],[34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,76],[45,46,53,62,69,75,76],[37,45,46,53,69,75,76],[41,46,54,69,75,76],[46,62,69,75,76],[43,45,46,53,69,75,76],[45,46,69,75,76],[45,47,62,68,69,75,76],[45,46,53,62,68,69,75,76],[45,46,48,53,62,65,68,69,75,76],[45,46,48,65,68,69,75,76],[46,68,69,75,76],[43,45,46,62,69,75,76],[35,46,69,75,76],[46,67,69,75,76],[45,46,62,69,75,76],[46,60,69,71,75,76],[41,43,46,53,62,69,75,76],[46,69,74,75,76,77],[46,69,76],[34,46,69,75,76],[46,69,75],[46,69,75,76,78,79,80],[46,69,75,76,81,82],[46,69,75,76,83],[46,53,69,75,76],[46,59,69,75,76],[46,75,76],[45,46,62,68,69,71,75,76],[46,69,75,76,84],[28,29,46,69,75,76],[28,46,69,75,76]],"referencedMap":[[32,1],[33,1],[86,2],[87,1],[85,1],[35,1],[74,3],[36,1],[37,4],[38,5],[39,1],[40,6],[41,7],[42,8],[43,1],[44,9],[45,1],[46,10],[47,1],[34,1],[48,11],[49,12],[50,13],[51,9],[52,14],[53,15],[54,1],[55,1],[56,16],[57,17],[58,1],[59,1],[60,18],[61,19],[62,9],[63,1],[64,1],[65,20],[66,1],[78,21],[75,22],[77,23],[76,24],[81,25],[79,1],[80,1],[82,1],[83,26],[84,27],[67,28],[68,29],[69,30],[70,7],[71,1],[72,31],[73,7],[88,32],[7,1],[6,1],[2,1],[8,1],[9,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[3,1],[4,1],[19,1],[16,1],[17,1],[18,1],[20,1],[21,1],[22,1],[5,1],[23,1],[24,1],[25,1],[26,1],[1,1],[27,1],[30,33],[29,34],[31,1],[28,1]],"exportedModulesMap":[[32,1],[33,1],[86,2],[87,1],[85,1],[35,1],[74,3],[36,1],[37,4],[38,5],[39,1],[40,6],[41,7],[42,8],[43,1],[44,9],[45,1],[46,10],[47,1],[34,1],[48,11],[49,12],[50,13],[51,9],[52,14],[53,15],[54,1],[55,1],[56,16],[57,17],[58,1],[59,1],[60,18],[61,19],[62,9],[63,1],[64,1],[65,20],[66,1],[78,21],[75,22],[77,23],[76,24],[81,25],[79,1],[80,1],[82,1],[83,26],[84,27],[67,28],[68,29],[69,30],[70,7],[71,1],[72,31],[73,7],[88,32],[7,1],[6,1],[2,1],[8,1],[9,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[3,1],[4,1],[19,1],[16,1],[17,1],[18,1],[20,1],[21,1],[22,1],[5,1],[23,1],[24,1],[25,1],[26,1],[1,1],[27,1],[30,33],[29,34],[31,1],[28,1]],"semanticDiagnosticsPerFile":[32,33,86,87,85,35,74,36,37,38,39,40,41,42,43,44,45,46,47,34,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,78,75,77,76,81,79,80,82,83,84,67,68,69,70,71,72,73,88,7,6,2,8,9,10,11,12,13,14,15,3,4,19,16,17,18,20,21,22,5,23,24,25,26,1,27,30,29,31,28]},"version":"4.3.4"}
1
+ {"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../src/messages/writer.ts","../../src/messages/message.ts","../../src/messages/index.ts","../../src/messages/webworker.ts","../../node_modules/@types/eslint-visitor-keys/index.d.ts","../../node_modules/@types/estree/index.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/base.d.ts","../../node_modules/@types/node/ts3.2/fs.d.ts","../../node_modules/@types/node/ts3.2/util.d.ts","../../node_modules/@types/node/ts3.2/globals.d.ts","../../node_modules/@types/node/ts3.2/base.d.ts","../../node_modules/@types/node/ts3.5/globals.global.d.ts","../../node_modules/@types/node/ts3.5/wasi.d.ts","../../node_modules/@types/node/ts3.5/base.d.ts","../../node_modules/@types/node/ts3.7/assert.d.ts","../../node_modules/@types/node/ts3.7/base.d.ts","../../node_modules/@types/node/ts3.7/index.d.ts","../../node_modules/@types/minimatch/index.d.ts","../../node_modules/@types/glob/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/resolve/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06",{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"b8aeff6e394e47092b25a03db1c5db0339a3f2d4fa4e9b7118ea43b440068086","8aa4c0659b8a040f765531d17e6cbac53deeb0a7e334d53e80d9dc85cb774546","98dd06c7e91230a93cd752a6a5d75d77c845b72bfc5228f9ff5b24f9ee1019d0","a33ea9d45ef6724cb5a243f0637df91c29b1a20de3051766b9b29eb4a72ec914","725d9be2fd48440256f4deb00649adffdbc5ecd282b09e89d4e200663792c34c","89ccbe04e737ce613f5f04990271cfa84901446350b8551b0555ddf19319723b",{"version":"2dd7dbacbd70cc156185235140b7b6682c002c1ea678dd87d7a20589d4555fc0","affectsGlobalScope":true},"4ed9f71ddbb5753771ee391f64297078a88f7dfd1480646dcf08c31395778682","61215c1a376bbe8f51cab4cc4ddbf3746387015113c37a84d981d4738c21b878","465150173a56b943b2f6d8918e35c89d8386ffd37aa466e486ca54db54d6cee7","123ec69e4b3a686eb49afd94ebe3292a5c84a867ecbcb6bb84bdd720a12af803","525c8fc510d9632d2a0a9de2d41c3ac1cdd79ff44d3b45c6d81cacabb683528d","90c85ddbb8de82cd19198bda062065fc51b7407c0f206f2e399e65a52e979720","d4dd0b19ee0338dd4f1603eacb41859b9d5371bfef2b2849cb870d6fd6602bcb","7ecfe97b43aa6c8b8f90caa599d5648bb559962e74e6f038f73a77320569dd78","aad3237c3f99480041cad7ca04d64307c98933996f822342b7c0ee4a78553346","4d4c83f77ac21a72252785baa5328a5612b0b6598d512f68b8cb14f7966d059e","eaa8136bb11fbea5bdaf29e06aa45a1969ddd39fbfb5fe58a01f00d7f1562cd9","e253cd3c7d10c4f600308d0528dd371d7e4165d8295b37a1f38d0ef6c0dfaf60","fb28748ff8d015f52e99daee4f454e57cec1a22141f1257c317f3630a15edeb7","9440dcf960685f7ec10856891a6cebb52a5ae8cef6a2e85daf9476dafd346cbe","5d9394b829cfd504b2fe17287aaad8ce1dcfb2a2183c962a90a85b96da2c1c90","c969bf4c7cdfe4d5dd28aa09432f99d09ad1d8d8b839959646579521d0467d1a","6c3857edaeeaaf43812f527830ebeece9266b6e8eb5271ab6d2f0008306c9947","bc6a77e750f4d34584e46b1405b771fb69a224197dd6bafe5b0392a29a70b665","46cac76114704902baa535b30fb66a26aeaf9430f3b3ab44746e329f12e85498","ed4ae81196cccc10f297d228bca8d02e31058e6d723a3c5bc4be5fb3c61c6a34","84044697c8b3e08ef24e4b32cfe6440143d07e469a5e34bda0635276d32d9f35","0b6098fedb648cab8091cca2b022a5c729b6ef18da923852033f495907cb1a45",{"version":"0e0d58f5e90c0a270dac052b9c5ad8ccdfc8271118c2105b361063218d528d6e","affectsGlobalScope":true},"30ec6f9c683b988c3cfaa0c4690692049c4e7ed7dc6f6e94f56194c06b86f5e1","9f633ecf3e065ff82c19eccab35c8aa1d6d5d1a49af282dc29ef5a64cca34164","6b2bb67b0942bcfce93e1d6fad5f70afd54940a2b13df7f311201fba54b2cbe9","dd3706b25d06fe23c73d16079e8c66ac775831ef419da00716bf2aee530a04a4","406a63c7e94107394341e97dbdc3312a1ecea75571d067a69eaa213786d9f154","d67e08745494b000da9410c1ae2fdc9965fc6d593fe0f381a47491f75417d457","b40652bf8ce4a18133b31349086523b219724dca8df3448c1a0742528e7ad5b9","424bc64b2794d9280c1e1f4a3518ba9d285385a16d84753a6427bb469e582eca","a77fdb357c78b70142b2fdbbfb72958d69e8f765fd2a3c69946c1018e89d4638","3c2ac350c3baa61fd2b1925844109e098f4376d0768a4643abc82754fd752748","826d48e49c905cedb906cbde6ccaf758827ff5867d4daa006b5a79e0fb489357","baa711b17f67390c60eac3c70a1391b23a8e3833cb723b2d7336d4817a22455c","289be113bad7ee27ee7fa5b1e373c964c9789a5e9ed7db5ddcb631371120b953","e4abb8eaa8a7d78236be0f8342404aab076668d20590209e32fdeb924588531e","086bfc0710b044ce1586108ee56c6e1c0d9ca2d325c153bb026cbc850169f593","f409183966a1dd93d3a9cd1d54fbeb85c73101e87cd5b19467c5e37b252f3fd8","b46af749e3574b83bccc0ec829322b15e834ae90b45760eebc75a189c28c0868","12b2608d6074167c331c9c3c6994a57819f6ff934c7fd4527e23aabf56d4c8d1","ffc1cd688606ad1ddb59a40e8f3defbde907af2a3402d1d9ddf69accb2903f07",{"version":"4926e99d2ad39c0bbd36f2d37cc8f52756bc7a5661ad7b12815df871a4b07ba1","affectsGlobalScope":true},"4cef33b2997388559c39b2f98c37e8319ad61e30a1f0edc55c53913f2250bade",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"0b3fef11ea6208c4cb3715c9aa108766ce98fc726bfba68cc23b25ce944ce9c0","255dbc5a5acef2b83b47145042aa0127ebf7fe24cd5ce6afaaaf5c8fc2c5eb96","a8b842671d535d14f533fd8dbfacebceacf5195069d720425d572d5cc5ab3dc4","9779312cffccce68e3ffbaa3a876381dc54a8240d9bdaa448f7eba222ec19392","d522314e80ed71b57e3c2939d3c9594eaae63a4adf028559e6574f6b270b0fee","1d1e6bd176eee5970968423d7e215bfd66828b6db8d54d17afec05a831322633","64ef5112114bdd77304acb548f93777b263bbf57272776139425a58f68a10775","ecdf947a5111318568ba99f2a87b8498382d8871207f1bc6271ff3b9536a2448","2880728492d6a6baa55411d14cc42fa55714a24b1d1d27ff9a8a610abd47c761"],"options":{"composite":true,"declaration":true,"module":5,"noImplicitAny":true,"noImplicitThis":true,"outDir":"..","rootDir":"../../src","strictNullChecks":true,"target":2},"fileIdsList":[[46,69,75,76],[45,46,69,75,76,84,85],[34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,76],[45,46,53,62,69,75,76],[37,45,46,53,69,75,76],[41,46,54,69,75,76],[46,62,69,75,76],[43,45,46,53,69,75,76],[45,46,69,75,76],[45,47,62,68,69,75,76],[45,46,53,62,68,69,75,76],[45,46,48,53,62,65,68,69,75,76],[45,46,48,65,68,69,75,76],[46,68,69,75,76],[43,45,46,62,69,75,76],[35,46,69,75,76],[46,67,69,75,76],[45,46,62,69,75,76],[46,60,69,71,75,76],[41,43,46,53,62,69,75,76],[46,69,74,75,76,77],[46,69,76],[34,46,69,75,76],[46,69,75],[46,69,75,76,78,79,80],[46,69,75,76,81,82],[46,69,75,76,83],[46,53,69,75,76],[46,59,69,75,76],[46,75,76],[45,46,62,68,69,71,75,76],[46,69,75,76,84],[28,29,46,69,75,76],[28,46,69,75,76]],"referencedMap":[[32,1],[33,1],[86,2],[87,1],[85,1],[35,1],[74,3],[36,1],[37,4],[38,5],[39,1],[40,6],[41,7],[42,8],[43,1],[44,9],[45,1],[46,10],[47,1],[34,1],[48,11],[49,12],[50,13],[51,9],[52,14],[53,15],[54,1],[55,1],[56,16],[57,17],[58,1],[59,1],[60,18],[61,19],[62,9],[63,1],[64,1],[65,20],[66,1],[78,21],[75,22],[77,23],[76,24],[81,25],[79,1],[80,1],[82,1],[83,26],[84,27],[67,28],[68,29],[69,30],[70,7],[71,1],[72,31],[73,7],[88,32],[7,1],[6,1],[2,1],[8,1],[9,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[3,1],[4,1],[19,1],[16,1],[17,1],[18,1],[20,1],[21,1],[22,1],[5,1],[23,1],[24,1],[25,1],[26,1],[1,1],[27,1],[30,33],[29,34],[31,1],[28,1]],"exportedModulesMap":[[32,1],[33,1],[86,2],[87,1],[85,1],[35,1],[74,3],[36,1],[37,4],[38,5],[39,1],[40,6],[41,7],[42,8],[43,1],[44,9],[45,1],[46,10],[47,1],[34,1],[48,11],[49,12],[50,13],[51,9],[52,14],[53,15],[54,1],[55,1],[56,16],[57,17],[58,1],[59,1],[60,18],[61,19],[62,9],[63,1],[64,1],[65,20],[66,1],[78,21],[75,22],[77,23],[76,24],[81,25],[79,1],[80,1],[82,1],[83,26],[84,27],[67,28],[68,29],[69,30],[70,7],[71,1],[72,31],[73,7],[88,32],[7,1],[6,1],[2,1],[8,1],[9,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[3,1],[4,1],[19,1],[16,1],[17,1],[18,1],[20,1],[21,1],[22,1],[5,1],[23,1],[24,1],[25,1],[26,1],[1,1],[27,1],[30,33],[29,34],[31,1],[28,1]],"semanticDiagnosticsPerFile":[32,33,86,87,85,35,74,36,37,38,39,40,41,42,43,44,45,46,47,34,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,78,75,77,76,81,79,80,82,83,84,67,68,69,70,71,72,73,88,7,6,2,8,9,10,11,12,13,14,15,3,4,19,16,17,18,20,21,22,5,23,24,25,26,1,27,30,29,31,28]},"version":"4.3.4"}
@@ -2,6 +2,7 @@ export interface Options {
2
2
  connAttemptCount?: number;
3
3
  connAttemptGap?: number;
4
4
  beaconSize?: number;
5
+ __debug_log?: boolean;
5
6
  }
6
7
  declare type Settings = {
7
8
  ingestPoint?: string;
@@ -76,6 +76,9 @@ export default class Writer {
76
76
  return this.offset <= this.size;
77
77
  }
78
78
  uint(value) {
79
+ if (value < 0 || value > Number.MAX_SAFE_INTEGER) {
80
+ value = 0;
81
+ }
79
82
  while (value >= 0x80) {
80
83
  this.data[this.offset++] = value % 0x100 | 0x80;
81
84
  value = Math.floor(value / 128);
@@ -99,7 +99,7 @@ export default function (app, opts) {
99
99
  app.ticker.attach(reset, 33, false);
100
100
  options.consoleMethods.forEach((method) => {
101
101
  if (consoleMethods.indexOf(method) === -1) {
102
- console.error(`Asayer: unsupported console method ${method}`);
102
+ console.error(`OpenReplay: unsupported console method "${method}"`);
103
103
  return;
104
104
  }
105
105
  const fn = console[method];
package/lib/utils.d.ts CHANGED
@@ -11,6 +11,7 @@ export declare const warn: {
11
11
  (...data: any[]): void;
12
12
  (message?: any, ...optionalParams: any[]): void;
13
13
  };
14
+ export declare const DOCS_HOST = "https://docs.openreplay.com";
14
15
  export declare function deprecationWarn(nameOfFeature: string, useInstead: string, docsPath?: string): void;
15
16
  export declare function getLabelAttribute(e: Element): string | null;
16
17
  export declare function hasOpenreplayAttribute(e: Element, name: string): boolean;
package/lib/utils.js CHANGED
@@ -14,7 +14,7 @@ export function isURL(s) {
14
14
  export const IN_BROWSER = !(typeof window === "undefined");
15
15
  export const log = console.log;
16
16
  export const warn = console.warn;
17
- const DOCS_HOST = 'https://docs.openreplay.com';
17
+ export const DOCS_HOST = 'https://docs.openreplay.com';
18
18
  const warnedFeatures = {};
19
19
  export function deprecationWarn(nameOfFeature, useInstead, docsPath = "/") {
20
20
  if (warnedFeatures[nameOfFeature]) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "3.4.0",
4
+ "version": "3.4.1",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"
@@ -39,6 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@medv/finder": "^2.0.0",
42
+ "@openreplay/tracker-vuex": "^3.0.0",
42
43
  "error-stack-parser": "^2.0.6"
43
44
  },
44
45
  "engines": {