chrome-devtools-frontend 1.0.945677 → 1.0.947377
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/.eslintrc.js +1 -0
- package/config/gni/all_devtools_files.gni +0 -14
- package/config/gni/devtools_grd_files.gni +4 -42
- package/front_end/.eslintrc.js +5 -1
- package/front_end/core/host/InspectorFrontendHost.ts +0 -3
- package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
- package/front_end/core/host/UserMetrics.ts +0 -22
- package/front_end/core/i18n/locales/en-US.json +33 -27
- package/front_end/core/i18n/locales/en-XL.json +33 -27
- package/front_end/core/root/Runtime.ts +0 -5
- package/front_end/core/sdk/AccessibilityModel.ts +0 -2
- package/front_end/core/sdk/CSSProperty.ts +16 -11
- package/front_end/core/sdk/CSSRule.ts +0 -2
- package/front_end/core/sdk/Cookie.ts +1 -5
- package/front_end/core/sdk/EmulationModel.ts +0 -2
- package/front_end/core/sdk/HeapProfilerModel.ts +0 -2
- package/front_end/core/sdk/NetworkManager.ts +0 -3
- package/front_end/core/sdk/Resource.ts +0 -3
- package/front_end/core/sdk/ResourceTreeModel.ts +0 -3
- package/front_end/core/sdk/ServiceWorkerManager.ts +0 -2
- package/front_end/core/sdk/sdk-meta.ts +20 -8
- package/front_end/devtools_compatibility.js +1 -8
- package/front_end/entrypoints/devtools_app/devtools_app.js +3 -0
- package/front_end/entrypoints/devtools_app/devtools_app.json +1 -3
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +1 -3
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -2
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +0 -120
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -11
- package/front_end/entrypoints/formatter_worker/formatter_worker.ts +5 -0
- package/front_end/entrypoints/inspector/{inspector.js → inspector.ts} +0 -3
- package/front_end/entrypoints/js_app/js_app.js +3 -0
- package/front_end/entrypoints/js_app/js_app.json +1 -2
- package/front_end/entrypoints/main/MainImpl.ts +0 -6
- package/front_end/entrypoints/ndb_app/ndb_app.js +3 -0
- package/front_end/entrypoints/ndb_app/ndb_app.json +1 -2
- package/front_end/entrypoints/{node_main → node_app}/NodeConnectionsPanel.ts +1 -1
- package/front_end/entrypoints/{node_main → node_app}/NodeMain.ts +2 -4
- package/front_end/entrypoints/{node_main → node_app}/nodeConnectionsPanel.css +0 -0
- package/front_end/entrypoints/node_app/node_app.ts +81 -0
- package/front_end/entrypoints/shell/shell.js +18 -1
- package/front_end/entrypoints/worker_app/{worker_app.js → worker_app.ts} +8 -2
- package/front_end/generated/InspectorBackendCommands.js +5 -1
- package/front_end/generated/protocol.d.ts +12 -0
- package/front_end/legacy_test_runner/sources_test_runner/sources_test_runner.js +0 -1
- package/front_end/models/bindings/CompilerScriptMapping.ts +0 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -11
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
- package/front_end/models/bindings/ResourceMapping.ts +1 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +0 -1
- package/front_end/models/emulation/DeviceModeModel.ts +0 -2
- package/front_end/models/formatter/FormatterWorkerPool.ts +0 -18
- package/front_end/models/issues_manager/CorsIssue.ts +8 -0
- package/front_end/models/text_utils/CodeMirrorUtils.ts +6 -51
- package/front_end/models/text_utils/TextUtils.ts +1 -2
- package/front_end/models/text_utils/text_utils-legacy.ts +0 -5
- package/front_end/panels/animation/AnimationTimeline.ts +0 -2
- package/front_end/panels/animation/AnimationUI.ts +0 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -4
- package/front_end/panels/application/BackForwardCacheStrings.ts +1 -0
- package/front_end/panels/css_overview/CSSOverviewModel.ts +0 -2
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +0 -7
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +0 -2
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +0 -11
- package/front_end/panels/elements/StylesSidebarPane.ts +0 -1
- package/front_end/panels/elements/elementsTreeOutline.css +0 -13
- package/front_end/panels/emulation/DeviceModeToolbar.ts +0 -16
- package/front_end/panels/issues/CorsIssueDetailsView.ts +6 -2
- package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -3
- package/front_end/panels/network/NetworkConfigView.ts +10 -0
- package/front_end/panels/network/NetworkItemView.ts +3 -0
- package/front_end/panels/network/networkConfigView.css +5 -0
- package/front_end/panels/profiler/profilesPanel.css +1 -1
- package/front_end/panels/search/SearchView.ts +24 -4
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +6 -4
- package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +0 -12
- package/front_end/panels/sources/CSSPlugin.ts +3 -0
- package/front_end/panels/sources/CoveragePlugin.ts +2 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +35 -7
- package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +3 -0
- package/front_end/panels/sources/ProfilePlugin.ts +3 -0
- package/front_end/panels/sources/UISourceCodeFrame.ts +11 -2
- package/front_end/panels/sources/sourcesView.css +0 -130
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -0
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +1 -25
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1486 -1423
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
- package/front_end/third_party/codemirror.next/package.json +10 -9
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +168 -164
- package/front_end/third_party/lighthouse/locales/ar-XB.json +0 -3
- package/front_end/third_party/lighthouse/locales/ar.json +0 -3
- package/front_end/third_party/lighthouse/locales/bg.json +17 -20
- package/front_end/third_party/lighthouse/locales/ca.json +0 -3
- package/front_end/third_party/lighthouse/locales/cs.json +0 -3
- package/front_end/third_party/lighthouse/locales/da.json +16 -19
- package/front_end/third_party/lighthouse/locales/de.json +0 -3
- package/front_end/third_party/lighthouse/locales/el.json +0 -3
- package/front_end/third_party/lighthouse/locales/en-GB.json +19 -22
- package/front_end/third_party/lighthouse/locales/en-US.json +33 -3
- package/front_end/third_party/lighthouse/locales/en-XA.json +0 -3
- package/front_end/third_party/lighthouse/locales/en-XL.json +33 -3
- package/front_end/third_party/lighthouse/locales/es-419.json +17 -20
- package/front_end/third_party/lighthouse/locales/es.json +0 -3
- package/front_end/third_party/lighthouse/locales/fi.json +16 -19
- package/front_end/third_party/lighthouse/locales/fil.json +33 -36
- package/front_end/third_party/lighthouse/locales/fr.json +16 -19
- package/front_end/third_party/lighthouse/locales/he.json +16 -19
- package/front_end/third_party/lighthouse/locales/hi.json +0 -3
- package/front_end/third_party/lighthouse/locales/hr.json +16 -19
- package/front_end/third_party/lighthouse/locales/hu.json +16 -19
- package/front_end/third_party/lighthouse/locales/id.json +16 -19
- package/front_end/third_party/lighthouse/locales/it.json +37 -40
- package/front_end/third_party/lighthouse/locales/ja.json +16 -19
- package/front_end/third_party/lighthouse/locales/ko.json +16 -19
- package/front_end/third_party/lighthouse/locales/lt.json +17 -20
- package/front_end/third_party/lighthouse/locales/lv.json +0 -3
- package/front_end/third_party/lighthouse/locales/nl.json +16 -19
- package/front_end/third_party/lighthouse/locales/no.json +17 -20
- package/front_end/third_party/lighthouse/locales/pl.json +16 -19
- package/front_end/third_party/lighthouse/locales/pt-PT.json +37 -40
- package/front_end/third_party/lighthouse/locales/pt.json +16 -19
- package/front_end/third_party/lighthouse/locales/ro.json +0 -3
- package/front_end/third_party/lighthouse/locales/ru.json +16 -19
- package/front_end/third_party/lighthouse/locales/sk.json +0 -3
- package/front_end/third_party/lighthouse/locales/sl.json +0 -3
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +16 -19
- package/front_end/third_party/lighthouse/locales/sr.json +16 -19
- package/front_end/third_party/lighthouse/locales/sv.json +17 -20
- package/front_end/third_party/lighthouse/locales/ta.json +0 -3
- package/front_end/third_party/lighthouse/locales/te.json +0 -3
- package/front_end/third_party/lighthouse/locales/th.json +0 -3
- package/front_end/third_party/lighthouse/locales/tr.json +0 -3
- package/front_end/third_party/lighthouse/locales/uk.json +17 -20
- package/front_end/third_party/lighthouse/locales/vi.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh-HK.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh-TW.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh.json +0 -3
- package/front_end/third_party/lighthouse/report/bundle.d.ts +63 -61
- package/front_end/third_party/lighthouse/report/bundle.js +36 -7
- package/front_end/third_party/lighthouse/report-assets/report-generator.js +205 -192
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +0 -8
- package/front_end/ui/components/text_editor/config.ts +8 -7
- package/front_end/ui/components/text_editor/javascript.ts +28 -10
- package/front_end/ui/components/text_editor/theme.ts +1 -0
- package/front_end/ui/legacy/InspectorView.ts +10 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -3
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +0 -1
- package/front_end/ui/legacy/components/object_ui/object_ui-legacy.ts +0 -8
- package/front_end/ui/legacy/components/object_ui/object_ui.ts +0 -4
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +40 -29
- package/front_end/ui/legacy/inspectorSyntaxHighlight.css +0 -211
- package/front_end/ui/legacy/legacy-legacy.ts +0 -6
- package/front_end/ui/legacy/legacy.ts +0 -2
- package/front_end/ui/legacy/tabbedPane.css +1 -1
- package/front_end/ui/legacy/themeColors.css +1 -1
- package/package.json +1 -1
- package/scripts/check_gn.js +1 -1
- package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -4
- package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +4 -0
- package/scripts/hosted_mode/server.js +17 -2
- package/front_end/entrypoints/inspector/inspector.json +0 -4
- package/front_end/entrypoints/node_app/node_app-meta.ts +0 -43
- package/front_end/entrypoints/node_app/node_app.js +0 -13
- package/front_end/entrypoints/node_app/node_app.json +0 -4
- package/front_end/entrypoints/node_main/node_main-meta.ts +0 -48
- package/front_end/entrypoints/node_main/node_main.ts +0 -11
- package/front_end/entrypoints/shell/shell-meta-files.ts +0 -22
- package/front_end/entrypoints/shell/shell.json +0 -5
- package/front_end/entrypoints/worker_app/worker_app.json +0 -4
- package/front_end/panels/lighthouse/module.json +0 -6
- package/front_end/third_party/lighthouse/report-assets/report.d.ts +0 -1
- package/front_end/third_party/lighthouse/report-assets/report.js +0 -233
- package/front_end/third_party/lighthouse/report-assets/standalone-template.html +0 -38
- package/front_end/ui/legacy/TextEditor.ts +0 -82
- package/front_end/ui/legacy/components/object_ui/JavaScriptAutocomplete.ts +0 -836
- package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +0 -1676
- package/front_end/ui/legacy/components/text_editor/TextEditorAutocompleteController.ts +0 -586
- package/front_end/ui/legacy/components/text_editor/autocompleteTooltip.css +0 -20
- package/front_end/ui/legacy/components/text_editor/cm_modes.ts +0 -23
- package/front_end/ui/legacy/components/text_editor/cmdevtools.css +0 -995
- package/front_end/ui/legacy/components/text_editor/module.json +0 -7
- package/front_end/ui/legacy/components/text_editor/text_editor-legacy.ts +0 -33
- package/front_end/ui/legacy/components/text_editor/text_editor.ts +0 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Lighthouse v9.
|
|
2
|
+
* Lighthouse v9.1.0 8100b8034507e679c95b2fab5ab48965875443b6 (Nov 29 2021)
|
|
3
3
|
*
|
|
4
4
|
* Automated auditing, performance metrics, and best practices for the web.
|
|
5
5
|
*
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
(function(){"use strict";function getAugmentedNamespace(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var devtoolsEntry={},global$1=void 0!==global$1?global$1:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},lodash_isequal={exports:{}};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}!function(e,t){
|
|
11
11
|
var r="__lodash_hash_undefined__",n=9007199254740991,a="[object Arguments]",i="[object Array]",o="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",p="[object Map]",f="[object Number]",b="[object Object]",S="[object Promise]",_="[object RegExp]",T="[object Set]",E="[object String]",$="[object Symbol]",A="[object WeakMap]",I="[object ArrayBuffer]",R="[object DataView]",x=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[a]=C[i]=C[I]=C[o]=C[R]=C[l]=C[c]=C[u]=C[p]=C[f]=C[b]=C[_]=C[T]=C[E]=C[A]=!1
|
|
12
12
|
;var k="object"==typeof global$1&&global$1&&global$1.Object===Object&&global$1,N="object"==typeof self&&self&&self.Object===Object&&self,L=k||N||Function("return this")(),M=t&&!t.nodeType&&t,U=M&&e&&!e.nodeType&&e,O=U&&U.exports===M,P=O&&k.process,F=function(){try{return P&&P.binding&&P.binding("util")}catch(e){}}(),B=F&&F.isTypedArray;function arraySome(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function mapToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function setToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}
|
|
13
|
-
var j,q=Array.prototype,H=Function.prototype,z=Object.prototype,G=L["__core-js_shared__"],V=H.toString,W=z.hasOwnProperty,Y=(j=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"",K=z.toString,
|
|
13
|
+
var j,q=Array.prototype,H=Function.prototype,z=Object.prototype,G=L["__core-js_shared__"],V=H.toString,W=z.hasOwnProperty,Y=(j=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"",K=z.toString,J=RegExp("^"+V.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=O?L.Buffer:void 0,X=L.Symbol,Q=L.Uint8Array,ee=z.propertyIsEnumerable,te=q.splice,re=X?X.toStringTag:void 0,ne=Object.getOwnPropertySymbols,ae=Z?Z.isBuffer:void 0,ie=function overArg(e,t){return function(r){return e(t(r))}}(Object.keys,Object),se=getNative(L,"DataView"),oe=getNative(L,"Map"),le=getNative(L,"Promise"),ce=getNative(L,"Set"),ue=getNative(L,"WeakMap"),de=getNative(Object,"create"),me=toSource(se),pe=toSource(oe),ge=toSource(le),he=toSource(ce),fe=toSource(ue),ye=X?X.prototype:void 0,ve=ye?ye.valueOf:void 0;function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}
|
|
14
14
|
function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new MapCache;++t<r;)this.add(e[t])}function Stack(e){var t=this.__data__=new ListCache(e);this.size=t.size}function arrayLikeKeys(e,t){var r=_e(e),n=!r&&Se(e),a=!r&&!n&&Te(e),i=!r&&!n&&!a&&Ee(e),o=r||n||a||i,l=o?function baseTimes(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=l.length;for(var u in e)!t&&!W.call(e,u)||o&&("length"==u||a&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||isIndex(u,c))||l.push(u);return l}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}function baseGetTag(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":re&&re in Object(e)?function getRawTag(e){
|
|
15
15
|
var t=W.call(e,re),r=e[re];try{e[re]=void 0;var n=!0}catch(e){}var a=K.call(e);n&&(t?e[re]=r:delete e[re]);return a}(e):function objectToString(e){return K.call(e)}(e)}function baseIsArguments(e){return isObjectLike(e)&&baseGetTag(e)==a}function baseIsEqual(e,t,r,n,u){return e===t||(null==e||null==t||!isObjectLike(e)&&!isObjectLike(t)?e!=e&&t!=t:function baseIsEqualDeep(e,t,r,n,u,S){var A=_e(e),x=_e(t),D=A?i:we(e),C=x?i:we(t),k=(D=D==a?b:D)==b,N=(C=C==a?b:C)==b,L=D==C;if(L&&Te(e)){if(!Te(t))return!1;A=!0,k=!1}if(L&&!k)return S||(S=new Stack),A||Ee(e)?equalArrays(e,t,r,n,u,S):function equalByTag(e,t,r,n,a,i,u){switch(r){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!i(new Q(e),new Q(t)));case o:case l:case f:return eq(+e,+t);case c:return e.name==t.name&&e.message==t.message;case _:case E:return e==t+"";case p:var b=mapToArray;case T:var S=1&n;if(b||(b=setToArray),e.size!=t.size&&!S)return!1
|
|
16
16
|
;var A=u.get(e);if(A)return A==t;n|=2,u.set(e,t);var x=equalArrays(b(e),b(t),n,a,i,u);return u.delete(e),x;case $:if(ve)return ve.call(e)==ve.call(t)}return!1}(e,t,D,r,n,u,S);if(!(1&r)){var M=k&&W.call(e,"__wrapped__"),U=N&&W.call(t,"__wrapped__");if(M||U){var O=M?e.value():e,P=U?t.value():t;return S||(S=new Stack),u(O,P,r,n,S)}}if(!L)return!1;return S||(S=new Stack),function equalObjects(e,t,r,n,a,i){var o=1&r,l=getAllKeys(e),c=l.length,u=getAllKeys(t).length;if(c!=u&&!o)return!1;var p=c;for(;p--;){var f=l[p];if(!(o?f in t:W.call(t,f)))return!1}var b=i.get(e);if(b&&i.get(t))return b==t;var S=!0;i.set(e,t),i.set(t,e);var _=o;for(;++p<c;){var T=e[f=l[p]],E=t[f];if(n)var $=o?n(E,T,f,t,e,i):n(T,E,f,e,t,i);if(!(void 0===$?T===E||a(T,E,r,n,i):$)){S=!1;break}_||(_="constructor"==f)}if(S&&!_){var A=e.constructor,I=t.constructor;A==I||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof I&&I instanceof I||(S=!1)}return i.delete(e),i.delete(t),S
|
|
17
|
-
}(e,t,r,n,u,S)}(e,t,r,n,baseIsEqual,u))}function baseIsNative(e){return!(!isObject(e)||function isMasked(e){return!!Y&&Y in e}(e))&&(isFunction(e)?
|
|
17
|
+
}(e,t,r,n,u,S)}(e,t,r,n,baseIsEqual,u))}function baseIsNative(e){return!(!isObject(e)||function isMasked(e){return!!Y&&Y in e}(e))&&(isFunction(e)?J:x).test(toSource(e))}function baseKeys(e){if(!function isPrototype(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||z;return e===r}(e))return ie(e);var t=[];for(var r in Object(e))W.call(e,r)&&"constructor"!=r&&t.push(r);return t}function equalArrays(e,t,r,n,a,i){var o=1&r,l=e.length,c=t.length;if(l!=c&&!(o&&c>l))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var p=-1,f=!0,b=2&r?new SetCache:void 0;for(i.set(e,t),i.set(t,e);++p<l;){var S=e[p],_=t[p];if(n)var T=o?n(_,S,p,t,e,i):n(S,_,p,e,t,i);if(void 0!==T){if(T)continue;f=!1;break}if(b){if(!arraySome(t,(function(e,t){if(o=t,!b.has(o)&&(S===e||a(S,e,r,n,i)))return b.push(t);var o}))){f=!1;break}}else if(S!==_&&!a(S,_,r,n,i)){f=!1;break}}return i.delete(e),i.delete(t),f}function getAllKeys(e){return function baseGetAllKeys(e,t,r){var n=t(e)
|
|
18
18
|
;return _e(e)?n:function arrayPush(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}(n,r(e))}(e,keys,be)}function getMapData(e,t){var r=e.__data__;return function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function getNative(e,t){var r=function getValue(e,t){return null==e?void 0:e[t]}(e,t);return baseIsNative(r)?r:void 0}Hash.prototype.clear=function hashClear(){this.__data__=de?de(null):{},this.size=0},Hash.prototype.delete=function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hash.prototype.get=function hashGet(e){var t=this.__data__;if(de){var n=t[e];return n===r?void 0:n}return W.call(t,e)?t[e]:void 0},Hash.prototype.has=function hashHas(e){var t=this.__data__;return de?void 0!==t[e]:W.call(t,e)},Hash.prototype.set=function hashSet(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,
|
|
19
19
|
n[e]=de&&void 0===t?r:t,this},ListCache.prototype.clear=function listCacheClear(){this.__data__=[],this.size=0},ListCache.prototype.delete=function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():te.call(t,r,1),--this.size,!0)},ListCache.prototype.get=function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]},ListCache.prototype.has=function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1},ListCache.prototype.set=function listCacheSet(e,t){var r=this.__data__,n=assocIndexOf(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},MapCache.prototype.clear=function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(oe||ListCache),string:new Hash}},MapCache.prototype.delete=function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t},MapCache.prototype.get=function mapCacheGet(e){return getMapData(this,e).get(e)},
|
|
20
20
|
MapCache.prototype.has=function mapCacheHas(e){return getMapData(this,e).has(e)},MapCache.prototype.set=function mapCacheSet(e,t){var r=getMapData(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},SetCache.prototype.add=SetCache.prototype.push=function setCacheAdd(e){return this.__data__.set(e,r),this},SetCache.prototype.has=function setCacheHas(e){return this.__data__.has(e)},Stack.prototype.clear=function stackClear(){this.__data__=new ListCache,this.size=0},Stack.prototype.delete=function stackDelete(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Stack.prototype.get=function stackGet(e){return this.__data__.get(e)},Stack.prototype.has=function stackHas(e){return this.__data__.has(e)},Stack.prototype.set=function stackSet(e,t){var r=this.__data__;if(r instanceof ListCache){var n=r.__data__;if(!oe||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new MapCache(n)}return r.set(e,t),this.size=r.size,this};var be=ne?function(e){
|
|
@@ -45,8 +45,8 @@ Log.events=new Emitter,Log.takeTimeEntries=()=>{const e=marky.getEntries();retur
|
|
|
45
45
|
mobile:!0,width:360,height:640,deviceScaleFactor:2.625,disabled:!1},DESKTOP_EMULATION_METRICS={mobile:!1,width:1350,height:940,deviceScaleFactor:1,disabled:!1},screenEmulationMetrics={mobile:MOTOG4_EMULATION_METRICS,desktop:DESKTOP_EMULATION_METRICS},MOTOG4_USERAGENT="Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4695.0 Mobile Safari/537.36 Chrome-Lighthouse",DESKTOP_USERAGENT="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4695.0 Safari/537.36 Chrome-Lighthouse",userAgents={mobile:MOTOG4_USERAGENT,desktop:DESKTOP_USERAGENT},defaultSettings={output:"json",maxWaitForFcp:3e4,maxWaitForLoad:45e3,formFactor:"mobile",throttling:throttling.mobileSlow4G,throttlingMethod:"simulate",screenEmulation:screenEmulationMetrics.mobile,emulatedUserAgent:userAgents.mobile,auditMode:!1,gatherMode:!1,disableStorageReset:!1,debugNavigation:!1,channel:"node",budgets:null,locale:"en-US",
|
|
46
46
|
blockedUrlPatterns:null,additionalTraceCategories:null,extraHeaders:null,precomputedLanternData:null,onlyAudits:null,onlyCategories:null,skipAudits:null},defaultPassConfig={passName:"defaultPass",loadFailureMode:"fatal",recordTrace:!1,useThrottling:!1,pauseAfterFcpMs:0,pauseAfterLoadMs:0,networkQuietThresholdMs:0,cpuQuietThresholdMs:0,blockedUrlPatterns:[],blankPage:"about:blank",gatherers:[]},defaultNavigationConfig={id:"default",loadFailureMode:"fatal",disableThrottling:!1,disableStorageReset:!1,pauseAfterFcpMs:0,pauseAfterLoadMs:0,networkQuietThresholdMs:0,cpuQuietThresholdMs:0,blockedUrlPatterns:[],blankPage:"about:blank",artifacts:[]},nonSimulatedPassConfigOverrides={pauseAfterFcpMs:5250,pauseAfterLoadMs:5250,networkQuietThresholdMs:5250,cpuQuietThresholdMs:5250};var constants$7={throttling,screenEmulationMetrics,userAgents,defaultSettings,defaultPassConfig,defaultNavigationConfig,nonSimulatedPassConfigOverrides};function wrapRuntimeEvalErrorInBrowser(e){
|
|
47
47
|
return e&&"string"!=typeof e||(e=new Error(e)),{__failedInBrowser:!0,name:e.name||"Error",message:e.message||"unknown error",stack:e.stack}}function getElementsInDocument(e){const t=window.__ElementMatches||window.Element.prototype.matches,r=[],_findAllElements=n=>{for(let a,i=0;a=n[i];++i){if(!e||t.call(a,e)){const e=a;r.push(e)}a.shadowRoot&&_findAllElements(a.shadowRoot.querySelectorAll("*"))}};return _findAllElements(document.querySelectorAll("*")),r}function getOuterHTMLSnippet(e,t=[],r=500){const n=["autofill-information","autofill-prediction","title"];e instanceof ShadowRoot&&(e=e.host);try{const a=e.cloneNode();e.ownerDocument.createElement("template").content.append(a),t.concat(n).forEach((e=>{a.removeAttribute(e)}));let i=0;for(const t of a.getAttributeNames()){if(i>r){a.removeAttribute(t);continue}let n=a.getAttribute(t);if(null===n)continue;let o=!1;if("src"===t&&"currentSrc"in e){const t=e,r=t.currentSrc,a=t.ownerDocument.location.href;new URL(n,a).toString()!==r&&(n=r,
|
|
48
|
-
o=!0)}n.length>75&&(n=n.slice(0,74)+"…",o=!0),o&&a.setAttribute(t,n),i+=t.length+n.length}const o=/^[\s\S]*?>/,[l]=a.outerHTML.match(o)||[];return l&&i>r?l.slice(0,l.length-1)+" …>":l||""}catch(t){return`<${e.localName}>`}}function getMaxTextureSize(){try{const e=document.createElement("canvas").getContext("webgl");if(!e)throw new Error("no webgl");return e.getParameter(e.MAX_TEXTURE_SIZE)}catch(e){return 4095}}function computeBenchmarkIndex(){return(function benchmarkIndexGC(){const e=Date.now();let t=0;for(;Date.now()-e<500;)t
|
|
49
|
-
const isShadowRoot=e=>e.nodeType===Node.DOCUMENT_FRAGMENT_NODE,getNodeParent=e=>isShadowRoot(e)?e.host:e.parentNode;function getNodeIndex(e){if(isShadowRoot(e))return"a";let t,r=0;for(;t=e.previousSibling;)(e=t).nodeType===Node.TEXT_NODE&&0===(e.nodeValue||"").trim().length||r++;return r}let t=e;const r=[];for(;t&&getNodeParent(t);){const e=getNodeIndex(t);r.push([e,t.nodeName]),t=getNodeParent(t)}return r.reverse(),r.join(",")}function getNodeSelector(e){function getSelectorPart(e){let t=e.tagName.toLowerCase();return e.id?t+="#"+e.id:e.classList.length>0&&(t+="."+e.classList[0]),t}const t=[];for(;t.length<4&&(t.unshift(getSelectorPart(e)),e.parentElement)&&"HTML"!==(e=e.parentElement).tagName;);return t.join(" > ")}function isPositionFixed(e){function getStyleAttrValue(e,t){return e.style[t]||window.getComputedStyle(e)[t]}const t=document.querySelector("html");if(!t)throw new Error("html element not found in document")
|
|
48
|
+
o=!0)}n.length>75&&(n=n.slice(0,74)+"…",o=!0),o&&a.setAttribute(t,n),i+=t.length+n.length}const o=/^[\s\S]*?>/,[l]=a.outerHTML.match(o)||[];return l&&i>r?l.slice(0,l.length-1)+" …>":l||""}catch(t){return`<${e.localName}>`}}function getMaxTextureSize(){try{const e=document.createElement("canvas").getContext("webgl");if(!e)throw new Error("no webgl");return e.getParameter(e.MAX_TEXTURE_SIZE)}catch(e){return 4095}}function computeBenchmarkIndex(){return(function benchmarkIndexGC(){const e=Date.now();let t=0;for(;Date.now()-e<500;){let e="";for(let t=0;t<1e4;t++)e+="a";if(1===e.length)throw new Error("will never happen, but prevents compiler optimizations");t++}const r=(Date.now()-e)/1e3;return Math.round(t/10/r)}()+function benchmarkIndexNoGC(){const e=[],t=[];for(let r=0;r<1e5;r++)e[r]=t[r]=r;const r=Date.now();let n=0;for(;n%10!=0||Date.now()-r<500;){const r=n%2==0?e:t,a=n%2==0?t:e;for(let e=0;e<r.length;e++)a[e]=r[e];n++}const a=(Date.now()-r)/1e3;return Math.round(n/10/a)}())/2}
|
|
49
|
+
function getNodePath(e){const isShadowRoot=e=>e.nodeType===Node.DOCUMENT_FRAGMENT_NODE,getNodeParent=e=>isShadowRoot(e)?e.host:e.parentNode;function getNodeIndex(e){if(isShadowRoot(e))return"a";let t,r=0;for(;t=e.previousSibling;)(e=t).nodeType===Node.TEXT_NODE&&0===(e.nodeValue||"").trim().length||r++;return r}let t=e;const r=[];for(;t&&getNodeParent(t);){const e=getNodeIndex(t);r.push([e,t.nodeName]),t=getNodeParent(t)}return r.reverse(),r.join(",")}function getNodeSelector(e){function getSelectorPart(e){let t=e.tagName.toLowerCase();return e.id?t+="#"+e.id:e.classList.length>0&&(t+="."+e.classList[0]),t}const t=[];for(;t.length<4&&(t.unshift(getSelectorPart(e)),e.parentElement)&&"HTML"!==(e=e.parentElement).tagName;);return t.join(" > ")}function isPositionFixed(e){function getStyleAttrValue(e,t){return e.style[t]||window.getComputedStyle(e)[t]}const t=document.querySelector("html");if(!t)throw new Error("html element not found in document")
|
|
50
50
|
;if(t.scrollHeight<=t.clientHeight||!["scroll","auto","visible"].includes(getStyleAttrValue(t,"overflowY")))return!1;let r=e;for(;r;){const e=getStyleAttrValue(r,"position");if("fixed"===e||"sticky"===e)return!0;r=r.parentElement}return!1}function getNodeLabel(e){const t=e.tagName.toLowerCase();if("html"!==t&&"body"!==t){const t=e instanceof HTMLElement&&e.innerText||e.getAttribute("alt")||e.getAttribute("aria-label");if(t)return function truncate(e,t){return e.length<=t?e:Array.from(e).slice(0,t-1).join("")+"…"}(t,80);{const t=e.querySelector("[alt], [aria-label]");if(t)return getNodeLabel(t)}}return null}function getBoundingClientRect(e){const t=e.getBoundingClientRect();return{top:Math.round(t.top),bottom:Math.round(t.bottom),left:Math.round(t.left),right:Math.round(t.right),width:Math.round(t.width),height:Math.round(t.height)}}function wrapRequestIdleCallback(e){const t=Math.floor(40/e),r=window.requestIdleCallback;window.requestIdleCallback=(e,n)=>r((r=>{const n=Date.now()
|
|
51
51
|
;r.__timeRemaining=r.timeRemaining,r.timeRemaining=()=>{const e=r.__timeRemaining();return Math.min(e,Math.max(0,t-(Date.now()-n)))},r.timeRemaining.toString=()=>"function timeRemaining() { [native code] }",e(r)}),n),window.requestIdleCallback.toString=()=>"function requestIdleCallback() { [native code] }"}function getNodeDetails(e){window.__lighthouseNodesDontTouchOrAllVarianceGoesAway||(window.__lighthouseNodesDontTouchOrAllVarianceGoesAway=new Map);const t=getNodeSelector(e=e instanceof ShadowRoot?e.host:e);let r=window.__lighthouseNodesDontTouchOrAllVarianceGoesAway.get(e);r||(r=[void 0!==window.__lighthouseExecutionContextId?window.__lighthouseExecutionContextId:"page",window.__lighthouseNodesDontTouchOrAllVarianceGoesAway.size,e.tagName].join("-"),window.__lighthouseNodesDontTouchOrAllVarianceGoesAway.set(e,r));return{lhId:r,devtoolsNodePath:getNodePath(e),selector:t,boundingRect:getBoundingClientRect(e),snippet:getOuterHTMLSnippet(e),nodeLabel:getNodeLabel(e)||t}}
|
|
52
52
|
const getNodeDetailsString=`function getNodeDetails(element) {\n ${getNodePath.toString()};\n ${getNodeSelector.toString()};\n ${getBoundingClientRect.toString()};\n ${getOuterHTMLSnippet.toString()};\n ${getNodeLabel.toString()};\n return (${getNodeDetails.toString()})(element);\n}`;var pageFunctions$h={wrapRuntimeEvalErrorInBrowserString:wrapRuntimeEvalErrorInBrowser.toString(),wrapRuntimeEvalErrorInBrowser,getElementsInDocument,getElementsInDocumentString:getElementsInDocument.toString(),getOuterHTMLSnippetString:getOuterHTMLSnippet.toString(),getOuterHTMLSnippet,computeBenchmarkIndex,computeBenchmarkIndexString:computeBenchmarkIndex.toString(),getMaxTextureSize,getNodeDetailsString,getNodeDetails,getNodePathString:getNodePath.toString(),getNodeSelectorString:getNodeSelector.toString(),getNodePath,getNodeSelector,getNodeLabel,getNodeLabelString:getNodeLabel.toString(),isPositionFixedString:isPositionFixed.toString(),wrapRequestIdleCallback,
|
|
@@ -56,7 +56,7 @@ var e=Array.prototype.slice.call(arguments,0);return normalize(filter(e,(functio
|
|
|
56
56
|
"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,peg$SyntaxError)}return function peg$subclass(e,t){function ctor(){this.constructor=e}ctor.prototype=t.prototype,e.prototype=new ctor}(peg$SyntaxError,Error),peg$SyntaxError.buildMessage=function(e,t){var r={literal:function(e){return'"'+literalEscape(e.text)+'"'},class:function(e){var t,r="";for(t=0;t<e.parts.length;t++)r+=e.parts[t]instanceof Array?classEscape(e.parts[t][0])+"-"+classEscape(e.parts[t][1]):classEscape(e.parts[t]);return"["+(e.inverted?"^":"")+r+"]"},any:function(e){return"any character"},end:function(e){return"end of input"},other:function(e){return e.description}};function hex(e){return e.charCodeAt(0).toString(16).toUpperCase()}function literalEscape(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+hex(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){
|
|
57
57
|
return"\\x"+hex(e)}))}function classEscape(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+hex(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+hex(e)}))}return"Expected "+function describeExpected(e){var t,n,a,i=new Array(e.length);for(t=0;t<e.length;t++)i[t]=(a=e[t],r[a.type](a));if(i.sort(),i.length>0){for(t=1,n=1;t<i.length;t++)i[t-1]!==i[t]&&(i[n]=i[t],n++);i.length=n}switch(i.length){case 1:return i[0];case 2:return i[0]+" or "+i[1];default:return i.slice(0,-1).join(", ")+", or "+i[i.length-1]}}(e)+" but "+function describeFound(e){return e?'"'+literalEscape(e)+'"':"end of input"}(t)+" found."},{SyntaxError:peg$SyntaxError,parse:function peg$parse(e,t){t=void 0!==t?t:{};var r,n={},a={start:peg$parsestart},i=peg$parsestart,peg$c3=function(e){return e.join("")
|
|
58
58
|
},o=peg$literalExpectation("{",!1),l=",",c=peg$literalExpectation(",",!1),u=peg$literalExpectation("}",!1),p="number",f=peg$literalExpectation("number",!1),b="date",S=peg$literalExpectation("date",!1),_="time",T=peg$literalExpectation("time",!1),E="plural",$=peg$literalExpectation("plural",!1),A="selectordinal",I=peg$literalExpectation("selectordinal",!1),R="select",x=peg$literalExpectation("select",!1),D=peg$literalExpectation("=",!1),C="offset:",k=peg$literalExpectation("offset:",!1),N=peg$otherExpectation("whitespace"),L=/^[ \t\n\r]/,M=peg$classExpectation([" ","\t","\n","\r"],!1,!1),U=peg$otherExpectation("optionalWhitespace"),O=/^[0-9]/,P=peg$classExpectation([["0","9"]],!1,!1),F=/^[0-9a-f]/i,B=peg$classExpectation([["0","9"],["a","f"]],!1,!0),j=peg$literalExpectation("0",!1),q=/^[1-9]/,H=peg$classExpectation([["1","9"]],!1,!1),z="'",G=peg$literalExpectation("'",!1),V=/^[ \t\n\r,.+={}#]/,W=peg$classExpectation([" ","\t","\n","\r",",",".","+","=","{","}","#"],!1,!1),Y={type:"any"
|
|
59
|
-
},K=/^[^{}\\\0-\x1F\x7F \t\n\r]/,
|
|
59
|
+
},K=/^[^{}\\\0-\x1F\x7F \t\n\r]/,J=peg$classExpectation(["{","}","\\",["\0",""],""," ","\t","\n","\r"],!0,!1),Z=peg$literalExpectation("\\\\",!1),X=peg$literalExpectation("\\#",!1),Q=peg$literalExpectation("\\{",!1),ee=peg$literalExpectation("\\}",!1),te=peg$literalExpectation("\\u",!1),re=0,ne=0,ae=[{line:1,column:1}],ie=0,se=[],oe=0;if("startRule"in t){if(!(t.startRule in a))throw new Error("Can't start parsing from rule \""+t.startRule+'".');i=a[t.startRule]}function location(){return peg$computeLocation(ne,re)}function peg$literalExpectation(e,t){return{type:"literal",text:e,ignoreCase:t}}function peg$classExpectation(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function peg$otherExpectation(e){return{type:"other",description:e}}function peg$computePosDetails(t){var r,n=ae[t];if(n)return n;for(r=t-1;!ae[r];)r--;for(n={line:(n=ae[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return ae[t]=n,n}
|
|
60
60
|
function peg$computeLocation(e,t){var r=peg$computePosDetails(e),n=peg$computePosDetails(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function peg$fail(e){re<ie||(re>ie&&(ie=re,se=[]),se.push(e))}function peg$parsestart(){return peg$parsemessageFormatPattern()}function peg$parsemessageFormatPattern(){var e,t,r;for(e=re,t=[],r=peg$parsemessageFormatElement();r!==n;)t.push(r),r=peg$parsemessageFormatElement();return t!==n&&(ne=e,t={type:"messageFormatPattern",elements:t,location:location()}),e=t}function peg$parsemessageFormatElement(){var t;return(t=function peg$parsemessageTextElement(){var t,r;t=re,(r=function peg$parsemessageText(){var t,r,a,i,o,l;t=re,r=[],a=re,(i=peg$parse_())!==n&&(o=peg$parsechars())!==n&&(l=peg$parse_())!==n?a=i=[i,o,l]:(re=a,a=n);if(a!==n)for(;a!==n;)r.push(a),a=re,(i=peg$parse_())!==n&&(o=peg$parsechars())!==n&&(l=peg$parse_())!==n?a=i=[i,o,l]:(re=a,a=n);else r=n;r!==n&&(ne=t,r=r.reduce((function(e,t){
|
|
61
61
|
return e.concat(t)}),[]).join(""));(t=r)===n&&(t=re,t=(r=peg$parsews())!==n?e.substring(t,re):r);return t}())!==n&&(ne=t,r={type:"messageTextElement",value:r,location:location()});return t=r}())===n&&(t=function peg$parseargumentElement(){var t,r,a,i,D,C,k;t=re,123===e.charCodeAt(re)?(r="{",re++):(r=n,0===oe&&peg$fail(o));r!==n&&peg$parse_()!==n&&(a=function peg$parseargument(){var e,t,r;if((e=peg$parsenumber())===n){for(e=re,t=[],r=peg$parsequoteEscapedChar();r!==n;)t.push(r),r=peg$parsequoteEscapedChar();t!==n&&(ne=e,t=peg$c3(t)),e=t}return e}())!==n&&peg$parse_()!==n?(i=re,44===e.charCodeAt(re)?(D=l,re++):(D=n,0===oe&&peg$fail(c)),D!==n&&(C=peg$parse_())!==n&&(k=function peg$parseelementFormat(){var t;(t=function peg$parsesimpleFormat(){var t,r,a,i,o,u;t=re,e.substr(re,6)===p?(r=p,re+=6):(r=n,0===oe&&peg$fail(f));r===n&&(e.substr(re,4)===b?(r=b,re+=4):(r=n,0===oe&&peg$fail(S)),r===n&&(e.substr(re,4)===_?(r=_,re+=4):(r=n,0===oe&&peg$fail(T))));r!==n&&peg$parse_()!==n?(a=re,
|
|
62
62
|
44===e.charCodeAt(re)?(i=l,re++):(i=n,0===oe&&peg$fail(c)),i!==n&&(o=peg$parse_())!==n&&(u=peg$parsechars())!==n?a=i=[i,o,u]:(re=a,a=n),a===n&&(a=null),a!==n?(ne=t,t=r={type:r+"Format",style:(E=a)&&E[2],location:location()}):(re=t,t=n)):(re=t,t=n);var E;return t}())===n&&(t=function peg$parsepluralFormat(){var t,r,a,i;t=re,e.substr(re,6)===E?(r=E,re+=6):(r=n,0===oe&&peg$fail($));r!==n&&peg$parse_()!==n?(44===e.charCodeAt(re)?(a=l,re++):(a=n,0===oe&&peg$fail(c)),a!==n&&peg$parse_()!==n&&(i=peg$parsepluralStyle())!==n?(ne=t,t=r={type:(o=i).type,ordinal:!1,offset:o.offset||0,options:o.options,location:location()}):(re=t,t=n)):(re=t,t=n);var o;return t}())===n&&(t=function peg$parseselectOrdinalFormat(){var t,r,a,i;t=re,e.substr(re,13)===A?(r=A,re+=13):(r=n,0===oe&&peg$fail(I));r!==n&&peg$parse_()!==n?(44===e.charCodeAt(re)?(a=l,re++):(a=n,0===oe&&peg$fail(c)),a!==n&&peg$parse_()!==n&&(i=peg$parsepluralStyle())!==n?(ne=t,t=r={type:(o=i).type,ordinal:!0,offset:o.offset||0,options:o.options,
|
|
@@ -64,7 +64,7 @@ location:location()}):(re=t,t=n)):(re=t,t=n);var o;return t}())===n&&(t=function
|
|
|
64
64
|
peg$parse_()!==n&&(r=function peg$parseselector(){var t,r,a,i;return t=re,r=re,61===e.charCodeAt(re)?(a="=",re++):(a=n,0===oe&&peg$fail(D)),a!==n&&(i=peg$parsenumber())!==n?r=a=[a,i]:(re=r,r=n),(t=r!==n?e.substring(t,re):r)===n&&(t=peg$parsechars()),t}())!==n&&peg$parse_()!==n?(123===e.charCodeAt(re)?(a="{",re++):(a=n,0===oe&&peg$fail(o)),a!==n&&(i=peg$parsemessageFormatPattern())!==n?(125===e.charCodeAt(re)?(l="}",re++):(l=n,0===oe&&peg$fail(u)),l!==n?(ne=t,t={type:"optionalFormatPattern",selector:r,value:i,location:location()}):(re=t,t=n)):(re=t,t=n)):(re=t,t=n),t}function peg$parsepluralStyle(){var t,r,a,i;if(t=re,(r=function peg$parseoffset(){var t,r,a;return t=re,e.substr(re,7)===C?(r=C,re+=7):(r=n,0===oe&&peg$fail(k)),r!==n&&peg$parse_()!==n&&(a=peg$parsenumber())!==n?(ne=t,t=r=a):(re=t,t=n),t}())===n&&(r=null),r!==n)if(peg$parse_()!==n){if(a=[],(i=peg$parseoptionalFormatPattern())!==n)for(;i!==n;)a.push(i),i=peg$parseoptionalFormatPattern();else a=n;a!==n?(ne=t,
|
|
65
65
|
t=r=function(e,t){return{type:"pluralFormat",offset:e,options:t,location:location()}}(r,a)):(re=t,t=n)}else re=t,t=n;else re=t,t=n;return t}function peg$parsews(){var t,r;if(oe++,t=[],L.test(e.charAt(re))?(r=e.charAt(re),re++):(r=n,0===oe&&peg$fail(M)),r!==n)for(;r!==n;)t.push(r),L.test(e.charAt(re))?(r=e.charAt(re),re++):(r=n,0===oe&&peg$fail(M));else t=n;return oe--,t===n&&(r=n,0===oe&&peg$fail(N)),t}function peg$parse_(){var t,r,a;for(oe++,t=re,r=[],a=peg$parsews();a!==n;)r.push(a),a=peg$parsews();return t=r!==n?e.substring(t,re):r,oe--,t===n&&(r=n,0===oe&&peg$fail(U)),t}function peg$parsedigit(){var t;return O.test(e.charAt(re))?(t=e.charAt(re),re++):(t=n,0===oe&&peg$fail(P)),t}function peg$parsehexDigit(){var t;return F.test(e.charAt(re))?(t=e.charAt(re),re++):(t=n,0===oe&&peg$fail(B)),t}function peg$parsenumber(){var t,r,a,i,o,l;if(t=re,48===e.charCodeAt(re)?(r="0",re++):(r=n,0===oe&&peg$fail(j)),r===n){if(r=re,a=re,q.test(e.charAt(re))?(i=e.charAt(re),re++):(i=n,
|
|
66
66
|
0===oe&&peg$fail(H)),i!==n){for(o=[],l=peg$parsedigit();l!==n;)o.push(l),l=peg$parsedigit();o!==n?a=i=[i,o]:(re=a,a=n)}else re=a,a=n;r=a!==n?e.substring(r,re):a}return r!==n&&(ne=t,r=parseInt(r,10)),t=r}function peg$parsequoteEscapedChar(){var t,r,a;return t=re,r=re,oe++,39===e.charCodeAt(re)?(a=z,re++):(a=n,0===oe&&peg$fail(G)),a===n&&(V.test(e.charAt(re))?(a=e.charAt(re),re++):(a=n,0===oe&&peg$fail(W))),oe--,a===n?r=void 0:(re=r,r=n),r!==n?(e.length>re?(a=e.charAt(re),re++):(a=n,0===oe&&peg$fail(Y)),a!==n?(ne=t,t=r=a):(re=t,t=n)):(re=t,t=n),t===n&&(t=re,39===e.charCodeAt(re)?(r=z,re++):(r=n,0===oe&&peg$fail(G)),r!==n&&(a=function peg$parseescape(){var t;V.test(e.charAt(re))?(t=e.charAt(re),re++):(t=n,0===oe&&peg$fail(W));t===n&&(t=peg$parseapostrophe());return t}())!==n?(ne=t,t=r=a):(re=t,t=n)),t}function peg$parseapostrophe(){var t;return 39===e.charCodeAt(re)?(t=z,re++):(t=n,0===oe&&peg$fail(G)),t}function peg$parsechar(){var t,r,a,i,o,l,c,u,p;return t=re,
|
|
67
|
-
39===e.charCodeAt(re)?(r=z,re++):(r=n,0===oe&&peg$fail(G)),r!==n&&(a=peg$parseapostrophe())!==n?(ne=t,t=r=a):(re=t,t=n),t===n&&(K.test(e.charAt(re))?(t=e.charAt(re),re++):(t=n,0===oe&&peg$fail(
|
|
67
|
+
39===e.charCodeAt(re)?(r=z,re++):(r=n,0===oe&&peg$fail(G)),r!==n&&(a=peg$parseapostrophe())!==n?(ne=t,t=r=a):(re=t,t=n),t===n&&(K.test(e.charAt(re))?(t=e.charAt(re),re++):(t=n,0===oe&&peg$fail(J)),t===n&&(t=re,"\\\\"===e.substr(re,2)?(r="\\\\",re+=2):(r=n,0===oe&&peg$fail(Z)),r!==n&&(ne=t,r="\\"),(t=r)===n&&(t=re,"\\#"===e.substr(re,2)?(r="\\#",re+=2):(r=n,0===oe&&peg$fail(X)),r!==n&&(ne=t,r="\\#"),(t=r)===n&&(t=re,"\\{"===e.substr(re,2)?(r="\\{",re+=2):(r=n,0===oe&&peg$fail(Q)),r!==n&&(ne=t,r="{"),(t=r)===n&&(t=re,"\\}"===e.substr(re,2)?(r="\\}",re+=2):(r=n,0===oe&&peg$fail(ee)),r!==n&&(ne=t,r="}"),(t=r)===n&&(t=re,"\\u"===e.substr(re,2)?(r="\\u",re+=2):(r=n,0===oe&&peg$fail(te)),r!==n?(a=re,i=re,(o=peg$parsehexDigit())!==n&&(l=peg$parsehexDigit())!==n&&(c=peg$parsehexDigit())!==n&&(u=peg$parsehexDigit())!==n?i=o=[o,l,c,u]:(re=i,i=n),(a=i!==n?e.substring(a,re):i)!==n?(ne=t,p=a,t=r=String.fromCharCode(parseInt(p,16))):(re=t,t=n)):(re=t,t=n))))))),t}function peg$parsechars(){var e,t,r
|
|
68
68
|
;if(e=re,t=[],(r=peg$parsechar())!==n)for(;r!==n;)t.push(r),r=peg$parsechar();else t=n;return t!==n&&(ne=e,t=peg$c3(t)),e=t}if((r=i())!==n&&re===e.length)return r;throw r!==n&&re<e.length&&peg$fail({type:"end"}),function peg$buildStructuredError(e,t,r){return new peg$SyntaxError(peg$SyntaxError.buildMessage(e,t),e,t,r)}(se,ie<e.length?e.charAt(ie):null,ie<e.length?peg$computeLocation(ie,ie+1):peg$computeLocation(ie,ie))}}}(),__extends$1=globalThis&&globalThis.__extends||(extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function __(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),extendStatics,Compiler=function(){function Compiler(e,t,r){this.locales=[],this.formats={number:{},date:{},time:{}},this.pluralNumberFormat=null,this.currentPlural=null,
|
|
69
69
|
this.pluralStack=[],this.locales=e,this.formats=t,this.formatters=r}return Compiler.prototype.compile=function(e){return this.pluralStack=[],this.currentPlural=null,this.pluralNumberFormat=null,this.compileMessage(e)},Compiler.prototype.compileMessage=function(e){var t=this;if(!e||"messageFormatPattern"!==e.type)throw new Error('Message AST is not of type: "messageFormatPattern"');var r=e.elements,n=r.filter((function(e){return"messageTextElement"===e.type||"argumentElement"===e.type})).map((function(e){return"messageTextElement"===e.type?t.compileMessageText(e):t.compileArgument(e)}));if(n.length!==r.length)throw new Error("Message element does not have a valid type");return n},Compiler.prototype.compileMessageText=function(e){return this.currentPlural&&/(^|[^\\])#/g.test(e.value)?(this.pluralNumberFormat||(this.pluralNumberFormat=new Intl.NumberFormat(this.locales)),
|
|
70
70
|
new PluralOffsetString(this.currentPlural.id,this.currentPlural.format.offset,this.pluralNumberFormat,e.value)):e.value.replace(/\\#/g,"#")},Compiler.prototype.compileArgument=function(e){var t=e.format,r=e.id,n=this.formatters;if(!t)return new StringFormat(r);var a=this.formats,i=this.locales;switch(t.type){case"numberFormat":return{id:r,format:n.getNumberFormat(i,a.number[t.style]).format};case"dateFormat":return{id:r,format:n.getDateTimeFormat(i,a.date[t.style]).format};case"timeFormat":return{id:r,format:n.getDateTimeFormat(i,a.time[t.style]).format};case"pluralFormat":return new PluralFormat(r,t.offset,this.compileOptions(e),n.getPluralRules(i,{type:t.ordinal?"ordinal":"cardinal"}));case"selectFormat":return new SelectFormat(r,this.compileOptions(e));default:throw new Error("Message element does not have a valid format type")}},Compiler.prototype.compileOptions=function(e){var t=this,r=e.format,n=r.options;this.pluralStack.push(this.currentPlural),
|
|
@@ -85,17 +85,17 @@ static showAsPassed(e){switch(e.scoreDisplayMode){case"manual":case"notApplicabl
|
|
|
85
85
|
preserveHost:void 0}).numPathParts?t.numPathParts:2,n=void 0===t.preserveQuery||t.preserveQuery,a=t.preserveHost||!1;let i;if("about:"===e.protocol||"data:"===e.protocol)i=e.href;else{i=e.pathname;const t=i.split("/").filter((e=>e.length));r&&t.length>r&&(i=ELLIPSIS+t.slice(-1*r).join("/")),a&&(i=`${e.host}/${i.replace(/^\//,"")}`),n&&(i=`${i}${e.search}`)}if(i=i.replace(/([a-f0-9]{7})[a-f0-9]{13}[a-f0-9]*/g,`$1${ELLIPSIS}`),i=i.replace(/([a-zA-Z0-9-_]{9})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9-_]{10,}/g,`$1${ELLIPSIS}`),i=i.replace(/(\d{3})\d{6,}/g,`$1${ELLIPSIS}`),i=i.replace(/\u2026+/g,ELLIPSIS),i.length>64&&i.includes("?")&&(i=i.replace(/\?([^=]*)(=)?.*/,`?$1$2${ELLIPSIS}`),i.length>64&&(i=i.replace(/\?.*/,`?${ELLIPSIS}`))),i.length>64){const e=i.lastIndexOf(".");i=e>=0?i.slice(0,63-(i.length-e))+`${ELLIPSIS}${i.slice(e)}`:i.slice(0,63)+ELLIPSIS}return i}static parseURL(e){const t=new URL(e);return{file:Util$3.getURLDisplayName(t),hostname:t.hostname,origin:t.origin}}
|
|
86
86
|
static createOrReturnURL(e){return e instanceof URL?e:new URL(e)}static getTld(e){const t=e.split(".").slice(-2);return listOfTlds.includes(t[0])?`.${t.join(".")}`:`.${t[t.length-1]}`}static getRootDomain(e){const t=Util$3.createOrReturnURL(e).hostname,r=Util$3.getTld(t).split(".");return t.split(".").slice(-r.length).join(".")}static getEmulationDescriptions(e){let t,r,n;const a=e.throttling;switch(e.throttlingMethod){case"provided":n=r=t=Util$3.i18n.strings.throttlingProvided;break;case"devtools":{const{cpuSlowdownMultiplier:e,requestLatencyMs:i}=a;t=`${Util$3.i18n.formatNumber(e)}x slowdown (DevTools)`,r=`${Util$3.i18n.formatNumber(i)}${NBSP}ms HTTP RTT, ${Util$3.i18n.formatNumber(a.downloadThroughputKbps)}${NBSP}Kbps down, ${Util$3.i18n.formatNumber(a.uploadThroughputKbps)}${NBSP}Kbps up (DevTools)`;n=(()=>562.5===i&&a.downloadThroughputKbps===1638.4*.9&&675===a.uploadThroughputKbps)()?Util$3.i18n.strings.runtimeSlow4g:Util$3.i18n.strings.runtimeCustom;break}case"simulate":{
|
|
87
87
|
const{cpuSlowdownMultiplier:e,rttMs:i,throughputKbps:o}=a;t=`${Util$3.i18n.formatNumber(e)}x slowdown (Simulated)`,r=`${Util$3.i18n.formatNumber(i)}${NBSP}ms TCP RTT, ${Util$3.i18n.formatNumber(o)}${NBSP}Kbps throughput (Simulated)`;n=(()=>150===i&&1638.4===o)()?Util$3.i18n.strings.runtimeSlow4g:Util$3.i18n.strings.runtimeCustom;break}default:n=t=r=Util$3.i18n.strings.runtimeUnknown}return{deviceEmulation:{mobile:Util$3.i18n.strings.runtimeMobileEmulation,desktop:Util$3.i18n.strings.runtimeDesktopEmulation}[e.formFactor]||Util$3.i18n.strings.runtimeNoEmulation,cpuThrottling:t,networkThrottling:r,summary:n}}static filterRelevantLines(e,t,r){if(0===t.length)return e.slice(0,2*r+1);const n=new Set;return(t=t.sort(((e,t)=>(e.lineNumber||0)-(t.lineNumber||0)))).forEach((({lineNumber:e})=>{let t=e-r,a=e+r;for(;t<1;)t++,a++;n.has(t-3-1)&&(t-=3);for(let e=t;e<=a;e++){const t=e;n.add(t)}})),e.filter((e=>n.has(e.lineNumber)))}static isPluginCategory(e){return e.startsWith("lighthouse-plugin-")}
|
|
88
|
-
static shouldDisplayAsFraction(e){return"timespan"===e||"snapshot"===e}static calculateCategoryFraction(e){let t=0,r=0,n=0,a=0;for(const i of e.auditRefs){const e=Util$3.showAsPassed(i.result);"hidden"!==i.group&&"manual"!==i.result.scoreDisplayMode&&"notApplicable"!==i.result.scoreDisplayMode&&("informative"!==i.result.scoreDisplayMode?(++t,a+=i.weight,e&&r++):e||++n)}return{numPassed:r,numPassableAudits:t,numInformative:n,totalWeight:a}}}Util$3.reportJson=null,Util$3.getUniqueSuffix=(()=>{let e=0;return function(){return e++}})();const UIStrings$
|
|
88
|
+
static shouldDisplayAsFraction(e){return"timespan"===e||"snapshot"===e}static calculateCategoryFraction(e){let t=0,r=0,n=0,a=0;for(const i of e.auditRefs){const e=Util$3.showAsPassed(i.result);"hidden"!==i.group&&"manual"!==i.result.scoreDisplayMode&&"notApplicable"!==i.result.scoreDisplayMode&&("informative"!==i.result.scoreDisplayMode?(++t,a+=i.weight,e&&r++):e||++n)}return{numPassed:r,numPassableAudits:t,numInformative:n,totalWeight:a}}}Util$3.reportJson=null,Util$3.getUniqueSuffix=(()=>{let e=0;return function(){return e++}})();const UIStrings$2M={varianceDisclaimer:"Values are estimated and may vary. The [performance score is calculated](https://web.dev/performance-scoring/) directly from these metrics.",calculatorLink:"See calculator.",showRelevantAudits:"Show audits relevant to:",opportunityResourceColumnLabel:"Opportunity",opportunitySavingsColumnLabel:"Estimated Savings",errorMissingAuditInfo:"Report error: no audit information",errorLabel:"Error!",warningHeader:"Warnings: ",
|
|
89
89
|
warningAuditsGroupTitle:"Passed audits but with warnings",passedAuditsGroupTitle:"Passed audits",notApplicableAuditsGroupTitle:"Not applicable",manualAuditsGroupTitle:"Additional items to manually check",toplevelWarningsMessage:"There were issues affecting this run of Lighthouse:",crcInitialNavigation:"Initial Navigation",crcLongestDurationLabel:"Maximum critical path latency:",snippetExpandButtonLabel:"Expand snippet",snippetCollapseButtonLabel:"Collapse snippet",lsPerformanceCategoryDescription:"[Lighthouse](https://developers.google.com/web/tools/lighthouse/) analysis of the current page on an emulated mobile network. Values are estimated and may vary.",labDataTitle:"Lab Data",thirdPartyResourcesLabel:"Show 3rd-party resources",viewTreemapLabel:"View Treemap",dropdownPrintSummary:"Print Summary",dropdownPrintExpanded:"Print Expanded",dropdownCopyJSON:"Copy JSON",dropdownSaveHTML:"Save as HTML",dropdownSaveJSON:"Save as JSON",dropdownViewer:"Open in Viewer",
|
|
90
|
-
dropdownSaveGist:"Save as Gist",dropdownDarkTheme:"Toggle Dark Theme",runtimeSettingsDevice:"Device",runtimeSettingsNetworkThrottling:"Network throttling",runtimeSettingsCPUThrottling:"CPU throttling",runtimeSettingsUANetwork:"User agent (network)",runtimeSettingsBenchmark:"CPU/Memory Power",runtimeSettingsAxeVersion:"Axe version",footerIssue:"File an issue",runtimeNoEmulation:"No emulation",runtimeMobileEmulation:"Emulated Moto G4",runtimeDesktopEmulation:"Emulated Desktop",runtimeUnknown:"Unknown",runtimeSingleLoad:"Single page load",runtimeAnalysisWindow:"Initial page load",runtimeSingleLoadTooltip:"This data is taken from a single page load, as opposed to field data summarizing many sessions.",throttlingProvided:"Provided by environment",show:"Show",hide:"Hide",expandView:"Expand view",collapseView:"Collapse view",runtimeSlow4g:"Slow 4G throttling",runtimeCustom:"Custom throttling"};Util$3.UIStrings=UIStrings$
|
|
90
|
+
dropdownSaveGist:"Save as Gist",dropdownDarkTheme:"Toggle Dark Theme",runtimeSettingsDevice:"Device",runtimeSettingsNetworkThrottling:"Network throttling",runtimeSettingsCPUThrottling:"CPU throttling",runtimeSettingsUANetwork:"User agent (network)",runtimeSettingsBenchmark:"CPU/Memory Power",runtimeSettingsAxeVersion:"Axe version",footerIssue:"File an issue",runtimeNoEmulation:"No emulation",runtimeMobileEmulation:"Emulated Moto G4",runtimeDesktopEmulation:"Emulated Desktop",runtimeUnknown:"Unknown",runtimeSingleLoad:"Single page load",runtimeAnalysisWindow:"Initial page load",runtimeSingleLoadTooltip:"This data is taken from a single page load, as opposed to field data summarizing many sessions.",throttlingProvided:"Provided by environment",show:"Show",hide:"Hide",expandView:"Expand view",collapseView:"Collapse view",runtimeSlow4g:"Slow 4G throttling",runtimeCustom:"Custom throttling"};Util$3.UIStrings=UIStrings$2M;var utilCommonjs={Util:Util$3,UIStrings:UIStrings$2M}
|
|
91
91
|
;const{Util:Util$2}=utilCommonjs,allowedProtocols=["https:","http:","chrome:","chrome-extension:"],SECURE_SCHEMES=["data","https","wss","blob","chrome","chrome-extension","about","filesystem"],SECURE_LOCALHOST_DOMAINS=["localhost","127.0.0.1"],NON_NETWORK_SCHEMES=["blob","data","intent","file","filesystem"];function rewriteChromeInternalUrl(e){return e&&e.startsWith("chrome://")?(e.endsWith("/")&&(e=e.replace(/\/$/,"")),e.replace(/^chrome:\/\/chrome\//,"chrome://")):e}class URLShim extends URL{static isValid(e){try{return new URL(e),!0}catch(e){return!1}}static hostsMatch(e,t){try{return new URL(e).host===new URL(t).host}catch(e){return!1}}static originsMatch(e,t){try{return new URL(e).origin===new URL(t).origin}catch(e){return!1}}static getOrigin(e){try{const t=new URL(e);return t.host&&t.origin||null}catch(e){return null}}static rootDomainsMatch(e,t){let r,n;try{r=Util$2.createOrReturnURL(e),n=Util$2.createOrReturnURL(t)}catch(e){return!1}if(!r.hostname||!n.hostname)return!1
|
|
92
92
|
;return Util$2.getRootDomain(r)===Util$2.getRootDomain(n)}static getURLDisplayName(e,t){return Util$2.getURLDisplayName(new URL(e),t)}static elideDataURI(e){try{return"data:"===new URL(e).protocol?e.slice(0,100):e}catch(t){return e}}static equalWithExcludedFragments(e,t){[e,t]=[e,t].map(rewriteChromeInternalUrl);try{const r=new URL(e);r.hash="";const n=new URL(t);return n.hash="",r.href===n.href}catch(e){return!1}}static isProtocolAllowed(e){try{const t=new URL(e);return allowedProtocols.includes(t.protocol)}catch(e){return!1}}static isLikeLocalhost(e){return SECURE_LOCALHOST_DOMAINS.includes(e)||e.endsWith(".localhost")}static isSecureScheme(e){return SECURE_SCHEMES.includes(e)}static isNonNetworkProtocol(e){const t=e.includes(":")?e.slice(0,e.indexOf(":")):e;return NON_NETWORK_SCHEMES.includes(t)}static guessMimeType(e){let t;try{t=new URL(e)}catch{return}if("data:"===t.protocol){const e=t.pathname.match(/image\/(png|jpeg|svg\+xml|webp|gif|avif)(?=;)/);if(!e)return;return e[0]}
|
|
93
|
-
const r=t.pathname.toLowerCase().match(/\.(png|jpeg|jpg|svg|webp|gif|avif)$/);if(!r)return;const n=r[1];return"svg"===n?"image/svg+xml":"jpg"===n?"image/jpeg":`image/${n}`}}URLShim.URL=URL,URLShim.INVALID_URL_DEBUG_STRING="Lighthouse was unable to determine the URL of some script executions. It's possible a Chrome extension or other eval'd code is the source.";var urlShim=URLShim;const fs$2=require$$0$3,path$5=require$$5$2,url=urlShim;var root={LH_ROOT:"",readJson(e,t){const r=t?path$5.dirname(url.fileURLToPath(t.url)):"";return e=path$5.resolve(r,e),JSON.parse(fs$2.readFileSync(e,"utf-8"))}};const path$4=require$$5$2,lookupClosestLocale=lookupClosestLocale$1,{getAvailableLocales}=format_1,log$y=lighthouseLogger,{LH_ROOT}=root,{isIcuMessage:isIcuMessage$1,formatMessage,DEFAULT_LOCALE}=format_1,UIStrings$
|
|
93
|
+
const r=t.pathname.toLowerCase().match(/\.(png|jpeg|jpg|svg|webp|gif|avif)$/);if(!r)return;const n=r[1];return"svg"===n?"image/svg+xml":"jpg"===n?"image/jpeg":`image/${n}`}}URLShim.URL=URL,URLShim.INVALID_URL_DEBUG_STRING="Lighthouse was unable to determine the URL of some script executions. It's possible a Chrome extension or other eval'd code is the source.";var urlShim=URLShim;const fs$2=require$$0$3,path$5=require$$5$2,url=urlShim;var root={LH_ROOT:"",readJson(e,t){const r=t?path$5.dirname(url.fileURLToPath(t.url)):"";return e=path$5.resolve(r,e),JSON.parse(fs$2.readFileSync(e,"utf-8"))}};const path$4=require$$5$2,lookupClosestLocale=lookupClosestLocale$1,{getAvailableLocales}=format_1,log$y=lighthouseLogger,{LH_ROOT}=root,{isIcuMessage:isIcuMessage$1,formatMessage,DEFAULT_LOCALE}=format_1,UIStrings$2L={ms:"{timeInMs, number, milliseconds} ms",seconds:"{timeInMs, number, seconds} s",displayValueByteSavings:"Potential savings of {wastedBytes, number, bytes} KiB",
|
|
94
94
|
displayValueMsSavings:"Potential savings of {wastedMs, number, milliseconds} ms",displayValueElementsFound:"{nodeCount, plural, =1 {1 element found} other {# elements found}}",columnURL:"URL",columnSize:"Size",columnResourceSize:"Resource Size",columnTransferSize:"Transfer Size",columnCacheTTL:"Cache TTL",columnWastedBytes:"Potential Savings",columnWastedMs:"Potential Savings",columnBlockingTime:"Main-Thread Blocking Time",columnTimeSpent:"Time Spent",columnLocation:"Location",columnResourceType:"Resource Type",columnRequests:"Requests",columnName:"Name",columnSource:"Source",columnOverBudget:"Over Budget",columnElement:"Element",columnStartTime:"Start Time",columnDuration:"Duration",columnFailingElem:"Failing Elements",columnDescription:"Description",totalResourceType:"Total",documentResourceType:"Document",scriptResourceType:"Script",stylesheetResourceType:"Stylesheet",imageResourceType:"Image",mediaResourceType:"Media",fontResourceType:"Font",otherResourceType:"Other",
|
|
95
95
|
thirdPartyResourceType:"Third-party",otherResourcesLabel:"Other resources",firstContentfulPaintMetric:"First Contentful Paint",interactiveMetric:"Time to Interactive",firstMeaningfulPaintMetric:"First Meaningful Paint",totalBlockingTimeMetric:"Total Blocking Time",maxPotentialFIDMetric:"Max Potential First Input Delay",speedIndexMetric:"Speed Index",largestContentfulPaintMetric:"Largest Contentful Paint",cumulativeLayoutShiftMetric:"Cumulative Layout Shift",itemSeverityLow:"Low",itemSeverityMedium:"Medium",itemSeverityHigh:"High"};function lookupLocale$1(e,t){if("object"!=typeof Intl)throw new Error("Lighthouse must be run in Node with `Intl` support. See https://nodejs.org/api/intl.html for help");const r=Intl.getCanonicalLocales(e),n=Intl.NumberFormat.supportedLocalesOf(r),a=t||getAvailableLocales(),i=Object.fromEntries(a.map((e=>[e,{}]))),o=lookupClosestLocale(n,i)
|
|
96
|
-
;return o||(0===Intl.NumberFormat.supportedLocalesOf("es").length&&log$y.warn("i18n","Requested locale not available in this version of node. The `full-icu` npm module can provide additional locales. For help, see https://github.com/GoogleChrome/lighthouse/blob/master/readme.md#how-do-i-get-localized-lighthouse-results-via-the-cli"),log$y.warn("i18n",`locale(s) '${e}' not available. Falling back to default '${DEFAULT_LOCALE}'`)),o||DEFAULT_LOCALE}function createIcuMessageFn(e,t){const r={...UIStrings$
|
|
97
|
-
createMessageInstanceIdFn:createIcuMessageFn};const log$x=lighthouseLogger,constants$6=constants$7,pageFunctions$g=pageFunctions$h,i18n$2G=i18n$2H,UIStrings$
|
|
98
|
-
;log$x.time(t);const r=await e.evaluate(pageFunctions$g.computeBenchmarkIndex,{args:[]});return log$x.timeEnd(t),r}function getSlowHostCpuWarning(e){const{settings:t,baseArtifacts:r}=e,{throttling:n,throttlingMethod:a}=t,i=constants$6.defaultSettings.throttling;if("cli"!==t.channel)return;const o="simulate"===a||"devtools"===a,l=n.cpuSlowdownMultiplier===i.cpuSlowdownMultiplier;return!o||!l||r.BenchmarkIndex>SLOW_CPU_BENCHMARK_INDEX_THRESHOLD?void 0:str_$2C(UIStrings$
|
|
96
|
+
;return o||(0===Intl.NumberFormat.supportedLocalesOf("es").length&&log$y.warn("i18n","Requested locale not available in this version of node. The `full-icu` npm module can provide additional locales. For help, see https://github.com/GoogleChrome/lighthouse/blob/master/readme.md#how-do-i-get-localized-lighthouse-results-via-the-cli"),log$y.warn("i18n",`locale(s) '${e}' not available. Falling back to default '${DEFAULT_LOCALE}'`)),o||DEFAULT_LOCALE}function createIcuMessageFn(e,t){const r={...UIStrings$2L,...t};return(n,a)=>{const i=Object.keys(r).find((e=>r[e]===n));if(!i)throw new Error(`Could not locate: ${n}`);const o=i in t?e:"lighthouse-core/lib/i18n/i18n.js";return{i18nId:`${path$4.relative(LH_ROOT,o).replace(/\\/g,"/")} | ${i}`,values:a,formattedDefault:formatMessage(n,a,DEFAULT_LOCALE)}}}function isStringOrIcuMessage(e){return"string"==typeof e||isIcuMessage$1(e)}var i18n$2H={UIStrings:UIStrings$2L,lookupLocale:lookupLocale$1,createIcuMessageFn,isStringOrIcuMessage,
|
|
97
|
+
createMessageInstanceIdFn:createIcuMessageFn};const log$x=lighthouseLogger,constants$6=constants$7,pageFunctions$g=pageFunctions$h,i18n$2G=i18n$2H,UIStrings$2K={warningSlowHostCpu:"The tested device appears to have a slower CPU than Lighthouse expects. This can negatively affect your performance score. Learn more about [calibrating an appropriate CPU slowdown multiplier](https://github.com/GoogleChrome/lighthouse/blob/master/docs/throttling.md#cpu-throttling)."},SLOW_CPU_BENCHMARK_INDEX_THRESHOLD=1e3,str_$2C=i18n$2G.createMessageInstanceIdFn("lighthouse-core/gather/driver/environment.js",UIStrings$2K);async function getBrowserVersion$3(e){const t={msg:"Getting browser version",id:"lh:gather:getVersion"};log$x.time(t,"verbose");const r=await e.sendCommand("Browser.getVersion"),n=r.product.match(/\/(\d+)/),a=n?parseInt(n[1]):0;return log$x.timeEnd(t),Object.assign(r,{milestone:a})}async function getBenchmarkIndex$2(e){const t={msg:"Benchmarking machine",id:"lh:gather:getBenchmarkIndex"}
|
|
98
|
+
;log$x.time(t);const r=await e.evaluate(pageFunctions$g.computeBenchmarkIndex,{args:[]});return log$x.timeEnd(t),r}function getSlowHostCpuWarning(e){const{settings:t,baseArtifacts:r}=e,{throttling:n,throttlingMethod:a}=t,i=constants$6.defaultSettings.throttling;if("cli"!==t.channel)return;const o="simulate"===a||"devtools"===a,l=n.cpuSlowdownMultiplier===i.cpuSlowdownMultiplier;return!o||!l||r.BenchmarkIndex>SLOW_CPU_BENCHMARK_INDEX_THRESHOLD?void 0:str_$2C(UIStrings$2K.warningSlowHostCpu)}function getEnvironmentWarnings$2(e){return[getSlowHostCpuWarning(e)].filter((e=>!!e))}var environment={UIStrings:UIStrings$2K,getBrowserVersion:getBrowserVersion$3,getBenchmarkIndex:getBenchmarkIndex$2,getSlowHostCpuWarning,getEnvironmentWarnings:getEnvironmentWarnings$2};
|
|
99
99
|
/**
|
|
100
100
|
* @license Copyright 2020 Google Inc. All Rights Reserved.
|
|
101
101
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -108,14 +108,14 @@ args:[e],useIsolation:!0}),[l]=await Promise.all([i,o]);return await this.sessio
|
|
|
108
108
|
worldName:"lighthouse_isolated_context"});return this._executionContextId=t.executionContextId,t.executionContextId}async _evaluateInContext(e,t){const r=this._session.hasNextProtocolTimeout()?this._session.getNextProtocolTimeout():6e4,n={expression:`(function wrapInNativePromise() {\n ${ExecutionContext$2._cachedNativesPreamble};\n globalThis.__lighthouseExecutionContextId = ${t};\n return new Promise(function (resolve) {\n return Promise.resolve()\n .then(_ => ${e})\n .catch(${pageFunctions$f.wrapRuntimeEvalErrorInBrowserString})\n .then(resolve);\n });\n }())`,includeCommandLineAPI:!0,awaitPromise:!0,returnByValue:!0,timeout:r,contextId:t};this._session.setNextProtocolTimeout(r);const a=await this._session.sendCommand("Runtime.evaluate",n);if(a.exceptionDetails){const e=a.exceptionDetails.exception?a.exceptionDetails.exception.description:a.exceptionDetails.text
|
|
109
109
|
;return Promise.reject(new Error(`Evaluation exception: ${e}`))}if(void 0===a.result)return Promise.reject(new Error('Runtime.evaluate response did not contain a "result" object'));const i=a.result.value;return i&&i.__failedInBrowser?Promise.reject(Object.assign(new Error,i)):i}async evaluateAsync(e,t={}){const r=t.useIsolation?await this._getOrCreateIsolatedContextId():void 0;try{return await this._evaluateInContext(e,r)}catch(t){if(r&&t.message.includes("Cannot find context")){this.clearContextId();const t=await this._getOrCreateIsolatedContextId();return this._evaluateInContext(e,t)}throw t}}evaluate(e,t){const r=ExecutionContext$2.serializeArguments(t.args),n=`(() => {\n ${t.deps?t.deps.join("\n"):""}\n return (${e})(${r});\n })()`;return this.evaluateAsync(n,t)}async evaluateOnNewDocument(e,t){
|
|
110
110
|
const r=ExecutionContext$2.serializeArguments(t.args),n=t.deps?t.deps.join("\n"):"",a=`(() => {\n ${ExecutionContext$2._cachedNativesPreamble};\n ${n};\n (${e})(${r});\n })()`;await this._session.sendCommand("Page.addScriptToEvaluateOnNewDocument",{source:a})}async cacheNativesOnNewDocument(){await this.evaluateOnNewDocument((()=>{window.__nativePromise=window.Promise,window.__nativeURL=window.URL,window.__nativePerformance=window.performance,window.__ElementMatches=window.Element.prototype.matches;const e=window.performance,t=window.performance.now;Object.defineProperty(e,"now",{value:()=>t.call(e),writable:!1})}),{args:[]})}static _cachedNativesPreamble=["const Promise = globalThis.__nativePromise || globalThis.Promise","const URL = globalThis.__nativeURL || globalThis.URL","const performance = globalThis.__nativePerformance || globalThis.performance"].join(";\n");static serializeArguments(e){return e.map((e=>void 0===e?"undefined":JSON.stringify(e))).join(",")}}
|
|
111
|
-
var executionContext=ExecutionContext$2,lhError={exports:{}};const i18n$2F=i18n$2H,UIStrings$
|
|
111
|
+
var executionContext=ExecutionContext$2,lhError={exports:{}};const i18n$2F=i18n$2H,UIStrings$2J={didntCollectScreenshots:"Chrome didn't collect any screenshots during the page load. Please make sure there is content visible on the page, and then try re-running Lighthouse. ({errorCode})",badTraceRecording:"Something went wrong with recording the trace over your page load. Please run Lighthouse again. ({errorCode})",noFcp:"The page did not paint any content. Please ensure you keep the browser window in the foreground during the load and try again. ({errorCode})",pageLoadTookTooLong:"Your page took too long to load. Please follow the opportunities in the report to reduce your page load time, and then try re-running Lighthouse. ({errorCode})",pageLoadFailed:"Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests.",
|
|
112
112
|
pageLoadFailedWithStatusCode:"Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: {statusCode})",pageLoadFailedWithDetails:"Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: {errorDetails})",pageLoadFailedInsecure:"The URL you have provided does not have a valid security certificate. {securityMessages}",pageLoadFailedInterstitial:"Chrome prevented page load with an interstitial. Make sure you are testing the correct URL and that the server is properly responding to all requests.",internalChromeError:"An internal Chrome error occurred. Please restart Chrome and try re-running Lighthouse.",requestContentTimeout:"Fetching resource content has exceeded the allotted time",
|
|
113
|
-
notHtml:"The page provided is not HTML (served as MIME type {mimeType}).",urlInvalid:"The URL you have provided appears to be invalid.",protocolTimeout:"Waiting for DevTools protocol response has exceeded the allotted time. (Method: {protocolMethod})",dnsFailure:"DNS servers could not resolve the provided domain.",pageLoadFailedHung:"Lighthouse was unable to reliably load the URL you requested because the page stopped responding.",criTimeout:"Timeout waiting for initial Debugger Protocol connection.",missingRequiredArtifact:"Required {artifactName} gatherer did not run.",erroredRequiredArtifact:"Required {artifactName} gatherer encountered an error: {errorMessage}",oldChromeDoesNotSupportFeature:"This version of Chrome is too old to support '{featureName}'. Use a newer version to see full results."},str_$2B=i18n$2F.createMessageInstanceIdFn("lighthouse-core/lib/lh-error.js",UIStrings$
|
|
113
|
+
notHtml:"The page provided is not HTML (served as MIME type {mimeType}).",urlInvalid:"The URL you have provided appears to be invalid.",protocolTimeout:"Waiting for DevTools protocol response has exceeded the allotted time. (Method: {protocolMethod})",dnsFailure:"DNS servers could not resolve the provided domain.",pageLoadFailedHung:"Lighthouse was unable to reliably load the URL you requested because the page stopped responding.",criTimeout:"Timeout waiting for initial Debugger Protocol connection.",missingRequiredArtifact:"Required {artifactName} gatherer did not run.",erroredRequiredArtifact:"Required {artifactName} gatherer encountered an error: {errorMessage}",oldChromeDoesNotSupportFeature:"This version of Chrome is too old to support '{featureName}'. Use a newer version to see full results."},str_$2B=i18n$2F.createMessageInstanceIdFn("lighthouse-core/lib/lh-error.js",UIStrings$2J),LHERROR_SENTINEL="__LighthouseErrorSentinel",ERROR_SENTINEL="__ErrorSentinel"
|
|
114
114
|
;class LighthouseError$1 extends Error{constructor(e,t){super(e.code),this.name="LHError",this.code=e.code,this.friendlyMessage=str_$2B(e.message,{errorCode:this.code,...t}),this.lhrRuntimeError=!!e.lhrRuntimeError,t&&Object.assign(this,t),Error.captureStackTrace(this,LighthouseError$1)}static fromProtocolMessage(e,t){const r=Object.values(LighthouseError$1.errors).filter((e=>e.pattern)).find((e=>e.pattern&&e.pattern.test(t.message)));if(r)return new LighthouseError$1(r);let n=`(${e}): ${t.message}`;t.data&&(n+=` (${t.data})`);const a=new Error(`Protocol error ${n}`);return Object.assign(a,{protocolMethod:e,protocolError:t.message})}static stringifyReplacer(e){if(e instanceof LighthouseError$1){const{name:t,code:r,message:n,friendlyMessage:a,lhrRuntimeError:i,stack:o,...l}=e;return{sentinel:LHERROR_SENTINEL,code:r,stack:o,...l}}if(e instanceof Error){const{message:t,stack:r}=e,n=e.code;return{sentinel:ERROR_SENTINEL,message:t,code:n,stack:r}}
|
|
115
|
-
throw new Error("Invalid value for LHError stringification")}static parseReviver(e,t){if("object"==typeof t&&null!==t){if(t.sentinel===LHERROR_SENTINEL){const{sentinel:e,code:r,stack:n,...a}=t,i=LighthouseError$1.errors[r],o=new LighthouseError$1(i,a);return o.stack=n,o}if(t.sentinel===ERROR_SENTINEL){const{message:e,code:r,stack:n}=t,a=new Error(e);return Object.assign(a,{code:r,stack:n}),a}}return t}}const ERRORS={NO_SPEEDLINE_FRAMES:{code:"NO_SPEEDLINE_FRAMES",message:UIStrings$
|
|
116
|
-
code:"NO_RESOURCE_REQUEST",message:UIStrings$
|
|
117
|
-
code:"FAILED_DOCUMENT_REQUEST",message:UIStrings$
|
|
118
|
-
pattern:/Read failed/,lhrRuntimeError:!0},INVALID_URL:{code:"INVALID_URL",message:UIStrings$
|
|
115
|
+
throw new Error("Invalid value for LHError stringification")}static parseReviver(e,t){if("object"==typeof t&&null!==t){if(t.sentinel===LHERROR_SENTINEL){const{sentinel:e,code:r,stack:n,...a}=t,i=LighthouseError$1.errors[r],o=new LighthouseError$1(i,a);return o.stack=n,o}if(t.sentinel===ERROR_SENTINEL){const{message:e,code:r,stack:n}=t,a=new Error(e);return Object.assign(a,{code:r,stack:n}),a}}return t}}const ERRORS={NO_SPEEDLINE_FRAMES:{code:"NO_SPEEDLINE_FRAMES",message:UIStrings$2J.didntCollectScreenshots,lhrRuntimeError:!0},SPEEDINDEX_OF_ZERO:{code:"SPEEDINDEX_OF_ZERO",message:UIStrings$2J.didntCollectScreenshots,lhrRuntimeError:!0},NO_SCREENSHOTS:{code:"NO_SCREENSHOTS",message:UIStrings$2J.didntCollectScreenshots,lhrRuntimeError:!0},INVALID_SPEEDLINE:{code:"INVALID_SPEEDLINE",message:UIStrings$2J.didntCollectScreenshots,lhrRuntimeError:!0},NO_TRACING_STARTED:{code:"NO_TRACING_STARTED",message:UIStrings$2J.badTraceRecording,lhrRuntimeError:!0},NO_RESOURCE_REQUEST:{
|
|
116
|
+
code:"NO_RESOURCE_REQUEST",message:UIStrings$2J.badTraceRecording,lhrRuntimeError:!0},NO_NAVSTART:{code:"NO_NAVSTART",message:UIStrings$2J.badTraceRecording,lhrRuntimeError:!0},NO_FCP:{code:"NO_FCP",message:UIStrings$2J.noFcp,lhrRuntimeError:!0},NO_DCL:{code:"NO_DCL",message:UIStrings$2J.badTraceRecording,lhrRuntimeError:!0},NO_FMP:{code:"NO_FMP",message:UIStrings$2J.badTraceRecording},NO_LCP:{code:"NO_LCP",message:UIStrings$2J.badTraceRecording},NO_LCP_ALL_FRAMES:{code:"NO_LCP_ALL_FRAMES",message:UIStrings$2J.badTraceRecording},UNSUPPORTED_OLD_CHROME:{code:"UNSUPPORTED_OLD_CHROME",message:UIStrings$2J.oldChromeDoesNotSupportFeature},NO_TTI_CPU_IDLE_PERIOD:{code:"NO_TTI_CPU_IDLE_PERIOD",message:UIStrings$2J.pageLoadTookTooLong},NO_TTI_NETWORK_IDLE_PERIOD:{code:"NO_TTI_NETWORK_IDLE_PERIOD",message:UIStrings$2J.pageLoadTookTooLong},NO_DOCUMENT_REQUEST:{code:"NO_DOCUMENT_REQUEST",message:UIStrings$2J.pageLoadFailed,lhrRuntimeError:!0},FAILED_DOCUMENT_REQUEST:{
|
|
117
|
+
code:"FAILED_DOCUMENT_REQUEST",message:UIStrings$2J.pageLoadFailedWithDetails,lhrRuntimeError:!0},ERRORED_DOCUMENT_REQUEST:{code:"ERRORED_DOCUMENT_REQUEST",message:UIStrings$2J.pageLoadFailedWithStatusCode,lhrRuntimeError:!0},INSECURE_DOCUMENT_REQUEST:{code:"INSECURE_DOCUMENT_REQUEST",message:UIStrings$2J.pageLoadFailedInsecure,lhrRuntimeError:!0},CHROME_INTERSTITIAL_ERROR:{code:"CHROME_INTERSTITIAL_ERROR",message:UIStrings$2J.pageLoadFailedInterstitial,lhrRuntimeError:!0},PAGE_HUNG:{code:"PAGE_HUNG",message:UIStrings$2J.pageLoadFailedHung,lhrRuntimeError:!0},NOT_HTML:{code:"NOT_HTML",message:UIStrings$2J.notHtml,lhrRuntimeError:!0},TRACING_ALREADY_STARTED:{code:"TRACING_ALREADY_STARTED",message:UIStrings$2J.internalChromeError,pattern:/Tracing.*started/,lhrRuntimeError:!0},PARSING_PROBLEM:{code:"PARSING_PROBLEM",message:UIStrings$2J.internalChromeError,pattern:/Parsing problem/,lhrRuntimeError:!0},READ_FAILED:{code:"READ_FAILED",message:UIStrings$2J.internalChromeError,
|
|
118
|
+
pattern:/Read failed/,lhrRuntimeError:!0},INVALID_URL:{code:"INVALID_URL",message:UIStrings$2J.urlInvalid},PROTOCOL_TIMEOUT:{code:"PROTOCOL_TIMEOUT",message:UIStrings$2J.protocolTimeout,lhrRuntimeError:!0},DNS_FAILURE:{code:"DNS_FAILURE",message:UIStrings$2J.dnsFailure,lhrRuntimeError:!0},CRI_TIMEOUT:{code:"CRI_TIMEOUT",message:UIStrings$2J.criTimeout,lhrRuntimeError:!0},MISSING_REQUIRED_ARTIFACT:{code:"MISSING_REQUIRED_ARTIFACT",message:UIStrings$2J.missingRequiredArtifact},ERRORED_REQUIRED_ARTIFACT:{code:"ERRORED_REQUIRED_ARTIFACT",message:UIStrings$2J.erroredRequiredArtifact}};LighthouseError$1.errors=ERRORS,LighthouseError$1.NO_ERROR="NO_ERROR",LighthouseError$1.UNKNOWN_ERROR="UNKNOWN_ERROR",lhError.exports=LighthouseError$1,lhError.exports.UIStrings=UIStrings$2J
|
|
119
119
|
;const URL$L=urlShim,HEADER_TCP="X-TCPMs",HEADER_SSL="X-SSLMs",HEADER_REQ="X-RequestMs",HEADER_RES="X-ResponseMs",HEADER_TOTAL="X-TotalMs",HEADER_FETCHED_SIZE="X-TotalFetchedSize",HEADER_PROTOCOL_IS_H2="X-ProtocolIsH2",RESOURCE_TYPES={XHR:"XHR",Fetch:"Fetch",EventSource:"EventSource",Script:"Script",Stylesheet:"Stylesheet",Image:"Image",Media:"Media",Font:"Font",Document:"Document",TextTrack:"TextTrack",WebSocket:"WebSocket",Other:"Other",Manifest:"Manifest",SignedExchange:"SignedExchange",Ping:"Ping",Preflight:"Preflight",CSPViolationReport:"CSPViolationReport"};class NetworkRequest$p{constructor(){this.requestId="",this.connectionId="0",this.connectionReused=!1,this.url="",this.protocol="",this.isSecure=!1,this.isValid=!1,this.parsedURL={scheme:""},this.documentURL="",this.startTime=-1,this.endTime=-1,this.responseReceivedTime=-1,this.transferSize=0,this.resourceSize=0,this.fromDiskCache=!1,this.fromMemoryCache=!1,this.fromPrefetchCache=!1,this.lrStatistics=void 0,this.finished=!1,
|
|
120
120
|
this.requestMethod="",this.statusCode=-1,this.redirectSource=void 0,this.redirectDestination=void 0,this.redirects=void 0,this.failed=!1,this.localizedFailDescription="",this.initiator={type:"other"},this.timing=void 0,this.resourceType=void 0,this.mimeType="",this.priority="Low",this.initiatorRequest=void 0,this.responseHeaders=[],this.responseHeadersText="",this.fetchedViaServiceWorker=!1,this.frameId="",this.sessionId=void 0,this.isLinkPreload=!1}hasErrorStatusCode(){return this.statusCode>=400}setInitiatorRequest(e){this.initiatorRequest=e}onRequestWillBeSent(e){let t;this.requestId=e.requestId;try{t=new URL$L(e.request.url)}catch(e){return}this.url=e.request.url,this.documentURL=e.documentURL,this.parsedURL={scheme:t.protocol.split(":")[0],host:t.hostname,securityOrigin:t.origin},this.isSecure=URL$L.isSecureScheme(this.parsedURL.scheme),this.startTime=e.timestamp,this.requestMethod=e.request.method,this.initiator=e.initiator,this.resourceType=e.type&&RESOURCE_TYPES[e.type],
|
|
121
121
|
this.priority=e.request.initialPriority,this.frameId=e.frameId,this.isLinkPreload="preload"===e.initiator.type||!!e.request.isLinkPreload,this.isValid=!0}onRequestServedFromCache(){this.fromMemoryCache=!0}onResponseReceived(e){this._onResponse(e.response,e.timestamp,e.type),this._updateProtocolForLightrider(),this.frameId=e.frameId}onDataReceived(e){this.resourceSize+=e.dataLength,-1!==e.encodedDataLength&&(this.transferSize+=e.encodedDataLength)}onLoadingFinished(e){this.finished||(this.finished=!0,this.endTime=e.timestamp,e.encodedDataLength>=0&&(this.transferSize=e.encodedDataLength),this._updateResponseReceivedTimeIfNecessary(),this._updateTransferSizeForLightrider(),this._updateTimingsForLightrider())}onLoadingFailed(e){this.finished||(this.finished=!0,this.endTime=e.timestamp,this.failed=!0,this.resourceType=e.type&&RESOURCE_TYPES[e.type],this.localizedFailDescription=e.errorText,this._updateResponseReceivedTimeIfNecessary(),this._updateTransferSizeForLightrider(),
|
|
@@ -157,12 +157,12 @@ if(!Number.isFinite(r.receiveHeadersEnd)||r.receiveHeadersEnd<0)return;if(!Numbe
|
|
|
157
157
|
static estimateRTTByOrigin(e,t){const{forceCoarseEstimates:r=!1,coarseEstimateMultiplier:n=.3,useDownloadEstimates:a=!0,useSendStartEstimates:i=!0,useHeadersEndEstimates:o=!0}=t||{};let l=NetworkAnalyzer$c._estimateRTTByOriginViaTCPTiming(e);if(!l.size||r){l=new Map;const t=NetworkAnalyzer$c._estimateRTTByOriginViaDownloadTiming(e),r=NetworkAnalyzer$c._estimateRTTByOriginViaSendStartTiming(e),c=NetworkAnalyzer$c._estimateRTTByOriginViaHeadersEndTiming(e);for(const[e,r]of t.entries())a&&l.set(e,r);for(const[e,t]of r.entries()){if(!i)continue;const r=l.get(e)||[];l.set(e,r.concat(t))}for(const[e,t]of c.entries()){if(!o)continue;const r=l.get(e)||[];l.set(e,r.concat(t))}for(const e of l.values())e.forEach(((t,r)=>e[r]=t*n))}if(!l.size)throw new Error("No timing information available");return NetworkAnalyzer$c.summarize(l)}static estimateServerResponseTimeByOrigin(e,t){let r=(t||{}).rttByOrigin;if(!r){r=new Map;const n=NetworkAnalyzer$c.estimateRTTByOrigin(e,t)
|
|
158
158
|
;for(const[e,t]of n.entries())r.set(e,t.min)}const n=NetworkAnalyzer$c._estimateResponseTimeByOrigin(e,r);return NetworkAnalyzer$c.summarize(n)}static estimateThroughput(e){let t=0;const r=e.reduce(((e,r)=>("data"===(r.parsedURL&&r.parsedURL.scheme)||r.failed||!r.finished||r.statusCode>300||!r.transferSize||(t+=r.transferSize,e.push({time:r.responseReceivedTime,isStart:!0}),e.push({time:r.endTime,isStart:!1})),e)),[]).sort(((e,t)=>e.time-t.time));if(!r.length)return 1/0;let n=0,a=0,i=0;return r.forEach((e=>{e.isStart?(0===n&&(a=e.time),n++):(n--,0===n&&(i+=e.time-a))})),8*t/i}static findMainDocument(e,t){const r=NetworkAnalyzer$c.findOptionalMainDocument(e,t);if(!r)throw new Error("Unable to identify the main resource");return r}static findOptionalMainDocument(e,t){if(t){const r=e.find((e=>t.startsWith(e.url)&&URL$K.equalWithExcludedFragments(e.url,t)));if(r)return r}const r=e.filter((e=>e.resourceType===NetworkRequest$m.TYPES.Document))
|
|
159
159
|
;if(r.length)return r.reduce(((e,t)=>t.startTime<e.startTime?t:e))}static resolveRedirects(e){for(;e.redirectDestination;)e=e.redirectDestination;return e}}var networkAnalyzer=NetworkAnalyzer$c;const LHError$f=lhError.exports,NetworkAnalyzer$b=networkAnalyzer;function getNetworkError(e){if(!e)return new LHError$f(LHError$f.errors.NO_DOCUMENT_REQUEST);if(e.failed){const t=e.localizedFailDescription;return"net::ERR_NAME_NOT_RESOLVED"===t||"net::ERR_NAME_RESOLUTION_FAILED"===t||t.startsWith("net::ERR_DNS_")?new LHError$f(LHError$f.errors.DNS_FAILURE):new LHError$f(LHError$f.errors.FAILED_DOCUMENT_REQUEST,{errorDetails:t})}return e.hasErrorStatusCode()?new LHError$f(LHError$f.errors.ERRORED_DOCUMENT_REQUEST,{statusCode:`${e.statusCode}`}):void 0}function getInterstitialError(e,t){if(!e)return;return t.find((e=>e.documentURL.startsWith("chrome-error://")))&&e.failed?e.localizedFailDescription.startsWith("net::ERR_CERT")?new LHError$f(LHError$f.errors.INSECURE_DOCUMENT_REQUEST,{
|
|
160
|
-
securityMessages:e.localizedFailDescription}):new LHError$f(LHError$f.errors.CHROME_INTERSTITIAL_ERROR):void 0}function getNonHtmlError(e){if(e)return"text/html"!==e.mimeType?new LHError$f(LHError$f.errors.NOT_HTML,{mimeType:e.mimeType}):void 0}function getPageLoadError$1(e,t){const{url:r,loadFailureMode:n,networkRecords:a}=t;let i,o;try{i=NetworkAnalyzer$b.findMainDocument(a,r)}catch(e){}i&&(o=NetworkAnalyzer$b.resolveRedirects(i));const l=getNetworkError(i),c=getInterstitialError(i,a),u=getNonHtmlError(o);if("ignore"!==n)return c||(l||(u||e))}var navigationError={getNetworkError,getInterstitialError,getPageLoadError:getPageLoadError$1,getNonHtmlError};const version="9.
|
|
160
|
+
securityMessages:e.localizedFailDescription}):new LHError$f(LHError$f.errors.CHROME_INTERSTITIAL_ERROR):void 0}function getNonHtmlError(e){if(e)return"text/html"!==e.mimeType?new LHError$f(LHError$f.errors.NOT_HTML,{mimeType:e.mimeType}):void 0}function getPageLoadError$1(e,t){const{url:r,loadFailureMode:n,networkRecords:a}=t;let i,o;try{i=NetworkAnalyzer$b.findMainDocument(a,r)}catch(e){}i&&(o=NetworkAnalyzer$b.resolveRedirects(i));const l=getNetworkError(i),c=getInterstitialError(i,a),u=getNonHtmlError(o);if("ignore"!==n)return c||(l||(u||e))}var navigationError={getNetworkError,getInterstitialError,getPageLoadError:getPageLoadError$1,getNonHtmlError};const version="9.1.0";var _rollupPluginShim10=Object.freeze({__proto__:null,version}),require$$15=getAugmentedNamespace(_rollupPluginShim10);const{version:lighthouseVersion$1}=require$$15,NO_THROTTLING_METRICS={latency:0,downloadThroughput:0,uploadThroughput:0,offline:!1},NO_CPU_THROTTLE_METRICS={rate:1}
|
|
161
161
|
;function parseUseragentIntoMetadata(e,t){const r=e.match(/Chrome\/([\d.]+)/),n=r&&r[1]||"99.0.1234.0",[a]=n.split(".",1),i="mobile"===t;return{brands:[{brand:"Chromium",version:a},{brand:"Google Chrome",version:a},{brand:"Lighthouse",version:lighthouseVersion$1}],fullVersion:n,...i?{platform:"Android",platformVersion:"6.0",architecture:"",model:"Moto G4"}:{platform:"macOS",platformVersion:"10.15.7",architecture:"x86",model:""},mobile:i}}async function emulate(e,t){if(!1!==t.emulatedUserAgent){const r=t.emulatedUserAgent;await e.sendCommand("Network.setUserAgentOverride",{userAgent:r,userAgentMetadata:parseUseragentIntoMetadata(r,t.formFactor)})}if(!0!==t.screenEmulation.disabled){const{width:r,height:n,deviceScaleFactor:a,mobile:i}=t.screenEmulation,o={width:r,height:n,deviceScaleFactor:a,mobile:i};await e.sendCommand("Emulation.setDeviceMetricsOverride",o),await e.sendCommand("Emulation.setTouchEmulationEnabled",{enabled:o.mobile})}}async function throttle(e,t){
|
|
162
162
|
if("devtools"!==t.throttlingMethod)return clearNetworkThrottling(e);await Promise.all([enableNetworkThrottling(e,t.throttling),enableCPUThrottling(e,t.throttling)])}async function clearThrottling(e){await Promise.all([clearNetworkThrottling(e),clearCPUThrottling(e)])}function enableNetworkThrottling(e,t){const r={offline:!1,latency:t.requestLatencyMs||0,downloadThroughput:t.downloadThroughputKbps||0,uploadThroughput:t.uploadThroughputKbps||0};return r.downloadThroughput=Math.floor(1024*r.downloadThroughput/8),r.uploadThroughput=Math.floor(1024*r.uploadThroughput/8),e.sendCommand("Network.emulateNetworkConditions",r)}function clearNetworkThrottling(e){return e.sendCommand("Network.emulateNetworkConditions",NO_THROTTLING_METRICS)}function enableCPUThrottling(e,t){const r=t.cpuSlowdownMultiplier;return e.sendCommand("Emulation.setCPUThrottlingRate",{rate:r})}function clearCPUThrottling(e){return e.sendCommand("Emulation.setCPUThrottlingRate",NO_CPU_THROTTLE_METRICS)}var emulation$3={
|
|
163
|
-
emulate,throttle,clearThrottling,enableNetworkThrottling,clearNetworkThrottling,enableCPUThrottling,clearCPUThrottling};const log$q=lighthouseLogger,i18n$2E=i18n$2H,UIStrings$
|
|
164
|
-
await e.sendCommand("Storage.clearDataForOrigin",{origin:n,storageTypes:a})}catch(e){if("PROTOCOL_TIMEOUT"!==e.code)throw e;log$q.warn("Driver","clearDataForOrigin timed out")}finally{log$q.timeEnd(r)}}async function getImportantStorageWarning(e,t){const r=await e.sendCommand("Storage.getUsageAndQuota",{origin:t}),n={local_storage:"Local Storage",indexeddb:"IndexedDB",websql:"Web SQL"},a=r.usageBreakdown.filter((e=>e.usage)).map((e=>n[e.storageType]||"")).filter(Boolean);if(a.length)return str_$2A(UIStrings$
|
|
165
|
-
UIStrings:UIStrings$
|
|
163
|
+
emulate,throttle,clearThrottling,enableNetworkThrottling,clearNetworkThrottling,enableCPUThrottling,clearCPUThrottling};const log$q=lighthouseLogger,i18n$2E=i18n$2H,UIStrings$2I={warningData:"{locationCount, plural,\n =1 {There may be stored data affecting loading performance in this location: {locations}. Audit this page in an incognito window to prevent those resources from affecting your scores.}\n other {There may be stored data affecting loading performance in these locations: {locations}. Audit this page in an incognito window to prevent those resources from affecting your scores.}\n }"},str_$2A=i18n$2E.createMessageInstanceIdFn("lighthouse-core/gather/driver/storage.js",UIStrings$2I);async function clearDataForOrigin(e,t){const r={msg:"Cleaning origin data",id:"lh:storage:clearDataForOrigin"};log$q.time(r);const n=new URL(t).origin,a=["file_systems","shader_cache","service_workers","cache_storage"].join(",");e.setNextProtocolTimeout(5e3);try{
|
|
164
|
+
await e.sendCommand("Storage.clearDataForOrigin",{origin:n,storageTypes:a})}catch(e){if("PROTOCOL_TIMEOUT"!==e.code)throw e;log$q.warn("Driver","clearDataForOrigin timed out")}finally{log$q.timeEnd(r)}}async function getImportantStorageWarning(e,t){const r=await e.sendCommand("Storage.getUsageAndQuota",{origin:t}),n={local_storage:"Local Storage",indexeddb:"IndexedDB",websql:"Web SQL"},a=r.usageBreakdown.filter((e=>e.usage)).map((e=>n[e.storageType]||"")).filter(Boolean);if(a.length)return str_$2A(UIStrings$2I.warningData,{locations:a.join(", "),locationCount:a.length})}async function clearBrowserCaches(e){const t={msg:"Cleaning browser cache",id:"lh:storage:clearBrowserCaches"};log$q.time(t),await e.sendCommand("Network.clearBrowserCache"),await e.sendCommand("Network.setCacheDisabled",{cacheDisabled:!0}),await e.sendCommand("Network.setCacheDisabled",{cacheDisabled:!1}),log$q.timeEnd(t)}var storage$2={clearDataForOrigin,clearBrowserCaches,getImportantStorageWarning,
|
|
165
|
+
UIStrings:UIStrings$2I};const log$p=lighthouseLogger,storage$1=storage$2,emulation$2=emulation$3,pageFunctions$e=pageFunctions$h;async function enableAsyncStacks(e){const enable=async()=>{await e.sendCommand("Debugger.enable"),await e.sendCommand("Debugger.setSkipAllPauses",{skip:!0}),await e.sendCommand("Debugger.setAsyncCallStackDepth",{maxDepth:8})};e.on("Debugger.paused",(()=>e.sendCommand("Debugger.resume"))),e.on("Page.frameNavigated",(e=>{e.frame.parentId||enable().catch((e=>log$p.error("Driver",e)))})),await enable()}async function shimRequestIdleCallbackOnNewDocument(e,t){await e.executionContext.evaluateOnNewDocument(pageFunctions$e.wrapRequestIdleCallback,{args:[t.throttling.cpuSlowdownMultiplier]})}async function dismissJavaScriptDialogs(e){e.on("Page.javascriptDialogOpening",(t=>{log$p.warn("Driver",`${t.type} dialog opened by the page automatically suppressed.`),e.sendCommand("Page.handleJavaScriptDialog",{accept:!0,promptText:"Lighthouse prompt response"
|
|
166
166
|
}).catch((e=>log$p.warn("Driver",e)))})),await e.sendCommand("Page.enable")}async function resetStorageForNavigation(e,t){const r=[],n=await storage$1.getImportantStorageWarning(e,t.url);return n&&r.push(n),await storage$1.clearDataForOrigin(e,t.url),await storage$1.clearBrowserCaches(e),{warnings:r}}async function prepareThrottlingAndNetwork(e,t,r){const n={msg:"Preparing network conditions",id:"lh:gather:prepareThrottlingAndNetwork"};log$p.time(n),r.disableThrottling?await emulation$2.clearThrottling(e):await emulation$2.throttle(e,t);const a=(r.blockedUrlPatterns||[]).concat(t.blockedUrlPatterns||[]);await e.sendCommand("Network.setBlockedURLs",{urls:a});const i=t.extraHeaders;i&&await e.sendCommand("Network.setExtraHTTPHeaders",{headers:i}),log$p.timeEnd(n)}async function prepareDeviceEmulationAndAsyncStacks(e,t){await e.defaultSession.sendCommand("Network.enable"),await emulation$2.emulate(e.defaultSession,t),await enableAsyncStacks(e.defaultSession)}
|
|
167
167
|
async function prepareTargetForTimespanMode(e,t){const r={msg:"Preparing target for timespan mode",id:"lh:prepare:timespanMode"};log$p.time(r),await prepareDeviceEmulationAndAsyncStacks(e,t),await prepareThrottlingAndNetwork(e.defaultSession,t,{disableThrottling:!1,blockedUrlPatterns:void 0}),log$p.timeEnd(r)}async function prepareTargetForNavigationMode(e,t){const r={msg:"Preparing target for navigation mode",id:"lh:prepare:navigationMode"};log$p.time(r),await prepareDeviceEmulationAndAsyncStacks(e,t),await dismissJavaScriptDialogs(e.defaultSession),await e.executionContext.cacheNativesOnNewDocument(),"simulate"===t.throttlingMethod&&await shimRequestIdleCallbackOnNewDocument(e,t),log$p.timeEnd(r)}async function prepareTargetForIndividualNavigation(e,t,r){const n={msg:"Preparing target for navigation",id:"lh:prepare:navigation"};log$p.time(n);const a=[];if(!t.disableStorageReset&&!r.disableStorageReset){const{warnings:t}=await resetStorageForNavigation(e,r);a.push(...t)}
|
|
168
168
|
return await prepareThrottlingAndNetwork(e,t,r),log$p.timeEnd(n),{warnings:a}}var prepare$1={prepareThrottlingAndNetwork,prepareTargetForTimespanMode,prepareTargetForNavigationMode,prepareTargetForIndividualNavigation};const log$o=lighthouseLogger;class TargetManager$1{constructor(e){this._enabled=!1,this._session=e,this._listeners=[],this._onSessionAttached=this._onSessionAttached.bind(this),this._targets=new Map,this._onFrameNavigated=async e=>{e.frame.parentId||await this._session.sendCommand("Target.setAutoAttach",{autoAttach:!0,flatten:!0,waitForDebuggerOnStart:!0})}}async _onSessionAttached(e){try{const t=await e.sendCommand("Target.getTargetInfo").catch((()=>null)),r=t&&t.targetInfo&&t.targetInfo.type,n="page"===r||"iframe"===r;if(!t||!n)return;const a=t.targetInfo.targetId;if(e.setTargetInfo(t.targetInfo),this._targets.has(a))return;const i=t.targetInfo.url||t.targetInfo.targetId;log$o.verbose("target-manager",`target ${i} attached`);const o={target:t.targetInfo,session:e}
|
|
@@ -177,9 +177,9 @@ t.removeListener(o,logStatus))}})),cancel}}function waitForCPUIdle(e,t){if(!t)re
|
|
|
177
177
|
;for(const e of t)if("longtask"===e.entryType){const t=e.startTime+e.duration;window.____lastLongTask=Math.max(window.____lastLongTask||0,t)}})).observe({type:"longtask",buffered:!0})}function checkTimeSinceLastLongTaskInPage(){return new Promise((e=>{const t=performance.now(),r=window.____lastLongTask||0;setTimeout((()=>{const n=window.____lastLongTask||0;e(r===n?t-r:0)}),150)}))}function waitForLoadEvent(e,t){let cancel=()=>{throw new Error("waitForLoadEvent.cancel() called before it was defined")};return{promise:new Promise(((r,n)=>{let a;const loadListener=function(){a=setTimeout(r,t)};e.once("Page.loadEventFired",loadListener);let i=!1;cancel=()=>{i||(i=!0,e.off("Page.loadEventFired",loadListener),a&&clearTimeout(a))}})),cancel}}async function isPageHung(e){try{return e.setNextProtocolTimeout(1e3),await e.sendCommand("Runtime.evaluate",{expression:'"ping"',returnByValue:!0,timeout:1e3}),!1}catch(e){return!0}}const DEFAULT_WAIT_FUNCTIONS={waitForFcp,waitForLoadEvent,waitForCPUIdle,
|
|
178
178
|
waitForNetworkIdle};async function waitForFullyLoaded$1(e,t,r){const{pauseAfterFcpMs:n,pauseAfterLoadMs:a,networkQuietThresholdMs:i,cpuQuietThresholdMs:o,maxWaitForLoadedMs:l,maxWaitForFcpMs:c}=r,{waitForFcp:u,waitForLoadEvent:p,waitForNetworkIdle:f,waitForCPUIdle:b}=r._waitForTestOverrides||DEFAULT_WAIT_FUNCTIONS;let S;const _=c?u(e,n,c):waitForNothing(),T=p(e,a),E=f(e,t,{networkQuietThresholdMs:i,busyEvent:"network-2-busy",idleEvent:"network-2-idle",isIdle:e=>e.is2Idle()}),$=f(e,t,{networkQuietThresholdMs:i,busyEvent:"network-critical-busy",idleEvent:"network-critical-idle",isIdle:e=>e.isCriticalIdle()});let A=waitForNothing();const I=Promise.all([_.promise,T.promise,E.promise,$.promise]).then((()=>(A=b(e,o),A.promise))).then((()=>async function(){return log$m.verbose("waitFor","loadEventFired and network considered idle"),{timedOut:!1}})).catch((e=>function(){throw e})),R=new Promise(((e,t)=>{S=setTimeout(e,l)})).then((t=>async()=>{
|
|
179
179
|
if(log$m.warn("waitFor","Timed out waiting for page load. Checking if page is hung..."),await isPageHung(e))throw log$m.warn("waitFor","Page appears to be hung, killing JavaScript..."),await e.sendCommand("Emulation.setScriptExecutionDisabled",{value:!0}),await e.sendCommand("Runtime.terminateExecution"),new LHError$e(LHError$e.errors.PAGE_HUNG);return{timedOut:!0}})),x=await Promise.race([I,R]);return S&&clearTimeout(S),_.cancel(),T.cancel(),E.cancel(),A.cancel(),x()}function waitForUserToContinue$1(e){return e.defaultSession.setNextProtocolTimeout(2**31-1),e.executionContext.evaluate((function createInPagePromise(){let resolve=()=>{};const e=new Promise((e=>resolve=e));return console.log(["You have enabled Lighthouse navigation debug mode.",'When you have finished inspecting the page, evaluate "continueLighthouseRun()"',"in the console to continue with the Lighthouse run."].join(" ")),window.continueLighthouseRun=resolve,e}),{args:[]})}var waitForCondition={waitForNothing,
|
|
180
|
-
waitForFrameNavigated:waitForFrameNavigated$1,waitForFcp,waitForLoadEvent,waitForNetworkIdle,waitForCPUIdle,waitForFullyLoaded:waitForFullyLoaded$1,waitForUserToContinue:waitForUserToContinue$1};const log$l=lighthouseLogger,NetworkMonitor$2=networkMonitor,{waitForFullyLoaded,waitForFrameNavigated,waitForUserToContinue}=waitForCondition,constants$5=constants$7,i18n$2D=i18n$2H,URL$I=urlShim,UIStrings$
|
|
180
|
+
waitForFrameNavigated:waitForFrameNavigated$1,waitForFcp,waitForLoadEvent,waitForNetworkIdle,waitForCPUIdle,waitForFullyLoaded:waitForFullyLoaded$1,waitForUserToContinue:waitForUserToContinue$1};const log$l=lighthouseLogger,NetworkMonitor$2=networkMonitor,{waitForFullyLoaded,waitForFrameNavigated,waitForUserToContinue}=waitForCondition,constants$5=constants$7,i18n$2D=i18n$2H,URL$I=urlShim,UIStrings$2H={warningRedirected:"The page may not be loading as expected because your test URL ({requested}) was redirected to {final}. Try testing the second URL directly.",warningTimeout:"The page loaded too slowly to finish within the time limit. Results may be incomplete."},str_$2z=i18n$2D.createMessageInstanceIdFn("lighthouse-core/gather/driver/navigation.js",UIStrings$2H),DEFAULT_PAUSE_AFTER_FCP=0,DEFAULT_PAUSE_AFTER_LOAD=0,DEFAULT_NETWORK_QUIET_THRESHOLD=5e3,DEFAULT_CPU_QUIET_THRESHOLD=0;function resolveWaitForFullyLoadedOptions(e){
|
|
181
181
|
let{pauseAfterFcpMs:t,pauseAfterLoadMs:r,networkQuietThresholdMs:n,cpuQuietThresholdMs:a}=e,i=e.maxWaitForLoad,o=e.maxWaitForFcp;return"number"!=typeof t&&(t=DEFAULT_PAUSE_AFTER_FCP),"number"!=typeof r&&(r=DEFAULT_PAUSE_AFTER_LOAD),"number"!=typeof n&&(n=DEFAULT_NETWORK_QUIET_THRESHOLD),"number"!=typeof a&&(a=DEFAULT_CPU_QUIET_THRESHOLD),"number"!=typeof i&&(i=constants$5.defaultSettings.maxWaitForLoad),"number"!=typeof o&&(o=constants$5.defaultSettings.maxWaitForFcp),e.waitUntil.includes("fcp")||(o=void 0),{pauseAfterFcpMs:t,pauseAfterLoadMs:r,networkQuietThresholdMs:n,cpuQuietThresholdMs:a,maxWaitForLoadedMs:i,maxWaitForFcpMs:o}}async function gotoURL(e,t,r){const n={msg:`Navigating to ${t}`,id:"lh:driver:navigate"};log$l.time(n);const a=e.defaultSession,i=new NetworkMonitor$2(e.defaultSession);await i.enable(),await a.sendCommand("Page.enable"),await a.sendCommand("Page.setLifecycleEventsEnabled",{enabled:!0}),a.setNextProtocolTimeout(1/0);const o=a.sendCommand("Page.navigate",{
|
|
182
|
-
url:t}),l=r.waitUntil.includes("navigated"),c=r.waitUntil.includes("load"),u=r.waitUntil.includes("fcp"),p=[];if(l){const e=waitForFrameNavigated(a).promise;p.push(e.then((()=>({timedOut:!1}))))}if(c){const e=resolveWaitForFullyLoadedOptions(r);p.push(waitForFullyLoaded(a,i,e))}else if(u)throw new Error("Cannot wait for FCP without waiting for page load");const f=(await Promise.all(p)).some((e=>e.timedOut)),b=await i.getFinalNavigationUrl()||t;return await o,await i.disable(),r.debugNavigation&&await waitForUserToContinue(e),log$l.timeEnd(n),{finalUrl:b,warnings:getNavigationWarnings({timedOut:f,finalUrl:b,requestedUrl:t})}}function getNavigationWarnings(e){const{requestedUrl:t,finalUrl:r}=e,n=[];return e.timedOut&&n.push(str_$2z(UIStrings$
|
|
182
|
+
url:t}),l=r.waitUntil.includes("navigated"),c=r.waitUntil.includes("load"),u=r.waitUntil.includes("fcp"),p=[];if(l){const e=waitForFrameNavigated(a).promise;p.push(e.then((()=>({timedOut:!1}))))}if(c){const e=resolveWaitForFullyLoadedOptions(r);p.push(waitForFullyLoaded(a,i,e))}else if(u)throw new Error("Cannot wait for FCP without waiting for page load");const f=(await Promise.all(p)).some((e=>e.timedOut)),b=await i.getFinalNavigationUrl()||t;return await o,await i.disable(),r.debugNavigation&&await waitForUserToContinue(e),log$l.timeEnd(n),{finalUrl:b,warnings:getNavigationWarnings({timedOut:f,finalUrl:b,requestedUrl:t})}}function getNavigationWarnings(e){const{requestedUrl:t,finalUrl:r}=e,n=[];return e.timedOut&&n.push(str_$2z(UIStrings$2H.warningTimeout)),URL$I.equalWithExcludedFragments(t,r)||n.push(str_$2z(UIStrings$2H.warningRedirected,{requested:t,final:r})),n}var navigation$1={gotoURL,getNavigationWarnings,UIStrings:UIStrings$2H};function getServiceWorkerVersions(e){
|
|
183
183
|
return new Promise(((t,r)=>{const versionUpdatedListener=n=>{const a=n.versions.filter((e=>"redundant"!==e.status)),i=a.find((e=>"activated"===e.status));a.length&&!i||(e.off("ServiceWorker.workerVersionUpdated",versionUpdatedListener),e.sendCommand("ServiceWorker.disable").then((e=>t(n)),r))};e.on("ServiceWorker.workerVersionUpdated",versionUpdatedListener),e.sendCommand("ServiceWorker.enable").catch(r)}))}function getServiceWorkerRegistrations(e){return new Promise(((t,r)=>{e.once("ServiceWorker.workerRegistrationUpdated",(n=>{e.sendCommand("ServiceWorker.disable").then((e=>t(n)),r)})),e.sendCommand("ServiceWorker.enable").catch(r)}))}var serviceWorkers$2={getServiceWorkerVersions,getServiceWorkerRegistrations
|
|
184
184
|
},parsers={},require$$0$2=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]
|
|
185
185
|
;!function(e){const t=require$$0$2;e.TYPES={INTEGER:1,NUMBER:2,LENGTH:3,PERCENT:4,URL:5,COLOR:6,STRING:7,ANGLE:8,KEYWORD:9,NULL_OR_EMPTY_STR:10};var r=/^[-+]?[0-9]+$/,n=/^[-+]?[0-9]*\.[0-9]+$/,a=/^(0|[-+]?[0-9]*\.?[0-9]+(in|cm|em|mm|pt|pc|px|ex|rem|vh|vw))$/,i=/^[-+]?[0-9]*\.?[0-9]+%$/,o=/^url\(\s*([^)]*)\s*\)$/,l=/^("[^"]*"|'[^']*')$/,c=/^#[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]([0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])?$/,u=/^rgb\(([^)]*)\)$/,p=/^rgba\(([^)]*)\)$/,f=/^hsla?\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*(,\s*(-?\d+|-?\d*.\d+)\s*)?\)/,b=/^([-+]?[0-9]*\.?[0-9]+)(deg|grad|rad)$/;e.valueType=function valueType(S){if(""===S||null===S)return e.TYPES.NULL_OR_EMPTY_STR;if("number"==typeof S&&(S=S.toString()),"string"==typeof S){if(r.test(S))return e.TYPES.INTEGER;if(n.test(S))return e.TYPES.NUMBER;if(a.test(S))return e.TYPES.LENGTH;if(i.test(S))return e.TYPES.PERCENT;if(o.test(S))return e.TYPES.URL;if(l.test(S))return e.TYPES.STRING
|
|
@@ -212,18 +212,17 @@ const r=(await Promise.all(n)).filter((e=>void 0!==e)),a=r[r.length-1];t[e]=a}ca
|
|
|
212
212
|
log$g.error("GatherRunner WebAppManifest",e),r.WebAppManifest=null}try{r.WebAppManifest&&(r.InstallabilityErrors=await InstallabilityErrors.getInstallabilityErrors(e.driver.defaultSession))}catch(e){log$g.error("GatherRunner InstallabilityErrors",e),r.InstallabilityErrors={errors:[{errorId:"protocol-timeout",errorArguments:[]}]}}try{r.Stacks=await Stacks.collectStacks(e.driver.executionContext)}catch(e){log$g.error("GatherRunner Stacks",e),r.Stacks=[]}const n=r.devtoolsLogs[e.passConfig.passName];r.NetworkUserAgent=NetworkUserAgent.getNetworkUserAgent(n);const a=getEnvironmentWarnings(e);r.LighthouseRunWarnings.push(...a),log$g.timeEnd(t)}static async run(e,t){const r=t.driver,n={};try{await r.connect(),await GatherRunner$1.loadBlank(r);const a=await GatherRunner$1.initializeBaseArtifacts(t);a.BenchmarkIndex=await getBenchmarkIndex(r.executionContext),await GatherRunner$1.setupDriver(r,t);let i=!0;for(const o of e){const e={gatherMode:"navigation",driver:r,url:t.requestedUrl,
|
|
213
213
|
settings:t.settings,passConfig:o,baseArtifacts:a,computedCache:t.computedCache,LighthouseRunWarnings:a.LighthouseRunWarnings},l=await GatherRunner$1.runPass(e);if(Object.assign(n,l.artifacts),l.pageLoadError&&"fatal"===o.loadFailureMode){a.PageLoadError=l.pageLoadError;break}i&&(await GatherRunner$1.populateBaseArtifacts(e),i=!1),await r.fetcher.disable()}return await GatherRunner$1.disposeDriver(r,t),finalizeArtifacts(a,n)}catch(e){throw GatherRunner$1.disposeDriver(r,t),e}}static _addLoadDataToBaseArtifacts(e,t,r){const n=e.baseArtifacts;n.devtoolsLogs[r]=t.devtoolsLog,t.trace&&(n.traces[r]=t.trace)}static async runPass(e){const t={msg:`Running ${e.passConfig.passName} pass`,id:`lh:gather:runPass-${e.passConfig.passName}`,args:[e.passConfig.gatherers.map((e=>e.instance.name)).join(", ")]};log$g.time(t);const r={},{driver:n,passConfig:a}=e;await GatherRunner$1.loadBlank(n,a.blankPage);const{warnings:i}=await prepare.prepareTargetForIndividualNavigation(n.defaultSession,e.settings,{
|
|
214
214
|
url:e.url,disableStorageReset:!a.useThrottling,disableThrottling:!a.useThrottling,blockedUrlPatterns:a.blockedUrlPatterns});e.LighthouseRunWarnings.push(...i),await GatherRunner$1.beforePass(e,r),await GatherRunner$1.beginRecording(e);const{navigationError:o}=await GatherRunner$1.loadPage(n,e);await GatherRunner$1.pass(e,r);const l=await GatherRunner$1.endRecording(e);await emulation$1.clearThrottling(n.defaultSession);const c=getPageLoadError(o,{url:e.url,loadFailureMode:a.loadFailureMode,networkRecords:l.networkRecords});if(c){const r=format$4.getFormatted(c.friendlyMessage,e.settings.locale);return log$g.error("GatherRunner",r,e.url),e.LighthouseRunWarnings.push(c.friendlyMessage),GatherRunner$1._addLoadDataToBaseArtifacts(e,l,`pageLoadError-${a.passName}`),log$g.timeEnd(t),{artifacts:{},pageLoadError:c}}GatherRunner$1._addLoadDataToBaseArtifacts(e,l,a.passName),await GatherRunner$1.afterPass(e,l,r);const u=GatherRunner$1.collectArtifacts(r);return log$g.timeEnd(t),u}}
|
|
215
|
-
var gatherRunner=GatherRunner$1;const process$1=require$$0$4;var lhEnv={isUnderTest:!!process$1.env.CI||"test"===process$1.env.NODE_ENV};function erf(e){const t=Math.sign(e),r=1/(1+.3275911*(e=Math.abs(e)));return t*(1-r*(.254829592+r*(r*(1.421413741+r*(1.061405429*r-1.453152027))-.284496736))*Math.exp(-e*e))}function
|
|
216
|
-
|
|
217
|
-
}:(Audit$1M.assertHeadingKeysExist(e,t),{type:"table",headings:e,items:t,summary:r})}static makeListDetails(e){return{type:"list",items:e}}static makeSnippetDetails({content:e,title:t,lineMessages:r,generalMessages:n,node:a,maxLineLength:i=200,maxLinesAroundMessage:o=20}){const l=Audit$1M._makeSnippetLinesArray(e,i);return{type:"snippet",lines:Util$1.filterRelevantLines(l,r,o),title:t,lineMessages:r,generalMessages:n,lineCount:l.length,node:a}}static _makeSnippetLinesArray(e,t){return e.split("\n").map(((e,r)=>{const n=r+1,a={content:e.slice(0,t),lineNumber:n};return e.length>t&&(a.truncated=!0),a}))}static makeOpportunityDetails(e,t,r,n){return Audit$1M.assertHeadingKeysExist(e,t),{type:"opportunity",headings:0===t.length?[]:e,items:t,overallSavingsMs:r,overallSavingsBytes:n}}static makeNodeItem(e){return{type:"node",lhId:e.lhId,path:e.devtoolsNodePath,selector:e.selector,
|
|
218
|
-
static
|
|
219
|
-
;e.meta.failureTitle&&null!==n&&n<Util$1.PASS_THRESHOLD&&(a=e.meta.failureTitle);const i="numericUnit"in t?t:void 0;return{id:e.meta.id,title:a,description:e.meta.description,score:n,scoreDisplayMode:r,numericValue:i&&i.numericValue,numericUnit:i&&i.numericUnit,displayValue:t.displayValue,explanation:t.explanation,errorMessage:t.errorMessage,warnings:t.warnings,details:t.details}}}var audit=Audit$1M;const Audit$1L=audit,clampTo2Decimals=e=>Math.round(100*e)/100;class ReportScoring$1{static arithmeticMean(e){if((e=e.filter((e=>e.weight>0))).some((e=>null===e.score)))return null;const t=e.reduce(((e,t)=>{const r=t.score,n=t.weight;return{
|
|
220
|
-
;return n.scoreDisplayMode!==Audit$1L.SCORING_MODES.NOT_APPLICABLE&&n.scoreDisplayMode!==Audit$1L.SCORING_MODES.INFORMATIVE&&n.scoreDisplayMode!==Audit$1L.SCORING_MODES.MANUAL||(r.weight=0),r})),i=e.map((e=>({score:t[e.id].score,weight:e.weight}))),o=ReportScoring$1.arithmeticMean(i);r[n]={...a,auditRefs:e,id:n,score:o}}return r}}var scoring=ReportScoring$1
|
|
221
|
-
;const icon$
|
|
222
|
-
"
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
"uses-text-compression":"You can enable text compression in your web server configuration.","uses-responsive-images":"Upload images directly through the [media library](https://wordpress.org/support/article/media-library-screen/) to ensure that the required image sizes are available, and then insert them from the media library or use the image widget to ensure the optimal image sizes are used (including those for the responsive breakpoints). Avoid using `Full Size` images unless the dimensions are adequate for their usage. [Learn More](https://wordpress.org/support/article/inserting-images-into-posts-and-pages/).","server-response-time":"Themes, plugins, and server specifications all contribute to server response time. Consider finding a more optimized theme, carefully selecting an optimization plugin, and/or upgrading your server."};var wordpress={id:"wordpress",title:"WordPress",icon:icon$7,UIStrings:UIStrings$2F}
|
|
215
|
+
var gatherRunner=GatherRunner$1;const process$1=require$$0$4;var lhEnv={isUnderTest:!!process$1.env.CI||"test"===process$1.env.NODE_ENV};const MIN_PASSING_SCORE=.9,MAX_AVERAGE_SCORE=.8999999999999999,MIN_AVERAGE_SCORE=.5,MAX_FAILING_SCORE=.49999999999999994;function erf(e){const t=Math.sign(e),r=1/(1+.3275911*(e=Math.abs(e)));return t*(1-r*(.254829592+r*(r*(1.421413741+r*(1.061405429*r-1.453152027))-.284496736))*Math.exp(-e*e))}function getLogNormalScore({median:e,p10:t},r){if(e<=0)throw new Error("median must be greater than zero");if(t<=0)throw new Error("p10 must be greater than zero");if(t>=e)throw new Error("p10 must be less than the median");if(r<=0)return 1;const n=Math.max(Number.MIN_VALUE,r/e),a=Math.log(n),i=Math.max(Number.MIN_VALUE,t/e),o=(1-erf(.9061938024368232*a/-Math.log(i)))/2;let l;return l=r<=t?Math.max(MIN_PASSING_SCORE,Math.min(1,o)):r<=e?Math.max(MIN_AVERAGE_SCORE,Math.min(MAX_AVERAGE_SCORE,o)):Math.max(0,Math.min(MAX_FAILING_SCORE,o)),l}
|
|
216
|
+
function linearInterpolation$2(e,t,r,n,a){return t+(a-e)*((n-t)/(r-e))}var statistics$1={linearInterpolation:linearInterpolation$2,getLogNormalScore};const{isUnderTest}=lhEnv,statistics=statistics$1,{Util:Util$1}=utilCommonjs,DEFAULT_PASS="defaultPass",clampTo2Decimals$1=e=>Math.round(100*e)/100;class Audit$1M{static get DEFAULT_PASS(){return DEFAULT_PASS}static get SCORING_MODES(){return{NUMERIC:"numeric",BINARY:"binary",MANUAL:"manual",INFORMATIVE:"informative",NOT_APPLICABLE:"notApplicable",ERROR:"error"}}static get meta(){throw new Error("Audit meta information must be overridden.")}static get defaultOptions(){return{}}static audit(e,t){throw new Error("audit() method must be overriden")}static computeLogNormalScore(e,t){const r=statistics.getLogNormalScore(e,t);return clampTo2Decimals$1(r)}static assertHeadingKeysExist(e,t){if(t.length&&isUnderTest)for(const r of e){if(null===r.key)continue;const e=r.key;if(!t.some((t=>e in t)))throw new Error(`"${r.key}" is missing from items`)}}
|
|
217
|
+
static makeTableDetails(e,t,r){return 0===t.length?{type:"table",headings:[],items:[],summary:r}:(Audit$1M.assertHeadingKeysExist(e,t),{type:"table",headings:e,items:t,summary:r})}static makeListDetails(e){return{type:"list",items:e}}static makeSnippetDetails({content:e,title:t,lineMessages:r,generalMessages:n,node:a,maxLineLength:i=200,maxLinesAroundMessage:o=20}){const l=Audit$1M._makeSnippetLinesArray(e,i);return{type:"snippet",lines:Util$1.filterRelevantLines(l,r,o),title:t,lineMessages:r,generalMessages:n,lineCount:l.length,node:a}}static _makeSnippetLinesArray(e,t){return e.split("\n").map(((e,r)=>{const n=r+1,a={content:e.slice(0,t),lineNumber:n};return e.length>t&&(a.truncated=!0),a}))}static makeOpportunityDetails(e,t,r,n){return Audit$1M.assertHeadingKeysExist(e,t),{type:"opportunity",headings:0===t.length?[]:e,items:t,overallSavingsMs:r,overallSavingsBytes:n}}static makeNodeItem(e){return{type:"node",lhId:e.lhId,path:e.devtoolsNodePath,selector:e.selector,
|
|
218
|
+
boundingRect:e.boundingRect,snippet:e.snippet,nodeLabel:e.nodeLabel}}static _findOriginalLocation(e,t,r){const n=e?.map.findEntry(t,r);if(n)return{file:n.sourceURL||"",line:n.sourceLineNumber||0,column:n.sourceColumnNumber||0}}static makeSourceLocation(e,t,r,n){return{type:"source-location",url:e,urlProvider:"network",line:t,column:r,original:n&&this._findOriginalLocation(n,t,r)}}static makeSourceLocationFromConsoleMessage(e,t){if(!e.url)return;const r=e.lineNumber||0,n=e.columnNumber||0;return this.makeSourceLocation(e.url,r,n,t)}static _normalizeAuditScore(e,t,r){if(t!==Audit$1M.SCORING_MODES.BINARY&&t!==Audit$1M.SCORING_MODES.NUMERIC)return null;if(null===e||!Number.isFinite(e))throw new Error(`Invalid score for ${r}: ${e}`);if(e>1)throw new Error(`Audit score for ${r} is > 1`);if(e<0)throw new Error(`Audit score for ${r} is < 0`);return e=clampTo2Decimals$1(e)}static generateErrorAuditResult(e,t){return Audit$1M.generateAuditResult(e,{score:null,errorMessage:t})}
|
|
219
|
+
static generateAuditResult(e,t){if(void 0===t.score)throw new Error("generateAuditResult requires a score");let r=e.meta.scoreDisplayMode||Audit$1M.SCORING_MODES.BINARY;t.errorMessage?r=Audit$1M.SCORING_MODES.ERROR:t.notApplicable&&(r=Audit$1M.SCORING_MODES.NOT_APPLICABLE);const n=Audit$1M._normalizeAuditScore(t.score,r,e.meta.id);let a=e.meta.title;e.meta.failureTitle&&null!==n&&n<Util$1.PASS_THRESHOLD&&(a=e.meta.failureTitle);const i="numericUnit"in t?t:void 0;return{id:e.meta.id,title:a,description:e.meta.description,score:n,scoreDisplayMode:r,numericValue:i&&i.numericValue,numericUnit:i&&i.numericUnit,displayValue:t.displayValue,explanation:t.explanation,errorMessage:t.errorMessage,warnings:t.warnings,details:t.details}}}var audit=Audit$1M;const Audit$1L=audit,clampTo2Decimals=e=>Math.round(100*e)/100;class ReportScoring$1{static arithmeticMean(e){if((e=e.filter((e=>e.weight>0))).some((e=>null===e.score)))return null;const t=e.reduce(((e,t)=>{const r=t.score,n=t.weight;return{
|
|
220
|
+
weight:e.weight+n,sum:e.sum+r*n}}),{weight:0,sum:0});return clampTo2Decimals(t.sum/t.weight||0)}static scoreAllCategories(e,t){const r={};for(const[n,a]of Object.entries(e)){const e=a.auditRefs.map((e=>{const r={...e},n=t[r.id];return n.scoreDisplayMode!==Audit$1L.SCORING_MODES.NOT_APPLICABLE&&n.scoreDisplayMode!==Audit$1L.SCORING_MODES.INFORMATIVE&&n.scoreDisplayMode!==Audit$1L.SCORING_MODES.MANUAL||(r.weight=0),r})),i=e.map((e=>({score:t[e.id].score,weight:e.weight}))),o=ReportScoring$1.arithmeticMean(i);r[n]={...a,auditRefs:e,id:n,score:o}}return r}}var scoring=ReportScoring$1
|
|
221
|
+
;const icon$8='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"%3E%3Cpath d="M171.887 116.28l-53.696 89.36h-9.728l9.617-58.227-30.2.047a4.852 4.852 0 01-4.855-4.855c0-1.152 1.07-3.102 1.07-3.102l53.52-89.254 9.9.043-9.86 58.317 30.413-.043a4.852 4.852 0 014.855 4.855c0 1.088-.427 2.044-1.033 2.854l.004.004zM128 0C57.306 0 0 57.3 0 128s57.306 128 128 128 128-57.306 128-128S198.7 0 128 0z" fill="%230379c4" fill-rule="evenodd"/%3E%3C/svg%3E',UIStrings$2G={"modern-image-formats":"Consider displaying all [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) components in WebP formats while specifying an appropriate fallback for other browsers. [Learn more](https://amp.dev/documentation/components/amp-img/#example:-specifying-a-fallback-image).",
|
|
222
|
+
"offscreen-images":"Ensure that you are using [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) for images to automatically lazy-load. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/media_iframes_3p/?format=websites#images).","render-blocking-resources":"Use tools such as [AMP Optimizer](https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer) to [server-side render AMP layouts](https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/server-side-rendering/).","unminified-css":"Refer to the [AMP documentation](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/) to ensure all styles are supported.","efficient-animated-content":"For animated content, use [`amp-anim`](https://amp.dev/documentation/components/amp-anim/) to minimize CPU usage when the content is offscreen.",
|
|
223
|
+
"uses-responsive-images":"The [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) component supports the [`srcset`](https://web.dev/use-srcset-to-automatically-choose-the-right-image/) attribute to specify which image assets to use based on the screen size. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/art_direction/)."};var amp={id:"amp",title:"AMP",icon:icon$8,UIStrings:UIStrings$2G};const icon$7='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250"%3E%3Cpath fill="%23dd0031" d="M125 30L31.9 63.2l14.2 123.1L125 230l78.9-43.7 14.2-123.1z"/%3E%3Cpath fill="%23c3002f" d="M125 30v22.2-.1V230l78.9-43.7 14.2-123.1L125 30z"/%3E%3Cpath d="M125 52.1L66.8 182.6h21.7l11.7-29.2h49.4l11.7 29.2H183L125 52.1zm17 83.3h-34l17-40.9 17 40.9z" fill="%23fff"/%3E%3C/svg%3E',UIStrings$2F={
|
|
224
|
+
"total-byte-weight":"Apply [route-level code splitting](https://web.dev/route-level-code-splitting-in-angular/) to minimize the size of your JavaScript bundles. Also, consider precaching assets with the [Angular service worker](https://web.dev/precaching-with-the-angular-service-worker/).","unminified-warning":"If you are using Angular CLI, ensure that builds are generated in production mode. [Learn more](https://angular.io/guide/deployment#enable-runtime-production-mode).","unused-javascript":"If you are using Angular CLI, include source maps in your production build to inspect your bundles. [Learn more](https://angular.io/guide/deployment#inspect-the-bundles).","uses-responsive-images":"Consider using the `BreakpointObserver` utility in the Component Dev Kit (CDK) to manage image breakpoints. [Learn more](https://material.angular.io/cdk/layout/overview).",
|
|
225
|
+
"uses-rel-preload":"Preload routes ahead of time to speed up navigation. [Learn more](https://web.dev/route-preloading-in-angular/).","dom-size":"Consider virtual scrolling with the Component Dev Kit (CDK) if very large lists are being rendered. [Learn more](https://web.dev/virtualize-lists-with-angular-cdk/)."};var angular$1={id:"angular",title:"Angular",icon:icon$7,UIStrings:UIStrings$2F}
|
|
227
226
|
;const icon$6='data:image/svg+xml,%3Csvg viewBox="0 0 681.167 778.583" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath style="fill:%2300598E" d="M510.167 144.833c-39.75-24.75-77.25-34.5-114.75-59.25c-23.25-15.75-55.5-53.25-82.5-85.5c-5.25 51.75-21 72.75-39 87.75c-38.25 30-62.25 39-95.25 57c-27.75 14.25-178.5 104.25-178.5 297.75s162.75 336 343.5 336s337.5-131.25 337.5-330S534.167 159.833 510.167 144.833z" /%3E%3Cpath style="fill:%23FFF" d="M449.25 610.5c12 0 24.75 0.75 33.75 6.75s14.25 19.5 17.25 27s0 12-6 15c-5.25 3-6 1.5-11.25-8.25s-9.75-19.5-36-19.5s-34.5 9-47.25 19.5s-17.25 14.25-21.75 8.25s-3-12 5.25-19.5s21.75-19.5 34.5-24.75S437.25 610.5 449.25 610.5L449.25 610.5z" /%3E%3Cpath style="fill:%23FFF" d="M324.75 696c15 12 37.5 21.75 85.5 21.75S492 704.25 507 693c6.75-5.25 9.75-0.75 10.5 2.25s2.25 7.5-3 12.75c-3.75 3.75-38.25 27.75-78.75 31.5s-95.25 6-128.25-24c-5.25-5.25-3.75-12.75 0-15.75s6.75-5.25 11.25-5.25S322.5 694.5 324.75 696L324.75 696z" /%3E%3Cpath style="fill:%230073BA" d="M141 639c57-0.75 67.5-10.5 117.75-33c271.5-121.5 321.75-232.5 331.5-258s24-66.75 9-112.5c-2.896-8.832-5.006-15.924-6.53-21.63c-36.079-40.343-71.898-62.357-82.72-69.12c-39-24.75-77.25-34.5-114.75-59.25c-23.25-15-55.5-53.25-82.5-85.5c-5.25 51.75-20.25 73.5-39 87.75c-38.25 30-62.25 39-95.25 57C150.75 159.75 0 249 0 442.5c0 61.78 16.593 118.361 45.063 166.766L52.5 609C68.25 623.25 93 639.75 141 639z" /%3E%3Cpath style="fill:%23004975" d="M510 144.75c-39-24.75-77.25-34.5-114.75-59.25c-23.25-15-55.5-53.25-82.5-85.5c-5.25 51.75-20.25 73.5-39 87.75c-38.25 30-62.25 39-95.25 57C150.75 159.75 0 249 0 442.5c0 61.78 16.593 118.361 45.063 166.766C105.763 712.467 220.46 778.5 343.5 778.5c180.75 0 337.5-131.25 337.5-330c0-109.146-44.332-185.488-88.28-234.63C556.641 173.527 520.82 151.513 510 144.75z M601.164 232.547c49.242 61.564 74.211 134.221 74.211 215.953c0 47.428-9.033 92.23-26.849 133.165c-16.9 38.831-41.236 73.233-72.333 102.254c-61.47 57.364-144.107 88.956-232.693 88.956c-43.826 0-86.832-8.371-127.824-24.882c-40.263-16.217-76.547-39.438-107.843-69.02C41.923 616.678 5.625 532.696 5.625 442.5c0-80.336 26.076-151.72 77.503-212.167c39.289-46.18 81.655-71.774 98.047-80.634c7.958-4.341 15.423-8.172 22.643-11.877c22.63-11.615 44.005-22.586 73.404-45.645c15.677-11.914 32.377-30.785 39.489-78.702c24.774 29.466 53.522 62.579 75.49 76.752c19.5 12.87 39.501 21.888 58.844 30.61c18.298 8.25 37.219 16.781 55.942 28.663c0.031 0.021 0.702 0.438 0.702 0.438C562.421 184.11 591.581 220.566 601.164 232.547z" /%3E%3Cpath style="fill:%2393C5E4" d="M316.5 15c10.5 30.75 9 46.5 9 53.25S321.75 93 309.75 102c-5.25 3.75-6.75 6.75-6.75 7.5c0 3 6.75 5.25 6.75 12c0 8.25-3.75 24.75-43.5 64.5s-96.75 75-141 96.75S60 303 54 292.5s2.25-33.75 30-64.5s115.5-75 115.5-75L309 76.5l6-29.25" /%3E%3Cpath style="fill:%23FFF" d="M316.5 14.25c-6.75 49.5-21.75 64.5-42 80.25c-33.75 25.5-66.75 41.25-74.25 45c-19.5 9.75-90 48.75-126.75 105c-11.25 17.25 0 24 2.25 25.5s27.75 4.5 82.5-28.5S237 189 267.75 156.75c16.5-17.25 18.75-27 18.75-31.5c0-5.25-3.75-7.5-9.75-9c-3-0.75-3.75-2.25 0-4.5S296.25 102 300 99s21.75-15 22.5-34.5S321.75 31.5 316.5 14.25L316.5 14.25z" /%3E%3Cpath style="fill:%23FFF" d="M147.75 559.5c0.75-58.5 55.5-113.25 124.5-114c87.75-0.75 148.5 87 192.75 86.25c37.5-0.75 109.5-74.25 144.75-74.25c37.5 0 48 39 48 62.25s-7.5 65.25-25.5 91.5s-29.25 36-50.25 34.5c-27-2.25-81-86.25-115.5-87.75c-43.5-1.5-138 90.75-212.25 90.75c-45 0-58.5-6.75-73.5-16.5C158.25 616.5 147 592.5 147.75 559.5L147.75 559.5z" /%3E%3Cpath style="fill:none" d="M599.25 235.5c15 45.75 0.75 87-9 112.5s-60 136.5-331.5 258C208.5 628.5 198 638.25 141 639c-48 0.75-72.75-15.75-88.5-30l-7.437 0.266C105.763 712.467 220.46 778.5 343.5 778.5c180.75 0 337.5-131.25 337.5-330c0-109.146-44.332-185.488-88.28-234.63C594.244 219.576 596.354 226.668 599.25 235.5z" /%3E%3C/svg%3E',UIStrings$2E={
|
|
228
227
|
"unused-css-rules":"Consider removing unused CSS rules and only attach the needed Drupal libraries to the relevant page or component in a page. See the [Drupal documentation link](https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module#library) for details. To identify attached libraries that are adding extraneous CSS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/module responsible from the URL of the stylesheet when CSS aggregation is disabled in your Drupal site. Look out for themes/modules that have many stylesheets in the list which have a lot of red in code coverage. A theme/module should only enqueue a stylesheet if it is actually used on the page.",
|
|
229
228
|
"unused-javascript":"Consider removing unused JavaScript assets and only attach the needed Drupal libraries to the relevant page or component in a page. See the [Drupal documentation link](https://www.drupal.org/docs/8/creating-custom-modules/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-module#library) for details. To identify attached libraries that are adding extraneous JavaScript, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/module responsible from the URL of the script when JavaScript aggregation is disabled in your Drupal site. Look out for themes/modules that have many scripts in the list which have a lot of red in code coverage. A theme/module should only enqueue a script if it is actually used on the page.",
|
|
@@ -234,31 +233,36 @@ static makeSourceLocationFromConsoleMessage(e){if(e.url)return{type:"source-loca
|
|
|
234
233
|
"uses-long-cache-ttl":'Set the "Browser and proxy cache maximum age" in the "Administration » Configuration » Development" page. Read about [Drupal cache and optimizing for performance](https://www.drupal.org/docs/7/managing-site-performance-and-scalability/caching-to-improve-performance/caching-overview#s-drupal-performance-resources).',"uses-optimized-images":"Consider using [a module](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=im_vid_3%3A123&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=optimize+images&solrsort=iss_project_release_usage+desc&op=Search) that automatically optimizes and reduces the size of images uploaded through the site while retaining quality. Also, ensure you are using the native [Responsive Image Styles](https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8) provided from Drupal (available in Drupal 8 and above) for all images rendered on the site.",
|
|
235
234
|
"uses-responsive-images":"Ensure that you are using the native [Responsive Image Styles](https://www.drupal.org/docs/8/mobile-guide/responsive-images-in-drupal-8) provided from Drupal (available in Drupal 8 and above). Use the Responsive Image Styles when rendering image fields through view modes, views, or images uploaded through the WYSIWYG editor.","server-response-time":"Themes, modules, and server specifications all contribute to server response time. Consider finding a more optimized theme, carefully selecting an optimization module, and/or upgrading your server. Your hosting servers should make use of PHP opcode caching, memory-caching to reduce database query times such as Redis or Memcached, as well as optimized application logic to prepare pages faster.",
|
|
236
235
|
"uses-rel-preconnect":"Preconnect or dns-prefetch resource hints can be added by installing and configuring [a module](https://www.drupal.org/project/project_module?f%5B0%5D=&f%5B1%5D=&f%5B2%5D=&f%5B3%5D=&f%5B4%5D=sm_field_project_type%3Afull&f%5B5%5D=&f%5B6%5D=&text=dns-prefetch&solrsort=iss_project_release_usage+desc&op=Search) that provides facilities for user agent resource hints.","font-display":"Specify `@font-display` when defining custom fonts in your theme."};var drupal={id:"drupal",title:"Drupal",icon:icon$6,UIStrings:UIStrings$2E}
|
|
237
|
-
;const icon$5=
|
|
238
|
-
"unminified-css":"If your build system minifies CSS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).","unminified-javascript":"If your build system minifies JS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).","unused-javascript":"If you are not server-side rendering, [split your JavaScript bundles](https://web.dev/code-splitting-suspense/) with `React.lazy()`. Otherwise, code-split using a third-party library such as [loadable-components](https://www.smooth-code.com/open-source/loadable-components/docs/getting-started/).",
|
|
239
|
-
"server-response-time":"If you are server-side rendering any React components, consider using `renderToNodeStream()` or `renderToStaticNodeStream()` to allow the client to receive and hydrate different parts of the markup instead of all at once. [Learn more](https://reactjs.org/docs/react-dom-server.html#rendertonodestream).",redirects:"If you are using React Router, minimize usage of the `<Redirect>` component for [route navigations](https://reacttraining.com/react-router/web/api/Redirect).","user-timings":"Use the React DevTools Profiler, which makes use of the Profiler API, to measure the rendering performance of your components. [Learn more.](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html)",
|
|
240
|
-
"dom-size":'Consider using a "windowing" library like `react-window` to minimize the number of DOM nodes created if you are rendering many repeated elements on the page. [Learn more](https://web.dev/virtualize-long-lists-react-window/). Also, minimize unnecessary re-renders using [`shouldComponentUpdate`](https://reactjs.org/docs/optimizing-performance.html#shouldcomponentupdate-in-action), [`PureComponent`](https://reactjs.org/docs/react-api.html#reactpurecomponent), or [`React.memo`](https://reactjs.org/docs/react-api.html#reactmemo) and [skip effects](https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects) only until certain dependencies have changed if you are using the `Effect` hook to improve runtime performance.'};var react={id:"react",title:"React",icon:icon$5,UIStrings:UIStrings$2D}
|
|
241
|
-
;const icon$4='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 250 250"%3E%3Cpath fill="%23dd0031" d="M125 30L31.9 63.2l14.2 123.1L125 230l78.9-43.7 14.2-123.1z"/%3E%3Cpath fill="%23c3002f" d="M125 30v22.2-.1V230l78.9-43.7 14.2-123.1L125 30z"/%3E%3Cpath d="M125 52.1L66.8 182.6h21.7l11.7-29.2h49.4l11.7 29.2H183L125 52.1zm17 83.3h-34l17-40.9 17 40.9z" fill="%23fff"/%3E%3C/svg%3E',UIStrings$2C={"total-byte-weight":"Apply [route-level code splitting](https://web.dev/route-level-code-splitting-in-angular/) to minimize the size of your JavaScript bundles. Also, consider precaching assets with the [Angular service worker](https://web.dev/precaching-with-the-angular-service-worker/).","unminified-warning":"If you are using Angular CLI, ensure that builds are generated in production mode. [Learn more](https://angular.io/guide/deployment#enable-runtime-production-mode).",
|
|
242
|
-
"unused-javascript":"If you are using Angular CLI, include source maps in your production build to inspect your bundles. [Learn more](https://angular.io/guide/deployment#inspect-the-bundles).","uses-responsive-images":"Consider using the `BreakpointObserver` utility in the Component Dev Kit (CDK) to manage image breakpoints. [Learn more](https://material.angular.io/cdk/layout/overview).","uses-rel-preload":"Preload routes ahead of time to speed up navigation. [Learn more](https://web.dev/route-preloading-in-angular/).","dom-size":"Consider virtual scrolling with the Component Dev Kit (CDK) if very large lists are being rendered. [Learn more](https://web.dev/virtualize-lists-with-angular-cdk/)."};var angular$1={id:"angular",title:"Angular",icon:icon$4,UIStrings:UIStrings$2C}
|
|
243
|
-
;const icon$3='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"%3E%3Cpath d="M171.887 116.28l-53.696 89.36h-9.728l9.617-58.227-30.2.047a4.852 4.852 0 01-4.855-4.855c0-1.152 1.07-3.102 1.07-3.102l53.52-89.254 9.9.043-9.86 58.317 30.413-.043a4.852 4.852 0 014.855 4.855c0 1.088-.427 2.044-1.033 2.854l.004.004zM128 0C57.306 0 0 57.3 0 128s57.306 128 128 128 128-57.306 128-128S198.7 0 128 0z" fill="%230379c4" fill-rule="evenodd"/%3E%3C/svg%3E',UIStrings$2B={"modern-image-formats":"Consider displaying all [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) components in WebP formats while specifying an appropriate fallback for other browsers. [Learn more](https://amp.dev/documentation/components/amp-img/#example:-specifying-a-fallback-image).",
|
|
244
|
-
"offscreen-images":"Ensure that you are using [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) for images to automatically lazy-load. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/media_iframes_3p/?format=websites#images).","render-blocking-resources":"Use tools such as [AMP Optimizer](https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer) to [server-side render AMP layouts](https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/server-side-rendering/).","unminified-css":"Refer to the [AMP documentation](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/) to ensure all styles are supported.","efficient-animated-content":"For animated content, use [`amp-anim`](https://amp.dev/documentation/components/amp-anim/) to minimize CPU usage when the content is offscreen.",
|
|
245
|
-
"uses-responsive-images":"The [`amp-img`](https://amp.dev/documentation/components/amp-img/?format=websites) component supports the [`srcset`](https://web.dev/use-srcset-to-automatically-choose-the-right-image/) attribute to specify which image assets to use based on the screen size. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/art_direction/)."};var amp={id:"amp",title:"AMP",icon:icon$3,UIStrings:UIStrings$2B};const icon$2='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="%23f26322" viewBox="0 0 1000 1000"%3E%3Cpath d="M916.9 267.4v465.3l-111.3 67.4V331.4l-1.5-.9-303.9-189-304.6 189.2-1.2.8V799L83.1 732.6V267.4l.7-.4L500.3 10l416 257 .6.4zM560.7 468.5v383.3L500.3 890l-61-38.2V306.7l-136 84.3v476.6l197 122.5 196.4-122.5V391l-136-84.3v161.8z"/%3E%3C/svg%3E',UIStrings$2A={
|
|
246
|
-
"modern-image-formats":"Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=webp) for a variety of third-party extensions to leverage newer image formats.","offscreen-images":"Consider modifying your product and catalog templates to make use of the web platform's [lazy loading](https://web.dev/native-lazy-loading) feature.","disable-bundling":"Disable Magento's built-in [JavaScript bundling and minification](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html), and consider using [baler](https://github.com/magento/baler/) instead.","unminified-css":'Enable the "Minify CSS Files" option in your store\'s Developer settings. [Learn more](https://devdocs.magento.com/guides/v2.3/performance-best-practices/configuration.html?itm_source=devdocs&itm_medium=search_page&itm_campaign=federated_search&itm_term=minify%20css%20files).',
|
|
247
|
-
"unminified-javascript":"Use [Terser](https://www.npmjs.com/package/terser) to minify all JavaScript assets from static content deployment, and disable the built-in minification feature.","unused-javascript":"Disable Magento's built-in [JavaScript bundling](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html).","uses-optimized-images":"Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=optimize%20image) for a variety of third party extensions to optimize images.","server-response-time":"Use Magento's [Varnish integration](https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish.html).","uses-rel-preconnect":"Preconnect or dns-prefetch resource hints can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html).",
|
|
248
|
-
"uses-rel-preload":"`<link rel=preload>` tags can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html).","critical-request-chains":"If you are not bundling your JavaScript assets, consider using [baler](https://github.com/magento/baler).","font-display":"Specify `@font-display` when [defining custom fonts](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/using-fonts.html)."};var magento={id:"magento",title:"Magento",icon:icon$2,UIStrings:UIStrings$2A}
|
|
249
|
-
;const icon$1="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid' viewBox='0 0 256 258'%3E%3Cpath d='M255.7 35.6a33.7 33.7 0 00-67-4.8l-.4-.2c-27.6-12.4-50.8 9.6-50.8 9.6l-61.4 61.7 24.3 23.4 49.4-48.6c23-23 35.6-7.4 35.6-7.4 17.4 14.6.6 32 .6 32l24.9 24c20.3-22 21.5-41.1 15.3-56.3a33.7 33.7 0 0029.5-33.4' fill='%23F9AE41'/%3E%3Cpath d='M226.5 190.5l.2-.3c12.4-27.6-9.6-50.8-9.6-50.8L155.4 78l-23.3 24.3 48.5 49.4c23 23 7.5 35.6 7.5 35.6-14.7 17.4-32 .6-32 .6l-24 24.9c21.9 20.3 41 21.5 56.2 15.3a33.7 33.7 0 1038.2-37.6' fill='%23EE4035'/%3E%3Cpath d='M156 133l-49.5 48.6c-23 23-35.6 7.4-35.6 7.4-17.4-14.6-.6-32-.6-32l-24.9-24c-20.3 22-21.4 41.1-15.3 56.3a33.7 33.7 0 1037.6 38.2l.3.2c27.6 12.4 50.8-9.6 50.8-9.6l61.4-61.7-24.3-23.4' fill='%234F91CD'/%3E%3Cpath d='M75.7 106.6c-23-23-7.4-35.6-7.4-35.6 14.6-17.4 32-.6 32-.6l24-24.9c-22-20.3-41-21.5-56.3-15.3a33.7 33.7 0 10-38.2 37.6l-.2.3C17.2 95.7 39.2 119 39.2 119l61.7 61.4 23.4-24.3-48.6-49.4' fill='%237AC043'/%3E%3C/svg%3E",UIStrings$2z={
|
|
236
|
+
;const icon$5="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid' viewBox='0 0 256 258'%3E%3Cpath d='M255.7 35.6a33.7 33.7 0 00-67-4.8l-.4-.2c-27.6-12.4-50.8 9.6-50.8 9.6l-61.4 61.7 24.3 23.4 49.4-48.6c23-23 35.6-7.4 35.6-7.4 17.4 14.6.6 32 .6 32l24.9 24c20.3-22 21.5-41.1 15.3-56.3a33.7 33.7 0 0029.5-33.4' fill='%23F9AE41'/%3E%3Cpath d='M226.5 190.5l.2-.3c12.4-27.6-9.6-50.8-9.6-50.8L155.4 78l-23.3 24.3 48.5 49.4c23 23 7.5 35.6 7.5 35.6-14.7 17.4-32 .6-32 .6l-24 24.9c21.9 20.3 41 21.5 56.2 15.3a33.7 33.7 0 1038.2-37.6' fill='%23EE4035'/%3E%3Cpath d='M156 133l-49.5 48.6c-23 23-35.6 7.4-35.6 7.4-17.4-14.6-.6-32-.6-32l-24.9-24c-20.3 22-21.4 41.1-15.3 56.3a33.7 33.7 0 1037.6 38.2l.3.2c27.6 12.4 50.8-9.6 50.8-9.6l61.4-61.7-24.3-23.4' fill='%234F91CD'/%3E%3Cpath d='M75.7 106.6c-23-23-7.4-35.6-7.4-35.6 14.6-17.4 32-.6 32-.6l24-24.9c-22-20.3-41-21.5-56.3-15.3a33.7 33.7 0 10-38.2 37.6l-.2.3C17.2 95.7 39.2 119 39.2 119l61.7 61.4 23.4-24.3-48.6-49.4' fill='%237AC043'/%3E%3C/svg%3E",UIStrings$2D={
|
|
250
237
|
"unused-css-rules":"Consider reducing, or switching, the number of [Joomla extensions](https://extensions.joomla.org/) loading unused CSS in your page. To identify extensions that are adding extraneous CSS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the stylesheet. Look out for plugins that have many stylesheets in the list which have a lot of red in code coverage. A plugin should only enqueue a stylesheet if it is actually used on the page.","modern-image-formats":"Consider using a [plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=webp) or service that will automatically convert your uploaded images to the optimal formats.",
|
|
251
238
|
"offscreen-images":"Install a [lazy-load Joomla plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=lazy%20loading) that provides the ability to defer any offscreen images, or switch to a template that provides that functionality. Starting with Joomla 4.0, all new images will [automatically](https://github.com/joomla/joomla-cms/pull/30748) get the `loading` attribute from the core.","total-byte-weight":"Consider showing excerpts in your article categories (e.g. via the read more link), reducing the number of articles shown on a given page, breaking your long posts into multiple pages, or using a plugin to lazy-load comments.",
|
|
252
239
|
"render-blocking-resources":"There are a number of Joomla plugins that can help you [inline critical assets](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) or [defer less important resources](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance). Beware that optimizations provided by these plugins may break features of your templates or plugins, so you will need to test these thoroughly.","unminified-css":"A number of [Joomla extensions](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) can speed up your site by concatenating, minifying, and compressing your css styles. There are also templates that provide this functionality.","unminified-javascript":"A number of [Joomla extensions](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) can speed up your site by concatenating, minifying, and compressing your scripts. There are also templates that provide this functionality.",
|
|
253
240
|
"efficient-animated-content":"Consider uploading your GIF to a service which will make it available to embed as an HTML5 video.","unused-javascript":"Consider reducing, or switching, the number of [Joomla extensions](https://extensions.joomla.org/) loading unused JavaScript in your page. To identify plugins that are adding extraneous JS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the extension responsible from the URL of the script. Look out for extensions that have many scripts in the list which have a lot of red in code coverage. An extension should only enqueue a script if it is actually used on the page.","uses-long-cache-ttl":"Read about [Browser Caching in Joomla](https://docs.joomla.org/Cache).",
|
|
254
|
-
"uses-optimized-images":"Consider using an [image optimization plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) that compresses your images while retaining quality.","uses-text-compression":"You can enable text compression by enabling Gzip Page Compression in Joomla (System > Global configuration > Server).","uses-responsive-images":"Consider using a [responsive images plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=responsive%20images) to use responsive images in your content.","server-response-time":"Templates, extensions, and server specifications all contribute to server response time. Consider finding a more optimized template, carefully selecting an optimization extension, and/or upgrading your server."};var joomla={id:"joomla",title:"Joomla",icon:icon$
|
|
255
|
-
;const icon='data:image/svg+xml
|
|
241
|
+
"uses-optimized-images":"Consider using an [image optimization plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=performance) that compresses your images while retaining quality.","uses-text-compression":"You can enable text compression by enabling Gzip Page Compression in Joomla (System > Global configuration > Server).","uses-responsive-images":"Consider using a [responsive images plugin](https://extensions.joomla.org/instant-search/?jed_live%5Bquery%5D=responsive%20images) to use responsive images in your content.","server-response-time":"Templates, extensions, and server specifications all contribute to server response time. Consider finding a more optimized template, carefully selecting an optimization extension, and/or upgrading your server."};var joomla={id:"joomla",title:"Joomla",icon:icon$5,UIStrings:UIStrings$2D}
|
|
242
|
+
;const icon$4='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" fill="%23f26322" viewBox="0 0 1000 1000"%3E%3Cpath d="M916.9 267.4v465.3l-111.3 67.4V331.4l-1.5-.9-303.9-189-304.6 189.2-1.2.8V799L83.1 732.6V267.4l.7-.4L500.3 10l416 257 .6.4zM560.7 468.5v383.3L500.3 890l-61-38.2V306.7l-136 84.3v476.6l197 122.5 196.4-122.5V391l-136-84.3v161.8z"/%3E%3C/svg%3E',UIStrings$2C={"modern-image-formats":"Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=webp) for a variety of third-party extensions to leverage newer image formats.","offscreen-images":"Consider modifying your product and catalog templates to make use of the web platform's [lazy loading](https://web.dev/native-lazy-loading) feature.",
|
|
243
|
+
"disable-bundling":"Disable Magento's built-in [JavaScript bundling and minification](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html), and consider using [baler](https://github.com/magento/baler/) instead.","unminified-css":'Enable the "Minify CSS Files" option in your store\'s Developer settings. [Learn more](https://devdocs.magento.com/guides/v2.3/performance-best-practices/configuration.html?itm_source=devdocs&itm_medium=search_page&itm_campaign=federated_search&itm_term=minify%20css%20files).',"unminified-javascript":"Use [Terser](https://www.npmjs.com/package/terser) to minify all JavaScript assets from static content deployment, and disable the built-in minification feature.","unused-javascript":"Disable Magento's built-in [JavaScript bundling](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html).",
|
|
244
|
+
"uses-optimized-images":"Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=optimize%20image) for a variety of third party extensions to optimize images.","server-response-time":"Use Magento's [Varnish integration](https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish.html).","uses-rel-preconnect":"Preconnect or dns-prefetch resource hints can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html).","uses-rel-preload":"`<link rel=preload>` tags can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html).","critical-request-chains":"If you are not bundling your JavaScript assets, consider using [baler](https://github.com/magento/baler).",
|
|
245
|
+
"font-display":"Specify `@font-display` when [defining custom fonts](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/using-fonts.html)."};var magento={id:"magento",title:"Magento",icon:icon$4,UIStrings:UIStrings$2C}
|
|
246
|
+
;const icon$3='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 207 124"><path d="M48.942 32.632h38.96v3.082h-35.39v23.193H85.79v3.082H52.513v25.464h35.794v3.081H48.942V32.632Zm42.45 0h4.139l18.343 25.464 18.749-25.464L158.124.287l-41.896 60.485 21.59 29.762h-4.302l-19.642-27.086L94.15 90.534h-4.22l21.751-29.762-20.29-28.14Zm47.967 3.082v-3.082h44.397v3.082h-20.453v54.82h-3.571v-54.82h-20.373ZM.203 32.632h4.464l61.557 91.671-25.439-33.769L3.936 37.011l-.162 53.523H.203zm183.194 53.891c.738 0 1.276-.563 1.276-1.29 0-.727-.538-1.29-1.276-1.29-.73 0-1.277.563-1.277 1.29 0 .727.547 1.29 1.277 1.29Zm3.509-3.393c0 2.146 1.555 3.549 3.822 3.549 2.414 0 3.874-1.446 3.874-3.956v-8.837h-1.946v8.828c0 1.394-.704 2.138-1.946 2.138-1.112 0-1.867-.692-1.893-1.722h-1.911Zm10.24-.113c.14 2.233 2.007 3.662 4.787 3.662 2.97 0 4.83-1.498 4.83-3.887 0-1.878-1.06-2.917-3.632-3.514l-1.38-.338c-1.634-.38-2.294-.891-2.294-1.783 0-1.125 1.025-1.86 2.563-1.86 1.459 0 2.466.718 2.649 1.869h1.893c-.113-2.103-1.971-3.583-4.516-3.583-2.737 0-4.56 1.48-4.56 3.704 0 1.835 1.033 2.926 3.3 3.454l1.616.39c1.659.389 2.388.96 2.388 1.912 0 1.108-1.146 1.913-2.71 1.913-1.676 0-2.84-.753-3.005-1.939h-1.928Z" fill="%23000"/></svg>',UIStrings$2B={
|
|
247
|
+
"unused-css-rules":"Consider setting up `PurgeCSS` in `Next.js` configuration to remove unused rules from stylesheets. [Learn more](https://purgecss.com/guides/next.html).","modern-image-formats":"Use the `Next.js` Image Optimization API to serve modern formats like `WebP` and `AVIF`. [Learn more](https://nextjs.org/docs/api-reference/next/image#acceptable-formats).","offscreen-images":'Use the `next/image` component, which defaults to `loading="lazy"`. [Learn more](https://nextjs.org/docs/api-reference/next/image#loading).',"render-blocking-resources":"Use the `next/script` component to defer loading of non-critical third-party scripts. [Learn more](https://nextjs.org/docs/basic-features/script).","unused-javascript":"Use `Webpack Bundle Analyzer` to detect unused JavaScript code. [Learn mode](https://github.com/vercel/next.js/tree/canary/packages/next-bundle-analyzer)",
|
|
248
|
+
"uses-long-cache-ttl":"Configure caching for immutable assets and `Server-side Rendered` (SSR) pages. [Learn more](https://nextjs.org/docs/going-to-production#caching).","uses-optimized-images":"Use the `next/image` component instead of `<img>` to optimize images. [Learn more](https://nextjs.org/docs/basic-features/image-optimization).","uses-text-compression":"Enable compression on your Next.js server. [Learn more](https://nextjs.org/docs/api-reference/next.config.js/compression).","uses-responsive-images":"Use the `next/image` component to set the appropriate `sizes`. [Learn more](https://nextjs.org/docs/api-reference/next/image#sizes).","user-timings":"Consider using `Next.js Analytics` to measure your app's real-world performance. [Learn more](https://nextjs.org/docs/advanced-features/measuring-performance)."};var next={id:"next.js",title:"Next.js",icon:icon$3,UIStrings:UIStrings$2B}
|
|
249
|
+
;const icon$2='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 310 310"><path fill="none" d="M-1-1h802v602H-1z"/><g><path fill="%23de6c26" d="M135 6.9c-14.2 4.4-34.9 21.8-49.9 42C55.8 88.5 39.6 135.8 41.4 177c.8 20.2 4.9 35.5 14.4 54.5 13.6 27.4 40.8 55.1 65.5 66.9 14.1 6.7 13.4 6.9 14.1-2.8.3-4.4 1-32.4 1.6-62.1 2.7-137.3 4.4-176 8.2-191.3.6-2.3 1.4-4.2 1.9-4.2 1.2 0 3.6 9.1 4.9 18.3.5 4.3 1 17.7 1 29.8 0 12 .3 21.9.7 21.9.3 0 5.7-5 11.9-11 6.9-6.8 12-11 13.3-11 1.8 0 1.9.3 1 2.7-1.2 3.1-7.9 13.2-19.1 28.5L153 128l.1 31.2c.1 17.2.4 37.4.8 44.9l.6 13.7 11-12.6c14-16 35.1-37.1 39.5-39.6l3.3-1.9-.6 3.2c-2 9.8-9.5 20.7-37.4 54.3L154 240.8v31.1c0 18.3.4 31.1.9 31.1 2.8 0 19.3-6.4 26.8-10.5 13.8-7.3 23.8-15 38.3-29.5 15.7-15.7 24.4-27.4 33.4-45.2 20.5-40 21-80.3 1.6-119-17.8-35.6-54.6-72.1-87.8-86.9-11.7-5.3-24.6-7.3-32.2-5z"/></g></svg>',UIStrings$2A={
|
|
256
250
|
"unused-css-rules":"Consider reviewing the [plugins](https://octobercms.com/plugins) loading unused CSS on the website. To identify plugins that add unnecessary CSS, run [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. Identify the theme/plugin responsible from the stylesheet URL. Look for plugins with many stylesheets with lots of red in code coverage. A plugin should only add a stylesheet if it is actually used on the web page.","modern-image-formats":"Consider using a [plugin](https://octobercms.com/plugins?search=image) or service that will automatically convert the uploaded images to the optimal formats. [WebP lossless images](https://developers.google.com/speed/webp) are 26% smaller in size compared to PNGs and 25-34% smaller than comparable JPEG images at the equivalent SSIM quality index. Another next-gen image format to consider is [AVIF](https://jakearchibald.com/2020/avif-has-landed/).",
|
|
257
251
|
"offscreen-images":"Consider installing an [image lazy loading plugin](https://octobercms.com/plugins?search=lazy) that provides the ability to defer any offscreen images, or switch to a theme that provides that functionality. Also consider using [the AMP plugin](https://octobercms.com/plugins?search=Accelerated+Mobile+Pages).","total-byte-weight":"Consider showing excerpts in the post lists (e.g. using a `show more` button), reducing the number of posts shown on a given web page, breaking long posts into multiple web pages, or using a plugin to lazy-load comments.","render-blocking-resources":"There are many plugins that help [inline critical assets](https://octobercms.com/plugins?search=css). These plugins may break other plugins, so you should test thoroughly.",
|
|
258
252
|
"unminified-css":"There are many [plugins](https://octobercms.com/plugins?search=css) that can speed up a website by concatenating, minifying and compressing the styles. Using a build process to do this minification up-front can speed up development.","unminified-javascript":"There are many [plugins](https://octobercms.com/plugins?search=javascript) that can speed up a website by concatenating, minifying and compressing the scripts. Using a build process to do this minification up-front can speed up development.","efficient-animated-content":"[Replace animated GIFs with video](https://web.dev/replace-gifs-with-videos/) for faster web page loads and consider using modern file formats such as [WebM](https://web.dev/replace-gifs-with-videos/#create-webm-videos) or [AV1](https://developers.google.com/web/updates/2018/09/chrome-70-media-updates#av1-decoder) to improve compression efficiency by greater than 30% over the current state-of-the-art video codec, VP9.",
|
|
259
253
|
"unused-javascript":"Consider reviewing the [plugins](https://octobercms.com/plugins?search=javascript) that load unused JavaScript in the web page. To identify plugins that add unnecessary JavaScript, run [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. Identify the theme/plugin responsible from the URL of the script. Look for plugins with many scripts with lots of red in code coverage. A plugin should only add a script if it is actually used on the web page.","uses-long-cache-ttl":"Read about [preventing unnecessary network requests with the HTTP Cache](https://web.dev/http-cache/#caching-checklist). There are many [plugins](https://octobercms.com/plugins?search=Caching) that can be used to speed up caching.","uses-optimized-images":"Consider using an [image optimization plugin](https://octobercms.com/plugins?search=image) to compresses images while retaining the quality.",
|
|
260
|
-
"uses-text-compression":"Enable text compression in the web server configuration.","uses-responsive-images":"Upload images directly in the media manager to ensure the required image sizes are available. Consider using the [resize filter](https://octobercms.com/docs/markup/filter-resize) or an [image resizing plugin](https://octobercms.com/plugins?search=image) to ensure the optimal image sizes are used.","server-response-time":"Themes, plugins and server specifications all contribute to the server response time. Consider finding a more optimized theme, carefully selecting an optimization plugin and/or upgrade the server. October CMS also allows developers to use [`Queues`](https://octobercms.com/docs/services/queues) to defer the processing of a time consuming task, such as sending an e-mail. This drastically speeds up web requests."};var octobercms={id:"octobercms",title:"October CMS",icon,UIStrings:UIStrings$
|
|
261
|
-
;const
|
|
254
|
+
"uses-text-compression":"Enable text compression in the web server configuration.","uses-responsive-images":"Upload images directly in the media manager to ensure the required image sizes are available. Consider using the [resize filter](https://octobercms.com/docs/markup/filter-resize) or an [image resizing plugin](https://octobercms.com/plugins?search=image) to ensure the optimal image sizes are used.","server-response-time":"Themes, plugins and server specifications all contribute to the server response time. Consider finding a more optimized theme, carefully selecting an optimization plugin and/or upgrade the server. October CMS also allows developers to use [`Queues`](https://octobercms.com/docs/services/queues) to defer the processing of a time consuming task, such as sending an e-mail. This drastically speeds up web requests."};var octobercms={id:"octobercms",title:"October CMS",icon:icon$2,UIStrings:UIStrings$2A}
|
|
255
|
+
;const icon$1='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"%3E %3Cg fill="%2361DAFB"%3E%3Cpath d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/%3E %3Ccircle cx="420.9" cy="296.5" r="45.7"/%3E %3Cpath d="M520.5 78.1z"/%3E%3C/g%3E%3C/svg%3E',UIStrings$2z={
|
|
256
|
+
"unminified-css":"If your build system minifies CSS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).","unminified-javascript":"If your build system minifies JS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build).","unused-javascript":"If you are not server-side rendering, [split your JavaScript bundles](https://web.dev/code-splitting-suspense/) with `React.lazy()`. Otherwise, code-split using a third-party library such as [loadable-components](https://www.smooth-code.com/open-source/loadable-components/docs/getting-started/).",
|
|
257
|
+
"server-response-time":"If you are server-side rendering any React components, consider using `renderToNodeStream()` or `renderToStaticNodeStream()` to allow the client to receive and hydrate different parts of the markup instead of all at once. [Learn more](https://reactjs.org/docs/react-dom-server.html#rendertonodestream).",redirects:"If you are using React Router, minimize usage of the `<Redirect>` component for [route navigations](https://reacttraining.com/react-router/web/api/Redirect).","user-timings":"Use the React DevTools Profiler, which makes use of the Profiler API, to measure the rendering performance of your components. [Learn more.](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html)",
|
|
258
|
+
"dom-size":'Consider using a "windowing" library like `react-window` to minimize the number of DOM nodes created if you are rendering many repeated elements on the page. [Learn more](https://web.dev/virtualize-long-lists-react-window/). Also, minimize unnecessary re-renders using [`shouldComponentUpdate`](https://reactjs.org/docs/optimizing-performance.html#shouldcomponentupdate-in-action), [`PureComponent`](https://reactjs.org/docs/react-api.html#reactpurecomponent), or [`React.memo`](https://reactjs.org/docs/react-api.html#reactmemo) and [skip effects](https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects) only until certain dependencies have changed if you are using the `Effect` hook to improve runtime performance.'};var react={id:"react",title:"React",icon:icon$1,UIStrings:UIStrings$2z}
|
|
259
|
+
;const icon='data:image/svg+xml,%3Csvg viewBox="0 0 122.5 122.5" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="%232f3439"%3E%3Cpath d="M8.7 61.3c0 20.8 12.1 38.7 29.6 47.3l-25-68.7c-3 6.5-4.6 13.7-4.6 21.4zM96.7 58.6c0-6.5-2.3-11-4.3-14.5-2.7-4.3-5.2-8-5.2-12.3 0-4.8 3.7-9.3 8.9-9.3h.7a52.4 52.4 0 0 0-79.4 9.9h3.3c5.5 0 14-.6 14-.6 2.9-.2 3.2 4 .4 4.3 0 0-2.9.4-6 .5l19.1 57L59.7 59l-8.2-22.5c-2.8-.1-5.5-.5-5.5-.5-2.8-.1-2.5-4.5.3-4.3 0 0 8.7.7 13.9.7 5.5 0 14-.7 14-.7 2.8-.2 3.2 4 .3 4.3 0 0-2.8.4-6 .5l19 56.5 5.2-17.5c2.3-7.3 4-12.5 4-17z"/%3E%3Cpath d="M62.2 65.9l-15.8 45.8a52.6 52.6 0 0 0 32.3-.9l-.4-.7zM107.4 36a49.6 49.6 0 0 1-3.6 24.2l-16.1 46.5A52.5 52.5 0 0 0 107.4 36z"/%3E%3Cpath d="M61.3 0a61.3 61.3 0 1 0 .1 122.7A61.3 61.3 0 0 0 61.3 0zm0 119.7a58.5 58.5 0 1 1 .1-117 58.5 58.5 0 0 1-.1 117z"/%3E%3C/g%3E%3C/svg%3E',UIStrings$2y={
|
|
260
|
+
"unused-css-rules":"Consider reducing, or switching, the number of [WordPress plugins](https://wordpress.org/plugins/) loading unused CSS in your page. To identify plugins that are adding extraneous CSS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the stylesheet. Look out for plugins that have many stylesheets in the list which have a lot of red in code coverage. A plugin should only enqueue a stylesheet if it is actually used on the page.","modern-image-formats":"Consider using a [plugin](https://wordpress.org/plugins/search/convert+webp/) or service that will automatically convert your uploaded images to the optimal formats.",
|
|
261
|
+
"offscreen-images":"Install a [lazy-load WordPress plugin](https://wordpress.org/plugins/search/lazy+load/) that provides the ability to defer any offscreen images, or switch to a theme that provides that functionality. Also consider using [the AMP plugin](https://wordpress.org/plugins/amp/).","total-byte-weight":"Consider showing excerpts in your post lists (e.g. via the more tag), reducing the number of posts shown on a given page, breaking your long posts into multiple pages, or using a plugin to lazy-load comments.","render-blocking-resources":"There are a number of WordPress plugins that can help you [inline critical assets](https://wordpress.org/plugins/search/critical+css/) or [defer less important resources](https://wordpress.org/plugins/search/defer+css+javascript/). Beware that optimizations provided by these plugins may break features of your theme or plugins, so you will likely need to make code changes.",
|
|
262
|
+
"unminified-css":"A number of [WordPress plugins](https://wordpress.org/plugins/search/minify+css/) can speed up your site by concatenating, minifying, and compressing your styles. You may also want to use a build process to do this minification up-front if possible.","unminified-javascript":"A number of [WordPress plugins](https://wordpress.org/plugins/search/minify+javascript/) can speed up your site by concatenating, minifying, and compressing your scripts. You may also want to use a build process to do this minification up front if possible.","efficient-animated-content":"Consider uploading your GIF to a service which will make it available to embed as an HTML5 video.",
|
|
263
|
+
"unused-javascript":"Consider reducing, or switching, the number of [WordPress plugins](https://wordpress.org/plugins/) loading unused JavaScript in your page. To identify plugins that are adding extraneous JS, try running [code coverage](https://developers.google.com/web/updates/2017/04/devtools-release-notes#coverage) in Chrome DevTools. You can identify the theme/plugin responsible from the URL of the script. Look out for plugins that have many scripts in the list which have a lot of red in code coverage. A plugin should only enqueue a script if it is actually used on the page.","uses-long-cache-ttl":"Read about [Browser Caching in WordPress](https://wordpress.org/support/article/optimization/#browser-caching).","uses-optimized-images":"Consider using an [image optimization WordPress plugin](https://wordpress.org/plugins/search/optimize+images/) that compresses your images while retaining quality.",
|
|
264
|
+
"uses-text-compression":"You can enable text compression in your web server configuration.","uses-responsive-images":"Upload images directly through the [media library](https://wordpress.org/support/article/media-library-screen/) to ensure that the required image sizes are available, and then insert them from the media library or use the image widget to ensure the optimal image sizes are used (including those for the responsive breakpoints). Avoid using `Full Size` images unless the dimensions are adequate for their usage. [Learn More](https://wordpress.org/support/article/inserting-images-into-posts-and-pages/).","server-response-time":"Themes, plugins, and server specifications all contribute to server response time. Consider finding a more optimized theme, carefully selecting an optimization plugin, and/or upgrading your server."};var wordpress={id:"wordpress",title:"WordPress",icon,UIStrings:UIStrings$2y}
|
|
265
|
+
;const stackPacks$2=[amp,angular$1,drupal,joomla,magento,next,octobercms,react,wordpress];var lighthouseStackPacks=stackPacks$2;const log$f=lighthouseLogger,stackPacks$1=lighthouseStackPacks,i18n$2C=i18n$2H,stackPacksToInclude=[{packId:"wordpress",requiredStacks:["js:wordpress"]},{packId:"drupal",requiredStacks:["js:drupal"]},{packId:"amp",requiredStacks:["js:amp"]},{packId:"magento",requiredStacks:["js:magento"]},{packId:"octobercms",requiredStacks:["js:octobercms"]},{packId:"joomla",requiredStacks:["js:joomla"]},{packId:"next.js",requiredStacks:["js:next"]},{packId:"angular",requiredStacks:["js:@angular/core"]},{packId:"react",requiredStacks:["js:react"]}];function getStackPacks(e){const t=[];for(const r of e){const e=stackPacksToInclude.find((e=>e.requiredStacks.includes(`${r.detector}:${r.id}`)));if(!e)continue;const n=stackPacks$1.find((t=>t.id===e.packId));if(!n){log$f.warn("StackPacks",`'${e.packId}' stack pack was matched but is not found in stack-packs lib`);continue}
|
|
262
266
|
const a=i18n$2C.createMessageInstanceIdFn(`node_modules/lighthouse-stack-packs/packs/${n.id}.js`,n.UIStrings),i={},o=n.UIStrings;for(const e in o)o[e]&&(i[e]=a(o[e]));t.push({id:n.id,title:n.title,iconDataURL:n.icon,descriptions:i})}return t}var stackPacks_1={getStackPacks,stackPacksToInclude},lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,inited=!1;function init$1(){inited=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)lookup[t]=e[t],revLookup[e.charCodeAt(t)]=t;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63}function toByteArray(e){var t,r,n,a,i,o;inited||init$1();var l=e.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[l-2]?2:"="===e[l-1]?1:0,o=new Arr(3*l/4-i),n=i>0?l-4:l;var c=0;for(t=0,r=0;t<n;t+=4,r+=3)a=revLookup[e.charCodeAt(t)]<<18|revLookup[e.charCodeAt(t+1)]<<12|revLookup[e.charCodeAt(t+2)]<<6|revLookup[e.charCodeAt(t+3)],
|
|
263
267
|
o[c++]=a>>16&255,o[c++]=a>>8&255,o[c++]=255&a;return 2===i?(a=revLookup[e.charCodeAt(t)]<<2|revLookup[e.charCodeAt(t+1)]>>4,o[c++]=255&a):1===i&&(a=revLookup[e.charCodeAt(t)]<<10|revLookup[e.charCodeAt(t+1)]<<4|revLookup[e.charCodeAt(t+2)]>>2,o[c++]=a>>8&255,o[c++]=255&a),o}function tripletToBase64(e){return lookup[e>>18&63]+lookup[e>>12&63]+lookup[e>>6&63]+lookup[63&e]}function encodeChunk(e,t,r){for(var n,a=[],i=t;i<r;i+=3)n=(e[i]<<16)+(e[i+1]<<8)+e[i+2],a.push(tripletToBase64(n));return a.join("")}function fromByteArray(e){var t;inited||init$1();for(var r=e.length,n=r%3,a="",i=[],o=16383,l=0,c=r-n;l<c;l+=o)i.push(encodeChunk(e,l,l+o>c?c:l+o));return 1===n?(t=e[r-1],a+=lookup[t>>2],a+=lookup[t<<4&63],a+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],a+=lookup[t>>10],a+=lookup[t>>4&63],a+=lookup[t<<2&63],a+="="),i.push(a),i.join("")}function read(e,t,r,n,a){var i,o,l=8*a-n-1,c=(1<<l)-1,u=c>>1,p=-7,f=r?a-1:0,b=r?-1:1,S=e[t+f];for(f+=b,i=S&(1<<-p)-1,S>>=-p,p+=l;p>0;i=256*i+e[t+f],f+=b,p-=8);
|
|
264
268
|
for(o=i&(1<<-p)-1,i>>=-p,p+=n;p>0;o=256*o+e[t+f],f+=b,p-=8);if(0===i)i=1-u;else{if(i===c)return o?NaN:1/0*(S?-1:1);o+=Math.pow(2,n),i-=u}return(S?-1:1)*o*Math.pow(2,i-n)}function write(e,t,r,n,a,i){var o,l,c,u=8*i-a-1,p=(1<<u)-1,f=p>>1,b=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,S=n?0:i-1,_=n?1:-1,T=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+f>=1?b/c:b*Math.pow(2,1-f))*c>=2&&(o++,c/=2),o+f>=p?(l=0,o=p):o+f>=1?(l=(t*c-1)*Math.pow(2,a),o+=f):(l=t*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;e[r+S]=255&l,S+=_,l/=256,a-=8);for(o=o<<a|l,u+=a;u>0;e[r+S]=255&o,S+=_,o/=256,u-=8);e[r+S-_]|=128*T}var toString={}.toString,isArray$2=Array.isArray||function(e){return"[object Array]"==toString.call(e)},INSPECT_MAX_BYTES=50;Buffer$2.TYPED_ARRAY_SUPPORT=void 0===global$1.TYPED_ARRAY_SUPPORT||global$1.TYPED_ARRAY_SUPPORT;var _kMaxLength=kMaxLength();function kMaxLength(){
|
|
@@ -350,14 +354,14 @@ const t=e[Symbol.iterator](),r=t.next().value;yield` ${JSON.stringify(r)}`;let
|
|
|
350
354
|
async function saveAssets(e,t,r){const n=(await prepareAssets(e,t)).map((async(e,t)=>{const n=`${r}-${t}${devtoolsLogSuffix}`;fs$1.writeFileSync(n,JSON.stringify(e.devtoolsLog,null,2)),log$c.log("saveAssets","devtools log saved to disk: "+n);const a=`${r}-${t}${traceSuffix}`;log$c.log("saveAssets","streaming trace file to disk: "+a),await saveTrace(e.traceData,a),log$c.log("saveAssets","trace file streamed to disk: "+a)}));await Promise.all(n),await saveLanternDebugTraces(r)}async function saveLanternNetworkData(e,t){const r={computedCache:new Map},n=await NetworkAnalysisComputed$3.request(e,r),a=LoadSimulatorComputed.convertAnalysisToSaveableLanternData(n);fs$1.writeFileSync(t,JSON.stringify(a))}var assetSaver$1={saveArtifacts,saveLhr,loadArtifacts,saveAssets,prepareAssets,saveTrace,saveDevtoolsLog,saveLanternNetworkData,stringifyReplacer},_rollupPluginShim5={},_rollupPluginShim5$1=Object.freeze({__proto__:null,default:_rollupPluginShim5
|
|
351
355
|
}),require$$1$1=getAugmentedNamespace(_rollupPluginShim5$1);const log$b=lighthouseLogger,SENTRY_URL="https://a6bb0da87ee048cc9ae2a345fc09ab2e:63a7029f46f74265981b7e005e0f69f8@sentry.io/174697",SAMPLE_RATE=.01,SAMPLED_ERRORS=[],noop=()=>{},sentryDelegate={init,captureMessage:noop,captureBreadcrumb:noop,getContext:noop,captureException:async()=>{},_shouldSample:()=>SAMPLE_RATE>=Math.random()};function init(e){if(e.flags.enableErrorReporting&&sentryDelegate._shouldSample())try{const t=require$$1$1,r=Object.assign({},e.environmentData,{captureUnhandledRejections:!0});t.config(SENTRY_URL,r).install(),sentryDelegate.captureMessage=(...e)=>t.captureMessage(...e),sentryDelegate.captureBreadcrumb=(...e)=>t.captureBreadcrumb(...e),sentryDelegate.getContext=()=>t.getContext();const n=new Map;sentryDelegate.captureException=async(e,r={})=>{if(!e)return;if(e.expected)return;const a=r.tags||{};if(a.audit){const t=`audit-${a.audit}-${e.message}`;if(n.has(t))return;n.set(t,!0)}if(a.gatherer){
|
|
352
356
|
const t=`gatherer-${a.gatherer}-${e.message}`;if(n.has(t))return;n.set(t,!0)}const i=SAMPLED_ERRORS.find((t=>t.pattern.test(e.message)));return i&&i.rate<=Math.random()?void 0:(e.protocolMethod&&(r.fingerprint=["{{ default }}",e.protocolMethod,e.protocolError],r.tags=r.tags||{},r.tags.protocolMethod=e.protocolMethod),new Promise((n=>{t.captureException(e,r,(()=>n()))})))};const a=Object.assign({url:e.url,formFactor:e.flags.formFactor,throttlingMethod:e.flags.throttlingMethod},e.flags.throttling);t.mergeContext({extra:Object.assign({},e.environmentData.extra,a)})}catch(e){log$b.warn("sentry","Could not load raven library, errors will not be reported.")}}var sentry=sentryDelegate,_rollupPluginShim9={},_rollupPluginShim9$1=Object.freeze({__proto__:null,default:_rollupPluginShim9}),require$$0$1=getAugmentedNamespace(_rollupPluginShim9$1);const htmlReportAssets=require$$0$1;class ReportGenerator{static replaceStrings(e,t){if(0===t.length)return e;const r=t[0],n=t.slice(1)
|
|
353
|
-
;return e.split(r.search).map((e=>ReportGenerator.replaceStrings(e,n))).join(r.replacement)}static sanitizeJson(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}static generateReportHtml(e){const t=ReportGenerator.sanitizeJson(e),r=htmlReportAssets.REPORT_JAVASCRIPT.replace(/<\//g,"\\u003c/");return ReportGenerator.replaceStrings(htmlReportAssets.REPORT_TEMPLATE,[{search:"%%LIGHTHOUSE_JSON%%",replacement:t},{search:"%%LIGHTHOUSE_JAVASCRIPT%%",replacement:r}])}static generateFlowReportHtml(e){const t=ReportGenerator.sanitizeJson(e);return ReportGenerator.replaceStrings(htmlReportAssets.FLOW_REPORT_TEMPLATE,[{search:"%%LIGHTHOUSE_FLOW_JSON%%",replacement:t},{search:"%%LIGHTHOUSE_FLOW_JAVASCRIPT%%",replacement:htmlReportAssets.FLOW_REPORT_JAVASCRIPT},{search:"/*%%LIGHTHOUSE_FLOW_CSS%%*/",replacement:htmlReportAssets.FLOW_REPORT_CSS}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
if(!(t.url&&URL$G.isValid(t.url)&&URL$G.isProtocolAllowed(t.url)))throw new LHError$c(LHError$c.errors.INVALID_URL);if(l=new URL$G(t.url).href,o=await e({requestedUrl:l,config:t.config,driverMock:t.driverMock}),r.gatherMode){const e=Runner$3._getDataSavePath(r);await assetSaver.saveArtifacts(o,e)}}if(r.gatherMode&&!r.auditMode)return;if(!t.config.audits)throw new Error("No audits to evaluate.");const c=await Runner$3._runAudits(r,t.config.audits,o,a,t.computedCache),u={msg:"Generating results...",id:"lh:runner:generate"};log$a.time(u),o.LighthouseRunWarnings&&a.push(...o.LighthouseRunWarnings);const p={"axe-core":o.Accessibility&&o.Accessibility.version};let f={};t.config.categories&&(f=ReportScoring.scoreAllCategories(t.config.categories,c)),log$a.timeEnd(u),log$a.timeEnd(n);const b={
|
|
357
|
-
|
|
358
|
-
entryType:e.entryType}))).sort(((e,t)=>e.startTime-t.startTime)),n=r.find((e=>"lh:runner:run"===e.name));return{entries:r,total:n&&n.duration||0}}static async _gatherArtifactsFromBrowser(e,t,r){if(!t.config.passes)throw new Error("No browser artifacts are either provided or requested.");const n={driver:t.driverMock||new Driver(r),requestedUrl:e,settings:t.config.settings,computedCache:t.computedCache};return await GatherRunner.run(t.config.passes,n)}static async _runAudits(e,t,r,n,a){const i={msg:"Analyzing and running audits...",id:"lh:runner:auditing"};if(log$a.time(i),r.settings){const t={locale:void 0,gatherMode:void 0,auditMode:void 0,output:void 0,channel:void 0,budgets:void 0},n=Object.assign({},r.settings,t),a=Object.assign({},e,t);if(!isDeepEqual$1(n,a))throw new Error("Cannot change settings between gathering and auditing")}const o={settings:e,computedCache:a},l={};for(const e of t){
|
|
359
|
-
return log$a.timeEnd(i),l}static async _runAudit(e,t,r,n){const a=e.implementation,i={msg:`Auditing: ${format$2.getFormatted(a.meta.title,"en-US")}`,id:`lh:audit:${a.meta.id}`};let o;log$a.time(i);try{for(const e of a.meta.requiredArtifacts){const r=void 0===t[e],n="traces"===e&&!t.traces[Audit$1K.DEFAULT_PASS],i="devtoolsLogs"===e&&!t.devtoolsLogs[Audit$1K.DEFAULT_PASS];if(r||n||i)throw log$a.warn("Runner",`${e} gatherer, required by audit ${a.meta.id}, did not run.`),new LHError$c(LHError$c.errors.MISSING_REQUIRED_ARTIFACT,{artifactName:e});if(t[e]instanceof Error){const r=t[e];Sentry$6.captureException(r,{tags:{gatherer:e},level:"error"}),log$a.warn("Runner",`${e} gatherer, required by audit ${a.meta.id}, encountered an error: ${r.message}`);const n=new LHError$c(LHError$c.errors.ERRORED_REQUIRED_ARTIFACT,{artifactName:e,errorMessage:r.message});throw n.expected=!0,n}}const i={
|
|
360
|
-
},l=a.meta.requiredArtifacts.concat(a.meta.__internalOptionalArtifacts||[]).reduce(((e,r)=>{const n=t[r];return e[r]=n,e}),{}),c=await a.audit(l,i);n.push(...c.runWarnings||[]),o=Audit$1K.generateAuditResult(a,c)}catch(e){"MISSING_REQUIRED_ARTIFACT"!==e.code&&"ERRORED_REQUIRED_ARTIFACT"!==e.code&&log$a.warn(a.meta.id,`Caught exception: ${e.message}`),Sentry$6.captureException(e,{tags:{audit:a.meta.id},level:"error"});const t=e.friendlyMessage?e.friendlyMessage:e.message;o=Audit$1K.generateErrorAuditResult(a,t)}return log$a.timeEnd(i),o}static getArtifactRuntimeError(e){const t=[e.PageLoadError,...Object.values(e)];for(const e of t)if(e instanceof LHError$c&&e.lhrRuntimeError){const t=e.friendlyMessage||e.message;return{code:e.code,message:t}}}static getAuditList(){const e=["audit.js","violation-audit.js","accessibility/axe-audit.js","multi-check-audit.js","byte-efficiency/byte-efficiency-audit.js","manual/manual-audit.js"]
|
|
357
|
+
;return e.split(r.search).map((e=>ReportGenerator.replaceStrings(e,n))).join(r.replacement)}static sanitizeJson(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}static generateReportHtml(e){const t=ReportGenerator.sanitizeJson(e),r=htmlReportAssets.REPORT_JAVASCRIPT.replace(/<\//g,"\\u003c/");return ReportGenerator.replaceStrings(htmlReportAssets.REPORT_TEMPLATE,[{search:"%%LIGHTHOUSE_JSON%%",replacement:t},{search:"%%LIGHTHOUSE_JAVASCRIPT%%",replacement:r}])}static generateFlowReportHtml(e){const t=ReportGenerator.sanitizeJson(e);return ReportGenerator.replaceStrings(htmlReportAssets.FLOW_REPORT_TEMPLATE,[{search:"%%LIGHTHOUSE_FLOW_JSON%%",replacement:t},{search:"%%LIGHTHOUSE_FLOW_JAVASCRIPT%%",replacement:htmlReportAssets.FLOW_REPORT_JAVASCRIPT},{search:"/*%%LIGHTHOUSE_FLOW_CSS%%*/",replacement:htmlReportAssets.FLOW_REPORT_CSS}])}static generateReportCSV(e){
|
|
358
|
+
const escape=e=>`"${e.replace(/"/g,'""')}"`,rowFormatter=e=>e.map((e=>e.toString())).map(escape),t=Object.keys(e.categories).map((t=>{const r=[],n=e.categories[t],a=null===n.score?-1:n.score;return r.push(rowFormatter([e.requestedUrl,e.finalUrl,n.title,`${t}-score`,`Overall ${n.title} Category Score`,"numeric",a])),r.concat(n.auditRefs.map((t=>{const r=e.audits[t.id],a=null===r.score?-1:r.score;return rowFormatter([e.requestedUrl,e.finalUrl,n.title,r.id,r.title,r.scoreDisplayMode,a])})))}));return[["requestedUrl","finalUrl","category","name","title","type","score"]].concat(...t).map((e=>e.join(","))).join("\r\n")}static generateReport(e,t){const r=Array.isArray(t);"string"==typeof t&&(t=[t]);const n=t.map((t=>{if("html"===t)return ReportGenerator.generateReportHtml(e);if("csv"===t)return ReportGenerator.generateReportCSV(e);if("json"===t)return JSON.stringify(e,null,2);throw new Error("Invalid output mode: "+t)}));return r?n:n[0]}}var reportGenerator=ReportGenerator
|
|
359
|
+
;const isDeepEqual$1=lodash_isequal.exports,Driver=driver,GatherRunner=gatherRunner,ReportScoring=scoring,Audit$1K=audit,log$a=lighthouseLogger,format$2=format_1,stackPacks=stackPacks_1,assetSaver=assetSaver$1,path$2=require$$5$2,URL$G=urlShim,Sentry$6=sentry,generateReport=reportGenerator.generateReport,LHError$c=lhError.exports,{version:lighthouseVersion}=require$$15;class Runner$3{static async run(e,t){const r=t.config.settings;try{const n={msg:"Runner setup",id:"lh:runner:run"};log$a.time(n,"verbose");const a=[],i=Sentry$6.getContext();let o,l;if(Sentry$6.captureBreadcrumb({message:"Run started",category:"lifecycle",data:i&&i.extra}),r.auditMode&&!r.gatherMode){const e=Runner$3._getDataSavePath(r);if(o=assetSaver.loadArtifacts(e),l=o.URL.requestedUrl,!l)throw new Error("Cannot run audit mode on empty URL");if(t.url&&!URL$G.equalWithExcludedFragments(t.url,l))throw new Error("Cannot run audit mode on different URL")}else{
|
|
360
|
+
if(!(t.url&&URL$G.isValid(t.url)&&URL$G.isProtocolAllowed(t.url)))throw new LHError$c(LHError$c.errors.INVALID_URL);if(l=new URL$G(t.url).href,o=await e({requestedUrl:l,config:t.config,driverMock:t.driverMock}),r.gatherMode){const e=Runner$3._getDataSavePath(r);await assetSaver.saveArtifacts(o,e)}}if(r.gatherMode&&!r.auditMode)return;if(!t.config.audits)throw new Error("No audits to evaluate.");const c=await Runner$3._runAudits(r,t.config.audits,o,a,t.computedCache),u={msg:"Generating results...",id:"lh:runner:generate"};log$a.time(u),o.LighthouseRunWarnings&&a.push(...o.LighthouseRunWarnings);const p={"axe-core":o.Accessibility&&o.Accessibility.version};let f={};t.config.categories&&(f=ReportScoring.scoreAllCategories(t.config.categories,c)),log$a.timeEnd(u),log$a.timeEnd(n);const b={lighthouseVersion,requestedUrl:l,finalUrl:o.URL.finalUrl,fetchTime:o.fetchTime,gatherMode:o.GatherContext.gatherMode,runtimeError:Runner$3.getArtifactRuntimeError(o),runWarnings:a,
|
|
361
|
+
userAgent:o.HostUserAgent,environment:{networkUserAgent:o.NetworkUserAgent,hostUserAgent:o.HostUserAgent,benchmarkIndex:o.BenchmarkIndex,credits:p},audits:c,configSettings:r,categories:f,categoryGroups:t.config.groups||void 0,stackPacks:stackPacks.getStackPacks(o.Stacks),timing:this._getTiming(o),i18n:{rendererFormattedStrings:format$2.getRendererFormattedStrings(r.locale),icuMessagePaths:{}}};b.i18n.icuMessagePaths=format$2.replaceIcuMessages(b,r.locale);const S=b;if(r.gatherMode&&r.auditMode){const e=Runner$3._getDataSavePath(r);assetSaver.saveLhr(S,e)}return{lhr:S,artifacts:o,report:generateReport(S,r.output)}}catch(e){throw e.friendlyMessage&&(e.friendlyMessage=format$2.getFormatted(e.friendlyMessage,r.locale)),await Sentry$6.captureException(e,{level:"fatal"}),e}}static _getTiming(e){const t=[...e.Timing||[],...log$a.takeTimeEntries()].map((e=>[e.startTime,e])),r=Array.from(new Map(t).values()).map((e=>({startTime:parseFloat(e.startTime.toFixed(2)),name:e.name,
|
|
362
|
+
duration:parseFloat(e.duration.toFixed(2)),entryType:e.entryType}))).sort(((e,t)=>e.startTime-t.startTime)),n=r.find((e=>"lh:runner:run"===e.name));return{entries:r,total:n&&n.duration||0}}static async _gatherArtifactsFromBrowser(e,t,r){if(!t.config.passes)throw new Error("No browser artifacts are either provided or requested.");const n={driver:t.driverMock||new Driver(r),requestedUrl:e,settings:t.config.settings,computedCache:t.computedCache};return await GatherRunner.run(t.config.passes,n)}static async _runAudits(e,t,r,n,a){const i={msg:"Analyzing and running audits...",id:"lh:runner:auditing"};if(log$a.time(i),r.settings){const t={locale:void 0,gatherMode:void 0,auditMode:void 0,output:void 0,channel:void 0,budgets:void 0},n=Object.assign({},r.settings,t),a=Object.assign({},e,t);if(!isDeepEqual$1(n,a))throw new Error("Cannot change settings between gathering and auditing")}const o={settings:e,computedCache:a},l={};for(const e of t){
|
|
363
|
+
const t=e.implementation.meta.id,a=await Runner$3._runAudit(e,r,o,n);l[t]=a}return log$a.timeEnd(i),l}static async _runAudit(e,t,r,n){const a=e.implementation,i={msg:`Auditing: ${format$2.getFormatted(a.meta.title,"en-US")}`,id:`lh:audit:${a.meta.id}`};let o;log$a.time(i);try{for(const e of a.meta.requiredArtifacts){const r=void 0===t[e],n="traces"===e&&!t.traces[Audit$1K.DEFAULT_PASS],i="devtoolsLogs"===e&&!t.devtoolsLogs[Audit$1K.DEFAULT_PASS];if(r||n||i)throw log$a.warn("Runner",`${e} gatherer, required by audit ${a.meta.id}, did not run.`),new LHError$c(LHError$c.errors.MISSING_REQUIRED_ARTIFACT,{artifactName:e});if(t[e]instanceof Error){const r=t[e];Sentry$6.captureException(r,{tags:{gatherer:e},level:"error"}),log$a.warn("Runner",`${e} gatherer, required by audit ${a.meta.id}, encountered an error: ${r.message}`);const n=new LHError$c(LHError$c.errors.ERRORED_REQUIRED_ARTIFACT,{artifactName:e,errorMessage:r.message});throw n.expected=!0,n}}const i={
|
|
364
|
+
options:Object.assign({},a.defaultOptions,e.options),...r},l=a.meta.requiredArtifacts.concat(a.meta.__internalOptionalArtifacts||[]).reduce(((e,r)=>{const n=t[r];return e[r]=n,e}),{}),c=await a.audit(l,i);n.push(...c.runWarnings||[]),o=Audit$1K.generateAuditResult(a,c)}catch(e){"MISSING_REQUIRED_ARTIFACT"!==e.code&&"ERRORED_REQUIRED_ARTIFACT"!==e.code&&log$a.warn(a.meta.id,`Caught exception: ${e.message}`),Sentry$6.captureException(e,{tags:{audit:a.meta.id},level:"error"});const t=e.friendlyMessage?e.friendlyMessage:e.message;o=Audit$1K.generateErrorAuditResult(a,t)}return log$a.timeEnd(i),o}static getArtifactRuntimeError(e){const t=[e.PageLoadError,...Object.values(e)];for(const e of t)if(e instanceof LHError$c&&e.lhrRuntimeError){const t=e.friendlyMessage||e.message;return{code:e.code,message:t}}}static getAuditList(){const e=["audit.js","violation-audit.js","accessibility/axe-audit.js","multi-check-audit.js","byte-efficiency/byte-efficiency-audit.js","manual/manual-audit.js"]
|
|
361
365
|
;return["accessibility","apple-touch-icon.js","audit.js","autocomplete.js","bootup-time.js","byte-efficiency","content-width.js","critical-request-chains.js","csp-xss.js","deprecations.js","diagnostics.js","dobetterweb","errors-in-console.js","final-screenshot.js","font-display.js","full-page-screenshot.js","image-aspect-ratio.js","image-size-responsive.js","installable-manifest.js","is-on-https.js","largest-contentful-paint-element.js","layout-shift-elements.js","lcp-lazy-loaded.js","long-tasks.js","main-thread-tasks.js","mainthread-work-breakdown.js","manual","maskable-icon.js","metrics","metrics.js","multi-check-audit.js","network-requests.js","network-rtt.js","network-server-latency.js","no-unload-listeners.js","non-composited-animations.js","oopif-iframe-test-audit.js","performance-budget.js","predictive-perf.js","preload-fonts.js","preload-lcp-image.js","redirects.js","resource-summary.js","screenshot-thumbnails.js","script-treemap-data.js","seo","server-response-time.js","service-worker.js","splash-screen.js","themed-omnibox.js","third-party-facades.js","third-party-summary.js","timing-budget.js","unsized-images.js","user-timings.js","uses-rel-preconnect.js","uses-rel-preload.js","valid-source-maps.js","viewport.js","violation-audit.js",...["charset.js","doctype.js","dom-size.js","geolocation-on-start.js","inspector-issues.js","js-libraries.js","no-document-write.js","no-vulnerable-libraries.js","notification-on-start.js","password-inputs-can-be-pasted-into.js","uses-http2.js","uses-passive-event-listeners.js"].map((e=>`dobetterweb/${e}`)),...["cumulative-layout-shift.js","first-contentful-paint-3g.js","first-contentful-paint.js","first-meaningful-paint.js","interactive.js","largest-contentful-paint.js","max-potential-fid.js","speed-index.js","total-blocking-time.js"].map((e=>`metrics/${e}`)),...["canonical.js","crawlable-anchors.js","font-size.js","hreflang.js","http-status-code.js","is-crawlable.js","link-text.js","manual","meta-description.js","plugins.js","robots-txt.js","tap-targets.js"].map((e=>`seo/${e}`)),...["structured-data.js"].map((e=>`seo/manual/${e}`)),...["accesskeys.js","aria-allowed-attr.js","aria-command-name.js","aria-hidden-body.js","aria-hidden-focus.js","aria-input-field-name.js","aria-meter-name.js","aria-progressbar-name.js","aria-required-attr.js","aria-required-children.js","aria-required-parent.js","aria-roles.js","aria-toggle-field-name.js","aria-tooltip-name.js","aria-treeitem-name.js","aria-valid-attr-value.js","aria-valid-attr.js","axe-audit.js","button-name.js","bypass.js","color-contrast.js","definition-list.js","dlitem.js","document-title.js","duplicate-id-active.js","duplicate-id-aria.js","form-field-multiple-labels.js","frame-title.js","heading-order.js","html-has-lang.js","html-lang-valid.js","image-alt.js","input-image-alt.js","label.js","link-name.js","list.js","listitem.js","manual","meta-refresh.js","meta-viewport.js","object-alt.js","tabindex.js","td-headers-attr.js","th-has-data-cells.js","valid-lang.js","video-caption.js"].map((e=>`accessibility/${e}`)),...["custom-controls-labels.js","custom-controls-roles.js","focus-traps.js","focusable-controls.js","interactive-element-affordance.js","logical-tab-order.js","managed-focus.js","offscreen-content-hidden.js","use-landmarks.js","visual-order-follows-dom.js"].map((e=>`accessibility/manual/${e}`)),...["byte-efficiency-audit.js","duplicated-javascript.js","efficient-animated-content.js","legacy-javascript.js","modern-image-formats.js","offscreen-images.js","polyfill-graph-data.json","render-blocking-resources.js","total-byte-weight.js","unminified-css.js","unminified-javascript.js","unused-css-rules.js","unused-javascript.js","uses-long-cache-ttl.js","uses-optimized-images.js","uses-responsive-images-snapshot.js","uses-responsive-images.js","uses-text-compression.js"].map((e=>`byte-efficiency/${e}`)),...["manual-audit.js","pwa-cross-browser.js","pwa-each-page-has-url.js","pwa-page-transitions.js"].map((e=>`manual/${e}`))].filter((t=>/\.js$/.test(t)&&!e.includes(t))).sort()
|
|
362
366
|
}static getGathererList(){return["accessibility.js","anchor-elements.js","cache-contents.js","console-messages.js","css-usage.js","devtools-log-compat.js","devtools-log.js","dobetterweb","form-elements.js","full-page-screenshot.js","gatherer.js","global-listeners.js","iframe-elements.js","image-elements.js","inspector-issues.js","installability-errors.js","js-usage.js","link-elements.js","main-document-content.js","meta-elements.js","network-user-agent.js","script-elements.js","seo","service-worker.js","source-maps.js","stacks.js","trace-compat.js","trace-elements.js","trace.js","viewport-dimensions.js","web-app-manifest.js",...["embedded-content.js","font-size.js","robots-txt.js","tap-targets.js"].map((e=>`seo/${e}`)),...["doctype.js","domstats.js","optimized-images.js","password-inputs-with-prevented-paste.js","response-compression.js","tags-blocking-first-paint.js"].map((e=>`dobetterweb/${e}`))].filter((e=>/\.js$/.test(e)&&"gatherer.js"!==e)).sort()}static _getDataSavePath(e){
|
|
363
367
|
const{auditMode:t,gatherMode:r}=e;return"string"==typeof t?path$2.resolve(process.cwd(),t):"string"==typeof r?path$2.resolve(process.cwd(),r):path$2.join(process.cwd(),"latest-run")}}var runner=Runner$3,_rollupPluginShim8={},_rollupPluginShim8$1=Object.freeze({__proto__:null,default:_rollupPluginShim8}),require$$2=getAugmentedNamespace(_rollupPluginShim8$1),defaultConfig$1={exports:{}}
|
|
@@ -478,9 +482,9 @@ n instanceof HTMLLabelElement&&a.labels.push({for:n.htmlFor,node:getNodeDetails(
|
|
|
478
482
|
* @license Copyright 2020 Google Inc. All Rights Reserved.
|
|
479
483
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
480
484
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
481
|
-
*/const FRGatherer$i=baseGatherer,emulation=emulation$3,pageFunctions$8=pageFunctions$h,FULL_PAGE_SCREENSHOT_QUALITY=30;function
|
|
485
|
+
*/const FRGatherer$i=baseGatherer,emulation=emulation$3,pageFunctions$8=pageFunctions$h,FULL_PAGE_SCREENSHOT_QUALITY=30;function kebabCaseToCamelCase(e){return e.replace(/(-\w)/g,(e=>e[1].toUpperCase()))}function getObservedDeviceMetrics(){const e=kebabCaseToCamelCase(window.screen.orientation.type);return{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,screenOrientation:{type:e,angle:window.screen.orientation.angle},deviceScaleFactor:window.devicePixelRatio}}class FullPageScreenshot$1 extends FRGatherer$i{meta={supportedModes:["snapshot","timespan","navigation"]};async getMaxScreenshotHeight(e){return await e.driver.executionContext.evaluate(pageFunctions$8.getMaxTextureSize,{args:[],useIsolation:!0,deps:[]})}async _takeScreenshot(e){const t=e.driver.defaultSession,r=await this.getMaxScreenshotHeight(e),n=await t.sendCommand("Page.getLayoutMetrics"),a=Math.min(n.layoutViewport.clientWidth,r),i=Math.min(n.contentSize.height,r)
|
|
482
486
|
;await t.sendCommand("Emulation.setDeviceMetricsOverride",{mobile:e.settings.screenEmulation.mobile,height:i,width:a,deviceScaleFactor:1,scale:1,screenOrientation:{angle:0,type:"portraitPrimary"}});return{data:"data:image/jpeg;base64,"+(await t.sendCommand("Page.captureScreenshot",{format:"jpeg",quality:FULL_PAGE_SCREENSHOT_QUALITY})).data,width:a,height:i}}async _resolveNodes(e){function resolveNodes(){const e={};if(!window.__lighthouseNodesDontTouchOrAllVarianceGoesAway)return e;const t=window.__lighthouseNodesDontTouchOrAllVarianceGoesAway;for(const[r,n]of t.entries()){const t=getBoundingClientRect(r);e[n]=t}return e}function resolveNodesInPage({useIsolation:t}){return e.driver.executionContext.evaluate(resolveNodes,{args:[],useIsolation:t,deps:[pageFunctions$8.getBoundingClientRectString]})}return{...await resolveNodesInPage({useIsolation:!1}),...await resolveNodesInPage({useIsolation:!0})}}async getArtifact(e){
|
|
483
|
-
const t=e.driver.defaultSession,r=e.driver.executionContext,n=e.settings;let a;const i=!n.screenEmulation.disabled;i||(a=await r.evaluate(getObservedDeviceMetrics,{args:[],useIsolation:!0,deps:[
|
|
487
|
+
const t=e.driver.defaultSession,r=e.driver.executionContext,n=e.settings;let a;const i=!n.screenEmulation.disabled;i||(a=await r.evaluate(getObservedDeviceMetrics,{args:[],useIsolation:!0,deps:[kebabCaseToCamelCase]}));try{return{screenshot:await this._takeScreenshot(e),nodes:await this._resolveNodes(e)}}finally{i?await emulation.emulate(t,n):a&&await t.sendCommand("Emulation.setDeviceMetricsOverride",{mobile:"mobile"===n.formFactor,...a})}}}var fullPageScreenshot$1=FullPageScreenshot$1;const FRGatherer$h=baseGatherer;class GlobalListeners extends FRGatherer$h{meta={supportedModes:["snapshot","timespan","navigation"]};static _filterForAllowlistedTypes(e){return"pagehide"===e.type||"unload"===e.type||"visibilitychange"===e.type}getListenerIndentifier(e){return`${e.type}:${e.scriptId}:${e.columnNumber}:${e.lineNumber}`}dedupeListeners(e){const t=new Set;return e.filter((e=>{const r=this.getListenerIndentifier(e);return!t.has(r)&&(t.add(r),!0)}))}async getArtifact(e){
|
|
484
488
|
const t=e.driver.defaultSession,{result:{objectId:r}}=await t.sendCommand("Runtime.evaluate",{expression:"window",returnByValue:!1});if(!r)throw new Error("Error fetching information about the global object");const{listeners:n}=await t.sendCommand("DOMDebugger.getEventListeners",{objectId:r}),a=n.filter(GlobalListeners._filterForAllowlistedTypes).map((e=>{const{type:t,scriptId:r,lineNumber:n,columnNumber:a}=e;return{type:t,scriptId:r,lineNumber:n,columnNumber:a}}));return this.dedupeListeners(a)}}var globalListeners=GlobalListeners;const FRGatherer$g=baseGatherer,pageFunctions$7=pageFunctions$h;function collectIFrameElements(){return getElementsInDocument("iframe").map((e=>{const t=e.getBoundingClientRect(),{top:r,bottom:n,left:a,right:i,width:o,height:l}=t;return{id:e.id,src:e.src,clientRect:{top:r,bottom:n,left:a,right:i,width:o,height:l},isPositionFixed:isPositionFixed(e),node:getNodeDetails(e)}}))}class IFrameElements extends FRGatherer$g{meta={
|
|
485
489
|
supportedModes:["snapshot","navigation"]};async getArtifact(e){const t=e.driver;return await t.executionContext.evaluate(collectIFrameElements,{args:[],useIsolation:!0,deps:[pageFunctions$7.getElementsInDocumentString,pageFunctions$7.isPositionFixedString,pageFunctions$7.getNodeDetailsString]})}}var iframeElements=IFrameElements,fontSize$1={exports:{}};const FRGatherer$f=baseGatherer,FONT_SIZE_PROPERTY_NAME="font-size",MINIMAL_LEGIBLE_FONT_SIZE_PX=12,MAX_NODES_SOURCE_RULE_FETCHED=50;function hasFontSizeDeclaration(e){return!!e&&!!e.cssProperties.find((({name:e})=>e===FONT_SIZE_PROPERTY_NAME))}function computeSelectorSpecificity(e){const t=e.split(" ");let r=0,n=0,a=0;for(const e of t){const t=e.match(/\b#[a-z0-9]+/g)||[],i=e.match(/\b\.[a-z0-9]+/g)||[],o=e.match(/^[a-z]+/)?[1]:[];r+=t.length,n+=i.length,a+=o.length}return 100*Math.min(9,r)+10*Math.min(9,n)+Math.min(9,a)}function findMostSpecificMatchedCSSRule(e=[],t){let r,n=-1/0
|
|
486
490
|
;for(const{rule:a,matchingSelectors:i}of e)if(t(a.style)){const e=i.map((e=>computeSelectorSpecificity(a.selectorList.selectors[e].text))),t=Math.max(...e);t>=n&&(n=t,r=a)}if(r)return{type:"Regular",...r.style,parentRule:{origin:r.origin,selectors:r.selectorList.selectors}}}function findInheritedCSSRule(e=[]){for(const{inlineStyle:t,matchedCSSRules:r}of e){if(hasFontSizeDeclaration(t))return{type:"Inline",...t};const e=findMostSpecificMatchedCSSRule(r,hasFontSizeDeclaration);if(e)return e}}function getEffectiveFontRule({attributesStyle:e,inlineStyle:t,matchedCSSRules:r,inherited:n}){if(hasFontSizeDeclaration(t))return{type:"Inline",...t};const a=findMostSpecificMatchedCSSRule(r,hasFontSizeDeclaration);if(a)return a;if(hasFontSizeDeclaration(e))return{type:"Attributes",...e};const i=findInheritedCSSRule(n);return i||void 0}function getTextLength(e){return e?Array.from(e.trim()).length:0}async function fetchSourceRule(e,t){
|
|
@@ -619,8 +623,8 @@ return this.compiledURLInternal}url(){return this.sourceMappingURL}sourceURLs(){
|
|
|
619
623
|
;let r=e.sourceRoot||"";r&&!r.endsWith("/")&&(r+="/");for(let n=0;n<e.sources.length;++n){let a=r+e.sources[n];const i=e.sourcesContent&&e.sourcesContent[n];this.compiledURLInternal,this.sourceInfos.set(a,new TextSourceMap.SourceInfo(i||null,null)),t.push(a)}i.set(e,t)}parseMap(e,t,r){let n=0,a=0,o=0,l=0;const c=i.get(e),u=e.names||[],p=new TextSourceMap.StringCharIterator(e.mappings);let f=c&&c[n];for(;;){if(","===p.peek())p.next();else{for(;";"===p.peek();)t+=1,r=0,p.next();if(!p.hasNext())break}if(r+=this.decodeVLQ(p),!p.hasNext()||this.isSeparator(p.peek())){this.mappings().push(new SourceMapEntry(t,r));continue}const e=this.decodeVLQ(p);e&&(n+=e,c&&(f=c[n])),a+=this.decodeVLQ(p),o+=this.decodeVLQ(p),p.hasNext()&&!this.isSeparator(p.peek())?(l+=this.decodeVLQ(p),this.mappings().push(new SourceMapEntry(t,r,f,a,o,u[l]))):this.mappings().push(new SourceMapEntry(t,r,f,a,o))}this.mappings().sort(SourceMapEntry.compare)}isSeparator(e){return","===e||";"===e}decodeVLQ(e){
|
|
620
624
|
let t=0,r=0,n=TextSourceMap._VLQ_CONTINUATION_MASK;for(;n&TextSourceMap._VLQ_CONTINUATION_MASK;)n=a.get(e.next())||0,t+=(n&TextSourceMap._VLQ_BASE_MASK)<<r,r+=TextSourceMap._VLQ_BASE_SHIFT;const i=1&t;return t>>=1,i?-t:t}reverseMapTextRange(e,t){function comparator(e,t){return e.lineNumber!==t.sourceLineNumber?e.lineNumber-t.sourceLineNumber:e.columnNumber-t.sourceColumnNumber}const n=this.reversedMappings(e);if(!n.length)return null;const a=r.ArrayUtilities.lowerBound(n,{lineNumber:t.startLine,columnNumber:t.startColumn},comparator),i=r.ArrayUtilities.upperBound(n,{lineNumber:t.endLine,columnNumber:t.endColumn},comparator),o=n[a],l=n[i];return new TextUtils.TextRange.TextRange(o.lineNumber,o.columnNumber,l.lineNumber,l.columnNumber)}mapsOrigin(){const e=this.mappings();if(e.length>0){const t=e[0];return 0===(null==t?void 0:t.lineNumber)||0===t.columnNumber}return!1}}t.TextSourceMap=TextSourceMap,function(e){e._VLQ_BASE_SHIFT=5,e._VLQ_BASE_MASK=31,e._VLQ_CONTINUATION_MASK=32
|
|
621
625
|
;e.StringCharIterator=class StringCharIterator{constructor(e){this.string=e,this.position=0}next(){return this.string.charAt(this.position++)}peek(){return this.string.charAt(this.position)}hasNext(){return this.position<this.string.length}};e.SourceInfo=class SourceInfo{constructor(e,t){this.content=e,this.reverseMappings=t}}}(TextSourceMap=t.TextSourceMap||(t.TextSourceMap={})),e.exports=TextSourceMap}(SourceMap,SourceMap.exports);const SDK$1={TextSourceMap:SourceMap.exports};SDK$1.TextSourceMap.prototype.computeLastGeneratedColumns=function(){const e=this.mappings();if(!e.length||void 0===e[0].lastColumnNumber)for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];r.lineNumber===n.lineNumber&&(r.lastColumnNumber=n.columnNumber)}};var SDK_1=SDK$1;const log$6=lighthouseLogger,makeComputedArtifact$x=computedArtifact,SDK=SDK_1;function computeGeneratedFileSizes(e,t){const r=t.split("\n"),n={},a=t.length;let i=a;e.computeLastGeneratedColumns();for(const t of e.mappings()){
|
|
622
|
-
const a=t.sourceURL,o=t.lineNumber,l=t.columnNumber,c=t.lastColumnNumber;if(!a)continue;const u=r[o];if(null==u){const t=`${e.url()} mapping for line out of bounds: ${o+1}`;return log$6.error("JSBundles",t),{errorMessage:t}}if(l>u.length){const t=`${e.url()} mapping for column out of bounds: ${o+1}:${l}`;return log$6.error("JSBundles",t),{errorMessage:t}}let p=0;if(void 0!==c){if(c>u.length){const t=`${e.url()} mapping for last column out of bounds: ${o+1}:${c}`;return log$6.error("JSBundles",t),{errorMessage:t}}p=c-l}else p=u.length-l+1;n[a]=(n[a]||0)+p,i-=p}return{files:n,unmappedBytes:i,totalBytes:a}}class JSBundles{static async compute_(e){const{SourceMaps:t,ScriptElements:r}=e,n=[];for(const e of t){if(!e.map)continue;const{scriptUrl:t,map:a}=e;if(!a.mappings)continue;const i=r.find((e=>e.src===t));if(!i)continue;const o=e.scriptUrl||"compiled.js",l=e.sourceMapUrl||"compiled.js.map",c=
|
|
623
|
-
sizes:computeGeneratedFileSizes(
|
|
626
|
+
const a=t.sourceURL,o=t.lineNumber,l=t.columnNumber,c=t.lastColumnNumber;if(!a)continue;const u=r[o];if(null==u){const t=`${e.url()} mapping for line out of bounds: ${o+1}`;return log$6.error("JSBundles",t),{errorMessage:t}}if(l>u.length){const t=`${e.url()} mapping for column out of bounds: ${o+1}:${l}`;return log$6.error("JSBundles",t),{errorMessage:t}}let p=0;if(void 0!==c){if(c>u.length){const t=`${e.url()} mapping for last column out of bounds: ${o+1}:${c}`;return log$6.error("JSBundles",t),{errorMessage:t}}p=c-l}else p=u.length-l+1;n[a]=(n[a]||0)+p,i-=p}return{files:n,unmappedBytes:i,totalBytes:a}}class JSBundles{static async compute_(e){const{SourceMaps:t,ScriptElements:r}=e,n=[];for(const e of t){if(!e.map)continue;const{scriptUrl:t,map:a}=e;if(!a.mappings)continue;const i=r.find((e=>e.src===t));if(!i)continue;const o=e.scriptUrl||"compiled.js",l=e.sourceMapUrl||"compiled.js.map",c=new SDK.TextSourceMap(o,l,a),u={rawMap:a,script:i,map:c,
|
|
627
|
+
sizes:computeGeneratedFileSizes(c,i&&i.content?i.content:"")};n.push(u)}return n}}var jsBundles=makeComputedArtifact$x(JSBundles);const makeComputedArtifact$w=computedArtifact,JsBundles$6=jsBundles,RELATIVE_SIZE_THRESHOLD=.1,ABSOLUTE_SIZE_THRESHOLD_BYTES=512;class ModuleDuplication$2{static normalizeSource(e){const t=(e=e.replace(/\?$/,"")).lastIndexOf("node_modules");return-1!==t&&(e=e.substring(t)),e}static _shouldIgnoreSource(e){return!!e.includes("webpack/bootstrap")||(!!e.includes("(webpack)/buildin")||!!e.includes("external "))}static _normalizeAggregatedData(e){for(const[t,r]of e.entries()){let n=r;if(n.sort(((e,t)=>t.resourceSize-e.resourceSize)),n.length>1){const e=n[0].resourceSize;n=n.filter((t=>t.resourceSize/e>=RELATIVE_SIZE_THRESHOLD))}n=n.filter((e=>e.resourceSize>=ABSOLUTE_SIZE_THRESHOLD_BYTES)),n.length>1?e.set(t,n):e.delete(t)}}static async compute_(e,t){const r=await JsBundles$6.request(e,t),n=new Map;for(const{rawMap:e,sizes:t}of r){if("errorMessage"in t)continue
|
|
624
628
|
;const r=[];n.set(e,r);for(let n=0;n<e.sources.length;n++){if(this._shouldIgnoreSource(e.sources[n]))continue;const a=(e.sourceRoot||"")+e.sources[n],i=t.files[a];r.push({source:ModuleDuplication$2.normalizeSource(e.sources[n]),resourceSize:i})}}const a=new Map;for(const{rawMap:e,script:t}of r){const r=n.get(e);if(r)for(const e of r){let r=a.get(e.source);r||(r=[],a.set(e.source,r)),r.push({scriptUrl:t.src||"",resourceSize:e.resourceSize})}}return this._normalizeAggregatedData(a),a}}var moduleDuplication=makeComputedArtifact$w(ModuleDuplication$2);const ByteEfficiencyAudit$d=byteEfficiencyAudit,ModuleDuplication$1=moduleDuplication,NetworkAnalyzer$4=networkAnalyzer,i18n$1O=i18n$2H,UIStrings$1N={title:"Remove duplicate modules in JavaScript bundles",description:"Remove large, duplicate JavaScript modules from bundles to reduce unnecessary bytes consumed by network activity. "
|
|
625
629
|
},str_$1N=i18n$1O.createMessageInstanceIdFn("lighthouse-core/audits/byte-efficiency/duplicated-javascript.js",UIStrings$1N),IGNORE_THRESHOLD_IN_BYTES$8=1024;function indexOfOrEnd(e,t,r=0){const n=e.indexOf(t,r);return-1===n?e.length:n}class DuplicatedJavascript extends ByteEfficiencyAudit$d{static get meta(){return{id:"duplicated-javascript",title:str_$1N(UIStrings$1N.title),description:str_$1N(UIStrings$1N.description),scoreDisplayMode:ByteEfficiencyAudit$d.SCORING_MODES.NUMERIC,requiredArtifacts:["devtoolsLogs","traces","SourceMaps","ScriptElements","GatherContext","URL"]}}static _getNodeModuleName(e){const t=e.split("node_modules/"),r=indexOfOrEnd(e=t[t.length-1],"/");return"@"===e[0]?e.slice(0,indexOfOrEnd(e,"/",r+1)):e.slice(0,r)}static async _getDuplicationGroupedByNodeModules(e,t){const r=await ModuleDuplication$1.request(e,t),n=new Map;for(const[e,t]of r.entries()){if(!e.includes("node_modules")){n.set(e,t);continue}
|
|
626
630
|
const r="node_modules/"+DuplicatedJavascript._getNodeModuleName(e),a=n.get(r)||[];for(const{scriptUrl:e,resourceSize:r}of t){let t=a.find((t=>t.scriptUrl===e));t||(t={scriptUrl:e,resourceSize:0},a.push(t)),t.resourceSize+=r}n.set(r,a)}for(const e of r.values())e.sort(((e,t)=>t.resourceSize-e.resourceSize));return n}static _estimateTransferRatio(e,t){return ByteEfficiencyAudit$d.estimateTransferSize(e,t,"Script")/t}static async audit_(e,t,r){const n=r.options&&r.options.ignoreThresholdInBytes||IGNORE_THRESHOLD_IN_BYTES$8,a=await DuplicatedJavascript._getDuplicationGroupedByNodeModules(e,r),i=NetworkAnalyzer$4.findOptionalMainDocument(t),o=new Map,l=[];let c=0;const u=new Set,p=new Map;for(const[r,f]of a.entries()){const a=[];let b=0;for(let r=0;r<f.length;r++){const n=f[r],l=n.scriptUrl;let c=o.get(l);if(void 0===c){const r=l===e.URL.finalUrl?i:t.find((e=>e.url===l)),n=e.ScriptElements.find((e=>e.src===l));if(!n||null===n.content)continue;const a=n.content.length
|
|
@@ -740,44 +744,43 @@ const t=e.map((e=>`(${e.expression})`)).join("|");this.re=new RegExp(`(^\r\n|\r|
|
|
|
740
744
|
return[["Array.prototype.fill","es6.array.fill"],["Array.prototype.filter","es6.array.filter"],["Array.prototype.find","es6.array.find"],["Array.prototype.findIndex","es6.array.find-index"],["Array.prototype.forEach","es6.array.for-each"],["Array.from","es6.array.from"],["Array.isArray","es6.array.is-array"],["Array.prototype.map","es6.array.map"],["Array.of","es6.array.of"],["Array.prototype.reduce","es6.array.reduce"],["Array.prototype.reduceRight","es6.array.reduce-right"],["Array.prototype.some","es6.array.some"],["Date.now","es6.date.now"],["Date.prototype.toISOString","es6.date.to-iso-string"],["Date.prototype.toJSON","es6.date.to-json"],["Date.prototype.toString","es6.date.to-string"],["Function.prototype.name","es6.function.name"],["Number.isInteger","es6.number.is-integer"],["Number.isSafeInteger","es6.number.is-safe-integer"],["Number.parseInt","es6.number.parse-int"],["Object.defineProperties","es6.object.define-properties"],["Object.defineProperty","es6.object.define-property"],["Object.freeze","es6.object.freeze"],["Object.getOwnPropertyNames","es6.object.get-own-property-names"],["Object.getPrototypeOf","es6.object.get-prototype-of"],["Object.isExtensible","es6.object.is-extensible"],["Object.isFrozen","es6.object.is-frozen"],["Object.isSealed","es6.object.is-sealed"],["Object.keys","es6.object.keys"],["Object.preventExtensions","es6.object.prevent-extensions"],["Object.seal","es6.object.seal"],["Object.setPrototypeOf","es6.object.set-prototype-of"],["Reflect.apply","es6.reflect.apply"],["Reflect.construct","es6.reflect.construct"],["Reflect.defineProperty","es6.reflect.define-property"],["Reflect.deleteProperty","es6.reflect.delete-property"],["Reflect.get","es6.reflect.get"],["Reflect.getOwnPropertyDescriptor","es6.reflect.get-own-property-descriptor"],["Reflect.getPrototypeOf","es6.reflect.get-prototype-of"],["Reflect.has","es6.reflect.has"],["Reflect.isExtensible","es6.reflect.is-extensible"],["Reflect.ownKeys","es6.reflect.own-keys"],["Reflect.preventExtensions","es6.reflect.prevent-extensions"],["Reflect.setPrototypeOf","es6.reflect.set-prototype-of"],["String.prototype.codePointAt","es6.string.code-point-at"],["String.fromCodePoint","es6.string.from-code-point"],["String.raw","es6.string.raw"],["String.prototype.repeat","es6.string.repeat"],["Array.prototype.includes","es7.array.includes"],["Object.entries","es7.object.entries"],["Object.getOwnPropertyDescriptors","es7.object.get-own-property-descriptors"],["Object.values","es7.object.values"]].map((e=>{
|
|
741
745
|
const[t,r]=e;return{name:t,coreJs2Module:r,coreJs3Module:r.replace("es6.","es.").replace("es7.","es.").replace("typed.","typed-array.")}}))}static getPolyfillPatterns(){return this.getPolyfillData().map((({name:e})=>{const t=e.split("."),r=t.length>1?t.slice(0,t.length-1).join("."):null,n=t[t.length-1];return{name:e,expression:this.buildPolyfillExpression(r,n)}}))}static getTransformPatterns(){return[{name:"@babel/plugin-transform-classes",expression:"Cannot call a class as a function",estimateBytes:e=>150+e.count*"_classCallCheck()".length},{name:"@babel/plugin-transform-regenerator",expression:/regeneratorRuntime\.a?wrap/.source,estimateBytes:e=>80*e.count},{name:"@babel/plugin-transform-spread",expression:/\.apply\(void 0,\s?_toConsumableArray/.source,estimateBytes:e=>1169+e.count*"_toConsumableArray()".length}]}static detectAcrossScripts(e,t,r,n){const a=new Map,i=this.getPolyfillData();for(const{requestId:o,content:l}of Object.values(t)){if(!l)continue
|
|
742
746
|
;const t=r.find((e=>e.requestId===o));if(!t)continue;const c=e.match(l),u=n.find((e=>e.script.src===t.url));if(u)for(const{coreJs2Module:e,coreJs3Module:t,name:r}of i){if(c.some((e=>e.name===r)))continue;const n=u.rawMap.sources.find((r=>r.endsWith(`${e}.js`)||r.endsWith(`${t}.js`)));if(!n)continue;const a=u.map.mappings().find((e=>e.sourceURL===n));a?c.push({name:r,line:a.lineNumber,column:a.columnNumber,count:1}):c.push({name:r,line:0,column:0,count:1})}c.length&&a.set(t.url,c)}return a}static estimateWastedBytes(e){const t=e.filter((e=>!e.name.startsWith("@"))),r=e.filter((e=>e.name.startsWith("@")));let n=0;const a=require$$5,i=new Set;for(const e of t){const t=a.dependencies[e.name];if(t)for(const e of t)i.add(e)}t.length>0&&(n+=a.baseSize),n+=[...i].reduce(((e,t)=>e+a.moduleSizes[t]),0),n=Math.min(n,a.maxSize);let o=0;for(const e of r){const t=this.getTransformPatterns().find((t=>t.name===e.name));t&&t.estimateBytes&&(o+=t.estimateBytes(e))}return n+o}
|
|
743
|
-
static async estimateTransferRatioForScript(e,r,n,a){let o=e.get(r);if(void 0!==o)return o;const l=i.findOptionalMainDocument(a),c=r===n.URL.finalUrl?l:a.find((e=>e.url===r)),u=n.ScriptElements.find((e=>e.src===r));if(u&&null!==u.content){const e=u.content.length;o=t.estimateTransferSize(c,e,"Script")/e}else o=1;return e.set(r,o),o}static
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
if(
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
;
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
;
|
|
771
|
-
},
|
|
772
|
-
unusedCssRules.exports.UIStrings=UIStrings$1F;var unusedJavascript={exports:{}};
|
|
747
|
+
static async estimateTransferRatioForScript(e,r,n,a){let o=e.get(r);if(void 0!==o)return o;const l=i.findOptionalMainDocument(a),c=r===n.URL.finalUrl?l:a.find((e=>e.url===r)),u=n.ScriptElements.find((e=>e.src===r));if(u&&null!==u.content){const e=u.content.length;o=t.estimateTransferSize(c,e,"Script")/e}else o=1;return e.set(r,o),o}static async audit_(e,i,o){const c=a.getEntity(e.URL.finalUrl),u=await r.request(e,o),p=[],f=new CodePatternMatcher([...this.getPolyfillPatterns(),...this.getTransformPatterns()]),b=new Map,S=this.detectAcrossScripts(f,e.ScriptElements,i,u);for(const[r,n]of S.entries()){const a=await this.estimateTransferRatioForScript(b,r,e,i),o=Math.round(this.estimateWastedBytes(n)*a),l={url:r,wastedBytes:o,subItems:{type:"subitems",items:[]},totalBytes:0},c=u.find((e=>e.script.src===r));for(const e of n){const{name:n,line:a,column:i}=e,o={signal:n,location:t.makeSourceLocation(r,a,i,c)};l.subItems.items.push(o)}p.push(l)}const _=new Map
|
|
748
|
+
;for(const e of p)a.isFirstParty(e.url,c)&&_.set(e.url,e.wastedBytes);return{items:p,headings:[{key:"url",valueType:"url",subItemsHeading:{key:"location",valueType:"source-location"},label:l(n.UIStrings.columnURL)},{key:null,valueType:"code",subItemsHeading:{key:"signal"},label:""},{key:"wastedBytes",valueType:"bytes",label:l(n.UIStrings.columnWastedBytes)}],wastedBytesByUrl:_}}},e.exports.UIStrings=o}(legacyJavascript);var modernImageFormats={exports:{}};const ByteEfficiencyAudit$b=byteEfficiencyAudit,URL$B=urlShim,i18n$1M=i18n$2H,UIStrings$1L={title:"Serve images in next-gen formats",description:"Image formats like WebP and AVIF often provide better compression than PNG or JPEG, which means faster downloads and less data consumption. [Learn more](https://web.dev/uses-webp-images/)."},str_$1L=i18n$1M.createMessageInstanceIdFn("lighthouse-core/audits/byte-efficiency/modern-image-formats.js",UIStrings$1L),IGNORE_THRESHOLD_IN_BYTES$7=8192
|
|
749
|
+
;class ModernImageFormats extends ByteEfficiencyAudit$b{static get meta(){return{id:"modern-image-formats",title:str_$1L(UIStrings$1L.title),description:str_$1L(UIStrings$1L.description),scoreDisplayMode:ByteEfficiencyAudit$b.SCORING_MODES.NUMERIC,requiredArtifacts:["OptimizedImages","devtoolsLogs","traces","URL","GatherContext","ImageElements"]}}static estimateWebPSizeFromDimensions(e){const t=e.naturalWidth*e.naturalHeight;return Math.round(.2*t)}static estimateAvifSizeFromDimensions(e){const t=e.naturalWidth*e.naturalHeight;return Math.round(t*(2/12))}static estimateAvifSizeFromWebPAndJpegEstimates(e){if(!e.jpegSize||!e.webpSize)return;return 5*e.jpegSize/10/2+8*e.webpSize/10/2}static audit_(e){const t=e.URL.finalUrl,r=e.OptimizedImages,n=e.ImageElements,a=new Map;n.forEach((e=>a.set(e.src,e)));const i=[],o=[];for(const e of r){const r=a.get(e.url);if(e.failed){o.push(`Unable to decode ${URL$B.getURLDisplayName(e.url)}`);continue}
|
|
750
|
+
if("image/webp"===e.mimeType||"image/avif"===e.mimeType)continue;const n=e.jpegSize;let l=e.webpSize,c=ModernImageFormats.estimateAvifSizeFromWebPAndJpegEstimates({jpegSize:n,webpSize:l}),u=!0;if(void 0===l){if(!r){o.push(`Unable to locate resource ${URL$B.getURLDisplayName(e.url)}`);continue}if(!r.naturalDimensions)continue;const t=r.naturalDimensions.height,n=r.naturalDimensions.width;if(!n||!t)continue;l=ModernImageFormats.estimateWebPSizeFromDimensions({naturalHeight:t,naturalWidth:n}),c=ModernImageFormats.estimateAvifSizeFromDimensions({naturalHeight:t,naturalWidth:n}),u=!1}if(void 0===l||void 0===c)continue;const p=e.originalSize-l,f=e.originalSize-c;if(f<IGNORE_THRESHOLD_IN_BYTES$7)continue;const b=URL$B.elideDataURI(e.url),S=!URL$B.originsMatch(t,e.url);i.push({node:r?ByteEfficiencyAudit$b.makeNodeItem(r.node):void 0,url:b,fromProtocol:u,isCrossOrigin:S,totalBytes:e.originalSize,wastedBytes:f,wastedWebpBytes:p})}return{warnings:o,items:i,headings:[{key:"node",valueType:"node",
|
|
751
|
+
label:""},{key:"url",valueType:"url",label:str_$1L(i18n$1M.UIStrings.columnURL)},{key:"totalBytes",valueType:"bytes",label:str_$1L(i18n$1M.UIStrings.columnResourceSize)},{key:"wastedBytes",valueType:"bytes",label:str_$1L(i18n$1M.UIStrings.columnWastedBytes)}]}}}modernImageFormats.exports=ModernImageFormats,modernImageFormats.exports.UIStrings=UIStrings$1L;var offscreenImages={exports:{}};const TracingProcessor$2=traceProcessor,ProcessedTrace$a=processedTrace,ProcessedNavigation$4=processedNavigation,NetworkRecords$y=networkRecords;class Metric$1{constructor(){}static getMetricComputationInput(e){return{trace:e.trace,devtoolsLog:e.devtoolsLog,gatherContext:e.gatherContext,settings:e.settings}}static computeSimulatedMetric(e,t){throw new Error("Unimplemented")}static computeObservedMetric(e,t){throw new Error("Unimplemented")}static async compute_(e,t){const r=e.gatherContext||{gatherMode:"navigation"},{trace:n,devtoolsLog:a,settings:i}=e
|
|
752
|
+
;if(!n||!a||!i)throw new Error("Did not provide necessary metric computation data");const o=await ProcessedTrace$a.request(n,t),l="timespan"===r.gatherMode?void 0:await ProcessedNavigation$4.request(o,t),c=Object.assign({networkRecords:await NetworkRecords$y.request(a,t),gatherContext:r,processedTrace:o,processedNavigation:l},e);switch(TracingProcessor$2.assertHasToplevelEvents(c.processedTrace.mainThreadEvents),i.throttlingMethod){case"simulate":if("navigation"!==r.gatherMode)throw new Error(`${r.gatherMode} does not support throttlingMethod simulate`);return this.computeSimulatedMetric(c,t);case"provided":case"devtools":return this.computeObservedMetric(c,t);default:throw new TypeError(`Unrecognized throttling method: ${i.throttlingMethod}`)}}}var metric=Metric$1;const Metric=metric;class NavigationMetric$8 extends Metric{static computeSimulatedMetric(e,t){throw new Error("Unimplemented")}static computeObservedMetric(e,t){throw new Error("Unimplemented")}static async compute_(e,t){
|
|
753
|
+
if("navigation"!==e.gatherContext.gatherMode)throw new Error(`${this.name} can only be computed on navigations`);return super.compute_(e,t)}}var navigationMetric=NavigationMetric$8;const makeComputedArtifact$v=computedArtifact,NavigationMetric$7=navigationMetric,LanternInteractive$3=lanternInteractive,NetworkMonitor=networkMonitor,TracingProcessor$1=traceProcessor,LHError$9=lhError.exports,REQUIRED_QUIET_WINDOW=5e3,ALLOWED_CONCURRENT_REQUESTS=2;class Interactive$4 extends NavigationMetric$7{static _findNetworkQuietPeriods(e,t){const r=t.timestamps.traceEnd/1e3,n=e.filter((e=>e.finished&&"GET"===e.requestMethod&&!e.failed&&e.statusCode<400));return NetworkMonitor.findNetworkQuietPeriods(n,ALLOWED_CONCURRENT_REQUESTS,r)}static _findCPUQuietPeriods(e,t){const r=t.timestamps.timeOrigin/1e3,n=t.timestamps.traceEnd/1e3;if(0===e.length)return[{start:0,end:n}];const a=[];return e.forEach(((t,i)=>{0===i&&a.push({start:0,end:t.start+r}),i===e.length-1?a.push({start:t.end+r,end:n}):a.push({
|
|
754
|
+
start:t.end+r,end:e[i+1].start+r})})),a}static findOverlappingQuietPeriods(e,t,r){const n=r.timestamps.firstContentfulPaint/1e3,isLongEnoughQuietPeriod=e=>e.end>n+REQUIRED_QUIET_WINDOW&&e.end-e.start>=REQUIRED_QUIET_WINDOW,a=this._findNetworkQuietPeriods(t,r).filter(isLongEnoughQuietPeriod),i=this._findCPUQuietPeriods(e,r).filter(isLongEnoughQuietPeriod),o=i.slice(),l=a.slice();let c=o.shift(),u=l.shift();for(;c&&u;)if(c.start>=u.start){if(u.end>=c.start+REQUIRED_QUIET_WINDOW)return{cpuQuietPeriod:c,networkQuietPeriod:u,cpuQuietPeriods:i,networkQuietPeriods:a};u=l.shift()}else{if(c.end>=u.start+REQUIRED_QUIET_WINDOW)return{cpuQuietPeriod:c,networkQuietPeriod:u,cpuQuietPeriods:i,networkQuietPeriods:a};c=o.shift()}throw new LHError$9(c?LHError$9.errors.NO_TTI_NETWORK_IDLE_PERIOD:LHError$9.errors.NO_TTI_CPU_IDLE_PERIOD)}static computeSimulatedMetric(e,t){const r=NavigationMetric$7.getMetricComputationInput(e);return LanternInteractive$3.request(r,t)}static computeObservedMetric(e){
|
|
755
|
+
const{processedTrace:t,processedNavigation:r,networkRecords:n}=e;if(!r.timestamps.domContentLoaded)throw new LHError$9(LHError$9.errors.NO_DCL);const a=TracingProcessor$1.getMainThreadTopLevelEvents(t).filter((e=>e.duration>=50)),i=Interactive$4.findOverlappingQuietPeriods(a,n,r).cpuQuietPeriod,o=1e3*Math.max(i.start,r.timestamps.firstContentfulPaint/1e3,r.timestamps.domContentLoaded/1e3),l=(o-r.timestamps.timeOrigin)/1e3;return Promise.resolve({timing:l,timestamp:o})}}var interactive$1=makeComputedArtifact$v(Interactive$4);const ByteEfficiencyAudit$a=byteEfficiencyAudit,NetworkRequest$b=networkRequest,Sentry$2=sentry,URL$A=urlShim,i18n$1L=i18n$2H,Interactive$3=interactive$1,ProcessedTrace$9=processedTrace,UIStrings$1K={title:"Defer offscreen images",description:"Consider lazy-loading offscreen and hidden images after all critical resources have finished loading to lower time to interactive. [Learn more](https://web.dev/offscreen-images/)."
|
|
756
|
+
},str_$1K=i18n$1L.createMessageInstanceIdFn("lighthouse-core/audits/byte-efficiency/offscreen-images.js",UIStrings$1K),ALLOWABLE_OFFSCREEN_IN_PX=100,ALLOWABLE_OFFSCREEN_BOTTOM_IN_VIEWPORTS=3,IGNORE_THRESHOLD_IN_BYTES$6=2048,IGNORE_THRESHOLD_IN_PERCENT$4=75,IGNORE_THRESHOLD_IN_MS$1=50;class OffscreenImages extends ByteEfficiencyAudit$a{static get meta(){return{id:"offscreen-images",title:str_$1K(UIStrings$1K.title),description:str_$1K(UIStrings$1K.description),scoreDisplayMode:ByteEfficiencyAudit$a.SCORING_MODES.NUMERIC,supportedModes:["navigation"],requiredArtifacts:["ImageElements","ViewportDimensions","GatherContext","devtoolsLogs","traces"]}}static computeVisiblePixels(e,t){const r=t.innerWidth,n=t.innerHeight,a=ALLOWABLE_OFFSCREEN_BOTTOM_IN_VIEWPORTS*t.innerHeight,i=Math.max(e.top,-1*ALLOWABLE_OFFSCREEN_IN_PX),o=Math.min(e.right,r+ALLOWABLE_OFFSCREEN_IN_PX),l=Math.min(e.bottom,n+a),c=Math.max(e.left,-1*ALLOWABLE_OFFSCREEN_IN_PX);return Math.max(o-c,0)*Math.max(l-i,0)}
|
|
757
|
+
static computeWaste(e,t,r){const n=r.find((t=>t.url===e.src));if(!n)return null;if("lazy"===e.loading||"eager"===e.loading)return null;const a=URL$A.elideDataURI(e.src),i=e.displayedWidth*e.displayedHeight,o=this.computeVisiblePixels(e.clientRect,t),l=0===i?1:1-o/i,c=NetworkRequest$b.getResourceSizeOnNetwork(n),u=Math.round(c*l);return Number.isFinite(l)?{node:ByteEfficiencyAudit$a.makeNodeItem(e.node),url:a,requestStartTime:n.startTime,totalBytes:c,wastedBytes:u,wastedPercent:100*l}:new Error(`Invalid image sizing information ${a}`)}static filterLanternResults(e,t){const r=t.pessimisticEstimate.nodeTimings;let n=0;const a=new Map;for(const[e,t]of r)"cpu"===e.type&&t.duration>=50?n=Math.max(n,t.startTime):"network"===e.type&&a.set(e.record.url,t.startTime);return e.filter((e=>{if(e.wastedBytes<IGNORE_THRESHOLD_IN_BYTES$6)return!1;if(e.wastedPercent<IGNORE_THRESHOLD_IN_PERCENT$4)return!1;return(a.get(e.url)||0)<n-IGNORE_THRESHOLD_IN_MS$1}))}static filterObservedResults(e,t){
|
|
758
|
+
return e.filter((e=>!(e.wastedBytes<IGNORE_THRESHOLD_IN_BYTES$6)&&(!(e.wastedPercent<IGNORE_THRESHOLD_IN_PERCENT$4)&&e.requestStartTime<t/1e6-IGNORE_THRESHOLD_IN_MS$1/1e3)))}static computeWasteWithTTIGraph(e,t,r){return super.computeWasteWithTTIGraph(e,t,r,{includeLoad:!1})}static async audit_(e,t,r){const n=e.ImageElements,a=e.ViewportDimensions,i=e.GatherContext,o=e.traces[ByteEfficiencyAudit$a.DEFAULT_PASS],l=e.devtoolsLogs[ByteEfficiencyAudit$a.DEFAULT_PASS],c=[],u=new Map;for(const e of n){const r=OffscreenImages.computeWaste(e,a,t);if(null===r)continue;if(r instanceof Error){c.push(r.message),Sentry$2.captureException(r,{tags:{audit:this.meta.id},level:"warning"});continue}const n=u.get(r.url);(!n||n.wastedBytes>r.wastedBytes)&&u.set(r.url,r)}const p=r.settings;let f;const b=Array.from(u.values());try{const e={trace:o,devtoolsLog:l,gatherContext:i,settings:p},t=await Interactive$3.request(e,r),n=t
|
|
759
|
+
;f="simulate"===r.settings.throttlingMethod?OffscreenImages.filterLanternResults(b,n):OffscreenImages.filterObservedResults(b,t.timestamp)}catch(e){if("simulate"===r.settings.throttlingMethod)throw e;f=OffscreenImages.filterObservedResults(b,await ProcessedTrace$9.request(o,r).then((e=>e.timestamps.traceEnd)))}return{warnings:c,items:f,headings:[{key:"node",valueType:"node",label:""},{key:"url",valueType:"url",label:str_$1K(i18n$1L.UIStrings.columnURL)},{key:"totalBytes",valueType:"bytes",label:str_$1K(i18n$1L.UIStrings.columnResourceSize)},{key:"wastedBytes",valueType:"bytes",label:str_$1K(i18n$1L.UIStrings.columnWastedBytes)}]}}}offscreenImages.exports=OffscreenImages,offscreenImages.exports.UIStrings=UIStrings$1K;var renderBlockingResources={exports:{}};const makeComputedArtifact$u=computedArtifact,ByteEfficiencyAudit$9=byteEfficiencyAudit,NetworkRecords$x=networkRecords,PREVIEW_LENGTH=100;class UnusedCSS$3{static indexStylesheetsById(e,t){
|
|
760
|
+
const r=t.filter((e=>e.resourceSize>0)).reduce(((e,t)=>(e[t.url]=t,e)),{});return e.reduce(((e,t)=>(e[t.header.styleSheetId]=Object.assign({usedRules:[],networkRecord:r[t.header.sourceURL]},t),e)),{})}static indexUsedRules(e,t){e.forEach((e=>{const r=t[e.styleSheetId];r&&e.used&&r.usedRules.push(e)}))}static computeUsage(e){let t=0;const r=e.content.length;for(const r of e.usedRules)t+=r.endOffset-r.startOffset;const n=ByteEfficiencyAudit$9.estimateTransferSize(e.networkRecord,r,"Stylesheet"),a=(r-t)/r;return{wastedBytes:Math.round(a*n),wastedPercent:100*a,totalBytes:n}}static determineContentPreview(e){let t=(e||"").slice(0,5*PREVIEW_LENGTH).replace(/( {2,}|\t)+/g," ").replace(/\n\s+}/g,"\n}").trim();if(t.length>PREVIEW_LENGTH){const e=t.indexOf("{"),r=t.indexOf("}");if(-1===e||-1===r||e>r||e>PREVIEW_LENGTH)t=t.slice(0,PREVIEW_LENGTH)+"...";else if(r<PREVIEW_LENGTH)t=t.slice(0,r+1)+" ...";else{const r=t.slice(0,PREVIEW_LENGTH).lastIndexOf(";")
|
|
761
|
+
;t=r<e?t.slice(0,PREVIEW_LENGTH)+"... } ...":t.slice(0,r+1)+" ... } ..."}}return t}static mapSheetToResult(e,t){let r=e.header.sourceURL;if(!r||r===t){r=UnusedCSS$3.determineContentPreview(e.content)}return{url:r,...UnusedCSS$3.computeUsage(e)}}static async compute_(e,t){const{CSSUsage:r,URL:n,devtoolsLog:a}=e,i=await NetworkRecords$x.request(a,t),o=UnusedCSS$3.indexStylesheetsById(r.stylesheets,i);UnusedCSS$3.indexUsedRules(r.rules,o);return Object.keys(o).map((e=>UnusedCSS$3.mapSheetToResult(o[e],n.finalUrl)))}}var unusedCss=makeComputedArtifact$u(UnusedCSS$3);const makeComputedArtifact$t=computedArtifact,NavigationMetric$6=navigationMetric,LanternFirstContentfulPaint$4=lanternFirstContentfulPaint;class FirstContentfulPaint$3 extends NavigationMetric$6{static computeSimulatedMetric(e,t){const r=NavigationMetric$6.getMetricComputationInput(e);return LanternFirstContentfulPaint$4.request(r,t)}static async computeObservedMetric(e){const{processedNavigation:t}=e;return{
|
|
762
|
+
timing:t.timings.firstContentfulPaint,timestamp:t.timestamps.firstContentfulPaint}}}var firstContentfulPaint$1=makeComputedArtifact$t(FirstContentfulPaint$3);const Audit$1C=audit,i18n$1K=i18n$2H,BaseNode$6=baseNode,ByteEfficiencyAudit$8=byteEfficiencyAudit,UnusedCSS$2=unusedCss,NetworkRequest$a=networkRequest,ProcessedTrace$8=processedTrace,ProcessedNavigation$3=processedNavigation,LoadSimulator$7=loadSimulator,FirstContentfulPaint$2=firstContentfulPaint$1,MINIMUM_WASTED_MS=50,UIStrings$1J={title:"Eliminate render-blocking resources",description:"Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles. [Learn more](https://web.dev/render-blocking-resources/)."},str_$1J=i18n$1K.createMessageInstanceIdFn("lighthouse-core/audits/byte-efficiency/render-blocking-resources.js",UIStrings$1J);function getNodesAndTimingByUrl(e){const t={};return Array.from(e.keys()).forEach((r=>{if("network"!==r.type)return
|
|
763
|
+
;const n=e.get(r);n&&(t[r.record.url]={node:r,nodeTiming:n})})),t}function adjustNodeTimings(e,t,r){const n=e.get(t);if(!n)return;const a=computeStackSpecificTiming(t,n,r);n.duration-a.duration&&(t.traverse((t=>{e.delete(t)})),e.set(t,a))}function computeStackSpecificTiming(e,t,r){const n={...t};return r.some((e=>"amp"===e.id))&&e.type===BaseNode$6.TYPES.NETWORK&&e.record.resourceType===NetworkRequest$a.TYPES.Stylesheet&&t.endTime>2100&&(n.endTime=Math.max(t.startTime,2100),n.duration=n.endTime-n.startTime),n}class RenderBlockingResources extends Audit$1C{static get meta(){return{id:"render-blocking-resources",title:str_$1J(UIStrings$1J.title),supportedModes:["navigation"],scoreDisplayMode:Audit$1C.SCORING_MODES.NUMERIC,description:str_$1J(UIStrings$1J.description),requiredArtifacts:["URL","TagsBlockingFirstPaint","traces","devtoolsLogs","CSSUsage","GatherContext","Stacks"]}}static async computeResults(e,t){
|
|
764
|
+
const r=e.GatherContext,n=e.traces[Audit$1C.DEFAULT_PASS],a=e.devtoolsLogs[Audit$1C.DEFAULT_PASS],i={devtoolsLog:a,settings:t.settings},o=await ProcessedTrace$8.request(n,t),l=await ProcessedNavigation$3.request(o,t),c=await LoadSimulator$7.request(i,t),u=await RenderBlockingResources.computeWastedCSSBytes(e,t),p={trace:n,devtoolsLog:a,gatherContext:r,simulator:c,settings:{...t.settings,throttlingMethod:"simulate"}},f=await FirstContentfulPaint$2.request(p,t),b=l.timestamps.firstContentfulPaint/1e3,S=getNodesAndTimingByUrl(f.optimisticEstimate.nodeTimings),_=[],T=new Set;for(const t of e.TagsBlockingFirstPaint){if(1e3*t.endTime>b)continue;if(!S[t.tag.url])continue;const{node:r,nodeTiming:n}=S[t.tag.url],a=computeStackSpecificTiming(r,n,e.Stacks);r.traverse((e=>T.add(e.id)));const i=Math.round(a.duration);i<MINIMUM_WASTED_MS||_.push({url:t.tag.url,totalBytes:t.transferSize,wastedMs:i})}if(!_.length)return{results:_,wastedMs:0};return{results:_,
|
|
765
|
+
wastedMs:RenderBlockingResources.estimateSavingsWithGraphs(c,f.optimisticGraph,T,u,e.Stacks)}}static estimateSavingsWithGraphs(e,t,r,n,a){const{nodeTimings:i}=e.simulate(t),o=new Map(i);let l=0;const c=t.cloneWithRelationships((e=>{adjustNodeTimings(o,e,a);const t=r.has(e.id);if(e.type!==BaseNode$6.TYPES.NETWORK)return!t;const i=e.record.resourceType===NetworkRequest$a.TYPES.Stylesheet;if(t&&i){const t=n.get(e.record.url)||0;l+=(e.record.transferSize||0)-t}return!t}));if("network"!==c.type)throw new Error("minimalFCPGraph not a NetworkNode");const u=Math.max(...Array.from(Array.from(o).map((e=>e[1].endTime)))),p=c.record.transferSize,f=p||0;c.record.transferSize=f+l;const b=e.simulate(c).timeInMs;return c.record.transferSize=p,Math.round(Math.max(u-b,0))}static async computeWastedCSSBytes(e,t){const r=new Map;try{const n=await UnusedCSS$2.request({CSSUsage:e.CSSUsage,URL:e.URL,devtoolsLog:e.devtoolsLogs[Audit$1C.DEFAULT_PASS]},t);for(const e of n)r.set(e.url,e.wastedBytes)}catch(e){}
|
|
766
|
+
return r}static async audit(e,t){const{results:r,wastedMs:n}=await RenderBlockingResources.computeResults(e,t);let a;r.length>0&&(a=str_$1J(i18n$1K.UIStrings.displayValueMsSavings,{wastedMs:n}));const i=[{key:"url",valueType:"url",label:str_$1J(i18n$1K.UIStrings.columnURL)},{key:"totalBytes",valueType:"bytes",label:str_$1J(i18n$1K.UIStrings.columnTransferSize)},{key:"wastedMs",valueType:"timespanMs",label:str_$1J(i18n$1K.UIStrings.columnWastedMs)}],o=Audit$1C.makeOpportunityDetails(i,r,n);return{displayValue:a,score:ByteEfficiencyAudit$8.scoreForWastedMs(n),numericValue:n,numericUnit:"millisecond",details:o}}}renderBlockingResources.exports=RenderBlockingResources,renderBlockingResources.exports.UIStrings=UIStrings$1J;var totalByteWeight={exports:{}};const Audit$1B=audit,i18n$1J=i18n$2H,NetworkRequest$9=networkRequest,NetworkRecords$w=networkRecords,UIStrings$1I={title:"Avoids enormous network payloads",failureTitle:"Avoid enormous network payloads",
|
|
767
|
+
description:"Large network payloads cost users real money and are highly correlated with long load times. [Learn more](https://web.dev/total-byte-weight/).",displayValue:"Total size was {totalBytes, number, bytes} KiB"},str_$1I=i18n$1J.createMessageInstanceIdFn("lighthouse-core/audits/byte-efficiency/total-byte-weight.js",UIStrings$1I);class TotalByteWeight extends Audit$1B{static get meta(){return{id:"total-byte-weight",title:str_$1I(UIStrings$1I.title),failureTitle:str_$1I(UIStrings$1I.failureTitle),description:str_$1I(UIStrings$1I.description),scoreDisplayMode:Audit$1B.SCORING_MODES.NUMERIC,requiredArtifacts:["devtoolsLogs"]}}static get defaultOptions(){return{p10:2731008,median:4096e3}}static async audit(e,t){const r=e.devtoolsLogs[Audit$1B.DEFAULT_PASS],n=await NetworkRecords$w.request(r,t);let a=0,i=[];n.forEach((e=>{if(NetworkRequest$9.isNonNetworkRequest(e)||!e.transferSize)return;const t={url:e.url,totalBytes:e.transferSize};a+=t.totalBytes,i.push(t)})),
|
|
768
|
+
i=i.sort(((e,t)=>t.totalBytes-e.totalBytes||e.url.localeCompare(t.url))).slice(0,10);const o=Audit$1B.computeLogNormalScore({p10:t.options.p10,median:t.options.median},a),l=[{key:"url",itemType:"url",text:str_$1I(i18n$1J.UIStrings.columnURL)},{key:"totalBytes",itemType:"bytes",text:str_$1I(i18n$1J.UIStrings.columnTransferSize)}],c=Audit$1B.makeTableDetails(l,i);return{score:o,numericValue:a,numericUnit:"byte",displayValue:str_$1I(UIStrings$1I.displayValue,{totalBytes:a}),details:c}}}totalByteWeight.exports=TotalByteWeight,totalByteWeight.exports.UIStrings=UIStrings$1I;var unminifiedCss={exports:{}};const PUNCTUATOR_REGEX=/(return|case|{|\(|\[|\.\.\.|;|,|<|>|<=|>=|==|!=|===|!==|\+|-|\*|%|\*\*|\+\+|--|<<|>>|>>>|&|\||\^|!|~|&&|\|\||\?|:|=|\+=|-=|\*=|%=|\*\*=|<<=|>>=|>>>=|&=|\|=|\^=|=>|\/|\/=|\})$/,WHITESPACE_REGEX=/( |\n|\t)+$/;function hasPunctuatorBefore(e,t){for(let r=t;r>0;r--){const t=Math.max(0,r-6),n=e.slice(t,r);if(!WHITESPACE_REGEX.test(n))return PUNCTUATOR_REGEX.test(n)}return!0
|
|
769
|
+
}function computeTokenLength$2(e,t){let r=0,n=!1,a=!1,i=!1,o=!1,l=!1,c=!1,u=null;const p=[];for(let f=0;f<e.length;f++){const b=e.substr(f,2),S=b.charAt(0),_=" "===S||"\n"===S||"\t"===S,T="'"===S||'"'===S||"`"===S;n?"\n"===S&&(n=!1):a?(i&&r++,"*/"===b&&(i&&r++,a=!1,f++)):o?(r++,"`"===u&&"${"===b?(p.push("templateBrace"),o=!1,r++,f++):"\\"===S?(r++,f++):S===u&&(o=!1)):l?(r++,"\\"===S?(r++,f++):"["===S?c=!0:"]"===S&&c?c=!1:"/"!==S||c||(l=!1)):"/*"===b?(a=!0,i="!"===e.charAt(f+2),i&&(r+=2),f++):"//"===b&&t.singlelineComments?(n=!0,a=!1,i=!1,f++):"/"===S&&t.regex&&hasPunctuatorBefore(e,f)?(l=!0,r++):"{"===S&&p.length?(p.push("normalBrace"),r++):"}"===S&&p.length?("templateBrace"===p[p.length-1]&&(o=!0,u="`"),p.pop(),r++):T?(o=!0,u=S,r++):_||r++}return a||o?e.length:r}function computeJSTokenLength(e){return computeTokenLength$2(e,{singlelineComments:!0,regex:!0})}function computeCSSTokenLength(e){return computeTokenLength$2(e,{singlelineComments:!1,regex:!1})}var minificationEstimator={
|
|
770
|
+
computeJSTokenLength,computeCSSTokenLength};const ByteEfficiencyAudit$7=byteEfficiencyAudit,UnusedCSS$1=unusedCss,i18n$1I=i18n$2H,computeTokenLength$1=minificationEstimator.computeCSSTokenLength,UIStrings$1H={title:"Minify CSS",description:"Minifying CSS files can reduce network payload sizes. [Learn more](https://web.dev/unminified-css/)."},str_$1H=i18n$1I.createMessageInstanceIdFn("lighthouse-core/audits/byte-efficiency/unminified-css.js",UIStrings$1H),IGNORE_THRESHOLD_IN_PERCENT$3=5,IGNORE_THRESHOLD_IN_BYTES$5=2048;class UnminifiedCSS extends ByteEfficiencyAudit$7{static get meta(){return{id:"unminified-css",title:str_$1H(UIStrings$1H.title),description:str_$1H(UIStrings$1H.description),scoreDisplayMode:ByteEfficiencyAudit$7.SCORING_MODES.NUMERIC,requiredArtifacts:["CSSUsage","devtoolsLogs","traces","URL","GatherContext"]}}static computeTokenLength(e){return computeTokenLength$1(e)}static computeWaste(e,t,r){const n=e.content,a=UnminifiedCSS.computeTokenLength(n)
|
|
771
|
+
;let i=e.header.sourceURL;if(!i||i===r){i=UnusedCSS$1.determineContentPreview(e.content)}const o=ByteEfficiencyAudit$7.estimateTransferSize(t,n.length,"Stylesheet"),l=1-a/n.length;return{url:i,totalBytes:o,wastedBytes:Math.round(o*l),wastedPercent:100*l}}static audit_(e,t){const r=e.URL.finalUrl,n=[];for(const a of e.CSSUsage.stylesheets){const e=t.find((e=>e.url===a.header.sourceURL));if(!a.content)continue;const i=UnminifiedCSS.computeWaste(a,e,r);i.wastedPercent<IGNORE_THRESHOLD_IN_PERCENT$3||i.wastedBytes<IGNORE_THRESHOLD_IN_BYTES$5||!Number.isFinite(i.wastedBytes)||n.push(i)}return{items:n,headings:[{key:"url",valueType:"url",label:str_$1H(i18n$1I.UIStrings.columnURL)},{key:"totalBytes",valueType:"bytes",label:str_$1H(i18n$1I.UIStrings.columnTransferSize)},{key:"wastedBytes",valueType:"bytes",label:str_$1H(i18n$1I.UIStrings.columnWastedBytes)}]}}}unminifiedCss.exports=UnminifiedCSS,unminifiedCss.exports.UIStrings=UIStrings$1H;var unminifiedJavascript={exports:{}}
|
|
772
|
+
;const ByteEfficiencyAudit$6=byteEfficiencyAudit,i18n$1H=i18n$2H,computeTokenLength=minificationEstimator.computeJSTokenLength,UIStrings$1G={title:"Minify JavaScript",description:"Minifying JavaScript files can reduce payload sizes and script parse time. [Learn more](https://web.dev/unminified-javascript/)."},str_$1G=i18n$1H.createMessageInstanceIdFn("lighthouse-core/audits/byte-efficiency/unminified-javascript.js",UIStrings$1G),IGNORE_THRESHOLD_IN_PERCENT$2=10,IGNORE_THRESHOLD_IN_BYTES$4=2048;class UnminifiedJavaScript extends ByteEfficiencyAudit$6{static get meta(){return{id:"unminified-javascript",title:str_$1G(UIStrings$1G.title),description:str_$1G(UIStrings$1G.description),scoreDisplayMode:ByteEfficiencyAudit$6.SCORING_MODES.NUMERIC,requiredArtifacts:["ScriptElements","devtoolsLogs","traces","GatherContext"]}}static computeWaste(e,t,r){const n=e.length,a=computeTokenLength(e),i=ByteEfficiencyAudit$6.estimateTransferSize(r,n,"Script"),o=1-a/n;return{url:t,totalBytes:i,
|
|
773
|
+
wastedBytes:Math.round(i*o),wastedPercent:100*o}}static audit_(e,t){const r=[],n=[];for(const{requestId:a,src:i,content:o}of e.ScriptElements){if(!o)continue;const e=t.find((e=>e.requestId===a)),l=i&&e?e.url:`inline: ${o.substr(0,40)}...`;try{const t=UnminifiedJavaScript.computeWaste(o,l,e);if(t.wastedPercent<IGNORE_THRESHOLD_IN_PERCENT$2||t.wastedBytes<IGNORE_THRESHOLD_IN_BYTES$4||!Number.isFinite(t.wastedBytes))continue;r.push(t)}catch(t){const r=e?e.url:"?";n.push(`Unable to process script ${r}: ${t.message}`)}}return{items:r,warnings:n,headings:[{key:"url",valueType:"url",label:str_$1G(i18n$1H.UIStrings.columnURL)},{key:"totalBytes",valueType:"bytes",label:str_$1G(i18n$1H.UIStrings.columnTransferSize)},{key:"wastedBytes",valueType:"bytes",label:str_$1G(i18n$1H.UIStrings.columnWastedBytes)}]}}}unminifiedJavascript.exports=UnminifiedJavaScript,unminifiedJavascript.exports.UIStrings=UIStrings$1G;var unusedCssRules={exports:{}}
|
|
774
|
+
;const ByteEfficiencyAudit$5=byteEfficiencyAudit,UnusedCSS=unusedCss,i18n$1G=i18n$2H,UIStrings$1F={title:"Reduce unused CSS",description:"Reduce unused rules from stylesheets and defer CSS not used for above-the-fold content to decrease bytes consumed by network activity. [Learn more](https://web.dev/unused-css-rules/)."},str_$1F=i18n$1G.createMessageInstanceIdFn("lighthouse-core/audits/byte-efficiency/unused-css-rules.js",UIStrings$1F),IGNORE_THRESHOLD_IN_BYTES$3=10240;class UnusedCSSRules extends ByteEfficiencyAudit$5{static get meta(){return{id:"unused-css-rules",title:str_$1F(UIStrings$1F.title),description:str_$1F(UIStrings$1F.description),scoreDisplayMode:ByteEfficiencyAudit$5.SCORING_MODES.NUMERIC,requiredArtifacts:["CSSUsage","URL","devtoolsLogs","traces","GatherContext"]}}static async audit_(e,t,r){return{items:(await UnusedCSS.request({CSSUsage:e.CSSUsage,URL:e.URL,devtoolsLog:e.devtoolsLogs[ByteEfficiencyAudit$5.DEFAULT_PASS]
|
|
775
|
+
},r)).filter((e=>e&&e.wastedBytes>IGNORE_THRESHOLD_IN_BYTES$3)),headings:[{key:"url",valueType:"url",label:str_$1F(i18n$1G.UIStrings.columnURL)},{key:"totalBytes",valueType:"bytes",label:str_$1F(i18n$1G.UIStrings.columnTransferSize)},{key:"wastedBytes",valueType:"bytes",label:str_$1F(i18n$1G.UIStrings.columnWastedBytes)}]}}}unusedCssRules.exports=UnusedCSSRules,unusedCssRules.exports.UIStrings=UIStrings$1F;var unusedJavascript={exports:{}};
|
|
773
776
|
/**
|
|
774
777
|
* @license Copyright 2020 Google Inc. All Rights Reserved.
|
|
775
778
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
776
779
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
777
780
|
*/const makeComputedArtifact$s=computedArtifact;class UnusedJavascriptSummary{static computeWaste(e){let t=0;for(const r of e.functions)t=Math.max(t,...r.ranges.map((e=>e.endOffset)));const r=new Uint8Array(t);for(const t of e.functions)for(const e of t.ranges)if(0===e.count)for(let t=e.startOffset;t<e.endOffset;t++)r[t]=1;let n=0;for(const e of r)n+=e;return{unusedByIndex:r,unusedLength:n,contentLength:t}}static createItem(e,t){const r=t.unused/t.content||0,n=Math.round(t.content*r);return{url:e,totalBytes:t.content,wastedBytes:n,wastedPercent:100*r}}static determineLengths(e){let t=0,r=0;for(const n of e)t+=n.unusedLength,r+=n.contentLength;return{content:r,unused:t}}static createSourceWastedBytes(e,t){if(!t.script.content)return;const r={},n=t.script.content.split("\n").map((e=>e.length));let a=0;const i=n.map((e=>{const t=a;return a+=e+1,t}));t.map.computeLastGeneratedColumns();for(const a of t.map.mappings()){let t=i[a.lineNumber];t+=a.columnNumber
|
|
778
|
-
;const o=void 0!==a.lastColumnNumber?a.lastColumnNumber-1:n[a.lineNumber];for(let n=a.columnNumber;n<=o;n++){if(e.every((e=>1===e.unusedByIndex[t]))){const e=a.sourceURL||"(unmapped)";r[e]=(r[e]||0)+1}t+=1}}const o=Object.entries(r).sort((([e,t],[r,n])=>n-t)),l={};for(const[e,t]of o)l[e]=t;return l}static async compute_(e){const{url:t,scriptCoverages:r,bundle:n}=e,a=r.map(UnusedJavascriptSummary.computeWaste),i=UnusedJavascriptSummary.determineLengths(a),o=UnusedJavascriptSummary.createItem(t,i);return n?{...o,sourcesWastedBytes:UnusedJavascriptSummary.createSourceWastedBytes(a,n)}:o}}var unusedJavascriptSummary=makeComputedArtifact$s(UnusedJavascriptSummary);const ByteEfficiencyAudit$4=byteEfficiencyAudit,UnusedJavaScriptSummary$1=unusedJavascriptSummary,JsBundles$
|
|
781
|
+
;const o=void 0!==a.lastColumnNumber?a.lastColumnNumber-1:n[a.lineNumber];for(let n=a.columnNumber;n<=o;n++){if(e.every((e=>1===e.unusedByIndex[t]))){const e=a.sourceURL||"(unmapped)";r[e]=(r[e]||0)+1}t+=1}}const o=Object.entries(r).sort((([e,t],[r,n])=>n-t)),l={};for(const[e,t]of o)l[e]=t;return l}static async compute_(e){const{url:t,scriptCoverages:r,bundle:n}=e,a=r.map(UnusedJavascriptSummary.computeWaste),i=UnusedJavascriptSummary.determineLengths(a),o=UnusedJavascriptSummary.createItem(t,i);return n?{...o,sourcesWastedBytes:UnusedJavascriptSummary.createSourceWastedBytes(a,n)}:o}}var unusedJavascriptSummary=makeComputedArtifact$s(UnusedJavascriptSummary);const ByteEfficiencyAudit$4=byteEfficiencyAudit,UnusedJavaScriptSummary$1=unusedJavascriptSummary,JsBundles$5=jsBundles,i18n$1F=i18n$2H,UIStrings$1E={title:"Reduce unused JavaScript",
|
|
779
782
|
description:"Reduce unused JavaScript and defer loading scripts until they are required to decrease bytes consumed by network activity. [Learn more](https://web.dev/unused-javascript/)."},str_$1E=i18n$1F.createMessageInstanceIdFn("lighthouse-core/audits/byte-efficiency/unused-javascript.js",UIStrings$1E),UNUSED_BYTES_IGNORE_THRESHOLD=20480,UNUSED_BYTES_IGNORE_BUNDLE_SOURCE_THRESHOLD=512;function commonPrefix(e){if(!e.length)return"";const t=e.reduce(((e,t)=>e>t?e:t));let r=e.reduce(((e,t)=>e>t?t:e));for(;!t.startsWith(r);)r=r.slice(0,-1);return r}function trimCommonPrefix(e,t){return t&&e.startsWith(t)?"…"+e.slice(t.length):e}class UnusedJavaScript extends ByteEfficiencyAudit$4{static get meta(){return{id:"unused-javascript",title:str_$1E(UIStrings$1E.title),description:str_$1E(UIStrings$1E.description),scoreDisplayMode:ByteEfficiencyAudit$4.SCORING_MODES.NUMERIC,requiredArtifacts:["JsUsage","ScriptElements","SourceMaps","GatherContext","devtoolsLogs","traces"]}}
|
|
780
|
-
static async audit_(e,t,r){const n=await JsBundles$
|
|
783
|
+
static async audit_(e,t,r){const n=await JsBundles$5.request(e,r),{unusedThreshold:a=UNUSED_BYTES_IGNORE_THRESHOLD,bundleSourceUnusedThreshold:i=UNUSED_BYTES_IGNORE_BUNDLE_SOURCE_THRESHOLD}=r.options||{},o=[];for(const[l,c]of Object.entries(e.JsUsage)){const e=t.find((e=>e.url===l));if(!e)continue;const u=n.find((e=>e.script.src===l)),p=await UnusedJavaScriptSummary$1.request({url:l,scriptCoverages:c,bundle:u},r);if(0===p.wastedBytes||0===p.totalBytes)continue;const f=ByteEfficiencyAudit$4.estimateTransferSize(e,p.totalBytes,"Script")/p.totalBytes,b={url:p.url,totalBytes:Math.round(f*p.totalBytes),wastedBytes:Math.round(f*p.wastedBytes),wastedPercent:p.wastedPercent};if(b.wastedBytes<=a)continue;if(o.push(b),!u||"errorMessage"in u.sizes)continue;const S=u.sizes;if(p.sourcesWastedBytes){const e=Object.entries(p.sourcesWastedBytes).sort(((e,t)=>t[1]-e[1])).slice(0,5).map((([e,t])=>{const r="(unmapped)"===e?S.unmappedBytes:S.files[e];return{source:e,unused:Math.round(t*f),
|
|
781
784
|
total:Math.round(r*f)}})).filter((e=>e.unused>=i)),t=commonPrefix([...u.map.sourceInfos.keys()]);b.subItems={type:"subitems",items:e.map((({source:e,unused:r,total:n})=>({source:trimCommonPrefix(e,t),sourceBytes:n,sourceWastedBytes:r})))}}}return{items:o,headings:[{key:"url",valueType:"url",subItemsHeading:{key:"source",valueType:"code"},label:str_$1E(i18n$1F.UIStrings.columnURL)},{key:"totalBytes",valueType:"bytes",subItemsHeading:{key:"sourceBytes"},label:str_$1E(i18n$1F.UIStrings.columnTransferSize)},{key:"wastedBytes",valueType:"bytes",subItemsHeading:{key:"sourceWastedBytes"},label:str_$1E(i18n$1F.UIStrings.columnWastedBytes)}]}}}unusedJavascript.exports=UnusedJavaScript,unusedJavascript.exports.UIStrings=UIStrings$1E;var usesLongCacheTtl={exports:{}},parseCacheControl$2=function parseCacheControl(e){if("string"!=typeof e)return null
|
|
782
785
|
;var t={},r=e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(e,r,n,a){var i=n||a;return t[r]=!i||i.toLowerCase(),""}));if(t["max-age"])try{var n=parseInt(t["max-age"],10);if(isNaN(n))return null;t["max-age"]=n}catch(r){}return r?null:t};const parseCacheControl$1=parseCacheControl$2,Audit$1A=audit,NetworkRequest$8=networkRequest,URL$z=urlShim,linearInterpolation=statistics$1.linearInterpolation,i18n$1E=i18n$2H,NetworkRecords$v=networkRecords,UIStrings$1D={title:"Uses efficient cache policy on static assets",failureTitle:"Serve static assets with an efficient cache policy",description:"A long cache lifetime can speed up repeat visits to your page. [Learn more](https://web.dev/uses-long-cache-ttl/).",displayValue:"{itemCount, plural,\n =1 {1 resource found}\n other {# resources found}\n }"
|
|
783
786
|
},str_$1D=i18n$1E.createMessageInstanceIdFn("lighthouse-core/audits/byte-efficiency/uses-long-cache-ttl.js",UIStrings$1D),IGNORE_THRESHOLD_IN_PERCENT$1=.925;class CacheHeaders$1 extends Audit$1A{static get meta(){return{id:"uses-long-cache-ttl",title:str_$1D(UIStrings$1D.title),failureTitle:str_$1D(UIStrings$1D.failureTitle),description:str_$1D(UIStrings$1D.description),scoreDisplayMode:Audit$1A.SCORING_MODES.NUMERIC,requiredArtifacts:["devtoolsLogs"]}}static get defaultOptions(){return{p10:28672,median:131072}}static getCacheHitProbability(e){const t=[0,.2,1,3,8,12,24,48,72,168,8760,1/0];if(12!==t.length)throw new Error("deciles 0-10 and 1 for overflow");const r=e/3600,n=t.findIndex((e=>e>=r));if(n===t.length-1)return 1;if(0===n)return 0;const a=t[n],i=t[n-1];return linearInterpolation(i,(n-1)/10,a,n/10,r)}static computeCacheLifetimeInSeconds(e,t){if(t&&void 0!==t["max-age"])return t["max-age"];const r=e.get("expires");if(r){const e=new Date(r).getTime()
|
|
@@ -840,25 +843,25 @@ plainUrlScheme:"Avoid using plain URL schemes ({keyword}) in this directive. Pla
|
|
|
840
843
|
function evaluateRawCspsForXss$1(e){const t=e.map(parseCsp);return{bypasses:evaluateForFailure(t),warnings:evaluateForWarnings(t),syntax:evaluateForSyntaxErrors(t)}}var cspEvaluator={getTranslatedDescription:getTranslatedDescription$1,evaluateRawCspsForXss:evaluateRawCspsForXss$1,parseCsp,UIStrings:UIStrings$1w};const Audit$1w=audit,MainResource$e=mainResource,i18n$1w=i18n$2H,{evaluateRawCspsForXss,getTranslatedDescription}=cspEvaluator,UIStrings$1v={title:"Ensure CSP is effective against XSS attacks",description:"A strong Content Security Policy (CSP) significantly reduces the risk of cross-site scripting (XSS) attacks. [Learn more](https://web.dev/csp-xss/)",noCsp:"No CSP found in enforcement mode",metaTagMessage:"The page contains a CSP defined in a <meta> tag. Consider defining the CSP in an HTTP header if you can.",columnDirective:"Directive",columnSeverity:"Severity",itemSeveritySyntax:"Syntax"
|
|
841
844
|
},str_$1v=i18n$1w.createMessageInstanceIdFn("lighthouse-core/audits/csp-xss.js",UIStrings$1v);class CspXss extends Audit$1w{static get meta(){return{id:"csp-xss",scoreDisplayMode:Audit$1w.SCORING_MODES.INFORMATIVE,title:str_$1v(UIStrings$1v.title),description:str_$1v(UIStrings$1v.description),requiredArtifacts:["devtoolsLogs","MetaElements","URL"]}}static async getRawCsps(e,t){const r=e.devtoolsLogs[Audit$1w.DEFAULT_PASS],n=await MainResource$e.request({devtoolsLog:r,URL:e.URL},t),a=e.MetaElements.filter((e=>e.httpEquiv&&"content-security-policy"===e.httpEquiv.toLowerCase())).flatMap((e=>(e.content||"").split(","))).filter((e=>e.replace(/\s/g,"")));return{cspHeaders:n.responseHeaders.filter((e=>"content-security-policy"===e.name.toLowerCase())).flatMap((e=>e.value.split(","))).filter((e=>e.replace(/\s/g,""))),cspMetaTags:a}}static findingToTableItem(e,t){return{directive:e.directive,description:getTranslatedDescription(e),severity:t}}static constructSyntaxResults(e,t){const r=[]
|
|
842
845
|
;for(let n=0;n<e.length;++n){const a=e[n].map((e=>this.findingToTableItem(e)));a.length&&r.push({severity:str_$1v(UIStrings$1v.itemSeveritySyntax),description:{type:"code",value:t[n]},subItems:{type:"subitems",items:a}})}return r}static constructResults(e,t){const r=[...e,...t];if(!r.length)return{score:0,results:[{severity:str_$1v(i18n$1w.UIStrings.itemSeverityHigh),description:str_$1v(UIStrings$1v.noCsp),directive:void 0}]};const{bypasses:n,warnings:a,syntax:i}=evaluateRawCspsForXss(r),o=[...this.constructSyntaxResults(i,r),...n.map((e=>this.findingToTableItem(e,str_$1v(i18n$1w.UIStrings.itemSeverityHigh)))),...a.map((e=>this.findingToTableItem(e,str_$1v(i18n$1w.UIStrings.itemSeverityMedium))))];return t.length&&o.push({severity:str_$1v(i18n$1w.UIStrings.itemSeverityMedium),description:str_$1v(UIStrings$1v.metaTagMessage),directive:void 0}),{score:n.length?0:1,results:o}}static async audit(e,t){
|
|
843
|
-
const{cspHeaders:r,cspMetaTags:n}=await this.getRawCsps(e,t),{score:a,results:i}=this.constructResults(r,n),o=[{key:"description",itemType:"text",subItemsHeading:{key:"description"},text:str_$1v(i18n$1w.UIStrings.columnDescription)},{key:"directive",itemType:"code",subItemsHeading:{key:"directive"},text:str_$1v(UIStrings$1v.columnDirective)},{key:"severity",itemType:"text",subItemsHeading:{key:"severity"},text:str_$1v(UIStrings$1v.columnSeverity)}],l=Audit$1w.makeTableDetails(o,i);return{score:a,notApplicable:!i.length,details:l}}}cspXss.exports=CspXss,cspXss.exports.UIStrings=UIStrings$1v;var deprecations={exports:{}};const Audit$1v=audit,i18n$1v=i18n$2H,UIStrings$1u={title:"Avoids deprecated APIs",failureTitle:"Uses deprecated APIs",description:"Deprecated APIs will eventually be removed from the browser. [Learn more](https://web.dev/deprecations/).",displayValue:"{itemCount, plural,\n =1 {1 warning found}\n other {# warnings found}\n }",
|
|
844
|
-
columnDeprecate:"Deprecation / Warning",columnLine:"Line"},str_$1u=i18n$1v.createMessageInstanceIdFn("lighthouse-core/audits/deprecations.js",UIStrings$1u);class Deprecations extends Audit$1v{static get meta(){return{id:"deprecations",title:str_$1u(UIStrings$1u.title),failureTitle:str_$1u(UIStrings$1u.failureTitle),description:str_$1u(UIStrings$1u.description),requiredArtifacts:["ConsoleMessages","InspectorIssues"]}}static audit(e){const
|
|
845
|
-
text:str_$1u(i18n$1v.UIStrings.columnSource)}],
|
|
846
|
+
const{cspHeaders:r,cspMetaTags:n}=await this.getRawCsps(e,t),{score:a,results:i}=this.constructResults(r,n),o=[{key:"description",itemType:"text",subItemsHeading:{key:"description"},text:str_$1v(i18n$1w.UIStrings.columnDescription)},{key:"directive",itemType:"code",subItemsHeading:{key:"directive"},text:str_$1v(UIStrings$1v.columnDirective)},{key:"severity",itemType:"text",subItemsHeading:{key:"severity"},text:str_$1v(UIStrings$1v.columnSeverity)}],l=Audit$1w.makeTableDetails(o,i);return{score:a,notApplicable:!i.length,details:l}}}cspXss.exports=CspXss,cspXss.exports.UIStrings=UIStrings$1v;var deprecations={exports:{}};const Audit$1v=audit,JsBundles$4=jsBundles,i18n$1v=i18n$2H,UIStrings$1u={title:"Avoids deprecated APIs",failureTitle:"Uses deprecated APIs",description:"Deprecated APIs will eventually be removed from the browser. [Learn more](https://web.dev/deprecations/).",displayValue:"{itemCount, plural,\n =1 {1 warning found}\n other {# warnings found}\n }",
|
|
847
|
+
columnDeprecate:"Deprecation / Warning",columnLine:"Line"},str_$1u=i18n$1v.createMessageInstanceIdFn("lighthouse-core/audits/deprecations.js",UIStrings$1u);class Deprecations extends Audit$1v{static get meta(){return{id:"deprecations",title:str_$1u(UIStrings$1u.title),failureTitle:str_$1u(UIStrings$1u.failureTitle),description:str_$1u(UIStrings$1u.description),requiredArtifacts:["ConsoleMessages","InspectorIssues","SourceMaps","ScriptElements"]}}static async audit(e,t){const r=e.ConsoleMessages,n=await JsBundles$4.request(e,t);let a;a=e.InspectorIssues.deprecations.length?e.InspectorIssues.deprecations.map((e=>{const{url:t,lineNumber:r,columnNumber:a}=e.sourceCodeLocation,i=n.find((e=>e.script.src===t));return{value:e.message||"",source:Audit$1v.makeSourceLocation(t,r,a-1,i)}})):r.filter((e=>"deprecation"===e.source)).map((e=>({value:e.text,source:Audit$1v.makeSourceLocationFromConsoleMessage(e)})));const i=[{key:"value",itemType:"text",text:str_$1u(UIStrings$1u.columnDeprecate)},{
|
|
848
|
+
key:"source",itemType:"source-location",text:str_$1u(i18n$1v.UIStrings.columnSource)}],o=Audit$1v.makeTableDetails(i,a);let l;return a.length>0&&(l=str_$1u(UIStrings$1u.displayValue,{itemCount:a.length})),{score:Number(0===a.length),displayValue:l,details:o}}}deprecations.exports=Deprecations,deprecations.exports.UIStrings=UIStrings$1u;const Audit$1u=audit,MainThreadTasksComputed$1=mainThreadTasks$1,NetworkRecordsComputed=networkRecords,NetworkAnalysisComputed$2=networkAnalysis,NetworkAnalyzer$2=networkAnalyzer;class Diagnostics extends Audit$1u{static get meta(){return{id:"diagnostics",scoreDisplayMode:Audit$1u.SCORING_MODES.INFORMATIVE,title:"Diagnostics",description:"Collection of useful page vitals.",supportedModes:["navigation"],requiredArtifacts:["traces","devtoolsLogs"]}}static async audit(e,t){
|
|
846
849
|
const r=e.traces[Audit$1u.DEFAULT_PASS],n=e.devtoolsLogs[Audit$1u.DEFAULT_PASS],a=await MainThreadTasksComputed$1.request(r,t),i=await NetworkRecordsComputed.request(n,t),o=await NetworkAnalysisComputed$2.request(n,t),l=a.filter((e=>!e.parent)),c=NetworkAnalyzer$2.findMainDocument(i).transferSize,u=i.reduce(((e,t)=>e+(t.transferSize||0)),0),p=l.reduce(((e,t)=>e+(t.duration||0)),0),f=Math.max(...o.additionalRttByOrigin.values())+o.rtt,b=Math.max(...o.serverResponseTimeByOrigin.values());return{score:1,details:{type:"debugdata",items:[{numRequests:i.length,numScripts:i.filter((e=>"Script"===e.resourceType)).length,numStylesheets:i.filter((e=>"Stylesheet"===e.resourceType)).length,numFonts:i.filter((e=>"Font"===e.resourceType)).length,numTasks:l.length,numTasksOver10ms:l.filter((e=>e.duration>10)).length,numTasksOver25ms:l.filter((e=>e.duration>25)).length,numTasksOver50ms:l.filter((e=>e.duration>50)).length,numTasksOver100ms:l.filter((e=>e.duration>100)).length,
|
|
847
850
|
numTasksOver500ms:l.filter((e=>e.duration>500)).length,rtt:o.rtt,throughput:o.throughput,maxRtt:f,maxServerLatency:b,totalByteWeight:u,totalTaskTime:p,mainDocumentTransferSize:c}]}}}}var diagnostics=Diagnostics,charset={exports:{}};const Audit$1t=audit,i18n$1u=i18n$2H,MainResource$d=mainResource,UIStrings$1t={title:"Properly defines charset",failureTitle:"Charset declaration is missing or occurs too late in the HTML",description:"A character encoding declaration is required. It can be done with a `<meta>` tag in the first 1024 bytes of the HTML or in the Content-Type HTTP response header. [Learn more](https://web.dev/charset/)."},str_$1t=i18n$1u.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/charset.js",UIStrings$1t),CONTENT_TYPE_HEADER="content-type",IANA_REGEX=/^[a-zA-Z0-9-_:.()]{2,}$/,CHARSET_HTML_REGEX=/<meta[^>]+charset[^<]+>/i,CHARSET_HTTP_REGEX=/charset\s*=\s*[a-zA-Z0-9-_:.()]{2,}/i;class CharsetDefined extends Audit$1t{static get meta(){return{id:"charset",
|
|
848
851
|
title:str_$1t(UIStrings$1t.title),failureTitle:str_$1t(UIStrings$1t.failureTitle),description:str_$1t(UIStrings$1t.description),requiredArtifacts:["MainDocumentContent","URL","devtoolsLogs","MetaElements"]}}static async audit(e,t){const r=e.devtoolsLogs[Audit$1t.DEFAULT_PASS],n=await MainResource$d.request({devtoolsLog:r,URL:e.URL},t);let a=!1;if(n.responseHeaders){const e=n.responseHeaders.find((e=>e.name.toLowerCase()===CONTENT_TYPE_HEADER));e&&(a=CHARSET_HTTP_REGEX.test(e.value))}return a=a||65279===e.MainDocumentContent.charCodeAt(0),CHARSET_HTML_REGEX.test(e.MainDocumentContent.slice(0,1024))&&(a=a||e.MetaElements.some((e=>e.charset&&IANA_REGEX.test(e.charset)||"content-type"===e.httpEquiv&&e.content&&CHARSET_HTTP_REGEX.test(e.content)))),{score:Number(a)}}}charset.exports=CharsetDefined,charset.exports.UIStrings=UIStrings$1t,charset.exports.CHARSET_HTML_REGEX=CHARSET_HTML_REGEX,charset.exports.CHARSET_HTTP_REGEX=CHARSET_HTTP_REGEX,charset.exports.IANA_REGEX=IANA_REGEX
|
|
849
852
|
;var doctype={exports:{}};const Audit$1s=audit,i18n$1t=i18n$2H,UIStrings$1s={title:"Page has the HTML doctype",failureTitle:"Page lacks the HTML doctype, thus triggering quirks-mode",description:"Specifying a doctype prevents the browser from switching to quirks-mode. [Learn more](https://web.dev/doctype/).",explanationNoDoctype:"Document must contain a doctype",explanationPublicId:"Expected publicId to be an empty string",explanationSystemId:"Expected systemId to be an empty string",explanationBadDoctype:"Doctype name must be the lowercase string `html`"},str_$1s=i18n$1t.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/doctype.js",UIStrings$1s);class Doctype extends Audit$1s{static get meta(){return{id:"doctype",title:str_$1s(UIStrings$1s.title),failureTitle:str_$1s(UIStrings$1s.failureTitle),description:str_$1s(UIStrings$1s.description),requiredArtifacts:["Doctype"]}}static audit(e){if(!e.Doctype)return{score:0,explanation:str_$1s(UIStrings$1s.explanationNoDoctype)}
|
|
850
853
|
;const t=e.Doctype.name.trim(),r=e.Doctype.publicId,n=e.Doctype.systemId;return""!==r?{score:0,explanation:str_$1s(UIStrings$1s.explanationPublicId)}:""!==n?{score:0,explanation:str_$1s(UIStrings$1s.explanationSystemId)}:"html"===t?{score:1}:{score:0,explanation:str_$1s(UIStrings$1s.explanationBadDoctype)}}}doctype.exports=Doctype,doctype.exports.UIStrings=UIStrings$1s;var domSize={exports:{}};const Audit$1r=audit,i18n$1s=i18n$2H,UIStrings$1r={title:"Avoids an excessive DOM size",failureTitle:"Avoid an excessive DOM size",description:"A large DOM will increase memory usage, cause longer [style calculations](https://developers.google.com/web/fundamentals/performance/rendering/reduce-the-scope-and-complexity-of-style-calculations), and produce costly [layout reflows](https://developers.google.com/speed/articles/reflow). [Learn more](https://web.dev/dom-size/).",columnStatistic:"Statistic",columnValue:"Value",
|
|
851
854
|
displayValue:"{itemCount, plural,\n =1 {1 element}\n other {# elements}\n }",statisticDOMElements:"Total DOM Elements",statisticDOMDepth:"Maximum DOM Depth",statisticDOMWidth:"Maximum Child Elements"},str_$1r=i18n$1s.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/dom-size.js",UIStrings$1r);class DOMSize extends Audit$1r{static get meta(){return{id:"dom-size",title:str_$1r(UIStrings$1r.title),failureTitle:str_$1r(UIStrings$1r.failureTitle),description:str_$1r(UIStrings$1r.description),scoreDisplayMode:Audit$1r.SCORING_MODES.NUMERIC,requiredArtifacts:["DOMStats"]}}static get defaultOptions(){return{p10:818,median:1400}}static audit(e,t){const r=e.DOMStats,n=Audit$1r.computeLogNormalScore({p10:t.options.p10,median:t.options.median},r.totalBodyElements),a=[{key:"statistic",itemType:"text",text:str_$1r(UIStrings$1r.columnStatistic)},{key:"node",itemType:"node",text:str_$1r(i18n$1s.UIStrings.columnElement)},{key:"value",itemType:"numeric",
|
|
852
|
-
text:str_$1r(UIStrings$1r.columnValue)}],i=[{statistic:str_$1r(UIStrings$1r.statisticDOMElements),value:r.totalBodyElements},{node:Audit$1r.makeNodeItem(r.depth),statistic:str_$1r(UIStrings$1r.statisticDOMDepth),value:r.depth.max},{node:Audit$1r.makeNodeItem(r.width),statistic:str_$1r(UIStrings$1r.statisticDOMWidth),value:r.width.max}];return{score:n,numericValue:r.totalBodyElements,numericUnit:"element",displayValue:str_$1r(UIStrings$1r.displayValue,{itemCount:r.totalBodyElements}),details:Audit$1r.makeTableDetails(a,i)}}}domSize.exports=DOMSize,domSize.exports.UIStrings=UIStrings$1r;var geolocationOnStart={exports:{}};const Audit$1q=audit;class ViolationAudit$4 extends Audit$1q{static getViolationResults(e,t){const
|
|
853
|
-
|
|
854
|
-
const
|
|
855
|
-
},str_$1p=i18n$1q.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/inspector-issues.js",UIStrings$1p);class IssuesPanelEntries extends Audit$1p{static get meta(){return{id:"inspector-issues",title:str_$1p(UIStrings$1p.title),failureTitle:str_$1p(UIStrings$1p.failureTitle),description:str_$1p(UIStrings$1p.description),requiredArtifacts:["InspectorIssues"]}}static getMixedContentRow(e){const t=new Set;for(const r of e){const e=r.request&&r.request.url||r.mainResourceURL;t.add(e)}return{issueType:"Mixed content",subItems:{type:"subitems",items:Array.from(t).map((e=>({url:e})))}}}static getSameSiteCookieRow(e){const t=new Set;for(const r of e){const e=r.request&&r.request.url||r.cookieUrl;e&&t.add(e)}return{issueType:"SameSite cookie",subItems:{type:"subitems",items:Array.from(t).map((e=>({url:e})))}}}static getBlockedByResponseRow(e){const t=new Set;for(const r of e){
|
|
856
|
-
issueType:str_$1p(UIStrings$1p.issueTypeBlockedByResponse),subItems:{type:"subitems",items:Array.from(t).map((e=>({url:e})))}}}static getContentSecurityPolicyRow(e){const t=new Set;for(const r of e){const e=r.blockedURL;e&&t.add(e)}return{issueType:"Content security policy",subItems:{type:"subitems",items:Array.from(t).map((e=>({url:e})))}}}static audit(e){const t=[{key:"issueType",itemType:"text",subItemsHeading:{key:"url",itemType:"url"},text:str_$1p(UIStrings$1p.columnIssueType)}],r=e.InspectorIssues,n=[];r.mixedContent.length&&n.push(this.getMixedContentRow(r.mixedContent)),r.sameSiteCookies.length&&n.push(this.getSameSiteCookieRow(r.sameSiteCookies)),r.blockedByResponse.length&&n.push(this.getBlockedByResponseRow(r.blockedByResponse)),r.heavyAds.length&&n.push({issueType:str_$1p(UIStrings$1p.issueTypeHeavyAds)})
|
|
855
|
+
text:str_$1r(UIStrings$1r.columnValue)}],i=[{statistic:str_$1r(UIStrings$1r.statisticDOMElements),value:r.totalBodyElements},{node:Audit$1r.makeNodeItem(r.depth),statistic:str_$1r(UIStrings$1r.statisticDOMDepth),value:r.depth.max},{node:Audit$1r.makeNodeItem(r.width),statistic:str_$1r(UIStrings$1r.statisticDOMWidth),value:r.width.max}];return{score:n,numericValue:r.totalBodyElements,numericUnit:"element",displayValue:str_$1r(UIStrings$1r.displayValue,{itemCount:r.totalBodyElements}),details:Audit$1r.makeTableDetails(a,i)}}}domSize.exports=DOMSize,domSize.exports.UIStrings=UIStrings$1r;var geolocationOnStart={exports:{}};const Audit$1q=audit,JsBundles$3=jsBundles;class ViolationAudit$4 extends Audit$1q{static async getViolationResults(e,t,r){const n=await JsBundles$3.request(e,t);const a=new Set;return e.ConsoleMessages.filter((e=>e.url&&"violation"===e.source&&r.test(e.text))).map((e=>{const t=n.find((t=>t.script.src===e.url));return Audit$1q.makeSourceLocationFromConsoleMessage(e,t)
|
|
856
|
+
})).filter((function filterUndefined(e){return void 0!==e})).filter((e=>{const t=`${e.url}!${e.line}!${e.column}`;return!a.has(t)&&(a.add(t),!0)})).map((e=>({source:e})))}}var violationAudit=ViolationAudit$4;const ViolationAudit$3=violationAudit,i18n$1r=i18n$2H,UIStrings$1q={title:"Avoids requesting the geolocation permission on page load",failureTitle:"Requests the geolocation permission on page load",description:"Users are mistrustful of or confused by sites that request their location without context. Consider tying the request to a user action instead. [Learn more](https://web.dev/geolocation-on-start/)."},str_$1q=i18n$1r.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/geolocation-on-start.js",UIStrings$1q);class GeolocationOnStart extends ViolationAudit$3{static get meta(){return{id:"geolocation-on-start",title:str_$1q(UIStrings$1q.title),failureTitle:str_$1q(UIStrings$1q.failureTitle),description:str_$1q(UIStrings$1q.description),supportedModes:["navigation"],
|
|
857
|
+
requiredArtifacts:["ConsoleMessages","SourceMaps","ScriptElements"]}}static async audit(e,t){const r=await ViolationAudit$3.getViolationResults(e,t,/geolocation/),n=[{key:"source",itemType:"source-location",text:str_$1q(i18n$1r.UIStrings.columnSource)}],a=ViolationAudit$3.makeTableDetails(n,r);return{score:Number(0===r.length),details:a}}}geolocationOnStart.exports=GeolocationOnStart,geolocationOnStart.exports.UIStrings=UIStrings$1q;var inspectorIssues={exports:{}};const Audit$1p=audit,i18n$1q=i18n$2H,UIStrings$1p={title:"No issues in the `Issues` panel in Chrome Devtools",failureTitle:"Issues were logged in the `Issues` panel in Chrome Devtools",description:"Issues logged to the `Issues` panel in Chrome Devtools indicate unresolved problems. They can come from network request failures, insufficient security controls, and other browser concerns. Open up the Issues panel in Chrome DevTools for more details on each issue.",columnIssueType:"Issue type",
|
|
858
|
+
issueTypeBlockedByResponse:"Blocked by cross-origin policy",issueTypeHeavyAds:"Heavy resource usage by ads"},str_$1p=i18n$1q.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/inspector-issues.js",UIStrings$1p);class IssuesPanelEntries extends Audit$1p{static get meta(){return{id:"inspector-issues",title:str_$1p(UIStrings$1p.title),failureTitle:str_$1p(UIStrings$1p.failureTitle),description:str_$1p(UIStrings$1p.description),requiredArtifacts:["InspectorIssues"]}}static getMixedContentRow(e){const t=new Set;for(const r of e){const e=r.request&&r.request.url||r.mainResourceURL;t.add(e)}return{issueType:"Mixed content",subItems:{type:"subitems",items:Array.from(t).map((e=>({url:e})))}}}static getSameSiteCookieRow(e){const t=new Set;for(const r of e){const e=r.request&&r.request.url||r.cookieUrl;e&&t.add(e)}return{issueType:"SameSite cookie",subItems:{type:"subitems",items:Array.from(t).map((e=>({url:e})))}}}static getBlockedByResponseRow(e){const t=new Set;for(const r of e){
|
|
859
|
+
const e=r.request&&r.request.url;e&&t.add(e)}return{issueType:str_$1p(UIStrings$1p.issueTypeBlockedByResponse),subItems:{type:"subitems",items:Array.from(t).map((e=>({url:e})))}}}static getContentSecurityPolicyRow(e){const t=new Set;for(const r of e){const e=r.blockedURL;e&&t.add(e)}return{issueType:"Content security policy",subItems:{type:"subitems",items:Array.from(t).map((e=>({url:e})))}}}static audit(e){const t=[{key:"issueType",itemType:"text",subItemsHeading:{key:"url",itemType:"url"},text:str_$1p(UIStrings$1p.columnIssueType)}],r=e.InspectorIssues,n=[];r.mixedContent.length&&n.push(this.getMixedContentRow(r.mixedContent)),r.sameSiteCookies.length&&n.push(this.getSameSiteCookieRow(r.sameSiteCookies)),r.blockedByResponse.length&&n.push(this.getBlockedByResponseRow(r.blockedByResponse)),r.heavyAds.length&&n.push({issueType:str_$1p(UIStrings$1p.issueTypeHeavyAds)})
|
|
857
860
|
;const a=r.contentSecurityPolicy.filter((e=>"kTrustedTypesSinkViolation"!==e.contentSecurityPolicyViolationType&&"kTrustedTypesPolicyViolation"!==e.contentSecurityPolicyViolationType));return a.length&&n.push(this.getContentSecurityPolicyRow(a)),{score:n.length>0?0:1,details:Audit$1p.makeTableDetails(t,n)}}}inspectorIssues.exports=IssuesPanelEntries,inspectorIssues.exports.UIStrings=UIStrings$1p;var jsLibraries={exports:{}};const Audit$1o=audit,i18n$1p=i18n$2H,UIStrings$1o={title:"Detected JavaScript libraries",description:"All front-end JavaScript libraries detected on the page. [Learn more](https://web.dev/js-libraries/).",columnVersion:"Version"},str_$1o=i18n$1p.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/js-libraries.js",UIStrings$1o);class JsLibrariesAudit extends Audit$1o{static get meta(){return{id:"js-libraries",title:str_$1o(UIStrings$1o.title),scoreDisplayMode:Audit$1o.SCORING_MODES.INFORMATIVE,description:str_$1o(UIStrings$1o.description),
|
|
858
861
|
requiredArtifacts:["Stacks"]}}static audit(e){const t=e.Stacks.filter((e=>"js"===e.detector)).filter((e=>!e.id.endsWith("-fast"))).map((e=>({name:e.name,version:e.version,npm:e.npm}))),r=[{key:"name",itemType:"text",text:str_$1o(i18n$1p.UIStrings.columnName)},{key:"version",itemType:"text",text:str_$1o(UIStrings$1o.columnVersion)}],n=Audit$1o.makeTableDetails(r,t,{}),a={type:"debugdata",stacks:e.Stacks.map((e=>({id:e.id,version:e.version})))};return t.length?{score:1,details:{...n,debugData:a}}:{score:null,notApplicable:!0}}}jsLibraries.exports=JsLibrariesAudit,jsLibraries.exports.UIStrings=UIStrings$1o;var noDocumentWrite={exports:{}};const ViolationAudit$2=violationAudit,i18n$1o=i18n$2H,UIStrings$1n={title:"Avoids `document.write()`",failureTitle:"Avoid `document.write()`",description:"For users on slow connections, external scripts dynamically injected via `document.write()` can delay page load by tens of seconds. [Learn more](https://web.dev/no-document-write/)."
|
|
859
|
-
},str_$1n=i18n$1o.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/no-document-write.js",UIStrings$1n);class NoDocWriteAudit extends ViolationAudit$2{static get meta(){return{id:"no-document-write",title:str_$1n(UIStrings$1n.title),failureTitle:str_$1n(UIStrings$1n.failureTitle),description:str_$1n(UIStrings$1n.description),requiredArtifacts:["ConsoleMessages"]}}static audit(e){const
|
|
860
|
-
;e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,a=t.re=[],i=t.src=[],o=0,l=o++;i[l]="0|[1-9]\\d*";var c=o++;i[c]="[0-9]+";var u=o++;i[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var p=o++;i[p]="("+i[l]+")\\.("+i[l]+")\\.("+i[l]+")";var f=o++;i[f]="("+i[c]+")\\.("+i[c]+")\\.("+i[c]+")";var b=o++;i[b]="(?:"+i[l]+"|"+i[u]+")";var S=o++;i[S]="(?:"+i[c]+"|"+i[u]+")";var _=o++;i[_]="(?:-("+i[b]+"(?:\\."+i[b]+")*))";var T=o++;i[T]="(?:-?("+i[S]+"(?:\\."+i[S]+")*))";var E=o++;i[E]="[0-9A-Za-z-]+";var $=o++;i[$]="(?:\\+("+i[E]+"(?:\\."+i[E]+")*))";var A=o++,I="v?"+i[p]+i[_]+"?"+i[$]+"?";i[A]="^"+I+"$";var R="[v=\\s]*"+i[f]+i[T]+"?"+i[$]+"?",x=o++;i[x]="^"+R+"$";var D=o++;i[D]="((?:<|>)?=?)";var C=o++;i[C]=i[c]+"|x|X|\\*";var k=o++;i[k]=i[l]+"|x|X|\\*";var N=o++;i[N]="[v=\\s]*("+i[k]+")(?:\\.("+i[k]+")(?:\\.("+i[k]+")(?:"+i[_]+")?"+i[$]+"?)?)?";var L=o++
|
|
861
|
-
;i[L]="[v=\\s]*("+i[C]+")(?:\\.("+i[C]+")(?:\\.("+i[C]+")(?:"+i[T]+")?"+i[$]+"?)?)?";var M=o++;i[M]="^"+i[D]+"\\s*"+i[N]+"$";var U=o++;i[U]="^"+i[D]+"\\s*"+i[L]+"$";var O=o++;i[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var P=o++;i[P]="(?:~>?)";var F=o++;i[F]="(\\s*)"+i[P]+"\\s+",a[F]=new RegExp(i[F],"g");var B=o++;i[B]="^"+i[P]+i[N]+"$";var j=o++;i[j]="^"+i[P]+i[L]+"$";var q=o++;i[q]="(?:\\^)";var H=o++;i[H]="(\\s*)"+i[q]+"\\s+",a[H]=new RegExp(i[H],"g");var z=o++;i[z]="^"+i[q]+i[N]+"$";var G=o++;i[G]="^"+i[q]+i[L]+"$";var V=o++;i[V]="^"+i[D]+"\\s*("+R+")$|^$";var W=o++;i[W]="^"+i[D]+"\\s*("+I+")$|^$";var Y=o++;i[Y]="(\\s*)"+i[D]+"\\s*("+R+"|"+i[N]+")",a[Y]=new RegExp(i[Y],"g");var K=o++;i[K]="^\\s*("+i[N]+")\\s+-\\s+("+i[N]+")\\s*$";var
|
|
862
|
+
},str_$1n=i18n$1o.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/no-document-write.js",UIStrings$1n);class NoDocWriteAudit extends ViolationAudit$2{static get meta(){return{id:"no-document-write",title:str_$1n(UIStrings$1n.title),failureTitle:str_$1n(UIStrings$1n.failureTitle),description:str_$1n(UIStrings$1n.description),requiredArtifacts:["ConsoleMessages","SourceMaps","ScriptElements"]}}static async audit(e,t){const r=await ViolationAudit$2.getViolationResults(e,t,/document\.write/),n=[{key:"source",itemType:"source-location",text:str_$1n(i18n$1o.UIStrings.columnSource)}],a=ViolationAudit$2.makeTableDetails(n,r);return{score:Number(0===r.length),details:a}}}noDocumentWrite.exports=NoDocWriteAudit,noDocumentWrite.exports.UIStrings=UIStrings$1n;var noVulnerableLibraries={exports:{}},semver$1={exports:{}};!function(e,t){var r;t=e.exports=SemVer,r="object"==typeof process$3&&process$3.env&&process$3.env.NODE_DEBUG&&/\bsemver\b/i.test(process$3.env.NODE_DEBUG)?function(){
|
|
863
|
+
var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,a=t.re=[],i=t.src=[],o=0,l=o++;i[l]="0|[1-9]\\d*";var c=o++;i[c]="[0-9]+";var u=o++;i[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var p=o++;i[p]="("+i[l]+")\\.("+i[l]+")\\.("+i[l]+")";var f=o++;i[f]="("+i[c]+")\\.("+i[c]+")\\.("+i[c]+")";var b=o++;i[b]="(?:"+i[l]+"|"+i[u]+")";var S=o++;i[S]="(?:"+i[c]+"|"+i[u]+")";var _=o++;i[_]="(?:-("+i[b]+"(?:\\."+i[b]+")*))";var T=o++;i[T]="(?:-?("+i[S]+"(?:\\."+i[S]+")*))";var E=o++;i[E]="[0-9A-Za-z-]+";var $=o++;i[$]="(?:\\+("+i[E]+"(?:\\."+i[E]+")*))";var A=o++,I="v?"+i[p]+i[_]+"?"+i[$]+"?";i[A]="^"+I+"$";var R="[v=\\s]*"+i[f]+i[T]+"?"+i[$]+"?",x=o++;i[x]="^"+R+"$";var D=o++;i[D]="((?:<|>)?=?)";var C=o++;i[C]=i[c]+"|x|X|\\*";var k=o++;i[k]=i[l]+"|x|X|\\*";var N=o++;i[N]="[v=\\s]*("+i[k]+")(?:\\.("+i[k]+")(?:\\.("+i[k]+")(?:"+i[_]+")?"+i[$]+"?)?)?";var L=o++
|
|
864
|
+
;i[L]="[v=\\s]*("+i[C]+")(?:\\.("+i[C]+")(?:\\.("+i[C]+")(?:"+i[T]+")?"+i[$]+"?)?)?";var M=o++;i[M]="^"+i[D]+"\\s*"+i[N]+"$";var U=o++;i[U]="^"+i[D]+"\\s*"+i[L]+"$";var O=o++;i[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var P=o++;i[P]="(?:~>?)";var F=o++;i[F]="(\\s*)"+i[P]+"\\s+",a[F]=new RegExp(i[F],"g");var B=o++;i[B]="^"+i[P]+i[N]+"$";var j=o++;i[j]="^"+i[P]+i[L]+"$";var q=o++;i[q]="(?:\\^)";var H=o++;i[H]="(\\s*)"+i[q]+"\\s+",a[H]=new RegExp(i[H],"g");var z=o++;i[z]="^"+i[q]+i[N]+"$";var G=o++;i[G]="^"+i[q]+i[L]+"$";var V=o++;i[V]="^"+i[D]+"\\s*("+R+")$|^$";var W=o++;i[W]="^"+i[D]+"\\s*("+I+")$|^$";var Y=o++;i[Y]="(\\s*)"+i[D]+"\\s*("+R+"|"+i[N]+")",a[Y]=new RegExp(i[Y],"g");var K=o++;i[K]="^\\s*("+i[N]+")\\s+-\\s+("+i[N]+")\\s*$";var J=o++;i[J]="^\\s*("+i[L]+")\\s+-\\s+("+i[L]+")\\s*$";var Z=o++;i[Z]="(<|>)?=?\\s*\\*";for(var X=0;X<35;X++)r(X,i[X]),a[X]||(a[X]=new RegExp(i[X]));function parse(e,t){if(t&&"object"==typeof t||(t={loose:!!t,
|
|
862
865
|
includePrerelease:!1}),e instanceof SemVer)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?a[x]:a[A]).test(e))return null;try{return new SemVer(e,t)}catch(e){return null}}function SemVer(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof SemVer){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof SemVer))return new SemVer(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var i=e.trim().match(t.loose?a[x]:a[A]);if(!i)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version")
|
|
863
866
|
;i[4]?this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}t.parse=parse,t.valid=function valid(e,t){var r=parse(e,t);return r?r.version:null},t.clean=function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=SemVer,SemVer.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},SemVer.prototype.toString=function(){return this.version},SemVer.prototype.compare=function(e){return r("SemVer.compare",this.version,this.options,e),e instanceof SemVer||(e=new SemVer(e,this.options)),this.compareMain(e)||this.comparePre(e)},SemVer.prototype.compareMain=function(e){return e instanceof SemVer||(e=new SemVer(e,this.options)),
|
|
864
867
|
compareIdentifiers(this.major,e.major)||compareIdentifiers(this.minor,e.minor)||compareIdentifiers(this.patch,e.patch)},SemVer.prototype.comparePre=function(e){if(e instanceof SemVer||(e=new SemVer(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],a=e.prerelease[t];if(r("prerelease compare",t,n,a),void 0===n&&void 0===a)return 0;if(void 0===a)return 1;if(void 0===n)return-1;if(n!==a)return compareIdentifiers(n,a)}while(++t)},SemVer.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),
|
|
@@ -868,39 +871,40 @@ return gte(e,r,n);case"<":return lt(e,r,n);case"<=":return lte(e,r,n);default:th
|
|
|
868
871
|
t.rsort=function rsort(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=gt,t.lt=lt,t.eq=eq,t.neq=neq,t.gte=gte,t.lte=lte,t.cmp=cmp,t.Comparator=Comparator;var ee={};function Range(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof Range)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new Range(e.raw,t);if(e instanceof Comparator)return new Range(e.value,t);if(!(this instanceof Range))return new Range(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function isX(e){return!e||"x"===e.toLowerCase()||"*"===e}function hyphenReplace(e,t,r,n,a,i,o,l,c,u,p,f,b){
|
|
869
872
|
return((t=isX(r)?"":isX(n)?">="+r+".0.0":isX(a)?">="+r+"."+n+".0":">="+t)+" "+(l=isX(c)?"":isX(u)?"<"+(+c+1)+".0.0":isX(p)?"<"+c+"."+(+u+1)+".0":f?"<="+c+"."+u+"."+p+"-"+f:"<="+l)).trim()}function testSet(e,t,n){for(var a=0;a<e.length;a++)if(!e[a].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(a=0;a<e.length;a++)if(r(e[a].semver),e[a].semver!==ee&&e[a].semver.prerelease.length>0){var i=e[a].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return!1}return t.test(e)}function outside(e,t,r,n){var a,i,o,l,c;switch(e=new SemVer(e,n),t=new Range(t,n),r){case">":a=gt,i=lte,o=lt,l=">",c=">=";break;case"<":a=lt,i=gte,o=gt,l="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,n))return!1;for(var u=0;u<t.set.length;++u){var p=t.set[u],f=null,b=null;if(p.forEach((function(e){e.semver===ee&&(e=new Comparator(">=0.0.0")),f=f||e,
|
|
870
873
|
b=b||e,a(e.semver,f.semver,n)?f=e:o(e.semver,b.semver,n)&&(b=e)})),f.operator===l||f.operator===c)return!1;if((!b.operator||b.operator===l)&&i(e,b.semver))return!1;if(b.operator===c&&o(e,b.semver))return!1}return!0}Comparator.prototype.parse=function(e){var t=this.options.loose?a[V]:a[W],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new SemVer(r[2],this.options.loose):this.semver=ee},Comparator.prototype.toString=function(){return this.value},Comparator.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ee||("string"==typeof e&&(e=new SemVer(e,this.options)),cmp(e,this.operator,this.semver,this.options))},Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new Range(e.value,t),
|
|
871
|
-
satisfies(this.value,r,t);if(""===e.operator)return r=new Range(this.value,t),satisfies(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),a=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),l=cmp(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=cmp(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||a||i&&o||l||c},t.Range=Range,Range.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},Range.prototype.toString=function(){return this.range},Range.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?a[
|
|
874
|
+
satisfies(this.value,r,t);if(""===e.operator)return r=new Range(this.value,t),satisfies(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),a=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),l=cmp(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=cmp(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||a||i&&o||l||c},t.Range=Range,Range.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},Range.prototype.toString=function(){return this.range},Range.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?a[J]:a[K];e=e.replace(n,hyphenReplace),
|
|
872
875
|
r("hyphen replace",e),e=e.replace(a[Y],"$1$2$3"),r("comparator trim",e,a[Y]),e=(e=(e=e.replace(a[F],"$1~")).replace(a[H],"$1^")).split(/\s+/).join(" ");var i=t?a[V]:a[W],o=e.split(" ").map((function(e){return function parseComparator(e,t){return r("comp",e,t),e=function replaceCarets(e,t){return e.trim().split(/\s+/).map((function(e){return function replaceCaret(e,t){r("caret",e,t);var n=t.loose?a[G]:a[z];return e.replace(n,(function(t,n,a,i,o){var l;return r("caret",e,t,n,a,i,o),isX(n)?l="":isX(a)?l=">="+n+".0.0 <"+(+n+1)+".0.0":isX(i)?l="0"===n?">="+n+"."+a+".0 <"+n+"."+(+a+1)+".0":">="+n+"."+a+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),l="0"===n?"0"===a?">="+n+"."+a+"."+i+"-"+o+" <"+n+"."+a+"."+(+i+1):">="+n+"."+a+"."+i+"-"+o+" <"+n+"."+(+a+1)+".0":">="+n+"."+a+"."+i+"-"+o+" <"+(+n+1)+".0.0"):(r("no pr"),l="0"===n?"0"===a?">="+n+"."+a+"."+i+" <"+n+"."+a+"."+(+i+1):">="+n+"."+a+"."+i+" <"+n+"."+(+a+1)+".0":">="+n+"."+a+"."+i+" <"+(+n+1)+".0.0"),r("caret return",l),l}))}(e,t)
|
|
873
876
|
})).join(" ")}(e,t),r("caret",e),e=function replaceTildes(e,t){return e.trim().split(/\s+/).map((function(e){return function replaceTilde(e,t){var n=t.loose?a[j]:a[B];return e.replace(n,(function(t,n,a,i,o){var l;return r("tilde",e,t,n,a,i,o),isX(n)?l="":isX(a)?l=">="+n+".0.0 <"+(+n+1)+".0.0":isX(i)?l=">="+n+"."+a+".0 <"+n+"."+(+a+1)+".0":o?(r("replaceTilde pr",o),l=">="+n+"."+a+"."+i+"-"+o+" <"+n+"."+(+a+1)+".0"):l=">="+n+"."+a+"."+i+" <"+n+"."+(+a+1)+".0",r("tilde return",l),l}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function replaceXRanges(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function replaceXRange(e,t){e=e.trim();var n=t.loose?a[U]:a[M];return e.replace(n,(function(t,n,a,i,o,l){r("xRange",e,t,n,a,i,o,l);var c=isX(a),u=c||isX(i),p=u||isX(o);return"="===n&&p&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&p?(u&&(i=0),o=0,">"===n?(n=">=",u?(a=+a+1,i=0,o=0):(i=+i+1,o=0)):"<="===n&&(n="<",u?a=+a+1:i=+i+1),
|
|
874
|
-
t=n+a+"."+i+"."+o):u?t=">="+a+".0.0 <"+(+a+1)+".0.0":p&&(t=">="+a+"."+i+".0 <"+a+"."+(+i+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function replaceStars(e,t){return r("replaceStars",e,t),e.trim().replace(a[
|
|
877
|
+
t=n+a+"."+i+"."+o):u?t=">="+a+".0.0 <"+(+a+1)+".0.0":p&&(t=">="+a+"."+i+".0 <"+a+"."+(+i+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function replaceStars(e,t){return r("replaceStars",e,t),e.trim().replace(a[Z],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(i)}))),o=o.map((function(e){return new Comparator(e,this.options)}),this)},Range.prototype.intersects=function(e,t){if(!(e instanceof Range))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function toComparators(e,t){return new Range(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},Range.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new SemVer(e,this.options))
|
|
875
878
|
;for(var t=0;t<this.set.length;t++)if(testSet(this.set[t],e,this.options))return!0;return!1},t.satisfies=satisfies,t.maxSatisfying=function maxSatisfying(e,t,r){var n=null,a=null;try{var i=new Range(t,r)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(n&&-1!==a.compare(e)||(a=new SemVer(n=e,r)))})),n},t.minSatisfying=function minSatisfying(e,t,r){var n=null,a=null;try{var i=new Range(t,r)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(n&&1!==a.compare(e)||(a=new SemVer(n=e,r)))})),n},t.minVersion=function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r))return r;if(r=new SemVer("0.0.0-0"),e.test(r))return r;r=null;for(var n=0;n<e.set.length;++n){e.set[n].forEach((function(e){var t=new SemVer(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!gt(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))
|
|
876
879
|
}if(r&&e.test(r))return r;return null},t.validRange=function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}},t.ltr=function ltr(e,t,r){return outside(e,t,"<",r)},t.gtr=function gtr(e,t,r){return outside(e,t,">",r)},t.outside=outside,t.prerelease=function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function intersects(e,t,r){return e=new Range(e,r),t=new Range(t,r),e.intersects(t)},t.coerce=function coerce(e){if(e instanceof SemVer)return e;if("string"!=typeof e)return null;var t=e.match(a[O]);if(null==t)return null;return parse(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}}(semver$1,semver$1.exports);var npm={"@angular/core":[{id:"SNYK-JS-ANGULARCORE-1070902",severity:"low",semver:{vulnerable:["<11.0.5",">=11.1.0-next.0 <11.1.0-next.3"]}}],angular:[{id:"SNYK-JS-ANGULAR-572020",severity:"high",semver:{vulnerable:["<1.8.0"]}},{id:"SNYK-JS-ANGULAR-570058",severity:"medium",semver:{vulnerable:["<1.8.0"]}},{
|
|
877
880
|
id:"SNYK-JS-ANGULAR-534884",severity:"high",semver:{vulnerable:[">=1.4.0-beta.6 <1.7.9"]}},{id:"SNYK-JS-ANGULAR-471885",severity:"medium",semver:{vulnerable:["<1.6.3"]}},{id:"SNYK-JS-ANGULAR-471882",severity:"medium",semver:{vulnerable:["<1.6.5"]}},{id:"SNYK-JS-ANGULAR-471879",severity:"medium",semver:{vulnerable:["<1.6.0-rc.0"]}},{id:"npm:angular:20180202",severity:"medium",semver:{vulnerable:["<1.6.9"]}},{id:"npm:angular:20171018",severity:"medium",semver:{vulnerable:["<1.6.7"]}},{id:"npm:angular:20160527",severity:"medium",semver:{vulnerable:[">=1.0.0 <1.2.30"]}},{id:"npm:angular:20160122",severity:"medium",semver:{vulnerable:[">=1.3.0 <1.5.0-rc.2"]}},{id:"npm:angular:20140608",severity:"low",semver:{vulnerable:["<1.3.0"]}},{id:"npm:angular:20131113",severity:"high",semver:{vulnerable:["<1.2.2"]}},{id:"npm:angular:20140908",severity:"medium",semver:{vulnerable:["<1.3.0-rc.5"]}},{id:"npm:angular:20161101",severity:"medium",semver:{vulnerable:[">=1.5.0 <1.5.9"]}},{
|
|
878
881
|
id:"npm:angular:20150909",severity:"high",semver:{vulnerable:["<1.5.0-beta.2"]}},{id:"npm:angular:20151205",severity:"medium",semver:{vulnerable:["<1.5.0-rc.0"]}},{id:"npm:angular:20151130",severity:"medium",semver:{vulnerable:["<1.4.10"]}},{id:"npm:angular:20130622",severity:"medium",semver:{vulnerable:[">=1.0.0 <1.2.0"]}},{id:"npm:angular:20150807-1",severity:"medium",semver:{vulnerable:[">=1.3.1 <1.5.0-beta.0"]}},{id:"npm:angular:20150807",severity:"high",semver:{vulnerable:[">=1.0.0 <1.5.0-beta.0"]}},{id:"npm:angular:20150315",severity:"medium",semver:{vulnerable:["<1.6.1"]}},{id:"npm:angular:20150310",severity:"high",semver:{vulnerable:["<1.4.0-beta.6"]}},{id:"npm:angular:20141104",severity:"medium",semver:{vulnerable:["<1.3.2"]}},{id:"npm:angular:20130621",severity:"medium",semver:{vulnerable:["<1.2.0"]}},{id:"npm:angular:20140909",severity:"high",semver:{vulnerable:[">=1.2.19 <1.2.27"]}},{id:"npm:angular:20130625",severity:"high",semver:{vulnerable:["<1.1.5"]}}],backbone:[{
|
|
879
882
|
id:"npm:backbone:20160523",severity:"medium",semver:{vulnerable:["<0.1.2"]}},{id:"npm:backbone:20110701",severity:"medium",semver:{vulnerable:["<0.5.0"]}}],bootstrap:[{id:"SNYK-JS-BOOTSTRAP-173700",severity:"medium",semver:{vulnerable:["<3.4.1",">=4.0.0 <4.3.1"]}},{id:"SNYK-JS-BOOTSTRAP-73560",severity:"medium",semver:{vulnerable:[">=4.0.0 <4.1.2"]}},{id:"SNYK-JS-BOOTSTRAP-72890",severity:"medium",semver:{vulnerable:["<3.4.0"]}},{id:"SNYK-JS-BOOTSTRAP-72889",severity:"medium",semver:{vulnerable:["<3.4.0"]}},{id:"npm:bootstrap:20180529",severity:"medium",semver:{vulnerable:["<3.4.0",">=4.0.0 <4.1.2"]}},{id:"npm:bootstrap:20160627",severity:"medium",semver:{vulnerable:["<3.4.0",">=4.0.0-alpha <4.0.0-beta.2"]}},{id:"npm:bootstrap:20120510",severity:"medium",semver:{vulnerable:["<2.1.0"]}}],dojo:[{id:"SNYK-JS-DOJO-559224",severity:"medium",semver:{vulnerable:["<1.11.10",">=1.12.1 <1.12.8",">=1.13.0 <1.13.7",">=1.14.0 <1.14.6",">=1.15.0 <1.15.3",">=1.16.0 <1.16.2"]}},{
|
|
880
883
|
id:"SNYK-JS-DOJO-174934",severity:"medium",semver:{vulnerable:[">=1.0.0 <1.0.3",">=1.1.0 <1.1.2",">=1.2.0 <1.2.4",">=1.3.0 <1.3.3",">=1.4.0 <1.4.2"]}},{id:"SNYK-JS-DOJO-174933",severity:"medium",semver:{vulnerable:["<1.2.0"]}},{id:"SNYK-JS-DOJO-72305",severity:"medium",semver:{vulnerable:[">=1.14.0-pre <1.14.0",">=1.13.0 <1.13.1",">=1.12.1 <1.12.4",">=1.11.0-rc1 <1.11.6","<1.10.10"]}},{id:"npm:dojo:20180818",severity:"medium",semver:{vulnerable:["<1.10.10",">=1.11.0 <1.11.6",">=1.12.0 <1.12.4",">=1.13.0 <1.13.1"]}},{id:"npm:dojo:20100614-6",severity:"medium",semver:{vulnerable:["<1.4.2"]}},{id:"npm:dojo:20100614",severity:"medium",semver:{vulnerable:[">=0.4.0 <0.4.4",">=1.0.0 <1.0.3",">=1.1.0 <1.1.2",">=1.2.0 <1.2.4",">=1.3.0 <1.3.3",">=1.4.0 <1.4.2"]}}],"foundation-sites":[{id:"npm:foundation-sites:20170802",severity:"medium",semver:{vulnerable:["<6.0.0"]}},{id:"npm:foundation-sites:20150619",severity:"medium",semver:{vulnerable:["<5.5.3"]}},{id:"npm:foundation-sites:20120717",
|
|
881
|
-
severity:"medium",semver:{vulnerable:[">=3.0.0 <3.0.6"]}}],"google-closure-library":[{id:"SNYK-JS-GOOGLECLOSURELIBRARY-561341",severity:"medium",semver:{vulnerable:["<20200315.0.0"]}},{id:"SNYK-JS-GOOGLECLOSURELIBRARY-174519",severity:"medium",semver:{vulnerable:[">=20190121.0.0 <20190301.0.0"]}}],gsap:[{id:"SNYK-JS-GSAP-1054614",severity:"high",semver:{vulnerable:["<3.6.0"]}}],handlebars:[{id:"SNYK-JS-HANDLEBARS-1279029",severity:"medium",semver:{vulnerable:["<4.7.7"]}},{id:"SNYK-JS-HANDLEBARS-1056767",severity:"
|
|
884
|
+
severity:"medium",semver:{vulnerable:[">=3.0.0 <3.0.6"]}}],"google-closure-library":[{id:"SNYK-JS-GOOGLECLOSURELIBRARY-561341",severity:"medium",semver:{vulnerable:["<20200315.0.0"]}},{id:"SNYK-JS-GOOGLECLOSURELIBRARY-174519",severity:"medium",semver:{vulnerable:[">=20190121.0.0 <20190301.0.0"]}}],gsap:[{id:"SNYK-JS-GSAP-1054614",severity:"high",semver:{vulnerable:["<3.6.0"]}}],handlebars:[{id:"SNYK-JS-HANDLEBARS-1279029",severity:"medium",semver:{vulnerable:["<4.7.7"]}},{id:"SNYK-JS-HANDLEBARS-1056767",severity:"high",semver:{vulnerable:["<4.7.7"]}},{id:"SNYK-JS-HANDLEBARS-567742",severity:"medium",semver:{vulnerable:["<4.6.0"]}},{id:"SNYK-JS-HANDLEBARS-534988",severity:"high",semver:{vulnerable:[">=4.0.0 <4.5.3","<3.0.8"]}},{id:"SNYK-JS-HANDLEBARS-534478",severity:"high",semver:{vulnerable:[">=4.0.0 <4.5.3","<3.0.8"]}},{id:"SNYK-JS-HANDLEBARS-480388",severity:"high",semver:{vulnerable:[">=4.0.0 <4.4.5"]}},{id:"SNYK-JS-HANDLEBARS-469063",severity:"high",semver:{
|
|
882
885
|
vulnerable:[">=4.0.0 <4.3.0","<3.8.0"]}},{id:"SNYK-JS-HANDLEBARS-174183",severity:"high",semver:{vulnerable:[">=3.0.0 <3.0.7",">=4.1.0 <4.1.2",">=4.0.0 <4.0.14"]}},{id:"SNYK-JS-HANDLEBARS-173692",severity:"high",semver:{vulnerable:["<4.0.14",">=4.1.0 <4.1.2"]}},{id:"npm:handlebars:20151207",severity:"medium",semver:{vulnerable:["<4.0.0"]}},{id:"npm:handlebars:20110425",severity:"medium",semver:{vulnerable:["<=1.0.0-beta.3"]}}],highcharts:[{id:"SNYK-JS-HIGHCHARTS-1290057",severity:"medium",semver:{vulnerable:["<9.0.0"]}},{id:"SNYK-JS-HIGHCHARTS-1018906",severity:"medium",semver:{vulnerable:["<9.0.0"]}},{id:"SNYK-JS-HIGHCHARTS-571995",severity:"high",semver:{vulnerable:["<7.2.2",">=8.0.0 <8.1.1"]}},{id:"npm:highcharts:20180225",severity:"high",semver:{vulnerable:["<6.1.0"]}}],jquery:[{id:"SNYK-JS-JQUERY-569619",severity:"medium",semver:{vulnerable:["<1.9.0"]}},{id:"SNYK-JS-JQUERY-567880",severity:"medium",semver:{vulnerable:[">=1.2.0 <3.5.0"]}},{id:"SNYK-JS-JQUERY-565129",
|
|
883
|
-
severity:"medium",semver:{vulnerable:[">=1.5.1 <3.5.0"]}},{id:"SNYK-JS-JQUERY-174006",severity:"medium",semver:{vulnerable:["<3.4.0"]}},{id:"npm:jquery:20160529",severity:"low",semver:{vulnerable:[">=3.0.0-rc1 <3.0.0"]}},{id:"npm:jquery:20150627",severity:"medium",semver:{vulnerable:["<1.12.2",">=1.12.3 <2.2.2",">=2.2.3 <3.0.0"]}},{id:"npm:jquery:20140902",severity:"medium",semver:{vulnerable:[">=1.4.2 <1.6.2"]}},{id:"npm:jquery:20120206",severity:"medium",semver:{vulnerable:["<1.9.1"]}},{id:"npm:jquery:20110606",severity:"medium",semver:{vulnerable:["<1.6.3"]}}],"jquery-mobile":[{id:"SNYK-JS-JQUERYMOBILE-174599",severity:"medium",semver:{vulnerable:["<=1.5.0-alpha.1"]}},{id:"npm:jquery-mobile:20120802",severity:"medium",semver:{vulnerable:["<1.2.0"]}}],"jquery-ui":[{id:"
|
|
884
|
-
vulnerable:["<1.
|
|
885
|
-
vulnerable:["<
|
|
886
|
-
id:"npm:next:20170607",severity:"medium",semver:{vulnerable:["<2.4.3"]}},{id:"npm:next:20170601",severity:"high",semver:{vulnerable:["<2.4.1",">=3.0.0-beta1 <3.0.0-beta7"]}}],react:[{id:"npm:react:20150318",severity:"high",semver:{vulnerable:[">=0.0.1 <0.14.0"]}},{id:"npm:react:20131217",severity:"medium",semver:{vulnerable:[">=0.5.0 <0.5.2",">=0.4.0 <0.4.2"]}}],riot:[{id:"npm:riot:20131114",severity:"medium",semver:{vulnerable:["<0.9.6"]}}],"socket.io":[{id:"SNYK-JS-SOCKETIO-1024859",severity:"medium",semver:{vulnerable:["<2.4.0"]}},{id:"npm:socket.io:20120417",severity:"medium",semver:{vulnerable:["<0.9.6"]}},{id:"npm:socket.io:20120323",severity:"medium",semver:{vulnerable:["<0.9.7"]}}],three:[{id:"SNYK-JS-THREE-1064931",severity:"high",semver:{
|
|
887
|
-
id:"npm:vue:20170401",severity:"medium",semver:{vulnerable:["<2.3.0-beta.1"]}},{id:"npm:vue:20180802",severity:"medium",semver:{vulnerable:["<2.5.17"]}},{id:"npm:vue:20180222",severity:"low",semver:{vulnerable:["<2.5.14"]}}],yui:[{id:"npm:yui:20130604",severity:"medium",semver:{vulnerable:[">=3.0.0 <3.10.1","=3.10.2"]}},{id:"npm:yui:20130515",severity:"medium",semver:{vulnerable:["<3.10.0 >=3.0.0"]}},{id:"npm:yui:20121030",severity:"medium",semver:{vulnerable:["<3.0.0 >=2.4.0"]}},{id:"npm:yui:20120428",severity:"medium",semver:{vulnerable:["<3.5.1 >=3.5.0-PR1"]}},{id:"npm:yui:20101025",severity:"medium",semver:{vulnerable:["<2.8.2 >=2.4.0"]}}]},require$$3={npm}
|
|
888
|
-
description:"Some third-party scripts may contain known security vulnerabilities that are easily identified and exploited by attackers. [Learn more](https://web.dev/no-vulnerable-libraries/).",displayValue:"{itemCount, plural,\n =1 {1 vulnerability detected}\n other {# vulnerabilities detected}\n }",columnVersion:"Library Version",columnVuln:"Vulnerability Count",columnSeverity:"Highest Severity"},str_$1m=i18n$1n.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/no-vulnerable-libraries.js",UIStrings$1m),SEMVER_REGEX=/^(\d+\.\d+\.\d+)[^-0-9]+/,severityStringsMap={low:str_$1m(i18n$1n.UIStrings.itemSeverityLow),medium:str_$1m(i18n$1n.UIStrings.itemSeverityMedium),
|
|
889
|
-
}}static get snykDB(){return snykDatabase}static get severityMap(){return{high:3,medium:2,low:1}}static normalizeVersion(e){if(!e)return e;if(semver.valid(e))return e;if(/^\d+\.\d+$/.test(e))return`${e}.0`;const t=e.match(SEMVER_REGEX);return t?t[1]:e}static getVulnerabilities(e,t,r){if(!t.npm||!r.npm[t.npm])return[];try{semver.satisfies(e,"*")}catch(e){return e.pkgName=t.npm,Sentry$1.captureException(e,{level:"warning"}),[]}return r.npm[t.npm].filter((t=>t.semver.vulnerable.some((t=>semver.satisfies(e,t))))).map((r=>({severity:severityStringsMap[r.severity],numericSeverity:this.severityMap[r.severity],library:`${t.name}@${e}`,url:"https://snyk.io/vuln/"+r.id})))}
|
|
890
|
-
const t=this.normalizeVersion(e.version)||"",i=this.getVulnerabilities(t,e,r),o=i.length;let l;n+=o,i.length>0&&(l=this.highestSeverity(i),a.push({highestSeverity:l,vulnCount:o,detectedLib:{text:e.name+"@"+t,url:`https://snyk.io/vuln/npm:${e.npm}?lh=${t}&utm_source=lighthouse&utm_medium=ref&utm_campaign=audit`,type:"link"}}))}let i;n>0&&(i=str_$1m(UIStrings$1m.displayValue,{itemCount:n}));const o=[{key:"detectedLib",itemType:"link",text:str_$1m(UIStrings$1m.columnVersion)},{key:"vulnCount",itemType:"text",text:str_$1m(UIStrings$1m.columnVuln)},{key:"highestSeverity",itemType:"text",text:str_$1m(UIStrings$1m.columnSeverity)}],l=Audit$1n.makeTableDetails(o,a,{});return{score:Number(0===n),displayValue:i,details:l}}}
|
|
891
|
-
title:"Avoids requesting the notification permission on page load",failureTitle:"Requests the notification permission on page load",description:"Users are mistrustful of or confused by sites that request to send notifications without context. Consider tying the request to user gestures instead. [Learn more](https://web.dev/notification-on-start/)."},str_$1l=i18n$1m.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/notification-on-start.js",UIStrings$1l);class NotificationOnStart extends ViolationAudit$1{static get meta(){return{id:"notification-on-start",title:str_$1l(UIStrings$1l.title),failureTitle:str_$1l(UIStrings$1l.failureTitle),description:str_$1l(UIStrings$1l.description),supportedModes:["navigation"],
|
|
892
|
-
score:Number(0===
|
|
893
|
-
;t.forEach((e=>{r.push({node:Audit$1m.makeNodeItem(e.node)})}));const n=[{key:"node",itemType:"node",text:str_$1k(i18n$1l.UIStrings.columnFailingElem)}];return{score:Number(0===t.length),details:Audit$1m.makeTableDetails(n,r)}}}passwordInputsCanBePastedInto.exports=PasswordInputsCanBePastedIntoAudit,passwordInputsCanBePastedInto.exports.UIStrings=UIStrings$1k;var usesHttp2={exports:{}}
|
|
894
|
-
columnProtocol:"Protocol"},str_$1j=i18n$1k.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/uses-http2.js",UIStrings$1j),STATIC_RESOURCE_TYPES=new Set([NetworkRequest$5.TYPES.Document,NetworkRequest$5.TYPES.Font,NetworkRequest$5.TYPES.Image,NetworkRequest$5.TYPES.Stylesheet,NetworkRequest$5.TYPES.Script,NetworkRequest$5.TYPES.Media]);class UsesHTTP2Audit extends Audit$1l{static get meta(){
|
|
895
|
-
flexibleOrdering:true});t.traverse((e=>{if("network"!==e.type)return;const t=i.get(e.record.requestId);void 0!==t&&(e.record.protocol=t)}));const l=a.timeInMs-o.timeInMs,c=Interactive$2.getLastLongTaskEndTime(a.nodeTimings)-Interactive$2.getLastLongTaskEndTime(o.nodeTimings),u=Math.max(c,l);return 10*Math.round(Math.max(u,0)/10)}static isStaticAsset(e){if(!STATIC_RESOURCE_TYPES.has(e.resourceType))return!1
|
|
896
|
-
return t}static async audit(e,t){const r=e.traces[Audit$1l.DEFAULT_PASS],n=e.devtoolsLogs[Audit$1l.DEFAULT_PASS],a=await NetworkRecords$t.request(n,t),i=UsesHTTP2Audit.determineNonHttp2Resources(a);let o;if(i.length>0&&(o=str_$1j(UIStrings$1j.displayValue,{itemCount:i.length})),"timespan"===e.GatherContext.gatherMode){const e=[{key:"url",itemType:"url",text:str_$1j(i18n$1k.UIStrings.columnURL)},{key:"protocol",
|
|
897
|
-
numericUnit:"millisecond",score:ByteEfficiencyAudit.scoreForWastedMs(p),details:b}}}usesHttp2.exports=UsesHTTP2Audit,usesHttp2.exports.UIStrings=UIStrings$1j;var usesPassiveEventListeners={exports:{}};const ViolationAudit=violationAudit,i18n$1j=i18n$2H,UIStrings$1i={title:"Uses passive listeners to improve scrolling performance",failureTitle:"Does not use passive listeners to improve scrolling performance",
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
const r=e.traces[Audit$1j.DEFAULT_PASS],n=await ProcessedTrace$7.request(r,t),a=await Screenshots.request(r,t),{timeOrigin:i}=n.timestamps,o=a[a.length-1];if(!o){if("timespan"===e.GatherContext.gatherMode)return{notApplicable:!0,
|
|
902
|
-
|
|
903
|
-
|
|
886
|
+
severity:"medium",semver:{vulnerable:[">=1.5.1 <3.5.0"]}},{id:"SNYK-JS-JQUERY-174006",severity:"medium",semver:{vulnerable:["<3.4.0"]}},{id:"npm:jquery:20160529",severity:"low",semver:{vulnerable:[">=3.0.0-rc1 <3.0.0"]}},{id:"npm:jquery:20150627",severity:"medium",semver:{vulnerable:["<1.12.2",">=1.12.3 <2.2.2",">=2.2.3 <3.0.0"]}},{id:"npm:jquery:20140902",severity:"medium",semver:{vulnerable:[">=1.4.2 <1.6.2"]}},{id:"npm:jquery:20120206",severity:"medium",semver:{vulnerable:["<1.9.1"]}},{id:"npm:jquery:20110606",severity:"medium",semver:{vulnerable:["<1.6.3"]}}],"jquery-mobile":[{id:"SNYK-JS-JQUERYMOBILE-174599",severity:"medium",semver:{vulnerable:["<=1.5.0-alpha.1"]}},{id:"npm:jquery-mobile:20120802",severity:"medium",semver:{vulnerable:["<1.2.0"]}}],"jquery-ui":[{id:"SNYK-JS-JQUERYUI-1767767",severity:"high",semver:{vulnerable:["<1.13.0"]}},{id:"SNYK-JS-JQUERYUI-1767175",severity:"high",semver:{vulnerable:["<1.13.0"]}},{id:"SNYK-JS-JQUERYUI-1767167",severity:"high",semver:{
|
|
887
|
+
vulnerable:["<1.13.0"]}},{id:"npm:jquery-ui:20121127",severity:"medium",semver:{vulnerable:["<1.10.0"]}},{id:"npm:jquery-ui:20100903",severity:"medium",semver:{vulnerable:["<1.10.0"]}},{id:"npm:jquery-ui:20160721",severity:"high",semver:{vulnerable:["<1.12.0"]}}],knockout:[{id:"npm:knockout:20180213",severity:"medium",semver:{vulnerable:["<3.5.0-beta"]}},{id:"npm:knockout:20130701",severity:"medium",semver:{vulnerable:[">=2.1.0-pre <3.0.0"]}}],lodash:[{id:"SNYK-JS-LODASH-1040724",severity:"high",semver:{vulnerable:["<4.17.21"]}},{id:"SNYK-JS-LODASH-1018905",severity:"medium",semver:{vulnerable:["<4.17.21"]}},{id:"SNYK-JS-LODASH-608086",severity:"high",semver:{vulnerable:["<4.17.17"]}},{id:"SNYK-JS-LODASH-590103",severity:"high",semver:{vulnerable:["<4.17.20"]}},{id:"SNYK-JS-LODASH-567746",severity:"medium",semver:{vulnerable:["<4.17.16"]}},{id:"SNYK-JS-LODASH-450202",severity:"high",semver:{vulnerable:["<4.17.12"]}},{id:"SNYK-JS-LODASH-73639",severity:"medium",semver:{
|
|
888
|
+
vulnerable:["<4.17.11"]}},{id:"SNYK-JS-LODASH-73638",severity:"high",semver:{vulnerable:["<4.17.11"]}},{id:"npm:lodash:20180130",severity:"medium",semver:{vulnerable:["<4.17.5"]}}],moment:[{id:"npm:moment:20170905",severity:"low",semver:{vulnerable:["<2.19.3"]}},{id:"npm:moment:20161019",severity:"medium",semver:{vulnerable:["<2.15.2"]}},{id:"npm:moment:20160126",severity:"medium",semver:{vulnerable:["<2.11.2"]}}],mustache:[{id:"npm:mustache:20151207",severity:"medium",semver:{vulnerable:["<2.2.1"]}},{id:"npm:mustache:20110814",severity:"medium",semver:{vulnerable:["< 0.3.1"]}}],next:[{id:"SNYK-JS-NEXT-1577139",severity:"medium",semver:{vulnerable:[">=10.0.0 <11.1.1"]}},{id:"SNYK-JS-NEXT-1540422",severity:"medium",semver:{vulnerable:["<11.1.0"]}},{id:"SNYK-JS-NEXT-1063481",severity:"medium",semver:{vulnerable:[">=9.5.0 <9.5.4"]}},{id:"SNYK-JS-NEXT-571938",severity:"high",semver:{vulnerable:["<5.1.0"]}},{id:"SNYK-JS-NEXT-561584",severity:"medium",semver:{vulnerable:["<9.3.2"]}},{
|
|
889
|
+
id:"SNYK-JS-NEXT-174590",severity:"high",semver:{vulnerable:["<2.4.1"]}},{id:"SNYK-JS-NEXT-72454",severity:"medium",semver:{vulnerable:[">=7.0.0 <7.0.2"]}},{id:"npm:next:20180124",severity:"high",semver:{vulnerable:["<4.2.3"]}},{id:"npm:next:20170607",severity:"medium",semver:{vulnerable:["<2.4.3"]}},{id:"npm:next:20170601",severity:"high",semver:{vulnerable:["<2.4.1",">=3.0.0-beta1 <3.0.0-beta7"]}}],react:[{id:"npm:react:20150318",severity:"high",semver:{vulnerable:[">=0.0.1 <0.14.0"]}},{id:"npm:react:20131217",severity:"medium",semver:{vulnerable:[">=0.5.0 <0.5.2",">=0.4.0 <0.4.2"]}}],riot:[{id:"npm:riot:20131114",severity:"medium",semver:{vulnerable:["<0.9.6"]}}],"socket.io":[{id:"SNYK-JS-SOCKETIO-1024859",severity:"medium",semver:{vulnerable:["<2.4.0"]}},{id:"npm:socket.io:20120417",severity:"medium",semver:{vulnerable:["<0.9.6"]}},{id:"npm:socket.io:20120323",severity:"medium",semver:{vulnerable:["<0.9.7"]}}],three:[{id:"SNYK-JS-THREE-1064931",severity:"high",semver:{
|
|
890
|
+
vulnerable:["<0.125.0"]}}],underscore:[{id:"SNYK-JS-UNDERSCORE-1080984",severity:"medium",semver:{vulnerable:[">=1.13.0-0 <1.13.0-2",">=1.3.2 <1.12.1"]}}],vue:[{id:"npm:vue:20170829",severity:"medium",semver:{vulnerable:["<2.4.3"]}},{id:"npm:vue:20170401",severity:"medium",semver:{vulnerable:["<2.3.0-beta.1"]}},{id:"npm:vue:20180802",severity:"medium",semver:{vulnerable:["<2.5.17"]}},{id:"npm:vue:20180222",severity:"low",semver:{vulnerable:["<2.5.14"]}}],yui:[{id:"npm:yui:20130604",severity:"medium",semver:{vulnerable:[">=3.0.0 <3.10.1","=3.10.2"]}},{id:"npm:yui:20130515",severity:"medium",semver:{vulnerable:["<3.10.0 >=3.0.0"]}},{id:"npm:yui:20121030",severity:"medium",semver:{vulnerable:["<3.0.0 >=2.4.0"]}},{id:"npm:yui:20120428",severity:"medium",semver:{vulnerable:["<3.5.1 >=3.5.0-PR1"]}},{id:"npm:yui:20101025",severity:"medium",semver:{vulnerable:["<2.8.2 >=2.4.0"]}}]},require$$3={npm}
|
|
891
|
+
;const Audit$1n=audit,Sentry$1=sentry,semver=semver$1.exports,snykDatabase=require$$3,i18n$1n=i18n$2H,UIStrings$1m={title:"Avoids front-end JavaScript libraries with known security vulnerabilities",failureTitle:"Includes front-end JavaScript libraries with known security vulnerabilities",description:"Some third-party scripts may contain known security vulnerabilities that are easily identified and exploited by attackers. [Learn more](https://web.dev/no-vulnerable-libraries/).",displayValue:"{itemCount, plural,\n =1 {1 vulnerability detected}\n other {# vulnerabilities detected}\n }",columnVersion:"Library Version",columnVuln:"Vulnerability Count",columnSeverity:"Highest Severity"},str_$1m=i18n$1n.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/no-vulnerable-libraries.js",UIStrings$1m),SEMVER_REGEX=/^(\d+\.\d+\.\d+)[^-0-9]+/,severityStringsMap={low:str_$1m(i18n$1n.UIStrings.itemSeverityLow),medium:str_$1m(i18n$1n.UIStrings.itemSeverityMedium),
|
|
892
|
+
high:str_$1m(i18n$1n.UIStrings.itemSeverityHigh)};class NoVulnerableLibrariesAudit extends Audit$1n{static get meta(){return{id:"no-vulnerable-libraries",title:str_$1m(UIStrings$1m.title),failureTitle:str_$1m(UIStrings$1m.failureTitle),description:str_$1m(UIStrings$1m.description),requiredArtifacts:["Stacks"]}}static get snykDB(){return snykDatabase}static get severityMap(){return{high:3,medium:2,low:1}}static normalizeVersion(e){if(!e)return e;if(semver.valid(e))return e;if(/^\d+\.\d+$/.test(e))return`${e}.0`;const t=e.match(SEMVER_REGEX);return t?t[1]:e}static getVulnerabilities(e,t,r){if(!t.npm||!r.npm[t.npm])return[];try{semver.satisfies(e,"*")}catch(e){return e.pkgName=t.npm,Sentry$1.captureException(e,{level:"warning"}),[]}return r.npm[t.npm].filter((t=>t.semver.vulnerable.some((t=>semver.satisfies(e,t))))).map((r=>({severity:severityStringsMap[r.severity],numericSeverity:this.severityMap[r.severity],library:`${t.name}@${e}`,url:"https://snyk.io/vuln/"+r.id})))}
|
|
893
|
+
static highestSeverity(e){return e.sort(((e,t)=>t.numericSeverity-e.numericSeverity))[0].severity}static audit(e){const t=e.Stacks.filter((e=>"js"===e.detector)),r=NoVulnerableLibrariesAudit.snykDB;if(!t.length)return{score:1};let n=0;const a=[];for(const e of t){const t=this.normalizeVersion(e.version)||"",i=this.getVulnerabilities(t,e,r),o=i.length;let l;n+=o,i.length>0&&(l=this.highestSeverity(i),a.push({highestSeverity:l,vulnCount:o,detectedLib:{text:e.name+"@"+t,url:`https://snyk.io/vuln/npm:${e.npm}?lh=${t}&utm_source=lighthouse&utm_medium=ref&utm_campaign=audit`,type:"link"}}))}let i;n>0&&(i=str_$1m(UIStrings$1m.displayValue,{itemCount:n}));const o=[{key:"detectedLib",itemType:"link",text:str_$1m(UIStrings$1m.columnVersion)},{key:"vulnCount",itemType:"text",text:str_$1m(UIStrings$1m.columnVuln)},{key:"highestSeverity",itemType:"text",text:str_$1m(UIStrings$1m.columnSeverity)}],l=Audit$1n.makeTableDetails(o,a,{});return{score:Number(0===n),displayValue:i,details:l}}}
|
|
894
|
+
noVulnerableLibraries.exports=NoVulnerableLibrariesAudit,noVulnerableLibraries.exports.UIStrings=UIStrings$1m;var notificationOnStart={exports:{}};const ViolationAudit$1=violationAudit,i18n$1m=i18n$2H,UIStrings$1l={title:"Avoids requesting the notification permission on page load",failureTitle:"Requests the notification permission on page load",description:"Users are mistrustful of or confused by sites that request to send notifications without context. Consider tying the request to user gestures instead. [Learn more](https://web.dev/notification-on-start/)."},str_$1l=i18n$1m.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/notification-on-start.js",UIStrings$1l);class NotificationOnStart extends ViolationAudit$1{static get meta(){return{id:"notification-on-start",title:str_$1l(UIStrings$1l.title),failureTitle:str_$1l(UIStrings$1l.failureTitle),description:str_$1l(UIStrings$1l.description),supportedModes:["navigation"],
|
|
895
|
+
requiredArtifacts:["ConsoleMessages","SourceMaps","ScriptElements"]}}static async audit(e,t){const r=await ViolationAudit$1.getViolationResults(e,t,/notification permission/),n=[{key:"source",itemType:"source-location",text:str_$1l(i18n$1m.UIStrings.columnSource)}],a=ViolationAudit$1.makeTableDetails(n,r);return{score:Number(0===r.length),details:a}}}notificationOnStart.exports=NotificationOnStart,notificationOnStart.exports.UIStrings=UIStrings$1l;var passwordInputsCanBePastedInto={exports:{}};const Audit$1m=audit,i18n$1l=i18n$2H,UIStrings$1k={title:"Allows users to paste into password fields",failureTitle:"Prevents users to paste into password fields",description:"Preventing password pasting undermines good security policy. [Learn more](https://web.dev/password-inputs-can-be-pasted-into/)."},str_$1k=i18n$1l.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/password-inputs-can-be-pasted-into.js",UIStrings$1k);class PasswordInputsCanBePastedIntoAudit extends Audit$1m{
|
|
896
|
+
static get meta(){return{id:"password-inputs-can-be-pasted-into",title:str_$1k(UIStrings$1k.title),failureTitle:str_$1k(UIStrings$1k.failureTitle),description:str_$1k(UIStrings$1k.description),requiredArtifacts:["PasswordInputsWithPreventedPaste"]}}static audit(e){const t=e.PasswordInputsWithPreventedPaste,r=[];t.forEach((e=>{r.push({node:Audit$1m.makeNodeItem(e.node)})}));const n=[{key:"node",itemType:"node",text:str_$1k(i18n$1l.UIStrings.columnFailingElem)}];return{score:Number(0===t.length),details:Audit$1m.makeTableDetails(n,r)}}}passwordInputsCanBePastedInto.exports=PasswordInputsCanBePastedIntoAudit,passwordInputsCanBePastedInto.exports.UIStrings=UIStrings$1k;var usesHttp2={exports:{}}
|
|
897
|
+
;const Audit$1l=audit,ThirdParty=thirdPartyWeb_1,URL$t=urlShim,ByteEfficiencyAudit=byteEfficiencyAudit,Interactive$2=lanternInteractive,NetworkRequest$5=networkRequest,NetworkRecords$t=networkRecords,LoadSimulator$6=loadSimulator,PageDependencyGraph$6=pageDependencyGraph,i18n$1k=i18n$2H,UIStrings$1j={title:"Use HTTP/2",description:"HTTP/2 offers many benefits over HTTP/1.1, including binary headers and multiplexing. [Learn more](https://web.dev/uses-http2/).",displayValue:"{itemCount, plural,\n =1 {1 request not served via HTTP/2}\n other {# requests not served via HTTP/2}\n }",columnProtocol:"Protocol"},str_$1j=i18n$1k.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/uses-http2.js",UIStrings$1j),STATIC_RESOURCE_TYPES=new Set([NetworkRequest$5.TYPES.Document,NetworkRequest$5.TYPES.Font,NetworkRequest$5.TYPES.Image,NetworkRequest$5.TYPES.Stylesheet,NetworkRequest$5.TYPES.Script,NetworkRequest$5.TYPES.Media]);class UsesHTTP2Audit extends Audit$1l{static get meta(){
|
|
898
|
+
return{id:"uses-http2",title:str_$1j(UIStrings$1j.title),description:str_$1j(UIStrings$1j.description),scoreDisplayMode:Audit$1l.SCORING_MODES.NUMERIC,supportedModes:["timespan","navigation"],requiredArtifacts:["URL","devtoolsLogs","traces","GatherContext"]}}static computeWasteWithTTIGraph(e,t,r){const n=new Set(e.map((e=>e.url))),a=r.simulate(t,{label:"uses-http2-before",flexibleOrdering:true}),i=new Map;t.traverse((e=>{"network"===e.type&&n.has(e.record.url)&&(i.set(e.record.requestId,e.record.protocol),e.record.protocol="h2")}));const o=r.simulate(t,{label:"uses-http2-after",flexibleOrdering:true});t.traverse((e=>{if("network"!==e.type)return;const t=i.get(e.record.requestId);void 0!==t&&(e.record.protocol=t)}));const l=a.timeInMs-o.timeInMs,c=Interactive$2.getLastLongTaskEndTime(a.nodeTimings)-Interactive$2.getLastLongTaskEndTime(o.nodeTimings),u=Math.max(c,l);return 10*Math.round(Math.max(u,0)/10)}static isStaticAsset(e){if(!STATIC_RESOURCE_TYPES.has(e.resourceType))return!1
|
|
899
|
+
;if(e.resourceSize<100){if(ThirdParty.getEntity(e.url))return!1}return!0}static determineNonHttp2Resources(e){const t=[],r=new Set,n=new Map;for(const t of e){if(!UsesHTTP2Audit.isStaticAsset(t))continue;if(URL$t.isLikeLocalhost(t.parsedURL.host))continue;const e=n.get(t.parsedURL.securityOrigin)||[];e.push(t),n.set(t.parsedURL.securityOrigin,e)}for(const a of e){if(r.has(a.url))continue;if(a.fetchedViaServiceWorker)continue;if(!/HTTP\/[01][.\d]?/i.test(a.protocol))continue;(n.get(a.parsedURL.securityOrigin)||[]).length<6||(r.add(a.url),t.push({protocol:a.protocol,url:a.url}))}return t}static async audit(e,t){const r=e.traces[Audit$1l.DEFAULT_PASS],n=e.devtoolsLogs[Audit$1l.DEFAULT_PASS],a=await NetworkRecords$t.request(n,t),i=UsesHTTP2Audit.determineNonHttp2Resources(a);let o;if(i.length>0&&(o=str_$1j(UIStrings$1j.displayValue,{itemCount:i.length})),"timespan"===e.GatherContext.gatherMode){const e=[{key:"url",itemType:"url",text:str_$1j(i18n$1k.UIStrings.columnURL)},{key:"protocol",
|
|
900
|
+
itemType:"text",text:str_$1j(UIStrings$1j.columnProtocol)}],t=Audit$1l.makeTableDetails(e,i);return{displayValue:o,score:i.length?0:1,details:t}}const l={devtoolsLog:n,settings:t&&t.settings||{}},c=await PageDependencyGraph$6.request({trace:r,devtoolsLog:n},t),u=await LoadSimulator$6.request(l,t),p=UsesHTTP2Audit.computeWasteWithTTIGraph(i,c,u),f=[{key:"url",valueType:"url",label:str_$1j(i18n$1k.UIStrings.columnURL)},{key:"protocol",valueType:"text",label:str_$1j(UIStrings$1j.columnProtocol)}],b=Audit$1l.makeOpportunityDetails(f,i,p);return{displayValue:o,numericValue:p,numericUnit:"millisecond",score:ByteEfficiencyAudit.scoreForWastedMs(p),details:b}}}usesHttp2.exports=UsesHTTP2Audit,usesHttp2.exports.UIStrings=UIStrings$1j;var usesPassiveEventListeners={exports:{}};const ViolationAudit=violationAudit,i18n$1j=i18n$2H,UIStrings$1i={title:"Uses passive listeners to improve scrolling performance",failureTitle:"Does not use passive listeners to improve scrolling performance",
|
|
901
|
+
description:"Consider marking your touch and wheel event listeners as `passive` to improve your page's scroll performance. [Learn more](https://web.dev/uses-passive-event-listeners/)."},str_$1i=i18n$1j.createMessageInstanceIdFn("lighthouse-core/audits/dobetterweb/uses-passive-event-listeners.js",UIStrings$1i);class PassiveEventsAudit extends ViolationAudit{static get meta(){return{id:"uses-passive-event-listeners",title:str_$1i(UIStrings$1i.title),failureTitle:str_$1i(UIStrings$1i.failureTitle),description:str_$1i(UIStrings$1i.description),requiredArtifacts:["ConsoleMessages","SourceMaps","ScriptElements"]}}static async audit(e,t){const r=await ViolationAudit.getViolationResults(e,t,/passive event listener/),n=[{key:"source",itemType:"source-location",text:str_$1i(i18n$1j.UIStrings.columnSource)}],a=ViolationAudit.makeTableDetails(n,r);return{score:Number(0===r.length),details:a}}}usesPassiveEventListeners.exports=PassiveEventsAudit,
|
|
902
|
+
usesPassiveEventListeners.exports.UIStrings=UIStrings$1i;var errorsInConsole={exports:{}};const log$4=lighthouseLogger,Audit$1k=audit,JsBundles$2=jsBundles,i18n$1i=i18n$2H,UIStrings$1h={title:"No browser errors logged to the console",failureTitle:"Browser errors were logged to the console",description:"Errors logged to the console indicate unresolved problems. They can come from network request failures and other browser concerns. [Learn more](https://web.dev/errors-in-console/)"},str_$1h=i18n$1i.createMessageInstanceIdFn("lighthouse-core/audits/errors-in-console.js",UIStrings$1h);class ErrorLogs extends Audit$1k{static get meta(){return{id:"errors-in-console",title:str_$1h(UIStrings$1h.title),failureTitle:str_$1h(UIStrings$1h.failureTitle),description:str_$1h(UIStrings$1h.description),requiredArtifacts:["ConsoleMessages","SourceMaps","ScriptElements"]}}static get defaultOptions(){return{ignoredPatterns:["ERR_BLOCKED_BY_CLIENT.Inspector"]}}static filterAccordingToOptions(e,t){
|
|
903
|
+
const{ignoredPatterns:r,...n}=t,a=Object.keys(n);return a.length&&log$4.warn(this.meta.id,"Unrecognized options",a),r?e.filter((({description:e})=>{if(!e)return!0;for(const t of r){if(t instanceof RegExp&&t.test(e))return!1;if("string"==typeof t&&e.includes(t))return!1}return!0})):e}static async audit(e,t){const r=t.options,n=await JsBundles$2.request(e,t),a=e.ConsoleMessages.filter((e=>"error"===e.level)).map((e=>{const t=n.find((t=>t.script.src===e.url));return{source:e.source,description:e.text,sourceLocation:Audit$1k.makeSourceLocationFromConsoleMessage(e,t)}})),i=ErrorLogs.filterAccordingToOptions(a,r).sort(((e,t)=>(e.description||"").localeCompare(t.description||""))),o=[{key:"sourceLocation",itemType:"source-location",text:str_$1h(i18n$1i.UIStrings.columnSource)},{key:"description",itemType:"code",text:str_$1h(i18n$1i.UIStrings.columnDescription)}],l=Audit$1k.makeTableDetails(o,i),c=i.length;return{score:Number(0===c),details:l}}}errorsInConsole.exports=ErrorLogs,
|
|
904
|
+
errorsInConsole.exports.UIStrings=UIStrings$1h;const makeComputedArtifact$o=computedArtifact,SCREENSHOT_TRACE_NAME="Screenshot";class Screenshots$1{static async compute_(e){return e.traceEvents.filter((e=>e.name===SCREENSHOT_TRACE_NAME)).map((e=>({timestamp:e.ts,datauri:`data:image/jpeg;base64,${e.args.snapshot}`})))}}var screenshots=makeComputedArtifact$o(Screenshots$1);const Audit$1j=audit,LHError$8=lhError.exports,ProcessedTrace$7=processedTrace,Screenshots=screenshots;class FinalScreenshot extends Audit$1j{static get meta(){return{id:"final-screenshot",scoreDisplayMode:Audit$1j.SCORING_MODES.INFORMATIVE,title:"Final Screenshot",description:"The last screenshot captured of the pageload.",requiredArtifacts:["traces","GatherContext"]}}static async audit(e,t){const r=e.traces[Audit$1j.DEFAULT_PASS],n=await ProcessedTrace$7.request(r,t),a=await Screenshots.request(r,t),{timeOrigin:i}=n.timestamps,o=a[a.length-1];if(!o){if("timespan"===e.GatherContext.gatherMode)return{notApplicable:!0,
|
|
905
|
+
score:1};throw new LHError$8(LHError$8.errors.NO_SCREENSHOTS)}return{score:1,details:{type:"screenshot",timing:Math.round((o.timestamp-i)/1e3),timestamp:o.timestamp,data:o.datauri}}}}var finalScreenshot=FinalScreenshot,fontDisplay={exports:{}};const Audit$1i=audit,URL$s=urlShim,PASSING_FONT_DISPLAY_REGEX$1=/^(block|fallback|optional|swap)$/,CSS_URL_REGEX=/url\((.*?)\)/,CSS_URL_GLOBAL_REGEX=new RegExp(CSS_URL_REGEX,"g"),i18n$1h=i18n$2H,Sentry=sentry,NetworkRecords$s=networkRecords,UIStrings$1g={title:"All text remains visible during webfont loads",failureTitle:"Ensure text remains visible during webfont load",description:"Leverage the font-display CSS feature to ensure text is user-visible while webfonts are loading. [Learn more](https://web.dev/font-display/).",
|
|
906
|
+
undeclaredFontOriginWarning:"{fontCountForOrigin, plural, =1 {Lighthouse was unable to automatically check the `font-display` value for the origin {fontOrigin}.} other {Lighthouse was unable to automatically check the `font-display` values for the origin {fontOrigin}.}}"},str_$1g=i18n$1h.createMessageInstanceIdFn("lighthouse-core/audits/font-display.js",UIStrings$1g);class FontDisplay$1 extends Audit$1i{static get meta(){return{id:"font-display",title:str_$1g(UIStrings$1g.title),failureTitle:str_$1g(UIStrings$1g.failureTitle),description:str_$1g(UIStrings$1g.description),supportedModes:["navigation"],requiredArtifacts:["devtoolsLogs","CSSUsage","URL"]}}static findFontDisplayDeclarations(e,t){const r=new Set,n=new Set;for(const a of e.CSSUsage.stylesheets){const i=a.content.replace(/(\r|\n)+/g," ").match(/@font-face\s*{(.*?)}/g)||[];for(const o of i){const i=o.match(CSS_URL_GLOBAL_REGEX);if(!i)continue
|
|
907
|
+
;const l=o.match(/font-display\s*:\s*(\w+)\s*(;|\})/),c=l&&l[1]||"",u=t.test(c)?r:n,p=i.map((e=>e.match(CSS_URL_REGEX)[1].trim())).map((e=>/^('|").*\1$/.test(e)?e.substr(1,e.length-2):e));for(const t of p)try{const r=URL$s.isValid(a.header.sourceURL)?a.header.sourceURL:e.URL.finalUrl,n=new URL$s(t,r);u.add(n.href)}catch(e){Sentry.captureException(e,{tags:{audit:this.meta.id}})}}}return{passingURLs:r,failingURLs:n}}static getWarningsForFontUrls(e){const t=new Map;for(const r of e){const e=URL$s.getOrigin(r);if(!e)continue;const n=t.get(e)||0;t.set(e,n+1)}return[...t].map((([e,t])=>str_$1g(UIStrings$1g.undeclaredFontOriginWarning,{fontCountForOrigin:t,fontOrigin:e})))}static async audit(e,t){
|
|
904
908
|
const r=e.devtoolsLogs[this.DEFAULT_PASS],n=await NetworkRecords$s.request(r,t),{passingURLs:a,failingURLs:i}=FontDisplay$1.findFontDisplayDeclarations(e,PASSING_FONT_DISPLAY_REGEX$1),o=[],l=n.filter((e=>"Font"===e.resourceType)).filter((e=>!/^data:/.test(e.url))).filter((e=>!/^blob:/.test(e.url))).filter((e=>!!i.has(e.url)||(a.has(e.url)||o.push(e.url),!1))).map((e=>{const t=Math.min(1e3*(e.endTime-e.startTime),3e3);return{url:e.url,wastedMs:t}})),c=[{key:"url",itemType:"url",text:str_$1g(i18n$1h.UIStrings.columnURL)},{key:"wastedMs",itemType:"ms",text:str_$1g(i18n$1h.UIStrings.columnWastedMs)}],u=Audit$1i.makeTableDetails(c,l);return{score:Number(0===l.length),details:u,warnings:FontDisplay$1.getWarningsForFontUrls(o)}}}fontDisplay.exports=FontDisplay$1,fontDisplay.exports.UIStrings=UIStrings$1g;
|
|
905
909
|
/**
|
|
906
910
|
* @license Copyright 2020 Google Inc. All Rights Reserved.
|
|
@@ -920,11 +924,11 @@ failureText:"Manifest does not have `short_name`",validate:e=>!!e.short_name.val
|
|
|
920
924
|
passing:e.validate(r,t.errors)})))}}}var manifestValues=makeComputedArtifact$n(ManifestValues$4);const Audit$1e=audit,i18n$1e=i18n$2H,ManifestValues$3=manifestValues,UIStrings$1d={title:"Web app manifest and service worker meet the installability requirements",failureTitle:"Web app manifest or service worker do not meet the installability requirements",description:"Service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. With proper service worker and manifest implementations, browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. [Learn more](https://web.dev/installable-manifest/).",columnValue:"Failure reason",displayValue:"{itemCount, plural,\n =1 {1 reason}\n other {# reasons}\n }",noErrorId:"Installability error id '{errorId}' is not recognized","not-in-main-frame":"Page is not loaded in the main frame",
|
|
921
925
|
"not-from-secure-origin":"Page is not served from a secure origin","no-manifest":"Page has no manifest <link> URL","start-url-not-valid":"Manifest start URL is not valid","manifest-missing-name-or-short-name":"Manifest does not contain a 'name' or 'short_name' field","manifest-display-not-supported":"Manifest 'display' property must be one of 'standalone', 'fullscreen', or 'minimal-ui'","manifest-empty":"Manifest could not be fetched, is empty, or could not be parsed","no-matching-service-worker":"No matching service worker detected. You may need to reload the page, or check that the scope of the service worker for the current page encloses the scope and start URL from the manifest.","manifest-missing-suitable-icon":'Manifest does not contain a suitable icon - PNG, SVG or WebP format of at least {value0} px is required, the sizes attribute must be set, and the purpose attribute, if set, must include "any".',
|
|
922
926
|
"no-acceptable-icon":'No supplied icon is at least {value0} px square in PNG, SVG or WebP format, with the purpose attribute unset or set to "any"',"cannot-download-icon":"Could not download a required icon from the manifest","no-icon-available":"Downloaded icon was empty or corrupted","platform-not-supported-on-android":"The specified application platform is not supported on Android","no-id-specified":"No Play store ID provided","ids-do-not-match":"The Play Store app URL and Play Store ID do not match","already-installed":"The app is already installed","url-not-supported-for-webapk":"A URL in the manifest contains a username, password, or port","in-incognito":"Page is loaded in an incognito window","not-offline-capable":"Page does not work offline","no-url-for-service-worker":"Could not check service worker without a 'start_url' field in the manifest","prefer-related-applications":"Manifest specifies prefer_related_applications: true",
|
|
923
|
-
"prefer-related-applications-only-beta-stable":"prefer_related_applications is only supported on Chrome Beta and Stable channels on Android.","manifest-display-override-not-supported":"Manifest contains 'display_override' field, and the first supported display mode must be one of 'standalone', 'fullscreen', or 'minimal-ui'","manifest-location-changed":"Manifest URL changed while the manifest was being fetched.","warn-not-offline-capable":"Page does not work offline. The page will not be regarded as installable after Chrome 93, stable release August 2021.","protocol-timeout":"Lighthouse could not determine if there was a service worker. Please try with a newer version of Chrome."},str_$1d=i18n$1e.createMessageInstanceIdFn("lighthouse-core/audits/installable-manifest.js",UIStrings$1d);class InstallableManifest extends Audit$1e{static get meta(){return{id:"installable-manifest",
|
|
924
|
-
description:str_$1d(UIStrings$1d.description),supportedModes:["navigation"],requiredArtifacts:["URL","WebAppManifest","InstallabilityErrors"]}}static getInstallabilityErrors(e){const t=e.InstallabilityErrors.errors,r=[],n=[],a=/{([^}]+)}/g;for(const e of t){if("in-incognito"===e.errorId)continue;if("warn-not-offline-capable"===e.errorId){n.push(str_$1d(UIStrings$1d[e.errorId]));continue}const t=UIStrings$1d[e.errorId];if(void 0===t){r.push(str_$1d(UIStrings$1d.noErrorId,{errorId:e.errorId}));continue}const i=t.match(a)||[],o=e.errorArguments&&e.errorArguments.length&&e.errorArguments[0].value;if(t&&e.errorArguments.length!==i.length){const t=JSON.stringify(e.errorArguments),n=e.errorArguments.length>i.length?`${e.errorId} has unexpected arguments ${t}`:`${e.errorId} does not have the expected number of arguments.`;r.push(n)}else t&&o?r.push(str_$1d(t,{value0:o
|
|
925
|
-
const r=await ManifestValues$3.request(e,t),{i18nErrors:n,warnings:a}=InstallableManifest.getInstallabilityErrors(e),i=e.WebAppManifest?e.WebAppManifest.url:null,o=[{key:"reason",itemType:"text",text:str_$1d(UIStrings$1d.columnValue)}],l=n.map((e=>({reason:e})));r.isParseFailure&&l.push({reason:r.parseFailureReason});const c={type:"debugdata",manifestUrl:i};return l.length>0?{score:0,warnings:a,numericValue:l.length,numericUnit:"element",displayValue:str_$1d(UIStrings$1d.displayValue,{itemCount:l.length}),details:{...Audit$1e.makeTableDetails(o,l),debugData:c}}:{score:1,warnings:a,details:{...Audit$1e.makeTableDetails(o,l),debugData:c}}}}installableManifest.exports=InstallableManifest,installableManifest.exports.UIStrings=UIStrings$1d;var isOnHttps={exports:{}};const Audit$1d=audit,URL$o=urlShim,NetworkRequest$4=networkRequest,NetworkRecords$r=networkRecords,i18n$1d=i18n$2H,UIStrings$1c={
|
|
926
|
-
description:"All sites should be protected with HTTPS, even ones that don't handle sensitive data. This includes avoiding [mixed content](https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content), where some resources are loaded over HTTP despite the initial request being served over HTTPS. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](https://web.dev/is-on-https/).",displayValue:"{itemCount, plural,\n =1 {1 insecure request found}\n other {# insecure requests found}\n }",columnInsecureURL:"Insecure URL",columnResolution:"Request Resolution",allowed:"Allowed",blocked:"Blocked",warning:"Allowed with warning",upgraded:"Automatically upgraded to HTTPS"},resolutionToString={MixedContentAutomaticallyUpgraded:UIStrings$1c.upgraded,
|
|
927
|
-
MixedContentWarning:UIStrings$1c.warning},str_$1c=i18n$1d.createMessageInstanceIdFn("lighthouse-core/audits/is-on-https.js",UIStrings$1c);class HTTPS extends Audit$1d{static get meta(){return{id:"is-on-https",title:str_$1c(UIStrings$1c.title),failureTitle:str_$1c(UIStrings$1c.failureTitle),description:str_$1c(UIStrings$1c.description),requiredArtifacts:["devtoolsLogs","InspectorIssues"]}}static audit(e,t){const r=e.devtoolsLogs[Audit$1d.DEFAULT_PASS];return NetworkRecords$r.request(r,t).then((t=>{const r=t.filter((e=>!NetworkRequest$4.isSecureRequest(e))).map((e=>URL$o.elideDataURI(e.url))),n=Array.from(new Set(r)).map((e=>({url:e,resolution:void 0}))),a=[{key:"url",itemType:"url",text:str_$1c(UIStrings$1c.columnInsecureURL)},{key:"resolution",itemType:"text",text:str_$1c(UIStrings$1c.columnResolution)}];for(const t of e.InspectorIssues.mixedContent){let e=n.find((e=>e.url===t.insecureURL));e||(e={url:t.insecureURL},n.push(e)),
|
|
927
|
+
"prefer-related-applications-only-beta-stable":"prefer_related_applications is only supported on Chrome Beta and Stable channels on Android.","manifest-display-override-not-supported":"Manifest contains 'display_override' field, and the first supported display mode must be one of 'standalone', 'fullscreen', or 'minimal-ui'","manifest-location-changed":"Manifest URL changed while the manifest was being fetched.","warn-not-offline-capable":"Page does not work offline. The page will not be regarded as installable after Chrome 93, stable release August 2021.","protocol-timeout":"Lighthouse could not determine if there was a service worker. Please try with a newer version of Chrome.","pipeline-restarted":"PWA has been uninstalled and installability checks resetting."},str_$1d=i18n$1e.createMessageInstanceIdFn("lighthouse-core/audits/installable-manifest.js",UIStrings$1d);class InstallableManifest extends Audit$1e{static get meta(){return{id:"installable-manifest",
|
|
928
|
+
title:str_$1d(UIStrings$1d.title),failureTitle:str_$1d(UIStrings$1d.failureTitle),description:str_$1d(UIStrings$1d.description),supportedModes:["navigation"],requiredArtifacts:["URL","WebAppManifest","InstallabilityErrors"]}}static getInstallabilityErrors(e){const t=e.InstallabilityErrors.errors,r=[],n=[],a=/{([^}]+)}/g;for(const e of t){if("in-incognito"===e.errorId)continue;if("warn-not-offline-capable"===e.errorId){n.push(str_$1d(UIStrings$1d[e.errorId]));continue}if("pipeline-restarted"===e.errorId)continue;const t=UIStrings$1d[e.errorId];if(void 0===t){r.push(str_$1d(UIStrings$1d.noErrorId,{errorId:e.errorId}));continue}const i=t.match(a)||[],o=e.errorArguments&&e.errorArguments.length&&e.errorArguments[0].value;if(t&&e.errorArguments.length!==i.length){const t=JSON.stringify(e.errorArguments),n=e.errorArguments.length>i.length?`${e.errorId} has unexpected arguments ${t}`:`${e.errorId} does not have the expected number of arguments.`;r.push(n)}else t&&o?r.push(str_$1d(t,{value0:o
|
|
929
|
+
})):t&&r.push(str_$1d(t))}return{i18nErrors:r,warnings:n}}static async audit(e,t){const r=await ManifestValues$3.request(e,t),{i18nErrors:n,warnings:a}=InstallableManifest.getInstallabilityErrors(e),i=e.WebAppManifest?e.WebAppManifest.url:null,o=[{key:"reason",itemType:"text",text:str_$1d(UIStrings$1d.columnValue)}],l=n.map((e=>({reason:e})));r.isParseFailure&&l.push({reason:r.parseFailureReason});const c={type:"debugdata",manifestUrl:i};return l.length>0?{score:0,warnings:a,numericValue:l.length,numericUnit:"element",displayValue:str_$1d(UIStrings$1d.displayValue,{itemCount:l.length}),details:{...Audit$1e.makeTableDetails(o,l),debugData:c}}:{score:1,warnings:a,details:{...Audit$1e.makeTableDetails(o,l),debugData:c}}}}installableManifest.exports=InstallableManifest,installableManifest.exports.UIStrings=UIStrings$1d;var isOnHttps={exports:{}};const Audit$1d=audit,URL$o=urlShim,NetworkRequest$4=networkRequest,NetworkRecords$r=networkRecords,i18n$1d=i18n$2H,UIStrings$1c={
|
|
930
|
+
title:"Uses HTTPS",failureTitle:"Does not use HTTPS",description:"All sites should be protected with HTTPS, even ones that don't handle sensitive data. This includes avoiding [mixed content](https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content), where some resources are loaded over HTTP despite the initial request being served over HTTPS. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web platform APIs. [Learn more](https://web.dev/is-on-https/).",displayValue:"{itemCount, plural,\n =1 {1 insecure request found}\n other {# insecure requests found}\n }",columnInsecureURL:"Insecure URL",columnResolution:"Request Resolution",allowed:"Allowed",blocked:"Blocked",warning:"Allowed with warning",upgraded:"Automatically upgraded to HTTPS"},resolutionToString={MixedContentAutomaticallyUpgraded:UIStrings$1c.upgraded,
|
|
931
|
+
MixedContentBlocked:UIStrings$1c.blocked,MixedContentWarning:UIStrings$1c.warning},str_$1c=i18n$1d.createMessageInstanceIdFn("lighthouse-core/audits/is-on-https.js",UIStrings$1c);class HTTPS extends Audit$1d{static get meta(){return{id:"is-on-https",title:str_$1c(UIStrings$1c.title),failureTitle:str_$1c(UIStrings$1c.failureTitle),description:str_$1c(UIStrings$1c.description),requiredArtifacts:["devtoolsLogs","InspectorIssues"]}}static audit(e,t){const r=e.devtoolsLogs[Audit$1d.DEFAULT_PASS];return NetworkRecords$r.request(r,t).then((t=>{const r=t.filter((e=>!NetworkRequest$4.isSecureRequest(e))).map((e=>URL$o.elideDataURI(e.url))),n=Array.from(new Set(r)).map((e=>({url:e,resolution:void 0}))),a=[{key:"url",itemType:"url",text:str_$1c(UIStrings$1c.columnInsecureURL)},{key:"resolution",itemType:"text",text:str_$1c(UIStrings$1c.columnResolution)}];for(const t of e.InspectorIssues.mixedContent){let e=n.find((e=>e.url===t.insecureURL));e||(e={url:t.insecureURL},n.push(e)),
|
|
928
932
|
e.resolution=resolutionToString[t.resolutionStatus]?str_$1c(resolutionToString[t.resolutionStatus]):t.resolutionStatus}for(const e of n)e.resolution||(e.resolution=str_$1c(UIStrings$1c.allowed));let i;return n.length>0&&(i=str_$1c(UIStrings$1c.displayValue,{itemCount:n.length})),{score:Number(0===n.length),displayValue:i,details:Audit$1d.makeTableDetails(a,n)}}))}}isOnHttps.exports=HTTPS,isOnHttps.exports.UIStrings=UIStrings$1c;var largestContentfulPaintElement={exports:{}};const Audit$1c=audit,i18n$1c=i18n$2H,UIStrings$1b={title:"Largest Contentful Paint element",description:"This is the largest contentful element painted within the viewport. [Learn More](https://web.dev/lighthouse-largest-contentful-paint/)"},str_$1b=i18n$1c.createMessageInstanceIdFn("lighthouse-core/audits/largest-contentful-paint-element.js",UIStrings$1b);class LargestContentfulPaintElement extends Audit$1c{static get meta(){return{id:"largest-contentful-paint-element",title:str_$1b(UIStrings$1b.title),
|
|
929
933
|
description:str_$1b(UIStrings$1b.description),scoreDisplayMode:Audit$1c.SCORING_MODES.INFORMATIVE,supportedModes:["navigation"],requiredArtifacts:["traces","TraceElements"]}}static audit(e){const t=e.TraceElements.find((e=>"largest-contentful-paint"===e.traceEventType)),r=[];t&&r.push({node:Audit$1c.makeNodeItem(t.node)});const n=[{key:"node",itemType:"node",text:str_$1b(i18n$1c.UIStrings.columnElement)}],a=Audit$1c.makeTableDetails(n,r),i=str_$1b(i18n$1c.UIStrings.displayValueElementsFound,{nodeCount:r.length});return{score:1,notApplicable:0===r.length,displayValue:i,details:a}}}largestContentfulPaintElement.exports=LargestContentfulPaintElement,largestContentfulPaintElement.exports.UIStrings=UIStrings$1b;var layoutShiftElements={exports:{}};
|
|
930
934
|
/**
|
|
@@ -945,10 +949,10 @@ description:"Transitions should feel snappy as you tap around, even on a slow ne
|
|
|
945
949
|
description:"A maskable icon ensures that the image fills the entire shape without being letterboxed when installing the app on a device. [Learn more](https://web.dev/maskable-icon-audit/)."},str_$13=i18n$14.createMessageInstanceIdFn("lighthouse-core/audits/maskable-icon.js",UIStrings$13);class MaskableIcon extends Audit$16{static get meta(){return{id:"maskable-icon",title:str_$13(UIStrings$13.title),failureTitle:str_$13(UIStrings$13.failureTitle),description:str_$13(UIStrings$13.description),supportedModes:["navigation"],requiredArtifacts:["WebAppManifest","InstallabilityErrors"]}}static async audit(e,t){const r=await ManifestValues$2.request(e,t);if(r.isParseFailure)return{score:0,explanation:r.parseFailureReason};const n=r.allChecks.find((e=>"hasMaskableIcon"===e.id));return{score:n&&n.passing?1:0}}}maskableIcon.exports=MaskableIcon,maskableIcon.exports.UIStrings=UIStrings$13;var encoder={exports:{}};!function(e){function JPEGEncoder(e){
|
|
946
950
|
var t,r,n,a,i,o=Math.floor,l=new Array(64),c=new Array(64),u=new Array(64),p=new Array(64),f=new Array(65535),b=new Array(65535),S=new Array(64),_=new Array(64),T=[],E=0,$=7,A=new Array(64),I=new Array(64),R=new Array(64),x=new Array(256),D=new Array(2048),C=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],k=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],N=[0,1,2,3,4,5,6,7,8,9,10,11],L=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],M=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],U=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],O=[0,1,2,3,4,5,6,7,8,9,10,11],P=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],F=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250]
|
|
947
951
|
;function computeHuffmanTbl(e,t){for(var r=0,n=0,a=new Array,i=1;i<=16;i++){for(var o=1;o<=e[i];o++)a[t[n]]=[],a[t[n]][0]=r,a[t[n]][1]=i,n++,r++;r*=2}return a}function writeBits(e){for(var t=e[0],r=e[1]-1;r>=0;)t&1<<r&&(E|=1<<$),r--,--$<0&&(255==E?(writeByte(255),writeByte(0)):writeByte(E),$=7,E=0)}function writeByte(e){T.push(e)}function writeWord(e){writeByte(e>>8&255),writeByte(255&e)}function processDU(e,t,r,n,a){for(var i,o=a[0],l=a[240],c=function fDCTQuant(e,t){var r,n,a,i,o,l,c,u,p,f,b=0;for(p=0;p<8;++p){r=e[b],n=e[b+1],a=e[b+2],i=e[b+3],o=e[b+4],l=e[b+5],c=e[b+6];var _=r+(u=e[b+7]),T=r-u,E=n+c,$=n-c,A=a+l,I=a-l,R=i+o,x=i-o,D=_+R,C=_-R,k=E+A,N=E-A;e[b]=D+k,e[b+4]=D-k;var L=.707106781*(N+C);e[b+2]=C+L,e[b+6]=C-L;var M=.382683433*((D=x+I)-(N=$+T)),U=.5411961*D+M,O=1.306562965*N+M,P=.707106781*(k=I+$),F=T+P,B=T-P;e[b+5]=B+U,e[b+3]=B-U,e[b+1]=F+O,e[b+7]=F-O,b+=8}for(b=0,p=0;p<8;++p){r=e[b],n=e[b+8],a=e[b+16],i=e[b+24],o=e[b+32],l=e[b+40],c=e[b+48]
|
|
948
|
-
;var j=r+(u=e[b+56]),q=r-u,H=n+c,z=n-c,G=a+l,V=a-l,W=i+o,Y=i-o,K=j+W,
|
|
952
|
+
;var j=r+(u=e[b+56]),q=r-u,H=n+c,z=n-c,G=a+l,V=a-l,W=i+o,Y=i-o,K=j+W,J=j-W,Z=H+G,X=H-G;e[b]=K+Z,e[b+32]=K-Z;var Q=.707106781*(X+J);e[b+16]=J+Q,e[b+48]=J-Q;var ee=.382683433*((K=Y+V)-(X=z+q)),te=.5411961*K+ee,re=1.306562965*X+ee,ne=.707106781*(Z=V+z),ae=q+ne,ie=q-ne;e[b+40]=ie+te,e[b+24]=ie-te,e[b+8]=ae+re,e[b+56]=ae-re,b++}for(p=0;p<64;++p)f=e[p]*t[p],S[p]=f>0?f+.5|0:f-.5|0;return S}(e,t),u=0;u<64;++u)_[C[u]]=c[u];var p=_[0]-r;r=_[0],0==p?writeBits(n[0]):(writeBits(n[b[i=32767+p]]),writeBits(f[i]));for(var T=63;T>0&&0==_[T];T--);if(0==T)return writeBits(o),r;for(var E,$=1;$<=T;){for(var A=$;0==_[$]&&$<=T;++$);var I=$-A;if(I>=16){E=I>>4;for(var R=1;R<=E;++R)writeBits(l);I&=15}i=32767+_[$],writeBits(a[(I<<4)+b[i]]),writeBits(f[i]),$++}return 63!=T&&writeBits(o),r}function setQuality(e){if(e<=0&&(e=1),e>100&&(e=100),i!=e){(function initQuantTables(e){
|
|
949
953
|
for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],r=0;r<64;r++){var n=o((t[r]*e+50)/100);n<1?n=1:n>255&&(n=255),l[C[r]]=n}for(var a=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],i=0;i<64;i++){var f=o((a[i]*e+50)/100);f<1?f=1:f>255&&(f=255),c[C[i]]=f}for(var b=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],S=0,_=0;_<8;_++)for(var T=0;T<8;T++)u[S]=1/(l[C[S]]*b[_]*b[T]*8),p[S]=1/(c[C[S]]*b[_]*b[T]*8),S++})(e<50?Math.floor(5e3/e):Math.floor(200-2*e)),i=e}}this.encode=function(e,i){(new Date).getTime(),i&&setQuality(i),T=new Array,E=0,$=7,writeWord(65496),function writeAPP0(){writeWord(65504),writeWord(16),writeByte(74),writeByte(70),writeByte(73),
|
|
950
954
|
writeByte(70),writeByte(0),writeByte(1),writeByte(1),writeByte(0),writeWord(1),writeWord(1),writeByte(0),writeByte(0)}(),function writeAPP1(e){if(e){writeWord(65505),69===e[0]&&120===e[1]&&105===e[2]&&102===e[3]?writeWord(e.length+2):(writeWord(e.length+5+2),writeByte(69),writeByte(120),writeByte(105),writeByte(102),writeByte(0));for(var t=0;t<e.length;t++)writeByte(e[t])}}(e.exifBuffer),function writeDQT(){writeWord(65499),writeWord(132),writeByte(0);for(var e=0;e<64;e++)writeByte(l[e]);writeByte(1);for(var t=0;t<64;t++)writeByte(c[t])}(),function writeSOF0(e,t){writeWord(65472),writeWord(17),writeByte(8),writeWord(t),writeWord(e),writeByte(3),writeByte(1),writeByte(17),writeByte(0),writeByte(2),writeByte(17),writeByte(1),writeByte(3),writeByte(17),writeByte(1)}(e.width,e.height),function writeDHT(){writeWord(65476),writeWord(418),writeByte(0);for(var e=0;e<16;e++)writeByte(k[e+1]);for(var t=0;t<=11;t++)writeByte(N[t]);writeByte(16);for(var r=0;r<16;r++)writeByte(L[r+1])
|
|
951
|
-
;for(var n=0;n<=161;n++)writeByte(M[n]);writeByte(1);for(var a=0;a<16;a++)writeByte(U[a+1]);for(var i=0;i<=11;i++)writeByte(O[i]);writeByte(17);for(var o=0;o<16;o++)writeByte(P[o+1]);for(var l=0;l<=161;l++)writeByte(F[l])}(),function writeSOS(){writeWord(65498),writeWord(12),writeByte(3),writeByte(1),writeByte(0),writeByte(2),writeByte(17),writeByte(3),writeByte(17),writeByte(0),writeByte(63),writeByte(0)}();var o=0,f=0,b=0;E=0,$=7,this.encode.displayName="_encode_";for(var S,_,x,C,B,j,q,H,z,G=e.data,V=e.width,W=e.height,Y=4*V,K=0;K<W;){for(S=0;S<Y;){for(j=B=Y*K+S,q=-1,H=0,z=0;z<64;z++)j=B+(H=z>>3)*Y+(q=4*(7&z)),K+H>=W&&(j-=Y*(K+1+H-W)),S+q>=Y&&(j-=S+q-Y+4),_=G[j++],x=G[j++],C=G[j++],A[z]=(D[_]+D[x+256>>0]+D[C+512>>0]>>16)-128,I[z]=(D[_+768>>0]+D[x+1024>>0]+D[C+1280>>0]>>16)-128,R[z]=(D[_+1280>>0]+D[x+1536>>0]+D[C+1792>>0]>>16)-128;o=processDU(A,u,o,t,n),f=processDU(I,p,f,r,a),b=processDU(R,p,b,r,a),S+=32}K+=8}if($>=0){var
|
|
955
|
+
;for(var n=0;n<=161;n++)writeByte(M[n]);writeByte(1);for(var a=0;a<16;a++)writeByte(U[a+1]);for(var i=0;i<=11;i++)writeByte(O[i]);writeByte(17);for(var o=0;o<16;o++)writeByte(P[o+1]);for(var l=0;l<=161;l++)writeByte(F[l])}(),function writeSOS(){writeWord(65498),writeWord(12),writeByte(3),writeByte(1),writeByte(0),writeByte(2),writeByte(17),writeByte(3),writeByte(17),writeByte(0),writeByte(63),writeByte(0)}();var o=0,f=0,b=0;E=0,$=7,this.encode.displayName="_encode_";for(var S,_,x,C,B,j,q,H,z,G=e.data,V=e.width,W=e.height,Y=4*V,K=0;K<W;){for(S=0;S<Y;){for(j=B=Y*K+S,q=-1,H=0,z=0;z<64;z++)j=B+(H=z>>3)*Y+(q=4*(7&z)),K+H>=W&&(j-=Y*(K+1+H-W)),S+q>=Y&&(j-=S+q-Y+4),_=G[j++],x=G[j++],C=G[j++],A[z]=(D[_]+D[x+256>>0]+D[C+512>>0]>>16)-128,I[z]=(D[_+768>>0]+D[x+1024>>0]+D[C+1280>>0]>>16)-128,R[z]=(D[_+1280>>0]+D[x+1536>>0]+D[C+1792>>0]>>16)-128;o=processDU(A,u,o,t,n),f=processDU(I,p,f,r,a),b=processDU(R,p,b,r,a),S+=32}K+=8}if($>=0){var J=[];J[1]=$+1,J[0]=(1<<$+1)-1,writeBits(J)}
|
|
952
956
|
return writeWord(65497),new Buffer$2(T)},function init(){(new Date).getTime(),e||(e=50),function initCharLookupTable(){for(var e=String.fromCharCode,t=0;t<256;t++)x[t]=e(t)}(),function initHuffmanTbl(){t=computeHuffmanTbl(k,N),r=computeHuffmanTbl(U,O),n=computeHuffmanTbl(L,M),a=computeHuffmanTbl(P,F)}(),function initCategoryNumber(){for(var e=1,t=2,r=1;r<=15;r++){for(var n=e;n<t;n++)b[32767+n]=r,f[32767+n]=[],f[32767+n][1]=r,f[32767+n][0]=n;for(var a=-(t-1);a<=-e;a++)b[32767+a]=r,f[32767+a]=[],f[32767+a][1]=r,f[32767+a][0]=t-1+a;e<<=1,t<<=1}}(),function initRGBYUVTable(){for(var e=0;e<256;e++)D[e]=19595*e,D[e+256>>0]=38470*e,D[e+512>>0]=7471*e+32768,D[e+768>>0]=-11059*e,D[e+1024>>0]=-21709*e,D[e+1280>>0]=32768*e+8421375,D[e+1536>>0]=-27439*e,D[e+1792>>0]=-5329*e}(),setQuality(e),(new Date).getTime()}()}e.exports=function encode(e,t){void 0===t&&(t=50);return{data:new JPEGEncoder(t).encode(e,t),width:e.width,height:e.height}}}(encoder);var decoder={exports:{}},module,JpegImage
|
|
953
957
|
;module=decoder,JpegImage=function jpegImage(){var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,r=799,n=3406,a=2276,i=1567,o=3784,l=5793,c=2896;function constructor(){}function buildHuffmanTable(e,t){for(var r,n,a=0,i=[],o=16;o>0&&!e[o-1];)o--;i.push({children:[],index:0});var l,c=i[0];for(r=0;r<o;r++){for(n=0;n<e[r];n++){for((c=i.pop()).children[c.index]=t[a];c.index>0;){if(0===i.length)throw new Error("Could not recreate Huffman Table");c=i.pop()}for(c.index++,i.push(c);i.length<=r;)i.push(l={children:[],index:0}),c.children[c.index]=l.children,c=l;a++}r+1<o&&(i.push(l={children:[],index:0}),c.children[c.index]=l.children,c=l)}return i[0].children}function decodeScan(t,r,n,a,i,o,l,c,u,p){n.precision,n.samplesPerLine,n.scanLines;var f=n.mcusPerLine,b=n.progressive;n.maxH,n.maxV;var S=r,_=0,T=0;function readBit(){
|
|
954
958
|
if(T>0)return T--,_>>T&1;if(255==(_=t[r++])){var e=t[r++];if(e)throw new Error("unexpected marker: "+(_<<8|e).toString(16))}return T=7,_>>>7}function decodeHuffman(e){for(var t,r=e;null!==(t=readBit());){if("number"==typeof(r=r[t]))return r;if("object"!=typeof r)throw new Error("invalid huffman sequence")}return null}function receive(e){for(var t=0;e>0;){var r=readBit();if(null===r)return;t=t<<1|r,e--}return t}function receiveAndExtend(e){var t=receive(e);return t>=1<<e-1?t:t+(-1<<e)+1}var E,$=0,A=0;function decodeMcu(e,t,r,n,a){var i=r%f,o=(r/f|0)*e.v+n,l=i*e.h+a;void 0===e.blocks[o]&&p.tolerantDecoding||t(e,e.blocks[o][l])}function decodeBlock(e,t,r){var n=r/e.blocksPerLine|0,a=r%e.blocksPerLine;void 0===e.blocks[n]&&p.tolerantDecoding||t(e,e.blocks[n][a])}var I,R,x,D,C,k,N=a.length;k=b?0===o?0===c?function decodeDCFirst(e,t){var r=decodeHuffman(e.huffmanTableDC),n=0===r?0:receiveAndExtend(r)<<u;t[0]=e.pred+=n}:function decodeDCSuccessive(e,t){t[0]|=readBit()<<u
|
|
@@ -1014,15 +1018,15 @@ resourceType:e.resourceType,lrEndTimeDeltaMs:t,lrTCPMs:r,lrRequestMs:n,lrRespons
|
|
|
1014
1018
|
description:"Network round trip times (RTT) have a large impact on performance. If the RTT to an origin is high, it's an indication that servers closer to the user could improve performance. [Learn more](https://hpbn.co/primer-on-latency-and-bandwidth/)."},str_$W=i18n$X.createMessageInstanceIdFn("lighthouse-core/audits/network-rtt.js",UIStrings$W);class NetworkRTT extends Audit$W{static get meta(){return{id:"network-rtt",scoreDisplayMode:Audit$W.SCORING_MODES.INFORMATIVE,title:str_$W(UIStrings$W.title),description:str_$W(UIStrings$W.description),requiredArtifacts:["devtoolsLogs"]}}static async audit(e,t){const r=e.devtoolsLogs[Audit$W.DEFAULT_PASS];if(!(await NetworkRecords$o.request(r,t)).length)return{score:1,notApplicable:!0};const n=await NetworkAnalysisComputed$1.request(r,t);let a=0;const i=n.rtt,o=[];for(const[e,t]of n.additionalRttByOrigin.entries()){if(!e.startsWith("http"))continue;const r=t+i;o.push({origin:e,rtt:r}),a=Number.isFinite(r)?Math.max(r,a):a}
|
|
1015
1019
|
o.sort(((e,t)=>t.rtt-e.rtt));const l=[{key:"origin",itemType:"text",text:str_$W(i18n$X.UIStrings.columnURL)},{key:"rtt",itemType:"ms",granularity:1,text:str_$W(i18n$X.UIStrings.columnTimeSpent)}],c=Audit$W.makeTableDetails(l,o);return{score:1,numericValue:a,numericUnit:"millisecond",displayValue:str_$W(i18n$X.UIStrings.ms,{timeInMs:a}),details:c}}}networkRtt.exports=NetworkRTT,networkRtt.exports.UIStrings=UIStrings$W;var networkServerLatency={exports:{}};const Audit$V=audit,i18n$W=i18n$2H,NetworkRecords$n=networkRecords,NetworkAnalysisComputed=networkAnalysis,UIStrings$V={title:"Server Backend Latencies",description:"Server latencies can impact web performance. If the server latency of an origin is high, it's an indication the server is overloaded or has poor backend performance. [Learn more](https://hpbn.co/primer-on-web-performance/#analyzing-the-resource-waterfall)."},str_$V=i18n$W.createMessageInstanceIdFn("lighthouse-core/audits/network-server-latency.js",UIStrings$V)
|
|
1016
1020
|
;class NetworkServerLatency extends Audit$V{static get meta(){return{id:"network-server-latency",scoreDisplayMode:Audit$V.SCORING_MODES.INFORMATIVE,title:str_$V(UIStrings$V.title),description:str_$V(UIStrings$V.description),requiredArtifacts:["devtoolsLogs"]}}static async audit(e,t){const r=e.devtoolsLogs[Audit$V.DEFAULT_PASS];if(!(await NetworkRecords$n.request(r,t)).length)return{score:1,notApplicable:!0};const n=await NetworkAnalysisComputed.request(r,t);let a=0;const i=[];for(const[e,t]of n.serverResponseTimeByOrigin.entries())e.startsWith("http")&&(a=Math.max(t,a),i.push({origin:e,serverResponseTime:t}));i.sort(((e,t)=>t.serverResponseTime-e.serverResponseTime));const o=[{key:"origin",itemType:"text",text:str_$V(i18n$W.UIStrings.columnURL)},{key:"serverResponseTime",itemType:"ms",granularity:1,text:str_$V(i18n$W.UIStrings.columnTimeSpent)}],l=Audit$V.makeTableDetails(o,i);return{score:Math.max(1-a/500,0),numericValue:a,numericUnit:"millisecond",
|
|
1017
|
-
displayValue:str_$V(i18n$W.UIStrings.ms,{timeInMs:a}),details:l}}}networkServerLatency.exports=NetworkServerLatency,networkServerLatency.exports.UIStrings=UIStrings$V;var noUnloadListeners={exports:{}};const Audit$U=audit,i18n$V=i18n$2H,UIStrings$U={title:"Avoids `unload` event listeners",failureTitle:"Registers an `unload` listener",description:"The `unload` event does not fire reliably and listening for it can prevent browser optimizations like the Back-Forward Cache. Consider using the `pagehide` or `visibilitychange` events instead. [Learn more](https://developers.google.com/web/updates/2018/07/page-lifecycle-api#the-unload-event)"},str_$U=i18n$V.createMessageInstanceIdFn("lighthouse-core/audits/no-unload-listeners.js",UIStrings$U);class NoUnloadListeners extends Audit$U{static get meta(){return{id:"no-unload-listeners",title:str_$U(UIStrings$U.title),failureTitle:str_$U(UIStrings$U.failureTitle),description:str_$U(UIStrings$U.description),
|
|
1018
|
-
requiredArtifacts:["GlobalListeners","JsUsage"]}}static audit(e){const
|
|
1019
|
-
displayValue:"{itemCount, plural,\n =1 {# animated element found}\n other {# animated elements found}\n }",unsupportedCSSProperty:"{propertyCount, plural,\n =1 {Unsupported CSS Property: {properties}}\n other {Unsupported CSS Properties: {properties}}\n }",transformDependsBoxSize:"Transform-related property depends on box size",filterMayMovePixels:"Filter-related property may move pixels",nonReplaceCompositeMode:'Effect has composite mode other than "replace"',incompatibleAnimations:"Target has another animation which is incompatible",unsupportedTimingParameters:"Effect has unsupported timing parameters"},str_$T=i18n$U.createMessageInstanceIdFn("lighthouse-core/audits/non-composited-animations.js",UIStrings$T),ACTIONABLE_FAILURE_REASONS=[{flag:8192,text:UIStrings$T.unsupportedCSSProperty},{flag:2048,text:UIStrings$T.transformDependsBoxSize
|
|
1020
|
-
text:UIStrings$T.incompatibleAnimations},{flag:8,text:UIStrings$T.unsupportedTimingParameters}];function getActionableFailureReasons(e,t){return ACTIONABLE_FAILURE_REASONS.filter((t=>e&t.flag)).map((e=>e.text===UIStrings$T.unsupportedCSSProperty?str_$T(e.text,{propertyCount:t.length,properties:t.join(", ")}):str_$T(e.text)))}class NonCompositedAnimations extends Audit$T{static get meta(){return{id:"non-composited-animations",scoreDisplayMode:Audit$T.SCORING_MODES.INFORMATIVE,title:str_$T(UIStrings$T.title),description:str_$T(UIStrings$T.description),requiredArtifacts:["TraceElements","HostUserAgent"]}}static async audit(e){const t=e.HostUserAgent.match(/Chrome\/(\d+)/);if(!t||Number(t[1])<86)return{score:1,notApplicable:!0};const r=[];let n=!1;e.TraceElements.forEach((e=>{if("animation"!==e.traceEventType)return;const t=e.animations||[],a=new Map
|
|
1021
|
-
;for(const r of t){e&&(n=!0);const t=a.get(e)||new Set;t.add(r),a.set(e,t)}}if(!a.size)return;const i=[];for(const[e,t]of a)for(const r of t)i.push({failureReason:r,animation:e});r.push({node:Audit$T.makeNodeItem(e.node),subItems:{type:"subitems",items:i}})}));const a=[{key:"node",itemType:"node",subItemsHeading:{key:"failureReason",itemType:"text"},text:str_$T(i18n$U.UIStrings.columnElement)}];n&&a.push({key:null,itemType:"text",subItemsHeading:{key:"animation",itemType:"text"},text:str_$T(i18n$U.UIStrings.columnName)});const i=Audit$T.makeTableDetails(a,r);let o;return r.length>0&&(o=str_$T(UIStrings$T.displayValue,{itemCount:r.length})),{score:0===r.length?1:0,notApplicable:0===r.length,details:i,displayValue:o}}}nonCompositedAnimations.exports=NonCompositedAnimations,nonCompositedAnimations.exports.UIStrings=UIStrings$T;var oopifIframeTestAudit={meta:{
|
|
1022
|
-
description:"Audit to force the inclusion of IFrameElements artifact",requiredArtifacts:["IFrameElements"]},audit:()=>({score:1})},performanceBudget={exports:{}};const makeComputedArtifact$8=computedArtifact,NetworkRecords$m=networkRecords,URL$m=urlShim,NetworkRequest$3=networkRequest,Budget$3=budget,{Util}=utilCommonjs;class ResourceSummary$2{static determineResourceType(e){if(!e.resourceType)return"other";return{Stylesheet:"stylesheet",Image:"image",Media:"media",Font:"font",Script:"script",Document:"document"}[e.resourceType]||"other"}static summarize(e,t,r){const n={stylesheet:{count:0,resourceSize:0,transferSize:0},image:{count:0,resourceSize:0,transferSize:0},media:{count:0,resourceSize:0,transferSize:0},font:{count:0,resourceSize:0,transferSize:0},script:{count:0,resourceSize:0,transferSize:0},document:{count:0,resourceSize:0,transferSize:0},other:{count:0,resourceSize:0,transferSize:0},total:{
|
|
1023
|
-
transferSize:0}},a=Budget$3.getMatchingBudget(r,t);let i=[];if(a&&a.options&&a.options.firstPartyHostnames)i=a.options.firstPartyHostnames;else{const e=Util.getRootDomain(t);i=[`*.${e}`]}return e.filter((e=>("other"!==this.determineResourceType(e)||!e.url.endsWith("/favicon.ico"))&&!NetworkRequest$3.isNonNetworkRequest(e))).forEach((e=>{const t=this.determineResourceType(e);n[t].count++,n[t].resourceSize+=e.resourceSize,n[t].transferSize+=e.transferSize,n.total.count++,n.total.resourceSize+=e.resourceSize,n.total.transferSize+=e.transferSize;i.some((t=>{const r=new URL$m(e.url);return t.startsWith("*.")?r.hostname.endsWith(t.slice(2)):r.hostname===t}))||(n["third-party"].count++,n["third-party"].resourceSize+=e.resourceSize,n["third-party"].transferSize+=e.transferSize)})),n}static async compute_(e,t){const r=await NetworkRecords$m.request(e.devtoolsLog,t)
|
|
1024
|
-
;const Audit$S=audit,ResourceSummary$1=resourceSummary$1,MainResource$c=mainResource,Budget$2=budget,i18n$T=i18n$2H,UIStrings$S={title:"Performance budget",description:"Keep the quantity and size of network requests under the targets set by the provided performance budget. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/budgets).",requestCountOverBudget:"{count, plural,\n =1 {1 request}\n other {# requests}\n }"},str_$S=i18n$T.createMessageInstanceIdFn("lighthouse-core/audits/performance-budget.js",UIStrings$S);class ResourceBudget extends Audit$S{static get meta(){return{id:"performance-budget",title:str_$S(UIStrings$S.title),description:str_$S(UIStrings$S.description),scoreDisplayMode:Audit$S.SCORING_MODES.INFORMATIVE,supportedModes:["navigation"],requiredArtifacts:["devtoolsLogs","URL"]}}static getRowLabel(e){return{
|
|
1025
|
-
stylesheet:i18n$T.UIStrings.stylesheetResourceType,image:i18n$T.UIStrings.imageResourceType,media:i18n$T.UIStrings.mediaResourceType,font:i18n$T.UIStrings.fontResourceType,other:i18n$T.UIStrings.otherResourceType,"third-party":i18n$T.UIStrings.thirdPartyResourceType}[e]}static tableItems(e,t){return Object.keys(t).map((r=>{const n=str_$S(this.getRowLabel(r)),a=t[r].count,i=t[r].transferSize;let o,l;if(e.resourceSizes){const t=e.resourceSizes.find((e=>e.resourceType===r));t&&i>1024*t.budget&&(o=i-1024*t.budget)}if(e.resourceCounts){const t=e.resourceCounts.find((e=>e.resourceType===r));if(t&&a>t.budget){const e=a-t.budget;l=str_$S(UIStrings$S.requestCountOverBudget,{count:e})}}return{resourceType:r,label:n,requestCount:a,transferSize:i,countOverBudget:l,sizeOverBudget:o}
|
|
1021
|
+
displayValue:str_$V(i18n$W.UIStrings.ms,{timeInMs:a}),details:l}}}networkServerLatency.exports=NetworkServerLatency,networkServerLatency.exports.UIStrings=UIStrings$V;var noUnloadListeners={exports:{}};const Audit$U=audit,JsBundles$1=jsBundles,i18n$V=i18n$2H,UIStrings$U={title:"Avoids `unload` event listeners",failureTitle:"Registers an `unload` listener",description:"The `unload` event does not fire reliably and listening for it can prevent browser optimizations like the Back-Forward Cache. Consider using the `pagehide` or `visibilitychange` events instead. [Learn more](https://developers.google.com/web/updates/2018/07/page-lifecycle-api#the-unload-event)"},str_$U=i18n$V.createMessageInstanceIdFn("lighthouse-core/audits/no-unload-listeners.js",UIStrings$U);class NoUnloadListeners extends Audit$U{static get meta(){return{id:"no-unload-listeners",title:str_$U(UIStrings$U.title),failureTitle:str_$U(UIStrings$U.failureTitle),description:str_$U(UIStrings$U.description),
|
|
1022
|
+
requiredArtifacts:["GlobalListeners","JsUsage","SourceMaps","ScriptElements"]}}static async audit(e,t){const r=e.GlobalListeners.filter((e=>"unload"===e.type));if(!r.length)return{score:1};const n=await JsBundles$1.request(e,t),a=[{key:"source",itemType:"source-location",text:str_$U(i18n$V.UIStrings.columnSource)}],i=new Map;for(const[t,r]of Object.entries(e.JsUsage))for(const e of r)i.set(e.scriptId,t);const o=r.map((e=>{const t=i.get(e.scriptId);if(!t)return{source:{type:"url",value:"(unknown)"}};const r=n.find((e=>e.script.src===t));return{source:Audit$U.makeSourceLocation(t,e.lineNumber,e.columnNumber,r)}}));return{score:0,details:Audit$U.makeTableDetails(a,o)}}}noUnloadListeners.exports=NoUnloadListeners,noUnloadListeners.exports.UIStrings=UIStrings$U;var nonCompositedAnimations={exports:{}};const Audit$T=audit,i18n$U=i18n$2H,UIStrings$T={title:"Avoid non-composited animations",
|
|
1023
|
+
description:"Animations which are not composited can be janky and increase CLS. [Learn more](https://web.dev/non-composited-animations)",displayValue:"{itemCount, plural,\n =1 {# animated element found}\n other {# animated elements found}\n }",unsupportedCSSProperty:"{propertyCount, plural,\n =1 {Unsupported CSS Property: {properties}}\n other {Unsupported CSS Properties: {properties}}\n }",transformDependsBoxSize:"Transform-related property depends on box size",filterMayMovePixels:"Filter-related property may move pixels",nonReplaceCompositeMode:'Effect has composite mode other than "replace"',incompatibleAnimations:"Target has another animation which is incompatible",unsupportedTimingParameters:"Effect has unsupported timing parameters"},str_$T=i18n$U.createMessageInstanceIdFn("lighthouse-core/audits/non-composited-animations.js",UIStrings$T),ACTIONABLE_FAILURE_REASONS=[{flag:8192,text:UIStrings$T.unsupportedCSSProperty},{flag:2048,text:UIStrings$T.transformDependsBoxSize
|
|
1024
|
+
},{flag:4096,text:UIStrings$T.filterMayMovePixels},{flag:16,text:UIStrings$T.nonReplaceCompositeMode},{flag:64,text:UIStrings$T.incompatibleAnimations},{flag:8,text:UIStrings$T.unsupportedTimingParameters}];function getActionableFailureReasons(e,t){return ACTIONABLE_FAILURE_REASONS.filter((t=>e&t.flag)).map((e=>e.text===UIStrings$T.unsupportedCSSProperty?str_$T(e.text,{propertyCount:t.length,properties:t.join(", ")}):str_$T(e.text)))}class NonCompositedAnimations extends Audit$T{static get meta(){return{id:"non-composited-animations",scoreDisplayMode:Audit$T.SCORING_MODES.INFORMATIVE,title:str_$T(UIStrings$T.title),description:str_$T(UIStrings$T.description),requiredArtifacts:["TraceElements","HostUserAgent"]}}static async audit(e){const t=e.HostUserAgent.match(/Chrome\/(\d+)/);if(!t||Number(t[1])<86)return{score:1,notApplicable:!0};const r=[];let n=!1;e.TraceElements.forEach((e=>{if("animation"!==e.traceEventType)return;const t=e.animations||[],a=new Map
|
|
1025
|
+
;for(const{name:e,failureReasonsMask:r,unsupportedProperties:i}of t){if(!r)continue;const t=getActionableFailureReasons(r,i||[]);for(const r of t){e&&(n=!0);const t=a.get(e)||new Set;t.add(r),a.set(e,t)}}if(!a.size)return;const i=[];for(const[e,t]of a)for(const r of t)i.push({failureReason:r,animation:e});r.push({node:Audit$T.makeNodeItem(e.node),subItems:{type:"subitems",items:i}})}));const a=[{key:"node",itemType:"node",subItemsHeading:{key:"failureReason",itemType:"text"},text:str_$T(i18n$U.UIStrings.columnElement)}];n&&a.push({key:null,itemType:"text",subItemsHeading:{key:"animation",itemType:"text"},text:str_$T(i18n$U.UIStrings.columnName)});const i=Audit$T.makeTableDetails(a,r);let o;return r.length>0&&(o=str_$T(UIStrings$T.displayValue,{itemCount:r.length})),{score:0===r.length?1:0,notApplicable:0===r.length,details:i,displayValue:o}}}nonCompositedAnimations.exports=NonCompositedAnimations,nonCompositedAnimations.exports.UIStrings=UIStrings$T;var oopifIframeTestAudit={meta:{
|
|
1026
|
+
id:"oopif-iframe-test-audit",title:"IFrame Elements",failureTitle:"IFrame Elements",description:"Audit to force the inclusion of IFrameElements artifact",requiredArtifacts:["IFrameElements"]},audit:()=>({score:1})},performanceBudget={exports:{}};const makeComputedArtifact$8=computedArtifact,NetworkRecords$m=networkRecords,URL$m=urlShim,NetworkRequest$3=networkRequest,Budget$3=budget,{Util}=utilCommonjs;class ResourceSummary$2{static determineResourceType(e){if(!e.resourceType)return"other";return{Stylesheet:"stylesheet",Image:"image",Media:"media",Font:"font",Script:"script",Document:"document"}[e.resourceType]||"other"}static summarize(e,t,r){const n={stylesheet:{count:0,resourceSize:0,transferSize:0},image:{count:0,resourceSize:0,transferSize:0},media:{count:0,resourceSize:0,transferSize:0},font:{count:0,resourceSize:0,transferSize:0},script:{count:0,resourceSize:0,transferSize:0},document:{count:0,resourceSize:0,transferSize:0},other:{count:0,resourceSize:0,transferSize:0},total:{
|
|
1027
|
+
count:0,resourceSize:0,transferSize:0},"third-party":{count:0,resourceSize:0,transferSize:0}},a=Budget$3.getMatchingBudget(r,t);let i=[];if(a&&a.options&&a.options.firstPartyHostnames)i=a.options.firstPartyHostnames;else{const e=Util.getRootDomain(t);i=[`*.${e}`]}return e.filter((e=>("other"!==this.determineResourceType(e)||!e.url.endsWith("/favicon.ico"))&&!NetworkRequest$3.isNonNetworkRequest(e))).forEach((e=>{const t=this.determineResourceType(e);n[t].count++,n[t].resourceSize+=e.resourceSize,n[t].transferSize+=e.transferSize,n.total.count++,n.total.resourceSize+=e.resourceSize,n.total.transferSize+=e.transferSize;i.some((t=>{const r=new URL$m(e.url);return t.startsWith("*.")?r.hostname.endsWith(t.slice(2)):r.hostname===t}))||(n["third-party"].count++,n["third-party"].resourceSize+=e.resourceSize,n["third-party"].transferSize+=e.transferSize)})),n}static async compute_(e,t){const r=await NetworkRecords$m.request(e.devtoolsLog,t)
|
|
1028
|
+
;return ResourceSummary$2.summarize(r,e.URL.finalUrl,e.budgets)}}var resourceSummary$1=makeComputedArtifact$8(ResourceSummary$2);const Audit$S=audit,ResourceSummary$1=resourceSummary$1,MainResource$c=mainResource,Budget$2=budget,i18n$T=i18n$2H,UIStrings$S={title:"Performance budget",description:"Keep the quantity and size of network requests under the targets set by the provided performance budget. [Learn more](https://developers.google.com/web/tools/lighthouse/audits/budgets).",requestCountOverBudget:"{count, plural,\n =1 {1 request}\n other {# requests}\n }"},str_$S=i18n$T.createMessageInstanceIdFn("lighthouse-core/audits/performance-budget.js",UIStrings$S);class ResourceBudget extends Audit$S{static get meta(){return{id:"performance-budget",title:str_$S(UIStrings$S.title),description:str_$S(UIStrings$S.description),scoreDisplayMode:Audit$S.SCORING_MODES.INFORMATIVE,supportedModes:["navigation"],requiredArtifacts:["devtoolsLogs","URL"]}}static getRowLabel(e){return{
|
|
1029
|
+
total:i18n$T.UIStrings.totalResourceType,document:i18n$T.UIStrings.documentResourceType,script:i18n$T.UIStrings.scriptResourceType,stylesheet:i18n$T.UIStrings.stylesheetResourceType,image:i18n$T.UIStrings.imageResourceType,media:i18n$T.UIStrings.mediaResourceType,font:i18n$T.UIStrings.fontResourceType,other:i18n$T.UIStrings.otherResourceType,"third-party":i18n$T.UIStrings.thirdPartyResourceType}[e]}static tableItems(e,t){return Object.keys(t).map((r=>{const n=str_$S(this.getRowLabel(r)),a=t[r].count,i=t[r].transferSize;let o,l;if(e.resourceSizes){const t=e.resourceSizes.find((e=>e.resourceType===r));t&&i>1024*t.budget&&(o=i-1024*t.budget)}if(e.resourceCounts){const t=e.resourceCounts.find((e=>e.resourceType===r));if(t&&a>t.budget){const e=a-t.budget;l=str_$S(UIStrings$S.requestCountOverBudget,{count:e})}}return{resourceType:r,label:n,requestCount:a,transferSize:i,countOverBudget:l,sizeOverBudget:o}
|
|
1026
1030
|
})).filter((t=>!(!e.resourceSizes||!e.resourceSizes.some((e=>e.resourceType===t.resourceType)))||!(!e.resourceCounts||!e.resourceCounts.some((e=>e.resourceType===t.resourceType))))).sort(((e,t)=>(t.sizeOverBudget||0)-(e.sizeOverBudget||0)))}static async audit(e,t){const r=e.devtoolsLogs[Audit$S.DEFAULT_PASS],n={devtoolsLog:r,URL:e.URL,budgets:t.settings.budgets},a=await ResourceSummary$1.request(n,t),i=await MainResource$c.request({URL:e.URL,devtoolsLog:r},t),o=Budget$2.getMatchingBudget(t.settings.budgets,i.url);if(!o)return{score:0,notApplicable:!0};const l=[{key:"label",itemType:"text",text:str_$S(i18n$T.UIStrings.columnResourceType)},{key:"requestCount",itemType:"numeric",text:str_$S(i18n$T.UIStrings.columnRequests)},{key:"transferSize",itemType:"bytes",text:str_$S(i18n$T.UIStrings.columnTransferSize)},{key:"countOverBudget",itemType:"text",text:""},{key:"sizeOverBudget",itemType:"bytes",text:str_$S(i18n$T.UIStrings.columnOverBudget)}];return{
|
|
1027
1031
|
details:Audit$S.makeTableDetails(l,this.tableItems(o,a)),score:1}}}performanceBudget.exports=ResourceBudget,performanceBudget.exports.UIStrings=UIStrings$S;const Audit$R=audit,i18n$S=i18n$2H,LanternFcp=lanternFirstContentfulPaint,LanternFmp=lanternFirstMeaningfulPaint,LanternInteractive$1=lanternInteractive,LanternSpeedIndex=lanternSpeedIndex,LanternLcp=lanternLargestContentfulPaint,SCORING_P10=3651,SCORING_MEDIAN=1e4,str_$R=i18n$S.createMessageInstanceIdFn("lighthouse-core/audits/predictive-perf.js",{});class PredictivePerf extends Audit$R{static get meta(){return{id:"predictive-perf",title:"Predicted Performance (beta)",description:"Predicted performance evaluates how your site will perform under a cellular connection on a mobile device.",scoreDisplayMode:Audit$R.SCORING_MODES.NUMERIC,supportedModes:["navigation"],requiredArtifacts:["traces","devtoolsLogs","GatherContext"]}}static async audit(e,t){const r=e.GatherContext,n={trace:e.traces[Audit$R.DEFAULT_PASS],
|
|
1028
1032
|
devtoolsLog:e.devtoolsLogs[Audit$R.DEFAULT_PASS],gatherContext:r,settings:{}},a=await LanternFcp.request(n,t),i=await LanternFmp.request(n,t),o=await LanternInteractive$1.request(n,t),l=await LanternSpeedIndex.request(n,t),c=await LanternLcp.request(n,t),u={roughEstimateOfFCP:a.timing,optimisticFCP:a.optimisticEstimate.timeInMs,pessimisticFCP:a.pessimisticEstimate.timeInMs,roughEstimateOfFMP:i.timing,optimisticFMP:i.optimisticEstimate.timeInMs,pessimisticFMP:i.pessimisticEstimate.timeInMs,roughEstimateOfTTI:o.timing,optimisticTTI:o.optimisticEstimate.timeInMs,pessimisticTTI:o.pessimisticEstimate.timeInMs,roughEstimateOfSI:l.timing,optimisticSI:l.optimisticEstimate.timeInMs,pessimisticSI:l.pessimisticEstimate.timeInMs,roughEstimateOfLCP:c.timing,optimisticLCP:c.optimisticEstimate.timeInMs,pessimisticLCP:c.pessimisticEstimate.timeInMs};return{score:Audit$R.computeLogNormalScore({p10:SCORING_P10,median:SCORING_MEDIAN},u.roughEstimateOfTTI),numericValue:u.roughEstimateOfTTI,
|
|
@@ -1042,21 +1046,21 @@ scoreDisplayMode:Audit$M.SCORING_MODES.INFORMATIVE,title:"Screenshot Thumbnails"
|
|
|
1042
1046
|
scoreDisplayMode:Audit$L.SCORING_MODES.INFORMATIVE,title:"Script Treemap Data",description:"Used for treemap app",requiredArtifacts:["traces","devtoolsLogs","SourceMaps","ScriptElements","JsUsage","URL"]}}static makeScriptNode(e,t,r){function newNode(e){return{name:e,resourceBytes:0}}const n=newNode(t);function addAllNodesInSourcePath(e,r){let a=n;n.resourceBytes+=r.resourceBytes,r.unusedBytes&&(n.unusedBytes=(n.unusedBytes||0)+r.unusedBytes);const i=e.replace(t,"").split(/\/+/);i.forEach(((e,t)=>{if(0===e.length)return;const n=t===i.length-1;let o=a.children&&a.children.find((t=>t.name===e));o||(o=newNode(e),a.children=a.children||[],a.children.push(o)),a=o,a.resourceBytes+=r.resourceBytes,r.unusedBytes&&(a.unusedBytes=(a.unusedBytes||0)+r.unusedBytes),n&&void 0!==r.duplicatedNormalizedModuleName&&(a.duplicatedNormalizedModuleName=r.duplicatedNormalizedModuleName)}))}for(const[e,t]of Object.entries(r))addAllNodesInSourcePath(e,t);if(function collapseAll(e){
|
|
1043
1047
|
for(;e.children&&1===e.children.length;)e.name+="/"+e.children[0].name,e.children=e.children[0].children;if(e.children)for(const t of e.children)collapseAll(t)}(n),!n.name)return{...n,name:e,children:n.children};const a={...n};return a.name=e,a.children=[n],a}static async makeNodes(e,t){const r=[];let n=0;for(const t of e.ScriptElements)t.src||(n+=(t.content||"").length);if(n){const t=e.URL.finalUrl;r.push({name:t,resourceBytes:n})}const a=await JsBundles.request(e,t),i=await ModuleDuplication.request(e,t);for(const n of e.ScriptElements){if(!n.src)continue;const o=n.src,l=a.find((e=>n.src===e.script.src)),c=e.JsUsage[n.src]||[];if(!l&&0===c.length){r.push({name:o,resourceBytes:n.src.length});continue}const u=await UnusedJavaScriptSummary.request({url:n.src,scriptCoverages:c,bundle:l},t);let p;if(l&&!("errorMessage"in l.sizes)){const e={};for(const t of Object.keys(l.sizes.files)){const r={resourceBytes:l.sizes.files[t]};u.sourcesWastedBytes&&(r.unusedBytes=u.sourcesWastedBytes[t])
|
|
1044
1048
|
;let n=t;l.rawMap.sourceRoot&&t.startsWith(l.rawMap.sourceRoot)&&(n=t.replace(l.rawMap.sourceRoot,""));const a=ModuleDuplication.normalizeSource(n);i.has(a)&&(r.duplicatedNormalizedModuleName=a),e[t]=r}if(l.sizes.unmappedBytes){const t={resourceBytes:l.sizes.unmappedBytes};u.sourcesWastedBytes&&(t.unusedBytes=u.sourcesWastedBytes["(unmapped)"]),e["(unmapped)"]=t}p=this.makeScriptNode(n.src,l.rawMap.sourceRoot||"",e)}else p={name:o,resourceBytes:u.totalBytes,unusedBytes:u.wastedBytes};r.push(p)}return r}static async audit(e,t){return{score:1,details:{type:"treemap-data",nodes:await ScriptTreemapDataAudit.makeNodes(e,t)}}}}var scriptTreemapData=ScriptTreemapDataAudit,canonical={exports:{}};const Audit$K=audit,URL$l=urlShim,MainResource$9=mainResource,i18n$N=i18n$2H,UIStrings$N={title:"Document has a valid `rel=canonical`",failureTitle:"Document does not have a valid `rel=canonical`",
|
|
1045
|
-
description:"Canonical links suggest which URL to show in search results. [Learn more](https://web.dev/canonical/).",explanationConflict:"Multiple conflicting URLs ({urlList})",explanationInvalid:"Invalid URL ({url})",explanationRelative:"Is not an absolute URL ({url})",explanationPointsElsewhere:"Points to another `hreflang` location ({url})",
|
|
1046
|
-
;
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
;
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1049
|
+
description:"Canonical links suggest which URL to show in search results. [Learn more](https://web.dev/canonical/).",explanationConflict:"Multiple conflicting URLs ({urlList})",explanationInvalid:"Invalid URL ({url})",explanationRelative:"Is not an absolute URL ({url})",explanationPointsElsewhere:"Points to another `hreflang` location ({url})",explanationRoot:"Points to the domain's root URL (the homepage), instead of an equivalent page of content"},str_$M=i18n$N.createMessageInstanceIdFn("lighthouse-core/audits/seo/canonical.js",UIStrings$N);class Canonical extends Audit$K{static get meta(){return{id:"canonical",title:str_$M(UIStrings$N.title),failureTitle:str_$M(UIStrings$N.failureTitle),description:str_$M(UIStrings$N.description),supportedModes:["navigation"],requiredArtifacts:["LinkElements","URL","devtoolsLogs"]}}static collectCanonicalURLs(e){const t=new Set,r=new Set;let n,a;for(const i of e)if("body"!==i.source)if("canonical"===i.rel){if(!i.hrefRaw)continue
|
|
1050
|
+
;i.href?URL$l.isValid(i.hrefRaw)?t.add(i.href):a=i:n=i}else"alternate"===i.rel&&i.href&&i.hreflang&&r.add(i.href);return{uniqueCanonicalURLs:t,hreflangURLs:r,invalidCanonicalLink:n,relativeCanonicallink:a}}static findInvalidCanonicalURLReason(e){const{uniqueCanonicalURLs:t,invalidCanonicalLink:r,relativeCanonicallink:n}=e;if(r)return{score:0,explanation:str_$M(UIStrings$N.explanationInvalid,{url:r.hrefRaw})};if(n)return{score:0,explanation:str_$M(UIStrings$N.explanationRelative,{url:n.hrefRaw})};const a=Array.from(t);return 0===a.length?{score:1,notApplicable:!0}:a.length>1?{score:0,explanation:str_$M(UIStrings$N.explanationConflict,{urlList:a.join(", ")})}:void 0}static findCommonCanonicalURLMistakes(e,t,r){const{hreflangURLs:n}=e;return n.has(r.href)&&n.has(t.href)&&r.href!==t.href?{score:0,explanation:str_$M(UIStrings$N.explanationPointsElsewhere,{url:r.href})}:t.origin===r.origin&&"/"===t.pathname&&"/"!==r.pathname?{score:0,explanation:str_$M(UIStrings$N.explanationRoot)}:void 0}
|
|
1051
|
+
static async audit(e,t){const r=e.devtoolsLogs[Audit$K.DEFAULT_PASS],n=await MainResource$9.request({devtoolsLog:r,URL:e.URL},t),a=new URL$l(n.url),i=Canonical.collectCanonicalURLs(e.LinkElements),o=Canonical.findInvalidCanonicalURLReason(i);if(o)return o;const l=new URL$l([...i.uniqueCanonicalURLs][0]),c=Canonical.findCommonCanonicalURLMistakes(i,l,a);return c||{score:1}}}canonical.exports=Canonical,canonical.exports.UIStrings=UIStrings$N;var crawlableAnchors={exports:{}};const Audit$J=audit,i18n$M=i18n$2H,UIStrings$M={title:"Links are crawlable",failureTitle:"Links are not crawlable",description:"Search engines may use `href` attributes on links to crawl websites. Ensure that the `href` attribute of anchor elements links to an appropriate destination, so more pages of the site can be discovered. [Learn More](https://support.google.com/webmasters/answer/9112205)",columnFailingLink:"Uncrawlable Link"
|
|
1052
|
+
},str_$L=i18n$M.createMessageInstanceIdFn("lighthouse-core/audits/seo/crawlable-anchors.js",UIStrings$M);class CrawlableAnchors extends Audit$J{static get meta(){return{id:"crawlable-anchors",title:str_$L(UIStrings$M.title),failureTitle:str_$L(UIStrings$M.failureTitle),description:str_$L(UIStrings$M.description),requiredArtifacts:["AnchorElements","URL"]}}static audit({AnchorElements:e,URL:t}){const r=e.filter((({rawHref:e,name:r="",role:n=""})=>{if(e=e.replace(/\s/g,""),r=r.trim(),(n=n.trim()).length>0)return;if(e.startsWith("mailto:"))return;if(e.startsWith("file:"))return!0;if(!(r.length>0)){if(""===e)return!0;if(/javascript:void(\(|)0(\)|)/.test(e))return!0;try{new URL(e,t.finalUrl)}catch(e){return!0}}})),n=[{key:"node",itemType:"node",text:str_$L(UIStrings$M.columnFailingLink)}],a=r.map((e=>({node:Audit$J.makeNodeItem(e.node)})));return{score:Number(0===r.length),details:Audit$J.makeTableDetails(n,a)}}}crawlableAnchors.exports=CrawlableAnchors,
|
|
1053
|
+
crawlableAnchors.exports.UIStrings=UIStrings$M;var fontSize={exports:{}},metaviewportParser={};function min(e,t){return null===e?t:null===t?e:Math.min(e,t)}function max(e,t){return null===e?t:null===t?e:Math.max(e,t)}function translateLengthProperty(e,t,r){return"number"==typeof e?e>=0?clamp(e,1,1e4):void 0:"device-width"===e?100*t:"device-height"===e?100*r:1}function translateZoomProperty(e){return"number"==typeof e?e>=0?clamp(e,.1,10):void 0:"yes"===e?1:"device-width"===e||"device-height"===e?10:"no"===e||null===e?.1:void 0}function clamp(e,t,r){return max(min(e,r),t)}metaviewportParser.getRenderingDataFromViewport=function(e,t,r,n,a){var i=t/100,o=r/100,l=null,c=null,u=null,p=null,f=null,b=null,S=null,_=null,T=null,E=t,$=r,A="zoom";if(void 0!==e["maximum-scale"]&&(l=translateZoomProperty(e["maximum-scale"])),void 0!==e["minimum-scale"]&&(c=translateZoomProperty(e["minimum-scale"])),void 0!==e["initial-scale"]&&(u=translateZoomProperty(e["initial-scale"])),
|
|
1054
|
+
null!==c&&null===l&&(c=min(n,translateZoomProperty(e["minimum-scale"]))),void 0!==e.width&&(p="extend-to-zoom",b=translateLengthProperty(e.width,i,o)),void 0!==e.height&&(f="extend-to-zoom",S=translateLengthProperty(e.height,i,o)),void 0!==e["user-scalable"])if("number"==typeof(A=e["user-scalable"]))A=A>=1||A<=-1?"zoom":"fixed";else switch(A){case"yes":case"device-width":case"device-height":A="zoom";break;case"no":default:A="fixed"}null===u||void 0!==e.width&&void 0!==_||(void 0!==e.height?(p=null,b=null):(p="extend-to-zoom",b="extend-to-zoom")),null!==c&&null!==l&&(l=max(c,l)),null!==u&&(u=clamp(u,c,l));var I,R,x=null===u&&null===l?null:min(u,l);return null===x?("extend-to-zoom"===b&&(b=null),"extend-to-zoom"===S&&(S=null),"extend-to-zoom"===p&&(p=b),"extend-to-zoom"===f&&(f=S)):(I=E/x,R=$/x,"extend-to-zoom"===b&&(b=I),"extend-to-zoom"===S&&(S=R),"extend-to-zoom"===p&&(p=max(I,b)),"extend-to-zoom"===f&&(f=max(R,S))),null===p&&null===b||(_=max(p,min(b,E))),
|
|
1055
|
+
null===f&&null===S||(T=max(f,min(S,$))),null===_&&(_=null===T?E:0!==$?Math.round(T*(E/$)):E),null===T&&(T=0!==E?Math.round(_*($/E)):$),{zoom:u,width:_,height:T,userZoom:A}},metaviewportParser.parseMetaViewPortContent=function(e){for(var t={validProperties:{},unknownProperties:{},invalidValues:{}},r=1;r<=e.length;){for(;r<=e.length&&RegExp(" |\n|\t|\0d|,|;|=").test(e[r-1]);)r++;r<=e.length&&(r=parseProperty(t,e,r))}return t};var propertyNames=["width","height","initial-scale","minimum-scale","maximum-scale","user-scalable","shrink-to-fit","viewport-fit"];function parseProperty(e,t,r){for(var n=r;r<=t.length&&!RegExp(" |\n|\t|\0d|,|;|=").test(t[r-1]);)r++;if(r>t.length||RegExp(",|;").test(t[r-1]))return r;for(var a=t.slice(n-1,r-1);r<=t.length&&!RegExp(",|;|=").test(t[r-1]);)r++;if(r>t.length||RegExp(",|;").test(t[r-1]))return r;for(;r<=t.length&&RegExp(" |\n|\t|\0d|=").test(t[r-1]);)r++;if(r>t.length||RegExp(",|;").test(t[r-1]))return r
|
|
1056
|
+
;for(n=r;r<=t.length&&!RegExp(" |\n|\t|\0d|,|;|=").test(t[r-1]);)r++;return setProperty(e,a,t.slice(n-1,r-1)),r}function setProperty(e,t,r){if(propertyNames.indexOf(t)>=0){var n=parseFloat(r);if(!isNaN(n))return void(e.validProperties[t]=n);var a=r.toLowerCase();if("yes"===a||"no"===a||"device-width"===a||"device-height"===a||"viewport-fit"===t.toLowerCase()&&("auto"===a||"cover"===a))return void(e.validProperties[t]=a);e.validProperties[t]=null,e.invalidValues[t]=r}else e.unknownProperties[t]=r}metaviewportParser.expectedValues={width:["device-width","device-height","a positive number"],height:["device-width","device-height","a positive number"],"initial-scale":["a positive number"],"minimum-scale":["a positive number"],"maximum-scale":["a positive number"],"user-scalable":["yes","no","0","1"],"shrink-to-fit":["yes","no"],"viewport-fit":["auto","cover"]};const Parser=metaviewportParser,makeComputedArtifact$7=computedArtifact;class ViewportMeta{static async compute_(e){
|
|
1057
|
+
const t=e.find((e=>"viewport"===e.name));if(!t)return{hasViewportTag:!1,isMobileOptimized:!1,parserWarnings:[]};const r=[],n=Parser.parseMetaViewPortContent(t.content||"");Object.keys(n.unknownProperties).length&&r.push(`Invalid properties found: ${JSON.stringify(n.unknownProperties)}`),Object.keys(n.invalidValues).length&&r.push(`Invalid values found: ${JSON.stringify(n.invalidValues)}`);const a=n.validProperties;return{hasViewportTag:!0,isMobileOptimized:Boolean(a.width||a["initial-scale"]),parserWarnings:r}}}var viewportMeta=makeComputedArtifact$7(ViewportMeta);const i18n$L=i18n$2H,Audit$I=audit,ComputedViewportMeta$2=viewportMeta,MINIMAL_PERCENTAGE_OF_LEGIBLE_TEXT=60,UIStrings$L={title:"Document uses legible font sizes",failureTitle:"Document doesn't use legible font sizes",
|
|
1058
|
+
description:"Font sizes less than 12px are too small to be legible and require mobile visitors to “pinch to zoom” in order to read. Strive to have >60% of page text ≥12px. [Learn more](https://web.dev/font-size/).",displayValue:"{decimalProportion, number, extendedPercent} legible text",explanationViewport:"Text is illegible because there's no viewport meta tag optimized for mobile screens.",additionalIllegibleText:"Add'l illegible text",legibleText:"Legible text",columnSelector:"Selector",columnPercentPageText:"% of Page Text",columnFontSize:"Font Size"},str_$K=i18n$L.createMessageInstanceIdFn("lighthouse-core/audits/seo/font-size.js",UIStrings$L);function getUniqueFailingRules(e){const t=new Map;return e.forEach((e=>{const{nodeId:r,cssRule:n,fontSize:a,textLength:i,parentNode:o}=e,l=getFontArtifactId(n,r),c=t.get(l);c?c.textLength+=i:t.set(l,{nodeId:r,parentNode:o,cssRule:n,fontSize:a,textLength:i})})),[...t.values()]}function getAttributeMap(e=[]){const t=new Map
|
|
1059
|
+
;for(let r=0;r<e.length;r+=2){const n=e[r],a=e[r+1];if(!n||!a)continue;const i=a.trim();i&&t.set(n.toLowerCase(),i)}return t}function getSelector(e){const t=getAttributeMap(e.attributes);if(t.has("id"))return"#"+t.get("id");{const e=t.get("class");if(e)return"."+e.split(/\s+/).join(".")}return e.nodeName.toLowerCase()}function nodeToTableNode(e){const t=(e.attributes||[]).map(((e,t)=>t%2==0?` ${e}`:`="${e}"`)).join("");return{type:"node",selector:e.parentNode?getSelector(e.parentNode):"",snippet:`<${e.nodeName.toLowerCase()}${t}>`}}function findStyleRuleSource(e,t,r){if(!t||"Attributes"===t.type||"Inline"===t.type)return{source:{type:"url",value:e},selector:nodeToTableNode(r)};if(t.parentRule&&"user-agent"===t.parentRule.origin)return{source:{type:"code",value:"User Agent Stylesheet"},selector:t.parentRule.selectors.map((e=>e.text)).join(", ")};let n="";if(t.parentRule){n=t.parentRule.selectors.map((e=>e.text)).join(", ")}if(t.stylesheet&&!t.stylesheet.sourceURL)return{source:{
|
|
1060
|
+
type:"code",value:"dynamic"},selector:n};if(t.stylesheet&&t.range){const{range:e,stylesheet:r}=t,a=r.hasSourceURL?"comment":"network";let i=e.startLine,o=e.startColumn;r.isInline&&"comment"!==a&&(i+=r.startLine,0===e.startLine&&(o+=r.startColumn));const l=Audit$I.makeSourceLocation(r.sourceURL,i,o);return l.urlProvider=a,{source:l,selector:n}}return{selector:n,source:{type:"code",value:"Unknown"}}}function getFontArtifactId(e,t){if(e&&"Regular"===e.type){const t=e.range?e.range.startLine:0,r=e.range?e.range.startColumn:0;return`${e.styleSheetId}@${t}:${r}`}return`node_${t}`}class FontSize extends Audit$I{static get meta(){return{id:"font-size",title:str_$K(UIStrings$L.title),failureTitle:str_$K(UIStrings$L.failureTitle),description:str_$K(UIStrings$L.description),requiredArtifacts:["FontSize","URL","MetaElements"]}}static async audit(e,t){if("desktop"===t.settings.formFactor)return{score:1,notApplicable:!0}
|
|
1061
|
+
;if(!(await ComputedViewportMeta$2.request(e.MetaElements,t)).isMobileOptimized)return{score:0,explanation:str_$K(UIStrings$L.explanationViewport)};const{analyzedFailingNodesData:r,analyzedFailingTextLength:n,failingTextLength:a,totalTextLength:i}=e.FontSize;if(0===i)return{score:1};const o=getUniqueFailingRules(r),l=(i-a)/i*100,c=e.URL.finalUrl,u=[{key:"source",itemType:"source-location",text:str_$K(i18n$L.UIStrings.columnSource)},{key:"selector",itemType:"code",text:str_$K(UIStrings$L.columnSelector)},{key:"coverage",itemType:"text",text:str_$K(UIStrings$L.columnPercentPageText)},{key:"fontSize",itemType:"text",text:str_$K(UIStrings$L.columnFontSize)}],p=o.sort(((e,t)=>t.textLength-e.textLength)).map((({cssRule:e,textLength:t,fontSize:r,parentNode:n})=>{const a=t/i*100,o=findStyleRuleSource(c,e,n);return{source:o.source,selector:o.selector,coverage:`${a.toFixed(2)}%`,fontSize:`${r}px`}}));if(n<a){const e=(a-n)/i*100;p.push({source:{type:"code",
|
|
1062
|
+
value:str_$K(UIStrings$L.additionalIllegibleText)},selector:"",coverage:`${e.toFixed(2)}%`,fontSize:"< 12px"})}l>0&&p.push({source:{type:"code",value:str_$K(UIStrings$L.legibleText)},selector:"",coverage:`${l.toFixed(2)}%`,fontSize:"≥ 12px"});const f=l/100,b=str_$K(UIStrings$L.displayValue,{decimalProportion:f}),S=Audit$I.makeTableDetails(u,p);return{score:Number(l>=MINIMAL_PERCENTAGE_OF_LEGIBLE_TEXT),details:S,displayValue:b}}}fontSize.exports=FontSize,fontSize.exports.UIStrings=UIStrings$L;var hreflang={exports:{}};const Audit$H=audit,i18n$K=i18n$2H,axeLibSource=axe.source,VALID_LANGS=importValidLangs(),NO_LANGUAGE="x-default",UIStrings$K={title:"Document has a valid `hreflang`",failureTitle:"Document doesn't have a valid `hreflang`",description:"hreflang links tell search engines what version of a page they should list in search results for a given language or region. [Learn more](https://web.dev/hreflang/).",unexpectedLanguage:"Unexpected language code",
|
|
1063
|
+
notFullyQualified:"Relative href value"},str_$J=i18n$K.createMessageInstanceIdFn("lighthouse-core/audits/seo/hreflang.js",UIStrings$K);function importValidLangs(){const window={getComputedStyle:()=>{}};return eval(axeLibSource),window.axe.utils.validLangs()}function isFullyQualified(e){return e.startsWith("http:")||e.startsWith("https:")}function isExpectedLanguageCode(e){if(e.toLowerCase()===NO_LANGUAGE)return!0;const[t]=e.split("-");return VALID_LANGS.includes(t.toLowerCase())}class Hreflang extends Audit$H{static get meta(){return{id:"hreflang",title:str_$J(UIStrings$K.title),failureTitle:str_$J(UIStrings$K.failureTitle),description:str_$J(UIStrings$K.description),supportedModes:["navigation"],requiredArtifacts:["LinkElements","URL"]}}static audit({LinkElements:e}){const t=[],r=e.filter((e=>{const t="alternate"===e.rel,r=e.hreflang,n="body"===e.source;return t&&r&&!n}));for(const e of r){const r=[];let n
|
|
1060
1064
|
;isExpectedLanguageCode(e.hreflang)||r.push(str_$J(UIStrings$K.unexpectedLanguage)),isFullyQualified(e.hrefRaw.toLowerCase())||r.push(str_$J(UIStrings$K.notFullyQualified)),"head"===e.source?n=e.node?{...Audit$H.makeNodeItem(e.node),snippet:`<link rel="alternate" hreflang="${e.hreflang}" href="${e.hrefRaw}" />`}:{type:"node",snippet:`<link rel="alternate" hreflang="${e.hreflang}" href="${e.hrefRaw}" />`}:"headers"===e.source&&(n=`Link: <${e.hrefRaw}>; rel="alternate"; hreflang="${e.hreflang}"`),n&&r.length&&t.push({source:n,subItems:{type:"subitems",items:r.map((e=>({reason:e})))}})}const n=Audit$H.makeTableDetails([{key:"source",itemType:"code",subItemsHeading:{key:"reason",itemType:"text"},text:""}],t);return{score:Number(0===t.length),details:n}}}hreflang.exports=Hreflang,hreflang.exports.UIStrings=UIStrings$K;var httpStatusCode={exports:{}}
|
|
1061
1065
|
;const Audit$G=audit,NetworkRecords$j=networkRecords,HTTP_UNSUCCESSFUL_CODE_LOW=400,HTTP_UNSUCCESSFUL_CODE_HIGH=599,i18n$J=i18n$2H,NetworkAnalyzer$1=networkAnalyzer,UIStrings$J={title:"Page has successful HTTP status code",failureTitle:"Page has unsuccessful HTTP status code",description:"Pages with unsuccessful HTTP status codes may not be indexed properly. [Learn more](https://web.dev/http-status-code/)."},str_$I=i18n$J.createMessageInstanceIdFn("lighthouse-core/audits/seo/http-status-code.js",UIStrings$J);class HTTPStatusCode extends Audit$G{static get meta(){return{id:"http-status-code",title:str_$I(UIStrings$J.title),failureTitle:str_$I(UIStrings$J.failureTitle),description:str_$I(UIStrings$J.description),requiredArtifacts:["devtoolsLogs","URL","GatherContext"],supportedModes:["navigation"]}}static async audit(e,t){const r=e.devtoolsLogs[Audit$G.DEFAULT_PASS],n=e.URL,a=await NetworkRecords$j.request(r,t),i=NetworkAnalyzer$1.findMainDocument(a,n.finalUrl).statusCode
|
|
1062
1066
|
;return i>=HTTP_UNSUCCESSFUL_CODE_LOW&&i<=HTTP_UNSUCCESSFUL_CODE_HIGH?{score:0,displayValue:`${i}`}:{score:1}}}httpStatusCode.exports=HTTPStatusCode,httpStatusCode.exports.UIStrings=UIStrings$J;var isCrawlable={exports:{}},URL$k=urlShim.URL;function trimLine(e){return e?Array.isArray(e)?e.map(trimLine):String(e).trim():null}function removeComments(e){var t=e.indexOf("#");return t>-1?e.substr(0,t):e}function splitLine(e){var t=String(e).indexOf(":");return!e||t<0?null:[e.slice(0,t),e.slice(t+1)]}function formatUserAgent(e){var t=e.toLowerCase(),r=t.indexOf("/");return r>-1&&(t=t.substr(0,r)),t.trim()}function normaliseEncoding(e){try{return urlEncodeToUpper(encodeURI(e).replace(/%25/g,"%"))}catch(t){return e}}function urlEncodeToUpper(e){return e.replace(/%[0-9a-fA-F]{2}/g,(function(e){return e.toUpperCase()}))}function parsePattern(e){
|