@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/cjs/entry.js
CHANGED
|
@@ -1746,7 +1746,7 @@ class CanvasRecorder {
|
|
|
1746
1746
|
setTimeout(() => {
|
|
1747
1747
|
this.app.nodes.scanTree(this.captureCanvas);
|
|
1748
1748
|
this.app.nodes.attachNodeCallback(this.captureCanvas);
|
|
1749
|
-
},
|
|
1749
|
+
}, 125);
|
|
1750
1750
|
}
|
|
1751
1751
|
sendSnaps(images, canvasId, createdAt) {
|
|
1752
1752
|
if (Object.keys(this.snapshots).length === 0) {
|
|
@@ -1777,14 +1777,20 @@ class CanvasRecorder {
|
|
|
1777
1777
|
}
|
|
1778
1778
|
async uploadBatch(images, canvasId, createdAt) {
|
|
1779
1779
|
if (this.options.isDebug) {
|
|
1780
|
-
const
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1780
|
+
const packed = await packFrames(images);
|
|
1781
|
+
if (packed) {
|
|
1782
|
+
const fileName = `${createdAt}_${canvasId}.${this.fileExt}.frames`;
|
|
1783
|
+
const url = URL.createObjectURL(new Blob([packed]));
|
|
1784
|
+
const link = document.createElement('a');
|
|
1785
|
+
link.href = url;
|
|
1786
|
+
link.download = fileName;
|
|
1787
|
+
link.style.display = 'none';
|
|
1788
|
+
document.body.appendChild(link);
|
|
1789
|
+
link.click();
|
|
1790
|
+
document.body.removeChild(link);
|
|
1791
|
+
URL.revokeObjectURL(url);
|
|
1792
|
+
}
|
|
1793
|
+
// fall through to also send to backend
|
|
1788
1794
|
}
|
|
1789
1795
|
let formData;
|
|
1790
1796
|
if (this.options.framesSupport) {
|
|
@@ -1929,80 +1935,36 @@ function captureSnapshot(canvas, quality = 'medium', dummy, fixedScaling = false
|
|
|
1929
1935
|
canvas.toBlob(onBlob, imageFormat, qualityInt[quality]);
|
|
1930
1936
|
}
|
|
1931
1937
|
}
|
|
1932
|
-
async function
|
|
1933
|
-
const
|
|
1934
|
-
|
|
1935
|
-
const
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
const
|
|
1946
|
-
const
|
|
1938
|
+
async function packFrames(images) {
|
|
1939
|
+
const buffers = [];
|
|
1940
|
+
let totalSize = 0;
|
|
1941
|
+
for (const snapshot of images) {
|
|
1942
|
+
if (!snapshot.data)
|
|
1943
|
+
continue;
|
|
1944
|
+
const ab = await snapshot.data.arrayBuffer();
|
|
1945
|
+
buffers.push(ab);
|
|
1946
|
+
totalSize += 8 + 4 + ab.byteLength;
|
|
1947
|
+
}
|
|
1948
|
+
if (totalSize === 0)
|
|
1949
|
+
return null;
|
|
1950
|
+
const packed = new ArrayBuffer(totalSize);
|
|
1951
|
+
const view = new DataView(packed);
|
|
1952
|
+
const bytes = new Uint8Array(packed);
|
|
1947
1953
|
let offset = 0;
|
|
1948
|
-
for (
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
const
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
local.set(nameBytes, 30);
|
|
1963
|
-
// Central directory entry (46 bytes + filename)
|
|
1964
|
-
const cd = new Uint8Array(46 + nameBytes.length);
|
|
1965
|
-
const cv = new DataView(cd.buffer);
|
|
1966
|
-
cv.setUint32(0, 0x02014b50, true);
|
|
1967
|
-
cv.setUint16(4, 20, true);
|
|
1968
|
-
cv.setUint16(6, 20, true);
|
|
1969
|
-
cv.setUint32(16, crc, true);
|
|
1970
|
-
cv.setUint32(20, dataBytes.length, true);
|
|
1971
|
-
cv.setUint32(24, dataBytes.length, true);
|
|
1972
|
-
cv.setUint16(28, nameBytes.length, true);
|
|
1973
|
-
cv.setUint32(42, offset, true);
|
|
1974
|
-
cd.set(nameBytes, 46);
|
|
1975
|
-
parts.push(local);
|
|
1976
|
-
parts.push(dataBytes);
|
|
1977
|
-
centralDir.push(cd);
|
|
1978
|
-
offset += local.length + dataBytes.length;
|
|
1979
|
-
}
|
|
1980
|
-
const cdOffset = offset;
|
|
1981
|
-
let cdSize = 0;
|
|
1982
|
-
for (const entry of centralDir) {
|
|
1983
|
-
parts.push(entry);
|
|
1984
|
-
cdSize += entry.length;
|
|
1985
|
-
}
|
|
1986
|
-
// End of central directory (22 bytes)
|
|
1987
|
-
const eocd = new Uint8Array(22);
|
|
1988
|
-
const ev = new DataView(eocd.buffer);
|
|
1989
|
-
ev.setUint32(0, 0x06054b50, true);
|
|
1990
|
-
ev.setUint16(8, files.length, true);
|
|
1991
|
-
ev.setUint16(10, files.length, true);
|
|
1992
|
-
ev.setUint32(12, cdSize, true);
|
|
1993
|
-
ev.setUint32(16, cdOffset, true);
|
|
1994
|
-
parts.push(eocd);
|
|
1995
|
-
return new Blob(parts, { type: 'application/zip' });
|
|
1996
|
-
}
|
|
1997
|
-
function crc32(data) {
|
|
1998
|
-
let crc = 0xffffffff;
|
|
1999
|
-
for (let i = 0; i < data.length; i++) {
|
|
2000
|
-
crc ^= data[i];
|
|
2001
|
-
for (let j = 0; j < 8; j++) {
|
|
2002
|
-
crc = (crc >>> 1) ^ (crc & 1 ? 0xedb88320 : 0);
|
|
2003
|
-
}
|
|
2004
|
-
}
|
|
2005
|
-
return (crc ^ 0xffffffff) >>> 0;
|
|
1954
|
+
for (let i = 0; i < images.length; i++) {
|
|
1955
|
+
if (!images[i].data)
|
|
1956
|
+
continue;
|
|
1957
|
+
const ab = buffers.shift();
|
|
1958
|
+
const ts = images[i].id;
|
|
1959
|
+
view.setUint32(offset, ts % 0x100000000, true);
|
|
1960
|
+
view.setUint32(offset + 4, Math.floor(ts / 0x100000000), true);
|
|
1961
|
+
offset += 8;
|
|
1962
|
+
view.setUint32(offset, ab.byteLength, true);
|
|
1963
|
+
offset += 4;
|
|
1964
|
+
bytes.set(new Uint8Array(ab), offset);
|
|
1965
|
+
offset += ab.byteLength;
|
|
1966
|
+
}
|
|
1967
|
+
return packed;
|
|
2006
1968
|
}
|
|
2007
1969
|
|
|
2008
1970
|
const LogLevel = {
|
|
@@ -3852,7 +3814,7 @@ class App {
|
|
|
3852
3814
|
this.stopCallbacks = [];
|
|
3853
3815
|
this.commitCallbacks = [];
|
|
3854
3816
|
this.activityState = ActivityState.NotActive;
|
|
3855
|
-
this.version = '17.2.
|
|
3817
|
+
this.version = '17.2.6'; // TODO: version compatability check inside each plugin.
|
|
3856
3818
|
this.socketMode = false;
|
|
3857
3819
|
this.compressionThreshold = 24 * 1000;
|
|
3858
3820
|
this.bc = null;
|
|
@@ -3877,6 +3839,9 @@ class App {
|
|
|
3877
3839
|
if (this.active())
|
|
3878
3840
|
return;
|
|
3879
3841
|
try {
|
|
3842
|
+
if (data.token) {
|
|
3843
|
+
this.session.setSessionToken(data.token, this.projectKey);
|
|
3844
|
+
}
|
|
3880
3845
|
this.allowAppStart();
|
|
3881
3846
|
void this.start();
|
|
3882
3847
|
}
|
|
@@ -4017,8 +3982,12 @@ class App {
|
|
|
4017
3982
|
}
|
|
4018
3983
|
if (this.pollingQueue[nextCommand].includes(data.context)) {
|
|
4019
3984
|
this.pollingQueue[nextCommand] = this.pollingQueue[nextCommand].filter((c) => c !== data.context);
|
|
3985
|
+
const message = { line: nextCommand };
|
|
3986
|
+
if (nextCommand === proto.startIframe) {
|
|
3987
|
+
message.token = this.session.getSessionToken(this.projectKey);
|
|
3988
|
+
}
|
|
4020
3989
|
// @ts-ignore
|
|
4021
|
-
event.source?.postMessage(
|
|
3990
|
+
event.source?.postMessage(message, '*');
|
|
4022
3991
|
if (this.pollingQueue[nextCommand].length === 0) {
|
|
4023
3992
|
this.pollingQueue.order.shift();
|
|
4024
3993
|
}
|
|
@@ -5036,7 +5005,6 @@ class App {
|
|
|
5036
5005
|
if (startOpts.startCallback) {
|
|
5037
5006
|
startOpts.startCallback(SuccessfulStart(onStartInfo));
|
|
5038
5007
|
}
|
|
5039
|
-
await this.tagWatcher.fetchTags(this.options.ingestPoint, token);
|
|
5040
5008
|
this.activityState = ActivityState.Active;
|
|
5041
5009
|
if (this.options.crossdomain?.enabled) {
|
|
5042
5010
|
void this.bootChildrenFrames();
|
|
@@ -5073,6 +5041,7 @@ class App {
|
|
|
5073
5041
|
}
|
|
5074
5042
|
this.ticker.start();
|
|
5075
5043
|
this.canvasRecorder?.startTracking();
|
|
5044
|
+
void this.tagWatcher.fetchTags(this.options.ingestPoint, token);
|
|
5076
5045
|
return SuccessfulStart(onStartInfo);
|
|
5077
5046
|
}
|
|
5078
5047
|
catch (reason) {
|
|
@@ -6176,7 +6145,7 @@ function getUniqueSiblingClass(el) {
|
|
|
6176
6145
|
return null;
|
|
6177
6146
|
}
|
|
6178
6147
|
|
|
6179
|
-
|
|
6148
|
+
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);})));}));};
|
|
6180
6149
|
|
|
6181
6150
|
function getPaintBlocks(resources) {
|
|
6182
6151
|
const paintBlocks = [];
|
|
@@ -6309,10 +6278,10 @@ function Timing (app, opts) {
|
|
|
6309
6278
|
// onINP(): Chromium
|
|
6310
6279
|
// onLCP(): Chromium, Firefox
|
|
6311
6280
|
// onTTFB(): Chromium, Firefox, Safari
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6281
|
+
L(onVitalsSignal);
|
|
6282
|
+
S(onVitalsSignal);
|
|
6283
|
+
x(onVitalsSignal);
|
|
6284
|
+
$(onVitalsSignal);
|
|
6316
6285
|
});
|
|
6317
6286
|
app.attachStopCallback(function () {
|
|
6318
6287
|
observer.disconnect();
|
|
@@ -7113,7 +7082,9 @@ class NetworkMessage {
|
|
|
7113
7082
|
});
|
|
7114
7083
|
if (!messageInfo)
|
|
7115
7084
|
return null;
|
|
7116
|
-
const
|
|
7085
|
+
const gqlHeader = "application/graphql-response";
|
|
7086
|
+
const isGraphql = messageInfo.url.includes("/graphql")
|
|
7087
|
+
|| Object.values(messageInfo.request.headers).some(v => v.includes(gqlHeader));
|
|
7117
7088
|
if (isGraphql && messageInfo.response.body && typeof messageInfo.response.body === 'string') {
|
|
7118
7089
|
const isError = messageInfo.response.body.includes("errors");
|
|
7119
7090
|
messageInfo.status = isError ? 400 : 200;
|
|
@@ -7419,6 +7390,7 @@ class FetchProxyHandler {
|
|
|
7419
7390
|
this.tokenUrlMatcher = tokenUrlMatcher;
|
|
7420
7391
|
}
|
|
7421
7392
|
apply(target, _, argsList) {
|
|
7393
|
+
var _a;
|
|
7422
7394
|
const input = argsList[0];
|
|
7423
7395
|
const init = argsList[1];
|
|
7424
7396
|
if (!input ||
|
|
@@ -7434,6 +7406,31 @@ class FetchProxyHandler {
|
|
|
7434
7406
|
}
|
|
7435
7407
|
const item = new NetworkMessage(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
|
|
7436
7408
|
this.beforeFetch(item, input, init);
|
|
7409
|
+
const signal = (argsList[0] instanceof Request ? argsList[0].signal : undefined) ||
|
|
7410
|
+
((_a = argsList[1]) === null || _a === void 0 ? void 0 : _a.signal);
|
|
7411
|
+
// guard to avoid double-send
|
|
7412
|
+
let abortedNotified = false;
|
|
7413
|
+
const notifyAbort = () => {
|
|
7414
|
+
if (abortedNotified)
|
|
7415
|
+
return;
|
|
7416
|
+
abortedNotified = true;
|
|
7417
|
+
item.endTime = performance.now();
|
|
7418
|
+
item.duration = item.endTime - (item.startTime || item.endTime);
|
|
7419
|
+
item.status = 0;
|
|
7420
|
+
item.statusText = "Aborted";
|
|
7421
|
+
item.readyState = 0;
|
|
7422
|
+
const msg = item.getMessage();
|
|
7423
|
+
if (msg)
|
|
7424
|
+
this.sendMessage(msg);
|
|
7425
|
+
};
|
|
7426
|
+
if (signal) {
|
|
7427
|
+
if (signal.aborted) {
|
|
7428
|
+
notifyAbort();
|
|
7429
|
+
}
|
|
7430
|
+
else {
|
|
7431
|
+
signal.addEventListener("abort", notifyAbort, { once: true });
|
|
7432
|
+
}
|
|
7433
|
+
}
|
|
7437
7434
|
this.setSessionTokenHeader((name, value) => {
|
|
7438
7435
|
if (this.tokenUrlMatcher !== undefined) {
|
|
7439
7436
|
if (!this.tokenUrlMatcher(item.url)) {
|
|
@@ -7462,11 +7459,22 @@ class FetchProxyHandler {
|
|
|
7462
7459
|
}
|
|
7463
7460
|
});
|
|
7464
7461
|
return target.apply(window, argsList)
|
|
7465
|
-
.then(this.afterFetch(item)
|
|
7462
|
+
.then(this.afterFetch(item, () => {
|
|
7463
|
+
abortedNotified = true;
|
|
7464
|
+
}))
|
|
7466
7465
|
.catch((e) => {
|
|
7467
|
-
// mock finally
|
|
7468
7466
|
item.endTime = performance.now();
|
|
7469
7467
|
item.duration = item.endTime - (item.startTime || item.endTime);
|
|
7468
|
+
if (e && e.name === "AbortError") {
|
|
7469
|
+
item.status = 0;
|
|
7470
|
+
item.statusText = "Aborted";
|
|
7471
|
+
item.readyState = 0;
|
|
7472
|
+
if (!abortedNotified) {
|
|
7473
|
+
const msg = item.getMessage();
|
|
7474
|
+
if (msg)
|
|
7475
|
+
this.sendMessage(msg);
|
|
7476
|
+
}
|
|
7477
|
+
}
|
|
7470
7478
|
throw e;
|
|
7471
7479
|
});
|
|
7472
7480
|
}
|
|
@@ -7518,8 +7526,10 @@ class FetchProxyHandler {
|
|
|
7518
7526
|
item.requestData = genStringBody(init.body);
|
|
7519
7527
|
}
|
|
7520
7528
|
}
|
|
7521
|
-
afterFetch(item) {
|
|
7529
|
+
afterFetch(item, onResolved) {
|
|
7522
7530
|
return (resp) => {
|
|
7531
|
+
if (onResolved)
|
|
7532
|
+
onResolved === null || onResolved === void 0 ? void 0 : onResolved();
|
|
7523
7533
|
item.endTime = performance.now();
|
|
7524
7534
|
item.duration = item.endTime - (item.startTime || item.endTime);
|
|
7525
7535
|
item.status = resp.status;
|
|
@@ -7555,7 +7565,15 @@ class FetchProxyHandler {
|
|
|
7555
7565
|
}
|
|
7556
7566
|
})
|
|
7557
7567
|
.catch((e) => {
|
|
7558
|
-
if (e.name
|
|
7568
|
+
if (e.name === "AbortError") {
|
|
7569
|
+
item.status = 0;
|
|
7570
|
+
item.statusText = "Aborted";
|
|
7571
|
+
item.readyState = 0;
|
|
7572
|
+
const msg = item.getMessage();
|
|
7573
|
+
if (msg)
|
|
7574
|
+
this.sendMessage(msg);
|
|
7575
|
+
}
|
|
7576
|
+
else {
|
|
7559
7577
|
throw e;
|
|
7560
7578
|
}
|
|
7561
7579
|
});
|
|
@@ -8245,6 +8263,8 @@ function webAnimations(app, options = {}) {
|
|
|
8245
8263
|
const lastKF = anim.effect.getKeyframes().at(-1);
|
|
8246
8264
|
if (!lastKF)
|
|
8247
8265
|
return;
|
|
8266
|
+
if (!el || !(el instanceof Element) || !el.isConnected)
|
|
8267
|
+
return;
|
|
8248
8268
|
const computedStyle = getComputedStyle(el);
|
|
8249
8269
|
const keys = Object.keys(lastKF).filter((p) => !toIgnore.includes(p));
|
|
8250
8270
|
// @ts-ignore
|
|
@@ -8656,7 +8676,7 @@ class ConstantProperties {
|
|
|
8656
8676
|
user_id: this.user_id,
|
|
8657
8677
|
distinct_id: this.deviceId,
|
|
8658
8678
|
sdk_edition: 'web',
|
|
8659
|
-
sdk_version: '17.2.
|
|
8679
|
+
sdk_version: '17.2.6',
|
|
8660
8680
|
timezone: getUTCOffsetString(),
|
|
8661
8681
|
search_engine: this.searchEngine,
|
|
8662
8682
|
};
|
|
@@ -9358,7 +9378,7 @@ class API {
|
|
|
9358
9378
|
this.signalStartIssue = (reason, missingApi) => {
|
|
9359
9379
|
const doNotTrack = this.checkDoNotTrack();
|
|
9360
9380
|
console.log("Tracker couldn't start due to:", JSON.stringify({
|
|
9361
|
-
trackerVersion: '17.2.
|
|
9381
|
+
trackerVersion: '17.2.6',
|
|
9362
9382
|
projectKey: this.options.projectKey,
|
|
9363
9383
|
doNotTrack,
|
|
9364
9384
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|