@govtechsg/oobee 0.10.76 → 0.10.77

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 (134) hide show
  1. package/.github/workflows/publish.yml +8 -1
  2. package/INTEGRATION.md +7 -3
  3. package/dist/cli.js +252 -0
  4. package/dist/combine.js +221 -0
  5. package/dist/constants/cliFunctions.js +306 -0
  6. package/dist/constants/common.js +1669 -0
  7. package/dist/constants/constants.js +913 -0
  8. package/dist/constants/errorMeta.json +319 -0
  9. package/dist/constants/itemTypeDescription.js +7 -0
  10. package/dist/constants/oobeeAi.js +121 -0
  11. package/dist/constants/questions.js +151 -0
  12. package/dist/constants/sampleData.js +176 -0
  13. package/dist/crawlers/commonCrawlerFunc.js +428 -0
  14. package/dist/crawlers/crawlDomain.js +613 -0
  15. package/dist/crawlers/crawlIntelligentSitemap.js +135 -0
  16. package/dist/crawlers/crawlLocalFile.js +151 -0
  17. package/dist/crawlers/crawlSitemap.js +303 -0
  18. package/dist/crawlers/custom/escapeCssSelector.js +10 -0
  19. package/dist/crawlers/custom/evaluateAltText.js +11 -0
  20. package/dist/crawlers/custom/extractAndGradeText.js +44 -0
  21. package/dist/crawlers/custom/extractText.js +27 -0
  22. package/dist/crawlers/custom/findElementByCssSelector.js +36 -0
  23. package/dist/crawlers/custom/flagUnlabelledClickableElements.js +963 -0
  24. package/dist/crawlers/custom/framesCheck.js +37 -0
  25. package/dist/crawlers/custom/getAxeConfiguration.js +111 -0
  26. package/dist/crawlers/custom/gradeReadability.js +23 -0
  27. package/dist/crawlers/custom/utils.js +1024 -0
  28. package/dist/crawlers/custom/xPathToCss.js +147 -0
  29. package/dist/crawlers/guards/urlGuard.js +71 -0
  30. package/dist/crawlers/pdfScanFunc.js +276 -0
  31. package/dist/crawlers/runCustom.js +89 -0
  32. package/dist/exclusions.txt +7 -0
  33. package/dist/generateHtmlReport.js +144 -0
  34. package/dist/index.js +62 -0
  35. package/dist/logs.js +84 -0
  36. package/dist/mergeAxeResults.js +1571 -0
  37. package/dist/npmIndex.js +429 -0
  38. package/dist/proxyService.js +360 -0
  39. package/dist/runGenerateJustHtmlReport.js +16 -0
  40. package/dist/screenshotFunc/htmlScreenshotFunc.js +355 -0
  41. package/dist/screenshotFunc/pdfScreenshotFunc.js +645 -0
  42. package/dist/services/s3Uploader.js +127 -0
  43. package/dist/static/ejs/partials/components/allIssues/AllIssues.ejs +9 -0
  44. package/dist/static/ejs/partials/components/allIssues/CategoryBadges.ejs +82 -0
  45. package/dist/static/ejs/partials/components/allIssues/FilterBar.ejs +33 -0
  46. package/dist/static/ejs/partials/components/allIssues/IssuesTable.ejs +41 -0
  47. package/dist/static/ejs/partials/components/header/SiteInfo.ejs +119 -0
  48. package/dist/static/ejs/partials/components/header/aboutScanModal/AboutScanModal.ejs +15 -0
  49. package/dist/static/ejs/partials/components/header/aboutScanModal/ScanConfiguration.ejs +44 -0
  50. package/dist/static/ejs/partials/components/header/aboutScanModal/ScanDetails.ejs +142 -0
  51. package/dist/static/ejs/partials/components/prioritiseIssues/IssueDetailCard.ejs +36 -0
  52. package/dist/static/ejs/partials/components/prioritiseIssues/PrioritiseIssues.ejs +47 -0
  53. package/dist/static/ejs/partials/components/ruleModal/ruleOffcanvas.ejs +196 -0
  54. package/dist/static/ejs/partials/components/scannedPagesSegmentedTabs.ejs +48 -0
  55. package/dist/static/ejs/partials/components/screenshotLightbox.ejs +13 -0
  56. package/dist/static/ejs/partials/components/shared/InfoAlert.ejs +3 -0
  57. package/dist/static/ejs/partials/components/summaryScanAbout.ejs +141 -0
  58. package/dist/static/ejs/partials/components/summaryScanResults.ejs +16 -0
  59. package/dist/static/ejs/partials/components/summaryTable.ejs +20 -0
  60. package/dist/static/ejs/partials/components/summaryWcagCompliance.ejs +94 -0
  61. package/dist/static/ejs/partials/components/topTen.ejs +6 -0
  62. package/dist/static/ejs/partials/components/wcagCompliance/FailedCriteria.ejs +47 -0
  63. package/dist/static/ejs/partials/components/wcagCompliance/WcagCompliance.ejs +16 -0
  64. package/dist/static/ejs/partials/components/wcagCompliance/WcagGaugeBar.ejs +16 -0
  65. package/dist/static/ejs/partials/components/wcagCoverageDetails.ejs +18 -0
  66. package/dist/static/ejs/partials/footer.ejs +24 -0
  67. package/dist/static/ejs/partials/header.ejs +14 -0
  68. package/dist/static/ejs/partials/main.ejs +29 -0
  69. package/dist/static/ejs/partials/scripts/allIssues/AllIssues.ejs +376 -0
  70. package/dist/static/ejs/partials/scripts/bootstrap.ejs +8 -0
  71. package/dist/static/ejs/partials/scripts/categorySummary.ejs +141 -0
  72. package/dist/static/ejs/partials/scripts/decodeUnzipParse.ejs +3 -0
  73. package/dist/static/ejs/partials/scripts/header/SiteInfo.ejs +44 -0
  74. package/dist/static/ejs/partials/scripts/header/aboutScanModal/AboutScanModal.ejs +51 -0
  75. package/dist/static/ejs/partials/scripts/header/aboutScanModal/ScanConfiguration.ejs +127 -0
  76. package/dist/static/ejs/partials/scripts/header/aboutScanModal/ScanDetails.ejs +60 -0
  77. package/dist/static/ejs/partials/scripts/highlightjs.ejs +335 -0
  78. package/dist/static/ejs/partials/scripts/popper.ejs +7 -0
  79. package/dist/static/ejs/partials/scripts/prioritiseIssues/IssueDetailCard.ejs +137 -0
  80. package/dist/static/ejs/partials/scripts/prioritiseIssues/PrioritiseIssues.ejs +214 -0
  81. package/dist/static/ejs/partials/scripts/prioritiseIssues/wcagSvgMap.ejs +861 -0
  82. package/dist/static/ejs/partials/scripts/ruleModal/constants.ejs +957 -0
  83. package/dist/static/ejs/partials/scripts/ruleModal/itemCardRenderer.ejs +353 -0
  84. package/dist/static/ejs/partials/scripts/ruleModal/pageAccordionBuilder.ejs +468 -0
  85. package/dist/static/ejs/partials/scripts/ruleModal/ruleOffcanvas.ejs +306 -0
  86. package/dist/static/ejs/partials/scripts/ruleModal/utilities.ejs +483 -0
  87. package/dist/static/ejs/partials/scripts/scannedPagesSegmentedTabs.ejs +35 -0
  88. package/dist/static/ejs/partials/scripts/screenshotLightbox.ejs +75 -0
  89. package/dist/static/ejs/partials/scripts/summaryScanResults.ejs +14 -0
  90. package/dist/static/ejs/partials/scripts/summaryTable.ejs +78 -0
  91. package/dist/static/ejs/partials/scripts/topTen.ejs +61 -0
  92. package/dist/static/ejs/partials/scripts/utils.ejs +453 -0
  93. package/dist/static/ejs/partials/scripts/wcagCompliance/FailedCriteria.ejs +103 -0
  94. package/dist/static/ejs/partials/scripts/wcagCompliance/WcagGaugeBar.ejs +47 -0
  95. package/dist/static/ejs/partials/scripts/wcagCompliance.ejs +15 -0
  96. package/dist/static/ejs/partials/scripts/wcagCoverageDetails.ejs +75 -0
  97. package/dist/static/ejs/partials/styles/allIssues/AllIssues.ejs +384 -0
  98. package/dist/static/ejs/partials/styles/bootstrap.ejs +12391 -0
  99. package/dist/static/ejs/partials/styles/header/SiteInfo.ejs +121 -0
  100. package/dist/static/ejs/partials/styles/header/aboutScanModal/AboutScanModal.ejs +82 -0
  101. package/dist/static/ejs/partials/styles/header/aboutScanModal/ScanConfiguration.ejs +50 -0
  102. package/dist/static/ejs/partials/styles/header/aboutScanModal/ScanDetails.ejs +149 -0
  103. package/dist/static/ejs/partials/styles/header.ejs +7 -0
  104. package/dist/static/ejs/partials/styles/highlightjs.ejs +54 -0
  105. package/dist/static/ejs/partials/styles/prioritiseIssues/IssueDetailCard.ejs +141 -0
  106. package/dist/static/ejs/partials/styles/prioritiseIssues/PrioritiseIssues.ejs +204 -0
  107. package/dist/static/ejs/partials/styles/ruleModal/ruleOffcanvas.ejs +456 -0
  108. package/dist/static/ejs/partials/styles/scannedPagesSegmentedTabs.ejs +46 -0
  109. package/dist/static/ejs/partials/styles/shared/InfoAlert.ejs +12 -0
  110. package/dist/static/ejs/partials/styles/styles.ejs +1607 -0
  111. package/dist/static/ejs/partials/styles/summaryBootstrap.ejs +12458 -0
  112. package/dist/static/ejs/partials/styles/topTenCard.ejs +44 -0
  113. package/dist/static/ejs/partials/styles/wcagCompliance/FailedCriteria.ejs +59 -0
  114. package/dist/static/ejs/partials/styles/wcagCompliance/WcagGaugeBar.ejs +62 -0
  115. package/dist/static/ejs/partials/styles/wcagCompliance.ejs +36 -0
  116. package/dist/static/ejs/partials/styles/wcagCoverageDetails.ejs +33 -0
  117. package/dist/static/ejs/partials/summaryHeader.ejs +70 -0
  118. package/dist/static/ejs/partials/summaryMain.ejs +49 -0
  119. package/dist/static/ejs/report.ejs +226 -0
  120. package/dist/static/ejs/summary.ejs +47 -0
  121. package/dist/types/types.js +1 -0
  122. package/dist/utils.js +1070 -0
  123. package/examples/oobee-cypress-integration-js/cypress/support/e2e.js +36 -6
  124. package/examples/oobee-cypress-integration-js/cypress.config.js +45 -1
  125. package/examples/oobee-cypress-integration-ts/cypress.config.ts +47 -1
  126. package/examples/oobee-cypress-integration-ts/src/cypress/support/e2e.ts +36 -6
  127. package/examples/oobee-playwright-integration-js/oobee-playwright-demo.js +2 -1
  128. package/examples/oobee-playwright-integration-ts/src/oobee-playwright-demo.ts +2 -1
  129. package/package.json +9 -3
  130. package/src/constants/common.ts +2 -2
  131. package/src/constants/constants.ts +3 -1
  132. package/src/crawlers/crawlDomain.ts +1 -0
  133. package/src/crawlers/runCustom.ts +0 -1
  134. package/src/npmIndex.ts +42 -24
