@lhci/viewer 0.15.1 → 0.16.0

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.
Files changed (61) hide show
  1. package/dist/chunks/entry-DHLFDJOJ.css +17 -0
  2. package/dist/chunks/entry-DHLFDJOJ.css.map +7 -0
  3. package/dist/chunks/entry-KSKAOE6M.js +22 -0
  4. package/dist/chunks/entry-KSKAOE6M.js.map +7 -0
  5. package/dist/index.html +5 -5
  6. package/dist/locales/ar-XB.json +3797 -0
  7. package/dist/locales/ar.json +3797 -0
  8. package/dist/locales/bg.json +3797 -0
  9. package/dist/locales/ca.json +3797 -0
  10. package/dist/locales/cs.json +3797 -0
  11. package/dist/locales/da.json +3797 -0
  12. package/dist/locales/de.json +3797 -0
  13. package/dist/locales/el.json +3797 -0
  14. package/dist/locales/en-GB.json +3797 -0
  15. package/dist/locales/en-US.json +3815 -0
  16. package/dist/locales/en-XA.json +2747 -0
  17. package/dist/locales/en-XL.json +3815 -0
  18. package/dist/locales/es-419.json +3797 -0
  19. package/dist/locales/es.json +3797 -0
  20. package/dist/locales/fi.json +3797 -0
  21. package/dist/locales/fil.json +3797 -0
  22. package/dist/locales/fr.json +3797 -0
  23. package/dist/locales/he.json +3794 -0
  24. package/dist/locales/hi.json +3797 -0
  25. package/dist/locales/hr.json +3797 -0
  26. package/dist/locales/hu.json +3797 -0
  27. package/dist/locales/id.json +3797 -0
  28. package/dist/locales/it.json +3797 -0
  29. package/dist/locales/ja.json +3797 -0
  30. package/dist/locales/ko.json +3797 -0
  31. package/dist/locales/lt.json +3797 -0
  32. package/dist/locales/lv.json +3797 -0
  33. package/dist/locales/nl.json +3797 -0
  34. package/dist/locales/no.json +3797 -0
  35. package/dist/locales/pl.json +3797 -0
  36. package/dist/locales/pt-PT.json +3797 -0
  37. package/dist/locales/pt.json +3797 -0
  38. package/dist/locales/ro.json +3797 -0
  39. package/dist/locales/ru.json +3794 -0
  40. package/dist/locales/sk.json +3797 -0
  41. package/dist/locales/sl.json +3797 -0
  42. package/dist/locales/sr-Latn.json +3797 -0
  43. package/dist/locales/sr.json +3797 -0
  44. package/dist/locales/sv.json +3797 -0
  45. package/dist/locales/ta.json +3794 -0
  46. package/dist/locales/te.json +3797 -0
  47. package/dist/locales/th.json +3797 -0
  48. package/dist/locales/tr.json +3797 -0
  49. package/dist/locales/uk.json +3797 -0
  50. package/dist/locales/vi.json +3797 -0
  51. package/dist/locales/zh-HK.json +3797 -0
  52. package/dist/locales/zh-TW.json +3797 -0
  53. package/dist/locales/zh.json +3797 -0
  54. package/package.json +12 -6
  55. package/src/ui/components/toast.jsx +1 -1
  56. package/src/ui/routes/comparison/comparison.css +3 -2
  57. package/src/ui/routes/comparison/comparison.jsx +39 -14
  58. package/dist/chunks/entry-JMR57VBF.js +0 -15
  59. package/dist/chunks/entry-JMR57VBF.js.map +0 -7
  60. package/dist/chunks/entry-W3IW5PUA.css +0 -12
  61. package/dist/chunks/entry-W3IW5PUA.css.map +0 -7
