monocart-reporter 1.7.13 → 2.0.1

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 (42) hide show
  1. package/README.md +10 -26
  2. package/lib/generate-data.js +7 -19
  3. package/lib/generate-report.js +13 -6
  4. package/lib/index.d.ts +82 -53
  5. package/lib/index.js +1 -4
  6. package/lib/index.mjs +0 -1
  7. package/lib/packages/monocart-common.js +1 -0
  8. package/lib/packages/monocart-network.js +1 -0
  9. package/lib/packages/monocart-reporter.js +1 -0
  10. package/lib/packages/monocart-vendor.js +22 -0
  11. package/lib/platform/share.js +0 -5
  12. package/lib/plugins/audit/audit.js +2 -2
  13. package/lib/plugins/coverage/coverage.js +77 -256
  14. package/lib/plugins/network/network.js +17 -13
  15. package/lib/plugins/state/client.js +1 -1
  16. package/lib/plugins/state/state.js +1 -1
  17. package/lib/utils/parse-source.js +1 -1
  18. package/lib/utils/util.js +25 -38
  19. package/lib/visitor.js +6 -26
  20. package/package.json +10 -8
  21. package/lib/plugins/coverage/converter/collect-source-maps.js +0 -194
  22. package/lib/plugins/coverage/converter/converter.js +0 -565
  23. package/lib/plugins/coverage/converter/dedupe.js +0 -110
  24. package/lib/plugins/coverage/converter/find-original-range.js +0 -581
  25. package/lib/plugins/coverage/converter/info-branch.js +0 -30
  26. package/lib/plugins/coverage/converter/info-function.js +0 -29
  27. package/lib/plugins/coverage/converter/info-line.js +0 -20
  28. package/lib/plugins/coverage/converter/position-mapping.js +0 -183
  29. package/lib/plugins/coverage/converter/source-path.js +0 -140
  30. package/lib/plugins/coverage/istanbul/istanbul-summary.js +0 -49
  31. package/lib/plugins/coverage/istanbul/istanbul.js +0 -171
  32. package/lib/plugins/coverage/v8/v8-summary.js +0 -80
  33. package/lib/plugins/coverage/v8/v8.js +0 -260
  34. package/lib/runtime/monocart-code-viewer.js +0 -1
  35. package/lib/runtime/monocart-common.js +0 -1
  36. package/lib/runtime/monocart-coverage.js +0 -14
  37. package/lib/runtime/monocart-formatter.js +0 -1
  38. package/lib/runtime/monocart-network.js +0 -1
  39. package/lib/runtime/monocart-reporter.js +0 -1
  40. package/lib/runtime/monocart-v8.js +0 -1
  41. package/lib/runtime/monocart-vendor.js +0 -22
  42. package/lib/utils/decode-mappings.js +0 -49