@@ -0,0 +1,44 @@
1
+ <script>
2
+ (function populateSiteInfo() {
3
+ const siteName = scanData.siteName || 'N/A';
4
+ document.getElementById('siteName').textContent = siteName;
5
+
6
+ const siteUrl = scanData.urlScanned || '#';
7
+ const siteUrlElement = document.getElementById('siteUrl');
8
+ const urlTextElement = siteUrlElement.querySelector('.url-text');
9
+ if (urlTextElement) {
10
+ const svgElement = urlTextElement.querySelector('svg');
11
+ const textNode = document.createTextNode(siteUrl);
12
+ urlTextElement.textContent = '';
13
+ urlTextElement.appendChild(textNode);
14
+ if (svgElement) {
15
+ urlTextElement.appendChild(svgElement);
16
+ }
17
+ }
18
+ siteUrlElement.href = siteUrl;
19
+
20
+ const formatScanDate = dateString => {
21
+ const utcDate = new Date(dateString);
22
+ const formattedDate = utcDate.toLocaleString('en-GB', {
23
+ year: 'numeric',
24
+ month: 'short',
25
+ day: 'numeric',
26
+ hour12: false,
27
+ hour: 'numeric',
28
+ minute: '2-digit',
29
+ timeZoneName: 'short',
30
+ });
31
+ return formattedDate;
32
+ };
33
+
34
+ if (scanData.startTime) {
35
+ const formattedScanDate = formatScanDate(scanData.startTime).replace(
36
+ /GMT([+-])(\d{1,2})/,
37
+ (_, sign, hour) => `(GMT ${sign}${hour.padStart(2, '0')})`,
38
+ );
39
+ document.getElementById('siteScannedOn').textContent = `Scanned on ${formattedScanDate}`;
40
+ } else {
41
+ document.getElementById('siteScannedOn').textContent = 'Scan date: N/A';
42
+ }
43
+ })();
44
+ </script>
@@ -0,0 +1,51 @@
1
+ <script>
2
+ (function () {
3
+ const btns = Array.from(document.querySelectorAll('.js-view-btn'));
4
+ const panes = Array.from(document.querySelectorAll('[data-viewpane]'));
5
+
6
+ function showPane(targetId) {
7
+ // hide all panes
8
+ panes.forEach(p => p.hidden = true);
9
+ // deselect all buttons
10
+ btns.forEach(b => b.setAttribute('aria-selected', 'false'));
11
+
12
+ // show the requested pane
13
+ const pane = document.getElementById(targetId);
14
+ if (pane) {
15
+ pane.hidden = false;
16
+
17
+ // mark the controlling button active
18
+ const btn = btns.find(b => b.getAttribute('aria-controls') === targetId);
19
+ if (btn) btn.setAttribute('aria-selected', 'true');
20
+
21
+ // move focus to the pane heading for screen readers/keyboard users
22
+ const h = pane.querySelector('h4, h3, h2, [role="heading"]');
23
+ if (h) h.setAttribute('tabindex', '-1'), h.focus();
24
+ }
25
+ }
26
+
27
+ btns.forEach(b => {
28
+ b.addEventListener('click', () => showPane(b.getAttribute('aria-controls')));
29
+ // make Enter/Space work if someone adds role="tab" later
30
+ b.addEventListener('keydown', (e) => {
31
+ if (e.key === ' ' || e.key === 'Enter') { e.preventDefault(); b.click(); }
32
+ });
33
+ });
34
+
35
+ // initial state: ensure only crawl is visible (or switch here if you prefer WCAG)
36
+ showPane('view-crawl');
37
+ })();
38
+
39
+ const pagesWord = scanData.totalPagesScanned === 1 ? 'page' : 'pages';
40
+ const rawLabel = (scanData.customFlowLabel ?? '').trim();
41
+ const displayLabel = !rawLabel || rawLabel.toLowerCase() === 'none'
42
+ ? 'Custom Flow'
43
+ : rawLabel;
44
+
45
+ const title = scanData.isCustomFlow
46
+ ? `${displayLabel} (${scanData.totalPagesScanned} ${pagesWord})`
47
+ : `${scanData.scanType} crawl (${scanData.totalPagesScanned} ${pagesWord})`;
48
+
49
+ document.getElementById('pagesScannedModalLabel').innerHTML = title;
50
+ document.getElementById('pagesScannedModalToggleTxt').innerHTML = title;
51
+ </script>
@@ -0,0 +1,127 @@
1
+ <script>
2
+ const isCustomFlow = scanData.isCustomFlow;
3
+ const pagesScanned = scanData.pagesScanned;
4
+ const totalPagesNotScanned = scanData.totalPagesNotScanned;
5
+ const pagesNotScanned = scanData.pagesNotScanned;
6
+ const pagesScannedList = document.getElementById('pagesScannedList');
7
+ const pagesNotScannedList = document.getElementById('pagesNotScannedList');
8
+
9
+ pagesScanned.forEach((page, index) => {
10
+ const listItem = document.createElement('li');
11
+
12
+ if (isCustomFlow) {
13
+ listItem.innerHTML = `
14
+ <div class="custom-flow-screenshot-container">
15
+ <div class="custom-flow-thumb">
16
+ <img
17
+ src="${page.pageImagePath}"
18
+ alt="Screenshot of ${page.url}"
19
+ class="custom-flow-screenshot"
20
+ onerror="this.onerror = null; this.remove();"
21
+ >
22
+ </div>
23
+ <div class="display-url-container">
24
+ <a href="${page.url}" target="_blank">${page.pageTitle.length > 0 ? page.pageTitle : page.url}</a>
25
+ <p>${page.url}</p>
26
+ </div>
27
+ </div>
28
+ `;
29
+ } else {
30
+ listItem.innerHTML = `
31
+ <a href="${page.url}" target="_blank">
32
+ ${page.pageTitle.length > 0 ? page.pageTitle : page.url}
33
+ <svg class="link-external-icon" width="16" height="12" viewBox="0 0 8 8" aria-hidden="true" focusable="false">
34
+ <path d="M7.11111 7.11111H0.888889V0.888889H4V0H0.888889C0.395556 0 0 0.4 0 0.888889V7.11111C0 7.6 0.395556 8 0.888889 8H7.11111C7.6 8 8 7.6 8 7.11111V4H7.11111V7.11111ZM4.88889 0V0.888889H6.48444L2.11556 5.25778L2.74222 5.88444L7.11111 1.51556V3.11111H8V0H4.88889Z" fill="#5735DF"/>
35
+ </svg>
36
+ </a>
37
+ <p>${page.url}</p>
38
+ `;
39
+ }
40
+
41
+ pagesScannedList.appendChild(listItem);
42
+ });
43
+
44
+ const isUnsupportedDoc = (item) => {
45
+ if (!item || typeof item !== 'object') return false;
46
+
47
+ const code = Number(item.httpStatusCode);
48
+ if (!Number.isNaN(code)) {
49
+ if (code === 1) return true;
50
+ if (code !== 0) return false;
51
+ }
52
+
53
+ const meta = String(item.metadata || '');
54
+ return /not\s*a\s*supported\s*document/i.test(meta);
55
+ };
56
+
57
+ const unsupportedDocs = pagesNotScanned.filter((it) => isUnsupportedDoc(it));
58
+ const notScannedOnly = pagesNotScanned.filter((it) => !isUnsupportedDoc(it));
59
+
60
+ document.getElementById('totalPagesScannedLabel').innerHTML = scanData.totalPagesScanned;
61
+ document.getElementById('totalPagesNotScannedLabel').innerHTML =
62
+ notScannedOnly.length;
63
+
64
+ notScannedOnly.forEach((page, index) => {
65
+ var listItem = document.createElement('li');
66
+ const url = page.url || page;
67
+ const metadata = page.metadata || page;
68
+
69
+ const linkHTML = `<a class="not-scanned-url" href="${url}" target="_blank">
70
+ ${url}
71
+ <svg class="link-external-icon" width="16" height="12" viewBox="0 0 8 8" aria-hidden="true" focusable="false">
72
+ <path d="M7.11111 7.11111H0.888889V0.888889H4V0H0.888889C0.395556 0 0 0.4 0 0.888889V7.11111C0 7.6 0.395556 8 0.888889 8H7.11111C7.6 8 8 7.6 8 7.11111V4H7.11111V7.11111ZM4.88889 0V0.888889H6.48444L2.11556 5.25778L2.74222 5.88444L7.11111 1.51556V3.11111H8V0H4.88889Z" fill="#5735DF"/>
73
+ </svg>
74
+ </a>`;
75
+ const metadataHTML = `
76
+ <div class="metadata-inline">
77
+ <span class="metadata-text">
78
+ ${metadata}
79
+ </span>
80
+ </div>`;
81
+
82
+ listItem.innerHTML = `${linkHTML}${metadataHTML}`;
83
+ pagesNotScannedList.appendChild(listItem);
84
+ });
85
+
86
+ const unsupportedList = document.getElementById('unsupportedDocsList');
87
+ if (unsupportedList) {
88
+ unsupportedList.innerHTML = '';
89
+ unsupportedDocs.forEach((page) => {
90
+ const li = document.createElement('li');
91
+ const url = page.url || page;
92
+ const title = page.pageTitle?.length ? page.pageTitle : url;
93
+ const metadata = page.metadata || 'Not A Supported Document';
94
+ li.innerHTML = `
95
+ <a href="${url}" target="_blank" rel="noopener">
96
+ ${title}
97
+ <svg class="link-external-icon" width="16" height="12" viewBox="0 0 8 8" aria-hidden="true" focusable="false">
98
+ <path d="M7.11111 7.11111H0.888889V0.888889H4V0H0.888889C0.395556 0 0 0.4 0 0.888889V7.11111C0 7.6 0.395556 8 0.888889 8H7.11111C7.6 8 8 7.6 8 7.11111V4H7.11111V7.11111ZM4.88889 0V0.888889H6.48444L2.11556 5.25778L2.74222 5.88444L7.11111 1.51556V3.11111H8V0H4.88889Z" fill="#5735DF"/>
99
+ </svg>
100
+ </a>
101
+
102
+ <div class="metadata-inline">
103
+ <span class="metadata-text">
104
+ ${metadata}
105
+ </span>
106
+ </div>
107
+ `;
108
+ unsupportedList.appendChild(li);
109
+ });
110
+ }
111
+
112
+ const notScannedCount = notScannedOnly.length;
113
+ const unsupportedCount = unsupportedDocs.length;
114
+
115
+ const notScannedLabel = document.getElementById('totalPagesNotScannedLabel');
116
+ if (notScannedLabel) notScannedLabel.textContent = String(notScannedCount);
117
+
118
+ const unsupportedLabel = document.getElementById('totalUnsupportedDocsLabel');
119
+ if (unsupportedLabel) unsupportedLabel.textContent = String(unsupportedCount);
120
+
121
+ const hideIfZero = (btnSel, count) => {
122
+ const btn = document.querySelector(btnSel);
123
+ if (btn) btn.style.display = count > 0 ? '' : 'none';
124
+ };
125
+ hideIfZero('#seg-not-scanned', notScannedCount);
126
+ hideIfZero('#seg-unsupported', unsupportedCount);
127
+ </script>
@@ -0,0 +1,60 @@
1
+ <script>
2
+ const formatAboutStartTime = dateString => {
3
+ const utcStartTimeDate = new Date(dateString);
4
+ const formattedStartTime = utcStartTimeDate.toLocaleTimeString('en-GB', {
5
+ year: 'numeric',
6
+ month: 'short',
7
+ day: 'numeric',
8
+ hour12: false,
9
+ hour: 'numeric',
10
+ minute: '2-digit',
11
+ timeZoneName: 'shortGeneric',
12
+ });
13
+
14
+ const timezoneAbbreviation = new Intl.DateTimeFormat('en', {
15
+ timeZoneName: 'shortOffset',
16
+ })
17
+ .formatToParts(utcStartTimeDate)
18
+ .find(part => part.type === 'timeZoneName').value;
19
+
20
+ //adding a breakline between the time and timezone so it looks neater on report
21
+ const timeColonIndex = formattedStartTime.lastIndexOf(':');
22
+ const timePart = formattedStartTime.slice(0, timeColonIndex + 3);
23
+ const timeZonePart = formattedStartTime.slice(timeColonIndex + 4);
24
+ const htmlFormattedStartTime = `${timePart}<br>${timeZonePart} ${timezoneAbbreviation}`;
25
+
26
+ return htmlFormattedStartTime;
27
+ };
28
+
29
+ const formattedViewerLocalStartTime = formatAboutStartTime(scanData.startTime);
30
+
31
+ document.getElementById('websiteTitle').innerHTML = scanData.siteName;
32
+
33
+ const urlA = document.getElementById('urlScanned');
34
+ const urlSpan = document.getElementById('urlScannedText');
35
+ urlSpan.textContent = scanData.urlScanned;
36
+ urlA.href = scanData.urlScanned;
37
+
38
+ document.getElementById('aboutStartTime').innerHTML = formattedViewerLocalStartTime;
39
+
40
+ document.getElementById('viewport-text').innerHTML = scanData.viewport.startsWith('CustomWidth')
41
+ ? `${scanData.viewport.split('_')[1]} Custom Width View`
42
+ : scanData.viewport + ' View';
43
+
44
+ const phAppVersionElement = document.getElementById('oobeeAppVersion');
45
+ const versionContent = 'Oobee Version ' + scanData.oobeeAppVersion;
46
+ phAppVersionElement.innerHTML = versionContent;
47
+
48
+ const cypressScanAboutMetadata = scanData.cypressScanAboutMetadata;
49
+ if (cypressScanAboutMetadata) {
50
+ const metadataItems = Object.keys(cypressScanAboutMetadata);
51
+ metadataItems.forEach(key => {
52
+ var metadataSpan = document.getElementById('cypressScanAboutMetadata');
53
+ if (metadataSpan) {
54
+ const metadataTitle = document.createElement('span');
55
+ metadataTitle.textContent =
56
+ key[0].toUpperCase() + key.slice(1) + ': ' + cypressScanAboutMetadata[key];
57
+ }
58
+ });
59
+ }
60
+ </script>
@@ -0,0 +1,335 @@
1
+ <script>
2
+ /*!
3
+ Highlight.js v11.7.0 (git: 82688fad18)
4
+ (c) 2006-2022 undefined and other contributors
5
+ License: BSD-3-Clause
6
+ */
7
+ var hljs=function(){"use strict";var e={exports:{}};function t(e){
8
+ return e instanceof Map?e.clear=e.delete=e.set=()=>{
9
+ throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=()=>{
10
+ throw Error("set is read-only")
11
+ }),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((n=>{var i=e[n]
12
+ ;"object"!=typeof i||Object.isFrozen(i)||t(i)})),e}
13
+ e.exports=t,e.exports.default=t;class n{constructor(e){
14
+ void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}
15
+ ignoreMatch(){this.isMatchIgnored=!0}}function i(e){
16
+ return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")
17
+ }function r(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t]
18
+ ;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}
19
+ const s=e=>!!e.scope||e.sublanguage&&e.language;class o{constructor(e,t){
20
+ this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){
21
+ this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=""
22
+ ;t=e.sublanguage?"language-"+e.language:((e,{prefix:t})=>{if(e.includes(".")){
23
+ const n=e.split(".")
24
+ ;return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")
25
+ }return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)}
26
+ closeNode(e){s(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){
27
+ this.buffer+=`<span class="${e}">`}}const a=(e={})=>{const t={children:[]}
28
+ ;return Object.assign(t,e),t};class c{constructor(){
29
+ this.rootNode=a(),this.stack=[this.rootNode]}get top(){
30
+ return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){
31
+ this.top.children.push(e)}openNode(e){const t=a({scope:e})
32
+ ;this.add(t),this.stack.push(t)}closeNode(){
33
+ if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){
34
+ for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}
35
+ walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){
36
+ return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),
37
+ t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){
38
+ "string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{
39
+ c._collapse(e)})))}}class l extends c{constructor(e){super(),this.options=e}
40
+ addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}
41
+ addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root
42
+ ;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){
43
+ return new o(this,this.options).value()}finalize(){return!0}}function g(e){
44
+ return e?"string"==typeof e?e:e.source:null}function d(e){return p("(?=",e,")")}
45
+ function u(e){return p("(?:",e,")*")}function h(e){return p("(?:",e,")?")}
46
+ function p(...e){return e.map((e=>g(e))).join("")}function f(...e){const t=(e=>{
47
+ const t=e[e.length-1]
48
+ ;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}
49
+ })(e);return"("+(t.capture?"":"?:")+e.map((e=>g(e))).join("|")+")"}
50
+ function b(e){return RegExp(e.toString()+"|").exec("").length-1}
51
+ const m=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./
52
+ ;function E(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n
53
+ ;let i=g(e),r="";for(;i.length>0;){const e=m.exec(i);if(!e){r+=i;break}
54
+ r+=i.substring(0,e.index),
55
+ i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+t):(r+=e[0],
56
+ "("===e[0]&&n++)}return r})).map((e=>`(${e})`)).join(t)}
57
+ const x="[a-zA-Z]\\w*",w="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",O="\\b(0b[01]+)",v={
58
+ begin:"\\\\[\\s\\S]",relevance:0},N={scope:"string",begin:"'",end:"'",
59
+ illegal:"\\n",contains:[v]},k={scope:"string",begin:'"',end:'"',illegal:"\\n",
60
+ contains:[v]},M=(e,t,n={})=>{const i=r({scope:"comment",begin:e,end:t,
61
+ contains:[]},n);i.contains.push({scope:"doctag",
62
+ begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
63
+ end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0})
64
+ ;const s=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/)
65
+ ;return i.contains.push({begin:p(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i
66
+ },S=M("//","$"),R=M("/\\*","\\*/"),j=M("#","$");var A=Object.freeze({
67
+ __proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:x,UNDERSCORE_IDENT_RE:w,
68
+ NUMBER_RE:y,C_NUMBER_RE:_,BINARY_NUMBER_RE:O,
69
+ RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",
70
+ SHEBANG:(e={})=>{const t=/^#![ ]*\//
71
+ ;return e.binary&&(e.begin=p(t,/.*\b/,e.binary,/\b.*/)),r({scope:"meta",begin:t,
72
+ end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},
73
+ BACKSLASH_ESCAPE:v,APOS_STRING_MODE:N,QUOTE_STRING_MODE:k,PHRASAL_WORDS_MODE:{
74
+ begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
75
+ },COMMENT:M,C_LINE_COMMENT_MODE:S,C_BLOCK_COMMENT_MODE:R,HASH_COMMENT_MODE:j,
76
+ NUMBER_MODE:{scope:"number",begin:y,relevance:0},C_NUMBER_MODE:{scope:"number",
77
+ begin:_,relevance:0},BINARY_NUMBER_MODE:{scope:"number",begin:O,relevance:0},
78
+ REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,
79
+ end:/\/[gimuy]*/,illegal:/\n/,contains:[v,{begin:/\[/,end:/\]/,relevance:0,
80
+ contains:[v]}]}]},TITLE_MODE:{scope:"title",begin:x,relevance:0},
81
+ UNDERSCORE_TITLE_MODE:{scope:"title",begin:w,relevance:0},METHOD_GUARD:{
82
+ begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{
83
+ "on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{
84
+ t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function I(e,t){
85
+ "."===e.input[e.index-1]&&t.ignoreMatch()}function T(e,t){
86
+ void 0!==e.className&&(e.scope=e.className,delete e.className)}function L(e,t){
87
+ t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",
88
+ e.__beforeBegin=I,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,
89
+ void 0===e.relevance&&(e.relevance=0))}function B(e,t){
90
+ Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function D(e,t){
91
+ if(e.match){
92
+ if(e.begin||e.end)throw Error("begin & end are not supported with match")
93
+ ;e.begin=e.match,delete e.match}}function H(e,t){
94
+ void 0===e.relevance&&(e.relevance=1)}const P=(e,t)=>{if(!e.beforeMatch)return
95
+ ;if(e.starts)throw Error("beforeMatch cannot be used with starts")
96
+ ;const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]
97
+ })),e.keywords=n.keywords,e.begin=p(n.beforeMatch,d(n.begin)),e.starts={
98
+ relevance:0,contains:[Object.assign(n,{endsParent:!0})]
99
+ },e.relevance=0,delete n.beforeMatch
100
+ },C=["of","and","for","in","not","or","if","then","parent","list","value"]
101
+ ;function $(e,t,n="keyword"){const i=Object.create(null)
102
+ ;return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((n=>{
103
+ Object.assign(i,$(e[n],t,n))})),i;function r(e,n){
104
+ t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|")
105
+ ;i[n[0]]=[e,U(n[0],n[1])]}))}}function U(e,t){
106
+ return t?Number(t):(e=>C.includes(e.toLowerCase()))(e)?0:1}const z={},K=e=>{
107
+ console.error(e)},W=(e,...t)=>{console.log("WARN: "+e,...t)},X=(e,t)=>{
108
+ z[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),z[`${e}/${t}`]=!0)
109
+ },G=Error();function Z(e,t,{key:n}){let i=0;const r=e[n],s={},o={}
110
+ ;for(let e=1;e<=t.length;e++)o[e+i]=r[e],s[e+i]=!0,i+=b(t[e-1])
111
+ ;e[n]=o,e[n]._emit=s,e[n]._multi=!0}function F(e){(e=>{
112
+ e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,
113
+ delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={
114
+ _wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope
115
+ }),(e=>{if(Array.isArray(e.begin)){
116
+ if(e.skip||e.excludeBegin||e.returnBegin)throw K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),
117
+ G
118
+ ;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("beginScope must be object"),
119
+ G;Z(e,e.begin,{key:"beginScope"}),e.begin=E(e.begin,{joinWith:""})}})(e),(e=>{
120
+ if(Array.isArray(e.end)){
121
+ if(e.skip||e.excludeEnd||e.returnEnd)throw K("skip, excludeEnd, returnEnd not compatible with endScope: {}"),
122
+ G
123
+ ;if("object"!=typeof e.endScope||null===e.endScope)throw K("endScope must be object"),
124
+ G;Z(e,e.end,{key:"endScope"}),e.end=E(e.end,{joinWith:""})}})(e)}function V(e){
125
+ function t(t,n){
126
+ return RegExp(g(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))
127
+ }class n{constructor(){
128
+ this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}
129
+ addRule(e,t){
130
+ t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),
131
+ this.matchAt+=b(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null)
132
+ ;const e=this.regexes.map((e=>e[1]));this.matcherRe=t(E(e,{joinWith:"|"
133
+ }),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex
134
+ ;const t=this.matcherRe.exec(e);if(!t)return null
135
+ ;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n]
136
+ ;return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){
137
+ this.rules=[],this.multiRegexes=[],
138
+ this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){
139
+ if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n
140
+ ;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),
141
+ t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){
142
+ return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){
143
+ this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){
144
+ const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex
145
+ ;let n=t.exec(e)
146
+ ;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{
147
+ const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}
148
+ return n&&(this.regexIndex+=n.position+1,
149
+ this.regexIndex===this.count&&this.considerAll()),n}}
150
+ if(e.compilerExtensions||(e.compilerExtensions=[]),
151
+ e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.")
152
+ ;return e.classNameAliases=r(e.classNameAliases||{}),function n(s,o){const a=s
153
+ ;if(s.isCompiled)return a
154
+ ;[T,D,F,P].forEach((e=>e(s,o))),e.compilerExtensions.forEach((e=>e(s,o))),
155
+ s.__beforeBegin=null,[L,B,H].forEach((e=>e(s,o))),s.isCompiled=!0;let c=null
156
+ ;return"object"==typeof s.keywords&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords),
157
+ c=s.keywords.$pattern,
158
+ delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=$(s.keywords,e.case_insensitive)),
159
+ a.keywordPatternRe=t(c,!0),
160
+ o&&(s.begin||(s.begin=/\B|\b/),a.beginRe=t(a.begin),s.end||s.endsWithParent||(s.end=/\B|\b/),
161
+ s.end&&(a.endRe=t(a.end)),
162
+ a.terminatorEnd=g(a.end)||"",s.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+o.terminatorEnd)),
163
+ s.illegal&&(a.illegalRe=t(s.illegal)),
164
+ s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>r(e,{
165
+ variants:null},t)))),e.cachedVariants?e.cachedVariants:q(e)?r(e,{
166
+ starts:e.starts?r(e.starts):null
167
+ }):Object.isFrozen(e)?r(e):e))("self"===e?s:e)))),s.contains.forEach((e=>{n(e,a)
168
+ })),s.starts&&n(s.starts,o),a.matcher=(e=>{const t=new i
169
+ ;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"
170
+ }))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"
171
+ }),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(a),a}(e)}function q(e){
172
+ return!!e&&(e.endsWithParent||q(e.starts))}class J extends Error{
173
+ constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}
174
+ const Y=i,Q=r,ee=Symbol("nomatch");var te=(t=>{
175
+ const i=Object.create(null),r=Object.create(null),s=[];let o=!0
176
+ ;const a="Could not find the language '{}', did you forget to load/include a language module?",c={
177
+ disableAutodetect:!0,name:"Plain text",contains:[]};let g={
178
+ ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,
179
+ languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",
180
+ cssSelector:"pre code",languages:null,__emitter:l};function b(e){
181
+ return g.noHighlightRe.test(e)}function m(e,t,n){let i="",r=""
182
+ ;"object"==typeof t?(i=e,
183
+ n=t.ignoreIllegals,r=t.language):(X("10.7.0","highlight(lang, code, ...args) has been deprecated."),
184
+ X("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),
185
+ r=e,i=t),void 0===n&&(n=!0);const s={code:i,language:r};k("before:highlight",s)
186
+ ;const o=s.result?s.result:E(s.language,s.code,n)
187
+ ;return o.code=s.code,k("after:highlight",o),o}function E(e,t,r,s){
188
+ const c=Object.create(null);function l(){if(!N.keywords)return void M.addText(S)
189
+ ;let e=0;N.keywordPatternRe.lastIndex=0;let t=N.keywordPatternRe.exec(S),n=""
190
+ ;for(;t;){n+=S.substring(e,t.index)
191
+ ;const r=y.case_insensitive?t[0].toLowerCase():t[0],s=(i=r,N.keywords[i]);if(s){
192
+ const[e,i]=s
193
+ ;if(M.addText(n),n="",c[r]=(c[r]||0)+1,c[r]<=7&&(R+=i),e.startsWith("_"))n+=t[0];else{
194
+ const n=y.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0]
195
+ ;e=N.keywordPatternRe.lastIndex,t=N.keywordPatternRe.exec(S)}var i
196
+ ;n+=S.substring(e),M.addText(n)}function d(){null!=N.subLanguage?(()=>{
197
+ if(""===S)return;let e=null;if("string"==typeof N.subLanguage){
198
+ if(!i[N.subLanguage])return void M.addText(S)
199
+ ;e=E(N.subLanguage,S,!0,k[N.subLanguage]),k[N.subLanguage]=e._top
200
+ }else e=x(S,N.subLanguage.length?N.subLanguage:null)
201
+ ;N.relevance>0&&(R+=e.relevance),M.addSublanguage(e._emitter,e.language)
202
+ })():l(),S=""}function u(e,t){let n=1;const i=t.length-1;for(;n<=i;){
203
+ if(!e._emit[n]){n++;continue}const i=y.classNameAliases[e[n]]||e[n],r=t[n]
204
+ ;i?M.addKeyword(r,i):(S=r,l(),S=""),n++}}function h(e,t){
205
+ return e.scope&&"string"==typeof e.scope&&M.openNode(y.classNameAliases[e.scope]||e.scope),
206
+ e.beginScope&&(e.beginScope._wrap?(M.addKeyword(S,y.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),
207
+ S=""):e.beginScope._multi&&(u(e.beginScope,t),S="")),N=Object.create(e,{parent:{
208
+ value:N}}),N}function p(e,t,i){let r=((e,t)=>{const n=e&&e.exec(t)
209
+ ;return n&&0===n.index})(e.endRe,i);if(r){if(e["on:end"]){const i=new n(e)
210
+ ;e["on:end"](t,i),i.isMatchIgnored&&(r=!1)}if(r){
211
+ for(;e.endsParent&&e.parent;)e=e.parent;return e}}
212
+ if(e.endsWithParent)return p(e.parent,t,i)}function f(e){
213
+ return 0===N.matcher.regexIndex?(S+=e[0],1):(I=!0,0)}function b(e){
214
+ const n=e[0],i=t.substring(e.index),r=p(N,e,i);if(!r)return ee;const s=N
215
+ ;N.endScope&&N.endScope._wrap?(d(),
216
+ M.addKeyword(n,N.endScope._wrap)):N.endScope&&N.endScope._multi?(d(),
217
+ u(N.endScope,e)):s.skip?S+=n:(s.returnEnd||s.excludeEnd||(S+=n),
218
+ d(),s.excludeEnd&&(S=n));do{
219
+ N.scope&&M.closeNode(),N.skip||N.subLanguage||(R+=N.relevance),N=N.parent
220
+ }while(N!==r.parent);return r.starts&&h(r.starts,e),s.returnEnd?0:n.length}
221
+ let m={};function w(i,s){const a=s&&s[0];if(S+=i,null==a)return d(),0
222
+ ;if("begin"===m.type&&"end"===s.type&&m.index===s.index&&""===a){
223
+ if(S+=t.slice(s.index,s.index+1),!o){const t=Error(`0 width match regex (${e})`)
224
+ ;throw t.languageName=e,t.badRule=m.rule,t}return 1}
225
+ if(m=s,"begin"===s.type)return(e=>{
226
+ const t=e[0],i=e.rule,r=new n(i),s=[i.__beforeBegin,i["on:begin"]]
227
+ ;for(const n of s)if(n&&(n(e,r),r.isMatchIgnored))return f(t)
228
+ ;return i.skip?S+=t:(i.excludeBegin&&(S+=t),
229
+ d(),i.returnBegin||i.excludeBegin||(S=t)),h(i,e),i.returnBegin?0:t.length})(s)
230
+ ;if("illegal"===s.type&&!r){
231
+ const e=Error('Illegal lexeme "'+a+'" for mode "'+(N.scope||"<unnamed>")+'"')
232
+ ;throw e.mode=N,e}if("end"===s.type){const e=b(s);if(e!==ee)return e}
233
+ if("illegal"===s.type&&""===a)return 1
234
+ ;if(A>1e5&&A>3*s.index)throw Error("potential infinite loop, way more iterations than matches")
235
+ ;return S+=a,a.length}const y=O(e)
236
+ ;if(!y)throw K(a.replace("{}",e)),Error('Unknown language: "'+e+'"')
237
+ ;const _=V(y);let v="",N=s||_;const k={},M=new g.__emitter(g);(()=>{const e=[]
238
+ ;for(let t=N;t!==y;t=t.parent)t.scope&&e.unshift(t.scope)
239
+ ;e.forEach((e=>M.openNode(e)))})();let S="",R=0,j=0,A=0,I=!1;try{
240
+ for(N.matcher.considerAll();;){
241
+ A++,I?I=!1:N.matcher.considerAll(),N.matcher.lastIndex=j
242
+ ;const e=N.matcher.exec(t);if(!e)break;const n=w(t.substring(j,e.index),e)
243
+ ;j=e.index+n}
244
+ return w(t.substring(j)),M.closeAllNodes(),M.finalize(),v=M.toHTML(),{
245
+ language:e,value:v,relevance:R,illegal:!1,_emitter:M,_top:N}}catch(n){
246
+ if(n.message&&n.message.includes("Illegal"))return{language:e,value:Y(t),
247
+ illegal:!0,relevance:0,_illegalBy:{message:n.message,index:j,
248
+ context:t.slice(j-100,j+100),mode:n.mode,resultSoFar:v},_emitter:M};if(o)return{
249
+ language:e,value:Y(t),illegal:!1,relevance:0,errorRaised:n,_emitter:M,_top:N}
250
+ ;throw n}}function x(e,t){t=t||g.languages||Object.keys(i);const n=(e=>{
251
+ const t={value:Y(e),illegal:!1,relevance:0,_top:c,_emitter:new g.__emitter(g)}
252
+ ;return t._emitter.addText(e),t})(e),r=t.filter(O).filter(N).map((t=>E(t,e,!1)))
253
+ ;r.unshift(n);const s=r.sort(((e,t)=>{
254
+ if(e.relevance!==t.relevance)return t.relevance-e.relevance
255
+ ;if(e.language&&t.language){if(O(e.language).supersetOf===t.language)return 1
256
+ ;if(O(t.language).supersetOf===e.language)return-1}return 0})),[o,a]=s,l=o
257
+ ;return l.secondBest=a,l}function w(e){let t=null;const n=(e=>{
258
+ let t=e.className+" ";t+=e.parentNode?e.parentNode.className:""
259
+ ;const n=g.languageDetectRe.exec(t);if(n){const t=O(n[1])
260
+ ;return t||(W(a.replace("{}",n[1])),
261
+ W("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}
262
+ return t.split(/\s+/).find((e=>b(e)||O(e)))})(e);if(b(n))return
263
+ ;if(k("before:highlightElement",{el:e,language:n
264
+ }),e.children.length>0&&(g.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),
265
+ console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),
266
+ console.warn("The element with unescaped HTML:"),
267
+ console.warn(e)),g.throwUnescapedHTML))throw new J("One of your code blocks includes unescaped HTML.",e.innerHTML)
268
+ ;t=e;const i=t.textContent,s=n?m(i,{language:n,ignoreIllegals:!0}):x(i)
269
+ ;e.innerHTML=s.value,((e,t,n)=>{const i=t&&r[t]||n
270
+ ;e.classList.add("hljs"),e.classList.add("language-"+i)
271
+ })(e,n,s.language),e.result={language:s.language,re:s.relevance,
272
+ relevance:s.relevance},s.secondBest&&(e.secondBest={
273
+ language:s.secondBest.language,relevance:s.secondBest.relevance
274
+ }),k("after:highlightElement",{el:e,result:s,text:i})}let y=!1;function _(){
275
+ "loading"!==document.readyState?document.querySelectorAll(g.cssSelector).forEach(w):y=!0
276
+ }function O(e){return e=(e||"").toLowerCase(),i[e]||i[r[e]]}
277
+ function v(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{
278
+ r[e.toLowerCase()]=t}))}function N(e){const t=O(e)
279
+ ;return t&&!t.disableAutodetect}function k(e,t){const n=e;s.forEach((e=>{
280
+ e[n]&&e[n](t)}))}
281
+ "undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{
282
+ y&&_()}),!1),Object.assign(t,{highlight:m,highlightAuto:x,highlightAll:_,
283
+ highlightElement:w,
284
+ highlightBlock:e=>(X("10.7.0","highlightBlock will be removed entirely in v12.0"),
285
+ X("10.7.0","Please use highlightElement now."),w(e)),configure:e=>{g=Q(g,e)},
286
+ initHighlighting:()=>{
287
+ _(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},
288
+ initHighlightingOnLoad:()=>{
289
+ _(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")
290
+ },registerLanguage:(e,n)=>{let r=null;try{r=n(t)}catch(t){
291
+ if(K("Language definition for '{}' could not be registered.".replace("{}",e)),
292
+ !o)throw t;K(t),r=c}
293
+ r.name||(r.name=e),i[e]=r,r.rawDefinition=n.bind(null,t),r.aliases&&v(r.aliases,{
294
+ languageName:e})},unregisterLanguage:e=>{delete i[e]
295
+ ;for(const t of Object.keys(r))r[t]===e&&delete r[t]},
296
+ listLanguages:()=>Object.keys(i),getLanguage:O,registerAliases:v,
297
+ autoDetection:N,inherit:Q,addPlugin:e=>{(e=>{
298
+ e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{
299
+ e["before:highlightBlock"](Object.assign({block:t.el},t))
300
+ }),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{
301
+ e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),s.push(e)}
302
+ }),t.debugMode=()=>{o=!1},t.safeMode=()=>{o=!0
303
+ },t.versionString="11.7.0",t.regex={concat:p,lookahead:d,either:f,optional:h,
304
+ anyNumberOfTimes:u};for(const t in A)"object"==typeof A[t]&&e.exports(A[t])
305
+ ;return Object.assign(t,A),t})({});return te}()
306
+ ;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);/*! `xml` grammar compiled for Highlight.js 11.7.0 */
307
+ (()=>{var e=(()=>{"use strict";return e=>{
308
+ const a=e.regex,n=a.concat(/[\p{L}_]/u,a.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s={
309
+ className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},t={begin:/\s/,
310
+ contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]
311
+ },i=e.inherit(t,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{
312
+ className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),r={
313
+ endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",
314
+ begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{
315
+ className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{
316
+ begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{
317
+ name:"HTML, XML",
318
+ aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],
319
+ case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,
320
+ end:/>/,relevance:10,contains:[t,l,c,i,{begin:/\[/,end:/\]/,contains:[{
321
+ className:"meta",begin:/<![a-z]/,end:/>/,contains:[t,i,l,c]}]}]
322
+ },e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,
323
+ relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,
324
+ relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",
325
+ begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[r],starts:{
326
+ end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",
327
+ begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[r],starts:{
328
+ end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{
329
+ className:"tag",begin:/<>|<\/>/},{className:"tag",
330
+ begin:a.concat(/</,a.lookahead(a.concat(n,a.either(/\/>/,/>/,/\s/)))),
331
+ end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:r}]},{
332
+ className:"tag",begin:a.concat(/<\//,a.lookahead(a.concat(n,/>/))),contains:[{
333
+ className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}
334
+ })();hljs.registerLanguage("xml",e)})();
335
+ </script>