@@ -0,0 +1,22 @@
1
+ "use strict";(()=>{var li=Object.create;var Pt=Object.defineProperty,ci=Object.defineProperties,fi=Object.getOwnPropertyDescriptor,ui=Object.getOwnPropertyDescriptors,di=Object.getOwnPropertyNames,Xe=Object.getOwnPropertySymbols,pi=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty,gr=Object.prototype.propertyIsEnumerable;var mr=(e,t,r)=>t in e?Pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,F=(e,t)=>{for(var r in t||(t={}))Lt.call(t,r)&&mr(e,r,t[r]);if(Xe)for(var r of Xe(t))gr.call(t,r)&&mr(e,r,t[r]);return e},E=(e,t)=>ci(e,ui(t));var br=(e,t)=>{var r={};for(var n in e)Lt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xe)for(var n of Xe(e))t.indexOf(n)<0&&gr.call(e,n)&&(r[n]=e[n]);return r};var q=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var hi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of di(t))!Lt.call(e,o)&&o!==r&&Pt(e,o,{get:()=>t[o],enumerable:!(n=fi(t,o))||n.enumerable});return e};var K=(e,t,r)=>(r=e!=null?li(pi(e)):{},hi(t||!e||!e.__esModule?Pt(r,"default",{value:e,enumerable:!0}):r,e));var T=(e,t,r)=>new Promise((n,o)=>{var i=f=>{try{l(r.next(f))}catch(u){o(u)}},s=f=>{try{l(r.throw(f))}catch(u){o(u)}},l=f=>f.done?n(f.value):Promise.resolve(f.value).then(i,s);l((r=r.apply(e,t)).next())});var Xr=q((Ws,Li)=>{Li.exports="./assets/loading-spinner-N6LEBK7Y.svg"});var Zr=q((ol,kr)=>{var be=1e3,ve=be*60,ye=ve*60,fe=ye*24,Ni=fe*7,Hi=fe*365.25;kr.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return zi(e);if(r==="number"&&isFinite(e))return t.long?Fi(e):Di(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function zi(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Hi;case"weeks":case"week":case"w":return r*Ni;case"days":case"day":case"d":return r*fe;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ye;case"minutes":case"minute":case"mins":case"min":case"m":return r*ve;case"seconds":case"second":case"secs":case"sec":case"s":return r*be;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Di(e){var t=Math.abs(e);return t>=fe?Math.round(e/fe)+"d":t>=ye?Math.round(e/ye)+"h":t>=ve?Math.round(e/ve)+"m":t>=be?Math.round(e/be)+"s":e+"ms"}function Fi(e){var t=Math.abs(e);return t>=fe?qe(e,t,fe,"day"):t>=ye?qe(e,t,ye,"hour"):t>=ve?qe(e,t,ve,"minute"):t>=be?qe(e,t,be,"second"):e+" ms"}function qe(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var Vr=q((il,Gr)=>{function Oi(e){r.debug=r,r.default=r,r.coerce=f,r.disable=s,r.enable=o,r.enabled=l,r.humanize=Zr(),r.destroy=u,Object.keys(e).forEach(d=>{r[d]=e[d]}),r.names=[],r.skips=[],r.formatters={};function t(d){let c=0;for(let p=0;p<d.length;p++)c=(c<<5)-c+d.charCodeAt(p),c|=0;return r.colors[Math.abs(c)%r.colors.length]}r.selectColor=t;function r(d){let c,p=null,m,y;function b(...v){if(!b.enabled)return;let x=b,w=Number(new Date),C=w-(c||w);x.diff=C,x.prev=c,x.curr=w,c=w,v[0]=r.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let z=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(_,S)=>{if(_==="%%")return"%";z++;let j=r.formatters[S];if(typeof j=="function"){let h=v[z];_=j.call(x,h),v.splice(z,1),z--}return _}),r.formatArgs.call(x,v),(x.log||r.log).apply(x,v)}return b.namespace=d,b.useColors=r.useColors(),b.color=r.selectColor(d),b.extend=n,b.destroy=r.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(m!==r.namespaces&&(m=r.namespaces,y=r.enabled(d)),y),set:v=>{p=v}}),typeof r.init=="function"&&r.init(b),b}function n(d,c){let p=r(this.namespace+(typeof c=="undefined"?":":c)+d);return p.log=this.log,p}function o(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let c=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let p of c)p[0]==="-"?r.skips.push(p.slice(1)):r.names.push(p)}function i(d,c){let p=0,m=0,y=-1,b=0;for(;p<d.length;)if(m<c.length&&(c[m]===d[p]||c[m]==="*"))c[m]==="*"?(y=m,b=p,m++):(p++,m++);else if(y!==-1)m=y+1,b++,p=b;else return!1;for(;m<c.length&&c[m]==="*";)m++;return m===c.length}function s(){let d=[...r.names,...r.skips.map(c=>"-"+c)].join(",");return r.enable(""),d}function l(d){for(let c of r.skips)if(i(d,c))return!1;for(let c of r.names)if(i(d,c))return!0;return!1}function f(d){return d instanceof Error?d.stack||d.message:d}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Gr.exports=Oi});var Wr=q((Q,Ke)=>{Q.formatArgs=Bi;Q.save=_i;Q.load=Ri;Q.useColors=Si;Q.storage=Ei();Q.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Q.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Si(){if(typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Bi(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Ke.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}Q.log=console.debug||console.log||(()=>{});function _i(e){try{e?Q.storage.setItem("debug",e):Q.storage.removeItem("debug")}catch(t){}}function Ri(){let e;try{e=Q.storage.getItem("debug")||Q.storage.getItem("DEBUG")}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}function Ei(){try{return localStorage}catch(e){}}Ke.exports=Vr()(Q);var{formatters:Mi}=Ke.exports;Mi.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Jr=q((Qe,Yr)=>{(function(e,t){typeof Qe=="object"&&typeof Yr!="undefined"?t(Qe):typeof define=="function"&&define.amd?define(["exports"],t):t(e.WHATWGFetch={})})(Qe,(function(e){"use strict";var t=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof t!="undefined"&&t,r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&(function(){try{return new Blob,!0}catch(h){return!1}})(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function n(h){return h&&DataView.prototype.isPrototypeOf(h)}if(r.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],i=ArrayBuffer.isView||function(h){return h&&o.indexOf(Object.prototype.toString.call(h))>-1};function s(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(h)||h==="")throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function l(h){return typeof h!="string"&&(h=String(h)),h}function f(h){var g={next:function(){var N=h.shift();return{done:N===void 0,value:N}}};return r.iterable&&(g[Symbol.iterator]=function(){return g}),g}function u(h){this.map={},h instanceof u?h.forEach(function(g,N){this.append(N,g)},this):Array.isArray(h)?h.forEach(function(g){this.append(g[0],g[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(g){this.append(g,h[g])},this)}u.prototype.append=function(h,g){h=s(h),g=l(g);var N=this.map[h];this.map[h]=N?N+", "+g:g},u.prototype.delete=function(h){delete this.map[s(h)]},u.prototype.get=function(h){return h=s(h),this.has(h)?this.map[h]:null},u.prototype.has=function(h){return this.map.hasOwnProperty(s(h))},u.prototype.set=function(h,g){this.map[s(h)]=l(g)},u.prototype.forEach=function(h,g){for(var N in this.map)this.map.hasOwnProperty(N)&&h.call(g,this.map[N],N,this)},u.prototype.keys=function(){var h=[];return this.forEach(function(g,N){h.push(N)}),f(h)},u.prototype.values=function(){var h=[];return this.forEach(function(g){h.push(g)}),f(h)},u.prototype.entries=function(){var h=[];return this.forEach(function(g,N){h.push([N,g])}),f(h)},r.iterable&&(u.prototype[Symbol.iterator]=u.prototype.entries);function d(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function c(h){return new Promise(function(g,N){h.onload=function(){g(h.result)},h.onerror=function(){N(h.error)}})}function p(h){var g=new FileReader,N=c(g);return g.readAsArrayBuffer(h),N}function m(h){var g=new FileReader,N=c(g);return g.readAsText(h),N}function y(h){for(var g=new Uint8Array(h),N=new Array(g.length),M=0;M<g.length;M++)N[M]=String.fromCharCode(g[M]);return N.join("")}function b(h){if(h.slice)return h.slice(0);var g=new Uint8Array(h.byteLength);return g.set(new Uint8Array(h)),g.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(h){this.bodyUsed=this.bodyUsed,this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:r.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:r.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():r.arrayBuffer&&r.blob&&n(h)?(this._bodyArrayBuffer=b(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||i(h))?this._bodyArrayBuffer=b(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var h=d(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var h=d(this);return h||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(p)}),this.text=function(){var h=d(this);if(h)return h;if(this._bodyBlob)return m(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(y(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(z)}),this.json=function(){return this.text().then(JSON.parse)},this}var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(h){var g=h.toUpperCase();return x.indexOf(g)>-1?g:h}function C(h,g){if(!(this instanceof C))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');g=g||{};var N=g.body;if(h instanceof C){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,g.headers||(this.headers=new u(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!N&&h._bodyInit!=null&&(N=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new u(g.headers)),this.method=w(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&N)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(N),(this.method==="GET"||this.method==="HEAD")&&(g.cache==="no-store"||g.cache==="no-cache")){var M=/([?&])_=[^&]*/;if(M.test(this.url))this.url=this.url.replace(M,"$1_="+new Date().getTime());else{var I=/\?/;this.url+=(I.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}C.prototype.clone=function(){return new C(this,{body:this._bodyInit})};function z(h){var g=new FormData;return h.trim().split("&").forEach(function(N){if(N){var M=N.split("="),I=M.shift().replace(/\+/g," "),L=M.join("=").replace(/\+/g," ");g.append(decodeURIComponent(I),decodeURIComponent(L))}}),g}function D(h){var g=new u,N=h.replace(/\r?\n[\t ]+/g," ");return N.split("\r").map(function(M){return M.indexOf(`
2
+ `)===0?M.substr(1,M.length):M}).forEach(function(M){var I=M.split(":"),L=I.shift().trim();if(L){var G=I.join(":").trim();g.append(L,G)}}),g}v.call(C.prototype);function _(h,g){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"",this.headers=new u(g.headers),this.url=g.url||"",this._initBody(h)}v.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},_.error=function(){var h=new _(null,{status:0,statusText:""});return h.type="error",h};var S=[301,302,303,307,308];_.redirect=function(h,g){if(S.indexOf(g)===-1)throw new RangeError("Invalid status code");return new _(null,{status:g,headers:{location:h}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(h){e.DOMException=function(g,N){this.message=g,this.name=N;var M=Error(g);this.stack=M.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function j(h,g){return new Promise(function(N,M){var I=new C(h,g);if(I.signal&&I.signal.aborted)return M(new e.DOMException("Aborted","AbortError"));var L=new XMLHttpRequest;function G(){L.abort()}L.onload=function(){var V={status:L.status,statusText:L.statusText,headers:D(L.getAllResponseHeaders()||"")};V.url="responseURL"in L?L.responseURL:V.headers.get("X-Request-URL");var J="response"in L?L.response:L.responseText;setTimeout(function(){N(new _(J,V))},0)},L.onerror=function(){setTimeout(function(){M(new TypeError("Network request failed"))},0)},L.ontimeout=function(){setTimeout(function(){M(new TypeError("Network request failed"))},0)},L.onabort=function(){setTimeout(function(){M(new e.DOMException("Aborted","AbortError"))},0)};function oe(V){try{return V===""&&t.location.href?t.location.href:V}catch(J){return V}}L.open(I.method,oe(I.url),!0),I.credentials==="include"?L.withCredentials=!0:I.credentials==="omit"&&(L.withCredentials=!1),"responseType"in L&&(r.blob?L.responseType="blob":r.arrayBuffer&&I.headers.get("Content-Type")&&I.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(L.responseType="arraybuffer")),g&&typeof g.headers=="object"&&!(g.headers instanceof u)?Object.getOwnPropertyNames(g.headers).forEach(function(V){L.setRequestHeader(V,l(g.headers[V]))}):I.headers.forEach(function(V,J){L.setRequestHeader(J,V)}),I.signal&&(I.signal.addEventListener("abort",G),L.onreadystatechange=function(){L.readyState===4&&I.signal.removeEventListener("abort",G)}),L.send(typeof I._bodyInit=="undefined"?null:I._bodyInit)})}j.polyfill=!0,t.fetch||(t.fetch=j,t.Headers=u,t.Request=C,t.Response=_),e.Headers=u,e.Request=C,e.Response=_,e.fetch=j,Object.defineProperty(e,"__esModule",{value:!0})}))});var Kr=q((al,qr)=>{Jr();qr.exports=self.fetch.bind(self)});var $r=q((sl,Qr)=>{"use strict";var Ii=Wr()("lhci:utils:api-client"),ji=Kr(),Ui=typeof window=="undefined"?e=>Buffer.from(e).toString("base64"):window.btoa,_t=class e{constructor(t){if(this._rootURL=t.rootURL,this._extraHeaders=t.extraHeaders||{},this._fetch=t.fetch||ji,this._URL=t.URL||URL,t.basicAuth&&t.basicAuth.password){let{username:n=e.DEFAULT_BASIC_AUTH_USERNAME,password:o}=t.basicAuth;this._extraHeaders.Authorization=`Basic ${Ui(`${n}:${o}`)}`}let r=this}setBuildToken(t){this._extraHeaders=E(F({},this._extraHeaders),{"x-lhci-build-token":t||""})}setAdminToken(t){this._extraHeaders=E(F({},this._extraHeaders),{"x-lhci-admin-token":t||""})}_normalizeURL(t){if(!t.startsWith("/"))throw new Error(`Cannot normalize "${t}" without leading /`);let r=this._rootURL.endsWith("/")?this._rootURL.slice(0,this._rootURL.length-1):this._rootURL;return new this._URL(`${r}${t}`)}_convert404ToUndefined(t){return t.catch(r=>{if(!("status"in r&&r.status===404))throw r})}_convertFetchResponseToReturnValue(t){return T(this,null,function*(){if(t.status===204)return;if(t.status>=400){let n=yield t.text(),o=new Error(`Unexpected status code ${t.status}
3
+ ${n}`);throw o.status=t.status,o.body=n,o}return yield t.json()})}_fetchWithRequestBody(t,r,n){return T(this,null,function*(){let o=yield this._fetch(this._normalizeURL(r).href,{method:t,body:JSON.stringify(n),headers:E(F({},this._extraHeaders),{"content-type":"application/json"})});return this._convertFetchResponseToReturnValue(o)})}_get(t,r){return T(this,null,function*(){let n=this._normalizeURL(t);if(r)for(let[i,s]of Object.entries(r))s!==void 0&&n.searchParams.append(i,s.toString());let o=yield this._fetch(n.href,{headers:F({},this._extraHeaders)});return this._convertFetchResponseToReturnValue(o)})}_post(t,r){return T(this,null,function*(){return this._fetchWithRequestBody("POST",t,r)})}_put(t,r){return T(this,null,function*(){return this._fetchWithRequestBody("PUT",t,r)})}_delete(t){return T(this,null,function*(){let r=F({},this._extraHeaders),n=yield this._fetch(this._normalizeURL(t).href,{method:"DELETE",headers:r});return this._convertFetchResponseToReturnValue(n)})}initialize(){return T(this,null,function*(){throw new Error("Unimplemented")})}getVersion(){return T(this,null,function*(){let t=yield this._fetch(this._normalizeURL("/version").href,{headers:F({},this._extraHeaders)}),r=t.text();if(!t.ok){let n=new Error(`Unexpected status code ${t.status}
4
+ ${r}`);throw n.status=t.status,n.body=r,n}return r})}getProjects(){return T(this,null,function*(){return this._get("/v1/projects")})}getProjectToken(t){return T(this,null,function*(){return(yield this._get(`/v1/projects/${t.id}/token`)).token})}findProjectByToken(t){return T(this,null,function*(){return this._convert404ToUndefined(this._post("/v1/projects/lookup",{token:t}))})}findProjectById(t){return T(this,null,function*(){return this._convert404ToUndefined(this._get(`/v1/projects/${t}`))})}findProjectBySlug(t){return T(this,null,function*(){return this._convert404ToUndefined(this._get(`/v1/projects/slug:${t}`))})}createProject(t){return T(this,null,function*(){return this._post("/v1/projects",t)})}updateProject(t){return T(this,null,function*(){return this._put(`/v1/projects/${t.id}`,t)})}deleteProject(t){return T(this,null,function*(){return this._delete(`/v1/projects/${t}`)})}getBuilds(n){return T(this,arguments,function*(t,r={}){return this._get(`/v1/projects/${t}/builds`,r)})}getBranches(t){return T(this,null,function*(){return this._get(`/v1/projects/${t}/branches`)})}createBuild(t){return T(this,null,function*(){return this._post(`/v1/projects/${t.projectId}/builds`,t)})}sealBuild(t,r){return T(this,null,function*(){return this._put(`/v1/projects/${t}/builds/${r}/lifecycle`,"sealed")})}deleteBuild(t,r){return T(this,null,function*(){return this._delete(`/v1/projects/${t}/builds/${r}`)})}findBuildById(t,r){return T(this,null,function*(){return this._convert404ToUndefined(this._get(`/v1/projects/${t}/builds/${r}`))})}findAncestorBuildById(t,r){return T(this,null,function*(){return this._convert404ToUndefined(this._get(`/v1/projects/${t}/builds/${r}/ancestor`))})}getRuns(o,i){return T(this,arguments,function*(t,r,n={}){return this._get(`/v1/projects/${t}/builds/${r}/runs`,n)})}getUrls(t,r){return T(this,null,function*(){return r?this._get(`/v1/projects/${t}/builds/${r}/urls`):this._get(`/v1/projects/${t}/urls`)})}createRun(t){return T(this,null,function*(){return this._post(`/v1/projects/${t.projectId}/builds/${t.buildId}/runs`,t)})}getStatistics(t,r){return T(this,null,function*(){return this._get(`/v1/projects/${t}/builds/${r}/statistics`)})}getViewerOrigin(){return T(this,null,function*(){return this._get("/v1/viewer/origin")})}_createProject(t){return T(this,null,function*(){throw new Error("Unimplemented")})}_createOrUpdateStatistic(t){return T(this,null,function*(){throw new Error("Unimplemented")})}_getStatistics(t,r){return T(this,null,function*(){throw new Error("Unimplemented")})}_invalidateStatistics(t,r){return T(this,null,function*(){throw new Error("Unimplemented")})}findBuildsBeforeTimestamp(t){return T(this,null,function*(){throw new Error("Unimplemented")})}_resetAdminToken(t){return T(this,null,function*(){throw new Error("Unimplemented")})}_resetProjectToken(t){return T(this,null,function*(){throw new Error("Unimplemented")})}close(){return T(this,null,function*(){})}static get DEFAULT_BASIC_AUTH_USERNAME(){return"lhci"}static isApiVersionCompatible(t,r){Ii(`checking for client (${t}) server (${r}) compatibility`);let n=t.match(/(\d+)\.(\d+)\.\d+/),o=r.match(/(\d+)\.(\d+)\.\d+/);if(!n||!o)return!1;let i=Number(n[1]),s=Number(o[1]);return i!==s?!1:(i===0&&(i=Number(n[2])),s===0&&(s=Number(o[2])),i===s||i===s+1)}};Qr.exports=_t});var ue=q((cl,rn)=>{"use strict";function Rt(e,t){if(Array.isArray(e)){if(!Array.isArray(t))return t;for(let r=0;r<Math.max(e.length,t.length);r++)e[r]=r<t.length?Rt(e[r],t[r]):e[r];return e}else if(typeof e=="object"&&e!==null){if(typeof t!="object"||t===null)return t;let r=e,n=t,o=new Set(Object.keys(r)),i=new Set(Object.keys(n));for(let s of new Set([...o,...i]))s==="__proto__"||s==="constructor"||s==="prototype"||(r[s]=s in n?Rt(r[s],n[s]):r[s]);return e}else return t}function en(e,t){let r=e.replace(/([a-z])([A-Z])/g,"$1-$2");return t&&t.alphanumericOnly&&(r=r.replace(/[^a-z0-9]+/gi,"-").replace(/-+/g,"-").replace(/(^-|-$)/g,"")),r.toLowerCase()}function tn(e,t){let r=new Map;for(let n of e){let o=t(n),i=r.get(o)||[];i.push(n),r.set(o,i)}return r}function Xi(e,t){let r,n=()=>{r&&clearTimeout(r),r=void 0},o=(...i)=>{r&&clearTimeout(r),r=setTimeout(()=>e(...i),t)};return o.cancel=n,o}rn.exports={merge:Rt,kebabCase:en,debounce:Xi,range(e,t,r=1){let n=[];for(let o=e;o<t;o+=r)n.push(o);return n},startCase(e){return en(e).split("-").map(t=>`${t.slice(0,1).toUpperCase()}${t.slice(1)}`).join(" ")},padStart(e,t,r=" "){return e.length>=t?e:`${r.repeat(t)}${e}`.slice(-t)},padEnd(e,t,r=" "){return e.length>=t?e:`${e}${r.repeat(t)}`.slice(0,t)},isEqual(e,t,r=0){if(r>100||typeof e!=typeof t)return!1;if(Number.isNaN(e)&&Number.isNaN(t))return!0;if(typeof e!="object")return e===t;if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e))return Array.isArray(t)?e.every((s,l)=>this.isEqual(s,t[l]))&&e.length===t.length:!1;let n=Object.keys(e).sort(),o=Object.keys(t).sort();return n.every(s=>this.isEqual(e[s],t[s],r+1))&&this.isEqual(n,o)},cloneDeep(e){return JSON.parse(JSON.stringify(e))},uniqBy(e,t){let r=new Set,n=[];for(let o of e){let i=t(o);r.has(i)||(r.add(i),n.push(o))}return n},groupBy(e,t){return[...tn(e,t).values()]},groupIntoMap:tn,maxBy(e,t){let r,n=-1/0;for(let o of e){let i=t(o);i>n&&(r=o,n=i)}return r},minBy(e,t){return this.maxBy(e,r=>-t(r))},sortBy(e,t){return e.slice().sort((r,n)=>t(r)-t(n))},pick(e,t){let r={};for(let[n,o]of Object.entries(e)){let i=n;t.includes(i)&&(r[i]=o)}return r},omit(e,t,r={}){let n={};for(let[o,i]of Object.entries(e)){let s=o;t.includes(s)||r.dropUndefined&&i===void 0||(n[s]=i)}return n},shortId(e){return e.replace(/-/g,"").slice(0,12)},pluralize(e,t,r){return r=r||`${e}s`,t===1?e:r},uniqueId:(()=>{let e=1;return()=>e++})()}});var an=q((Ll,Zi)=>{Zi.exports="./assets/favicon-PWXHY3O5.svg"});var sn=q((zl,Vi)=>{Vi.exports="./assets/confetti-NE5ZCURM.svg"});var ln=q((Dl,Wi)=>{Wi.exports="./assets/logo-7LKJDYBP.svg"});var mn=q((Ql,hn)=>{"use strict";var Fe=ue(),$i="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin urna nunc, molestie sed hendrerit et, vulputate vitae mauris. Sed tempor vitae risus vel hendrerit. Nulla vestibulum malesuada erat vitae laoreet. Phasellus sodales vehicula dolor, dictum ullamcorper metus aliquam id. Nullam porttitor posuere purus id rhoncus. Sed et mi ligula. Donec imperdiet nulla sit amet justo cursus, id tempus ex accumsan. Maecenas ultricies elit eget lectus posuere vestibulum. Cras vestibulum neque nec justo congue feugiat non id dui. Pellentesque dapibus ac orci sed malesuada. Sed rhoncus vitae lorem eget facilisis. Donec auctor tortor a tortor egestas, vel condimentum lacus auctor.";function pn(e){return e.startsWith("a11y")?"accessibility":e.startsWith("seo")?"seo":e.startsWith("best-practices")?"best-practices":e.startsWith("pwa")?"pwa":"performance"}function tt(e){if(e==="cumulative-layout-shift"||e==="first-contentful-paint"||e==="first-meaningful-paint"||e==="speed-index"||e==="interactive"||e==="first-cpu-idle"||e==="max-potential-fid")return"metrics";if(e.startsWith("diagnostic-"))return"diagnostics";if(e.startsWith("uses-"))return"load-opportunities";if(e.startsWith("a11y-aria"))return"a11y-aria";if(e.startsWith("a11y"))return"a11y-best-practices";if(e.startsWith("seo"))return"seo-content";if(e.startsWith("best-practices"))return"best-practices";if(e.startsWith("pwa-fast-reliable"))return"pwa-fast-reliable";if(e.startsWith("pwa-installable"))return"pwa-installable";if(e.startsWith("pwa-optimized"))return"pwa-optimized"}function rt(e,t){let n=e*.1;return(t.next()-.5)*2*n+e}function ea(e,t,r){let n={},o=$i.split(" ");for(let p of t){let{auditId:m,averageNumericValue:y,averageWastedMs:b,unit:v="items"}=p,x=tt(m);if(typeof y=="number"){let C=rt(y,r),z=1-Math.min(1,Math.max((C-1e3)/9e3,0));n[m]={score:z,numericValue:C,scoreDisplayMode:"numeric",displayValue:m==="cumulative-layout-shift"?C.toLocaleString("en-US",{maximumFractionDigits:2}):x==="metrics"?`${(C/1e3).toLocaleString("en-US",{maximumFractionDigits:1})} s`:`${Math.round(C)} ${v}`}}else if(typeof b=="number"){let C=rt(b,r),z=1-Math.min(1,Math.max((C-100)/900,0)),D=p.items&&p.items.some(S=>S.averageWastedBytes),_=C*257;n[m]={score:z,scoreDisplayMode:"numeric",displayValue:D?`${(_/1024).toLocaleString("en-US",{maximumFractionDigits:0})} KB`:`${(C/1e3).toLocaleString("en-US",{maximumFractionDigits:1})} s`,details:{type:"opportunity",overallSavingsMs:C,overallSavingsBytes:D?_:void 0,items:[]}}}else{let{passRate:C=1}=p;n[m]={score:r.next()<=C?1:0,scoreDisplayMode:"binary"}}let w={};if(p.items){let C=[];for(let d of p.items){let c=d,{url:D,inclusionRate:_=1}=c,S=br(c,["url","inclusionRate"]);if(r.next()>_)continue;let j={};D&&(D.includes("lorempixel")&&(w.thumbnail={key:"url",valueType:"thumbnail"}),w.url={key:"url",valueType:"url",label:"URL"},j.url=new URL(D,e).href);for(let h of Object.keys(S))if(h.startsWith("average")){let g=h.replace("average","").replace(/^\w/,I=>I.toLowerCase()),N=h.endsWith("Ms")?"timespanMs":"bytes";w[g]={key:g,valueType:N,label:Fe.startCase(g)};let M=S[h];j[g]=rt(M,r)}else w[h]={key:h,valueType:"text",label:Fe.startCase(h)},j[h]=S[h];C.push(j)}let z=n[m].details||{type:"table"};z.headings=Object.values(w).map(D=>tt(m)==="load-opportunities"?D:E(F({},D),{itemType:D.valueType,text:D.label,valueType:void 0})),z.items=C,n[m].details=z}n[m].title=Fe.startCase(m),n[m].description=`Help text for ${Fe.startCase(m)}. ${o.slice(0,Math.round(m.length*1.5)).join(" ")}.`}let i={},s=Fe.groupBy(Object.entries(n),p=>pn(p[0]));for(let p of s){let m=pn(p[0][0]),y=p.reduce((b,v)=>b+(v[1].score||0),0);i[m]={id:m,title:m.toUpperCase(),score:y/p.length,auditRefs:p.map(([b])=>({id:b,weight:1,group:tt(b)}))}}let l=new Date("2019-08-01T17:00:00.000Z").getTime(),f=Math.round(r.next()*1e3*60*60*24*7),u=new Date(l+f).toISOString();return{requestedUrl:e,finalUrl:e,categories:i,audits:n,fetchTime:u,lighthouseVersion:"5.2.0",configSettings:{channel:"cli"},categoryGroups:{metrics:{title:"Metrics"},"load-opportunities":{title:"Opportunities"},diagnostics:{title:"Diagnostics"},accessibility:{title:"Accessibility"},seo:{title:"SEO"},"best-practices":{title:"Best Practices"},"pwa-fast-reliable":{title:"PWA Fast & Reliable"},"pwa-installable":{title:"PWA Installable"},"pwa-optimized":{title:"PWA Optimized"}},runWarnings:[],userAgent:"Chrome!",environment:{hostUserAgent:"",networkUserAgent:"",benchmarkIndex:500},timing:{total:1,entries:[]},i18n:{rendererFormattedStrings:{},icuMessagePaths:{}}}}hn.exports={createLHR:ea,generateNumericValue:rt,getGroupForAuditId:tt}});var re=q((ec,Tn)=>{"use strict";var gn=ue(),{getGroupForAuditId:ta}=mn(),ra=["main-thread-tasks","screenshot-thumbnails","metrics"];function It(e,t="audit"){if(e===0)return"neutral";let r=e<0;return t==="score"&&(r=e>0),r?"improvement":"regression"}function na(e){switch(e.type){case"error":return"regression";case"score":return It(de(e).delta,"score");case"numericValue":case"itemCount":case"itemDelta":return It(de(e).delta,"audit");case"itemAddition":return"regression";case"itemRemoval":return"improvement";default:return"neutral"}}function wn(e){if(!e.length)return"no change";if(e.some(r=>r.type==="itemAddition"))return"added";if(e.some(r=>r.type==="itemRemoval"))return"removed";let t=e.filter(r=>r.type==="itemDelta");return t.every(r=>r.compareValue>r.baseValue)?"worse":t.every(r=>r.compareValue<r.baseValue)?"better":t.length?"ambiguous":"no change"}function kt(e,t,r){return e.filter(n=>{let o="compareItemIndex"in n?n.compareItemIndex:void 0,i="baseItemIndex"in n?n.baseItemIndex:void 0;return typeof o=="number"?o===t:typeof i=="number"?i===r:!1})}function nt(e,t,r){return wn(kt(e,t,r))}function bn(e,t,r){let o=kt(e,t,r).filter(Cn);if(o.length)return Math.max(...o.map(i=>de(i).delta))}function oa(e){return e.some(t=>t==="regression")?"regression":e.some(t=>t==="neutral")?"neutral":"improvement"}function Cn(e){return["score","numericValue","itemCount","itemDelta"].includes(e.type)}function vn(e){return typeof e!="number"?"error":e>=.9?"pass":e>=.5?"average":"fail"}function ia(e,t){return typeof e!="number"?"error":e<=t[0]?"pass":e<=t[1]?"average":"fail"}function aa(e){let t=Cn(e)?de(e).absoluteDelta:0;return e.type==="error"?1e12:e.type==="score"?1e10*t:e.type==="numericValue"?1e8*Math.max(t/1e3,1):e.type==="itemCount"?1e6*t:e.type==="itemAddition"||e.type==="itemRemoval"?1e5:e.type==="itemDelta"?Math.min(Math.max(t/100,1),99999):0}function de(e){let{baseValue:t,compareValue:r}=e,n=r-t,o=Math.abs(n);if(n===0)return{delta:n,absoluteDelta:o,percentDelta:0,percentAbsoluteDelta:0};let i=t?n/t:1,s=Math.abs(i);return{delta:n,absoluteDelta:o,percentDelta:i,percentAbsoluteDelta:s}}function se(e){let{auditId:t,type:r,baseValue:n,compareValue:o,baseItemIndex:i,compareItemIndex:s,itemKey:l}=e;if(r==="itemAddition"){if(typeof s!="number")throw new Error("compareItemIndex is not set");return{auditId:t,type:r,compareItemIndex:s}}if(r==="itemRemoval"){if(typeof i!="number")throw new Error("baseItemIndex is not set");return{auditId:t,type:r,baseItemIndex:i}}if(r==="displayValue")throw new Error("Do not use createAuditDiff for displayValue, just manually create");if(typeof o!="number"||typeof n!="number"||!Number.isFinite(n)||!Number.isFinite(o)||r==="error")return{auditId:t,type:"error",attemptedType:r,baseValue:n||NaN,compareValue:o||NaN};let f={auditId:t,type:"score",baseValue:n,compareValue:o};if(r==="itemDelta"){if(typeof l!="string")throw new Error("itemKey is not set");if(typeof i!="number"&&typeof s!="number")throw new Error("Either baseItemIndex or compareItemIndex must be set");return E(F({},f),{type:"itemDelta",baseItemIndex:i,compareItemIndex:s,itemKey:l})}return E(F({},f),{type:r})}function sa(e,t,r,n){let o=[],i=!1;for(let s of Object.keys(t.item)){let l=t.item[s],f=r.item[s];typeof l!="number"||typeof f!="number"||n.some(u=>u.key===s)&&(i=!0,o.push(se({auditId:e,type:"itemDelta",itemKey:s,baseItemIndex:t.index,compareItemIndex:r.index,baseValue:l,compareValue:f})))}if(!i){let s=Se(t.item),l=Se(r.item);if(s.length||l.length){let f=p=>typeof p=="object"&&p!==null?p:{value:String(p)},u=it(s.map(f),l.map(f),{pairCollisionBucketsByRawKey:!0}),d=u.filter(p=>!p.base&&p.compare).length,c=u.filter(p=>p.base&&!p.compare).length;d>0&&o.push(se({auditId:e,type:"itemDelta",itemKey:"__subItemsAdded",baseItemIndex:t.index,compareItemIndex:r.index,baseValue:0,compareValue:d})),c>0&&o.push(se({auditId:e,type:"itemDelta",itemKey:"__subItemsRemoved",baseItemIndex:t.index,compareItemIndex:r.index,baseValue:c,compareValue:0}))}}return o}function Zt(e,t,r){let n=[];for(let o of e){if(o.type!=="itemAddition"&&o.type!=="itemRemoval")continue;let i=o.type==="itemAddition"?r[o.compareItemIndex]:t[o.baseItemIndex];for(let s of Object.keys(i)){let l=o.type==="itemAddition"?0:i[s],f=o.type==="itemAddition"?i[s]:0;if(typeof f!="number"||typeof l!="number")continue;let u=o.type==="itemAddition"?"compareItemIndex":"baseItemIndex",d=o.type==="itemAddition"?o.compareItemIndex:o.baseItemIndex;n.push(se({auditId:o.auditId,type:"itemDelta",itemKey:s,[u]:d,baseValue:l,compareValue:f}))}}return n}function Pn(e){if(e.startsWith("http")&&e.includes("?"))try{let t=new URL(e);t.search="",e=t.href}catch(t){}return e.replace(/www-embed-player-[0-9a-z]+/i,"www-embed-player").replace(/player_ias-[0-9a-z]+/i,"player_ias").replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,"UUID").replace(/:[0-9]{3,5}\//,":PORT/").replace(/(\.|-)[0-9a-f]{6,8}\.(js|css|woff|html|png|jpeg|jpg|svg)/i,"$1HASH.$2")}function jt(e){if(typeof e!="object"||e===null)return e;if(Array.isArray(e))return e.map(t=>jt(t));{let t=e,n=Object.keys(e).filter(i=>!i.startsWith("_")&&i!=="subItems"),o={};for(let i of n)o[i]=jt(t[i]);return o}}function Oe(e){var r,n,o,i,s,l,f;if(typeof((r=e.featureId)==null?void 0:r.text)=="string")return e.featureId.text;let t=e.source;return typeof t=="string"?t:t&&t.url?`${t.url}:${t.line}:${t.column}`:typeof e.signal=="string"&&e.signal?e.signal:e.location&&typeof e.location.url=="string"?`${e.location.url}:${e.location.line}:${e.location.column}`:typeof e.label=="string"?typeof e.resourceType=="string"?e.resourceType:e.label:typeof e.groupLabel=="string"?typeof e.group=="string"?e.group:e.groupLabel:typeof e.name=="string"?e.name:typeof e.statistic=="string"?e.statistic:typeof((n=e.node)==null?void 0:n.path)=="string"?e.node.path:typeof((o=e.relatedNode)==null?void 0:o.path)=="string"?e.relatedNode.path:typeof((i=e.extra)==null?void 0:i.path)=="string"?e.extra.path:typeof((s=e.extra)==null?void 0:s.value)=="string"?e.extra.value:typeof((l=e.tapTarget)==null?void 0:l.path)=="string"&&typeof((f=e.overlappingTarget)==null?void 0:f.path)=="string"?`${e.tapTarget.path} + ${e.overlappingTarget.path}`:typeof e.url=="string"&&e.url?e.url:typeof e.scriptUrl=="string"&&e.scriptUrl?e.scriptUrl:typeof e.frameUrl=="string"&&e.frameUrl?e.frameUrl:typeof e.origin=="string"&&e.origin?e.origin:typeof e.entity=="string"?e.entity:e.entity&&typeof e.entity.text=="string"?e.entity.text:typeof e.product=="string"&&e.product?e.product:typeof e.failureReason=="string"?typeof e.animation=="string"?`${e.animation}:${e.failureReason}`:e.failureReason:typeof e.reason=="string"?e.reason:typeof e.cause=="string"?e.cause:typeof e.error=="string"?e.error:JSON.stringify(jt(e))}function it(e,t,r={}){let{pairCollisionBucketsByRawKey:n=!1}=r,o=gn.groupIntoMap([...e.map((s,l)=>({item:s,kind:"base",index:l})),...t.map((s,l)=>({item:s,kind:"compare",index:l}))],s=>Pn(Oe(s.item))),i=[];for(let s of o.values()){let l=s.filter(u=>u.kind==="base"),f=s.filter(u=>u.kind==="compare");if(l.length>1||f.length>1){if(!n){for(let p of s)i.push(p.kind==="base"?{base:p}:{compare:p});continue}let u=gn.groupIntoMap(s,p=>Oe(p.item)),d=[],c=[];for(let p of u.values()){let m=p.filter(b=>b.kind==="base"),y=p.filter(b=>b.kind==="compare");m.length===1&&y.length===1?i.push({base:m[0],compare:y[0]}):(d.push(...m),c.push(...y))}if(d.length<=1&&c.length<=1)(d.length||c.length)&&i.push({base:d[0],compare:c[0]});else for(let p of[...d,...c])i.push(p.kind==="base"?{base:p}:{compare:p});continue}i.push({base:l[0],compare:f[0]})}return i}function Ut(e,t){let r=["added","worse","ambiguous","removed","better","no change"];return t.map(n=>E(F({},n),{diffs:kt(e,n.compare&&n.compare.index,n.base&&n.base.index)})).sort((n,o)=>{let i=n.compare&&n.compare.index,s=n.base&&n.base.index,l=o.compare&&o.compare.index,f=o.base&&o.base.index,u=r.indexOf(nt(e,i,s)),d=r.indexOf(nt(e,l,f)),c=Oe(n.compare&&n.compare.item||n.base&&n.base.item||{}),p=Oe(o.compare&&o.compare.item||o.base&&o.base.item||{}),m=bn(e,i,s),y=bn(e,l,f);return u===d?typeof m=="number"&&typeof y=="number"?y-m:c.localeCompare(p):u-d})}function Ln(e,t,r,n,o={}){let i=[];for(let{base:s,compare:l}of it(t,r,o))if(s&&l)i.push(...sa(e,s,l,n));else if(l)i.push({type:"itemAddition",auditId:e,compareItemIndex:l.index});else if(s)i.push({type:"itemRemoval",auditId:e,baseItemIndex:s.index});else throw new Error("Impossible");return i}function Se(e){return!e||!e.subItems?[]:(Array.isArray(e.subItems)?e.subItems:Array.isArray(e.subItems.items)?e.subItems.items:[]).filter(r=>r!=null)}function la(e,t){let r=[],n=o=>{if(!o)return;let i=o.subItemsHeading&&o.subItemsHeading.key,s=r.findIndex(l=>{if(o.key!==null)return l.key===o.key;let f=l.subItemsHeading&&l.subItemsHeading.key;return l.key===null&&!!i&&f===i});if(s!==-1){!r[s].subItemsHeading&&o.subItemsHeading&&(r[s]=E(F({},r[s]),{subItemsHeading:o.subItemsHeading}));return}r.push(o)};for(let o of e||[])n(o);for(let o of t||[])n(o);return r}function An(e){let t=e.some(r=>r&&r.subItemsHeading&&r.subItemsHeading.key);return e.map((r,n)=>{let o=r.valueType||r.itemType||"unknown";if(!t)return n===0?{key:"__self",valueType:"text",isSelfValue:!0}:{key:null,valueType:"unknown"};let i=r.subItemsHeading;return!i||!i.key?{key:null,valueType:o}:{key:i.key,valueType:i.valueType||i.itemType||o}})}function ca(e,t,r,n,o={}){let{hasBaseAudit:i=!0,percentAbsoluteDeltaThreshold:s=0}=o,l=An(n),f=Se(t),u=Se(r);if(!f.length&&!u.length)return{subHeadings:l,sortedSubItems:[]};let d=w=>typeof w!="object"||w===null?{value:String(w),__self:w}:l[0]&&l[0].isSelfValue?E(F({},w),{__self:w}):w;if(!t||!r){let w=!!r,C=(w?u:f).map(d),z=C.map((S,j)=>w?{compare:{item:S,kind:"compare",index:j}}:{base:{item:S,kind:"base",index:j}}),D=[];if(i)for(let S=0;S<C.length;S++){let j=C[S];for(let h of l){if(!h.key)continue;let g=j[h.key];typeof g!="number"||g===0||D.push(se(E(F({auditId:e,type:"itemDelta",itemKey:h.key},w?{compareItemIndex:S}:{baseItemIndex:S}),{baseValue:w?0:g,compareValue:w?g:0})))}}let _=Ut(D,z).map(S=>E(F({},S),{state:"no change"}));return{subHeadings:l,sortedSubItems:_}}let c=f.map(d),p=u.map(d),m=Ln(e,c,p,l,{pairCollisionBucketsByRawKey:!0}),b=[...m,...Zt(m,c,p)].filter(w=>{if(w.type==="itemDelta"){let C=de(w);return C.absoluteDelta>0&&C.percentAbsoluteDelta>s}return!0}),v=it(c,p,{pairCollisionBucketsByRawKey:!0}),x=Ut(b,v).map(w=>E(F({},w),{state:nt(b,w.compare&&w.compare.index,w.base&&w.base.index)}));return{subHeadings:l,sortedSubItems:x}}function yn(e){return e.scoreDisplayMode==="notApplicable"?1:e.scoreDisplayMode==="informative"?0:e.score}function Xt(e){return typeof e.numericValue!="number"&&e.details&&typeof e.details.overallSavingsMs=="number"?e.details.overallSavingsMs:e.numericValue}function xn(e){return e.scoreDisplayMode==="notApplicable"?0:Xt(e)}function ot(e){if(!e||!e.details)return{items:[],headings:[]};if(e.details.type==="checklist"){let t=e.details.items||{},r=Array.isArray(t)?t.map((n,o)=>[String(o),n]):Object.entries(t);return{headings:[{key:"check",valueType:"text",label:"Checklist"},{key:"value",valueType:"text",label:""}],items:r.filter(([,n])=>n&&typeof n=="object").map(([n,o])=>({name:`${o.id||n}:${!!o.value}`,check:o.label||"",value:o.value?"Pass":"Fail"}))}}if(e.details.type==="list"){let t=Array.isArray(e.details.items)?e.details.items:[],r=[],n=[],o=i=>{if(i){if(i.key!==null){let s=r.findIndex(l=>l.key===i.key);if(s!==-1){!r[s].subItemsHeading&&i.subItemsHeading&&(r[s]=E(F({},r[s]),{subItemsHeading:i.subItemsHeading}));return}}r.push(i)}};for(let i of t){let s=i&&i.type==="list-section"?i.value:i;if(!(!s||typeof s!="object"))if(s.type==="table"||s.type==="opportunity"){for(let l of s.headings||[])o(l);for(let l of Array.isArray(s.items)?s.items:[]){let f=F({},l);typeof f.label!="string"&&(typeof f.phase=="string"?f.label=f.phase:typeof f.subpart=="string"?f.label=f.subpart:f.node&&f.node.type==="text"&&typeof f.node.value=="string"&&(f.label=f.node.value)),n.push(f)}}else if(s.type==="checklist"){let l=ot({score:null,details:s});for(let f of l.headings)o(f);n.push(...l.items)}else s.type==="node"&&(o({key:"node",valueType:"node",label:"Element"}),n.push({node:s}))}return{items:n,headings:r}}return{items:Array.isArray(e.details.items)?e.details.items:[],headings:e.details.headings||[]}}function fa(e,t,r={}){let n=e.id||"",{percentAbsoluteDeltaThreshold:o=0}=r,i=[];if(ra.includes(n))return i;(typeof e.score=="number"||typeof t.score=="number")&&i.push(se({auditId:n,type:"score",baseValue:yn(e),compareValue:yn(t)})),(typeof Xt(e)=="number"||typeof Xt(t)=="number")&&i.push(se({auditId:n,type:"numericValue",baseValue:xn(e),compareValue:xn(t)})),(typeof e.displayValue=="string"||typeof t.displayValue=="string")&&i.push({auditId:n,type:"displayValue",baseValue:e.displayValue||"",compareValue:t.displayValue||""});let s=!1,l=e.details||{},f=t.details||{};if(l.type!=="debugdata"&&l.items||f.type!=="debugdata"&&f.items){s=!0;let{items:p,headings:m}=ot(e),{items:y,headings:b}=ot(t),v=m.concat(b);i.push(se({auditId:n,type:"itemCount",baseValue:p.length,compareValue:y.length})),i.push(...Ln(n,p,y,v)),r.synthesizeItemKeyDiffs&&i.push(...Zt(i,p,y))}let u=i.filter(p=>p.type==="error"||p.type==="itemAddition"||p.type==="itemRemoval"?!0:p.type==="score"&&!r.forceAllScoreDiffs?vn(p.baseValue)!==vn(p.compareValue):p.type==="displayValue"?p.baseValue!==p.compareValue&&!r.skipDisplayValueDiffs:de(p).percentAbsoluteDelta>o);if(u.length===1&&u[0].type==="displayValue")return[];let d=t.score===1&&e.score===1;return ta(n)!=="metrics"&&u.every(p=>p.type==="displayValue"||p.type==="numericValue")&&(d||s)?[]:u}Tn.exports={findAuditDiffs:fa,normalizeDetails:ot,mergeHeadings:la,getSubItems:Se,getSubItemHeadings:An,diffAndSortSubItems:ca,getDiffSeverity:aa,getDeltaLabel:It,getDeltaStats:de,getDiffLabel:na,getRowLabel:wn,getRowLabelForIndex:nt,getMostSevereDiffLabel:oa,getMetricScoreLevel:ia,getItemKey:Oe,zipBaseAndCompareItems:it,synthesizeItemKeyDiffs:Zt,sortZippedBaseAndCompareItems:Ut,replaceNondeterministicStrings:Pn}});var zn=q((hc,Hn)=>{"use strict";function ua(e){let t=[],r=e.split(/\[([^\]]+?)\]\((https?:\/\/.*?)\)/g);for(;r.length;){let[n,o,i]=r.splice(0,3);n&&t.push({isLink:!1,text:n}),o&&i&&t.push({isLink:!0,text:o,linkHref:i})}return t}Hn.exports={splitMarkdownLink:ua}});var Ve,P,Pr,mi,ce,vr,Lr,At,gi,Ae={},Ar=[],bi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,We=Array.isArray;function ie(e,t){for(var r in t)e[r]=t[r];return e}function Tr(e){var t=e.parentNode;t&&t.removeChild(e)}function a(e,t,r){var n,o,i,s={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?Ve.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return Ze(e,s,n,o,null)}function Ze(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o==null?++Pr:o,__i:-1,__u:0};return o==null&&P.vnode!=null&&P.vnode(i),i}function A(e){return e.children}function $(e,t){this.props=e,this.context=t}function ge(e,t){if(t==null)return e.__?ge(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ge(e):null}function Nr(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Nr(e)}}function yr(e){(!e.__d&&(e.__d=!0)&&ce.push(e)&&!Ge.__r++||vr!==P.debounceRendering)&&((vr=P.debounceRendering)||Lr)(Ge)}function Ge(){var e,t,r,n,o,i,s,l,f;for(ce.sort(At);e=ce.shift();)e.__d&&(t=ce.length,n=void 0,i=(o=(r=e).__v).__e,l=[],f=[],(s=r.__P)&&((n=ie({},o)).__v=o.__v+1,P.vnode&&P.vnode(n),Nt(s,n,o,r.__n,s.ownerSVGElement!==void 0,32&o.__u?[i]:null,l,i==null?ge(o):i,!!(32&o.__u),f),n.__.__k[n.__i]=n,Dr(l,n,f),n.__e!=i&&Nr(n)),ce.length>t&&ce.sort(At));Ge.__r=0}function Hr(e,t,r,n,o,i,s,l,f,u,d){var c,p,m,y,b,v=n&&n.__k||Ar,x=t.length;for(r.__d=f,vi(r,t,v),f=r.__d,c=0;c<x;c++)(m=r.__k[c])!=null&&typeof m!="boolean"&&typeof m!="function"&&(p=m.__i===-1?Ae:v[m.__i]||Ae,m.__i=c,Nt(e,m,p,o,i,s,l,f,u,d),y=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&Ht(p.ref,null,m),d.push(m.ref,m.__c||y,m)),b==null&&y!=null&&(b=y),65536&m.__u||p.__k===m.__k?f=zr(m,f,e):typeof m.type=="function"&&m.__d!==void 0?f=m.__d:y&&(f=y.nextSibling),m.__d=void 0,m.__u&=-196609);r.__d=f,r.__e=b}function vi(e,t,r){var n,o,i,s,l,f=t.length,u=r.length,d=u,c=0;for(e.__k=[],n=0;n<f;n++)(o=e.__k[n]=(o=t[n])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?Ze(null,o,null,null,o):We(o)?Ze(A,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?Ze(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,l=yi(o,r,s=n+c,d),o.__i=l,i=null,l!==-1&&(d--,(i=r[l])&&(i.__u|=131072)),i==null||i.__v===null?(l==-1&&c--,typeof o.type!="function"&&(o.__u|=65536)):l!==s&&(l===s+1?c++:l>s?d>f-s?c+=l-s:c--:c=l<s&&l==s-1?l-s:0,l!==n+c&&(o.__u|=65536))):(i=r[n])&&i.key==null&&i.__e&&(i.__e==e.__d&&(e.__d=ge(i)),Tt(i,i,!1),r[n]=null,d--);if(d)for(n=0;n<u;n++)(i=r[n])!=null&&(131072&i.__u)==0&&(i.__e==e.__d&&(e.__d=ge(i)),Tt(i,i))}function zr(e,t,r){var n,o;if(typeof e.type=="function"){for(n=e.__k,o=0;n&&o<n.length;o++)n[o]&&(n[o].__=e,t=zr(n[o],t,r));return t}return e.__e!=t&&(r.insertBefore(e.__e,t||null),t=e.__e),t&&t.nextSibling}function Te(e,t){return t=t||[],e==null||typeof e=="boolean"||(We(e)?e.some(function(r){Te(r,t)}):t.push(e)),t}function yi(e,t,r,n){var o=e.key,i=e.type,s=r-1,l=r+1,f=t[r];if(f===null||f&&o==f.key&&i===f.type)return r;if(n>(f!=null&&(131072&f.__u)==0?1:0))for(;s>=0||l<t.length;){if(s>=0){if((f=t[s])&&(131072&f.__u)==0&&o==f.key&&i===f.type)return s;s--}if(l<t.length){if((f=t[l])&&(131072&f.__u)==0&&o==f.key&&i===f.type)return l;l++}}return-1}function xr(e,t,r){t[0]==="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||bi.test(t)?r:r+"px"}function ke(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||xr(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||xr(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n?r.u=n.u:(r.u=Date.now(),e.addEventListener(t,i?Cr:wr,i)):e.removeEventListener(t,i?Cr:wr,i);else{if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t!=="role"&&t in e)try{e[t]=r==null?"":r;break e}catch(s){}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function wr(e){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(P.event?P.event(e):e)}function Cr(e){return this.l[e.type+!0](P.event?P.event(e):e)}function Nt(e,t,r,n,o,i,s,l,f,u){var d,c,p,m,y,b,v,x,w,C,z,D,_,S,j,h=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(f=!!(32&r.__u),i=[l=t.__e=r.__e]),(d=P.__b)&&d(t);e:if(typeof h=="function")try{if(x=t.props,w=(d=h.contextType)&&n[d.__c],C=d?w?w.props.value:d.__:n,r.__c?v=(c=t.__c=r.__c).__=c.__E:("prototype"in h&&h.prototype.render?t.__c=c=new h(x,C):(t.__c=c=new $(x,C),c.constructor=h,c.render=wi),w&&w.sub(c),c.props=x,c.state||(c.state={}),c.context=C,c.__n=n,p=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),h.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=ie({},c.__s)),ie(c.__s,h.getDerivedStateFromProps(x,c.__s))),m=c.props,y=c.state,c.__v=t,p)h.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(h.getDerivedStateFromProps==null&&x!==m&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,C),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,C)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(g){g&&(g.__=t)}),z=0;z<c._sb.length;z++)c.__h.push(c._sb[z]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,C),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(m,y,b)})}if(c.context=C,c.props=x,c.__P=e,c.__e=!1,D=P.__r,_=0,"prototype"in h&&h.prototype.render){for(c.state=c.__s,c.__d=!1,D&&D(t),d=c.render(c.props,c.state,c.context),S=0;S<c._sb.length;S++)c.__h.push(c._sb[S]);c._sb=[]}else do c.__d=!1,D&&D(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++_<25);c.state=c.__s,c.getChildContext!=null&&(n=ie(ie({},n),c.getChildContext())),p||c.getSnapshotBeforeUpdate==null||(b=c.getSnapshotBeforeUpdate(m,y)),Hr(e,We(j=d!=null&&d.type===A&&d.key==null?d.props.children:d)?j:[j],t,r,n,o,i,s,l,f,u),c.base=t.__e,t.__u&=-161,c.__h.length&&s.push(c),v&&(c.__E=c.__=null)}catch(g){t.__v=null,f||i!=null?(t.__e=l,t.__u|=f?160:32,i[i.indexOf(l)]=null):(t.__e=r.__e,t.__k=r.__k),P.__e(g,t,r)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=xi(r.__e,t,r,n,o,i,s,f,u);(d=P.diffed)&&d(t)}function Dr(e,t,r){t.__d=void 0;for(var n=0;n<r.length;n++)Ht(r[n],r[++n],r[++n]);P.__c&&P.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){P.__e(i,o.__v)}})}function xi(e,t,r,n,o,i,s,l,f){var u,d,c,p,m,y,b,v=r.props,x=t.props,w=t.type;if(w==="svg"&&(o=!0),i!=null){for(u=0;u<i.length;u++)if((m=i[u])&&"setAttribute"in m==!!w&&(w?m.localName===w:m.nodeType===3)){e=m,i[u]=null;break}}if(e==null){if(w===null)return document.createTextNode(x);e=o?document.createElementNS("http://www.w3.org/2000/svg",w):document.createElement(w,x.is&&x),i=null,l=!1}if(w===null)v===x||l&&e.data===x||(e.data=x);else{if(i=i&&Ve.call(e.childNodes),v=r.props||Ae,!l&&i!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)m=v[u],u=="children"||(u=="dangerouslySetInnerHTML"?c=m:u==="key"||u in x||ke(e,u,null,m,o));for(u in x)m=x[u],u=="children"?p=m:u=="dangerouslySetInnerHTML"?d=m:u=="value"?y=m:u=="checked"?b=m:u==="key"||l&&typeof m!="function"||v[u]===m||ke(e,u,m,v[u],o);if(d)l||c&&(d.__html===c.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(c&&(e.innerHTML=""),Hr(e,We(p)?p:[p],t,r,n,o&&w!=="foreignObject",i,s,i?i[0]:r.__k&&ge(r,0),l,f),i!=null)for(u=i.length;u--;)i[u]!=null&&Tr(i[u]);l||(u="value",y!==void 0&&(y!==e[u]||w==="progress"&&!y||w==="option"&&y!==v[u])&&ke(e,u,y,v[u],!1),u="checked",b!==void 0&&b!==e[u]&&ke(e,u,b,v[u],!1))}return e}function Ht(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){P.__e(n,r)}}function Tt(e,t,r){var n,o;if(P.unmount&&P.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Ht(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){P.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Tt(n[o],t,r||typeof e.type!="function");r||e.__e==null||Tr(e.__e),e.__=e.__e=e.__d=void 0}function wi(e,t,r){return this.constructor(e,r)}function Ne(e,t,r){var n,o,i,s;P.__&&P.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],s=[],Nt(t,e=(!n&&r||t).__k=a(A,null,[e]),o||Ae,Ae,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?Ve.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,s),Dr(i,e,s)}Ve=Ar.slice,P={__e:function(e,t,r,n){for(var o,i,s;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),s=o.__d),s)return o.__E=o}catch(l){e=l}throw e}},Pr=0,mi=function(e){return e!=null&&e.constructor==null},$.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ie({},this.state),typeof e=="function"&&(e=e(ie({},r),this.props)),e&&ie(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),yr(this))},$.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),yr(this))},$.prototype.render=A,ce=[],Lr=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,At=function(e,t){return e.__v.__b-t.__v.__b},Ge.__r=0,gi=0;var He,k,zt,Fr,ze=0,Mr=[],Ye=[],Or=P.__b,Sr=P.__r,Br=P.diffed,_r=P.__c,Rr=P.unmount;function Ft(e,t){P.__h&&P.__h(k,e,ze||t),ze=0;var r=k.__H||(k.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Ye}),r.__[e]}function X(e){return ze=1,Ir(Ur,e)}function Ir(e,t,r){var n=Ft(He++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Ur(void 0,t),function(l){var f=n.__N?n.__N[0]:n.__[0],u=n.t(f,l);f!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=k,!k.u)){var o=function(l,f,u){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(p){return p.__c});if(d.every(function(p){return!p.__N}))return!i||i.call(this,l,f,u);var c=!1;return d.forEach(function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(c=!0)}}),!(!c&&n.__c.props===l)&&(!i||i.call(this,l,f,u))};k.u=!0;var i=k.shouldComponentUpdate,s=k.componentWillUpdate;k.componentWillUpdate=function(l,f,u){if(this.__e){var d=i;i=void 0,o(l,f,u),i=d}s&&s.call(this,l,f,u)},k.shouldComponentUpdate=o}return n.__N||n.__}function Z(e,t){var r=Ft(He++,3);!P.__s&&jr(r.__H,t)&&(r.__=e,r.i=t,k.__H.__h.push(r))}function ee(e){return ze=5,te(function(){return{current:e}},[])}function te(e,t){var r=Ft(He++,7);return jr(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function Ot(e,t){return ze=8,te(function(){return e},t)}function Ci(){for(var e;e=Mr.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Je),e.__H.__h.forEach(Dt),e.__H.__h=[]}catch(t){e.__H.__h=[],P.__e(t,e.__v)}}P.__b=function(e){k=null,Or&&Or(e)},P.__r=function(e){Sr&&Sr(e),He=0;var t=(k=e.__c).__H;t&&(zt===k?(t.__h=[],k.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Ye,r.__N=r.i=void 0})):(t.__h.forEach(Je),t.__h.forEach(Dt),t.__h=[],He=0)),zt=k},P.diffed=function(e){Br&&Br(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Mr.push(t)!==1&&Fr===P.requestAnimationFrame||((Fr=P.requestAnimationFrame)||Pi)(Ci)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Ye&&(r.__=r.__V),r.i=void 0,r.__V=Ye})),zt=k=null},P.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Je),r.__h=r.__h.filter(function(n){return!n.__||Dt(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],P.__e(n,r.__v)}}),_r&&_r(e,t)},P.unmount=function(e){Rr&&Rr(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Je(n)}catch(o){t=o}}),r.__H=void 0,t&&P.__e(t,r.__v))};var Er=typeof requestAnimationFrame=="function";function Pi(e){var t,r=function(){clearTimeout(n),Er&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Er&&(t=requestAnimationFrame(r))}function Je(e){var t=k,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),k=t}function Dt(e){var t=k;e.__c=e.__(),k=t}function jr(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Ur(e,t){return typeof t=="function"?t(e):t}function St(e){var t,r,n="";if(e)if(typeof e=="object")if(e.push)for(t=0;t<e.length;t++)e[t]&&(r=St(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(r=St(t))&&(n&&(n+=" "),n+=r);else typeof e!="boolean"&&!e.call&&(n&&(n+=" "),n+=e);return n}function H(){for(var e=0,t,r="";e<arguments.length;)(t=St(arguments[e++]))&&(r&&(r+=" "),r+=t);return r}var Ai=Xr(),Ti=()=>a("img",{src:Ai,alt:"Loading spinner"}),Bt=e=>a("div",{className:H("loading-spinner",{"loading-spinner--container":!e.solo})},a(Ti,null));var ae=e=>{let{children:t}=e;return a("div",{className:H("paper",e.className)},t)};var nn=K($r()),ki=K(ue());var on=new nn.default({rootURL:window.location.origin,URL:window.URL,fetch:window.fetch.bind(window)});function $e(e){return T(this,null,function*(){let r=(yield on.getViewerOrigin()).viewerOrigin||"https://googlechrome.github.io";window.addEventListener("message",function s(l){l.origin===r&&i&&l.data.opened&&(i.postMessage({lhresults:e},r),window.removeEventListener("message",s))});let n=e.fetchTime,o=`${e.lighthouseVersion}-${e.requestedUrl}-${n}`,i=window.open(`${r}/lighthouse/viewer`,o)})}var et=e=>{let{children:t,lhr:r}=e,[n,o]=X(!1);return a("span",{className:H("lhr-viewer-link",e.className,{"lhr-viewer-link--loading":n}),onClick:i=>T(null,null,function*(){if(i.preventDefault(),i.stopImmediatePropagation(),n)return;if(typeof r=="object")return $e(r);o(!0);let s=yield r();o(!1),$e(s)})},t)};var Gi=an(),Et=e=>{let{lhr:t,label:r="Open Report"}=e;return a(et,{lhr:t},a("div",{className:"lhr-viewer-button",role:"button"},a("img",{src:Gi})," ",a("span",null,r)))};var cn=sn(),De=ln();function Mt(e){if(e.includes("<script>window.__LIGHTHOUSE_JSON__ = ")){let t=e.match(/window\.__LIGHTHOUSE_JSON__ = (.*?});<\/script>/);t&&(e=t[1])}if(e.trim().charAt(0)==="{")try{let t=JSON.parse(e);return t.lighthouseVersion?t:new Error("JSON did not contain a lighthouseVersion")}catch(t){return new Error(`File was not valid JSON (${t.message})`)}return new Error("File was not a valid report")}function fn(e,t){let r=new URL(e.finalUrl),n=new URL(t.finalUrl);return r.hostname!==n.hostname?"hostname":r.pathname!==n.pathname?"pathname":r.search!==n.search?"path":r.pathname.length<5?"timestamp-hostname":"timestamp-pathname"}var Yi=e=>{let{filename:t,lhr:r}=e.report,n=new URL(r.finalUrl),o=new Date(r.fetchTime).toLocaleString(),i={filename:t,hostname:n.hostname,pathname:n.pathname,path:`${n.pathname}${n.search}`,"timestamp-hostname":`${o} (${n.hostname})`,"timestamp-pathname":`${o} (${n.pathname})`},s=`${n.href} at ${o}`;return a("span",{title:s},i[e.displayType])};function un(e,t){let r=t[0].name,n=new FileReader;n.readAsText(t[0],"utf-8"),n.addEventListener("load",()=>{if(typeof n.result!="string"){e.addToast({message:"File was not readable as text!",level:"error"});return}let o=Mt(n.result);if(o instanceof Error){e.addToast({message:`Invalid file: ${o.message}`,level:"error"});return}e.setReport({filename:r,data:n.result,lhr:o})}),n.addEventListener("error",()=>{e.addToast({message:"File was not readable!",level:"error"})})}function Ji(e,t,r,n){n.target instanceof HTMLElement&&(n.stopPropagation(),n.preventDefault(),r(!0),t.current=n.target)}function qi(e,t,r,n){n.target===t.current&&(n.stopPropagation(),n.preventDefault(),r(!1),t.current=void 0)}function Ki(e,t,r,n){t.current&&(n.stopPropagation(),n.preventDefault())}function Qi(e,t,r,n){t.current&&n instanceof DragEvent&&n.dataTransfer&&(n.stopPropagation(),n.preventDefault(),r(!1),t.current=void 0,un(e,n.dataTransfer.files))}var xe=e=>{let[t,r]=X(!1),n=ee(void 0),o=f=>Ji(e,n,r,f),i=f=>qi(e,n,r,f),s=f=>Ki(e,n,r,f),l=f=>Qi(e,n,r,f);return Z(()=>{if(e.dragTarget==="document")return document.addEventListener("dragenter",o),document.addEventListener("dragleave",i),document.addEventListener("dragover",s),document.addEventListener("drop",l),()=>{document.removeEventListener("dragenter",o),document.removeEventListener("dragleave",i),document.removeEventListener("dragover",s),document.removeEventListener("drop",l)}},[e.dragTarget,e.addToast,e.setReport,n.current]),a("div",{className:H(`report-upload-box report-upload-box--${e.variant}`,{"report-upload-box--drop":t,"report-upload-box--document-target":e.dragTarget==="document"}),onDragEnter:o,onDragLeave:i,onDragOver:s,onDrop:l},a("div",{className:"report-upload-box__drop-outline"},"Drop your report to upload"),a("span",{className:"report-upload-box__label"},e.variant==="base"?"Base":"Compare"),a("div",{className:"report-upload-box__file"},e.report?a(Yi,{report:e.report,displayType:e.displayType}):a(A,null)),a("div",{className:"report-upload-box__lhr-link"},e.report&&e.showOpenLhrLink?a(Et,{lhr:e.report.lhr,label:"View Report"}):null),a("div",{className:"report-upload-box__spacer"}),a("label",{className:"report-upload-box__upload"},"Select file",a("input",{type:"file",style:{display:"none"},onChange:f=>{let u=f.target;if(!(u instanceof HTMLInputElement))return;let d=u.files;!d||d.length!==1||un(e,d)}})))};var dn=e=>a("div",{className:"landing"},a("div",{className:"landing__background"},a("img",{src:cn,alt:"Lighthouse CI Background Image"})),a(ae,{className:"landing__paper"},a("div",{className:"landing__logos"},a("img",{className:"landing__logo",src:De,alt:"Lighthouse Logo"}),a("img",{className:"landing__logo landing__logo--diff",src:De,alt:""}),a("h1",null,"Lighthouse Report Diff Tool")),a("p",null,"Provide two Lighthouse reports to start comparing!"),a("p",null,a("a",{href:"./?baseReport=https://googlechrome.github.io/lighthouse-ci/packages/server/test/fixtures/lh-5-6-0-verge-a.json&compareReport=https://googlechrome.github.io/lighthouse-ci/packages/server/test/fixtures/lh-5-6-0-verge-b.json"},"View example diff")),a("div",{className:"landing__upload"},a(xe,{variant:"base",report:e.baseReport,setReport:e.setBaseReport,addToast:e.addToast,displayType:"filename",dragTarget:e.baseReport?"self":"document"}),a(xe,{variant:"compare",report:e.compareReport,setReport:e.setCompareReport,addToast:e.addToast,displayType:"filename",dragTarget:e.baseReport?"document":"self"})),a("p",null,"Above, drag 'n drop your JSON/HTML, or select the files from disk."),a("footer",null,"Powered by ",a("a",{href:"https://github.com/GoogleChrome/lighthouse-ci"},"lighthouse-ci"))));var vo=K(ue()),ft=K(re());var at=e=>{let{options:t,value:r,setValue:n,className:o,title:i,label:s}=e,l=t.some(f=>f.value===r)?t:[...t,{value:r,label:r}];return a("div",{className:H("dropdown",o),style:{position:"relative"},"data-tooltip":i},a("label",null,s?a("span",{className:"dropdown__label"},s):a(A,null),a("select",{onChange:f=>{f.target instanceof HTMLSelectElement&&n(f.target.value)}},l.map(f=>a("option",{key:f.value,value:f.value,selected:f.value===r},f.label)))),a("div",{className:"dropdown__chevron"},a("i",{className:"material-icons"},"arrow_drop_down")))};function Nn(e){let t=ee(void 0);return Z(()=>{t.current=e},[e]),t.current}var ne=e=>{let t=e.score;return t>=.9?a("i",{className:"lh-score-pass"}):t>=.5?a("i",{className:"lh-score-average"}):a("i",{className:"lh-score-fail"},a("svg",{viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},a("polygon",{points:"10,110 60,10 110,110"})))},we=e=>(e.audit.score||0)>=.9?a("span",{className:"lh-score-word"},"Pass"):a("span",{className:"lh-score-word"},"Fail");var Dn=K(zn());var Fn=e=>{let t=(0,Dn.splitMarkdownLink)(e.text);return a(A,null,t.map((r,n)=>{if(!r.isLink)return a("span",{key:n},r.text);let o=new URL(r.linkHref);return["https://developers.google.com","https://web.dev"].includes(o.origin)&&(o.searchParams.set("utm_source","lighthouse"),o.searchParams.set("utm_medium","ci")),a("a",{key:n,href:o.href,target:"_blank",rel:"noopener noreferrer"},r.text)}))};var Be=()=>a("span",{style:{display:"inline-block",width:4,height:1}});var _e=K(re());var Gt=e=>{let t=e.type,{compareValue:r,baseValue:n,diff:o}=e,i=r===void 0?n:r;if(i==null)return a(A,null);typeof i=="object"&&i.type&&(t=i.type);let s=o?(0,_e.getDiffLabel)(o):"neutral",l=n&&typeof n=="object"&&"value"in n?n.value:n,f=r&&typeof r=="object"&&"value"in r?r.value:r,u=Number.isFinite(l)?l:0,d=Number.isFinite(f)?f:0,c=`Base Value: ${Math.round(u).toLocaleString()}`,p=`Compare Value: ${Math.round(d).toLocaleString()}`,m=`${c}, ${p}`,y=o&&(0,_e.getDeltaStats)(o).percentAbsoluteDelta!==1?` (${((0,_e.getDeltaStats)(o).percentAbsoluteDelta*100).toLocaleString(void 0,{maximumFractionDigits:0})}%)`:"";switch(t){case"bytes":{let b=Math.abs((d-u)/1024);return a("pre",{className:`simple-details--${s}`,"data-tooltip":m},d>=u?"+":"-",b.toLocaleString(void 0,{maximumFractionDigits:Math.abs(b)<1?1:0}),a(Be,null),"KB",y)}case"ms":case"timespanMs":{let b=Math.abs(Math.round(d-u));return a("pre",{className:`simple-details--${s}`,"data-tooltip":m},d>=u?"+":"-",b.toLocaleString(),a(Be,null),"ms",y)}case"thumbnail":return a("img",{style:{width:48,height:48,objectFit:"cover"},src:typeof i=="object"&&i.value?i.value:i,onError:b=>{let v=b.srcElement;v instanceof HTMLImageElement&&(v.onerror=null,v.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==")}});case"url":{let b=typeof i=="object"&&i?i.value:i,v=b,x="";try{let w=new URL(b);(w.protocol==="http:"||w.protocol==="https:")&&(v=w.pathname,x=w.hostname)}catch(w){}return a("span",{title:b},v,x?a("span",{className:"simple-details__url-hostname"},"(",x,")"):"")}case"link":return i.url?a("a",{target:"_blank",rel:"noopener noreferrer",href:i.url},i.text):a("span",null,i.text);case"code":return a("pre",null,typeof i=="object"&&i?i.value:i);case"numeric":return a("pre",{className:`simple-details--${s}`},d>=u?"+":"-",Math.abs(d-u).toLocaleString(),y);case"text":return a("span",null,typeof i=="object"&&i?i.value:i);case"baseline-status":return a("span",null,i.displayString||i.status);case"node":return a("pre",null,i.snippet);case"source-location":{if(!i.url)return a("pre",null,JSON.stringify(i));let{url:b,line:v,column:x}=i;return a("pre",null,b,":",v,":",x)}case"debugdata":return a(A,null);default:{let b=JSON.stringify(e);return a("pre",{"data-tooltip":b},b.slice(0,20))}}};var Y=K(re());function da(e){switch(e){case"bytes":case"ms":case"timespanMs":case"numeric":return!0;default:return!1}}var On=e=>{let{audit:t,baseAudit:r,diffs:n}=e.pair,[o,i]=X({}),[s,l]=X({});if(!t.details)return a(A,null);let{headings:f,items:u}=(0,Y.normalizeDetails)(t),{headings:d,items:c}=r?(0,Y.normalizeDetails)(r):{headings:[],items:[]};if(!f.length&&!d.length)return a(A,null);let p=(0,Y.zipBaseAndCompareItems)(c,u),m=(0,Y.sortZippedBaseAndCompareItems)(n,p),y=(0,Y.mergeHeadings)(f,d),b=y.findIndex(v=>da(v.valueType||v.itemType||"unknown"))-1;return b<0&&(b=y.length-1),a("div",{className:"table-details"},a("table",null,a("thead",null,a("tr",null,y.map((v,x)=>{let w=v.valueType||v.itemType||"unknown";return a(A,{key:x},a("th",{className:`table-column--${w}`},v.label||v.text),b===x?a("th",null):null)}))),m.map(({base:v,compare:x,diffs:w})=>{let C=x||v;if(!C)return null;let z=`${(0,Y.getItemKey)(C.item)}-${v&&v.index}-${x&&x.index}`,D=(0,Y.getRowLabelForIndex)(n,x&&x.index,v&&v.index),{subHeadings:_,sortedSubItems:S}=(0,Y.diffAndSortSubItems)(t.id||"",v&&v.item,x&&x.item,y,{hasBaseAudit:!!r,percentAbsoluteDeltaThreshold:e.pair.percentAbsoluteDeltaThreshold}),j=S.length>0,h=S.filter(L=>L.state!=="no change"),g=D!=="no change"||h.length>0,N=o[z]!==void 0?!!o[z]:g,M=S,I=0;return!s[z]&&h.length>0&&h.length<S.length&&(M=h,I=S.length-h.length),a("tbody",{key:z,className:"table-details__row-group"},a("tr",{className:H({"table-details__parent-row--expandable":j}),onClick:L=>{if(!j)return;let G=L.target;G instanceof Element&&G.closest("a, button:not(.table-details__chevron)")||i(oe=>E(F({},oe),{[z]:!N}))}},y.map((L,G)=>{let oe=L.valueType||L.itemType||"unknown",V=w.find(Le=>Le.type==="itemDelta"&&Le.itemKey===L.key),J=L.key&&x?x.item[L.key]:void 0,le=L.key&&v?v.item[L.key]:void 0;return a(A,{key:G},a("td",{className:`table-column--${oe}`},G===0&&j?a("button",{type:"button",className:"table-details__chevron","aria-expanded":N,"aria-label":N?"Collapse subitems":"Expand subitems"},N?"\u25BE":"\u25B8"):null,J!=null||le!=null?a(Gt,{type:oe,compareValue:J,baseValue:le,diff:V}):a(A,null),G===0&&j&&!N?a("span",{className:"table-details__subitems-badge"},S.length," ",S.length===1?"subitem":"subitems"):null),b===G?a("td",{className:"table-column--row-label"},D==="added"||D==="removed"?D:""):null)})),j&&N?M.map((L,G)=>{let oe=`${z}-sub-${L.base&&L.base.index}-${L.compare&&L.compare.index}`,V=G===M.length-1&&I===0;return a("tr",{key:oe,className:"table-details__sub-row"},_.map((J,le)=>{let Le=J.valueType||"unknown",si=L.diffs.find(hr=>hr.type==="itemDelta"&&hr.itemKey===J.key),dr=J.key&&L.compare?L.compare.item[J.key]:void 0,pr=J.key&&L.base?L.base.item[J.key]:void 0;return a(A,{key:le},a("td",{className:H(`table-column--${Le}`,{"table-details__tree-guide":le===0,"table-details__tree-guide--last":le===0&&V})},dr!=null||pr!=null?a(Gt,{type:Le,compareValue:dr,baseValue:pr,diff:si}):a(A,null)),b===le?a("td",{className:"table-column--row-label"},L.state==="added"||L.state==="removed"?L.state:""):null)}))}):null,j&&N&&I>0?a("tr",{className:"table-details__sub-row table-details__sub-row--show-more"},a("td",{colSpan:y.length+1,className:"table-details__tree-guide table-details__tree-guide--last"},a("button",{type:"button",className:"table-details__show-unchanged-btn",onClick:L=>{L.stopPropagation(),l(G=>E(F({},G),{[z]:!0}))}},"+ Show ",I," unchanged"," ",I===1?"subitem":"subitems"))):null)})))};var Rn=K(re());var Sn={"first-contentful-paint":[0,1e4],"first-meaningful-paint":[0,1e4],"largest-contentful-paint":[0,15e3],"speed-index":[0,15e3],"first-cpu-idle":[0,15e3],interactive:[0,2e4],"estimated-input-latency":[0,1500],"max-potential-fid":[0,1500],"total-blocking-time":[0,1500],"experimental-interaction-to-next-paint":[0,3500],"cumulative-layout-shift":[0,1],__default__:[0,30*1e3]},Bn=(e,t)=>{let r=e&&e.id||"";return(Sn[r]||Sn.__default__)[t==="lower"?0:1]},_n=(e,t)=>{let r=t==="up"?Math.ceil:Math.floor;return e<10?r(e):e<100?r(e/10)*10:e<1e3?r(e/100)*100:e<1e4?r(e/1e3)*1e3:r(e/2500)*2500},pa=(e,t)=>{if(e&&e.id==="cumulative-layout-shift")return"none";if(t==="metrics"||t==="load-opportunities")return"ms";if(!e)return"none";if(e.numericUnit==="millisecond"||e.numericUnit==="second")return"ms";if(e.numericUnit==="byte")return"bytes";if(e.details&&e.details.overallSavingsMs)return"ms";let r=e.displayValue||"";return/[0-9,.]+\s(ms|s)$/.test(r)?"ms":/[0-9,.]+\s(KB|MB|KiB|MiB)$/.test(r)?"bytes":"none"},Ce=(e,t)=>{let{asDelta:r=!1,withSuffix:n=!1,unit:o="none"}=t,i=Math.round(e),s=0,l="";o==="ms"&&(l="ms",Math.abs(i)>=1e3&&!t.preventSecondsConversion&&(i/=1e3,s=1,l="s")),o==="bytes"&&(l="KB",i/=1024,Math.abs(i)>=500&&(i/=1024,s=1,l="MB")),o==="none"&&(Math.abs(e)<1?(i=e,s=3):Math.abs(i)<10?(i=e,s=1):Math.abs(i)>=50&&(i/=1e3,s=1,l="K"));let f=i.toLocaleString(void 0,{minimumFractionDigits:s,maximumFractionDigits:s}),u=r&&i>=0?"+":"",d=u+f+(n?l:"");return{element:a("span",null,u,f,n?a(A,null,a(Be,null),l):""),string:d,length:d.length}},st=e=>{let{diff:t,audit:r,groupId:n}=e,o=pa(r,n),i=t.compareValue,s=t.baseValue;if(typeof s!="number"||typeof i!="number")return a("span",null,"No diff available");let l=i-s,f=Math.min(i,s),u=Math.max(i,s),d=e.showAsBigPicture?Bn(r,"lower"):_n(f*.8,"down"),c=e.showAsBigPicture?Bn(r,"upper"):_n(u*1.2,"up"),p=c-d,m=Math.min(Math.max(f,d),c),y=Math.min(Math.max(u,d),c),b=100*(m-d)/p,v=100-100*(y-d)/p,x=(0,Rn.getDeltaLabel)(l,"audit"),w=f===i,C=`${Ce(s,{unit:o,withSuffix:!0}).string} to ${Ce(i,{withSuffix:!0,unit:o}).string}`;if(e.showAsNarrow)return a("div",{className:H("audit-numeric-diff",`text--${x}`),"data-tooltip":C},Ce(l,{asDelta:!0,withSuffix:!0,preventSecondsConversion:!0,unit:o}).element);let{element:z,length:D}=Ce(l,{asDelta:!0,withSuffix:!0,preventSecondsConversion:!0,unit:o}),_=D*10*100/300;return a(A,null,a("div",{className:"audit-numeric-diff"},a("div",{className:"audit-numeric-diff__left-label"},Ce(d,{unit:o}).element),a("div",{className:"audit-numeric-diff__bar"},a("div",{className:H("audit-numeric-diff__box",{"audit-numeric-diff__box--improvement":x==="improvement","audit-numeric-diff__box--regression":x==="regression"}),style:{left:`${b}%`,right:`${v}%`},"data-tooltip":C},a("div",{className:"audit-numeric-diff__now",style:{left:w?"0%":"100%"}}),a("div",{className:H("audit-numeric-diff__delta-label",{"audit-numeric-diff__delta-label--narrow-left":x==="improvement"&&b<_,"audit-numeric-diff__delta-label--narrow-right":x==="regression"&&v<_}),style:{[w?"right":"left"]:"100%"}},z))),a("div",{className:"audit-numeric-diff__right-label"},Ce(c,{unit:o}).element)))};var Mn=K(ue());var pe=K(re());var ha={"font-display":"font_download","font-display-insight":"font_download","uses-rel-preconnect":"language","network-dependency-tree-insight":"language","user-timings":"timer","bootup-time":"speed","mainthread-work-breakdown":"speed","third-party-summary":"language","third-parties-insight":"language",deprecations:"error","errors-in-console":"error","font-sizes":"format_size"},En=e=>{let t=e.audit.id||"",r=e.groupId||"",n="";return r.includes("opportunities")&&(n="web_asset"),r.includes("a11y")&&(n="code"),t.includes("image")&&(n="photo"),n=ha[t]||n||"list_alt",a("i",{className:"material-icons"},n)},ma=e=>a(A,null,a(we,{audit:e.baseAudit}),a("i",{className:`material-icons audit-group__diff-arrow audit-group__diff-arrow--${(0,pe.getDiffLabel)(e.diff)}`},"arrow_forward"),a(we,{audit:e.audit})),ga=e=>a(A,null,a("span",null,e.diff.baseValue),a("i",{className:`material-icons audit-group__diff-arrow audit-group__diff-arrow--${(0,pe.getDiffLabel)(e.diff)}`},"arrow_forward"),a("span",null,e.diff.compareValue));function ba(e){switch(e){case"added":case"worse":case"ambiguous":return"regression";case"removed":case"better":return"improvement";case"no change":return"neutral"}}function va(e){return Mn.uniqBy(e.map(t=>({base:"baseItemIndex"in t?t.baseItemIndex:void 0,compare:"compareItemIndex"in t?t.compareItemIndex:void 0})).filter(t=>typeof t.base=="number"||typeof t.compare=="number"),t=>`${t.base}-${t.compare}`)}var Vt=e=>{let{diffs:t,baseAudit:r,groupId:n}=e,o=(0,pe.normalizeDetails)(r).items,s=va(t).map(d=>(0,pe.getRowLabelForIndex)(t,d.compare,d.base)).map(ba),l=s.filter(d=>d==="regression").length,f=s.filter(d=>d==="improvement").length,u=a(A,null,a("div",{className:"audit-group__diff-badge-group"},a(En,{audit:e.audit,groupId:n}),a("div",{className:"audit-group__diff-badges"},a("span",{className:"audit-group__diff-badge"},o.length))),a("i",{className:`material-icons audit-group__diff-arrow audit-group__diff-arrow--${f>l?"improvement":"regression"}`},"arrow_forward"));return a(A,null,e.showAsNarrow?a(A,null):u,a("div",{className:H("audit-group__diff-badge-group")},a(En,{audit:e.audit,groupId:n}),a("div",{className:H("audit-group__diff-badges",{"audit-group__diff-badge-group--multiple":!!(l&&f)})},l?a("span",{className:"audit-group__diff-badge audit-group__diff-badge--regression"},l):null,f?a("span",{className:"audit-group__diff-badge audit-group__diff-badge--improvement"},f):null)))},ya=()=>a("div",{className:"audit-group__error-message","data-tooltip":"Audit did not run in the base report"},a("i",{className:"material-icons"},"error_outline")," Audit Missing"),xa=e=>{let t="An unknown error occurred while trying to compare the audit results.";return e.audit.scoreDisplayMode==="error"?t=`Audit in compare report errored: ${e.audit.errorMessage}`:e.baseAudit.scoreDisplayMode==="error"&&(t=`Audit in base report errored: ${e.baseAudit.errorMessage}`),a("div",{className:"audit-group__error-message","data-tooltip":t},a("i",{className:"material-icons"},"error_outline")," Audit Error")},In=e=>{let{audit:t,baseAudit:r,diffs:n,group:o}=e.pair,i=a("span",null,"No diff available");if(!r)return a(ya,null);if(n.find(c=>c.type==="error"))return a(xa,{audit:t,baseAudit:r});let l=n.find(c=>c.type==="numericValue");if(l&&l.type==="numericValue")return a(st,{diff:l,audit:t,groupId:o.id,showAsBigPicture:e.showAsBigPicture,showAsNarrow:e.showAsNarrow});if(n.some(c=>c.type==="itemAddition"||c.type==="itemRemoval"||c.type==="itemDelta"))return a(Vt,{diffs:n,audit:t,baseAudit:r,groupId:o.id,showAsNarrow:e.showAsNarrow});let u=n.find(c=>c.type==="score");if(u)return a(ma,{diff:u,audit:t,baseAudit:r});let d=n.find(c=>c.type==="displayValue");return!d||d.type!=="displayValue"?i:a(ga,{diff:d,audit:t,baseAudit:r})};var Re=K(re());var wa=e=>{let{audit:t,baseAudit:r}=e.pair;return r?a("div",{className:"audit-detail-pane__audit-details--binary"},a(we,{audit:r}),a("i",{className:`material-icons audit-group__diff-arrow audit-group__diff-arrow--${(0,Re.getDiffLabel)(e.diff)}`},"arrow_forward"),a(we,{audit:t})):null},Ca=e=>{let t=e.pair.audit.scoreDisplayMode==="error"?e.pair.audit:e.pair.baseAudit;return t?a(A,null,a("div",{className:"audit-detail-pane__audit-details-summary"},"Error occurred in the"," ",t===e.pair.baseAudit?"base report:":"compare report:"),a("pre",null,t.errorMessage||"Unknown error")):null},Pa=e=>{let{pair:t}=e,r=t.audit.details||{type:"unknown"},{items:n}=(0,Re.normalizeDetails)(t.audit),{items:o}=t.baseAudit?(0,Re.normalizeDetails)(t.baseAudit):{items:[]},i=!!(n.length||o.length),s,l,f;if(t.audit.errorMessage||t.baseAudit&&t.baseAudit.errorMessage)return a(Ca,{pair:t});(r.type==="table"||r.type==="opportunity"||r.type==="list"||r.type==="checklist")&&i&&(l=a(On,{pair:t}),t.baseAudit&&(s=a(Vt,E(F({},t),{baseAudit:t.baseAudit,groupId:t.group.id}))));let u=t.diffs.find(c=>c.type==="numericValue");if(u&&u.type==="numericValue"&&(f=a(st,{diff:u,audit:t.audit})),l||u)return a(A,null,a("div",{className:"audit-detail-pane__audit-details-summary"},f||s),l);let d=t.diffs.find(c=>c.type==="score");return d&&d.type==="score"?a(wa,{diff:d,pair:e.pair}):a("pre",null,JSON.stringify(e.pair,null,2))},jn=e=>{let{audit:t}=e.pair;return a("div",{id:`audit-detail-pane-audit--${t.id}`,className:H("audit-detail-pane__audit")},a("div",{className:"audit-detail-pane__score"},a(ne,{score:t.score||0})),a("div",{className:"audit-detail-pane__audit-title"},t.title),a("div",{className:"audit-detail-pane__audit-description"},a(Fn,{text:t.description||""})),a("div",{className:"audit-detail-pane__audit-details"},a(Pa,{pair:e.pair})))};var Un=e=>{let t=ee(void 0),r=Nn(e.selectedAuditId);return Z(()=>{let n=e.selectedAuditId,o=t.current;if(!o||!n||n===r)return;let i=o.querySelector(`#audit-detail-pane-audit--${n}`);!i||!(i instanceof HTMLElement)||o.scrollTo(0,i.offsetTop)},[e.selectedAuditId,r]),a("div",{className:"audit-detail-pane",ref:n=>t.current=n},a("div",{className:"audit-detail-pane__close",onClick:()=>e.setSelectedAuditId(null)},a("i",{className:"material-icons"},"close")),e.pairs.map(n=>{let{audit:o}=n;if(o.id)return a(jn,{key:o.id,pair:n})}))};var Xn=K(re());var kn=e=>{let t=Math.round(e.score*100),r=e.diff?e.diff.baseValue:e.score,n=Math.round(r*100),o=e.diff?(0,Xn.getDiffLabel)(e.diff):"neutral",s=`${Math.max(0,e.score*352-2)} 352`,l=Math.abs(n-t),f=Math.max(0,l/100*352-2),u=`${f} 352`,d=`rotate(${Math.min(t,n)/100*360}deg)`,c=`rotate(${e.score*360}deg)`;return a("div",{className:H("gauge",`gauge--${o}`)},a("div",{className:"gauge-arc"},a("svg",{viewBox:"0 0 120 120"},a("circle",{className:"gauge-arc__arc",transform:"rotate(-90 60 60)",r:"56",cx:"60",cy:"60",style:{strokeDasharray:s}})),a("div",{className:"gauge-arc__delta-wrapper",style:{transform:d,display:f<1?"none":"block"}},a("svg",{viewBox:"0 0 120 120"},a("circle",{className:"gauge-arc__arc",transform:"rotate(-90 60 60)",r:"56",cx:"60",cy:"60",style:{strokeDasharray:u}}))),a("div",{className:"gauge-arc__indicator-wrapper",style:{transform:c}},a("div",{className:"gauge-arc__indicator"}))),a("span",null,t))};var Zn=K(ue());var Gn=e=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:`pwa-icon pwa-icon--${e.deltaType}`},a("g",{"fill-rule":"nonzero",fill:"none"},a("circle",{class:"pwa-icon__background",cx:"12",cy:"12",r:"12"}),a("path",{d:"M12 4.3l6.3 2.8v4.2c0 3.88-2.69 7.52-6.3 8.4-3.61-.88-6.3-4.51-6.3-8.4V7.1L12 4.3zm-.56 12.88l3.3-5.79.04-.08c.05-.1.01-.29-.26-.29h-1.96l.56-3.92h-.56L9.3 12.82c0 .03.07-.12-.03.07-.11.2-.12.37.2.37h1.97l-.56 3.92h.56z",fill:"#FFF"}))),Vn=e=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:`pwa-icon pwa-icon--${e.deltaType}`},a("g",{"fill-rule":"nonzero",fill:"none"},a("circle",{class:"pwa-icon__background",cx:"12",cy:"12",r:"12"}),a("path",{d:"M12 5a7 7 0 1 0 0 14 7 7 0 0 0 0-14zm3.5 7.7h-2.8v2.8h-1.4v-2.8H8.5v-1.4h2.8V8.5h1.4v2.8h2.8v1.4z",fill:"#FFF"}))),Wn=e=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:`pwa-icon pwa-icon--${e.deltaType}`},a("g",{fill:"none","fill-rule":"evenodd"},a("rect",{class:"pwa-icon__background",width:"24",height:"24",rx:"12"}),a("path",{d:"M5 5h14v14H5z"}),a("path",{fill:"#FFF",d:"M12 15.07l3.6 2.18-.95-4.1 3.18-2.76-4.2-.36L12 6.17l-1.64 3.86-4.2.36 3.2 2.76-.96 4.1z"})));function lt(e,t,r){return e[r]===t[r]?"neutral":t[r]?"improvement":"regression"}function Wt(e){let t=e.categories.pwa,r=Zn.groupIntoMap(t.auditRefs,o=>o.group),n=(o=[])=>o.map(i=>e.audits[i.id]).every(i=>i&&i.score===1);return{optimized:n(r.get("pwa-optimized")||[]),installable:n(r.get("pwa-installable")||[]),fastAndReliable:n(r.get("pwa-fast-reliable")||[])}}var Yn=e=>{let{status:t}=e,r=t.optimized&&t.installable&&t.fastAndReliable;return a("div",{className:H("pwa-gauge",{"pwa-gauge--all":r,"pwa-gauge--pwa-optimized":!r&&t.optimized,"pwa-gauge--pwa-installable":!r&&t.installable,"pwa-gauge--pwa-fast-reliable":!r&&t.fastAndReliable})},a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 60"},a("defs",null,a("linearGradient",{id:"pwa-gauge__check-circle__gradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%"},a("stop",{"stop-color":"#00C852",offset:"0%"}),a("stop",{"stop-color":"#009688",offset:"100%"})),a("linearGradient",{id:"pwa-gauge__installable__shadow-gradient",x1:"76.056%",x2:"24.111%",y1:"82.995%",y2:"24.735%"},a("stop",{"stop-color":"#A5D6A7",offset:"0%"}),a("stop",{"stop-color":"#80CBC4",offset:"100%"})),a("linearGradient",{id:"pwa-gauge__fast-reliable__shadow-gradient",x1:"76.056%",y1:"82.995%",x2:"25.678%",y2:"26.493%"},a("stop",{"stop-color":"#64B5F6",offset:"0%"}),a("stop",{"stop-color":"#2979FF",offset:"100%"})),a("g",{id:"pwa-gauge__fast-reliable-badge"},a("circle",{fill:"#FFFFFF",cx:"10",cy:"10",r:"10"}),a("path",{fill:"#304FFE",d:"M10 3.58l5.25 2.34v3.5c0 3.23-2.24 6.26-5.25 7-3.01-.74-5.25-3.77-5.25-7v-3.5L10 3.58zm-.47 10.74l2.76-4.83.03-.07c.04-.08 0-.24-.22-.24h-1.64l.47-3.26h-.47l-2.7 4.77c-.02.01.05-.1-.04.05-.09.16-.1.31.18.31h1.63l-.47 3.27h.47z"})),a("g",{id:"pwa-gauge__installable-badge"},a("circle",{fill:"#FFFFFF",cx:"10",cy:"10",r:"10"}),a("path",{fill:"#009688",d:"M10 4.167A5.835 5.835 0 0 0 4.167 10 5.835 5.835 0 0 0 10 15.833 5.835 5.835 0 0 0 15.833 10 5.835 5.835 0 0 0 10 4.167zm2.917 6.416h-2.334v2.334H9.417v-2.334H7.083V9.417h2.334V7.083h1.166v2.334h2.334v1.166z"}))),a("g",{stroke:"none","fill-rule":"nonzero"},a("circle",{class:"pwa-gauge__disc",cx:"30",cy:"30",r:"30"}),a("g",{class:"pwa-gauge__logo"},a("path",{class:"pwa-gauge__logo--secondary-color",d:"M35.66 19.39l.7-1.75h2L37.4 15 38.6 12l3.4 9h-2.51l-.58-1.61z"}),a("path",{class:"pwa-gauge__logo--primary-color",d:"M33.52 21l3.65-9h-2.42l-2.5 5.82L30.5 12h-1.86l-1.9 5.82-1.35-2.65-1.21 3.72L25.4 21h2.38l1.72-5.2 1.64 5.2z"}),a("path",{class:"pwa-gauge__logo--secondary-color","fill-rule":"nonzero",d:"M20.3 17.91h1.48c.45 0 .85-.05 1.2-.15l.39-1.18 1.07-3.3a2.64 2.64 0 0 0-.28-.37c-.55-.6-1.36-.91-2.42-.91H18v9h2.3V17.9zm1.96-3.84c.22.22.33.5.33.87 0 .36-.1.65-.29.87-.2.23-.59.35-1.15.35h-.86v-2.41h.87c.52 0 .89.1 1.1.32z"})),a("rect",{class:"pwa-gauge__component pwa-gauge__na-line",fill:"#FFFFFF",x:"20",y:"32",width:"20",height:"4",rx:"2"}),a("g",{class:"pwa-gauge__component pwa-gauge__fast-reliable-badge",transform:"translate(20, 29)"},a("path",{fill:"url(#pwa-gauge__fast-reliable__shadow-gradient)",d:"M33.63 19.49A30 30 0 0 1 16.2 30.36L3 17.14 17.14 3l16.49 16.49z"}),a("use",{href:"#pwa-gauge__fast-reliable-badge"})),a("g",{class:"pwa-gauge__component pwa-gauge__installable-badge",transform:"translate(20, 29)"},a("path",{fill:"url(#pwa-gauge__installable__shadow-gradient)",d:"M33.629 19.487c-4.272 5.453-10.391 9.39-17.415 10.869L3 17.142 17.142 3 33.63 19.487z"}),a("use",{href:"#pwa-gauge__installable-badge"})),a("g",{class:"pwa-gauge__component pwa-gauge__fast-reliable-installable-badges"},a("g",{transform:"translate(8, 29)"},a("path",{fill:"url(#pwa-gauge__fast-reliable__shadow-gradient)",d:"M16.321 30.463L3 17.143 17.142 3l22.365 22.365A29.864 29.864 0 0 1 22 31c-1.942 0-3.84-.184-5.679-.537z"}),a("use",{href:"#pwa-gauge__fast-reliable-badge"})),a("g",{transform:"translate(32, 29)"},a("path",{fill:"url(#pwa-gauge__installable__shadow-gradient)",d:"M25.982 11.84a30.107 30.107 0 0 1-13.08 15.203L3 17.143 17.142 3l8.84 8.84z"}),a("use",{href:"#pwa-gauge__installable-badge"}))),a("g",{class:"pwa-gauge__component pwa-gauge__check-circle",transform:"translate(18, 28)"},a("circle",{fill:"#FFFFFF",cx:"12",cy:"12",r:"12"}),a("path",{fill:"url(#pwa-gauge__check-circle__gradient)",d:"M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})))))};var Jn=K(re());var qn=e=>{let t=Math.round((e.diff.compareValue-e.diff.baseValue)*100);return a("div",{className:H("score-delta-badge",`score-delta-badge--${(0,Jn.getDiffLabel)(e.diff)}`,e.className)},t<0?t:`+${t}`)};var La=e=>{let{lhr:t,baseLhr:r,categoryId:n}=e,o=t.categories[n],i=r&&r.categories[n],s=i&&{auditId:"",type:"score",baseValue:i.score,compareValue:o.score};return a("div",{key:n,className:H("lhr-comparison-scores-item")},a(kn,{score:o.score,diff:s}),a("div",{className:"lhr-comparison-scores-item__label"},o.title),s?a(qn,{diff:s,className:"lhr-comparison-scores-item__delta"}):null)},Aa=e=>{let{lhr:t,baseLhr:r,categoryId:n}=e,o=Wt(t),i,s="neutral";if(r){let l=Wt(r),f={fastAndReliable:lt(l,o,"fastAndReliable"),installable:lt(l,o,"installable"),optimized:lt(l,o,"optimized")},u=Object.values(f).every(c=>c==="neutral"),d=a(A,null,f.fastAndReliable==="neutral"?a(A,null):a(Gn,{deltaType:f.fastAndReliable}),f.installable==="neutral"?a(A,null):a(Vn,{deltaType:f.installable}),f.optimized==="neutral"?a(A,null):a(Wn,{deltaType:f.optimized}));i=a("div",{className:H("lhr-comparison-scores-item__delta")},u?"-":d)}return a("div",{key:n,className:H("lhr-comparison-scores-item","lhr-comparison-scores-item--pwa",`lhr-comparison-scores-item--${s}`)},a(Yn,{status:o}),a("div",{className:"lhr-comparison-scores-item__label"},"PWA"),i)},Kn=e=>{let{lhr:t,baseLhr:r}=e;if(!t)return null;let n=Object.keys(t.categories),o=r?Object.keys(r.categories):n,i=n.filter(s=>o.includes(s));return a("div",{className:"lhr-comparison-scores"},i.sort((s,l)=>{let f=s==="pwa"?1/0:i.indexOf(s),u=l==="pwa"?1/0:i.indexOf(l);return f-u}).map(s=>s==="pwa"?a(Aa,{lhr:t,baseLhr:r,categoryId:s}):a(La,{lhr:t,baseLhr:r,categoryId:s})))};var Ta=e=>a("div",{className:"audit-group__big-picture-tabs"},a("span",{className:H("big-picture-tabs__tab",{"big-picture-tabs__tab--selected":e.showAsBigPicture}),onClick:()=>e.setShowAsBigPicture(!0)},"Overview"),a("span",{className:H("big-picture-tabs__tab",{"big-picture-tabs__tab--selected":!e.showAsBigPicture}),onClick:()=>e.setShowAsBigPicture(!1)},"Magnified")),Na=e=>a(A,null,e.pairs.map(t=>{let{audit:r}=t;return e.group.id!=="metrics"&&(t=E(F({},t),{diffs:t.diffs.filter(n=>n.type!=="numericValue")})),a("div",{key:r.id,className:H("audit-group__audit"),onClick:()=>e.setSelectedAuditId(r.id||null)},a("div",{className:"audit-group__audit-score"},a(ne,{score:r.score||0})),a("div",{className:"audit-group__audit-title"},r.title),a("div",{className:"audit-group__audit-diff"},a(In,{pair:t,showAsBigPicture:e.showAsBigPicture,showAsNarrow:e.showAsNarrow})))})),Ha=e=>{let t=e.baseLhr;return!t||!e.expanded?a(A,null):a(A,null,e.pairs.map(r=>{let{audit:n}=r;return a("div",{key:n.id,className:H("audit-group__audit","audit-group__audit--unchanged"),onClick:o=>{o.preventDefault(),o.stopPropagation(),$e(t)}},a("div",{className:"audit-group__audit-score"},a(ne,{score:n.score||0})),a("div",{className:"audit-group__audit-title"},n.title),a("div",{className:"audit-group__audit-diff"},"Open Report"))}))},Qn=e=>{let{group:t}=e,[r,n]=X(t.id==="metrics"),[o,i]=X(!1);return a(ae,{className:H("audit-group",{"audit-group--expanded":o,"audit-group--unchanged":e.showAsUnchanged})},a("div",{className:"audit-group__header",onClick:()=>i(!o)},a("div",{className:"audit-group__title"},t.title," ",e.showAsUnchanged?`(${e.pairs.length})`:""),a("div",{className:"audit-group__expand-toggle"},a("i",{className:"material-icons"},"chevron_right")),t.id==="metrics"&&!e.showAsNarrow?a(Ta,E(F({},e),{showAsBigPicture:r,setShowAsBigPicture:n})):a(A,null)),a("div",{className:"audit-group__audits"},e.showAsUnchanged?a(Ha,E(F({},e),{expanded:o})):a(Na,E(F({},e),{showAsBigPicture:r}))))};var $n=()=>a("div",{className:"lhr-comparison-legend"},a(ne,{score:0}),a("span",{className:"lhr-comparison-legend__label"},"0-49"),a(ne,{score:.5}),a("span",{className:"lhr-comparison-legend__label"},"50-89"),a(ne,{score:1}),a("span",{className:"lhr-comparison-legend__label"},"90-100"),a("i",{className:"lhr-comparison-legend__chip lhr-comparison-legend__chip--regression"}),a("span",{className:"lhr-comparison-legend__label"},"Regression"),a("i",{className:"lhr-comparison-legend__chip lhr-comparison-legend__chip--improvement"}),a("span",{className:"lhr-comparison-legend__label"},"Improvement"));function Fa(e,t){for(var r in t)e[r]=t[r];return e}function eo(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function to(e){this.props=e}(to.prototype=new $).isPureReactComponent=!0,to.prototype.shouldComponentUpdate=function(e,t){return eo(this.props,e)||eo(this.state,t)};var ro=P.__b;P.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ro&&ro(e)};var fu=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var Oa=P.__e;P.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}Oa(e,t,r,n)};var no=P.unmount;function co(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Fa({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return co(n,t,r)})),e}function fo(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return fo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Yt(){this.__u=0,this.t=null,this.__b=null}function uo(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ct(){this.u=null,this.o=null}P.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),no&&no(e)},(Yt.prototype=new $).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=uo(n.__v),i=!1,s=function(){i||(i=!0,r.__R=null,o?o(l):l())};r.__R=s;var l=function(){if(!--n.__u){if(n.state.__a){var f=n.state.__a;n.__v.__k[0]=fo(f,f.__c.__P,f.__c.__O)}var u;for(n.setState({__a:n.__b=null});u=n.t.pop();)u.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},Yt.prototype.componentWillUnmount=function(){this.t=[]},Yt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=co(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&a(A,null,e.fallback);return o&&(o.__u&=-33),[a(A,null,t.__a?null:e.children),o]};var oo=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Sa(e){return this.getChildContext=function(){return e.context},e.children}function Ba(e){var t=this,r=e.i;t.componentWillUnmount=function(){Ne(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),Ne(a(Sa,{context:t.context},e.__v),t.l)}function po(e,t){var r=a(Ba,{__v:e,i:t});return r.containerInfo=t,r}(ct.prototype=new $).__a=function(e){var t=this,r=uo(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),oo(t,e,n)):o()};r?r(i):i()}},ct.prototype.render=function(e){this.u=null,this.o=new Map;var t=Te(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},ct.prototype.componentDidUpdate=ct.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){oo(e,r,t)})};var _a=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,Ra=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ea=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ma=/[A-Z0-9]/g,Ia=typeof document!="undefined",ja=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};$.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty($.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var io=P.event;function Ua(){}function Xa(){return this.cancelBubble}function ka(){return this.defaultPrevented}P.event=function(e){return io&&(e=io(e)),e.persist=Ua,e.isPropagationStopped=Xa,e.isDefaultPrevented=ka,e.nativeEvent=e};var ho,Za={enumerable:!1,configurable:!0,get:function(){return this.class}},ao=P.vnode;P.vnode=function(e){typeof e.type=="string"&&(function(t){var r=t.props,n=t.type,o={};for(var i in r){var s=r[i];if(!(i==="value"&&"defaultValue"in r&&s==null||Ia&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var l=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&s===!0?s="":l==="ondoubleclick"?i="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||ja(r.type)?l==="onfocus"?i="onfocusin":l==="onblur"?i="onfocusout":Ea.test(i)?i=l:n.indexOf("-")===-1&&Ra.test(i)?i=i.replace(Ma,"-$&").toLowerCase():s===null&&(s=void 0):l=i="oninput",l==="oninput"&&o[i=l]&&(i="oninputCapture"),o[i]=s}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Te(r.children).forEach(function(f){f.props.selected=o.value.indexOf(f.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Te(r.children).forEach(function(f){f.props.selected=o.multiple?o.defaultValue.indexOf(f.props.value)!=-1:o.defaultValue==f.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",Za)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o})(e),e.$$typeof=_a,ao&&ao(e)};var so=P.__r;P.__r=function(e){so&&so(e),ho=e.__c};var lo=P.diffed;P.diffed=function(e){lo&&lo(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),ho=null};var mo=e=>{let t=ee(document.getElementById("preact-modal-root")||document.createElement("div"));return Z(()=>(t.current.id="preact-modal-root",document.body.appendChild(t.current),()=>document.body.removeChild(t.current)),[]),po(a("div",{className:"modal-backdrop"},a("div",{className:H("modal",e.className),style:{position:"relative"}},e.children,a("div",{className:"modal__close",onClick:e.onClose},a("i",{className:"material-icons"},"close")))),t.current)};function go(e){return typeof e=="string"?e:typeof e=="number"?e.toString():typeof e=="undefined"?"Unset":typeof e=="boolean"?e?"Enabled":"Disabled":Array.isArray(e)?e.join(", "):"Unknown"}function bo(e,t){if(!t)return[];let r=[],{benchmarkIndex:n}=e.environment,{benchmarkIndex:o}=t.environment,i=Math.abs(n-o)/Math.min(n,o);i>1.5&&r.push({label:"CPU/Memory Power",base:t.environment.benchmarkIndex.toString(),compare:e.environment.benchmarkIndex.toString(),severity:i>2?"error":"warn"});let s=e.configSettings,l=t.configSettings,f=s.throttling||{},u=s.throttling||{},d=[["Lighthouse Version",t.lighthouseVersion,e.lighthouseVersion],["Storage Reset",l.disableStorageReset,s.disableStorageReset],["Emulated Form Factor",l.emulatedFormFactor,s.emulatedFormFactor],["Throttling Method",l.throttlingMethod,s.throttlingMethod],["CPU Throttling",u.cpuSlowdownMultiplier,f.cpuSlowdownMultiplier],["Network RTT",u.rttMs,f.rttMs],["Network Throughput",u.throughputKbps,f.throughputKbps],["Network RTT",u.requestLatencyMs,f.requestLatencyMs],["Network Throughput (Up)",u.uploadThroughputKbps,f.uploadThroughputKbps],["Network Throughput (Down)",u.downloadThroughputKbps,f.downloadThroughputKbps]];for(let[c,p,m]of d){let y=go(p),b=go(m);y!==b&&r.push({label:c,base:y,compare:b,severity:"error"})}return r}var Jt=e=>{let{diffs:t}=e;return a("div",{className:H("lhr-comparison-runtime-diff",`lhr-comparison-runtime-diff--${e.variant}`)},a("div",{className:"lhr-comparison__warning"},a("i",{className:"material-icons"},"info"),a("div",null,"Changes of runtime settings or the environment can substantially affect your Lighthouse scores and might be the reason for the differences here.")),a("div",{className:"lhr-comparison-runtime-diff__diffs"},"The following runtime differences were detected:",a("table",null,a("thead",null,a("tr",null,a("th",null),a("th",null,"Base"),a("th",null,"Compare"))),a("tbody",null,t.map(r=>a("tr",{key:r.label},a("td",null,r.label),a("td",null,r.base),a("td",null,r.compare)))))))};function Ga(e){let t=n=>new Promise(o=>setTimeout(o,n)),r=n=>T(null,null,function*(){let o=0;for(;!document.querySelector(n)&&o<10;)yield t(500),o++});Z(()=>{window.location.hash.length<=1||Promise.resolve().then(()=>T(null,null,function*(){yield r(".lhr-comparison__audit-groups"),e(window.location.hash.slice(1))}))},[])}function Va(e,t,r){let n=[];for(let[o,i]of Object.entries(e.categories)){let s={title:i.title,description:i.description},l=vo.default.groupBy(i.auditRefs,d=>d.group),f=`unchanged:${o}`,u={id:f,group:{id:f,title:`Unchanged Audits - ${i.title}`},pairs:[],showAsUnchanged:!0};for(let d of l){let c=d[0].group||"",p=e.categoryGroups&&e.categoryGroups[c];if(!p){if(l.length!==1)continue;c=`category:${o}`,p=s}let m=E(F({},p),{id:c}),y=d.map(x=>{let w=E(F({},e.audits[x.id]),{id:x.id}),C=t&&t.audits[w.id||""],z=C?(0,ft.findAuditDiffs)(C,w,E(F({},r),{synthesizeItemKeyDiffs:!0})):[],D=Math.max(...z.map(ft.getDiffSeverity),0);return F({audit:w,baseAudit:C,diffs:z,maxSeverity:D,group:m},r&&r.percentAbsoluteDeltaThreshold!==void 0?{percentAbsoluteDeltaThreshold:r.percentAbsoluteDeltaThreshold}:{})}).sort((x,w)=>(x.audit.score||0)-(w.audit.score||0)),b=y.filter(x=>!x.baseAudit||x.diffs.length),v=y.filter(x=>x.baseAudit&&!x.diffs.length);b.length&&n.push({id:c,group:m,pairs:b,showAsUnchanged:!1}),v.length&&u.pairs.push(...v)}u.pairs.length&&n.push(u)}return n}var Wa=e=>a("div",{className:"lhr-comparison__scores-and-dropdowns"},a("div",{className:"container"},a("div",{className:"lhr-comparison__dropdowns"},e.hookElements.dropdowns,a(at,{label:"Threshold",value:e.percentAbsoluteDeltaThreshold.toString(),setValue:t=>{e.setPercentAbsoluteDeltaThreshold(Number(t))},options:[{value:"0",label:"0%"},{value:"0.05",label:"5%"},{value:"0.1",label:"10%"},{value:"0.15",label:"15%"},{value:"0.25",label:"25%"}]})),e.selectedAuditId?a(A,null):a(Kn,F({},e)))),Ya=e=>a("div",{className:"lhr-comparison__audit-groups"},e.auditGroups.map(t=>{if(t)return a(Qn,{key:t.id,showAsNarrow:e.showAsNarrow,showAsUnchanged:t.showAsUnchanged,pairs:t.pairs,group:t.group,baseLhr:e.baseLhr,selectedAuditId:e.selectedAuditId,setSelectedAuditId:e.setSelectedAuditId})})),yo=e=>{let{lhr:t,baseLhr:r}=e,n="none",[o,i]=X(.05),[s,l]=X(null),[f,u]=X(n);Ga(l),Z(()=>{window.__LHR__=t,window.__BASE_LHR__=r},[t,r]);let d=bo(t,r),c=d.some(m=>m.severity==="error"),p=Va(t,r,{percentAbsoluteDeltaThreshold:o});return a(A,null,f==="none"&&c?a(mo,{onClose:()=>u("acknowledged")},a(Jt,{diffs:d,variant:"full"})):null,s?a(Un,{selectedAuditId:s,setSelectedAuditId:l,pairs:p.filter(m=>!m.showAsUnchanged).map(m=>m.pairs).reduce((m,y)=>m.concat(y)),baseLhr:r}):a(A,null),a("div",{className:H("lhr-comparison",e.className,{"lhr-comparison--with-audit-selection":!!s})},a(Wa,{lhr:t,baseLhr:r,selectedAuditId:s,hookElements:e.hookElements,percentAbsoluteDeltaThreshold:o,setPercentAbsoluteDeltaThreshold:i}),a("div",{className:"container"},e.hookElements.warnings,f!=="closed"&&d.length?a(ae,{className:"position-relative"},a(Jt,{diffs:d,variant:"mini"}),a("div",{className:"lhr-comparison-runtime-diff__close",onClick:()=>u("closed")},a("i",{className:"material-icons"},"close"))):null,p.length&&r?a(A,null,s?null:a("div",{className:"lhr-comparison__legend-container"},a($n,null)),a(Ya,{showAsNarrow:!!s,auditGroups:p,baseLhr:r,selectedAuditId:s,setSelectedAuditId:l})):e.hookElements.warnings?null:a(ae,{className:"lhr-comparison__warning"},a("i",{className:"material-icons"},"sentiment_satisfied_alt"),a("div",null,"Woah, no differences found! Switch base builds to explore other differences, or"," ",a(et,{className:"lhr-comparison__warning__lhr-link",lhr:e.lhr},"jump straight to the Lighthouse report."))))))};var qt=function(e,t){return qt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},qt(e,t)};function Ee(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");qt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var B=function(){return B=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},B.apply(this,arguments)};function xo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function ut(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var O;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(O||(O={}));var U;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(U||(U={}));var he;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(he||(he={}));function Kt(e){return e.type===U.literal}function wo(e){return e.type===U.argument}function dt(e){return e.type===U.number}function pt(e){return e.type===U.date}function ht(e){return e.type===U.time}function mt(e){return e.type===U.select}function gt(e){return e.type===U.plural}function Co(e){return e.type===U.pound}function bt(e){return e.type===U.tag}function vt(e){return!!(e&&typeof e=="object"&&e.type===he.number)}function Me(e){return!!(e&&typeof e=="object"&&e.type===he.dateTime)}var Qt=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;var Ja=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Po(e){var t={};return e.replace(Ja,function(r){var n=r.length;switch(r[0]){case"G":t.era=n===4?"long":n===5?"narrow":"short";break;case"y":t.year=n===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=n===4?"long":n===5?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var Lo=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Ho(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(Lo).filter(function(p){return p.length>0}),r=[],n=0,o=t;n<o.length;n++){var i=o[n],s=i.split("/");if(s.length===0)throw new Error("Invalid number skeleton");for(var l=s[0],f=s.slice(1),u=0,d=f;u<d.length;u++){var c=d[u];if(c.length===0)throw new Error("Invalid number skeleton")}r.push({stem:l,options:f})}return r}function qa(e){return e.replace(/^(.*?)-/,"")}var Ao=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,zo=/^(@+)?(\+|#+)?[rs]?$/g,Ka=/(\*)(0+)|(#+)(0+)|(0+)/g,Do=/^(0+)$/;function To(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(zo,function(r,n,o){return typeof o!="string"?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):o==="+"?t.minimumSignificantDigits=n.length:n[0]==="#"?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof o=="string"?o.length:0)),""}),t}function Fo(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Qa(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!Do.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function No(e){var t={},r=Fo(e);return r||t}function Oo(e){for(var t={},r=0,n=e;r<n.length;r++){var o=n[r];switch(o.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=o.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=qa(o.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=B(B(B({},t),{notation:"scientific"}),o.options.reduce(function(f,u){return B(B({},f),No(u))},{}));continue;case"engineering":t=B(B(B({},t),{notation:"engineering"}),o.options.reduce(function(f,u){return B(B({},f),No(u))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(o.options[0]);continue;case"integer-width":if(o.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");o.options[0].replace(Ka,function(f,u,d,c,p,m){if(u)t.minimumIntegerDigits=d.length;else{if(c&&p)throw new Error("We currently do not support maximum integer digits");if(m)throw new Error("We currently do not support exact integer digits")}return""});continue}if(Do.test(o.stem)){t.minimumIntegerDigits=o.stem.length;continue}if(Ao.test(o.stem)){if(o.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");o.stem.replace(Ao,function(f,u,d,c,p,m){return d==="*"?t.minimumFractionDigits=u.length:c&&c[0]==="#"?t.maximumFractionDigits=c.length:p&&m?(t.minimumFractionDigits=p.length,t.maximumFractionDigits=p.length+m.length):(t.minimumFractionDigits=u.length,t.maximumFractionDigits=u.length),""});var i=o.options[0];i==="w"?t=B(B({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=B(B({},t),To(i)));continue}if(zo.test(o.stem)){t=B(B({},t),To(o.stem));continue}var s=Fo(o.stem);s&&(t=B(B({},t),s));var l=Qa(o.stem);l&&(t=B(B({},t),l))}return t}var Ie={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function So(e,t){for(var r="",n=0;n<e.length;n++){var o=e.charAt(n);if(o==="j"){for(var i=0;n+1<e.length&&e.charAt(n+1)===o;)i++,n++;var s=1+(i&1),l=i<2?1:3+(i>>1),f="a",u=$a(t);for((u=="H"||u=="k")&&(l=0);l-- >0;)r+=f;for(;s-- >0;)r=u+r}else o==="J"?r+="H":r+=o}return r}function $a(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,n;r!=="root"&&(n=e.maximize().region);var o=Ie[n||""]||Ie[r||""]||Ie["".concat(r,"-001")]||Ie["001"];return o[0]}var $t,es=new RegExp("^".concat(Qt.source,"*")),ts=new RegExp("".concat(Qt.source,"*$"));function R(e,t){return{start:e,end:t}}var rs=!!String.prototype.startsWith&&"_a".startsWith("a",1),ns=!!String.fromCodePoint,os=!!Object.fromEntries,is=!!String.prototype.codePointAt,as=!!String.prototype.trimStart,ss=!!String.prototype.trimEnd,ls=!!Number.isSafeInteger,cs=ls?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},tr=!0;try{Bo=Mo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),tr=(($t=Bo.exec("a"))===null||$t===void 0?void 0:$t[0])==="a"}catch(e){tr=!1}var Bo,_o=rs?function(t,r,n){return t.startsWith(r,n)}:function(t,r,n){return t.slice(n,n+r.length)===r},rr=ns?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n="",o=t.length,i=0,s;o>i;){if(s=t[i++],s>1114111)throw RangeError(s+" is not a valid code point");n+=s<65536?String.fromCharCode(s):String.fromCharCode(((s-=65536)>>10)+55296,s%1024+56320)}return n},Ro=os?Object.fromEntries:function(t){for(var r={},n=0,o=t;n<o.length;n++){var i=o[n],s=i[0],l=i[1];r[s]=l}return r},Eo=is?function(t,r){return t.codePointAt(r)}:function(t,r){var n=t.length;if(!(r<0||r>=n)){var o=t.charCodeAt(r),i;return o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?o:(o-55296<<10)+(i-56320)+65536}},fs=as?function(t){return t.trimStart()}:function(t){return t.replace(es,"")},us=ss?function(t){return t.trimEnd()}:function(t){return t.replace(ts,"")};function Mo(e,t){return new RegExp(e,t)}var nr;tr?(er=Mo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu"),nr=function(t,r){var n;er.lastIndex=r;var o=er.exec(t);return(n=o[1])!==null&&n!==void 0?n:""}):nr=function(t,r){for(var n=[];;){var o=Eo(t,r);if(o===void 0||jo(o)||hs(o))break;n.push(o),r+=o>=65536?2:1}return rr.apply(void 0,n)};var er,Io=(function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,n){for(var o=[];!this.isEOF();){var i=this.char();if(i===123){var s=this.parseArgument(t,n);if(s.err)return s;o.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var l=this.clonePosition();this.bump(),o.push({type:U.pound,location:R(l,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(O.UNMATCHED_CLOSING_TAG,R(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&or(this.peek()||0)){var s=this.parseTag(t,r);if(s.err)return s;o.push(s.val)}else{var s=this.parseLiteral(t,r);if(s.err)return s;o.push(s.val)}}}return{val:o,err:null}},e.prototype.parseTag=function(t,r){var n=this.clonePosition();this.bump();var o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:U.literal,value:"<".concat(o,"/>"),location:R(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var s=i.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!or(this.char()))return this.error(O.INVALID_TAG,R(l,this.clonePosition()));var f=this.clonePosition(),u=this.parseTagName();return o!==u?this.error(O.UNMATCHED_CLOSING_TAG,R(f,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:U.tag,value:o,children:s,location:R(n,this.clonePosition())},err:null}:this.error(O.INVALID_TAG,R(l,this.clonePosition())))}else return this.error(O.UNCLOSED_TAG,R(n,this.clonePosition()))}else return this.error(O.INVALID_TAG,R(n,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&ps(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var n=this.clonePosition(),o="";;){var i=this.tryParseQuote(r);if(i){o+=i;continue}var s=this.tryParseUnquoted(t,r);if(s){o+=s;continue}var l=this.tryParseLeftAngleBracket();if(l){o+=l;continue}break}var f=R(n,this.clonePosition());return{val:{type:U.literal,value:o,location:f},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!ds(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(n);this.bump()}return rr.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(r==="plural"||r==="selectordinal")||n===125&&t>0?null:(this.bump(),rr(n))},e.prototype.parseArgument=function(t,r){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(O.EXPECT_ARGUMENT_CLOSING_BRACE,R(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(O.EMPTY_ARGUMENT,R(n,this.clonePosition()));var o=this.parseIdentifierIfPossible().value;if(!o)return this.error(O.MALFORMED_ARGUMENT,R(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(O.EXPECT_ARGUMENT_CLOSING_BRACE,R(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:U.argument,value:o,location:R(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(O.EXPECT_ARGUMENT_CLOSING_BRACE,R(n,this.clonePosition())):this.parseArgumentOptions(t,r,o,n);default:return this.error(O.MALFORMED_ARGUMENT,R(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),n=nr(this.message,r),o=r+n.length;this.bumpTo(o);var i=this.clonePosition(),s=R(t,i);return{value:n,location:s}},e.prototype.parseArgumentOptions=function(t,r,n,o){var i,s=this.clonePosition(),l=this.parseIdentifierIfPossible().value,f=this.clonePosition();switch(l){case"":return this.error(O.EXPECT_ARGUMENT_TYPE,R(s,f));case"number":case"date":case"time":{this.bumpSpace();var u=null;if(this.bumpIf(",")){this.bumpSpace();var d=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;var p=us(c.val);if(p.length===0)return this.error(O.EXPECT_ARGUMENT_STYLE,R(this.clonePosition(),this.clonePosition()));var m=R(d,this.clonePosition());u={style:p,styleLocation:m}}var y=this.tryParseArgumentClose(o);if(y.err)return y;var b=R(o,this.clonePosition());if(u&&_o(u==null?void 0:u.style,"::",0)){var v=fs(u.style.slice(2));if(l==="number"){var c=this.parseNumberSkeletonFromString(v,u.styleLocation);return c.err?c:{val:{type:U.number,value:n,location:b,style:c.val},err:null}}else{if(v.length===0)return this.error(O.EXPECT_DATE_TIME_SKELETON,b);var x=v;this.locale&&(x=So(v,this.locale));var p={type:he.dateTime,pattern:x,location:u.styleLocation,parsedOptions:this.shouldParseSkeletons?Po(x):{}},w=l==="date"?U.date:U.time;return{val:{type:w,value:n,location:b,style:p},err:null}}}return{val:{type:l==="number"?U.number:l==="date"?U.date:U.time,value:n,location:b,style:(i=u==null?void 0:u.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var C=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(O.EXPECT_SELECT_ARGUMENT_OPTIONS,R(C,B({},C)));this.bumpSpace();var z=this.parseIdentifierIfPossible(),D=0;if(l!=="select"&&z.value==="offset"){if(!this.bumpIf(":"))return this.error(O.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,R(this.clonePosition(),this.clonePosition()));this.bumpSpace();var c=this.tryParseDecimalInteger(O.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,O.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(c.err)return c;this.bumpSpace(),z=this.parseIdentifierIfPossible(),D=c.val}var _=this.tryParsePluralOrSelectOptions(t,l,r,z);if(_.err)return _;var y=this.tryParseArgumentClose(o);if(y.err)return y;var S=R(o,this.clonePosition());return l==="select"?{val:{type:U.select,value:n,options:Ro(_.val),location:S},err:null}:{val:{type:U.plural,value:n,options:Ro(_.val),offset:D,pluralType:l==="plural"?"cardinal":"ordinal",location:S},err:null}}default:return this.error(O.INVALID_ARGUMENT_TYPE,R(s,f))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(O.EXPECT_ARGUMENT_CLOSING_BRACE,R(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var n=this.char();switch(n){case 39:{this.bump();var o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(O.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,R(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var n=[];try{n=Ho(t)}catch(o){return this.error(O.INVALID_NUMBER_SKELETON,r)}return{val:{type:he.number,tokens:n,location:r,parsedOptions:this.shouldParseSkeletons?Oo(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,n,o){for(var i,s=!1,l=[],f=new Set,u=o.value,d=o.location;;){if(u.length===0){var c=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var p=this.tryParseDecimalInteger(O.EXPECT_PLURAL_ARGUMENT_SELECTOR,O.INVALID_PLURAL_ARGUMENT_SELECTOR);if(p.err)return p;d=R(c,this.clonePosition()),u=this.message.slice(c.offset,this.offset())}else break}if(f.has(u))return this.error(r==="select"?O.DUPLICATE_SELECT_ARGUMENT_SELECTOR:O.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,d);u==="other"&&(s=!0),this.bumpSpace();var m=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?O.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:O.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,R(this.clonePosition(),this.clonePosition()));var y=this.parseMessage(t+1,r,n);if(y.err)return y;var b=this.tryParseArgumentClose(m);if(b.err)return b;l.push([u,{value:y.val,location:R(m,this.clonePosition())}]),f.add(u),this.bumpSpace(),i=this.parseIdentifierIfPossible(),u=i.value,d=i.location}return l.length===0?this.error(r==="select"?O.EXPECT_SELECT_ARGUMENT_SELECTOR:O.EXPECT_PLURAL_ARGUMENT_SELECTOR,R(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(O.MISSING_OTHER_CLAUSE,R(this.clonePosition(),this.clonePosition())):{val:l,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var n=1,o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,s=0;!this.isEOF();){var l=this.char();if(l>=48&&l<=57)i=!0,s=s*10+(l-48),this.bump();else break}var f=R(o,this.clonePosition());return i?(s*=n,cs(s)?{val:s,err:null}:this.error(r,f)):this.error(t,f)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=Eo(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(_o(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),n=this.message.indexOf(t,r);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&jo(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),n=this.message.charCodeAt(r+(t>=65536?2:1));return n!=null?n:null},e})();function or(e){return e>=97&&e<=122||e>=65&&e<=90}function ds(e){return or(e)||e===47}function ps(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function jo(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function hs(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function ir(e){e.forEach(function(t){if(delete t.location,mt(t)||gt(t))for(var r in t.options)delete t.options[r].location,ir(t.options[r].value);else dt(t)&&vt(t.style)||(pt(t)||ht(t))&&Me(t.style)?delete t.style.location:bt(t)&&ir(t.children)})}function Uo(e,t){t===void 0&&(t={}),t=B({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new Io(e,t).parse();if(r.err){var n=SyntaxError(O[r.err.kind]);throw n.location=r.err.location,n.originalMessage=r.err.message,n}return t!=null&&t.captureLocation||ir(r.val),r.val}function yt(e,t){var r=t&&t.cache?t.cache:xs,n=t&&t.serializer?t.serializer:ys,o=t&&t.strategy?t.strategy:gs;return o(e,{cache:r,serializer:n})}function ms(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Xo(e,t,r,n){var o=ms(n)?n:r(n),i=t.get(o);return typeof i=="undefined"&&(i=e.call(this,n),t.set(o,i)),i}function ko(e,t,r){var n=Array.prototype.slice.call(arguments,3),o=r(n),i=t.get(o);return typeof i=="undefined"&&(i=e.apply(this,n),t.set(o,i)),i}function ar(e,t,r,n,o){return r.bind(t,e,n,o)}function gs(e,t){var r=e.length===1?Xo:ko;return ar(e,this,r,t.cache.create(),t.serializer)}function bs(e,t){return ar(e,this,ko,t.cache.create(),t.serializer)}function vs(e,t){return ar(e,this,Xo,t.cache.create(),t.serializer)}var ys=function(){return JSON.stringify(arguments)};function sr(){this.cache=Object.create(null)}sr.prototype.get=function(e){return this.cache[e]};sr.prototype.set=function(e,t){this.cache[e]=t};var xs={create:function(){return new sr}},xt={variadic:bs,monadic:vs};var me;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(me||(me={}));var je=(function(e){Ee(t,e);function t(r,n,o){var i=e.call(this,r)||this;return i.code=n,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t})(Error);var lr=(function(e){Ee(t,e);function t(r,n,o,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(n,'". Options are "').concat(Object.keys(o).join('", "'),'"'),me.INVALID_VALUE,i)||this}return t})(je);var Zo=(function(e){Ee(t,e);function t(r,n,o){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(n),me.INVALID_VALUE,o)||this}return t})(je);var Go=(function(e){Ee(t,e);function t(r,n){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(n,'"'),me.MISSING_VALUE,n)||this}return t})(je);var W;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(W||(W={}));function ws(e){return e.length<2?e:e.reduce(function(t,r){var n=t[t.length-1];return!n||n.type!==W.literal||r.type!==W.literal?t.push(r):n.value+=r.value,t},[])}function Cs(e){return typeof e=="function"}function Ue(e,t,r,n,o,i,s){if(e.length===1&&Kt(e[0]))return[{type:W.literal,value:e[0].value}];for(var l=[],f=0,u=e;f<u.length;f++){var d=u[f];if(Kt(d)){l.push({type:W.literal,value:d.value});continue}if(Co(d)){typeof i=="number"&&l.push({type:W.literal,value:r.getNumberFormat(t).format(i)});continue}var c=d.value;if(!(o&&c in o))throw new Go(c,s);var p=o[c];if(wo(d)){(!p||typeof p=="string"||typeof p=="number")&&(p=typeof p=="string"||typeof p=="number"?String(p):""),l.push({type:typeof p=="string"?W.literal:W.object,value:p});continue}if(pt(d)){var m=typeof d.style=="string"?n.date[d.style]:Me(d.style)?d.style.parsedOptions:void 0;l.push({type:W.literal,value:r.getDateTimeFormat(t,m).format(p)});continue}if(ht(d)){var m=typeof d.style=="string"?n.time[d.style]:Me(d.style)?d.style.parsedOptions:n.time.medium;l.push({type:W.literal,value:r.getDateTimeFormat(t,m).format(p)});continue}if(dt(d)){var m=typeof d.style=="string"?n.number[d.style]:vt(d.style)?d.style.parsedOptions:void 0;m&&m.scale&&(p=p*(m.scale||1)),l.push({type:W.literal,value:r.getNumberFormat(t,m).format(p)});continue}if(bt(d)){var y=d.children,b=d.value,v=o[b];if(!Cs(v))throw new Zo(b,"function",s);var x=Ue(y,t,r,n,o,i),w=v(x.map(function(D){return D.value}));Array.isArray(w)||(w=[w]),l.push.apply(l,w.map(function(D){return{type:typeof D=="string"?W.literal:W.object,value:D}}))}if(mt(d)){var C=d.options[p]||d.options.other;if(!C)throw new lr(d.value,p,Object.keys(d.options),s);l.push.apply(l,Ue(C.value,t,r,n,o));continue}if(gt(d)){var C=d.options["=".concat(p)];if(!C){if(!Intl.PluralRules)throw new je(`Intl.PluralRules is not available in this environment.
5
+ Try polyfilling it using "@formatjs/intl-pluralrules"
6
+ `,me.MISSING_INTL_API,s);var z=r.getPluralRules(t,{type:d.pluralType}).select(p-(d.offset||0));C=d.options[z]||d.options.other}if(!C)throw new lr(d.value,p,Object.keys(d.options),s);l.push.apply(l,Ue(C.value,t,r,n,o,p-(d.offset||0)));continue}}return ws(l)}function Ps(e,t){return t?B(B(B({},e||{}),t||{}),Object.keys(e).reduce(function(r,n){return r[n]=B(B({},e[n]),t[n]||{}),r},{})):e}function Ls(e,t){return t?Object.keys(e).reduce(function(r,n){return r[n]=Ps(e[n],t[n]),r},B({},e)):e}function cr(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function As(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:yt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.NumberFormat).bind.apply(t,ut([void 0],r,!1)))},{cache:cr(e.number),strategy:xt.variadic}),getDateTimeFormat:yt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.DateTimeFormat).bind.apply(t,ut([void 0],r,!1)))},{cache:cr(e.dateTime),strategy:xt.variadic}),getPluralRules:yt(function(){for(var t,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return new((t=Intl.PluralRules).bind.apply(t,ut([void 0],r,!1)))},{cache:cr(e.pluralRules),strategy:xt.variadic})}}var Vo=(function(){function e(t,r,n,o){var i=this;if(r===void 0&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var d=i.formatToParts(u);if(d.length===1)return d[0].value;var c=d.reduce(function(p,m){return!p.length||m.type!==W.literal||typeof p[p.length-1]!="string"?p.push(m.value):p[p.length-1]+=m.value,p},[]);return c.length<=1?c[0]||"":c},this.formatToParts=function(u){return Ue(i.ast,i.locales,i.formatters,i.formats,u,void 0,i.message)},this.resolvedOptions=function(){var u;return{locale:((u=i.resolvedLocale)===null||u===void 0?void 0:u.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=o||{},l=s.formatters,f=xo(s,["formatters"]);this.ast=e.__parse(t,B(B({},f),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ls(e.formats,n),this.formatters=o&&o.formatters||As(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=Uo,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e})();var fr=Vo;var ur=["ar","bg","ca","cs","da","de","el","en-GB","en-US","es","es-419","fi","fil","fr","he","hi","hr","hu","id","it","ja","ko","lt","lv","nl","no","pl","pt","pt-PT","ro","ru","sk","sl","sr","sr-Latn","sv","ta","te","th","tr","uk","vi","zh","zh-HK","zh-TW"],wt={en:"en-US","en-AU":"en-GB","en-IE":"en-GB","en-IN":"en-GB","en-SG":"en-GB","en-ZA":"en-GB","es-AR":"es-419","es-BO":"es-419","es-BR":"es-419","es-BZ":"es-419","es-CL":"es-419","es-CO":"es-419","es-CR":"es-419","es-CU":"es-419","es-DO":"es-419","es-EC":"es-419","es-GT":"es-419","es-HN":"es-419","es-MX":"es-419","es-NI":"es-419","es-PA":"es-419","es-PE":"es-419","es-PR":"es-419","es-PY":"es-419","es-SV":"es-419","es-US":"es-419","es-UY":"es-419","es-VE":"es-419",gsw:"de",in:"id",iw:"he",mo:"ro",nb:"no",tl:"fil"},Pe={},Ct={literal:0,argument:1,number:2,plural:6,pound:7},Ts={number:{bytes:{maximumFractionDigits:0},milliseconds:{maximumFractionDigits:0},seconds:{minimumFractionDigits:1,maximumFractionDigits:1},extendedPercent:{maximumFractionDigits:2,style:"percent"}}};function Ns(e){if(wt[e])return wt[e];if(ur.includes(e))return e;let t=e.split("-")[0];return wt[t]?wt[t]:ur.includes(t)?t:"en-US"}function Hs(e){return T(this,null,function*(){if(Pe[e])return Pe[e];let t=Ns(e);if(Pe[t])return Pe[t];let n=yield fetch(`./locales/${t}.json`);if(!n.ok)throw new Error(`Failed to load locale data for ${e}`);let o=yield n.json();return Pe[t]=o,Pe[e]=o,o})}function Jo(e){let t=[];return e.replace(/\[([^\]]+)\]|([^.[\]]+)/g,(r,n,o)=>(t.push(n!==void 0?n:o),"")),t}function zs(e,t){let r=Jo(t),n=e;for(let o of r){if(n==null||typeof n!="object")return;n=n[o]}return n}function Ds(e,t,r){let n=Jo(t);if(!n.length)return;let o=e;for(let i=0;i<n.length-1;i++){let s=n[i];if(o==null||typeof o!="object")return;o=o[s]}o!=null&&typeof o=="object"&&(o[n[n.length-1]]=r)}function qo(e,t=new Map){for(let r of e)if(!(r.type===Ct.literal||r.type===Ct.pound)&&(t.set(r.value,r),r.type===Ct.plural&&r.options))for(let n of Object.values(r.options))qo(n.value,t);return t}function Fs(e,t,r){let n=e.replace(/'/g,"''").replace(/\\{/g,"'{").replace(/\\}/g,"'}"),o=r==="en-XA"||r==="en-XL"?"de-DE":r,i=fr.IntlMessageFormat||fr,s=new i(n,o,Ts,{ignoreTag:!0}),l=qo(s.getAst()),f={},u=t||{};for(let[c,p]of l){if(!(c in u))throw new Error(`Missing ICU value "${c}"`);let m=u[c];if(p.type!==Ct.number){f[c]=m;continue}if(typeof m!="number")throw new Error(`Expected numeric ICU value for "${c}"`);p.style==="milliseconds"?f[c]=Math.round(m/10)*10:p.style==="seconds"&&c==="timeInMs"?f[c]=Math.round(m/100)/10:p.style==="bytes"?f[c]=m/1024:f[c]=m}let d=s.format(f);return typeof d=="string"?d:String(d)}function Wo(e,t,r){let n=JSON.parse(JSON.stringify(e));if(!n.i18n||!n.i18n.icuMessagePaths)return n;for(let[i,s]of Object.entries(n.i18n.icuMessagePaths)){let l=i.replace(/^lighthouse-core\//,"core/"),f=r[l]||r[i];if(f)for(let u of s){let d=typeof u=="string"?u:u.path,c=typeof u=="string"?void 0:u.values;if(typeof zs(n,d)=="string")try{let m=Fs(f.message,c,t);Ds(n,d,m)}catch(m){}}}let o={};for(let[i,s]of Object.entries(r)){if(!i.startsWith("report/renderer/report-utils.js | "))continue;let l=i.split(" | ")[1];l&&(o[l]=s.message)}return Object.keys(o).length&&(n.i18n.rendererFormattedStrings=o),n.configSettings=n.configSettings||{},n.configSettings.locale=t,n}function Yo(e){return!!(e&&e.i18n&&e.i18n.icuMessagePaths&&Object.keys(e.i18n.icuMessagePaths).length>0)}function Ko(e,t){let r=e&&e.configSettings&&e.configSettings.locale||t&&t.configSettings&&t.configSettings.locale||"en-US",[n,o]=X(null),[i,s]=X(null),l=n||r,f=Yo(e)||Yo(t);Z(()=>{if(!f)return;let p=e&&e.configSettings&&e.configSettings.locale||"en-US",m=t&&t.configSettings&&t.configSettings.locale||p;if(l===p&&l===m){s(null);return}let y=!1;return Hs(l).then(b=>{y||s({locale:l,messages:b})}).catch(()=>{}),()=>{y=!0}},[l,f,e,t]);let u=te(()=>!e||!i||i.locale!==l||e.configSettings&&e.configSettings.locale===l?e:Wo(e,l,i.messages),[e,l,i]),d=te(()=>!t||!i||i.locale!==l||t.configSettings&&t.configSettings.locale===l?t:Wo(t,l,i.messages),[t,l,i]),c=te(()=>[...new Set([r,...ur])].sort(),[r]);return{lhr:u,baseLhr:d,locale:l,setLocale:o,availableLocales:c,canSwapLocale:f}}function Os(e,t){if(typeof Intl!="undefined"&&typeof Intl.DisplayNames=="function")try{let r=new Intl.DisplayNames([t],{type:"language"}),o=new Intl.DisplayNames([e],{type:"language"}).of(e),i=r.of(e)||e;return o&&o!==i?`${o} \u2013 ${i}`:i}catch(r){return e}return e}var Qo=e=>{let t=te(()=>e.availableLocales.map(r=>({value:r,label:Os(r,e.locale)})),[e.availableLocales,e.locale]);return a("div",{className:"lhr-locale-selector",title:"Report Locale"},a("i",{className:"material-icons lhr-locale-selector__icon"},"language"),a(at,{className:"dropdown--locale",value:e.locale,setValue:e.setLocale,options:t}))};var $o=e=>{let{lhr:t,baseLhr:r,locale:n,setLocale:o,availableLocales:i,canSwapLocale:s}=Ko(e.compareReport.lhr,e.baseReport.lhr),l=t?E(F({},e.compareReport),{lhr:t}):e.compareReport,f=r?E(F({},e.baseReport),{lhr:r}):e.baseReport,u=fn(f.lhr,l.lhr);return a("div",{className:"comparison"},a("div",{className:"comparison-header"},a("div",{className:"comparison-header__logo"},a("img",{src:De,alt:"Lighthouse Logo",onClick:()=>{e.setBaseReport(void 0),e.setCompareReport(void 0)}})),a("div",{className:"comparison-header__upload"},a(xe,{variant:"base",dragTarget:"self",report:f,setReport:e.setBaseReport,addToast:e.addToast,displayType:u,showOpenLhrLink:!0}),a(xe,{variant:"compare",dragTarget:"self",report:l,setReport:e.setCompareReport,addToast:e.addToast,displayType:u,showOpenLhrLink:!0}),a("div",{className:"comparison-header__switcher",onClick:()=>{e.setBaseReport(e.compareReport),e.setCompareReport(e.baseReport)}},a("i",{className:"material-icons"},"swap_horiz"))),s?a(Qo,{locale:n,setLocale:o,availableLocales:i}):null,a("a",{className:"comparison-header__info",href:"https://github.com/GoogleChrome/lighthouse-ci"},a("i",{className:"material-icons"},"info"))),a("div",{className:"comparison-body"},a(yo,{lhr:l.lhr,baseLhr:f.lhr,hookElements:{}})))};var ei=e=>{let t=e.setToasts,{message:r,level:n="info"}=e.toast;return Z(()=>{let o=setTimeout(()=>t(i=>i.filter(s=>s!==e.toast)),5e3);return()=>clearInterval(o)},[]),a("div",{className:`toast toast--${n}`},r)};var oi=new URLSearchParams(location.search),ti=oi.get("baseReport"),ri=oi.get("compareReport");function ni(e,t){return T(this,null,function*(){let r=new URL(e).pathname.split("/").slice(-1)[0]||"Unknown",o=yield(yield fetch(e)).text(),i=Mt(o);if(i instanceof Error)throw i;t({filename:r,data:o,lhr:i})})}function Ss(e,t,r,n){return T(this,null,function*(){if(window.location.hostname==="localhost"){let i=localStorage.getItem("lastBaseReport"),s=localStorage.getItem("lastCompareReport");i&&e(JSON.parse(i)),s&&t(JSON.parse(s))}let o=[ti&&ni(ti,e),ri&&ni(ri,t)].filter(i=>!!i);o.length&&(r(!0),yield Promise.all(o.map(i=>i.catch(s=>{console.error(s),n({message:`Failed loading report from URL: ${s.message}`,level:"error"})}))),r(!1))})}var ii=()=>{let[t,r]=X(!1),[n,o]=X(void 0),[i,s]=X(void 0),[l,f]=X([]),d=Ot(c=>f(p=>[...p,c]),[f]);return Z(()=>{Ss(o,s,r,d)},[]),Z(()=>{try{n&&localStorage.setItem("lastBaseReport",JSON.stringify(n)),i&&localStorage.setItem("lastCompareReport",JSON.stringify(i))}catch(c){console.error(`Error saving to localStorage: ${c}`)}},[n,i]),a("div",{className:"lhci-viewer"},t?a("div",{className:"loading-container"},a(Bt,null)):a(A,null),a("div",{className:"toast-container"},l.map(c=>a(ei,{key:c.message,toast:c,setToasts:f}))),n&&i?a($o,{baseReport:n,setBaseReport:o,compareReport:i,setCompareReport:s,addToast:d}):a(dn,{baseReport:n,setBaseReport:o,compareReport:i,setCompareReport:s,addToast:d}))};var ai=document.getElementById("preact-root");if(!ai)throw new Error("Missing #preact-root");Ne(a(ii,null),ai);})();
7
+ /**
8
+ * @license Copyright 2019 Google Inc. All Rights Reserved.
9
+ * 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
10
+ * 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.
11
+ */
12
+ /**
13
+ * @license Copyright 2020 Google Inc. All Rights Reserved.
14
+ * 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
15
+ * 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.
16
+ */
17
+ /**
18
+ * @license Copyright 2026 Google Inc. All Rights Reserved.
19
+ * 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
20
+ * 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.
21
+ */
22
+ //# sourceMappingURL=entry-KSKAOE6M.js.map