package/README.md CHANGED
@@ -35,7 +35,7 @@
35
35
  - [Istanbul](#istanbul)
36
36
  - [V8](#v8)
37
37
  - [V8 to Istanbul](#v8-to-istanbul)
38
- - [Compare Istanbul, V8 and V8 to Istanbul](#compare-istanbul-v8-and-v8-to-istanbul)
38
+ - [Istanbul vs V8](#istanbul-vs-v8)
39
39
  - [Global Coverage Report](#global-coverage-report) for Component Testing
40
40
  * [Attach Network Report](#attach-network-report)
41
41
  * [Global State Management](#global-state-management)
@@ -633,26 +633,18 @@ test('attach lighthouse audit report', async () => {
633
633
  });
634
634
 
635
635
  ```
636
- Preview [Audit HTML Report](https://cenfun.github.io/monocart-reporter/audit-78a0a1cc4420ee9da113/index.html)
637
636
 
638
637
  ## Code Coverage Report
639
- There are two APIs for coverage report:
640
- - `attachCoverageReport(data, testInfo, options)`
641
- Attach a coverage report to a test. Arguments:
638
+ The reporter integrates [monocart-coverage-reports](https://github.com/cenfun/monocart-coverage-reports) for coverage reports, there are two APIs:
639
+ - `attachCoverageReport(data, testInfo, options)` Attach a coverage report to a test. Arguments:
642
640
  - `data` There are two supported data inputs: [Istanbul](#istanbul) (Object) or [V8](#v8) (Array)
643
641
  - `testInfo` see [TestInfo](https://playwright.dev/docs/api/class-testinfo)
644
642
  - `options` (Object) see [Coverage Options](#coverage-options)
645
643
  - `addCoverageReport(data, testInfo)` Add coverage to global coverage report from a test. see [Global Coverage Report](#global-coverage-report)
646
644
 
647
645
  ### Coverage Options
648
- - `title` (String) report title.
649
- - `toIstanbul` (Boolean) Whether to convert to Istanbul report from V8 list. Defaults to `html-spa` report | (String) report name | (Array) multiple reports. V8 only.
650
- - `entryFilter` (Function) A filter function to execute for each element in the V8 list. V8 only.
651
- - `sourceFilter` (Function) A filter function to execute for each element in the sources which unpacked from the source map. Sourcemap only.
652
- - `watermarks` (Object) Istanbul watermarks, see [here](https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-lib-report) | (Array) V8 watermarks, Defaults to `[50, 80]`.
653
- - `lcov` (Boolean) Whether to create `lcov.info`. (for Sonar coverage)
654
- - `sourcePath` (Function) source path handler, return a new source path. ([issue#53](https://github.com/cenfun/monocart-reporter/issues/53)).
655
- - `inline` (Boolean) Whether inline all scripts to the single HTML file. V8 only.
646
+ - Default [options](https://github.com/cenfun/monocart-coverage-reports/blob/main/lib/default/options.js)
647
+ - More examples [monocart-coverage-reports](https://github.com/cenfun/monocart-coverage-reports)
656
648
 
657
649
  ### [Istanbul](https://github.com/istanbuljs)
658
650
  Requires your source code is instrumented. Usually we can use the tool [babel-plugin-istanbul](https://github.com/istanbuljs/babel-plugin-istanbul) to build instrumenting code. (see example: [webpack.config-istanbul.js](https://github.com/cenfun/monocart-reporter-test/blob/main/packages/coverage/webpack.config-istanbul.js)) The instrumented code will automatically generate coverage data and save it on `window.__coverage__`. The Istanbul HTML report will be generated and attached to the test report as an attachment.
@@ -729,22 +721,14 @@ test('Take V8 and Istanbul coverage report', async ({ page }) => {
729
721
  Take V8 coverage data and convert it to Istanbul's coverage format. The Istanbul HTML report will be generated.
730
722
  ```js
731
723
  const report = await attachCoverageReport(coverageList, test.info(), {
732
- toIstanbul: true
724
+ reports: "html"
733
725
  });
734
726
  ```
735
727
 
736
- ### Compare Istanbul, V8 and V8 to Istanbul
737
- | | Istanbul | V8 | V8 to Istanbul |
738
- | :--------------| :------ | :------ | :---------------------- |
739
- | Input data format | Istanbul (Object) | V8 (Array) | V8 (Array) |
740
- | Output | [Istanbul HTML report](https://cenfun.github.io/monocart-reporter/coverage-77aa6f37601a97417803/index.html) | [V8 HTML report](https://cenfun.github.io/monocart-reporter/coverage/index.html) | [Istanbul HTML report](https://cenfun.github.io/monocart-reporter/coverage-01eebe0ebc796534d759-1/index.html) |
741
- | Indicators | Covered Lines, Branches, Statements and Functions, Execution Counts | Covered Bytes, Lines❔, Execution Counts | Covered Lines, Branches❔, Statements and Functions, Execution Counts |
742
- | Source code without [instrumentation](https://github.com/istanbuljs/babel-plugin-istanbul) | ❌ | ✅ | ✅ |
743
- | CSS coverage | ❌ | ✅ | ✅ |
744
- | Minified code | N/A | ✅ | ❌ |
745
- | Code formatting | N/A | ✅ | ❌ |
746
-
747
- ❔ - Partial or conditional support
728
+ ### Istanbul vs V8
729
+ - [Compare Istanbul, V8 and V8 to Istanbul Reports](https://github.com/cenfun/monocart-coverage-reports#compare-reports)
730
+ - [Compare Istanbul and V8 Workflows](https://github.com/cenfun/monocart-coverage-reports#compare-workflows)
731
+
748
732
  ### Global Coverage Report
749
733
  The global coverage report will not be attached to any test case, but will merge all coverages into one global report after all the tests are finished.
750
734
  - The global coverage options see [Coverage Options](#coverage-options)
@@ -4,7 +4,7 @@ const Util = require('./utils/util.js');
4
4
  const { getTickInfo } = require('./utils/system.js');
5
5
  const Visitor = require('./visitor.js');
6
6
  const { calculateSummary } = require('./common.js');
7
- const { addGlobalCoverageReport } = require('./plugins/coverage/coverage.js');
7
+ const { generateGlobalCoverageReport } = require('./plugins/coverage/coverage.js');
8
8
  const version = require('../package.json').version;
9
9
 
10
10
  const getReportName = (options, config, metadata) => {
@@ -15,27 +15,15 @@ const getReportName = (options, config, metadata) => {
15
15
  return 'Test Report';
16
16
  };
17
17
 
18
- const generateGlobalCoverageReport = (dataList, options) => {
19
- const {
20
- name, outputDir, coverage
21
- } = options;
22
- const coverageOptions = {
23
- title: `Coverage Report - ${name}`,
24
- outputDir,
25
- outputName: 'coverage',
26
- ... coverage
27
- };
28
- return addGlobalCoverageReport(dataList, coverageOptions);
29
- };
30
-
31
- const artifactsHandler = async (visitor, options) => {
18
+ const artifactsHandler = async (visitor, reporterOptions) => {
32
19
  const artifacts = [].concat(visitor.artifacts);
20
+
33
21
  // global artifacts
34
- const { coverage } = visitor.artifactDataMap;
35
- if (coverage) {
36
- const report = await generateGlobalCoverageReport(coverage, options);
37
- artifacts.push(report);
22
+ const globalCoverageReport = await generateGlobalCoverageReport(reporterOptions);
23
+ if (globalCoverageReport) {
24
+ artifacts.push(globalCoverageReport);
38
25
  }
26
+
39
27
  return artifacts;
40
28
  };
41
29
 
@@ -17,16 +17,23 @@ const generateJson = (outputDir, htmlFile, reportData) => {
17
17
 
18
18
  const generateHtml = async (outputDir, htmlFile, reportData, inline) => {
19
19
 
20
+ // deps
21
+ const jsFiles = ['turbogrid'].map((it) => {
22
+ return path.resolve(`node_modules/${it}/dist/${it}.js`);
23
+ });
24
+
25
+ jsFiles.push(path.resolve(__dirname, './packages/monocart-common.js'));
26
+ jsFiles.push(path.resolve(__dirname, './packages/monocart-reporter.js'));
27
+
20
28
  const options = {
21
29
  inline,
22
30
  reportData,
23
- jsFiles: ['monocart-common.js', 'monocart-reporter.js'],
24
- htmlDir: outputDir,
31
+ jsFiles,
32
+ assetsPath: './assets',
33
+ outputDir,
25
34
  htmlFile,
26
35
 
27
- outputDir,
28
- reportDataFile: 'report-data.js',
29
- assetsRelative: ''
36
+ reportDataFile: 'report-data.js'
30
37
  };
31
38
 
32
39
  const htmlPath = await Util.saveHtmlReport(options);
@@ -152,7 +159,7 @@ const generateReport = async (reportData, options) => {
152
159
  if (artifacts) {
153
160
  artifacts.forEach((report) => {
154
161
  const g = report.global ? `${EC.magenta('(global)')}` : '';
155
- Util.logInfo(`${report.name}: ${EC.cyan(report.path)} ${report.title} ${g}`);
162
+ Util.logInfo(`${report.type}: ${EC.cyan(report.path)} ${report.name} ${g}`);
156
163
  // convert path to relative reporter
157
164
  report.path = Util.relativePath(report.path, outputDir);
158
165
  });
package/lib/index.d.ts CHANGED
@@ -1,11 +1,87 @@
1
1
  import { TestInfo } from "@playwright/test"
2
2
 
3
+ import type { CoverageReportOptions } from "monocart-coverage-reports";
4
+ export * from 'monocart-coverage-reports';
5
+
6
+ export type MonocartReporterOptions = {
7
+ // the report name
8
+ name?: string,
9
+
10
+ // the output file path (relative process.cwd)
11
+ outputFile?: string,
12
+
13
+ // attachment path handler
14
+ attachmentPath?: (currentPath: string, extras: any) => string,
15
+ // attachmentPath: (currentPath, extras) => `https://cenfun.github.io/monocart-reporter/${currentPath}`,
16
+
17
+ traceViewerUrl?: string,
18
+
19
+ // logging levels: off, error, info, debug
20
+ logging?: string,
21
+
22
+ // timezone offset in minutes, GMT+0800 = -480
23
+ timezoneOffset?: number,
24
+
25
+ // global coverage settings for addCoverageReport API
26
+ coverage?: CoverageReportOptions,
27
+ // coverage: {
28
+ // entryFilter: (entry) => true,
29
+ // sourceFilter: (sourcePath) => sourcePath.search(/src\/.+/) !== -1,
30
+ // },
31
+
32
+ state?: {
33
+ data?: any,
34
+ server?: {
35
+ host?: string,
36
+ port?: number
37
+ }
38
+ onReceive?: (...args: any[]) => any,
39
+ onClose?: (data: any, config: any) => void
40
+ },
41
+
42
+ // trend data handler
43
+ trend?: string | (() => Promise<string | object>),
44
+ // trend: () => './test-results/report.json',
45
+
46
+ // custom tags style
47
+ tags?: object,
48
+ // tags: {
49
+ // smoke: {
50
+ // 'background': '#6F9913'
51
+ // },
52
+ // sanity: {
53
+ // 'background': '#178F43'
54
+ // }
55
+ // },
56
+
57
+ // columns data handler
58
+ columns?: (defaultColumns: object[]) => void,
59
+ // columns: (defaultColumns) => {},
60
+
61
+ // rows data handler (suite, case and step)
62
+ visitor?: (data: any, metadata: any, collect: {
63
+ //ParserOptions https://github.com/babel/babel/blob/main/packages/babel-parser/typings/babel-parser.d.ts
64
+ comments?: (parserOptions: any) => void
65
+ }) => void,
66
+ // visitor: (data, metadata, collect) => {},
67
+
68
+ // onEnd hook
69
+ onEnd?: (reportData: object, capability: {
70
+ sendEmail?: (emailOptions: {
71
+ transport: object,
72
+ message: object
73
+ }) => Promise<void>,
74
+ forEach?: (callback: ((item: any) => void)) => void
75
+ }) => Promise<void>
76
+ // onEnd: async (reportData, capability) => {}
77
+ }
78
+
3
79
  /**
4
80
  * merge
5
81
  */
6
82
  export function merge(
7
- reportDataList: [],
8
- options?: any
83
+ reportDataList: any[],
84
+ options?: MonocartReporterOptions
9
85
  ): Promise<void>;
10
86
 
11
87
  /**
@@ -28,65 +104,18 @@ export function attachAuditReport(
28
104
  * coverage
29
105
  */
30
106
 
31
- export type IstanbulReportConfig = {
32
- name: string,
33
- options: any
34
- }
35
-
36
- export type CoverageReportOptions = {
37
-
38
- title?: string,
39
- outputDir?: string,
40
- outputName?: string,
41
-
42
- // Whether to convert to Istanbul report
43
- toIstanbul?: boolean | string | string[] | IstanbulReportConfig[],
44
-
45
- // A filter function to execute for each element in the V8 list.
46
- entryFilter?: (entry: any) => boolean,
47
-
48
- // A filter function to execute for each element in the sources which unpacked from the source map.
49
- sourceFilter?: (sourcePath: string) => boolean,
50
-
51
- sourcePath?: (sourcePath: string) => string,
52
-
53
- sourceFinder?: (filePath: string) => string,
54
-
55
- // Whether to create `lcov.info`
56
- lcov?: boolean,
57
-
58
- watermarks?: [number, number] | {
59
- statements: [number, number],
60
- functions: [number, number],
61
- branches: [number, number],
62
- lines: [number, number]
63
- },
64
-
65
- // Whether inline all scripts to the single HTML file.
66
- inline?: boolean,
67
-
68
- logging?: string
69
- };
70
-
71
107
  export function addCoverageReport(
72
- v8list: any[],
73
- testInfo: TestInfo,
74
- options?: CoverageReportOptions
108
+ coverageData: any[] | any,
109
+ testInfo: TestInfo
75
110
  ): Promise<any | void>;
76
111
 
77
- export function addGlobalCoverageReport(
78
- dataList: any[],
79
- options: CoverageReportOptions
80
- ): Promise<any>;
81
-
82
112
  export function attachCoverageReport(
83
- coverage: any[] | any,
113
+ coverageData: any[] | any,
84
114
  testInfo: TestInfo,
85
115
  options?: CoverageReportOptions
86
116
  ): Promise<any>;
87
117
 
88
118
 
89
-
90
119
  /**
91
120
  * network
92
121
  */
@@ -131,4 +160,4 @@ export type State = {
131
160
  send: (...args: any[]) => Promise<any>
132
161
  }
133
162
 
134
- export function useState(options?: StateOptions): State;
163
+ export function useState(options?: StateOptions): State;
package/lib/index.js CHANGED
@@ -7,9 +7,7 @@ const { getTrends } = require('./common.js');
7
7
 
8
8
  const merge = require('./merge-data.js');
9
9
  const { attachAuditReport } = require('./plugins/audit/audit.js');
10
- const {
11
- addCoverageReport, addGlobalCoverageReport, attachCoverageReport
12
- } = require('./plugins/coverage/coverage.js');
10
+ const { addCoverageReport, attachCoverageReport } = require('./plugins/coverage/coverage.js');
13
11
  const { attachNetworkReport } = require('./plugins/network/network.js');
14
12
 
15
13
  const { createStateServer, useState } = require('./plugins/state/state.js');
@@ -24,7 +22,6 @@ class Reporter {
24
22
  static attachAuditReport = attachAuditReport;
25
23
 
26
24
  static addCoverageReport = addCoverageReport;
27
- static addGlobalCoverageReport = addGlobalCoverageReport;
28
25
  static attachCoverageReport = attachCoverageReport;
29
26
 
30
27
  static attachNetworkReport = attachNetworkReport;
package/lib/index.mjs CHANGED
@@ -8,7 +8,6 @@ export const merge = MonocartReporter.merge;
8
8
  export const attachAuditReport = MonocartReporter.attachAuditReport;
9
9
 
10
10
  export const addCoverageReport = MonocartReporter.addCoverageReport;
11
- export const addGlobalCoverageReport = MonocartReporter.addGlobalCoverageReport;
12
11
  export const attachCoverageReport = MonocartReporter.attachCoverageReport;
13
12
 
14
13
  export const attachNetworkReport = MonocartReporter.attachNetworkReport;
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("turbogrid")):"function"==typeof define&&define.amd?define("monocart-common",["turbogrid"],t):"object"==typeof exports?exports["monocart-common"]=t(require("turbogrid")):e["monocart-common"]=t(e.turbogrid)}(self,(e=>(()=>{var t={162:function(e,t,r){var n,o,a;o=[],void 0===(a="function"==typeof(n=function(){"use strict";function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function n(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){c(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof r.g&&r.g.global===r.g?r.g:void 0,s=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),c=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,r){var s=i.URL||i.webkitURL,c=document.createElement("a");t=t||e.name||"download",c.download=t,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?a(c):o(c.href)?n(e,t,r):a(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){a(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,i){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,i),r);else if(o(e))n(e,r,i);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){a(s)}))}}:function(e,t,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return n(e,t,r);var a="application/octet-stream"===e.type,c=/constructor/i.test(i.HTMLElement)||i.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&c||s)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},l.readAsDataURL(e)}else{var f=i.URL||i.webkitURL,d=f.createObjectURL(e);o?o.location=d:location.href=d,o=null,setTimeout((function(){f.revokeObjectURL(d)}),4e4)}});i.saveAs=c.saveAs=c,e.exports=c})?n.apply(t,o):n)||(e.exports=a)},925:e=>{var t,r,n=(t=(e,t)=>{t.exports={data:'(()=>{var x=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var S=x((V,R)=>{var _=0,p=-3;function b(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function N(e,n){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=n,this.destLen=0,this.ltree=new b,this.dtree=new b}var y=new b,k=new b,w=new Uint8Array(30),h=new Uint16Array(30),L=new Uint8Array(30),T=new Uint16Array(30),O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),A=new b,c=new Uint8Array(288+32);function D(e,n,r,a){var t,i;for(t=0;t<r;++t)e[t]=0;for(t=0;t<30-r;++t)e[t+r]=t/r|0;for(i=a,t=0;t<30;++t)n[t]=i,i+=1<<e[t]}function z(e,n){var r;for(r=0;r<7;++r)e.table[r]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,r=0;r<24;++r)e.trans[r]=256+r;for(r=0;r<144;++r)e.trans[24+r]=r;for(r=0;r<8;++r)e.trans[24+144+r]=280+r;for(r=0;r<112;++r)e.trans[24+144+8+r]=144+r;for(r=0;r<5;++r)n.table[r]=0;for(n.table[5]=32,r=0;r<32;++r)n.trans[r]=r}var I=new Uint16Array(16);function l(e,n,r,a){var t,i;for(t=0;t<16;++t)e.table[t]=0;for(t=0;t<a;++t)e.table[n[r+t]]++;for(e.table[0]=0,i=0,t=0;t<16;++t)I[t]=i,i+=e.table[t];for(t=0;t<a;++t)n[r+t]&&(e.trans[I[n[r+t]]++]=t)}function B(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var n=e.tag&1;return e.tag>>>=1,n}function u(e,n,r){if(!n)return r;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var a=e.tag&65535>>>16-n;return e.tag>>>=n,e.bitcount-=n,a+r}function v(e,n){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var r=0,a=0,t=0,i=e.tag;do a=2*a+(i&1),i>>>=1,++t,r+=n.table[t],a-=n.table[t];while(a>=0);return e.tag=i,e.bitcount-=t,n.trans[r+a]}function C(e,n,r){var a,t,i,o,s,f;for(a=u(e,5,257),t=u(e,5,1),i=u(e,4,4),o=0;o<19;++o)c[o]=0;for(o=0;o<i;++o){var F=u(e,3,0);c[O[o]]=F}for(l(A,c,0,19),s=0;s<a+t;){var g=v(e,A);switch(g){case 16:var M=c[s-1];for(f=u(e,2,3);f;--f)c[s++]=M;break;case 17:for(f=u(e,3,3);f;--f)c[s++]=0;break;case 18:for(f=u(e,7,11);f;--f)c[s++]=0;break;default:c[s++]=g;break}}l(n,c,0,a),l(r,c,a,t)}function U(e,n,r){for(;;){var a=v(e,n);if(a===256)return _;if(a<256)e.dest[e.destLen++]=a;else{var t,i,o,s;for(a-=257,t=u(e,w[a],h[a]),i=v(e,r),o=e.destLen-u(e,L[i],T[i]),s=o;s<o+t;++s)e.dest[e.destLen++]=e.dest[s]}}}function K(e){for(var n,r,a;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if(n=e.source[e.sourceIndex+1],n=256*n+e.source[e.sourceIndex],r=e.source[e.sourceIndex+3],r=256*r+e.source[e.sourceIndex+2],n!==(~r&65535))return p;for(e.sourceIndex+=4,a=n;a;--a)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,_}function j(e,n){var r=new N(e,n),a,t,i;do{switch(a=B(r),t=u(r,2,0),t){case 0:i=K(r);break;case 1:i=U(r,y,k);break;case 2:C(r,r.ltree,r.dtree),i=U(r,r.ltree,r.dtree);break;default:i=p}if(i!==_)throw new Error("Data error")}while(!a);return r.destLen<r.dest.length?typeof r.dest.slice=="function"?r.dest.slice(0,r.destLen):r.dest.subarray(0,r.destLen):r.dest}z(y,k);D(w,h,4,3);D(L,T,2,1);w[28]=0;h[28]=258;R.exports=j});var E=x((W,q)=>{var G=S(),H=e=>Uint8Array.from(atob(e),n=>n.charCodeAt(0)),J=e=>new TextDecoder().decode(e);q.exports=function(e){if(e){let[n,r]=e.split(".");if(n&&r){let a=H(n),t=new Uint8Array(parseInt(r));return G(a,t),J(t)}}}});var P=E();onmessage=function(e){postMessage(P(e.data))};postMessage("workerReady");})();\n'}},()=>(r||t((r={exports:{}}).exports,r),r.exports))();e.exports=e=>new Promise((t=>{let r=new Worker(URL.createObjectURL(new Blob([n.data],{type:"application/javascript"})));r.onmessage=n=>{"workerReady"!==n.data?(t(n.data),r.terminate()):r.postMessage(e)},r.onerror=e=>{t({error:e}),r.terminate()}}))},209:e=>{const t={tagPattern:/(\s*)@([^@\s]+)(\s*)/g,lineBreakPattern:/\r\n|[\r\n\u2028\u2029]/gu,attachments:{audit:{name:"audit",contentType:"text/html",reportFile:"audit-report.json"},coverage:{name:"coverage",contentType:"text/html",reportFile:"coverage-report.json"},network:{name:"network",contentType:"text/html",reportFile:"network-report.json"}},pageTimings:[{key:"onContentLoad",name:"Content Loaded",color:"#1a1aa6"},{key:"onLoad",name:"Page Loaded",color:"#c80000"}],timings:[{key:"blocked",name:"Blocking",color:"#858585"},{key:"dns",name:"DNS Lookup",color:"#009688"},{key:"connect",name:"Connecting",color:"#b52dcd"},{key:"send",name:"Sending",color:"#74979a"},{key:"wait",name:"Waiting",color:"#00a846"},{key:"receive",name:"Receiving",color:"#0299de"}],hasOwn:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},isNull:function(e){return null==e},uid:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;const t="0123456789abcdefghijklmnopqrstuvwxyz";let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";for(;e--;)r+=t[36*Math.random()|0];return r},zero:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(e=`${e}`).padStart(t,"0")},toNum:function(e,t){return"number"!=typeof e&&(e=parseFloat(e)),isNaN(e)&&(e=0),t&&(e=Math.round(e)),e},isList:function(e){return!!(e&&e instanceof Array&&e.length>0)},forEach:function(e,r){const n=e=>"break"===e||!1===e,o=(e,a)=>{if(t.isList(e))for(const t of e){const e=r(t,a);if(n(e))return e;const i=o(t.subs,t);if(n(i))return i}};o(e)},formatPath:function(e){return e&&(e=e.replace(/\\/g,"/")),e},getCurrentTrendInfo:e=>{const{date:t,duration:r,summary:n}=e,o={date:t,duration:r};return Object.keys(n).forEach((e=>{const t=n[e];o[e]=t.value})),o},isTagItem:e=>"case"===e.type||"suite"===e.type&&"describe"===e.suiteType,delay:function(e){return new Promise((t=>{e?setTimeout(t,e):setImmediate(t)}))},generatePercentChart:function(e){return`<div style="--mcr-percent:${e}%;" class="mcr-percent-chart"></div>`},getStatus:(e,t)=>t?e<t[0]?"low":e<t[1]?"medium":"high":"unknown",isJsonType:e=>!(!e||"application/json"!==e&&"json"!==e),isMarkdownType:e=>!(!e||"text/markdown"!==e&&"markdown"!==e),isTextType(e){if(e){if(e.startsWith("text"))return!0;if(t.isMarkdownType(e))return!0;if(t.isJsonType(e))return!0}return!1},dFixed:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return Number.isInteger(e)?e:t.toNum(t.toNum(e).toFixed(r))},pxFixed:e=>{const t=Math.floor(e);return e<t+.5?t+.5:t+1.5},point:(e,r)=>`${t.dFixed(e)},${t.dFixed(r)}`,NF:function(e){return"number"==typeof e&&e?e.toLocaleString():e},PF:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"%",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";e=t.toNum(e),r=t.toNum(r);let i=0;r&&(i=e/r);const s=(100*i).toFixed(n);return o?s+a+o:parseFloat(s)},PSF:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return t.PF(e,r,n,"%"," ")},PNF:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return t.PF(e,r,n,"")},BF:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(0===(e=t.toNum(e,!0)))return`0${n}B`;let o="";e<0&&(e=Math.abs(e),o="-");const a=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];for(let t=0,i=a.length;t<i;t++){const i=Math.pow(1024,t),s=Math.pow(1024,t+1);if(e>i&&e<s){const s=a[t];e=o+(e/i).toFixed(r)+n+s;break}}return e},BSF:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t.BF(e,r," ")},TF:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=t.toNum(e,!0);if(n<1e3)return`${n}${r}ms`;if(n<6e4){const e=Math.floor(n/1e3),t=Math.round((n-1e3*e)/100);return t?`${e}.${t}${r}s`:`${e}${r}s`}const o=Math.round(n/1e3),a=60,i=3600,s=24*i;if(o<i){const e=Math.floor(o/a);return`${e}${r}m ${o-e*a}${r}s`}if(o<s){const e=Math.floor(o/i),t=Math.floor((o-e*i)/a);return`${e}${r}h ${t}${r}m ${o-e*i-t*a}${r}s`}const c=Math.floor(o/s),u=Math.floor((o-c*s)/i),l=Math.floor((o-c*s-u*i)/a);return`${c}${r}d ${u}${r}h ${l}${r}m ${o-c*s-u*i-l*a}${r}s`},TSF:function(e){return t.TF(e," ")}};e.exports=t},46:t=>{"use strict";t.exports=e}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={exports:{}};return t[e].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{CommonUtil:()=>k,debounce:()=>t,decodeIcons:()=>M,hash:()=>g,inflate:()=>i(),microtask:()=>r,niceTicks:()=>p,saveAs:()=>h.saveAs,setFavicon:()=>A,store:()=>b});class e{start(e){this.callback=e,this.started||(this.started=!0,this.create())}create(){if("function"!=typeof window.queueMicrotask){if("function"!=typeof Promise)throw new Error("Current browser does NOT support queueMicrotask or Promise");Promise.resolve().then((()=>{this.execute()}))}else window.queueMicrotask((()=>{this.execute()}))}execute(){if(!this.started)return;this.started=!1;const e=this.callback;this.callback=null,"function"==typeof e&&e.call(this)}cancel(){this.started=!1,this.callback=null}}const t=function(e,t=100){let r;const n=function(){clearTimeout(r),r=setTimeout((()=>{e.apply(this,arguments)}),t)};return n.cancel=()=>{clearTimeout(r)},n},r=function(t){const r=new e,n=function(){r.start((()=>{t.apply(this,arguments)}))};return n.cancel=()=>{r.cancel()},n};var a=n(925),i=n.n(a);function s(e){return""+e}function c(e){var t=s(e).split(".");return t.length>1?t[1].length:0}function u(e){var t=s(e);return parseInt(t.replace(".",""))}function l(e,t){var r=c(e),n=c(t);if(r+n===0)return e+t;var o=Math.pow(10,Math.max(r,n));return(Math.round(e*o)+Math.round(t*o))/o}function f(e,t){var r=c(e),n=c(t);return r+n===0?e*t:u(e)*u(t)/Math.pow(10,r+n)}function d(e,t){var r=Math.floor(Math.log(e)/Math.log(10)),n=e/Math.pow(10,r);return(t?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,r)}var w=function(e){return"number"!=typeof e&&(e=parseFloat(e)),isNaN(e)&&(e=0),e};function p(e,t,r){if(e=w(e),t=w(t),(r=w(r))||(r=4),e===t)t=e+1;else if(e>t){var n=e;e=t,t=n}for(var o=d(t-e,!1),a=d(o/(r-1),!0),i=f(Math.floor(e/a),a),s=f(Math.ceil(t/a),a),c=[],u=i;u<=s;)c.push(u),u=l(u,a);return c}var h=n(162);const m={get:function(e){let t={};const r=location.hash.slice(1);if(r){const e=new URLSearchParams(r);t=Object.fromEntries(e)}return e?t[e]:t},set:function(e,t){if(!e)return;let r=e;2===arguments.length&&(r={},r[e]=t);const n=m.get();Object.keys(r).forEach((e=>{n[e]=r[e]}));const o=new URLSearchParams(n);location.hash=o.toString()},remove:function(e){if(!e)return void(location.hash="");let t=e;Array.isArray(e)||(t=[e]);const r=m.get();t.forEach((e=>{delete r[e]}));const n=new URLSearchParams(r);location.hash=n.toString()}},g=m,v=e=>`mcr-${e}`,b={get(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=window.localStorage.getItem(v(e));return null===r?t:r},set(e,t){window.localStorage.setItem(v(e),t)},remove(e){window.localStorage.removeItem(v(e))}},M=e=>{const t=e.keys(),r={};return t.forEach((t=>{const n=t.toLowerCase().split("/").pop().slice(0,-4),o=e(t),a=o.slice(o.indexOf(",")+1),i=atob(a);r[n]=i})),r};var y=n(46),x=n(209),T=n.n(x);const k={...y.Util,...T(),isTouchDevice:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},A=()=>{const e=document.querySelector('link[rel="icon"]');e&&(e.href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNjAwIDE2MDAiPg0KICAgIDxwYXRoIGZpbGw9ImNob2NvbGF0ZSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAwLDBMMjU3LDMwMmwxOTIsOThINjAwbDUwLTQ5LDE1MC01MCwxNTAsNTAsNTAsNDloMTQ5bDE5NS05OEwxMzAwLDBsMzAwLDQwMEwxMzAwLDYwMWwyMDEsOTlMMTI0OCw4MDBsMiwxMDEtMTUwLDMwMCw1MCwxOTktMTUwLDIwMEg2MDBMNDUwLDE0MDBsNTEtMTk5TDM1MCw5MDFWODAwTDEwMSw3MDBsMjAwLTk5TDAsNDAwWk01MDAsNTUwSDYwMEw4MDAsNjUwbDIwMC0xMDBoMTAwVjg1MEgxMDAwVjY1MEw4MDAsNzUwLDYwMCw2NTBWODUwSDUwMFY1NTBaIi8+DQo8L3N2Zz4=")}})(),o})()));