@openreplay/tracker 17.2.4 → 17.2.6
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.
- package/dist/cjs/entry.js +117 -97
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +117 -97
- package/dist/cjs/index.js.map +1 -1
- package/dist/lib/entry.js +117 -97
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +117 -97
- package/dist/lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist/lib/index.js
CHANGED
|
@@ -1742,7 +1742,7 @@ class CanvasRecorder {
|
|
|
1742
1742
|
setTimeout(() => {
|
|
1743
1743
|
this.app.nodes.scanTree(this.captureCanvas);
|
|
1744
1744
|
this.app.nodes.attachNodeCallback(this.captureCanvas);
|
|
1745
|
-
},
|
|
1745
|
+
}, 125);
|
|
1746
1746
|
}
|
|
1747
1747
|
sendSnaps(images, canvasId, createdAt) {
|
|
1748
1748
|
if (Object.keys(this.snapshots).length === 0) {
|
|
@@ -1773,14 +1773,20 @@ class CanvasRecorder {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
async uploadBatch(images, canvasId, createdAt) {
|
|
1775
1775
|
if (this.options.isDebug) {
|
|
1776
|
-
const
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1776
|
+
const packed = await packFrames(images);
|
|
1777
|
+
if (packed) {
|
|
1778
|
+
const fileName = `${createdAt}_${canvasId}.${this.fileExt}.frames`;
|
|
1779
|
+
const url = URL.createObjectURL(new Blob([packed]));
|
|
1780
|
+
const link = document.createElement('a');
|
|
1781
|
+
link.href = url;
|
|
1782
|
+
link.download = fileName;
|
|
1783
|
+
link.style.display = 'none';
|
|
1784
|
+
document.body.appendChild(link);
|
|
1785
|
+
link.click();
|
|
1786
|
+
document.body.removeChild(link);
|
|
1787
|
+
URL.revokeObjectURL(url);
|
|
1788
|
+
}
|
|
1789
|
+
// fall through to also send to backend
|
|
1784
1790
|
}
|
|
1785
1791
|
let formData;
|
|
1786
1792
|
if (this.options.framesSupport) {
|
|
@@ -1925,80 +1931,36 @@ function captureSnapshot(canvas, quality = 'medium', dummy, fixedScaling = false
|
|
|
1925
1931
|
canvas.toBlob(onBlob, imageFormat, qualityInt[quality]);
|
|
1926
1932
|
}
|
|
1927
1933
|
}
|
|
1928
|
-
async function
|
|
1929
|
-
const
|
|
1930
|
-
|
|
1931
|
-
const
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
const
|
|
1942
|
-
const
|
|
1934
|
+
async function packFrames(images) {
|
|
1935
|
+
const buffers = [];
|
|
1936
|
+
let totalSize = 0;
|
|
1937
|
+
for (const snapshot of images) {
|
|
1938
|
+
if (!snapshot.data)
|
|
1939
|
+
continue;
|
|
1940
|
+
const ab = await snapshot.data.arrayBuffer();
|
|
1941
|
+
buffers.push(ab);
|
|
1942
|
+
totalSize += 8 + 4 + ab.byteLength;
|
|
1943
|
+
}
|
|
1944
|
+
if (totalSize === 0)
|
|
1945
|
+
return null;
|
|
1946
|
+
const packed = new ArrayBuffer(totalSize);
|
|
1947
|
+
const view = new DataView(packed);
|
|
1948
|
+
const bytes = new Uint8Array(packed);
|
|
1943
1949
|
let offset = 0;
|
|
1944
|
-
for (
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
const
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
local.set(nameBytes, 30);
|
|
1959
|
-
// Central directory entry (46 bytes + filename)
|
|
1960
|
-
const cd = new Uint8Array(46 + nameBytes.length);
|
|
1961
|
-
const cv = new DataView(cd.buffer);
|
|
1962
|
-
cv.setUint32(0, 0x02014b50, true);
|
|
1963
|
-
cv.setUint16(4, 20, true);
|
|
1964
|
-
cv.setUint16(6, 20, true);
|
|
1965
|
-
cv.setUint32(16, crc, true);
|
|
1966
|
-
cv.setUint32(20, dataBytes.length, true);
|
|
1967
|
-
cv.setUint32(24, dataBytes.length, true);
|
|
1968
|
-
cv.setUint16(28, nameBytes.length, true);
|
|
1969
|
-
cv.setUint32(42, offset, true);
|
|
1970
|
-
cd.set(nameBytes, 46);
|
|
1971
|
-
parts.push(local);
|
|
1972
|
-
parts.push(dataBytes);
|
|
1973
|
-
centralDir.push(cd);
|
|
1974
|
-
offset += local.length + dataBytes.length;
|
|
1975
|
-
}
|
|
1976
|
-
const cdOffset = offset;
|
|
1977
|
-
let cdSize = 0;
|
|
1978
|
-
for (const entry of centralDir) {
|
|
1979
|
-
parts.push(entry);
|
|
1980
|
-
cdSize += entry.length;
|
|
1981
|
-
}
|
|
1982
|
-
// End of central directory (22 bytes)
|
|
1983
|
-
const eocd = new Uint8Array(22);
|
|
1984
|
-
const ev = new DataView(eocd.buffer);
|
|
1985
|
-
ev.setUint32(0, 0x06054b50, true);
|
|
1986
|
-
ev.setUint16(8, files.length, true);
|
|
1987
|
-
ev.setUint16(10, files.length, true);
|
|
1988
|
-
ev.setUint32(12, cdSize, true);
|
|
1989
|
-
ev.setUint32(16, cdOffset, true);
|
|
1990
|
-
parts.push(eocd);
|
|
1991
|
-
return new Blob(parts, { type: 'application/zip' });
|
|
1992
|
-
}
|
|
1993
|
-
function crc32(data) {
|
|
1994
|
-
let crc = 0xffffffff;
|
|
1995
|
-
for (let i = 0; i < data.length; i++) {
|
|
1996
|
-
crc ^= data[i];
|
|
1997
|
-
for (let j = 0; j < 8; j++) {
|
|
1998
|
-
crc = (crc >>> 1) ^ (crc & 1 ? 0xedb88320 : 0);
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
|
-
return (crc ^ 0xffffffff) >>> 0;
|
|
1950
|
+
for (let i = 0; i < images.length; i++) {
|
|
1951
|
+
if (!images[i].data)
|
|
1952
|
+
continue;
|
|
1953
|
+
const ab = buffers.shift();
|
|
1954
|
+
const ts = images[i].id;
|
|
1955
|
+
view.setUint32(offset, ts % 0x100000000, true);
|
|
1956
|
+
view.setUint32(offset + 4, Math.floor(ts / 0x100000000), true);
|
|
1957
|
+
offset += 8;
|
|
1958
|
+
view.setUint32(offset, ab.byteLength, true);
|
|
1959
|
+
offset += 4;
|
|
1960
|
+
bytes.set(new Uint8Array(ab), offset);
|
|
1961
|
+
offset += ab.byteLength;
|
|
1962
|
+
}
|
|
1963
|
+
return packed;
|
|
2002
1964
|
}
|
|
2003
1965
|
|
|
2004
1966
|
const LogLevel = {
|
|
@@ -3848,7 +3810,7 @@ class App {
|
|
|
3848
3810
|
this.stopCallbacks = [];
|
|
3849
3811
|
this.commitCallbacks = [];
|
|
3850
3812
|
this.activityState = ActivityState.NotActive;
|
|
3851
|
-
this.version = '17.2.
|
|
3813
|
+
this.version = '17.2.6'; // TODO: version compatability check inside each plugin.
|
|
3852
3814
|
this.socketMode = false;
|
|
3853
3815
|
this.compressionThreshold = 24 * 1000;
|
|
3854
3816
|
this.bc = null;
|
|
@@ -3873,6 +3835,9 @@ class App {
|
|
|
3873
3835
|
if (this.active())
|
|
3874
3836
|
return;
|
|
3875
3837
|
try {
|
|
3838
|
+
if (data.token) {
|
|
3839
|
+
this.session.setSessionToken(data.token, this.projectKey);
|
|
3840
|
+
}
|
|
3876
3841
|
this.allowAppStart();
|
|
3877
3842
|
void this.start();
|
|
3878
3843
|
}
|
|
@@ -4013,8 +3978,12 @@ class App {
|
|
|
4013
3978
|
}
|
|
4014
3979
|
if (this.pollingQueue[nextCommand].includes(data.context)) {
|
|
4015
3980
|
this.pollingQueue[nextCommand] = this.pollingQueue[nextCommand].filter((c) => c !== data.context);
|
|
3981
|
+
const message = { line: nextCommand };
|
|
3982
|
+
if (nextCommand === proto.startIframe) {
|
|
3983
|
+
message.token = this.session.getSessionToken(this.projectKey);
|
|
3984
|
+
}
|
|
4016
3985
|
// @ts-ignore
|
|
4017
|
-
event.source?.postMessage(
|
|
3986
|
+
event.source?.postMessage(message, '*');
|
|
4018
3987
|
if (this.pollingQueue[nextCommand].length === 0) {
|
|
4019
3988
|
this.pollingQueue.order.shift();
|
|
4020
3989
|
}
|
|
@@ -5032,7 +5001,6 @@ class App {
|
|
|
5032
5001
|
if (startOpts.startCallback) {
|
|
5033
5002
|
startOpts.startCallback(SuccessfulStart(onStartInfo));
|
|
5034
5003
|
}
|
|
5035
|
-
await this.tagWatcher.fetchTags(this.options.ingestPoint, token);
|
|
5036
5004
|
this.activityState = ActivityState.Active;
|
|
5037
5005
|
if (this.options.crossdomain?.enabled) {
|
|
5038
5006
|
void this.bootChildrenFrames();
|
|
@@ -5069,6 +5037,7 @@ class App {
|
|
|
5069
5037
|
}
|
|
5070
5038
|
this.ticker.start();
|
|
5071
5039
|
this.canvasRecorder?.startTracking();
|
|
5040
|
+
void this.tagWatcher.fetchTags(this.options.ingestPoint, token);
|
|
5072
5041
|
return SuccessfulStart(onStartInfo);
|
|
5073
5042
|
}
|
|
5074
5043
|
catch (reason) {
|
|
@@ -6172,7 +6141,7 @@ function getUniqueSiblingClass(el) {
|
|
|
6172
6141
|
return null;
|
|
6173
6142
|
}
|
|
6174
6143
|
|
|
6175
|
-
|
|
6144
|
+
let e=-1;const t=t=>{addEventListener("pageshow",(n=>{n.persisted&&(e=n.timeStamp,t(n));}),true);},n=(e,t,n,i)=>{let s,o;return r=>{t.value>=0&&(r||i)&&(o=t.value-(s??0),(o||void 0===s)&&(s=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)));}},i=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))));},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},o=()=>{const e=s();return e?.activationStart??0},r=(t,n=-1)=>{const i=s();let r="navigate";e>=0?r="back-forward-cache":i&&(document.prerendering||o()>0?r="prerender":document.wasDiscarded?r="restore":i.type&&(r=i.type.replace(/_/g,"-")));return {name:t,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},c=new WeakMap;function a(e,t){return c.get(e)||c.set(e,new t),c.get(e)}class d{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e);}}const h=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries());}));}));return i.observe({type:e,buffered:!0,...n}),i}}catch{}},f=e=>{let t=false;return ()=>{t||(e(),t=true);}};let u=-1;const l=new Set,m=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,p=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(u)||(u="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",p,true));}},v=()=>{if(u<0){const e=o(),n=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter((t=>"hidden"===t.name&&t.startTime>e))[0]?.startTime;u=n??m(),addEventListener("visibilitychange",p,true),addEventListener("prerenderingchange",p,true),t((()=>{setTimeout((()=>{u=m();}));}));}return {get firstHiddenTime(){return u},onHidden(e){l.add(e);}}},g=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),true):e();},y=[1800,3e3],E=(e,s={})=>{g((()=>{const c=v();let a,d=r("FCP");const f=h("paint",(e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<c.firstHiddenTime&&(d.value=Math.max(t.startTime-o(),0),d.entries.push(t),a(true)));}));f&&(a=n(e,d,y,s.reportAllChanges),t((t=>{d=r("FCP"),a=n(e,d,y,s.reportAllChanges),i((()=>{d.value=performance.now()-t.timeStamp,a(true);}));})));}));},b=[.1,.25],L=(e,s={})=>{const o=v();E(f((()=>{let c,f=r("CLS",0);const u=a(s,d),l=e=>{for(const t of e)u.h(t);u.i>f.value&&(f.value=u.i,f.entries=u.o,c());},m=h("layout-shift",l);m&&(c=n(e,f,b,s.reportAllChanges),o.onHidden((()=>{l(m.takeRecords()),c(true);})),t((()=>{u.i=0,f=r("CLS",0),c=n(e,f,b,s.reportAllChanges),i((()=>c()));})),setTimeout(c));})));};let P=0,T=1/0,_=0;const M=e=>{for(const t of e)t.interactionId&&(T=Math.min(T,t.interactionId),_=Math.max(_,t.interactionId),P=_?(_-T)/7+1:0);};let w;const C=()=>w?P:performance.interactionCount??0,I=()=>{"interactionCount"in performance||w||(w=h("event",M,{type:"event",buffered:true,durationThreshold:0}));};let F=0;class k{u=[];l=new Map;m;p;v(){F=C(),this.u.length=0,this.l.clear();}L(){const e=Math.min(this.u.length-1,Math.floor((C()-F)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.u.at(-1);let n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort(((e,t)=>t.P-e.P)),this.u.length>10){const e=this.u.splice(10);for(const t of e)this.l.delete(t.id);}this.p?.(n);}}}const A=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=f(e),addEventListener("visibilitychange",e,{once:true,capture:true}),t((()=>{e(),removeEventListener("visibilitychange",e,{capture:true});})));},B=[200,500],S=(e,i={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const s=v();g((()=>{I();let o,c=r("INP");const d=a(i,k),f=e=>{A((()=>{for(const t of e)d.h(t);const t=d.L();t&&t.P!==c.value&&(c.value=t.P,c.entries=t.entries,o());}));},u=h("event",f,{durationThreshold:i.durationThreshold??40});o=n(e,c,B,i.reportAllChanges),u&&(u.observe({type:"first-input",buffered:true}),s.onHidden((()=>{f(u.takeRecords()),o(true);})),t((()=>{d.v(),c=r("INP"),o=n(e,c,B,i.reportAllChanges);})));}));};class N{m;h(e){this.m?.(e);}}const q=[2500,4e3],x=(e,s={})=>{g((()=>{const c=v();let d,u=r("LCP");const l=a(s,N),m=e=>{s.reportAllChanges||(e=e.slice(-1));for(const t of e)l.h(t),t.startTime<c.firstHiddenTime&&(u.value=Math.max(t.startTime-o(),0),u.entries=[t],d());},p=h("largest-contentful-paint",m);if(p){d=n(e,u,q,s.reportAllChanges);const o=f((()=>{m(p.takeRecords()),p.disconnect(),d(true);})),c=e=>{e.isTrusted&&(A(o),removeEventListener(e.type,c,{capture:true}));};for(const e of ["keydown","click","visibilitychange"])addEventListener(e,c,{capture:true});t((t=>{u=r("LCP"),d=n(e,u,q,s.reportAllChanges),i((()=>{u.value=performance.now()-t.timeStamp,d(true);}));}));}}));},H=[800,1800],O=e=>{document.prerendering?g((()=>O(e))):"complete"!==document.readyState?addEventListener("load",(()=>O(e)),true):setTimeout(e);},$=(e,i={})=>{let c=r("TTFB"),a=n(e,c,H,i.reportAllChanges);O((()=>{const d=s();d&&(c.value=Math.max(d.responseStart-o(),0),c.entries=[d],a(true),t((()=>{c=r("TTFB",0),a=n(e,c,H,i.reportAllChanges),a(true);})));}));};
|
|
6176
6145
|
|
|
6177
6146
|
function getPaintBlocks(resources) {
|
|
6178
6147
|
const paintBlocks = [];
|
|
@@ -6305,10 +6274,10 @@ function Timing (app, opts) {
|
|
|
6305
6274
|
// onINP(): Chromium
|
|
6306
6275
|
// onLCP(): Chromium, Firefox
|
|
6307
6276
|
// onTTFB(): Chromium, Firefox, Safari
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6277
|
+
L(onVitalsSignal);
|
|
6278
|
+
S(onVitalsSignal);
|
|
6279
|
+
x(onVitalsSignal);
|
|
6280
|
+
$(onVitalsSignal);
|
|
6312
6281
|
});
|
|
6313
6282
|
app.attachStopCallback(function () {
|
|
6314
6283
|
observer.disconnect();
|
|
@@ -7109,7 +7078,9 @@ class NetworkMessage {
|
|
|
7109
7078
|
});
|
|
7110
7079
|
if (!messageInfo)
|
|
7111
7080
|
return null;
|
|
7112
|
-
const
|
|
7081
|
+
const gqlHeader = "application/graphql-response";
|
|
7082
|
+
const isGraphql = messageInfo.url.includes("/graphql")
|
|
7083
|
+
|| Object.values(messageInfo.request.headers).some(v => v.includes(gqlHeader));
|
|
7113
7084
|
if (isGraphql && messageInfo.response.body && typeof messageInfo.response.body === 'string') {
|
|
7114
7085
|
const isError = messageInfo.response.body.includes("errors");
|
|
7115
7086
|
messageInfo.status = isError ? 400 : 200;
|
|
@@ -7415,6 +7386,7 @@ class FetchProxyHandler {
|
|
|
7415
7386
|
this.tokenUrlMatcher = tokenUrlMatcher;
|
|
7416
7387
|
}
|
|
7417
7388
|
apply(target, _, argsList) {
|
|
7389
|
+
var _a;
|
|
7418
7390
|
const input = argsList[0];
|
|
7419
7391
|
const init = argsList[1];
|
|
7420
7392
|
if (!input ||
|
|
@@ -7430,6 +7402,31 @@ class FetchProxyHandler {
|
|
|
7430
7402
|
}
|
|
7431
7403
|
const item = new NetworkMessage(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
|
|
7432
7404
|
this.beforeFetch(item, input, init);
|
|
7405
|
+
const signal = (argsList[0] instanceof Request ? argsList[0].signal : undefined) ||
|
|
7406
|
+
((_a = argsList[1]) === null || _a === void 0 ? void 0 : _a.signal);
|
|
7407
|
+
// guard to avoid double-send
|
|
7408
|
+
let abortedNotified = false;
|
|
7409
|
+
const notifyAbort = () => {
|
|
7410
|
+
if (abortedNotified)
|
|
7411
|
+
return;
|
|
7412
|
+
abortedNotified = true;
|
|
7413
|
+
item.endTime = performance.now();
|
|
7414
|
+
item.duration = item.endTime - (item.startTime || item.endTime);
|
|
7415
|
+
item.status = 0;
|
|
7416
|
+
item.statusText = "Aborted";
|
|
7417
|
+
item.readyState = 0;
|
|
7418
|
+
const msg = item.getMessage();
|
|
7419
|
+
if (msg)
|
|
7420
|
+
this.sendMessage(msg);
|
|
7421
|
+
};
|
|
7422
|
+
if (signal) {
|
|
7423
|
+
if (signal.aborted) {
|
|
7424
|
+
notifyAbort();
|
|
7425
|
+
}
|
|
7426
|
+
else {
|
|
7427
|
+
signal.addEventListener("abort", notifyAbort, { once: true });
|
|
7428
|
+
}
|
|
7429
|
+
}
|
|
7433
7430
|
this.setSessionTokenHeader((name, value) => {
|
|
7434
7431
|
if (this.tokenUrlMatcher !== undefined) {
|
|
7435
7432
|
if (!this.tokenUrlMatcher(item.url)) {
|
|
@@ -7458,11 +7455,22 @@ class FetchProxyHandler {
|
|
|
7458
7455
|
}
|
|
7459
7456
|
});
|
|
7460
7457
|
return target.apply(window, argsList)
|
|
7461
|
-
.then(this.afterFetch(item)
|
|
7458
|
+
.then(this.afterFetch(item, () => {
|
|
7459
|
+
abortedNotified = true;
|
|
7460
|
+
}))
|
|
7462
7461
|
.catch((e) => {
|
|
7463
|
-
// mock finally
|
|
7464
7462
|
item.endTime = performance.now();
|
|
7465
7463
|
item.duration = item.endTime - (item.startTime || item.endTime);
|
|
7464
|
+
if (e && e.name === "AbortError") {
|
|
7465
|
+
item.status = 0;
|
|
7466
|
+
item.statusText = "Aborted";
|
|
7467
|
+
item.readyState = 0;
|
|
7468
|
+
if (!abortedNotified) {
|
|
7469
|
+
const msg = item.getMessage();
|
|
7470
|
+
if (msg)
|
|
7471
|
+
this.sendMessage(msg);
|
|
7472
|
+
}
|
|
7473
|
+
}
|
|
7466
7474
|
throw e;
|
|
7467
7475
|
});
|
|
7468
7476
|
}
|
|
@@ -7514,8 +7522,10 @@ class FetchProxyHandler {
|
|
|
7514
7522
|
item.requestData = genStringBody(init.body);
|
|
7515
7523
|
}
|
|
7516
7524
|
}
|
|
7517
|
-
afterFetch(item) {
|
|
7525
|
+
afterFetch(item, onResolved) {
|
|
7518
7526
|
return (resp) => {
|
|
7527
|
+
if (onResolved)
|
|
7528
|
+
onResolved === null || onResolved === void 0 ? void 0 : onResolved();
|
|
7519
7529
|
item.endTime = performance.now();
|
|
7520
7530
|
item.duration = item.endTime - (item.startTime || item.endTime);
|
|
7521
7531
|
item.status = resp.status;
|
|
@@ -7551,7 +7561,15 @@ class FetchProxyHandler {
|
|
|
7551
7561
|
}
|
|
7552
7562
|
})
|
|
7553
7563
|
.catch((e) => {
|
|
7554
|
-
if (e.name
|
|
7564
|
+
if (e.name === "AbortError") {
|
|
7565
|
+
item.status = 0;
|
|
7566
|
+
item.statusText = "Aborted";
|
|
7567
|
+
item.readyState = 0;
|
|
7568
|
+
const msg = item.getMessage();
|
|
7569
|
+
if (msg)
|
|
7570
|
+
this.sendMessage(msg);
|
|
7571
|
+
}
|
|
7572
|
+
else {
|
|
7555
7573
|
throw e;
|
|
7556
7574
|
}
|
|
7557
7575
|
});
|
|
@@ -8241,6 +8259,8 @@ function webAnimations(app, options = {}) {
|
|
|
8241
8259
|
const lastKF = anim.effect.getKeyframes().at(-1);
|
|
8242
8260
|
if (!lastKF)
|
|
8243
8261
|
return;
|
|
8262
|
+
if (!el || !(el instanceof Element) || !el.isConnected)
|
|
8263
|
+
return;
|
|
8244
8264
|
const computedStyle = getComputedStyle(el);
|
|
8245
8265
|
const keys = Object.keys(lastKF).filter((p) => !toIgnore.includes(p));
|
|
8246
8266
|
// @ts-ignore
|
|
@@ -8652,7 +8672,7 @@ class ConstantProperties {
|
|
|
8652
8672
|
user_id: this.user_id,
|
|
8653
8673
|
distinct_id: this.deviceId,
|
|
8654
8674
|
sdk_edition: 'web',
|
|
8655
|
-
sdk_version: '17.2.
|
|
8675
|
+
sdk_version: '17.2.6',
|
|
8656
8676
|
timezone: getUTCOffsetString(),
|
|
8657
8677
|
search_engine: this.searchEngine,
|
|
8658
8678
|
};
|
|
@@ -9354,7 +9374,7 @@ class API {
|
|
|
9354
9374
|
this.signalStartIssue = (reason, missingApi) => {
|
|
9355
9375
|
const doNotTrack = this.checkDoNotTrack();
|
|
9356
9376
|
console.log("Tracker couldn't start due to:", JSON.stringify({
|
|
9357
|
-
trackerVersion: '17.2.
|
|
9377
|
+
trackerVersion: '17.2.6',
|
|
9358
9378
|
projectKey: this.options.projectKey,
|
|
9359
9379
|
doNotTrack,
|
|
9360
9380
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|