@elementor/editor-audits 4.4.0-1075 → 4.4.0-1077

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/dist/index.mjs CHANGED
@@ -13,10 +13,10 @@ import { __ as __22 } from "@wordpress/i18n";
13
13
  import { createFloatingPanel } from "@elementor/editor-floating-panels";
14
14
 
15
15
  // src/components/audit-panel.tsx
16
- import * as React22 from "react";
16
+ import * as React23 from "react";
17
17
  import { getCurrentDocumentId as getCurrentDocumentId2 } from "@elementor/editor-elements";
18
18
  import { FloatingPanelBody, FloatingPanelFooter, FloatingPanelHeader } from "@elementor/editor-floating-panels";
19
- import { Box as Box19, Button as Button4, Typography as Typography15 } from "@elementor/ui";
19
+ import { Box as Box19, Button as Button5, Typography as Typography15 } from "@elementor/ui";
20
20
  import { __ as __21 } from "@wordpress/i18n";
21
21
 
22
22
  // src/hooks/use-audit-report.ts
@@ -103,8 +103,8 @@ async function requestPageContext(documentId, attachmentIds, allowNonceRetry) {
103
103
 
104
104
  // src/registry.ts
105
105
  var registry = /* @__PURE__ */ new Map();
106
- function registerAudit(audit21) {
107
- registry.set(audit21.id, audit21);
106
+ function registerAudit(audit22) {
107
+ registry.set(audit22.id, audit22);
108
108
  }
109
109
  function getRegisteredAudits() {
110
110
  return Array.from(registry.values());
@@ -140,6 +140,11 @@ var CATEGORY_LABELS = {
140
140
  // src/utils/audit-status-summary.ts
141
141
  import { __ as __2 } from "@wordpress/i18n";
142
142
 
143
+ // src/utils/is-scored-audit.ts
144
+ function isScoredAudit(audit22) {
145
+ return audit22.weight > 0;
146
+ }
147
+
143
148
  // src/utils/sort-failed-audits.ts
144
149
  var SEVERITY_SORTING_RANK = {
145
150
  error: 0,
@@ -170,7 +175,9 @@ function partitionAuditResults(report, options = {}) {
170
175
  switch (run.result.status) {
171
176
  case "fail":
172
177
  failed.push({ ...run, result: run.result });
173
- totalViolations += run.result.violations.length;
178
+ if (isScoredAudit(run.audit)) {
179
+ totalViolations += run.result.violations.length;
180
+ }
174
181
  break;
175
182
  case "pass":
176
183
  passed.push({ ...run, result: run.result });
@@ -191,7 +198,10 @@ function auditStatusDisplayCounts(report) {
191
198
  let pass = 0;
192
199
  let skipped = 0;
193
200
  let totalViolations = 0;
194
- for (const { result } of report.auditResults) {
201
+ for (const { audit: audit22, result } of report.auditResults) {
202
+ if (!isScoredAudit(audit22)) {
203
+ continue;
204
+ }
195
205
  switch (result.status) {
196
206
  case "fail":
197
207
  totalViolations += result.violations.length;
@@ -239,16 +249,16 @@ function computeReport(documentId, results) {
239
249
  const accumulators = Object.fromEntries(
240
250
  ALL_CATEGORIES.map((c) => [c, { totalWeight: 0, passedWeight: 0, total: 0, failed: 0 }])
241
251
  );
242
- for (const { audit: audit21, result } of results) {
252
+ for (const { audit: audit22, result } of results) {
243
253
  if (result.status === "skipped") {
244
254
  continue;
245
255
  }
246
- for (const category of audit21.categories) {
256
+ for (const category of audit22.categories) {
247
257
  const acc = accumulators[category];
248
258
  acc.total++;
249
- acc.totalWeight += audit21.weight;
259
+ acc.totalWeight += audit22.weight;
250
260
  if (result.status === "pass") {
251
- acc.passedWeight += audit21.weight;
261
+ acc.passedWeight += audit22.weight;
252
262
  } else {
253
263
  acc.failed++;
254
264
  }
@@ -437,10 +447,10 @@ async function runPageAudit(documentId) {
437
447
  const ctx = { documentId, elements, pageContext, kit };
438
448
  const registered = getRegisteredAudits();
439
449
  const auditResults = await Promise.all(
440
- registered.map(async (audit21) => {
441
- const { evaluate: _evaluate, ...meta } = audit21;
450
+ registered.map(async (audit22) => {
451
+ const { evaluate: _evaluate, ...meta } = audit22;
442
452
  try {
443
- const result = await audit21.evaluate(ctx);
453
+ const result = await audit22.evaluate(ctx);
444
454
  return { audit: meta, result };
445
455
  } catch (error) {
446
456
  const reason = error instanceof Error ? error.message : "unknown-error";
@@ -723,13 +733,13 @@ function WelcomePage() {
723
733
  }
724
734
 
725
735
  // src/components/report-shell.tsx
726
- import * as React21 from "react";
736
+ import * as React22 from "react";
727
737
  import { useState as useState4 } from "react";
728
738
  import { Box as Box18, Divider as Divider2, Tab, Tabs } from "@elementor/ui";
729
739
  import { __ as __20 } from "@wordpress/i18n";
730
740
 
731
741
  // src/components/pages/all-audits-page.tsx
732
- import * as React11 from "react";
742
+ import * as React12 from "react";
733
743
  import { Box as Box8 } from "@elementor/ui";
734
744
  import { __ as __12 } from "@wordpress/i18n";
735
745
 
@@ -741,7 +751,7 @@ import { Box as Box4, Chip, Collapse, IconButton as IconButton2 } from "@element
741
751
  import { __ as __7 } from "@wordpress/i18n";
742
752
  function StatusSection({ label, count, color = "default", defaultExpanded = false, children }) {
743
753
  const [expanded, setExpanded] = useState2(defaultExpanded);
744
- if (count === 0) {
754
+ if (React5.Children.count(children) === 0) {
745
755
  return null;
746
756
  }
747
757
  return /* @__PURE__ */ React5.createElement(Box4, { sx: { paddingBlock: 1 } }, /* @__PURE__ */ React5.createElement(
@@ -782,7 +792,7 @@ function SubpageHeader({ title, onBack, backLabel, icon }) {
782
792
  }
783
793
 
784
794
  // src/components/violation-row.tsx
785
- import * as React10 from "react";
795
+ import * as React11 from "react";
786
796
  import { useState as useState3 } from "react";
787
797
  import { getElementIcon, getElementTitle } from "@elementor/editor-elements";
788
798
  import { AlertCircleIcon as AlertCircleIcon2, BulbIcon, CheckIcon, ChevronDownIcon as ChevronDownIcon2, EyeIcon, HelpIcon } from "@elementor/icons";
@@ -899,13 +909,25 @@ function SeverityIcon({ severity }) {
899
909
  return /* @__PURE__ */ React8.createElement(Icon, { fontSize: "small", color });
900
910
  }
901
911
 
902
- // src/components/violation-icons.tsx
912
+ // src/components/violation-cta-button.tsx
903
913
  import * as React9 from "react";
914
+ import { Button as Button3 } from "@elementor/ui";
915
+ function ViolationCtaButton({ ctaLabel, externalUrl }) {
916
+ const handleClick = (event) => {
917
+ event.stopPropagation();
918
+ event.preventDefault();
919
+ window.open(externalUrl, "_blank", "noopener");
920
+ };
921
+ return /* @__PURE__ */ React9.createElement(Button3, { variant: "outlined", color: "secondary", size: "small", onClick: handleClick }, ctaLabel);
922
+ }
923
+
924
+ // src/components/violation-icons.tsx
925
+ import * as React10 from "react";
904
926
  import { FileSettingsIcon, SettingsIcon, ShieldCheckIcon } from "@elementor/icons";
905
927
  import { Box as Box6 } from "@elementor/ui";
906
928
  function ViolationIcon({ violation, widgetIcon }) {
907
929
  if (widgetIcon) {
908
- return /* @__PURE__ */ React9.createElement(
930
+ return /* @__PURE__ */ React10.createElement(
909
931
  Box6,
910
932
  {
911
933
  component: "i",
@@ -916,28 +938,28 @@ function ViolationIcon({ violation, widgetIcon }) {
916
938
  );
917
939
  }
918
940
  if (violation.targetHint === "page-settings") {
919
- return /* @__PURE__ */ React9.createElement(FileSettingsIcon, { fontSize: "inherit", "aria-hidden": true });
941
+ return /* @__PURE__ */ React10.createElement(FileSettingsIcon, { fontSize: "inherit", "aria-hidden": true });
920
942
  }
921
943
  if (violation.targetHint === "site-settings" || violation.targetHint === "site-identity-settings") {
922
- return /* @__PURE__ */ React9.createElement(SettingsIcon, { fontSize: "inherit", "aria-hidden": true });
944
+ return /* @__PURE__ */ React10.createElement(SettingsIcon, { fontSize: "inherit", "aria-hidden": true });
923
945
  }
924
- return /* @__PURE__ */ React9.createElement(ShieldCheckIcon, { fontSize: "inherit", "aria-hidden": true });
946
+ return /* @__PURE__ */ React10.createElement(ShieldCheckIcon, { fontSize: "inherit", "aria-hidden": true });
925
947
  }
926
948
 
927
949
  // src/components/violation-row.tsx
928
950
  function SkipReasonTooltip({ reason }) {
929
- return /* @__PURE__ */ React10.createElement(Tooltip3, { title: reason, placement: "top" }, /* @__PURE__ */ React10.createElement(Box7, { "aria-label": reason, component: "span", sx: { display: "inline-flex", alignItems: "center" } }, /* @__PURE__ */ React10.createElement(HelpIcon, { fontSize: "small", color: "action" })));
951
+ return /* @__PURE__ */ React11.createElement(Tooltip3, { title: reason, placement: "top" }, /* @__PURE__ */ React11.createElement(Box7, { "aria-label": reason, component: "span", sx: { display: "inline-flex", alignItems: "center" } }, /* @__PURE__ */ React11.createElement(HelpIcon, { fontSize: "small", color: "action" })));
930
952
  }
931
- function StatusIndicator({ audit: audit21, violations }) {
953
+ function StatusIndicator({ audit: audit22, violations }) {
932
954
  if (violations) {
933
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", color: "text.secondary", fontWeight: "bold" }, violations.length), /* @__PURE__ */ React10.createElement(SeverityIcon, { severity: audit21.severity }));
955
+ return /* @__PURE__ */ React11.createElement(React11.Fragment, null, isScoredAudit(audit22) && /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", color: "text.secondary", fontWeight: "bold" }, violations.length), /* @__PURE__ */ React11.createElement(SeverityIcon, { severity: audit22.severity }));
934
956
  }
935
- return /* @__PURE__ */ React10.createElement(CheckIcon, { fontSize: "small", color: "success" });
957
+ return /* @__PURE__ */ React11.createElement(CheckIcon, { fontSize: "small", color: "success" });
936
958
  }
937
- function ViolationRow({ audit: audit21, skipReason, violations }) {
959
+ function ViolationRow({ audit: audit22, skipReason, violations }) {
938
960
  const [expanded, setExpanded] = useState3(false);
939
961
  const toggleExpanded = () => setExpanded((value) => !value);
940
- return /* @__PURE__ */ React10.createElement(Box7, { sx: { borderBottom: 1, borderColor: "divider", paddingBlock: 0.5 } }, /* @__PURE__ */ React10.createElement(Box7, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React10.createElement(
962
+ return /* @__PURE__ */ React11.createElement(Box7, { sx: { borderBottom: 1, borderColor: "divider", paddingBlock: 0.5 } }, /* @__PURE__ */ React11.createElement(Box7, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React11.createElement(
941
963
  Box7,
942
964
  {
943
965
  sx: {
@@ -950,16 +972,16 @@ function ViolationRow({ audit: audit21, skipReason, violations }) {
950
972
  },
951
973
  onClick: toggleExpanded
952
974
  },
953
- /* @__PURE__ */ React10.createElement(Typography6, { variant: "body2", sx: { flex: 1 } }, audit21.title),
954
- !skipReason && /* @__PURE__ */ React10.createElement(StatusIndicator, { audit: audit21, violations })
955
- ), skipReason && /* @__PURE__ */ React10.createElement(SkipReasonTooltip, { reason: skipReason }), /* @__PURE__ */ React10.createElement(
975
+ /* @__PURE__ */ React11.createElement(Typography6, { variant: "body2", sx: { flex: 1 } }, audit22.title),
976
+ !skipReason && /* @__PURE__ */ React11.createElement(StatusIndicator, { audit: audit22, violations })
977
+ ), skipReason && /* @__PURE__ */ React11.createElement(SkipReasonTooltip, { reason: skipReason }), /* @__PURE__ */ React11.createElement(
956
978
  IconButton5,
957
979
  {
958
980
  size: "small",
959
981
  "aria-label": expanded ? __11("Collapse", "elementor") : __11("Expand", "elementor"),
960
982
  onClick: toggleExpanded
961
983
  },
962
- /* @__PURE__ */ React10.createElement(
984
+ /* @__PURE__ */ React11.createElement(
963
985
  ChevronDownIcon2,
964
986
  {
965
987
  fontSize: "small",
@@ -969,29 +991,29 @@ function ViolationRow({ audit: audit21, skipReason, violations }) {
969
991
  }
970
992
  }
971
993
  )
972
- )), /* @__PURE__ */ React10.createElement(Collapse2, { in: expanded }, /* @__PURE__ */ React10.createElement(Box7, { sx: { display: "flex", flexDirection: "column", gap: 1, paddingBlock: 1 } }, /* @__PURE__ */ React10.createElement(
994
+ )), /* @__PURE__ */ React11.createElement(Collapse2, { in: expanded }, /* @__PURE__ */ React11.createElement(Box7, { sx: { display: "flex", flexDirection: "column", gap: 1, paddingBlock: 1 } }, /* @__PURE__ */ React11.createElement(
973
995
  Alert,
974
996
  {
975
997
  severity: "secondary",
976
998
  sx: { p: 1 },
977
- icon: /* @__PURE__ */ React10.createElement(AlertCircleIcon2, { fontSize: "small", color: "secondary", "aria-hidden": true })
999
+ icon: /* @__PURE__ */ React11.createElement(AlertCircleIcon2, { fontSize: "small", color: "secondary", "aria-hidden": true })
978
1000
  },
979
- /* @__PURE__ */ React10.createElement(AlertTitle, null, /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, __11("What's the issue", "elementor"))),
980
- /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", component: "p", color: "text.secondary" }, audit21.description)
981
- ), /* @__PURE__ */ React10.createElement(
1001
+ /* @__PURE__ */ React11.createElement(AlertTitle, null, /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, __11("What's the issue", "elementor"))),
1002
+ /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", component: "p", color: "text.secondary" }, audit22.description)
1003
+ ), /* @__PURE__ */ React11.createElement(
982
1004
  Alert,
983
1005
  {
984
1006
  severity: "info",
985
1007
  sx: { p: 1 },
986
- icon: /* @__PURE__ */ React10.createElement(BulbIcon, { fontSize: "small", color: "info", "aria-hidden": true })
1008
+ icon: /* @__PURE__ */ React11.createElement(BulbIcon, { fontSize: "small", color: "info", "aria-hidden": true })
987
1009
  },
988
- /* @__PURE__ */ React10.createElement(AlertTitle, null, /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, __11("How to resolve", "elementor"))),
989
- /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", component: "p", color: "text.secondary" }, audit21.fixHint)
990
- )), violations && violations.length > 0 && /* @__PURE__ */ React10.createElement(Box7, { role: "list", sx: { paddingBlockEnd: 1, paddingInlineStart: 2 } }, violations.map((violation, idx) => {
1010
+ /* @__PURE__ */ React11.createElement(AlertTitle, null, /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, __11("How to resolve", "elementor"))),
1011
+ /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", component: "p", color: "text.secondary" }, audit22.fixHint)
1012
+ )), violations && violations.length > 0 && /* @__PURE__ */ React11.createElement(Box7, { role: "list", sx: { paddingBlockEnd: 1, paddingInlineStart: 2 } }, violations.map((violation, idx) => {
991
1013
  const widgetIcon = violation.elementId ? getElementIcon(violation.elementId) : null;
992
1014
  const elementTitle = violation.elementId ? getElementTitle(violation.elementId) : null;
993
1015
  const rowLabel = elementTitle ? `${elementTitle} - ${violation.label}` : violation.label;
994
- return /* @__PURE__ */ React10.createElement(
1016
+ return /* @__PURE__ */ React11.createElement(
995
1017
  Box7,
996
1018
  {
997
1019
  key: idx,
@@ -1014,10 +1036,23 @@ function ViolationRow({ audit: audit21, skipReason, violations }) {
1014
1036
  }
1015
1037
  }
1016
1038
  },
1017
- /* @__PURE__ */ React10.createElement(ViolationIcon, { violation, widgetIcon }),
1018
- /* @__PURE__ */ React10.createElement(Box7, { sx: { flex: 1 } }, /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption" }, rowLabel), violation.detail && /* @__PURE__ */ React10.createElement(Typography6, { variant: "caption", color: "text.secondary" }, violation.detail)),
1019
- violation.angieFix && /* @__PURE__ */ React10.createElement(FixViolationWithAngie, { prompt: buildAngiePrompt(rowLabel) }),
1020
- /* @__PURE__ */ React10.createElement(EyeIcon, { className: "violation-hover-icon", fontSize: "tiny", "aria-hidden": true })
1039
+ /* @__PURE__ */ React11.createElement(ViolationIcon, { violation, widgetIcon }),
1040
+ /* @__PURE__ */ React11.createElement(Box7, { sx: { flex: 1 } }, /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption" }, rowLabel), violation.detail && /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", color: "text.secondary" }, violation.detail)),
1041
+ violation.angieFix && /* @__PURE__ */ React11.createElement(FixViolationWithAngie, { prompt: buildAngiePrompt(rowLabel) }),
1042
+ violation.ctaLabel && violation.externalUrl ? /* @__PURE__ */ React11.createElement(
1043
+ ViolationCtaButton,
1044
+ {
1045
+ ctaLabel: violation.ctaLabel,
1046
+ externalUrl: violation.externalUrl
1047
+ }
1048
+ ) : /* @__PURE__ */ React11.createElement(
1049
+ EyeIcon,
1050
+ {
1051
+ className: "violation-hover-icon",
1052
+ fontSize: "tiny",
1053
+ "aria-hidden": true
1054
+ }
1055
+ )
1021
1056
  );
1022
1057
  }))));
1023
1058
  }
@@ -1028,7 +1063,7 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
1028
1063
  const expandFail = !initialExpandedStatus || initialExpandedStatus === "fail";
1029
1064
  const expandPass = initialExpandedStatus === "pass";
1030
1065
  const expandSkipped = initialExpandedStatus === "skipped";
1031
- return /* @__PURE__ */ React11.createElement(Box8, { key: initialExpandedStatus ?? "default" }, /* @__PURE__ */ React11.createElement(SubpageHeader, { title: __12("All audits", "elementor"), onBack }), /* @__PURE__ */ React11.createElement(Box8, { sx: { p: 1 } }, /* @__PURE__ */ React11.createElement(
1066
+ return /* @__PURE__ */ React12.createElement(Box8, { key: initialExpandedStatus ?? "default" }, /* @__PURE__ */ React12.createElement(SubpageHeader, { title: __12("All audits", "elementor"), onBack }), /* @__PURE__ */ React12.createElement(Box8, { sx: { p: 1 } }, /* @__PURE__ */ React12.createElement(
1032
1067
  StatusSection,
1033
1068
  {
1034
1069
  label: auditStatusLabel("fail"),
@@ -1036,8 +1071,8 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
1036
1071
  color: auditStatusColor("fail"),
1037
1072
  defaultExpanded: expandFail
1038
1073
  },
1039
- failed.map((r) => /* @__PURE__ */ React11.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, violations: r.result.violations }))
1040
- ), /* @__PURE__ */ React11.createElement(
1074
+ failed.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, violations: r.result.violations }))
1075
+ ), /* @__PURE__ */ React12.createElement(
1041
1076
  StatusSection,
1042
1077
  {
1043
1078
  label: auditStatusLabel("pass"),
@@ -1045,8 +1080,8 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
1045
1080
  color: auditStatusColor("pass"),
1046
1081
  defaultExpanded: expandPass
1047
1082
  },
1048
- passed.map((r) => /* @__PURE__ */ React11.createElement(ViolationRow, { key: r.audit.id, audit: r.audit }))
1049
- ), /* @__PURE__ */ React11.createElement(
1083
+ passed.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit }))
1084
+ ), /* @__PURE__ */ React12.createElement(
1050
1085
  StatusSection,
1051
1086
  {
1052
1087
  label: auditStatusLabel("skipped"),
@@ -1054,12 +1089,12 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
1054
1089
  color: auditStatusColor("skipped"),
1055
1090
  defaultExpanded: expandSkipped
1056
1091
  },
1057
- skipped.map((r) => /* @__PURE__ */ React11.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, skipReason: r.result.reason }))
1092
+ skipped.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, skipReason: r.result.reason }))
1058
1093
  )));
1059
1094
  }
1060
1095
 
1061
1096
  // src/components/pages/category-page.tsx
1062
- import * as React12 from "react";
1097
+ import * as React13 from "react";
1063
1098
  import { Box as Box9 } from "@elementor/ui";
1064
1099
  import { __ as __13 } from "@wordpress/i18n";
1065
1100
 
@@ -1083,15 +1118,15 @@ var CATEGORY_ICONS = {
1083
1118
  function CategoryPage({ category, report, onBack }) {
1084
1119
  const Icon = CATEGORY_ICONS[category];
1085
1120
  const { failed, passed, totalViolations } = partitionAuditResults(report, { category });
1086
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(
1121
+ return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
1087
1122
  SubpageHeader,
1088
1123
  {
1089
1124
  title: CATEGORY_LABELS[category],
1090
1125
  onBack,
1091
1126
  backLabel: __13("Back to all issues", "elementor"),
1092
- icon: /* @__PURE__ */ React12.createElement(Icon, { fontSize: "small", color: "action" })
1127
+ icon: /* @__PURE__ */ React13.createElement(Icon, { fontSize: "small", color: "action" })
1093
1128
  }
1094
- ), /* @__PURE__ */ React12.createElement(Box9, { sx: { p: 1 } }, /* @__PURE__ */ React12.createElement(
1129
+ ), /* @__PURE__ */ React13.createElement(Box9, { sx: { p: 1 } }, /* @__PURE__ */ React13.createElement(
1095
1130
  StatusSection,
1096
1131
  {
1097
1132
  label: __13("Failed audits", "elementor"),
@@ -1099,12 +1134,12 @@ function CategoryPage({ category, report, onBack }) {
1099
1134
  color: "error",
1100
1135
  defaultExpanded: true
1101
1136
  },
1102
- failed.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, violations: r.result.violations }))
1103
- ), /* @__PURE__ */ React12.createElement(StatusSection, { label: __13("Passed audits", "elementor"), count: passed.length, color: "success" }, passed.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit })))));
1137
+ failed.map((r) => /* @__PURE__ */ React13.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, violations: r.result.violations }))
1138
+ ), /* @__PURE__ */ React13.createElement(StatusSection, { label: __13("Passed audits", "elementor"), count: passed.length, color: "success" }, passed.map((r) => /* @__PURE__ */ React13.createElement(ViolationRow, { key: r.audit.id, audit: r.audit })))));
1104
1139
  }
1105
1140
 
1106
1141
  // src/components/pages/issues-page.tsx
1107
- import * as React16 from "react";
1142
+ import * as React17 from "react";
1108
1143
  import { Box as Box13, Link, Typography as Typography10 } from "@elementor/ui";
1109
1144
  import { __ as __17 } from "@wordpress/i18n";
1110
1145
 
@@ -1113,14 +1148,17 @@ import { __ as __14, sprintf as sprintf2 } from "@wordpress/i18n";
1113
1148
  var ALL_SEVERITIES = ["error", "warning", "info"];
1114
1149
  function countSeverities(report, category) {
1115
1150
  const counts = { error: 0, warning: 0, info: 0 };
1116
- for (const { audit: audit21, result } of report.auditResults) {
1151
+ for (const { audit: audit22, result } of report.auditResults) {
1117
1152
  if (result.status !== "fail") {
1118
1153
  continue;
1119
1154
  }
1120
- if (category && !audit21.categories.includes(category)) {
1155
+ if (category && !audit22.categories.includes(category)) {
1121
1156
  continue;
1122
1157
  }
1123
- counts[audit21.severity] += result.violations.length;
1158
+ if (!isScoredAudit(audit22)) {
1159
+ continue;
1160
+ }
1161
+ counts[audit22.severity] += result.violations.length;
1124
1162
  }
1125
1163
  return counts;
1126
1164
  }
@@ -1158,13 +1196,13 @@ function severityRemainingCountLabel(severity, count) {
1158
1196
  }
1159
1197
 
1160
1198
  // src/components/issues-category-row.tsx
1161
- import * as React13 from "react";
1199
+ import * as React14 from "react";
1162
1200
  import { ChevronRightIcon } from "@elementor/icons";
1163
1201
  import { Box as Box10, Rotate as Rotate2, Typography as Typography7, useTheme as useTheme2 } from "@elementor/ui";
1164
1202
  function IssuesCategoryRow({ category, label, counts, onClick }) {
1165
1203
  const isRtl = "rtl" === useTheme2().direction;
1166
1204
  const Icon = CATEGORY_ICONS[category];
1167
- return /* @__PURE__ */ React13.createElement(
1205
+ return /* @__PURE__ */ React14.createElement(
1168
1206
  Box10,
1169
1207
  {
1170
1208
  role: "button",
@@ -1186,15 +1224,15 @@ function IssuesCategoryRow({ category, label, counts, onClick }) {
1186
1224
  "&:focus-visible": { outline: "2px solid", outlineColor: "primary.main" }
1187
1225
  }
1188
1226
  },
1189
- /* @__PURE__ */ React13.createElement(Icon, { fontSize: "small", color: "action" }),
1190
- /* @__PURE__ */ React13.createElement(Typography7, { variant: "body2", fontWeight: "bold", sx: { flex: 1 } }, label),
1191
- /* @__PURE__ */ React13.createElement(Box10, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, ALL_SEVERITIES.filter((s) => counts[s] > 0).map((severity) => /* @__PURE__ */ React13.createElement(Box10, { key: severity, sx: { display: "flex", alignItems: "center", gap: 0.25 } }, /* @__PURE__ */ React13.createElement(SeverityIcon, { severity }), /* @__PURE__ */ React13.createElement(Typography7, { variant: "caption", color: "text.primary", fontWeight: "bold" }, counts[severity])))),
1192
- /* @__PURE__ */ React13.createElement(Rotate2, { in: isRtl }, /* @__PURE__ */ React13.createElement(ChevronRightIcon, { fontSize: "small", color: "action" }))
1227
+ /* @__PURE__ */ React14.createElement(Icon, { fontSize: "small", color: "action" }),
1228
+ /* @__PURE__ */ React14.createElement(Typography7, { variant: "body2", fontWeight: "bold", sx: { flex: 1 } }, label),
1229
+ /* @__PURE__ */ React14.createElement(Box10, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, ALL_SEVERITIES.filter((s) => counts[s] > 0).map((severity) => /* @__PURE__ */ React14.createElement(Box10, { key: severity, sx: { display: "flex", alignItems: "center", gap: 0.25 } }, /* @__PURE__ */ React14.createElement(SeverityIcon, { severity }), /* @__PURE__ */ React14.createElement(Typography7, { variant: "caption", color: "text.primary", fontWeight: "bold" }, counts[severity])))),
1230
+ /* @__PURE__ */ React14.createElement(Rotate2, { in: isRtl }, /* @__PURE__ */ React14.createElement(ChevronRightIcon, { fontSize: "small", color: "action" }))
1193
1231
  );
1194
1232
  }
1195
1233
 
1196
1234
  // src/components/promotions.tsx
1197
- import * as React15 from "react";
1235
+ import * as React16 from "react";
1198
1236
  import { Box as Box12, Typography as Typography9 } from "@elementor/ui";
1199
1237
  import { __ as __16 } from "@wordpress/i18n";
1200
1238
 
@@ -1232,6 +1270,13 @@ var PROMOTIONS = [
1232
1270
  formatSubtitle: (run) => run.result.status === "fail" ? __15("Generate cookie policy", "elementor") : null,
1233
1271
  getCtaUrl: firstFailExternalUrl
1234
1272
  },
1273
+ {
1274
+ auditId: "audits/scan-for-cookies",
1275
+ icon: ElementorCookieIcon,
1276
+ ctaLabel: __15("Scan", "elementor"),
1277
+ formatSubtitle: (run) => run.result.status === "fail" ? __15("Scan this page for cookies", "elementor") : null,
1278
+ getCtaUrl: firstFailExternalUrl
1279
+ },
1235
1280
  {
1236
1281
  auditId: "audits/images-too-large",
1237
1282
  icon: ShieldHalfFilledIcon2,
@@ -1260,10 +1305,10 @@ function findAuditRun(report, auditId) {
1260
1305
  }
1261
1306
 
1262
1307
  // src/components/promotion-card.tsx
1263
- import * as React14 from "react";
1264
- import { Box as Box11, Button as Button3, Typography as Typography8 } from "@elementor/ui";
1308
+ import * as React15 from "react";
1309
+ import { Box as Box11, Button as Button4, Typography as Typography8 } from "@elementor/ui";
1265
1310
  function PromotionCard({ ctaDisabled, ctaLabel, icon: Icon, onCtaClick, subtitle, title }) {
1266
- return /* @__PURE__ */ React14.createElement(
1311
+ return /* @__PURE__ */ React15.createElement(
1267
1312
  Box11,
1268
1313
  {
1269
1314
  sx: {
@@ -1277,9 +1322,9 @@ function PromotionCard({ ctaDisabled, ctaLabel, icon: Icon, onCtaClick, subtitle
1277
1322
  py: 1.5
1278
1323
  }
1279
1324
  },
1280
- /* @__PURE__ */ React14.createElement(Icon, { fontSize: "small", color: "action" }),
1281
- /* @__PURE__ */ React14.createElement(Box11, { sx: { display: "flex", flex: 1, flexDirection: "column", gap: 0.25, minWidth: 0 } }, /* @__PURE__ */ React14.createElement(Typography8, { variant: "body2", fontWeight: "bold" }, title), /* @__PURE__ */ React14.createElement(Typography8, { variant: "caption", color: "text.secondary" }, subtitle)),
1282
- /* @__PURE__ */ React14.createElement(Button3, { variant: "outlined", color: "secondary", size: "small", disabled: ctaDisabled, onClick: onCtaClick }, ctaLabel)
1325
+ /* @__PURE__ */ React15.createElement(Icon, { fontSize: "small", color: "action" }),
1326
+ /* @__PURE__ */ React15.createElement(Box11, { sx: { display: "flex", flex: 1, flexDirection: "column", gap: 0.25, minWidth: 0 } }, /* @__PURE__ */ React15.createElement(Typography8, { variant: "body2", fontWeight: "bold" }, title), /* @__PURE__ */ React15.createElement(Typography8, { variant: "caption", color: "text.secondary" }, subtitle)),
1327
+ /* @__PURE__ */ React15.createElement(Button4, { variant: "outlined", color: "secondary", size: "small", disabled: ctaDisabled, onClick: onCtaClick }, ctaLabel)
1283
1328
  );
1284
1329
  }
1285
1330
 
@@ -1308,7 +1353,7 @@ function Promotions({ report }) {
1308
1353
  if (cards.length === 0) {
1309
1354
  return null;
1310
1355
  }
1311
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Typography9, { variant: "subtitle1", fontWeight: "bold" }, __16("Quick wins", "elementor")), /* @__PURE__ */ React15.createElement(Box12, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, cards.map(({ config, ctaUrl, key, run, subtitle }) => /* @__PURE__ */ React15.createElement(
1356
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(Typography9, { variant: "subtitle1", fontWeight: "bold" }, __16("Quick wins", "elementor")), /* @__PURE__ */ React16.createElement(Box12, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, cards.map(({ config, ctaUrl, key, run, subtitle }) => /* @__PURE__ */ React16.createElement(
1312
1357
  PromotionCard,
1313
1358
  {
1314
1359
  key,
@@ -1329,7 +1374,7 @@ function Promotions({ report }) {
1329
1374
  // src/components/pages/issues-page.tsx
1330
1375
  function IssuesPage({ report, onCategoryClick, onAllAuditsClick }) {
1331
1376
  const populatedCategories = getPopulatedCategories(report.categories, ALL_CATEGORIES);
1332
- return /* @__PURE__ */ React16.createElement(Box13, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React16.createElement(
1377
+ return /* @__PURE__ */ React17.createElement(Box13, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React17.createElement(
1333
1378
  Link,
1334
1379
  {
1335
1380
  component: "button",
@@ -1338,8 +1383,8 @@ function IssuesPage({ report, onCategoryClick, onAllAuditsClick }) {
1338
1383
  onClick: onAllAuditsClick,
1339
1384
  sx: { textAlign: "start" }
1340
1385
  },
1341
- /* @__PURE__ */ React16.createElement(Typography10, { variant: "subtitle1", component: "h2" }, __17("All issues", "elementor"))
1342
- ), /* @__PURE__ */ React16.createElement(Box13, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, populatedCategories.map((category) => /* @__PURE__ */ React16.createElement(
1386
+ /* @__PURE__ */ React17.createElement(Typography10, { variant: "subtitle1", component: "h2" }, __17("All issues", "elementor"))
1387
+ ), /* @__PURE__ */ React17.createElement(Box13, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, populatedCategories.map((category) => /* @__PURE__ */ React17.createElement(
1343
1388
  IssuesCategoryRow,
1344
1389
  {
1345
1390
  key: category,
@@ -1348,11 +1393,11 @@ function IssuesPage({ report, onCategoryClick, onAllAuditsClick }) {
1348
1393
  counts: countSeverities(report, category),
1349
1394
  onClick: () => onCategoryClick(category)
1350
1395
  }
1351
- ))), /* @__PURE__ */ React16.createElement(Promotions, { report }));
1396
+ ))), /* @__PURE__ */ React17.createElement(Promotions, { report }));
1352
1397
  }
1353
1398
 
1354
1399
  // src/components/pages/overview-page.tsx
1355
- import * as React20 from "react";
1400
+ import * as React21 from "react";
1356
1401
  import { Box as Box17, Chip as Chip3, Divider, Typography as Typography14 } from "@elementor/ui";
1357
1402
  import { __ as __19, sprintf as sprintf4 } from "@wordpress/i18n";
1358
1403
 
@@ -1371,7 +1416,7 @@ function getScoreTier(score) {
1371
1416
  }
1372
1417
 
1373
1418
  // src/components/count-summary-circle.tsx
1374
- import * as React17 from "react";
1419
+ import * as React18 from "react";
1375
1420
  import { Box as Box14, Chip as Chip2, Typography as Typography11 } from "@elementor/ui";
1376
1421
  var COUNT_SUMMARY_CIRCLE_SIZE = 64;
1377
1422
  var COUNT_SUMMARY_BORDER_WIDTH = 4;
@@ -1382,7 +1427,7 @@ function chipBorderColor(theme, color) {
1382
1427
  return theme.palette[color].main;
1383
1428
  }
1384
1429
  function CountSummaryCircle({ ariaLabel, color, count, label, onClick }) {
1385
- return /* @__PURE__ */ React17.createElement(
1430
+ return /* @__PURE__ */ React18.createElement(
1386
1431
  Box14,
1387
1432
  {
1388
1433
  "aria-label": ariaLabel,
@@ -1401,7 +1446,7 @@ function CountSummaryCircle({ ariaLabel, color, count, label, onClick }) {
1401
1446
  padding: 0
1402
1447
  }
1403
1448
  },
1404
- /* @__PURE__ */ React17.createElement(
1449
+ /* @__PURE__ */ React18.createElement(
1405
1450
  Chip2,
1406
1451
  {
1407
1452
  color,
@@ -1423,17 +1468,17 @@ function CountSummaryCircle({ ariaLabel, color, count, label, onClick }) {
1423
1468
  })
1424
1469
  }
1425
1470
  ),
1426
- /* @__PURE__ */ React17.createElement(Typography11, { color: "text.secondary", sx: { textAlign: "center" }, variant: "caption" }, label)
1471
+ /* @__PURE__ */ React18.createElement(Typography11, { color: "text.secondary", sx: { textAlign: "center" }, variant: "caption" }, label)
1427
1472
  );
1428
1473
  }
1429
1474
 
1430
1475
  // src/components/score-bar.tsx
1431
- import * as React18 from "react";
1476
+ import * as React19 from "react";
1432
1477
  import { ChevronRightIcon as ChevronRightIcon2 } from "@elementor/icons";
1433
1478
  import { Box as Box15, LinearProgress, Rotate as Rotate3, Typography as Typography12, useTheme as useTheme3 } from "@elementor/ui";
1434
1479
  function ScoreBar({ label, score, onClick }) {
1435
1480
  const isRtl = "rtl" === useTheme3().direction;
1436
- return /* @__PURE__ */ React18.createElement(
1481
+ return /* @__PURE__ */ React19.createElement(
1437
1482
  Box15,
1438
1483
  {
1439
1484
  role: onClick ? "button" : void 0,
@@ -1450,8 +1495,8 @@ function ScoreBar({ label, score, onClick }) {
1450
1495
  py: 0.5
1451
1496
  }
1452
1497
  },
1453
- /* @__PURE__ */ React18.createElement(Typography12, { variant: "body2", sx: { minWidth: 96 } }, label),
1454
- /* @__PURE__ */ React18.createElement(
1498
+ /* @__PURE__ */ React19.createElement(Typography12, { variant: "body2", sx: { minWidth: 96 } }, label),
1499
+ /* @__PURE__ */ React19.createElement(
1455
1500
  LinearProgress,
1456
1501
  {
1457
1502
  variant: "determinate",
@@ -1460,7 +1505,7 @@ function ScoreBar({ label, score, onClick }) {
1460
1505
  sx: { flex: 1, height: 6, borderRadius: 4, bgcolor: "action.disabledBackground" }
1461
1506
  }
1462
1507
  ),
1463
- /* @__PURE__ */ React18.createElement(
1508
+ /* @__PURE__ */ React19.createElement(
1464
1509
  Typography12,
1465
1510
  {
1466
1511
  variant: "body2",
@@ -1469,18 +1514,18 @@ function ScoreBar({ label, score, onClick }) {
1469
1514
  },
1470
1515
  score
1471
1516
  ),
1472
- onClick && /* @__PURE__ */ React18.createElement(Rotate3, { in: isRtl }, /* @__PURE__ */ React18.createElement(ChevronRightIcon2, { fontSize: "small", color: "action" }))
1517
+ onClick && /* @__PURE__ */ React19.createElement(Rotate3, { in: isRtl }, /* @__PURE__ */ React19.createElement(ChevronRightIcon2, { fontSize: "small", color: "action" }))
1473
1518
  );
1474
1519
  }
1475
1520
 
1476
1521
  // src/components/score-circle.tsx
1477
- import * as React19 from "react";
1522
+ import * as React20 from "react";
1478
1523
  import { Box as Box16, CircularProgress as CircularProgress2, Typography as Typography13 } from "@elementor/ui";
1479
1524
  var SCORE_CIRCLE_SIZE = 88;
1480
1525
  var SCORE_CIRCLE_THICKNESS = 3;
1481
1526
  function ScoreCircle({ color, score }) {
1482
1527
  const progressColor = color ?? getScoreTier(score).color;
1483
- return /* @__PURE__ */ React19.createElement(
1528
+ return /* @__PURE__ */ React20.createElement(
1484
1529
  Box16,
1485
1530
  {
1486
1531
  role: "progressbar",
@@ -1489,7 +1534,7 @@ function ScoreCircle({ color, score }) {
1489
1534
  "aria-valuemax": 100,
1490
1535
  sx: { position: "relative", display: "inline-flex" }
1491
1536
  },
1492
- /* @__PURE__ */ React19.createElement(
1537
+ /* @__PURE__ */ React20.createElement(
1493
1538
  CircularProgress2,
1494
1539
  {
1495
1540
  variant: "determinate",
@@ -1499,7 +1544,7 @@ function ScoreCircle({ color, score }) {
1499
1544
  sx: { color: "action.disabledBackground" }
1500
1545
  }
1501
1546
  ),
1502
- /* @__PURE__ */ React19.createElement(
1547
+ /* @__PURE__ */ React20.createElement(
1503
1548
  CircularProgress2,
1504
1549
  {
1505
1550
  variant: "determinate",
@@ -1510,7 +1555,7 @@ function ScoreCircle({ color, score }) {
1510
1555
  sx: { position: "absolute", left: 0 }
1511
1556
  }
1512
1557
  ),
1513
- /* @__PURE__ */ React19.createElement(
1558
+ /* @__PURE__ */ React20.createElement(
1514
1559
  Box16,
1515
1560
  {
1516
1561
  sx: {
@@ -1521,7 +1566,7 @@ function ScoreCircle({ color, score }) {
1521
1566
  justifyContent: "center"
1522
1567
  }
1523
1568
  },
1524
- /* @__PURE__ */ React19.createElement(
1569
+ /* @__PURE__ */ React20.createElement(
1525
1570
  Typography13,
1526
1571
  {
1527
1572
  variant: "h4",
@@ -1559,7 +1604,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1559
1604
  const severityCounts = countSeverities(report);
1560
1605
  const statusCounts = auditStatusDisplayCounts(report);
1561
1606
  const overallScore = getScoreTier(report.overall);
1562
- return /* @__PURE__ */ React20.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React20.createElement(Box17, { sx: { display: "flex", alignItems: "center", gap: 2 } }, /* @__PURE__ */ React20.createElement(ScoreCircle, { color: overallScore.color, score: report.overall }), /* @__PURE__ */ React20.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React20.createElement(
1607
+ return /* @__PURE__ */ React21.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React21.createElement(Box17, { sx: { display: "flex", alignItems: "center", gap: 2 } }, /* @__PURE__ */ React21.createElement(ScoreCircle, { color: overallScore.color, score: report.overall }), /* @__PURE__ */ React21.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React21.createElement(
1563
1608
  Chip3,
1564
1609
  {
1565
1610
  label: overallScore.label,
@@ -1568,7 +1613,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1568
1613
  size: "small",
1569
1614
  sx: { fontWeight: 600, alignSelf: "flex-start" }
1570
1615
  }
1571
- ), /* @__PURE__ */ React20.createElement(Typography14, { variant: "body2", color: "text.secondary" }, __19("Overall score", "elementor")))), /* @__PURE__ */ React20.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 2 } }, populatedCategories.map((category) => /* @__PURE__ */ React20.createElement(
1616
+ ), /* @__PURE__ */ React21.createElement(Typography14, { variant: "body2", color: "text.secondary" }, __19("Overall score", "elementor")))), /* @__PURE__ */ React21.createElement(Box17, { sx: { display: "flex", flexDirection: "column", gap: 2 } }, populatedCategories.map((category) => /* @__PURE__ */ React21.createElement(
1572
1617
  ScoreBar,
1573
1618
  {
1574
1619
  key: category,
@@ -1576,7 +1621,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1576
1621
  score: report.categories[category].score,
1577
1622
  onClick: () => onCategoryClick(category)
1578
1623
  }
1579
- ))), /* @__PURE__ */ React20.createElement(Divider, null), /* @__PURE__ */ React20.createElement(Typography14, { variant: "subtitle1", fontWeight: "bold" }, __19("Audit statuses", "elementor")), /* @__PURE__ */ React20.createElement(Box17, { sx: { display: "flex", justifyContent: "space-around", gap: 2 } }, STATUS_GROUPS.map((status) => /* @__PURE__ */ React20.createElement(
1624
+ ))), /* @__PURE__ */ React21.createElement(Divider, null), /* @__PURE__ */ React21.createElement(Typography14, { variant: "subtitle1", fontWeight: "bold" }, __19("Audit statuses", "elementor")), /* @__PURE__ */ React21.createElement(Box17, { sx: { display: "flex", justifyContent: "space-around", gap: 2 } }, STATUS_GROUPS.map((status) => /* @__PURE__ */ React21.createElement(
1580
1625
  CountSummaryCircle,
1581
1626
  {
1582
1627
  key: status,
@@ -1586,7 +1631,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1586
1631
  label: auditStatusLabel(status),
1587
1632
  onClick: () => onStatusClick(status)
1588
1633
  }
1589
- ))), /* @__PURE__ */ React20.createElement(Divider, null), /* @__PURE__ */ React20.createElement(Typography14, { variant: "subtitle1", fontWeight: "bold" }, __19("Remaining issues", "elementor")), /* @__PURE__ */ React20.createElement(
1634
+ ))), /* @__PURE__ */ React21.createElement(Divider, null), /* @__PURE__ */ React21.createElement(Typography14, { variant: "subtitle1", fontWeight: "bold" }, __19("Remaining issues", "elementor")), /* @__PURE__ */ React21.createElement(
1590
1635
  Box17,
1591
1636
  {
1592
1637
  component: "ul",
@@ -1601,7 +1646,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1601
1646
  },
1602
1647
  ALL_SEVERITIES.map((severity) => {
1603
1648
  const count = severityCounts[severity];
1604
- return /* @__PURE__ */ React20.createElement(
1649
+ return /* @__PURE__ */ React21.createElement(
1605
1650
  Box17,
1606
1651
  {
1607
1652
  "aria-label": severityRemainingCountLabel(severity, count),
@@ -1609,9 +1654,9 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
1609
1654
  key: severity,
1610
1655
  sx: { alignItems: "center", display: "flex", gap: 0.5 }
1611
1656
  },
1612
- /* @__PURE__ */ React20.createElement(SeverityIcon, { severity }),
1613
- /* @__PURE__ */ React20.createElement(Typography14, { variant: "body2", fontWeight: "bold" }, count),
1614
- /* @__PURE__ */ React20.createElement(Typography14, { variant: "body2" }, severityPluralLabel(severity))
1657
+ /* @__PURE__ */ React21.createElement(SeverityIcon, { severity }),
1658
+ /* @__PURE__ */ React21.createElement(Typography14, { variant: "body2", fontWeight: "bold" }, count),
1659
+ /* @__PURE__ */ React21.createElement(Typography14, { variant: "body2" }, severityPluralLabel(severity))
1615
1660
  );
1616
1661
  })
1617
1662
  ));
@@ -1650,7 +1695,7 @@ function ReportShell({ report }) {
1650
1695
  setActivePage(activePage.backTo);
1651
1696
  }
1652
1697
  };
1653
- return /* @__PURE__ */ React21.createElement(Box18, null, /* @__PURE__ */ React21.createElement(
1698
+ return /* @__PURE__ */ React22.createElement(Box18, null, /* @__PURE__ */ React22.createElement(
1654
1699
  Tabs,
1655
1700
  {
1656
1701
  "aria-label": __20("Audit navigation", "elementor"),
@@ -1662,30 +1707,30 @@ function ReportShell({ report }) {
1662
1707
  centered: true,
1663
1708
  variant: "fullWidth"
1664
1709
  },
1665
- /* @__PURE__ */ React21.createElement(Tab, { value: "overview", label: __20("Overview", "elementor") }),
1666
- /* @__PURE__ */ React21.createElement(Tab, { value: "issues", label: __20("Issues", "elementor") })
1667
- ), /* @__PURE__ */ React21.createElement(Divider2, null), activePage === "overview" && /* @__PURE__ */ React21.createElement(
1710
+ /* @__PURE__ */ React22.createElement(Tab, { value: "overview", label: __20("Overview", "elementor") }),
1711
+ /* @__PURE__ */ React22.createElement(Tab, { value: "issues", label: __20("Issues", "elementor") })
1712
+ ), /* @__PURE__ */ React22.createElement(Divider2, null), activePage === "overview" && /* @__PURE__ */ React22.createElement(
1668
1713
  OverviewPage,
1669
1714
  {
1670
1715
  report,
1671
1716
  onCategoryClick: (category) => openCategory(category, "overview"),
1672
1717
  onStatusClick: (status) => openAllAudits(status, "overview")
1673
1718
  }
1674
- ), activePage === "issues" && /* @__PURE__ */ React21.createElement(
1719
+ ), activePage === "issues" && /* @__PURE__ */ React22.createElement(
1675
1720
  IssuesPage,
1676
1721
  {
1677
1722
  report,
1678
1723
  onCategoryClick: (category) => openCategory(category, "issues"),
1679
1724
  onAllAuditsClick: () => openAllAudits()
1680
1725
  }
1681
- ), isAllAuditsPage(activePage) && /* @__PURE__ */ React21.createElement(
1726
+ ), isAllAuditsPage(activePage) && /* @__PURE__ */ React22.createElement(
1682
1727
  AllAuditsPage,
1683
1728
  {
1684
1729
  report,
1685
1730
  initialExpandedStatus: activePage.expand,
1686
1731
  onBack: backFromSubPage
1687
1732
  }
1688
- ), isCategoryPage(activePage) && /* @__PURE__ */ React21.createElement(CategoryPage, { category: activePage.category, report, onBack: backFromSubPage }));
1733
+ ), isCategoryPage(activePage) && /* @__PURE__ */ React22.createElement(CategoryPage, { category: activePage.category, report, onBack: backFromSubPage }));
1689
1734
  }
1690
1735
 
1691
1736
  // src/components/audit-panel.tsx
@@ -1694,7 +1739,7 @@ function AuditPanel() {
1694
1739
  const currentDocumentId = getCurrentDocumentId2() ?? 0;
1695
1740
  const onRun = () => run(currentDocumentId);
1696
1741
  const lastScanLabel = report ? new Date(report.runAt).toLocaleTimeString() : null;
1697
- return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(
1742
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
1698
1743
  FloatingPanelHeader,
1699
1744
  {
1700
1745
  panelId: "audit-panel",
@@ -1702,8 +1747,8 @@ function AuditPanel() {
1702
1747
  badge: __21("Beta", "elementor"),
1703
1748
  titleVariant: "subtitle2"
1704
1749
  }
1705
- ), /* @__PURE__ */ React22.createElement(FloatingPanelBody, null, status === "idle" && /* @__PURE__ */ React22.createElement(WelcomePage, null), status === "loading" && /* @__PURE__ */ React22.createElement(LoadingPage, null), status === "error" && /* @__PURE__ */ React22.createElement(ErrorPage, { message: error ?? "", onRetry: onRun }), status === "ready" && report && /* @__PURE__ */ React22.createElement(ReportShell, { report })), /* @__PURE__ */ React22.createElement(FloatingPanelFooter, null, lastScanLabel ? /* @__PURE__ */ React22.createElement(Typography15, { variant: "caption", sx: { flex: 1 } }, __21("Last scan:", "elementor"), " ", lastScanLabel) : /* @__PURE__ */ React22.createElement(Box19, { sx: { flex: 1 } }), lastScanLabel && /* @__PURE__ */ React22.createElement(AuditFeedback, null), /* @__PURE__ */ React22.createElement(
1706
- Button4,
1750
+ ), /* @__PURE__ */ React23.createElement(FloatingPanelBody, null, status === "idle" && /* @__PURE__ */ React23.createElement(WelcomePage, null), status === "loading" && /* @__PURE__ */ React23.createElement(LoadingPage, null), status === "error" && /* @__PURE__ */ React23.createElement(ErrorPage, { message: error ?? "", onRetry: onRun }), status === "ready" && report && /* @__PURE__ */ React23.createElement(ReportShell, { report })), /* @__PURE__ */ React23.createElement(FloatingPanelFooter, null, lastScanLabel ? /* @__PURE__ */ React23.createElement(Typography15, { variant: "caption", sx: { flex: 1 } }, __21("Last scan:", "elementor"), " ", lastScanLabel) : /* @__PURE__ */ React23.createElement(Box19, { sx: { flex: 1 } }), lastScanLabel && /* @__PURE__ */ React23.createElement(AuditFeedback, null), /* @__PURE__ */ React23.createElement(
1751
+ Button5,
1707
1752
  {
1708
1753
  variant: "contained",
1709
1754
  size: "small",
@@ -2650,7 +2695,8 @@ var audit16 = {
2650
2695
  {
2651
2696
  auditId: audit16.id,
2652
2697
  label: __38("No privacy policy page is set.", "elementor"),
2653
- externalUrl: ctx.pageContext.privacy_settings_url
2698
+ externalUrl: ctx.pageContext.privacy_settings_url,
2699
+ ctaLabel: __38("Create", "elementor")
2654
2700
  }
2655
2701
  ]
2656
2702
  };
@@ -2690,30 +2736,58 @@ var audit17 = {
2690
2736
  }
2691
2737
  };
2692
2738
 
2693
- // src/audits/sections-and-columns.ts
2739
+ // src/audits/scan-for-cookies.ts
2694
2740
  import { __ as __40 } from "@wordpress/i18n";
2695
2741
  var audit18 = {
2696
- id: "audits/sections-and-columns",
2697
- title: __40("Sections and columns", "elementor"),
2742
+ id: "audits/scan-for-cookies",
2743
+ title: __40("Scan for cookies", "elementor"),
2698
2744
  description: __40(
2745
+ "Your site may be setting cookies you haven't disclosed. Some countries require a banner even without a full consent policy. Scan to see what needs disclosure.",
2746
+ "elementor"
2747
+ ),
2748
+ fixHint: __40("Run a Cookiez scan on this page to see which cookies need disclosure.", "elementor"),
2749
+ categories: ["compliance"],
2750
+ severity: "info",
2751
+ weight: 0,
2752
+ evaluate: (ctx) => {
2753
+ const isReady = ctx.pageContext.cookiez_plugin_installed && ctx.pageContext.cookiez_plugin_active;
2754
+ return {
2755
+ status: "fail",
2756
+ violations: [
2757
+ {
2758
+ auditId: audit18.id,
2759
+ label: __40("This page has not been scanned for cookies yet.", "elementor"),
2760
+ externalUrl: isReady ? ctx.pageContext.cookiez_scan_url : ctx.pageContext.cookiez_plugin_action_url
2761
+ }
2762
+ ]
2763
+ };
2764
+ }
2765
+ };
2766
+
2767
+ // src/audits/sections-and-columns.ts
2768
+ import { __ as __41 } from "@wordpress/i18n";
2769
+ var audit19 = {
2770
+ id: "audits/sections-and-columns",
2771
+ title: __41("Sections and columns", "elementor"),
2772
+ description: __41(
2699
2773
  "Sections and columns are legacy elements. Containers render fewer DOM nodes and are more flexible.",
2700
2774
  "elementor"
2701
2775
  ),
2702
- fixHint: __40("Use the Container Converter to replace each section/column with a container.", "elementor"),
2776
+ fixHint: __41("Use the Container Converter to replace each section/column with a container.", "elementor"),
2703
2777
  categories: ["best-practices", "performance"],
2704
2778
  severity: "warning",
2705
2779
  weight: 7,
2706
2780
  evaluate: (ctx) => {
2707
2781
  if (ctx.elements.tree.length === 0) {
2708
- return { status: "skipped", reason: __40("No elements", "elementor") };
2782
+ return { status: "skipped", reason: __41("No elements", "elementor") };
2709
2783
  }
2710
2784
  const violations = [];
2711
2785
  walkElements(ctx.elements.tree, (node) => {
2712
2786
  if (node.elType === "section" || node.elType === "column") {
2713
2787
  violations.push({
2714
- auditId: audit18.id,
2788
+ auditId: audit19.id,
2715
2789
  elementId: node.id,
2716
- label: node.elType === "section" ? __40("Section element", "elementor") : __40("Column element", "elementor")
2790
+ label: node.elType === "section" ? __41("Section element", "elementor") : __41("Column element", "elementor")
2717
2791
  });
2718
2792
  }
2719
2793
  });
@@ -2722,15 +2796,15 @@ var audit18 = {
2722
2796
  };
2723
2797
 
2724
2798
  // src/audits/site-identity.ts
2725
- import { __ as __41 } from "@wordpress/i18n";
2726
- var audit19 = {
2799
+ import { __ as __42 } from "@wordpress/i18n";
2800
+ var audit20 = {
2727
2801
  id: "audits/site-identity",
2728
- title: __41("Site identity", "elementor"),
2729
- description: __41(
2802
+ title: __42("Site identity", "elementor"),
2803
+ description: __42(
2730
2804
  "Site name, description, logo, and favicon establish your brand and appear in search results and browser tabs.",
2731
2805
  "elementor"
2732
2806
  ),
2733
- fixHint: __41("Open Site Settings \u2192 Site Identity and complete all the missing fields.", "elementor"),
2807
+ fixHint: __42("Open Site Settings \u2192 Site Identity and complete all the missing fields.", "elementor"),
2734
2808
  categories: ["best-practices", "seo"],
2735
2809
  severity: "info",
2736
2810
  weight: 7,
@@ -2739,30 +2813,30 @@ var audit19 = {
2739
2813
  const violations = [];
2740
2814
  if (!identity.site_name_set) {
2741
2815
  violations.push({
2742
- auditId: audit19.id,
2743
- label: __41("Site name is missing or still uses the default.", "elementor"),
2816
+ auditId: audit20.id,
2817
+ label: __42("Site name is missing or still uses the default.", "elementor"),
2744
2818
  targetHint: "site-identity-settings"
2745
2819
  });
2746
2820
  }
2747
2821
  if (!identity.site_description_set) {
2748
2822
  violations.push({
2749
- auditId: audit19.id,
2750
- label: __41("Site description is missing or still uses the default.", "elementor"),
2823
+ auditId: audit20.id,
2824
+ label: __42("Site description is missing or still uses the default.", "elementor"),
2751
2825
  targetHint: "site-identity-settings",
2752
2826
  angieFix: true
2753
2827
  });
2754
2828
  }
2755
2829
  if (!identity.site_logo_set) {
2756
2830
  violations.push({
2757
- auditId: audit19.id,
2758
- label: __41("Site logo is not set.", "elementor"),
2831
+ auditId: audit20.id,
2832
+ label: __42("Site logo is not set.", "elementor"),
2759
2833
  targetHint: "site-identity-settings"
2760
2834
  });
2761
2835
  }
2762
2836
  if (!identity.site_favicon_set) {
2763
2837
  violations.push({
2764
- auditId: audit19.id,
2765
- label: __41("Site favicon is not set.", "elementor"),
2838
+ auditId: audit20.id,
2839
+ label: __42("Site favicon is not set.", "elementor"),
2766
2840
  targetHint: "site-identity-settings"
2767
2841
  });
2768
2842
  }
@@ -2777,19 +2851,19 @@ var audit19 = {
2777
2851
  };
2778
2852
 
2779
2853
  // src/audits/too-many-widgets.ts
2780
- import { __ as __42 } from "@wordpress/i18n";
2854
+ import { __ as __43 } from "@wordpress/i18n";
2781
2855
  var WIDGET_COUNT_THRESHOLD = 100;
2782
- var audit20 = {
2856
+ var audit21 = {
2783
2857
  id: "audits/too-many-widgets",
2784
- title: __42("Too many widgets", "elementor"),
2785
- description: __42("Excessive DOM size caused by too many widgets degrades rendering performance.", "elementor"),
2786
- fixHint: __42("Reduce the number of widgets on the page by removing or combining elements.", "elementor"),
2858
+ title: __43("Too many widgets", "elementor"),
2859
+ description: __43("Excessive DOM size caused by too many widgets degrades rendering performance.", "elementor"),
2860
+ fixHint: __43("Reduce the number of widgets on the page by removing or combining elements.", "elementor"),
2787
2861
  categories: ["best-practices", "performance"],
2788
2862
  severity: "warning",
2789
2863
  weight: 5,
2790
2864
  evaluate: (ctx) => {
2791
2865
  if (ctx.elements.tree.length === 0) {
2792
- return { status: "skipped", reason: __42("No elements", "elementor") };
2866
+ return { status: "skipped", reason: __43("No elements", "elementor") };
2793
2867
  }
2794
2868
  let widgetCount = 0;
2795
2869
  walkElements(ctx.elements.tree, (node) => {
@@ -2804,8 +2878,8 @@ var audit20 = {
2804
2878
  status: "fail",
2805
2879
  violations: [
2806
2880
  {
2807
- auditId: audit20.id,
2808
- label: __42("Page has too many widgets.", "elementor")
2881
+ auditId: audit21.id,
2882
+ label: __43("Page has too many widgets.", "elementor")
2809
2883
  }
2810
2884
  ]
2811
2885
  };
@@ -2819,12 +2893,12 @@ var AUDITS = [
2819
2893
  audit12,
2820
2894
  audit7,
2821
2895
  audit5,
2822
- audit20,
2823
- audit18,
2896
+ audit21,
2897
+ audit19,
2824
2898
  audit3,
2825
2899
  audit10,
2826
2900
  audit4,
2827
- audit19,
2901
+ audit20,
2828
2902
  audit14,
2829
2903
  audit15,
2830
2904
  audit6,
@@ -2833,11 +2907,12 @@ var AUDITS = [
2833
2907
  audit17,
2834
2908
  audit16,
2835
2909
  audit,
2836
- audit2
2910
+ audit2,
2911
+ audit18
2837
2912
  ];
2838
2913
  function registerAllAudits() {
2839
- for (const audit21 of AUDITS) {
2840
- registerAudit(audit21);
2914
+ for (const audit22 of AUDITS) {
2915
+ registerAudit(audit22);
2841
2916
  }
2842
2917
  }
2843
2918