Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

perfume.js

Package Overview
Dependencies
Maintainers
1
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

perfume.js - npm Package Compare versions

Comparing version 5.0.0-rc.18 to 5.0.0-rc.19

4

CHANGELOG.md
# Changelog
## 5.0.0-rc.19 (2020-5-6)
* **fix:** added extra check to avoid multiple `disconnectPerfObserversHidden` calls
## 5.0.0-rc.18 (2020-5-6)

@@ -4,0 +8,0 @@

20

dist/es/observe.js

@@ -23,10 +23,16 @@ import { config } from './config';

export var disconnectPerfObserversHidden = function () {
logMetric(lcp.value, "lcpFinal");
poDisconnect(2);
perfObservers[3].takeRecords();
logMetric(cls.value, "clsFinal");
poDisconnect(3);
logMetric(tbt.value, "tbtFinal");
poDisconnect(4);
if (perfObservers[2]) {
logMetric(lcp.value, "lcpFinal");
poDisconnect(2);
}
if (perfObservers[3]) {
perfObservers[3].takeRecords();
logMetric(cls.value, "clsFinal");
poDisconnect(3);
}
if (perfObservers[4]) {
logMetric(tbt.value, "tbtFinal");
poDisconnect(4);
}
};
//# sourceMappingURL=observe.js.map
/*!
* Perfume.js v5.0.0-rc.18 (http://zizzamia.github.io/perfume)
* Perfume.js v5.0.0-rc.19 (http://zizzamia.github.io/perfume)
* Copyright 2020 Leonardo Zizzamia (https://github.com/Zizzamia/perfume.js/graphs/contributors)

@@ -22,3 +22,3 @@ * Licensed under MIT (https://github.com/Zizzamia/perfume.js/blob/master/LICENSE)

if (options === void 0) { options = {}; }
this.v = '5.0.0-rc.18';
this.v = '5.0.0-rc.19';
// Extend default config with external options

@@ -25,0 +25,0 @@ config.analyticsTracker = options.analyticsTracker;

@@ -25,10 +25,16 @@ "use strict";

exports.disconnectPerfObserversHidden = function () {
log_1.logMetric(metrics_1.lcp.value, "lcpFinal");
performanceObserver_1.poDisconnect(2);
observeInstances_1.perfObservers[3].takeRecords();
log_1.logMetric(metrics_1.cls.value, "clsFinal");
performanceObserver_1.poDisconnect(3);
log_1.logMetric(metrics_1.tbt.value, "tbtFinal");
performanceObserver_1.poDisconnect(4);
if (observeInstances_1.perfObservers[2]) {
log_1.logMetric(metrics_1.lcp.value, "lcpFinal");
performanceObserver_1.poDisconnect(2);
}
if (observeInstances_1.perfObservers[3]) {
observeInstances_1.perfObservers[3].takeRecords();
log_1.logMetric(metrics_1.cls.value, "clsFinal");
performanceObserver_1.poDisconnect(3);
}
if (observeInstances_1.perfObservers[4]) {
log_1.logMetric(metrics_1.tbt.value, "tbtFinal");
performanceObserver_1.poDisconnect(4);
}
};
//# sourceMappingURL=observe.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/*!
* Perfume.js v5.0.0-rc.18 (http://zizzamia.github.io/perfume)
* Perfume.js v5.0.0-rc.19 (http://zizzamia.github.io/perfume)
* Copyright 2020 Leonardo Zizzamia (https://github.com/Zizzamia/perfume.js/graphs/contributors)

@@ -24,3 +24,3 @@ * Licensed under MIT (https://github.com/Zizzamia/perfume.js/blob/master/LICENSE)

if (options === void 0) { options = {}; }
this.v = '5.0.0-rc.18';
this.v = '5.0.0-rc.19';
// Extend default config with external options

@@ -27,0 +27,0 @@ config_1.config.analyticsTracker = options.analyticsTracker;

@@ -1,2 +0,2 @@

var n={t:!1,i:15e3},t=window,e=t.console,i=document,r=t.navigator,o=t.performance,u=function(){return r.deviceMemory},a=function(){return r.hardwareConcurrency},c=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(a()&&a()<=4)||!!(u()&&u()<=4)},m=function(n,t){return!!l()||(!!["slow-2g","2g","3g"].includes(n)||!!t)},v={o:!1},d=function(n){i.hidden&&(n(),v.o=i.hidden)},p=function(n){return parseFloat(n.toFixed(2))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},k=function(e,i,o){var c;c=function(){v.o&&e.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:e,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:a()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(f,s)}:{}})},"requestIdleCallback"in t?t.requestIdleCallback(c,{timeout:3e3}):c()},b=function(n,t,e){Object.keys(t).forEach((function(n){"number"==typeof t[n]&&(t[n]=p(t[n]))})),k(n,t,e)},h=function(t,e){var i=p(t);i<=n.i&&i>0&&k(e,i)},T=function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var t=o.getEntriesByName(n).pop();return t&&"measure"===t.entryType?t.duration:-1},_={},w={value:0},y={value:0},F={value:0},x={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},D={value:0},E=function(n){var t=n.pop();t&&!t.u&&t.value&&(w.value+=t.value)},P={},S=function(n,t){try{var i=new PerformanceObserver((function(n){t(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){e.warn("Perfume.js:",n)}return null},j=function(n){P[n]&&P[n].disconnect(),delete P[n]},q=function(n){var t=n.pop();t&&h(t.duration,"fid"),j(1),h(F.value,"lcp"),P[3]&&P[3].takeRecords(),h(w.value,"cls"),h(D.value,"tbt"),setTimeout((function(){h(D.value,"tbt5S")}),5e3),setTimeout((function(){h(D.value,"tbt10S"),b("dataConsumption",x.value)}),1e4)},C=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<y.value)){var t=n.duration-50;t>0&&(D.value+=t)}}))},I=function(n){n.forEach((function(n){"first-paint"===n.name?h(n.startTime,"fp"):"first-contentful-paint"===n.name&&(y.value=n.startTime,h(y.value,"fcp"),P[4]=S("longtask",C),j(0))}))},L=function(n){var t=n.pop();t&&(F.value=t.renderTime||t.loadTime)},O=function(t){t.forEach((function(t){if(n.t&&b("resourceTiming",t),t.decodedBodySize&&t.initiatorType){var e=t.decodedBodySize/1e3;x.value[t.initiatorType]+=e,x.value.total+=e}}))},W=function(){h(F.value,"lcpFinal"),j(2),P[3].takeRecords(),h(w.value,"clsFinal"),j(3),h(D.value,"tbtFinal"),j(4)},B=function(n){var t="usageDetails"in n?n.usageDetails:{};b("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(t.caches),indexedDB:g(t.indexedDB),serviceWorker:g(t.serviceWorkerRegistrations)})},M=function(){function e(e){void 0===e&&(e={}),this.s="5.0.0-rc.18",n.analyticsTracker=e.analyticsTracker,n.t=!!e.resourceTiming,n.i=e.maxMeasureTime||n.i,c()&&("PerformanceObserver"in t&&(P[0]=S("paint",I),P[1]=S("first-input",q),P[2]=S("largest-contentful-paint",L),n.t&&S("resource",O),P[3]=S("layout-shift",E)),void 0!==i.hidden&&i.addEventListener("visibilitychange",d.bind(this,W)),b("navigationTiming",function(){if(!c())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var t=n.responseStart,e=n.responseEnd;return{fetchTime:e-n.fetchStart,workerTime:n.workerStart>0?e-n.workerStart:0,totalTime:e-n.requestStart,downloadTime:e-t,timeToFirstByte:t-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart}}()),b("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&r.storage.estimate().then(B))}return e.prototype.start=function(n){c()&&!_[n]&&(_[n]=!0,o.mark("mark_"+n+"_start"),v.o=!1)},e.prototype.end=function(n,t){void 0===t&&(t={}),c()&&_[n]&&(o.mark("mark_"+n+"_end"),delete _[n],b(n,{data:p(T(n))},t))},e.prototype.endPaint=function(n,t){var e=this;setTimeout((function(){e.end(n,t)}))},e.prototype.clear=function(n){delete _[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},e}();export default M;
var n={t:!1,i:15e3},t=window,e=t.console,i=document,r=t.navigator,o=t.performance,u=function(){return r.deviceMemory},a=function(){return r.hardwareConcurrency},c=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(a()&&a()<=4)||!!(u()&&u()<=4)},m=function(n,t){return!!l()||(!!["slow-2g","2g","3g"].includes(n)||!!t)},v={o:!1},d=function(n){i.hidden&&(n(),v.o=i.hidden)},p=function(n){return parseFloat(n.toFixed(2))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},k=function(e,i,o){var c;c=function(){v.o&&e.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:e,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:a()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(f,s)}:{}})},"requestIdleCallback"in t?t.requestIdleCallback(c,{timeout:3e3}):c()},b=function(n,t,e){Object.keys(t).forEach((function(n){"number"==typeof t[n]&&(t[n]=p(t[n]))})),k(n,t,e)},h=function(t,e){var i=p(t);i<=n.i&&i>0&&k(e,i)},T=function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var t=o.getEntriesByName(n).pop();return t&&"measure"===t.entryType?t.duration:-1},_={},w={value:0},y={value:0},F={value:0},x={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},D={value:0},E=function(n){var t=n.pop();t&&!t.u&&t.value&&(w.value+=t.value)},P={},S=function(n,t){try{var i=new PerformanceObserver((function(n){t(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){e.warn("Perfume.js:",n)}return null},j=function(n){P[n]&&P[n].disconnect(),delete P[n]},q=function(n){var t=n.pop();t&&h(t.duration,"fid"),j(1),h(F.value,"lcp"),P[3]&&P[3].takeRecords(),h(w.value,"cls"),h(D.value,"tbt"),setTimeout((function(){h(D.value,"tbt5S")}),5e3),setTimeout((function(){h(D.value,"tbt10S"),b("dataConsumption",x.value)}),1e4)},C=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<y.value)){var t=n.duration-50;t>0&&(D.value+=t)}}))},I=function(n){n.forEach((function(n){"first-paint"===n.name?h(n.startTime,"fp"):"first-contentful-paint"===n.name&&(y.value=n.startTime,h(y.value,"fcp"),P[4]=S("longtask",C),j(0))}))},L=function(n){var t=n.pop();t&&(F.value=t.renderTime||t.loadTime)},O=function(t){t.forEach((function(t){if(n.t&&b("resourceTiming",t),t.decodedBodySize&&t.initiatorType){var e=t.decodedBodySize/1e3;x.value[t.initiatorType]+=e,x.value.total+=e}}))},W=function(){P[2]&&(h(F.value,"lcpFinal"),j(2)),P[3]&&(P[3].takeRecords(),h(w.value,"clsFinal"),j(3)),P[4]&&(h(D.value,"tbtFinal"),j(4))},B=function(n){var t="usageDetails"in n?n.usageDetails:{};b("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(t.caches),indexedDB:g(t.indexedDB),serviceWorker:g(t.serviceWorkerRegistrations)})},M=function(){function e(e){void 0===e&&(e={}),this.s="5.0.0-rc.19",n.analyticsTracker=e.analyticsTracker,n.t=!!e.resourceTiming,n.i=e.maxMeasureTime||n.i,c()&&("PerformanceObserver"in t&&(P[0]=S("paint",I),P[1]=S("first-input",q),P[2]=S("largest-contentful-paint",L),n.t&&S("resource",O),P[3]=S("layout-shift",E)),void 0!==i.hidden&&i.addEventListener("visibilitychange",d.bind(this,W)),b("navigationTiming",function(){if(!c())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var t=n.responseStart,e=n.responseEnd;return{fetchTime:e-n.fetchStart,workerTime:n.workerStart>0?e-n.workerStart:0,totalTime:e-n.requestStart,downloadTime:e-t,timeToFirstByte:t-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart}}()),b("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&r.storage.estimate().then(B))}return e.prototype.start=function(n){c()&&!_[n]&&(_[n]=!0,o.mark("mark_"+n+"_start"),v.o=!1)},e.prototype.end=function(n,t){void 0===t&&(t={}),c()&&_[n]&&(o.mark("mark_"+n+"_end"),delete _[n],b(n,{data:p(T(n))},t))},e.prototype.endPaint=function(n,t){var e=this;setTimeout((function(){e.end(n,t)}))},e.prototype.clear=function(n){delete _[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},e}();export default M;
//# sourceMappingURL=perfume.esm.min.js.map

@@ -1,2 +0,2 @@

var Perfume=function(){"use strict";var n={t:!1,i:15e3},t=window,e=t.console,i=document,r=t.navigator,o=t.performance,u=function(){return r.deviceMemory},a=function(){return r.hardwareConcurrency},c=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(a()&&a()<=4)||!!(u()&&u()<=4)},m=function(n,t){return!!l()||(!!["slow-2g","2g","3g"].includes(n)||!!t)},v={o:!1},d=function(n){i.hidden&&(n(),v.o=i.hidden)},p=function(n){return parseFloat(n.toFixed(2))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},k=function(e,i,o){var c;c=function(){v.o&&e.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:e,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:a()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(f,s)}:{}})},"requestIdleCallback"in t?t.requestIdleCallback(c,{timeout:3e3}):c()},b=function(n,t,e){Object.keys(t).forEach((function(n){"number"==typeof t[n]&&(t[n]=p(t[n]))})),k(n,t,e)},h=function(t,e){var i=p(t);i<=n.i&&i>0&&k(e,i)},T=function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var t=o.getEntriesByName(n).pop();return t&&"measure"===t.entryType?t.duration:-1},_={},w={value:0},y={value:0},F={value:0},P={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},x={value:0},D=function(n){var t=n.pop();t&&!t.u&&t.value&&(w.value+=t.value)},E={},S=function(n,t){try{var i=new PerformanceObserver((function(n){t(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){e.warn("Perfume.js:",n)}return null},j=function(n){E[n]&&E[n].disconnect(),delete E[n]},q=function(n){var t=n.pop();t&&h(t.duration,"fid"),j(1),h(F.value,"lcp"),E[3]&&E[3].takeRecords(),h(w.value,"cls"),h(x.value,"tbt"),setTimeout((function(){h(x.value,"tbt5S")}),5e3),setTimeout((function(){h(x.value,"tbt10S"),b("dataConsumption",P.value)}),1e4)},C=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<y.value)){var t=n.duration-50;t>0&&(x.value+=t)}}))},I=function(n){n.forEach((function(n){"first-paint"===n.name?h(n.startTime,"fp"):"first-contentful-paint"===n.name&&(y.value=n.startTime,h(y.value,"fcp"),E[4]=S("longtask",C),j(0))}))},L=function(n){var t=n.pop();t&&(F.value=t.renderTime||t.loadTime)},O=function(t){t.forEach((function(t){if(n.t&&b("resourceTiming",t),t.decodedBodySize&&t.initiatorType){var e=t.decodedBodySize/1e3;P.value[t.initiatorType]+=e,P.value.total+=e}}))},W=function(){h(F.value,"lcpFinal"),j(2),E[3].takeRecords(),h(w.value,"clsFinal"),j(3),h(x.value,"tbtFinal"),j(4)},B=function(n){var t="usageDetails"in n?n.usageDetails:{};b("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(t.caches),indexedDB:g(t.indexedDB),serviceWorker:g(t.serviceWorkerRegistrations)})};return function(){function e(e){void 0===e&&(e={}),this.s="5.0.0-rc.18",n.analyticsTracker=e.analyticsTracker,n.t=!!e.resourceTiming,n.i=e.maxMeasureTime||n.i,c()&&("PerformanceObserver"in t&&(E[0]=S("paint",I),E[1]=S("first-input",q),E[2]=S("largest-contentful-paint",L),n.t&&S("resource",O),E[3]=S("layout-shift",D)),void 0!==i.hidden&&i.addEventListener("visibilitychange",d.bind(this,W)),b("navigationTiming",function(){if(!c())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var t=n.responseStart,e=n.responseEnd;return{fetchTime:e-n.fetchStart,workerTime:n.workerStart>0?e-n.workerStart:0,totalTime:e-n.requestStart,downloadTime:e-t,timeToFirstByte:t-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart}}()),b("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&r.storage.estimate().then(B))}return e.prototype.start=function(n){c()&&!_[n]&&(_[n]=!0,o.mark("mark_"+n+"_start"),v.o=!1)},e.prototype.end=function(n,t){void 0===t&&(t={}),c()&&_[n]&&(o.mark("mark_"+n+"_end"),delete _[n],b(n,{data:p(T(n))},t))},e.prototype.endPaint=function(n,t){var e=this;setTimeout((function(){e.end(n,t)}))},e.prototype.clear=function(n){delete _[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},e}()}();
var Perfume=function(){"use strict";var n={t:!1,i:15e3},t=window,e=t.console,i=document,r=t.navigator,o=t.performance,u=function(){return r.deviceMemory},a=function(){return r.hardwareConcurrency},c=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(a()&&a()<=4)||!!(u()&&u()<=4)},m=function(n,t){return!!l()||(!!["slow-2g","2g","3g"].includes(n)||!!t)},v={o:!1},d=function(n){i.hidden&&(n(),v.o=i.hidden)},p=function(n){return parseFloat(n.toFixed(2))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},k=function(e,i,o){var c;c=function(){v.o&&e.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:e,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:a()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(f,s)}:{}})},"requestIdleCallback"in t?t.requestIdleCallback(c,{timeout:3e3}):c()},b=function(n,t,e){Object.keys(t).forEach((function(n){"number"==typeof t[n]&&(t[n]=p(t[n]))})),k(n,t,e)},h=function(t,e){var i=p(t);i<=n.i&&i>0&&k(e,i)},T=function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var t=o.getEntriesByName(n).pop();return t&&"measure"===t.entryType?t.duration:-1},_={},w={value:0},y={value:0},F={value:0},P={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},x={value:0},D=function(n){var t=n.pop();t&&!t.u&&t.value&&(w.value+=t.value)},E={},S=function(n,t){try{var i=new PerformanceObserver((function(n){t(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){e.warn("Perfume.js:",n)}return null},j=function(n){E[n]&&E[n].disconnect(),delete E[n]},q=function(n){var t=n.pop();t&&h(t.duration,"fid"),j(1),h(F.value,"lcp"),E[3]&&E[3].takeRecords(),h(w.value,"cls"),h(x.value,"tbt"),setTimeout((function(){h(x.value,"tbt5S")}),5e3),setTimeout((function(){h(x.value,"tbt10S"),b("dataConsumption",P.value)}),1e4)},C=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<y.value)){var t=n.duration-50;t>0&&(x.value+=t)}}))},I=function(n){n.forEach((function(n){"first-paint"===n.name?h(n.startTime,"fp"):"first-contentful-paint"===n.name&&(y.value=n.startTime,h(y.value,"fcp"),E[4]=S("longtask",C),j(0))}))},L=function(n){var t=n.pop();t&&(F.value=t.renderTime||t.loadTime)},O=function(t){t.forEach((function(t){if(n.t&&b("resourceTiming",t),t.decodedBodySize&&t.initiatorType){var e=t.decodedBodySize/1e3;P.value[t.initiatorType]+=e,P.value.total+=e}}))},W=function(){E[2]&&(h(F.value,"lcpFinal"),j(2)),E[3]&&(E[3].takeRecords(),h(w.value,"clsFinal"),j(3)),E[4]&&(h(x.value,"tbtFinal"),j(4))},B=function(n){var t="usageDetails"in n?n.usageDetails:{};b("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(t.caches),indexedDB:g(t.indexedDB),serviceWorker:g(t.serviceWorkerRegistrations)})};return function(){function e(e){void 0===e&&(e={}),this.s="5.0.0-rc.19",n.analyticsTracker=e.analyticsTracker,n.t=!!e.resourceTiming,n.i=e.maxMeasureTime||n.i,c()&&("PerformanceObserver"in t&&(E[0]=S("paint",I),E[1]=S("first-input",q),E[2]=S("largest-contentful-paint",L),n.t&&S("resource",O),E[3]=S("layout-shift",D)),void 0!==i.hidden&&i.addEventListener("visibilitychange",d.bind(this,W)),b("navigationTiming",function(){if(!c())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var t=n.responseStart,e=n.responseEnd;return{fetchTime:e-n.fetchStart,workerTime:n.workerStart>0?e-n.workerStart:0,totalTime:e-n.requestStart,downloadTime:e-t,timeToFirstByte:t-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart}}()),b("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&r.storage.estimate().then(B))}return e.prototype.start=function(n){c()&&!_[n]&&(_[n]=!0,o.mark("mark_"+n+"_start"),v.o=!1)},e.prototype.end=function(n,t){void 0===t&&(t={}),c()&&_[n]&&(o.mark("mark_"+n+"_end"),delete _[n],b(n,{data:p(T(n))},t))},e.prototype.endPaint=function(n,t){var e=this;setTimeout((function(){e.end(n,t)}))},e.prototype.clear=function(n){delete _[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},e}()}();
//# sourceMappingURL=perfume.iife.min.js.map

@@ -1,2 +0,2 @@

"use strict";var config={t:!1,i:15e3},W=window,C=W.console,D=document,WN=W.navigator,WP=W.performance,getDM=function(){return WN.deviceMemory},getHC=function(){return WN.hardwareConcurrency},isPerformanceSupported=function(){return WP&&!!WP.getEntriesByType&&!!WP.now&&!!WP.mark},getNavigationTiming=function(){if(!isPerformanceSupported())return{};var e=WP.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart}},et="4g",sd=!1,getNetworkInformation=function(){if("connection"in WN){var e=WN.connection;return"object"!=typeof e?{}:(et=e.effectiveType,sd=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}},getIsLowEndDevice=function(){return!!(getHC()&&getHC()<=4)||!!(getDM()&&getDM()<=4)},getIsLowEndExperience=function(e,t){return!!getIsLowEndDevice()||(!!["slow-2g","2g","3g"].includes(e)||!!t)},getNavigatorInfo=function(){return WN?{deviceMemory:getDM()||0,hardwareConcurrency:getHC()||0,serviceWorkerStatus:"serviceWorker"in WN?WN.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:getIsLowEndDevice(),isLowEndExperience:getIsLowEndExperience(et,sd)}:{}},visibility={o:!1},didVisibilityChange=function(e){D.hidden&&(e(),visibility.o=D.hidden)},roundByTwo=function(e){return parseFloat(e.toFixed(2))},convertToKB=function(e){return"number"!=typeof e?null:roundByTwo(e/Math.pow(1024,2))},pushTask=function(e){"requestIdleCallback"in W?W.requestIdleCallback(e,{timeout:3e3}):e()},reportPerf=function(e,t,n){pushTask((function(){visibility.o&&e.indexOf("Final")<0||!config.analyticsTracker||config.analyticsTracker({metricName:e,data:t,eventProperties:n||{},navigatorInformation:getNavigatorInfo()})}))},logData=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=roundByTwo(t[e]))})),reportPerf(e,t,n)},logMetric=function(e,t){var n=roundByTwo(e);n<=config.i&&n>0&&reportPerf(t,n)},performanceMeasure=function(e){WP.measure(e,"mark_"+e+"_start","mark_"+e+"_end");var t=WP.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1},metrics={},cls={value:0},fcp={value:0},lcp={value:0},fcpEntryName="first-contentful-paint",rt={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},tbt={value:0},initLayoutShift=function(e){var t=e.pop();t&&!t.s&&t.value&&(cls.value+=t.value)},perfObservers={},po=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){C.warn("Perfume.js:",e)}return null},poDisconnect=function(e){perfObservers[e]&&perfObservers[e].disconnect(),delete perfObservers[e]},initFirstInputDelay=function(e){var t=e.pop();t&&logMetric(t.duration,"fid"),poDisconnect(1),logMetric(lcp.value,"lcp"),perfObservers[3]&&perfObservers[3].takeRecords(),logMetric(cls.value,"cls"),logMetric(tbt.value,"tbt"),setTimeout((function(){logMetric(tbt.value,"tbt5S")}),5e3),setTimeout((function(){logMetric(tbt.value,"tbt10S"),logData("dataConsumption",rt.value)}),1e4)},initTotalBlockingTime=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<fcp.value)){var t=e.duration-50;t>0&&(tbt.value+=t)}}))},initFirstPaint=function(e){e.forEach((function(e){"first-paint"===e.name?logMetric(e.startTime,"fp"):e.name===fcpEntryName&&(fcp.value=e.startTime,logMetric(fcp.value,"fcp"),perfObservers[4]=po("longtask",initTotalBlockingTime),poDisconnect(0))}))},initLargestContentfulPaint=function(e){var t=e.pop();t&&(lcp.value=t.renderTime||t.loadTime)},initResourceTiming=function(e){e.forEach((function(e){if(config.t&&logData("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;rt.value[e.initiatorType]+=t,rt.value.total+=t}}))},initPerformanceObserver=function(){perfObservers[0]=po("paint",initFirstPaint),perfObservers[1]=po("first-input",initFirstInputDelay),perfObservers[2]=po("largest-contentful-paint",initLargestContentfulPaint),config.t&&po("resource",initResourceTiming),perfObservers[3]=po("layout-shift",initLayoutShift)},disconnectPerfObserversHidden=function(){logMetric(lcp.value,"lcpFinal"),poDisconnect(2),perfObservers[3].takeRecords(),logMetric(cls.value,"clsFinal"),poDisconnect(3),logMetric(tbt.value,"tbtFinal"),poDisconnect(4)},reportStorageEstimate=function(e){var t="usageDetails"in e?e.usageDetails:{};logData("storageEstimate",{quota:convertToKB(e.quota),usage:convertToKB(e.usage),caches:convertToKB(t.caches),indexedDB:convertToKB(t.indexedDB),serviceWorker:convertToKB(t.serviceWorkerRegistrations)})},Perfume=function(){function e(e){void 0===e&&(e={}),this.u="5.0.0-rc.18",config.analyticsTracker=e.analyticsTracker,config.t=!!e.resourceTiming,config.i=e.maxMeasureTime||config.i,isPerformanceSupported()&&("PerformanceObserver"in W&&initPerformanceObserver(),void 0!==D.hidden&&D.addEventListener("visibilitychange",didVisibilityChange.bind(this,disconnectPerfObserversHidden)),logData("navigationTiming",getNavigationTiming()),logData("networkInformation",getNetworkInformation()),WN&&WN.storage&&WN.storage.estimate().then(reportStorageEstimate))}return e.prototype.start=function(e){isPerformanceSupported()&&!metrics[e]&&(metrics[e]=!0,WP.mark("mark_"+e+"_start"),visibility.o=!1)},e.prototype.end=function(e,t){void 0===t&&(t={}),isPerformanceSupported()&&metrics[e]&&(WP.mark("mark_"+e+"_end"),delete metrics[e],logData(e,{data:roundByTwo(performanceMeasure(e))},t))},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete metrics[e],WP.clearMarks&&(WP.clearMarks("mark_"+e+"_start"),WP.clearMarks("mark_"+e+"_end"))},e}();module.exports=Perfume;
"use strict";var config={t:!1,i:15e3},W=window,C=W.console,D=document,WN=W.navigator,WP=W.performance,getDM=function(){return WN.deviceMemory},getHC=function(){return WN.hardwareConcurrency},isPerformanceSupported=function(){return WP&&!!WP.getEntriesByType&&!!WP.now&&!!WP.mark},getNavigationTiming=function(){if(!isPerformanceSupported())return{};var e=WP.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,r=e.responseEnd;return{fetchTime:r-e.fetchStart,workerTime:e.workerStart>0?r-e.workerStart:0,totalTime:r-e.requestStart,downloadTime:r-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart}},et="4g",sd=!1,getNetworkInformation=function(){if("connection"in WN){var e=WN.connection;return"object"!=typeof e?{}:(et=e.effectiveType,sd=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}},getIsLowEndDevice=function(){return!!(getHC()&&getHC()<=4)||!!(getDM()&&getDM()<=4)},getIsLowEndExperience=function(e,t){return!!getIsLowEndDevice()||(!!["slow-2g","2g","3g"].includes(e)||!!t)},getNavigatorInfo=function(){return WN?{deviceMemory:getDM()||0,hardwareConcurrency:getHC()||0,serviceWorkerStatus:"serviceWorker"in WN?WN.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:getIsLowEndDevice(),isLowEndExperience:getIsLowEndExperience(et,sd)}:{}},visibility={o:!1},didVisibilityChange=function(e){D.hidden&&(e(),visibility.o=D.hidden)},roundByTwo=function(e){return parseFloat(e.toFixed(2))},convertToKB=function(e){return"number"!=typeof e?null:roundByTwo(e/Math.pow(1024,2))},pushTask=function(e){"requestIdleCallback"in W?W.requestIdleCallback(e,{timeout:3e3}):e()},reportPerf=function(e,t,r){pushTask((function(){visibility.o&&e.indexOf("Final")<0||!config.analyticsTracker||config.analyticsTracker({metricName:e,data:t,eventProperties:r||{},navigatorInformation:getNavigatorInfo()})}))},logData=function(e,t,r){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=roundByTwo(t[e]))})),reportPerf(e,t,r)},logMetric=function(e,t){var r=roundByTwo(e);r<=config.i&&r>0&&reportPerf(t,r)},performanceMeasure=function(e){WP.measure(e,"mark_"+e+"_start","mark_"+e+"_end");var t=WP.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1},metrics={},cls={value:0},fcp={value:0},lcp={value:0},fcpEntryName="first-contentful-paint",rt={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},tbt={value:0},initLayoutShift=function(e){var t=e.pop();t&&!t.s&&t.value&&(cls.value+=t.value)},perfObservers={},po=function(e,t){try{var r=new PerformanceObserver((function(e){t(e.getEntries())}));return r.observe({type:e,buffered:!0}),r}catch(e){C.warn("Perfume.js:",e)}return null},poDisconnect=function(e){perfObservers[e]&&perfObservers[e].disconnect(),delete perfObservers[e]},initFirstInputDelay=function(e){var t=e.pop();t&&logMetric(t.duration,"fid"),poDisconnect(1),logMetric(lcp.value,"lcp"),perfObservers[3]&&perfObservers[3].takeRecords(),logMetric(cls.value,"cls"),logMetric(tbt.value,"tbt"),setTimeout((function(){logMetric(tbt.value,"tbt5S")}),5e3),setTimeout((function(){logMetric(tbt.value,"tbt10S"),logData("dataConsumption",rt.value)}),1e4)},initTotalBlockingTime=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<fcp.value)){var t=e.duration-50;t>0&&(tbt.value+=t)}}))},initFirstPaint=function(e){e.forEach((function(e){"first-paint"===e.name?logMetric(e.startTime,"fp"):e.name===fcpEntryName&&(fcp.value=e.startTime,logMetric(fcp.value,"fcp"),perfObservers[4]=po("longtask",initTotalBlockingTime),poDisconnect(0))}))},initLargestContentfulPaint=function(e){var t=e.pop();t&&(lcp.value=t.renderTime||t.loadTime)},initResourceTiming=function(e){e.forEach((function(e){if(config.t&&logData("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;rt.value[e.initiatorType]+=t,rt.value.total+=t}}))},initPerformanceObserver=function(){perfObservers[0]=po("paint",initFirstPaint),perfObservers[1]=po("first-input",initFirstInputDelay),perfObservers[2]=po("largest-contentful-paint",initLargestContentfulPaint),config.t&&po("resource",initResourceTiming),perfObservers[3]=po("layout-shift",initLayoutShift)},disconnectPerfObserversHidden=function(){perfObservers[2]&&(logMetric(lcp.value,"lcpFinal"),poDisconnect(2)),perfObservers[3]&&(perfObservers[3].takeRecords(),logMetric(cls.value,"clsFinal"),poDisconnect(3)),perfObservers[4]&&(logMetric(tbt.value,"tbtFinal"),poDisconnect(4))},reportStorageEstimate=function(e){var t="usageDetails"in e?e.usageDetails:{};logData("storageEstimate",{quota:convertToKB(e.quota),usage:convertToKB(e.usage),caches:convertToKB(t.caches),indexedDB:convertToKB(t.indexedDB),serviceWorker:convertToKB(t.serviceWorkerRegistrations)})},Perfume=function(){function e(e){void 0===e&&(e={}),this.u="5.0.0-rc.19",config.analyticsTracker=e.analyticsTracker,config.t=!!e.resourceTiming,config.i=e.maxMeasureTime||config.i,isPerformanceSupported()&&("PerformanceObserver"in W&&initPerformanceObserver(),void 0!==D.hidden&&D.addEventListener("visibilitychange",didVisibilityChange.bind(this,disconnectPerfObserversHidden)),logData("navigationTiming",getNavigationTiming()),logData("networkInformation",getNetworkInformation()),WN&&WN.storage&&WN.storage.estimate().then(reportStorageEstimate))}return e.prototype.start=function(e){isPerformanceSupported()&&!metrics[e]&&(metrics[e]=!0,WP.mark("mark_"+e+"_start"),visibility.o=!1)},e.prototype.end=function(e,t){void 0===t&&(t={}),isPerformanceSupported()&&metrics[e]&&(WP.mark("mark_"+e+"_end"),delete metrics[e],logData(e,{data:roundByTwo(performanceMeasure(e))},t))},e.prototype.endPaint=function(e,t){var r=this;setTimeout((function(){r.end(e,t)}))},e.prototype.clear=function(e){delete metrics[e],WP.clearMarks&&(WP.clearMarks("mark_"+e+"_start"),WP.clearMarks("mark_"+e+"_end"))},e}();module.exports=Perfume;
//# sourceMappingURL=perfume.min.js.map

@@ -1,2 +0,2 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).Perfume=t()}(this,(function(){"use strict";var n={t:!1,i:15e3},t=window,e=t.console,i=document,r=t.navigator,o=t.performance,u=function(){return r.deviceMemory},a=function(){return r.hardwareConcurrency},c=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(a()&&a()<=4)||!!(u()&&u()<=4)},d=function(n,t){return!!l()||(!!["slow-2g","2g","3g"].includes(n)||!!t)},m={o:!1},v=function(n){i.hidden&&(n(),m.o=i.hidden)},p=function(n){return parseFloat(n.toFixed(2))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},b=function(e,i,o){var c;c=function(){m.o&&e.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:e,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:a()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:d(f,s)}:{}})},"requestIdleCallback"in t?t.requestIdleCallback(c,{timeout:3e3}):c()},h=function(n,t,e){Object.keys(t).forEach((function(n){"number"==typeof t[n]&&(t[n]=p(t[n]))})),b(n,t,e)},k=function(t,e){var i=p(t);i<=n.i&&i>0&&b(e,i)},y=function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var t=o.getEntriesByName(n).pop();return t&&"measure"===t.entryType?t.duration:-1},T={},_={value:0},w={value:0},F={value:0},x={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},j={value:0},D=function(n){var t=n.pop();t&&!t.u&&t.value&&(_.value+=t.value)},E={},P=function(n,t){try{var i=new PerformanceObserver((function(n){t(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){e.warn("Perfume.js:",n)}return null},S=function(n){E[n]&&E[n].disconnect(),delete E[n]},q=function(n){var t=n.pop();t&&k(t.duration,"fid"),S(1),k(F.value,"lcp"),E[3]&&E[3].takeRecords(),k(_.value,"cls"),k(j.value,"tbt"),setTimeout((function(){k(j.value,"tbt5S")}),5e3),setTimeout((function(){k(j.value,"tbt10S"),h("dataConsumption",x.value)}),1e4)},C=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<w.value)){var t=n.duration-50;t>0&&(j.value+=t)}}))},I=function(n){n.forEach((function(n){"first-paint"===n.name?k(n.startTime,"fp"):"first-contentful-paint"===n.name&&(w.value=n.startTime,k(w.value,"fcp"),E[4]=P("longtask",C),S(0))}))},L=function(n){var t=n.pop();t&&(F.value=t.renderTime||t.loadTime)},O=function(t){t.forEach((function(t){if(n.t&&h("resourceTiming",t),t.decodedBodySize&&t.initiatorType){var e=t.decodedBodySize/1e3;x.value[t.initiatorType]+=e,x.value.total+=e}}))},W=function(){k(F.value,"lcpFinal"),S(2),E[3].takeRecords(),k(_.value,"clsFinal"),S(3),k(j.value,"tbtFinal"),S(4)},B=function(n){var t="usageDetails"in n?n.usageDetails:{};h("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(t.caches),indexedDB:g(t.indexedDB),serviceWorker:g(t.serviceWorkerRegistrations)})};return function(){function e(e){void 0===e&&(e={}),this.s="5.0.0-rc.18",n.analyticsTracker=e.analyticsTracker,n.t=!!e.resourceTiming,n.i=e.maxMeasureTime||n.i,c()&&("PerformanceObserver"in t&&(E[0]=P("paint",I),E[1]=P("first-input",q),E[2]=P("largest-contentful-paint",L),n.t&&P("resource",O),E[3]=P("layout-shift",D)),void 0!==i.hidden&&i.addEventListener("visibilitychange",v.bind(this,W)),h("navigationTiming",function(){if(!c())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var t=n.responseStart,e=n.responseEnd;return{fetchTime:e-n.fetchStart,workerTime:n.workerStart>0?e-n.workerStart:0,totalTime:e-n.requestStart,downloadTime:e-t,timeToFirstByte:t-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart}}()),h("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&r.storage.estimate().then(B))}return e.prototype.start=function(n){c()&&!T[n]&&(T[n]=!0,o.mark("mark_"+n+"_start"),m.o=!1)},e.prototype.end=function(n,t){void 0===t&&(t={}),c()&&T[n]&&(o.mark("mark_"+n+"_end"),delete T[n],h(n,{data:p(y(n))},t))},e.prototype.endPaint=function(n,t){var e=this;setTimeout((function(){e.end(n,t)}))},e.prototype.clear=function(n){delete T[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},e}()}));
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).Perfume=t()}(this,(function(){"use strict";var n={t:!1,i:15e3},t=window,e=t.console,i=document,r=t.navigator,o=t.performance,u=function(){return r.deviceMemory},a=function(){return r.hardwareConcurrency},c=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(a()&&a()<=4)||!!(u()&&u()<=4)},d=function(n,t){return!!l()||(!!["slow-2g","2g","3g"].includes(n)||!!t)},m={o:!1},v=function(n){i.hidden&&(n(),m.o=i.hidden)},p=function(n){return parseFloat(n.toFixed(2))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},b=function(e,i,o){var c;c=function(){m.o&&e.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:e,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:a()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:d(f,s)}:{}})},"requestIdleCallback"in t?t.requestIdleCallback(c,{timeout:3e3}):c()},h=function(n,t,e){Object.keys(t).forEach((function(n){"number"==typeof t[n]&&(t[n]=p(t[n]))})),b(n,t,e)},k=function(t,e){var i=p(t);i<=n.i&&i>0&&b(e,i)},y=function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var t=o.getEntriesByName(n).pop();return t&&"measure"===t.entryType?t.duration:-1},T={},_={value:0},w={value:0},F={value:0},x={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},j={value:0},D=function(n){var t=n.pop();t&&!t.u&&t.value&&(_.value+=t.value)},E={},P=function(n,t){try{var i=new PerformanceObserver((function(n){t(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){e.warn("Perfume.js:",n)}return null},S=function(n){E[n]&&E[n].disconnect(),delete E[n]},q=function(n){var t=n.pop();t&&k(t.duration,"fid"),S(1),k(F.value,"lcp"),E[3]&&E[3].takeRecords(),k(_.value,"cls"),k(j.value,"tbt"),setTimeout((function(){k(j.value,"tbt5S")}),5e3),setTimeout((function(){k(j.value,"tbt10S"),h("dataConsumption",x.value)}),1e4)},C=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<w.value)){var t=n.duration-50;t>0&&(j.value+=t)}}))},I=function(n){n.forEach((function(n){"first-paint"===n.name?k(n.startTime,"fp"):"first-contentful-paint"===n.name&&(w.value=n.startTime,k(w.value,"fcp"),E[4]=P("longtask",C),S(0))}))},L=function(n){var t=n.pop();t&&(F.value=t.renderTime||t.loadTime)},O=function(t){t.forEach((function(t){if(n.t&&h("resourceTiming",t),t.decodedBodySize&&t.initiatorType){var e=t.decodedBodySize/1e3;x.value[t.initiatorType]+=e,x.value.total+=e}}))},W=function(){E[2]&&(k(F.value,"lcpFinal"),S(2)),E[3]&&(E[3].takeRecords(),k(_.value,"clsFinal"),S(3)),E[4]&&(k(j.value,"tbtFinal"),S(4))},B=function(n){var t="usageDetails"in n?n.usageDetails:{};h("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(t.caches),indexedDB:g(t.indexedDB),serviceWorker:g(t.serviceWorkerRegistrations)})};return function(){function e(e){void 0===e&&(e={}),this.s="5.0.0-rc.19",n.analyticsTracker=e.analyticsTracker,n.t=!!e.resourceTiming,n.i=e.maxMeasureTime||n.i,c()&&("PerformanceObserver"in t&&(E[0]=P("paint",I),E[1]=P("first-input",q),E[2]=P("largest-contentful-paint",L),n.t&&P("resource",O),E[3]=P("layout-shift",D)),void 0!==i.hidden&&i.addEventListener("visibilitychange",v.bind(this,W)),h("navigationTiming",function(){if(!c())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var t=n.responseStart,e=n.responseEnd;return{fetchTime:e-n.fetchStart,workerTime:n.workerStart>0?e-n.workerStart:0,totalTime:e-n.requestStart,downloadTime:e-t,timeToFirstByte:t-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart}}()),h("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&r.storage.estimate().then(B))}return e.prototype.start=function(n){c()&&!T[n]&&(T[n]=!0,o.mark("mark_"+n+"_start"),m.o=!1)},e.prototype.end=function(n,t){void 0===t&&(t={}),c()&&T[n]&&(o.mark("mark_"+n+"_end"),delete T[n],h(n,{data:p(y(n))},t))},e.prototype.endPaint=function(n,t){var e=this;setTimeout((function(){e.end(n,t)}))},e.prototype.clear=function(n){delete T[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},e}()}));
//# sourceMappingURL=perfume.umd.min.js.map
{
"name": "perfume.js",
"version": "5.0.0-rc.18",
"version": "5.0.0-rc.19",
"description": "Web performance library for measuring all User-centric performance metrics.",

@@ -91,3 +91,3 @@ "keywords": [

"global": {
"branches": 95,
"branches": 93,
"functions": 95,

@@ -94,0 +94,0 @@ "lines": 95,

@@ -5,3 +5,3 @@ <a href="http://www.perfumejs.com/">

# [Perfume.js v5.0.0-rc.18](http://perfumejs.com)
# [Perfume.js v5.0.0-rc.19](http://perfumejs.com)

@@ -8,0 +8,0 @@ [![NPM version](https://badge.fury.io/js/perfume.js.svg)](https://www.npmjs.org/package/perfume.js) [![Build Status](https://travis-ci.org/Zizzamia/perfume.js.svg?branch=master)](https://travis-ci.org/Zizzamia/perfume.js) [![NPM Downloads](http://img.shields.io/npm/dm/perfume.js.svg)](https://www.npmjs.org/package/perfume.js) [![Test Coverage](https://api.codeclimate.com/v1/badges/f813d2f45b274d93b8c5/test_coverage)](https://codeclimate.com/github/Zizzamia/perfume.js/test_coverage) [![JS gzip size](https://img.badgesize.io/https://unpkg.com/perfume.js?compression=gzip&label=JS+gzip+size)](https://unpkg.com/perfume.js)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc