monocart-reporter 2.4.6 → 2.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
* [Style Tags](#style-tags)
|
|
35
35
|
* [Metadata](#metadata)
|
|
36
36
|
* [Trend Chart](#trend-chart)
|
|
37
|
-
* [Attach Lighthouse Audit Report](#attach-lighthouse-audit-report)
|
|
38
37
|
* [Code Coverage Report](#code-coverage-report)
|
|
39
38
|
- [Global Coverage Report](#global-coverage-report)
|
|
40
39
|
- [Coverage Options](#coverage-options)
|
|
41
40
|
- [Coverage Examples](#coverage-examples)
|
|
41
|
+
* [Attach Lighthouse Audit Report](#attach-lighthouse-audit-report)
|
|
42
42
|
* [Attach Network Report](#attach-network-report)
|
|
43
43
|
* [Global State Management](#global-state-management)
|
|
44
44
|
- [Setup Global State](#setup-global-state)
|
|
@@ -46,15 +46,7 @@
|
|
|
46
46
|
- [Send and Receive Messages between Processes](#send-and-receive-messages-between-processes)
|
|
47
47
|
* [Merge Shard Reports](#merge-shard-reports)
|
|
48
48
|
* [onEnd Hook](#onend-hook)
|
|
49
|
-
|
|
50
|
-
- [Testrail Integration](#testrail-integration)
|
|
51
|
-
- [Jira + Zephyr Scale Integration](#jira--zephyr-scale-integration)
|
|
52
|
-
- [Jira + Xray Integration](#jira--xray-integration)
|
|
53
|
-
- [Slack Integration](#slack-integration)
|
|
54
|
-
- [Discord Integration](#discord-integration)
|
|
55
|
-
- [Teams Integration](#teams-integration)
|
|
56
|
-
- [BrowserStack Integration](#browserstack-integration)
|
|
57
|
-
- [Dingtalk/Weixin/Feishu Integration](#dingtalkweixinfeishu-integration)
|
|
49
|
+
* [Integration](#integration)
|
|
58
50
|
* [Contributing](#contributing)
|
|
59
51
|
* [Changelog](CHANGELOG.md)
|
|
60
52
|
## Preview
|
|
@@ -87,7 +79,8 @@ Playwright Docs [https://playwright.dev/docs/test-reporters](https://playwright.
|
|
|
87
79
|
|
|
88
80
|
## Examples
|
|
89
81
|
- [tests](/tests/)
|
|
90
|
-
-
|
|
82
|
+
- [monocart-reporter-examples](https://github.com/cenfun/monocart-reporter-examples)
|
|
83
|
+
- [playwright-reporter-integrations](https://github.com/cenfun/playwright-reporter-integrations)
|
|
91
84
|
|
|
92
85
|
## Output
|
|
93
86
|
- path-to/your-filename.html
|
|
@@ -443,6 +436,7 @@ test('case description', () => {
|
|
|
443
436
|
|
|
444
437
|
});
|
|
445
438
|
````
|
|
439
|
+
see [Mermaid doc](https://mermaid.js.org/syntax/flowchart.html)
|
|
446
440
|
|
|
447
441
|
|
|
448
442
|
### Custom Data Visitor
|
|
@@ -540,11 +534,17 @@ module.exports = {
|
|
|
540
534
|
see example: [remove-secrets](https://github.com/cenfun/monocart-reporter-examples/tree/main/tests/remove-secrets)
|
|
541
535
|
|
|
542
536
|
## Style Tags
|
|
537
|
+
|
|
543
538
|
* Add tag to test/describe title ( starts with `@` )
|
|
544
539
|
```js
|
|
545
540
|
test('test title @smoke @critical', () => { });
|
|
546
541
|
test.describe('describe title @smoke @critical', () => { });
|
|
542
|
+
|
|
543
|
+
// new syntax for tag in playwright v1.42.0
|
|
544
|
+
test('test title', { tag: ['@smoke', '@critical'] }, () => { });
|
|
545
|
+
test.describe('describe title', { tag: ['@smoke', '@critical'] }, () => { });
|
|
547
546
|
```
|
|
547
|
+
|
|
548
548
|
* Custom tag style
|
|
549
549
|
```js
|
|
550
550
|
// playwright.config.js
|
|
@@ -569,6 +569,38 @@ module.exports = {
|
|
|
569
569
|
};
|
|
570
570
|
```
|
|
571
571
|
|
|
572
|
+
* Put style tags in new column
|
|
573
|
+
```js
|
|
574
|
+
module.exports = {
|
|
575
|
+
reporter: [
|
|
576
|
+
['list'],
|
|
577
|
+
['monocart-reporter', {
|
|
578
|
+
name: "My Test Report",
|
|
579
|
+
outputFile: './test-results/report.html',
|
|
580
|
+
tags: {
|
|
581
|
+
// ...
|
|
582
|
+
},
|
|
583
|
+
columns: (defaultColumns) => {
|
|
584
|
+
|
|
585
|
+
// disable title tags
|
|
586
|
+
defaultColumns.find((column) => column.id === 'title').titleTagsDisabled = true;
|
|
587
|
+
|
|
588
|
+
// add tags column
|
|
589
|
+
const index = defaultColumns.findIndex((column) => column.id === 'type');
|
|
590
|
+
defaultColumns.splice(index, 0, {
|
|
591
|
+
id: 'tags',
|
|
592
|
+
name: 'Tags',
|
|
593
|
+
width: 150,
|
|
594
|
+
formatter: 'tags'
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
}]
|
|
598
|
+
]
|
|
599
|
+
};
|
|
600
|
+
```
|
|
601
|
+
see [example](https://github.com/cenfun/monocart-reporter-examples/tree/main/tests/tags-column)
|
|
602
|
+
|
|
603
|
+
|
|
572
604
|
## Metadata
|
|
573
605
|
> All metadata will be listed in the report in a key/value format.
|
|
574
606
|
- Global level `metadata`
|
|
@@ -689,33 +721,6 @@ module.exports = {
|
|
|
689
721
|
};
|
|
690
722
|
```
|
|
691
723
|
|
|
692
|
-
## Attach Lighthouse Audit Report
|
|
693
|
-
Attach an audit report with API `attachAuditReport(runnerResult, testInfo)`. Arguments:
|
|
694
|
-
- `runnerResult` lighthouse result. see [lighthouse](https://github.com/GoogleChrome/lighthouse/tree/main/docs)
|
|
695
|
-
- `testInfo` see [TestInfo](https://playwright.dev/docs/api/class-testinfo)
|
|
696
|
-
```js
|
|
697
|
-
const { test, chromium } = require('@playwright/test');
|
|
698
|
-
const { attachAuditReport } = require('monocart-reporter');
|
|
699
|
-
const lighthouse = require('lighthouse/core/index.cjs');
|
|
700
|
-
test('attach lighthouse audit report', async () => {
|
|
701
|
-
const port = 9222;
|
|
702
|
-
const browser = await chromium.launch({
|
|
703
|
-
args: [`--remote-debugging-port=${port}`]
|
|
704
|
-
});
|
|
705
|
-
const options = {
|
|
706
|
-
// logLevel: 'info',
|
|
707
|
-
// onlyCategories: ['performance', 'best-practices', 'seo'],
|
|
708
|
-
output: 'html',
|
|
709
|
-
port
|
|
710
|
-
};
|
|
711
|
-
const url = 'https://github.com/cenfun/monocart-reporter';
|
|
712
|
-
const runnerResult = await lighthouse(url, options);
|
|
713
|
-
await browser.close();
|
|
714
|
-
await attachAuditReport(runnerResult, test.info());
|
|
715
|
-
});
|
|
716
|
-
|
|
717
|
-
```
|
|
718
|
-
|
|
719
724
|
## Code Coverage Report
|
|
720
725
|
The reporter integrates [monocart-coverage-reports](https://github.com/cenfun/monocart-coverage-reports) for coverage reports, there are two APIs:
|
|
721
726
|
- `addCoverageReport(data, testInfo)` Add coverage to global coverage report from a test. see [Global Coverage Report](#global-coverage-report)
|
|
@@ -825,14 +830,14 @@ export default async (config) => {
|
|
|
825
830
|
}
|
|
826
831
|
}
|
|
827
832
|
```
|
|
828
|
-
see [
|
|
833
|
+
see [Collecting V8 Coverage Data from Node.js](https://github.com/cenfun/monocart-coverage-reports?#collecting-v8-coverage-data-from-nodejs)
|
|
829
834
|
|
|
830
835
|
### Coverage Options
|
|
831
|
-
- Default [options](https://github.com/cenfun/monocart-coverage-reports
|
|
836
|
+
- Default [options](https://github.com/cenfun/monocart-coverage-reports?#options)
|
|
832
837
|
- [Available Reports](https://github.com/cenfun/monocart-coverage-reports?#available-reports)
|
|
833
838
|
- [Using entryFilter and sourceFilter to filter the results for V8 report](https://github.com/cenfun/monocart-coverage-reports?#using-entryfilter-and-sourcefilter-to-filter-the-results-for-v8-report)
|
|
834
839
|
- Checking thresholds with [onEnd Hook](https://github.com/cenfun/monocart-coverage-reports?#onend-hook)
|
|
835
|
-
- More
|
|
840
|
+
- More details see [monocart-coverage-reports](https://github.com/cenfun/monocart-coverage-reports)
|
|
836
841
|
|
|
837
842
|
### Coverage Examples
|
|
838
843
|
- For Playwright component testing:
|
|
@@ -842,6 +847,33 @@ see [Node.js V8 Coverage Report for Server Side](https://github.com/cenfun/monoc
|
|
|
842
847
|
- [nextjs-with-playwright](https://github.com/cenfun/nextjs-with-playwright)
|
|
843
848
|
- [code-coverage-with-monocart-reporter](https://github.com/edumserrano/playwright-adventures/blob/main/demos/code-coverage-with-monocart-reporter/)
|
|
844
849
|
|
|
850
|
+
## Attach Lighthouse Audit Report
|
|
851
|
+
Attach an audit report with API `attachAuditReport(runnerResult, testInfo)`. Arguments:
|
|
852
|
+
- `runnerResult` lighthouse result. see [lighthouse](https://github.com/GoogleChrome/lighthouse/tree/main/docs)
|
|
853
|
+
- `testInfo` see [TestInfo](https://playwright.dev/docs/api/class-testinfo)
|
|
854
|
+
```js
|
|
855
|
+
const { test, chromium } = require('@playwright/test');
|
|
856
|
+
const { attachAuditReport } = require('monocart-reporter');
|
|
857
|
+
const lighthouse = require('lighthouse/core/index.cjs');
|
|
858
|
+
test('attach lighthouse audit report', async () => {
|
|
859
|
+
const port = 9222;
|
|
860
|
+
const browser = await chromium.launch({
|
|
861
|
+
args: [`--remote-debugging-port=${port}`]
|
|
862
|
+
});
|
|
863
|
+
const options = {
|
|
864
|
+
// logLevel: 'info',
|
|
865
|
+
// onlyCategories: ['performance', 'best-practices', 'seo'],
|
|
866
|
+
output: 'html',
|
|
867
|
+
port
|
|
868
|
+
};
|
|
869
|
+
const url = 'https://github.com/cenfun/monocart-reporter';
|
|
870
|
+
const runnerResult = await lighthouse(url, options);
|
|
871
|
+
await browser.close();
|
|
872
|
+
await attachAuditReport(runnerResult, test.info());
|
|
873
|
+
});
|
|
874
|
+
|
|
875
|
+
```
|
|
876
|
+
|
|
845
877
|
## Attach Network Report
|
|
846
878
|
Attach a network report with API `attachNetworkReport(har, testInfo)`. Arguments:
|
|
847
879
|
- `har` HAR path (String) or HAR file buffer (Buffer). see [HAR 1.2 Spec](http://www.softwareishard.com/blog/har-12-spec/)
|
|
@@ -1103,45 +1135,20 @@ module.exports = {
|
|
|
1103
1135
|
};
|
|
1104
1136
|
```
|
|
1105
1137
|
|
|
1106
|
-
##
|
|
1107
|
-
|
|
1108
|
-
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
-
|
|
1112
|
-
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
-
|
|
1116
|
-
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
- Update Jira issue status with [Jira Transition API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-post)
|
|
1121
|
-
- Example: [xray](https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/xray)
|
|
1122
|
-
|
|
1123
|
-
## Slack Integration
|
|
1124
|
-
- Simply send message with [@slack/webhook](https://github.com/slackapi/node-slack-sdk)
|
|
1125
|
-
- Example: [slack-webhook](https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/slack-webhook)
|
|
1126
|
-
- Post chat message and upload image with [@slack/web-api](https://github.com/slackapi/node-slack-sdk)
|
|
1127
|
-
- Example: [slack-web-api](https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/slack-web-api)
|
|
1128
|
-
|
|
1129
|
-
## Discord Integration
|
|
1130
|
-
- Using [Discord webhooks](https://discord.com/developers/docs/resources/webhook) to post messages to channels.
|
|
1131
|
-
- Example: [discord-webhook](https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/discord-webhook)
|
|
1132
|
-
|
|
1133
|
-
## Teams Integration
|
|
1134
|
-
- Please create an [Incoming Webhooks](https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook) for the channel first.
|
|
1135
|
-
- Example: [teams-webhook](https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/teams-webhook)
|
|
1136
|
-
|
|
1137
|
-
## BrowserStack Integration
|
|
1138
|
-
- Example: [browserstack](https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/browserstack)
|
|
1139
|
-
|
|
1140
|
-
## Dingtalk/Weixin/Feishu Integration
|
|
1141
|
-
- [dingtalk-webhook](https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/dingtalk-webhook)
|
|
1142
|
-
- [weixin-webhook](https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/weixin-webhook)
|
|
1143
|
-
- [feishu-webhook](https://github.com/cenfun/monocart-reporter-examples/tree/main/integrations/feishu-webhook)
|
|
1144
|
-
|
|
1138
|
+
## Integration
|
|
1139
|
+
By using the `onEnd` hook, we can integrate Playwright report with any other tools, such as:
|
|
1140
|
+
- Email
|
|
1141
|
+
- Testrail
|
|
1142
|
+
- Qase
|
|
1143
|
+
- Jira + Zephyr
|
|
1144
|
+
- Jira + Xray
|
|
1145
|
+
- Slack
|
|
1146
|
+
- Discord
|
|
1147
|
+
- Teams
|
|
1148
|
+
- BrowserStack
|
|
1149
|
+
- Dingtalk/Weixin/Feishu
|
|
1150
|
+
|
|
1151
|
+
See [Integration Examples](https://github.com/cenfun/playwright-reporter-integrations)
|
|
1145
1152
|
|
|
1146
1153
|
## Contributing
|
|
1147
1154
|
```sh
|
|
@@ -1155,7 +1162,8 @@ npm run test
|
|
|
1155
1162
|
npm run dev
|
|
1156
1163
|
```
|
|
1157
1164
|
## Dependencies
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1165
|
+
- UI Framework [Vue 3](https://github.com/vuejs/core)
|
|
1166
|
+
- Lightweight UI Components [vine-ui](https://github.com/cenfun/vine-ui)
|
|
1167
|
+
- High Performance Grid [turbogrid](https://github.com/cenfun/turbogrid)
|
|
1168
|
+
- String compress/decompress [lz-utils](https://github.com/cenfun/lz-utils)
|
|
1169
|
+
- Coverage Reporters [monocart-coverage-reports](https://github.com/cenfun/monocart-coverage-reports)
|
|
@@ -1 +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={213: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)},187: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(320);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[168+r]=280+r;for(r=0;r<112;++r)e.trans[176+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()}}))},858:e=>{const t={tagPattern:/(\s*)@([^@\s]+)(\s*)/g,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},448: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(187),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(213);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(448),x=n(858),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})()));
|
|
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={213: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)},187: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(320);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[168+r]=280+r;for(r=0;r<112;++r)e.trans[176+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()}}))},858:e=>{const t={tagPattern:/(\s*)@([^@\s]+)(\s*)/g,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=>!!e.tags||("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},448: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(187),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(213);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(448),x=n(858),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})()));
|