1 | var webVitals=function(n){"use strict";var t,e,i=function(){var n=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(n&&n.responseStart>0&&n.responseStart<performance.now())return n},a=function(n){if("loading"===document.readyState)return"loading";var t=i();if(t){if(n<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||n<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||n<t.domComplete)return"dom-content-loaded"}return"complete"},r=function(n){var t=n.nodeName;return 1===n.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},o=function(n,t){var e="";try{for(;n&&9!==n.nodeType;){var i=n,a=i.id?"#"+i.id:r(i)+(i.classList&&i.classList.value&&i.classList.value.trim()&&i.classList.value.trim().length?"."+i.classList.value.trim().replace(/\s+/g,"."):"");if(e.length+a.length>(t||100)-1)return e||a;if(e=e?a+">"+e:a,i.id)break;n=i.parentNode}}catch(n){}return e},s=function(n,t,e,i){var a,r;return function(o){t.value>=0&&(o||i)&&((r=t.value-(a||0))||void 0===a)&&(a=t.value,t.delta=r,t.rating=function(n,t){return n>t[1]?"poor":n>t[0]?"needs-improvement":"good"}(t.value,e),n(t))}},c=function(n){requestAnimationFrame((function(){return requestAnimationFrame((function(){return n()}))}))},u=-1,d=function(){return u},f=function(n){addEventListener("pageshow",(function(t){t.persisted&&(u=t.timeStamp,n(t))}),!0)},v=function(){var n=i();return n&&n.activationStart||0},l=function(n,t,e,a){var r,o=(null===(r=i())||void 0===r?void 0:r.navigationId)||"1",s=i(),c="navigate";e?c=e:d()>=0?c="back-forward-cache":s&&(document.prerendering||v()>0?c="prerender":document.wasDiscarded?c="restore":s.type&&(c=s.type.replace(/_/g,"-")));return{name:n,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:c,navigationId:a||o}},g=function(n){return PerformanceObserver.supportedEntryTypes.includes("soft-navigation")&&n&&n.reportSoftNavs},m=function(n){if(n){var t=window.performance.getEntriesByType("soft-navigation").filter((function(t){return t.navigationId===n}));return t?t[0]:void 0}},p=function(n,t,e){var i=g(e);try{if(PerformanceObserver.supportedEntryTypes.includes(n)){var a=new PerformanceObserver((function(n){Promise.resolve().then((function(){t(n.getEntries())}))}));return a.observe(Object.assign({type:n,buffered:!0,includeSoftNavigationObservations:i},e||{})),a}}catch(n){}},h=function(n){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&n()}))},T=function(n){var t=!1;return function(){t||(n(),t=!0)}},I=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},E=function(n){"hidden"===document.visibilityState&&I>-1&&(I="visibilitychange"===n.type?n.timeStamp:0,b())},S=function(){addEventListener("visibilitychange",E,!0),addEventListener("prerenderingchange",E,!0)},b=function(){removeEventListener("visibilitychange",E,!0),removeEventListener("prerenderingchange",E,!0)},C=function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(I=-1),I<0&&(I=y(),S(),f((function(){setTimeout((function(){I=y(),S()}),0)}))),{get firstHiddenTime(){return I}}},L=function(n){document.prerendering?addEventListener("prerenderingchange",(function(){return n()}),!0):n()},w=[1800,3e3],M=function(n,t){var e,a=g(t=t||{}),r=0,o=(null===(e=i())||void 0===e?void 0:e.navigationId)||"1";L((function(){var e,i=C(),u=l("FCP"),d=p("paint",(function(c){c.forEach((function(c){if("first-contentful-paint"===c.name){a?c.navigationId&&c.navigationId!==u.navigationId&&function(a,o){if(u=l("FCP",0,a,o),e=s(n,u,w,t.reportAllChanges),"soft-navigation"===a){i=C(!0);var c=o?m(o):null;r=c&&c.startTime||0}}("soft-navigation",c.navigationId):d.disconnect();var f=0;if(c.navigationId&&c.navigationId!==o){var g=m(c.navigationId),p=g&&g.startTime?g.startTime:0;f=Math.max(c.startTime-p,0)}else f=Math.max(c.startTime-v(),0);var h=a&&c.navigationId?m(c.navigationId):null,T=h&&h.startTime?h.startTime:0;(c.startTime<i.firstHiddenTime||a&&c.navigationId&&c.navigationId!==u.navigationId&&c.navigationId!==o&&T>r)&&(u.value=f,u.entries.push(c),u.navigationId=c.navigationId||"1",e(!0))}}))}),t);d&&(e=s(n,u,w,t.reportAllChanges),f((function(i){u=l("FCP",0,"back-forward-cache",u.navigationId),e=s(n,u,w,t.reportAllChanges),c((function(){u.value=performance.now()-i.timeStamp,e(!0)}))})))}))},D=[.1,.25],k=0,F=1/0,P=0,A="",x=!1,B=function(n){var t;A||(A=(null===(t=i())||void 0===t?void 0:t.navigationId)||"1"),n.forEach((function(n){n.interactionId&&(x&&n.navigationId&&n.navigationId!==A&&(A=n.navigationId,k=0,F=1/0,P=0),F=Math.min(F,n.interactionId),P=Math.max(P,n.interactionId),k=P?(P-F)/7+1:0)}))},O=function(){return t?k:performance.interactionCount||0},N=function(n){"interactionCount"in performance||t||(t=p("event",B,{type:"event",buffered:!0,durationThreshold:0,includeSoftNavigationObservations:x=n||!1}))},R=[],j=new Map,q=0,H=function(){q=O(),R.length=0,j.clear()},V=function(){var n=Math.min(R.length-1,Math.floor((O()-q)/50));return R[n]},W=[],z=function(n){if(W.forEach((function(t){return t(n)})),n.interactionId||"first-input"===n.entryType){var t=R[R.length-1],e=j.get(n.interactionId);if(e||R.length<10||n.duration>t.latency){if(e)n.duration>e.latency?(e.entries=[n],e.latency=n.duration):n.duration===e.latency&&n.startTime===e.entries[0].startTime&&e.entries.push(n);else{var i={id:n.interactionId,latency:n.duration,entries:[n]};j.set(i.id,i),R.push(i)}R.sort((function(n,t){return t.latency-n.latency})),R.length>10&&R.splice(10).forEach((function(n){return j.delete(n.id)}))}}},U=function(n){var t=self.requestIdleCallback||self.setTimeout,e=-1;return n=T(n),"hidden"===document.visibilityState?n():(e=t(n),h(n)),e},_=[200,500],G=function(n,t){if("PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype){var e=g(t=t||{}),i=!1,a=0;L((function(){var r;N(e);var o,u=l("INP"),d=function(e,r){if(H(),u=l("INP",0,e,r),o=s(n,u,_,t.reportAllChanges),i=!1,"soft-navigation"===e){var c=m(r);a=c&&c.startTime?c.startTime:0}},v=function(n){U((function(){var e;n.forEach(z),(e=V())&&(e.latency!==u.value||t&&t.reportAllChanges)&&(u.value=e.latency,u.entries=e.entries),o()}))},g=p("event",v,{durationThreshold:null!==(r=t.durationThreshold)&&void 0!==r?r:40,opts:t});if(o=s(n,u,_,t.reportAllChanges),g){g.observe({type:"first-input",buffered:!0,includeSoftNavigationObservations:e}),h((function(){v(g.takeRecords()),o(!0)})),f((function(){H(),d("back-forward-cache",u.navigationId),c((function(){return o()}))}));e&&p("soft-navigation",(function(e){e.forEach((function(e){var r=m(e.navigationId),c=r&&r.startTime?r.startTime:0;e.navigationId&&e.navigationId!==u.navigationId&&c>a&&(!i&&u.value>0&&o(!0),d("soft-navigation",e.navigationId),o=s(n,u,_,t.reportAllChanges))}))}),t)}}))}},J=[],K=[],Q=0,X=new WeakMap,Y=new Map,Z=-1,$=function(n){J=J.concat(n),nn()},nn=function(){Z<0&&(Z=U(tn))},tn=function(){Y.size>10&&Y.forEach((function(n,t){j.has(t)||Y.delete(t)}));var n=R.map((function(n){return X.get(n.entries[0])})),t=K.length-50;K=K.filter((function(e,i){return i>=t||n.includes(e)}));for(var e=new Set,i=0;i<K.length;i++){var a=K[i];sn(a.startTime,a.processingEnd).forEach((function(n){e.add(n)}))}var r=J.length-1-50;J=J.filter((function(n,t){return n.startTime>Q&&t>r||e.has(n)})),Z=-1};W.push((function(n){n.interactionId&&n.target&&!Y.has(n.interactionId)&&Y.set(n.interactionId,n.target)}),(function(n){var t,e=n.startTime+n.duration;Q=Math.max(Q,n.processingEnd);for(var i=K.length-1;i>=0;i--){var a=K[i];if(Math.abs(e-a.renderTime)<=8){(t=a).startTime=Math.min(n.startTime,t.startTime),t.processingStart=Math.min(n.processingStart,t.processingStart),t.processingEnd=Math.max(n.processingEnd,t.processingEnd),t.entries.push(n);break}}t||(t={startTime:n.startTime,processingStart:n.processingStart,processingEnd:n.processingEnd,renderTime:e,entries:[n]},K.push(t)),(n.interactionId||"first-input"===n.entryType)&&X.set(n,t),nn()}));var en,an,rn,on,sn=function(n,t){for(var e,i=[],a=0;e=J[a];a++)if(!(e.startTime+e.duration<n)){if(e.startTime>t)break;i.push(e)}return i},cn=[2500,4e3],un=[800,1800],dn=function n(t){document.prerendering?L((function(){return n(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return n(t)}),!0):setTimeout(t,0)},fn=function(n,t){var e=g(t=t||{}),a=l("TTFB"),r=s(n,a,un,t.reportAllChanges);dn((function(){var o=i();if(o){var c=o.responseStart;a.value=Math.max(c-v(),0),a.entries=[o],r(!0),f((function(){a=l("TTFB",0,"back-forward-cache",a.navigationId),(r=s(n,a,un,t.reportAllChanges))(!0)}));e&&p("soft-navigation",(function(e){e.forEach((function(e){e.navigationId&&((a=l("TTFB",0,"soft-navigation",e.navigationId)).entries=[e],(r=s(n,a,un,t.reportAllChanges))(!0))}))}),t)}}))},vn={passive:!0,capture:!0},ln=new Date,gn=function(n,t){en||(en=t,an=n,rn=new Date,hn(removeEventListener),mn())},mn=function(){if(an>=0&&an<rn-ln){var n={entryType:"first-input",name:en.type,target:en.target,cancelable:en.cancelable,startTime:en.timeStamp,processingStart:en.timeStamp+an};on.forEach((function(t){t([n])})),on=[]}},pn=function(n){if(n.cancelable){var t=(n.timeStamp>1e12?new Date:performance.now())-n.timeStamp;"pointerdown"==n.type?function(n,t){var e=function(){gn(n,t),a()},i=function(){a()},a=function(){removeEventListener("pointerup",e,vn),removeEventListener("pointercancel",i,vn)};addEventListener("pointerup",e,vn),addEventListener("pointercancel",i,vn)}(t,n):gn(t,n)}},hn=function(n){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return n(t,pn,vn)}))},Tn=[100,300],In=function(n,t){var e,a=g(t=t||{}),r=(null===(e=i())||void 0===e?void 0:e.navigationId)||"1";L((function(){var e,i=C(),o=l("FID"),c=function(c){c.forEach((function(c){var d,f;a?c.navigationId&&c.navigationId!==o.navigationId&&(d="soft-navigation",f=c.navigationId,"soft-navigation"===d&&(i=C(!0)),o=l("FID",0,d,f),e=s(n,o,Tn,t.reportAllChanges)):u.disconnect(),c.startTime<i.firstHiddenTime&&(o.value=c.processingStart-c.startTime,o.entries.push(c),o.navigationId=c.navigationId||r,e(!0))}))},u=p("first-input",c,t);e=s(n,o,Tn,t.reportAllChanges),u&&(h((function(){c(u.takeRecords()),a||u.disconnect()})),f((function(){var i;o=l("FID",0,"back-forward-cache",o.navigationId),e=s(n,o,Tn,t.reportAllChanges),on=[],an=-1,en=null,hn(addEventListener),i=c,on.push(i),mn()})))}))};return n.CLSThresholds=D,n.FCPThresholds=w,n.FIDThresholds=Tn,n.INPThresholds=_,n.LCPThresholds=cn,n.TTFBThresholds=un,n.onCLS=function(n,t){!function(n,t){var e=g(t=t||{}),i=!1,a=0;M(T((function(){var r,o=l("CLS",0),u=0,d=[],v=function(e,c){if(o=l("CLS",0,e,c),r=s(n,o,D,t.reportAllChanges),u=0,i=!1,"soft-navigation"===e){var d=m(c);a=d&&d.startTime||0}},g=function(n){n.forEach((function(n){if(e&&n.navigationId&&n.navigationId!==o.navigationId&&(u>o.value&&(o.value=u,o.entries=d),r(!0),v("soft-navigation",n.navigationId)),!n.hadRecentInput){var t=d[0],i=d[d.length-1];u&&n.startTime-i.startTime<1e3&&n.startTime-t.startTime<5e3?(u+=n.value,d.push(n)):(u=n.value,d=[n])}})),u>o.value&&(o.value=u,o.entries=d,r())},T=p("layout-shift",g,t);T&&(r=s(n,o,D,t.reportAllChanges),h((function(){g(T.takeRecords()),r(!0),i=!0})),f((function(){v("back-forward-cache",o.navigationId),c((function(){return r()}))})),e&&p("soft-navigation",(function(e){e.forEach((function(e){var c=e.navigationId,u=c?m(c):null;c&&c!==o.navigationId&&u&&(u.startTime||0)>a&&(i||r(!0),v("soft-navigation",e.navigationId),r=s(n,o,D,t.reportAllChanges))}))}),t),setTimeout(r,0))})))}((function(t){var e=function(n){var t,e={};if(n.entries.length){var i=n.entries.reduce((function(n,t){return n&&n.value>t.value?n:t}));if(i&&i.sources&&i.sources.length){var r=(t=i.sources).find((function(n){return n.node&&1===n.node.nodeType}))||t[0];r&&(e={largestShiftTarget:o(r.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:r,largestShiftEntry:i,loadState:a(i.startTime)})}}return Object.assign(n,{attribution:e})}(t);n(e)}),t)},n.onFCP=function(n,t){M((function(t){var e=function(n){var t,e=(null===(t=i())||void 0===t?void 0:t.navigationId)||"1",r={timeToFirstByte:0,firstByteToFCP:n.value,loadState:a(d())};if(n.entries.length){var o,s=n.entries[n.entries.length-1],c=0;if(n.navigationId&&n.navigationId!==e)c=(o=m(n.navigationId))?o.startTime:0;else if(o=i()){var u=o.responseStart,f=o.activationStart||0;c=Math.max(0,u-f)}o&&(r={timeToFirstByte:c,firstByteToFCP:n.value-c,loadState:a(n.entries[0].startTime),navigationEntry:o,fcpEntry:s})}return Object.assign(n,{attribution:r})}(t);n(e)}),t)},n.onFID=function(n,t){In((function(t){var e=function(n){var t=n.entries[0],e={eventTarget:o(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:a(t.startTime)};return Object.assign(n,{attribution:e})}(t);n(e)}),t)},n.onINP=function(n,t){e||(e=p("long-animation-frame",$)),G((function(t){var e=function(n){var t=n.entries[0],e=X.get(t),i=t.processingStart,r=e.processingEnd,s=e.entries.sort((function(n,t){return n.processingStart-t.processingStart})),c=sn(t.startTime,r),u=n.entries.find((function(n){return n.target})),d=u&&u.target||Y.get(t.interactionId),f=[t.startTime+t.duration,r].concat(c.map((function(n){return n.startTime+n.duration}))),v=Math.max.apply(Math,f),l={interactionTarget:o(d),interactionTargetElement:d,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:v,processedEventEntries:s,longAnimationFrameEntries:c,inputDelay:i-t.startTime,processingDuration:r-i,presentationDelay:Math.max(v-r,0),loadState:a(t.startTime)};return Object.assign(n,{attribution:l})}(t);n(e)}),t)},n.onLCP=function(n,t){!function(n,t){var e,a=!1,r=g(t=t||{}),o=0,u=(null===(e=i())||void 0===e?void 0:e.navigationId)||"1",d="";L((function(){var e,i=C(),g=l("LCP"),T=function(r,c){if(g=l("LCP",0,r,c),e=s(n,g,cn,t.reportAllChanges),a=!1,"soft-navigation"===r){i=C(!0);var u=m(c);o=u&&u.startTime?u.startTime:0}E()},I=function(n){n.forEach((function(n){if(n){r&&n.navigationId&&n.navigationId!==g.navigationId&&(a||e(!0),T("soft-navigation",n.navigationId));var t=0;if(n.navigationId&&n.navigationId!==u){var o=m(n.navigationId),s=o&&o.startTime?o.startTime:0;t=Math.max(n.startTime-s,0)}else t=Math.max(n.startTime-v(),0);n.startTime<i.firstHiddenTime&&(g.value=t,g.entries=[n],g.navigationId=n.navigationId||u,e())}}))},y=function(){S(),a||(I(L.takeRecords()),r||L.disconnect(),g.navigationId===d&&(a=!0,e(!0)))},E=function(){["keydown","click"].forEach((function(n){addEventListener(n,(function(){return b()}),!0)}))},S=function(){["keydown","click"].forEach((function(n){removeEventListener(n,(function(){return b()}),!0)}))},b=function(){d=g.navigationId,U(y)},L=p("largest-contentful-paint",I,t);L&&(e=s(n,g,cn,t.reportAllChanges),E(),h((function(){d=g.navigationId,y()})),f((function(n){T("back-forward-cache",g.navigationId),c((function(){g.value=performance.now()-n.timeStamp,a=!0,e(!0)}))})),r&&p("soft-navigation",(function(n){n.forEach((function(n){var t=n.navigationId?m(n.navigationId):null;n.navigationId&&n.navigationId!==g.navigationId&&t&&(t.startTime||0)>o&&(a||e(!0),T("soft-navigation",n.navigationId))}))}),t))}))}((function(t){var e=function(n){var t,e=(null===(t=i())||void 0===t?void 0:t.navigationId)||"1",a={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:n.value};if(n.entries.length){var r,s=0,c=0,u=0;if(n.navigationId&&n.navigationId!==e?s=u=(r=m(n.navigationId))?r.startTime:0:(s=(r=i())&&r.activationStart?r.activationStart:0,c=r&&r.responseStart?r.responseStart:0),r){var d=n.entries[n.entries.length-1],f=d.url&&performance.getEntriesByType("resource").filter((function(n){return n.name===d.url}))[0],v=Math.max(0,c-s),l=Math.max(v,f?(f.requestStart||f.startTime)-s:0),g=Math.max(l-u,f?f.responseEnd-s:0,0),p=Math.max(g-u,d?d.startTime-s:0,0);a={element:o(d.element),timeToFirstByte:v,resourceLoadDelay:l-v,resourceLoadDuration:g-l,elementRenderDelay:p-g,navigationEntry:r,lcpEntry:d},d.url&&(a.url=d.url),f&&(a.lcpResourceEntry=f)}}return Object.assign(n,{attribution:a})}(t);n(e)}),t)},n.onTTFB=function(n,t){fn((function(t){var e=function(n){var t={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(n.entries.length){var e=n.entries[0],i=e.activationStart||0,a=Math.max((e.workerStart||e.fetchStart)-i,0),r=Math.max(e.domainLookupStart-i||0,0),o=Math.max(e.connectStart-i||0,0),s=Math.max(e.connectEnd-i||0,0);t={waitingDuration:a,cacheDuration:r-a,dnsDuration:o-r,connectionDuration:s-o,requestDuration:n.value-s,navigationEntry:e}}return Object.assign(n,{attribution:t})}(t);n(e)}),t)},n}({});
|