@canonry/canonry 7.94.0 → 7.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agent-workspace/skills/aero/references/ai-traffic-tracking.md +4 -1
- package/assets/agent-workspace/skills/canonry/references/ai-traffic-tracking.md +4 -1
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +12 -4
- package/assets/assets/{AgentSetupPage-BlPXN_oH.js → AgentSetupPage-DBiPrrdJ.js} +4 -4
- package/assets/assets/{AuditHistoryPanel-N8Z4gng7.js → AuditHistoryPanel-DSnIs064.js} +1 -1
- package/assets/assets/{BacklinksPage-DSrgqlkj.js → BacklinksPage-tPiG0nEP.js} +1 -1
- package/assets/assets/{HistoryPage-v2jbUkle.js → HistoryPage-sxYHrfNk.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-B8EbifR2.js +4 -0
- package/assets/assets/ProjectPage-C1_A7iGy.js +11 -0
- package/assets/assets/{RunsPage-CXZJDdnr.js → RunsPage-RE6nLBTv.js} +1 -1
- package/assets/assets/{SettingsPage-CeLvWs_T.js → SettingsPage-Dn93SUD1.js} +1 -1
- package/assets/assets/SiteHealthSection-BEBYoCNu.js +2 -0
- package/assets/assets/ToneBadge-DFlmWh2A.js +60 -0
- package/assets/assets/{TrafficPage-CEsmS5N1.js → TrafficPage-cNokjIJa.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-D31g1FXV.js → TrafficSourceDetailPage-DFGbx0zs.js} +1 -1
- package/assets/assets/{account-context-CGIyok0O.js → account-context-RM43ek4w.js} +1 -1
- package/assets/assets/{agent-trust-copy-B-3akxrd.js → agent-trust-copy-CRZ_oe24.js} +1 -1
- package/assets/assets/{card-BMjN_ofC.js → card-GFeSoV1m.js} +1 -1
- package/assets/assets/{format-helpers-Blu0QNcd.js → format-helpers-4dA9HFgE.js} +1 -1
- package/assets/assets/index-CohgAQ9L.js +60 -0
- package/assets/assets/{query-client-DdwTc28X.js → query-client-B3Z7Vqgv.js} +1 -1
- package/assets/assets/react-query-HC0PcMhZ.js +1 -0
- package/assets/assets/{react-sigma_core.esm.min-5sP0Pb_F.js → react-sigma_core.esm.min-IsYtRW95.js} +1 -1
- package/assets/assets/{server-traffic-403Q1CKm.js → server-traffic-BtWOYZXf.js} +1 -1
- package/assets/assets/{service-ChEbo8oM.js → service-Bu4M0T0x.js} +1 -1
- package/assets/index.html +7 -7
- package/dist/{ads-6RVS23I5.js → ads-NS4KNR2U.js} +3 -3
- package/dist/{agent-N5LH7QNA.js → agent-773TJYGJ.js} +7 -7
- package/dist/{agent-ask-IJV2PWPN.js → agent-ask-MQXNRMAN.js} +3 -3
- package/dist/{agent-conversations-STISIDWB.js → agent-conversations-5EEEEWEQ.js} +3 -3
- package/dist/{agent-journeys-VCP5MD2W.js → agent-journeys-U5ITMUIM.js} +3 -3
- package/dist/{agent-memory-XQQNXRY6.js → agent-memory-6PEE54ST.js} +3 -3
- package/dist/{agent-providers-IW2Q6WPP.js → agent-providers-6D76GSYA.js} +3 -3
- package/dist/{agent-transcript-5XUCHOOT.js → agent-transcript-6M5RYZIR.js} +3 -3
- package/dist/{analytics-RZZZBC4H.js → analytics-WBFQJTHV.js} +3 -3
- package/dist/{apply-X5ZTHGSJ.js → apply-AGNDBHNV.js} +3 -3
- package/dist/{backfill-ZF6RX27O.js → backfill-ZDPS7VON.js} +10 -10
- package/dist/{backlinks-WZ7YUKHH.js → backlinks-TNPNJXPS.js} +3 -3
- package/dist/{bing-Z4A5NHOC.js → bing-5WB7JCBP.js} +3 -3
- package/dist/{bootstrap-OCJ7EIXK.js → bootstrap-XF77XL7U.js} +10 -10
- package/dist/{cdp-YGZFLTFT.js → cdp-NBTJLUPM.js} +7 -7
- package/dist/{chunk-RSBIHKHH.js → chunk-24CUAPPY.js} +4 -4
- package/dist/{chunk-M6DYUCNB.js → chunk-35AEUG77.js} +1 -1
- package/dist/{chunk-S6KJYLOV.js → chunk-377PJ4AT.js} +3 -3
- package/dist/{chunk-R7BX2ZSQ.js → chunk-3FHPUOMW.js} +1 -1
- package/dist/{chunk-K63XX7VY.js → chunk-4GECW7XZ.js} +3 -3
- package/dist/{chunk-3D4VEWDJ.js → chunk-5VLCPNTR.js} +6 -6
- package/dist/{chunk-SFNSSHIN.js → chunk-6X24IDPZ.js} +1 -1
- package/dist/{chunk-XPBEDIXW.js → chunk-CPJX2RWA.js} +2 -2
- package/dist/{chunk-PR5FCYNN.js → chunk-F2O42DSO.js} +21 -21
- package/dist/{chunk-D6KTO5TO.js → chunk-FUMYCZ62.js} +1 -1
- package/dist/{chunk-ECUJEKIO.js → chunk-G6JSK2RY.js} +1 -1
- package/dist/{chunk-YRCKRY3Q.js → chunk-HKUH75YH.js} +2 -2
- package/dist/{chunk-XIHIB7VP.js → chunk-HN2YNYPO.js} +7 -7
- package/dist/{chunk-IUDXV6PH.js → chunk-I663X7WB.js} +2 -2
- package/dist/{chunk-RJLSGCOI.js → chunk-IO4BZLM7.js} +2 -2
- package/dist/{chunk-BL4CZJYJ.js → chunk-JGLX5WU6.js} +115 -3
- package/dist/{chunk-NUBADAA4.js → chunk-JLC3CCFM.js} +4 -4
- package/dist/{chunk-VGAQH7KI.js → chunk-KCKUCJOG.js} +1 -1
- package/dist/{chunk-55EFIQP7.js → chunk-LXKWFM74.js} +2 -2
- package/dist/{chunk-N6MXZ5SC.js → chunk-MAOKDX3W.js} +5 -5
- package/dist/{chunk-UPBQHUE6.js → chunk-MJIL4BWR.js} +3 -3
- package/dist/{chunk-BJAOD3NW.js → chunk-N4SEITGT.js} +5 -5
- package/dist/{chunk-QDGW75MP.js → chunk-OCXDY2DG.js} +1 -1
- package/dist/{chunk-B5JKQXRN.js → chunk-PC7ZUW2H.js} +2 -2
- package/dist/{chunk-N7PGV6QQ.js → chunk-PSCXQGJE.js} +1027 -816
- package/dist/{chunk-LXJAXAJD.js → chunk-QBIIQF3J.js} +1 -1
- package/dist/{chunk-32N7BGTD.js → chunk-S3HNS2YJ.js} +3 -3
- package/dist/{chunk-CBNDEKI6.js → chunk-SDCH5EBA.js} +1 -1
- package/dist/{chunk-K2JCPF2W.js → chunk-SPWGDODX.js} +368 -368
- package/dist/{chunk-LDY66O7A.js → chunk-SXHD2NFT.js} +4 -4
- package/dist/{chunk-7JQM46YO.js → chunk-UPALIEP2.js} +2 -2
- package/dist/{chunk-NSUB2S4V.js → chunk-W4ZRFNOX.js} +57 -26
- package/dist/{chunk-JDOAULVX.js → chunk-XOCSSHYD.js} +1 -1
- package/dist/{chunk-FM74QGW5.js → chunk-YL77WFHQ.js} +7 -7
- package/dist/{chunk-YGHI3W4D.js → chunk-ZZVRDHSK.js} +1 -1
- package/dist/{citations-IUITVPHO.js → citations-MZ6XQDI3.js} +3 -3
- package/dist/{cli-catalog-IAPKU2RG.js → cli-catalog-QPB2ADGD.js} +3 -3
- package/dist/{cli-commands-FICINBUR.js → cli-commands-RRHOMF6X.js} +7 -7
- package/dist/cli.js +13 -13
- package/dist/{competitor-U5DMMCIA.js → competitor-VF77UMUR.js} +3 -3
- package/dist/{content-ZQIZUNF5.js → content-BINAMQFF.js} +3 -3
- package/dist/{dashboard-KPGX4EQT.js → dashboard-OE4BGMKP.js} +6 -6
- package/dist/{demo-NEWVCEXD.js → demo-3HVJUP3G.js} +1 -1
- package/dist/{demo-server-5GJEGG5K.js → demo-server-BEFPBA7P.js} +14 -14
- package/dist/{discover-HSPVFHKK.js → discover-3XUPBCXL.js} +3 -3
- package/dist/{discover-eval-BYKPJ3DL.js → discover-eval-3DWJPIU2.js} +3 -3
- package/dist/{doctor-CK4BTTWH.js → doctor-KYWVYS74.js} +3 -3
- package/dist/{evidence-BX3CWPCT.js → evidence-DCTXENHR.js} +3 -3
- package/dist/{export-cmd-QMCRDMPZ.js → export-cmd-E5OUTSMR.js} +3 -3
- package/dist/{ga-RMTUMSEJ.js → ga-KY7MHW2G.js} +4 -4
- package/dist/{gbp-JK67SYLW.js → gbp-2TJ6JACW.js} +3 -3
- package/dist/{google-PJSK6IJV.js → google-BZKYIIA6.js} +4 -4
- package/dist/{google-marketing-UQ2FONXU.js → google-marketing-6ACZP4JB.js} +1 -1
- package/dist/{health-cmd-ZDXFD53P.js → health-cmd-LCVJY5MG.js} +3 -3
- package/dist/{history-OYL7SPEY.js → history-MAZOPZZ5.js} +3 -3
- package/dist/index.d.ts +213 -35
- package/dist/index.js +25 -25
- package/dist/{init-DZUNAQBN.js → init-Z35R7A6X.js} +12 -12
- package/dist/{insights-AIBLDPX6.js → insights-PAZHZP74.js} +3 -3
- package/dist/intelligence-service-YA7PBFQV.js +16 -0
- package/dist/{journeys-EDEET2EC.js → journeys-H6OPK5XY.js} +3 -3
- package/dist/{keys-SEZQTYGJ.js → keys-DF6LV4T5.js} +3 -3
- package/dist/{keyword-6FJIWTHW.js → keyword-ILICCRQK.js} +3 -3
- package/dist/{logs-EML2KKOP.js → logs-PKKCPDIN.js} +3 -3
- package/dist/{mcp-AA5QUNBZ.js → mcp-7GVOYYX4.js} +4 -4
- package/dist/mcp.js +9 -9
- package/dist/{measurement-plan-ALHRGRPH.js → measurement-plan-V7E7UHE2.js} +5 -5
- package/dist/{notify-EVTI3SWQ.js → notify-ISU7XBAW.js} +3 -3
- package/dist/{organic-evidence-EXQQ6R7H.js → organic-evidence-FIL7YJ4Z.js} +3 -3
- package/dist/{overview-5CIFLSDG.js → overview-NVBLGY53.js} +4 -4
- package/dist/{project-DNDENHRU.js → project-NSNMLL3Z.js} +3 -3
- package/dist/{query-ETMHFVKZ.js → query-TPZUUJ4X.js} +3 -3
- package/dist/{research-Q5X46CR5.js → research-WILAIDCK.js} +3 -3
- package/dist/{results-export-DZZANVYY.js → results-export-XP7XUKI2.js} +3 -3
- package/dist/{run-OQJXRJ42.js → run-L646IKUB.js} +4 -4
- package/dist/{schedule-6AI3J2AB.js → schedule-I2LW344O.js} +3 -3
- package/dist/{search-7TAJBSHE.js → search-7EBWXQ6X.js} +3 -3
- package/dist/{serve-WD44V3TK.js → serve-LNBKTV5N.js} +26 -26
- package/dist/{session-LTKCS763.js → session-U2OPQSJE.js} +13 -13
- package/dist/{settings-EUMYGNIV.js → settings-IGJ6ZA7C.js} +3 -3
- package/dist/{sitemaps-I4QPLAZW.js → sitemaps-B4G4PXIE.js} +3 -3
- package/dist/{skills-PTYYU3FR.js → skills-WQXXY2HN.js} +2 -2
- package/dist/{snapshot-62FF4GEA.js → snapshot-2TD4WIEO.js} +3 -3
- package/dist/{src-LRYXRHLW.js → src-DI4RNYAG.js} +4 -2
- package/dist/{status-VRWPYTY3.js → status-SKGGPZFE.js} +4 -4
- package/dist/{technical-aeo-OKZW2GAX.js → technical-aeo-AFAXF5M5.js} +3 -3
- package/dist/{telemetry-RRTHKD6W.js → telemetry-ZRRX7I75.js} +4 -4
- package/dist/{tools-F7WCCKZW.js → tools-RY7ZXQJ5.js} +11 -11
- package/dist/{traffic-H6RDZWGG.js → traffic-LA3FZKID.js} +9 -9
- package/dist/{trends-RZOQW2LE.js → trends-GUUBTBCO.js} +3 -3
- package/dist/{users-KFBCBA3V.js → users-W44TRUSL.js} +3 -3
- package/dist/{visibility-stats-53OZR3UN.js → visibility-stats-KMKV4TF5.js} +3 -3
- package/dist/{wordpress-2BXU6FDI.js → wordpress-FNLXVJDO.js} +3 -3
- package/package.json +1 -1
- package/assets/assets/MeasurementPropertyPage-C1eIWJPD.js +0 -4
- package/assets/assets/ProjectPage-Ho61hE8f.js +0 -11
- package/assets/assets/SiteHealthSection-C2Ys7rzL.js +0 -2
- package/assets/assets/ToneBadge-C49669Ol.js +0 -60
- package/assets/assets/index-B-t8djQ-.js +0 -60
- package/assets/assets/react-query-dnbkXy7A.js +0 -1
- package/dist/intelligence-service-YLNZTJQA.js +0 -16
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-I663X7WB.js";
|
|
4
|
+
import "./chunk-ZZVRDHSK.js";
|
|
5
5
|
import {
|
|
6
6
|
emitJsonl
|
|
7
7
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
RatioUnits,
|
|
14
14
|
SiteAuditIssueRecommendationScopes,
|
|
15
15
|
formatPercent
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-W4ZRFNOX.js";
|
|
17
17
|
import "./chunk-MLKGABMK.js";
|
|
18
18
|
|
|
19
19
|
// src/commands/technical-aeo.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTelemetryStatus,
|
|
3
3
|
setTelemetryPreference
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LXKWFM74.js";
|
|
5
5
|
import {
|
|
6
6
|
createApiClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-I663X7WB.js";
|
|
8
8
|
import {
|
|
9
9
|
configExists,
|
|
10
10
|
getConfigPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZZVRDHSK.js";
|
|
12
12
|
import "./chunk-AOJU5LKX.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-HGMYEDAQ.js";
|
|
18
18
|
import {
|
|
19
19
|
normalizeTelemetryStatus
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-W4ZRFNOX.js";
|
|
21
21
|
import "./chunk-MLKGABMK.js";
|
|
22
22
|
|
|
23
23
|
// src/commands/telemetry.ts
|
|
@@ -11,19 +11,19 @@ import {
|
|
|
11
11
|
buildAllTools,
|
|
12
12
|
buildReadTools,
|
|
13
13
|
isAeroToolProfile
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-JLC3CCFM.js";
|
|
15
|
+
import "./chunk-I663X7WB.js";
|
|
16
|
+
import "./chunk-ZZVRDHSK.js";
|
|
17
|
+
import "./chunk-HN2YNYPO.js";
|
|
18
|
+
import "./chunk-35AEUG77.js";
|
|
19
|
+
import "./chunk-KCKUCJOG.js";
|
|
20
20
|
import "./chunk-AOJU5LKX.js";
|
|
21
21
|
import "./chunk-HGMYEDAQ.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-PSCXQGJE.js";
|
|
23
|
+
import "./chunk-OCXDY2DG.js";
|
|
24
|
+
import "./chunk-SDCH5EBA.js";
|
|
25
|
+
import "./chunk-JGLX5WU6.js";
|
|
26
|
+
import "./chunk-W4ZRFNOX.js";
|
|
27
27
|
import "./chunk-MLKGABMK.js";
|
|
28
28
|
export {
|
|
29
29
|
AERO_ADS_OPERATOR_CONTEXT_TOOL_NAME,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getCloudflareTrafficConnectionBySourceId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6X24IDPZ.js";
|
|
4
4
|
import {
|
|
5
5
|
createApiClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I663X7WB.js";
|
|
7
7
|
import {
|
|
8
8
|
loadConfigRaw
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZZVRDHSK.js";
|
|
10
10
|
import {
|
|
11
11
|
emitJsonl
|
|
12
12
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -23,12 +23,11 @@ import {
|
|
|
23
23
|
DEFAULT_BOT_LIST,
|
|
24
24
|
generateWorkerScript,
|
|
25
25
|
generateWranglerToml
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-OCXDY2DG.js";
|
|
27
27
|
import {
|
|
28
28
|
RunStatuses,
|
|
29
29
|
TRAFFIC_EVENT_KIND_FILTER_HINT,
|
|
30
30
|
TrafficEventKinds,
|
|
31
|
-
TrafficSeriesGranularities,
|
|
32
31
|
describeError,
|
|
33
32
|
formatPercent,
|
|
34
33
|
formatValidationIssues,
|
|
@@ -36,8 +35,9 @@ import {
|
|
|
36
35
|
parseTrafficEventKindFilter,
|
|
37
36
|
referralAssessmentQuerySchema,
|
|
38
37
|
trafficSamplesQuerySchema,
|
|
38
|
+
trafficSeriesGranularitySchema,
|
|
39
39
|
trafficUnrecognizedAgentsQuerySchema
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-W4ZRFNOX.js";
|
|
41
41
|
import "./chunk-MLKGABMK.js";
|
|
42
42
|
|
|
43
43
|
// src/commands/traffic.ts
|
|
@@ -1286,11 +1286,11 @@ async function trafficEvents(project, opts) {
|
|
|
1286
1286
|
details: { project, kind: opts.kind }
|
|
1287
1287
|
});
|
|
1288
1288
|
}
|
|
1289
|
-
if (opts.granularity &&
|
|
1289
|
+
if (opts.granularity && !trafficSeriesGranularitySchema.safeParse(opts.granularity).success) {
|
|
1290
1290
|
throw new CliError({
|
|
1291
1291
|
code: "TRAFFIC_INVALID_GRANULARITY",
|
|
1292
|
-
message: `--granularity must be one of: ${
|
|
1293
|
-
displayMessage: `Error: --granularity must be "
|
|
1292
|
+
message: `--granularity must be one of: ${trafficSeriesGranularitySchema.options.join(", ")}`,
|
|
1293
|
+
displayMessage: `Error: --granularity must be "hour", "day" or "month"`,
|
|
1294
1294
|
details: { project, granularity: opts.granularity }
|
|
1295
1295
|
});
|
|
1296
1296
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-I663X7WB.js";
|
|
4
|
+
import "./chunk-ZZVRDHSK.js";
|
|
5
5
|
import "./chunk-AOJU5LKX.js";
|
|
6
6
|
import {
|
|
7
7
|
isMachineFormat
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
TrendUnits,
|
|
12
12
|
formatPercent,
|
|
13
13
|
formatSignedPointDelta
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-W4ZRFNOX.js";
|
|
15
15
|
import "./chunk-MLKGABMK.js";
|
|
16
16
|
|
|
17
17
|
// src/commands/trends.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-I663X7WB.js";
|
|
4
|
+
import "./chunk-ZZVRDHSK.js";
|
|
5
5
|
import {
|
|
6
6
|
emitJsonl
|
|
7
7
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
USER_PASSWORD_MIN_LENGTH,
|
|
15
15
|
UserRoles,
|
|
16
16
|
formatIsoDate
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-W4ZRFNOX.js";
|
|
18
18
|
import "./chunk-MLKGABMK.js";
|
|
19
19
|
|
|
20
20
|
// src/cli-prompt.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-I663X7WB.js";
|
|
4
|
+
import "./chunk-ZZVRDHSK.js";
|
|
5
5
|
import {
|
|
6
6
|
emitJsonl
|
|
7
7
|
} from "./chunk-Z7IUAJOF.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
isVisibilityCompareClassMetric,
|
|
15
15
|
shareOfVoiceLabel,
|
|
16
16
|
shareOfVoiceReason
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-W4ZRFNOX.js";
|
|
18
18
|
import "./chunk-MLKGABMK.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/visibility-stats.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createApiClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-I663X7WB.js";
|
|
4
|
+
import "./chunk-ZZVRDHSK.js";
|
|
5
5
|
import "./chunk-AOJU5LKX.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError,
|
|
8
8
|
isMachineFormat
|
|
9
9
|
} from "./chunk-HGMYEDAQ.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-W4ZRFNOX.js";
|
|
11
11
|
import "./chunk-MLKGABMK.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/wordpress.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonry/canonry",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.96.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Self-hosted AI visibility (AEO) platform: track how ChatGPT, Claude, Gemini, and Perplexity cite your domain, join it with Search Console, GA4, server-side traffic, and paid media, and fix what you find through agent tools (CLI, REST, MCP). Local SQLite.",
|
|
6
6
|
"keywords": [
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{ct as t,ot as n}from"./vendor-lucide-Bo69m9KC.js";import{r}from"./vendor-markdown-BiRP51B0.js";import{_ as i,b as a,d as o,f as s,g as c,p as l,u}from"./vendor-tanstack-tBjrfzKu.js";import{$r as d,Ct as f,Kr as p,Pi as ee,ci as m,mt as h,ot as te,qr as g,r as _,t as v}from"./ToneBadge-C49669Ol.js";import{g as y,i as b,y as x}from"./format-helpers-Blu0QNcd.js";import{r as ne}from"./account-context-CGIyok0O.js";import{_t as S,ct as re,dn as C,dt as w,lt as ie,mt as T,st as E,ut as D}from"./react-query-dnbkXy7A.js";import{f as O,h as k}from"./ChartPrimitives-Cs2iavxU.js";import{t as A}from"./InfoTooltip-CNLlIWeP.js";import{I as j,K as M,L as N,Q as ae,U as oe,X as P,Y as se,fn as ce,lt as F,mn as le,st as I,un as ue,z as de}from"./index-B-t8djQ-.js";import{c as L,r as R,s as fe,t as z}from"./service-ChEbo8oM.js";var B=e(t(),1),V=r(),H={heading:`Names that count as this Property`,help:`An answer mentions this Property when its text contains one of these names as whole words. Source titles and source links never count, but a link in the answer whose text is one of these names does. Qualified names are longer forms, such as the name with its street or city, for a name that other places share.`,names:`Names`,qualifiedNames:`Qualified names`,noNames:`No names are set, so answers can cite this Property but never mention it.`,edit:`Edit names`,save:`Save to draft`,saving:`Saving…`,cancel:`Cancel`,namesHint:`One name per line.`,qualifiedHint:`One per line. Each must include one of the names above plus more words, such as a street or city.`,qualifiedNote:`With qualified names set, an answer that uses only a plain name counts as a mention only when it also cites this Property’s own page. Otherwise it is left out as not tied to one property.`,draftOnly:`Saving changes the draft only. Nothing is measured differently until the setup is published.`,saved:`Saved to the draft. Publish the setup to start using these names.`,pending:`Name changes are saved in the draft and not published yet.`,review:`Review and publish`,noChanges:`No changes to save.`,staleDraft:`The draft is based on an older published setup. Open measurement setup to restart it before editing names.`,missingFromDraft:`This Property is not included in the current draft. Open measurement setup to review it.`,conflict:`The draft changed in another session. The latest names are loaded; review them and save again.`,failed:`Could not save these names. Try again.`};function U(e){return[...new Set(e.split(`
|
|
2
|
-
`).map(e=>e.trim()).filter(Boolean))]}function W(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function G(e,t){return W(e.aliases,t.aliases)&&W(e.identityAliases??[],t.identityAliases??[])}function pe(e,t,n){let{identityAliases:r,...i}=e;return n.length>0?{...i,aliases:t,identityAliases:n}:{...i,aliases:t}}function me({label:e,names:t}){return(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`h3`,{className:`text-heading-14 text-heading`,children:e}),(0,V.jsx)(`ul`,{className:`space-y-1`,children:t.map(e=>(0,V.jsx)(`li`,{className:`text-label-14 text-secondary`,children:e},e))})]})}function he({id:e,issues:t}){return t.length===0?null:(0,V.jsx)(`ul`,{id:e,className:`mt-2 space-y-1`,"aria-label":`Name warnings`,children:t.map(e=>(0,V.jsx)(`li`,{className:`text-label-14 text-caution`,children:p(e)},`${e.field}:${e.index}`))})}function ge({projectName:e,targetKey:t,published:n,activeRevision:r,publishedBrandNames:o,service:s=z}){let{canWrite:c}=ne(),l=(0,B.useId)(),f=a({...re({client:h,path:{name:e}}),enabled:c}),p=a({...S({client:h,path:{name:e}}),enabled:c}),ee=f.data?.draft?.authoring.targets.find(e=>e.stableKey===t),m=n.identityAliases??[],te=ee!==void 0&&f.data?.draft?.baseActiveRevision===r&&!G(ee,n),v=!f.isFetching&&!p.isPending,y=p.data,b=(0,B.useMemo)(()=>y?d(y):o,[y,o]),[x,C]=(0,B.useState)(!1),[w,ie]=(0,B.useState)(``),[T,E]=(0,B.useState)(``),[D,O]=(0,B.useState)(n),[k,j]=(0,B.useState)(null),M=`${e}\u0000${t}`,[N,ae]=(0,B.useState)(M);N!==M&&(ae(M),C(!1),ie(``),E(``),O(n),j(null));let oe=(0,B.useRef)(M);oe.current=M;let P=(0,B.useMemo)(()=>U(w),[w]),se=(0,B.useMemo)(()=>U(T),[T]),ce=(0,B.useMemo)(()=>g({aliases:P,identityAliases:se,brandNames:b}),[P,se,b]),F=ce.filter(e=>e.field===`aliases`),le=ce.filter(e=>e.field===`identityAliases`);function I(e){ie(e.aliases.join(`
|
|
3
|
-
`)),E((e.identityAliases??[]).join(`
|
|
4
|
-
`)),O({aliases:[...e.aliases],identityAliases:[...e.identityAliases??[]]})}function ue(e){return e.draft?e.draft.authoring.targets.find(e=>e.stableKey===t)??null:n}function L(){I(te?ee:n),j(null),C(!0)}function fe(e){e&&I(e),j({tone:`negative`,text:H.conflict,review:!1})}let W=i({mutationFn:async i=>{let a=await s.loadDraft(e);if(!a.draft){if(G(i.names,n))return{outcome:`unchanged`};if(!G(i.base,n))return{outcome:`conflict`,latest:n};await s.createDraft(e,r),a=await s.loadDraft(e)}let o=a.draft;if(!o||!a.etag)throw Error(H.failed);if(o.baseActiveRevision!==r)return{outcome:`stale`};let c=o.authoring.targets.find(e=>e.stableKey===t);return!c||c.status!==`included`?{outcome:`missing`}:G(i.names,c)?{outcome:`unchanged`}:G(i.base,c)?(await s.upsertTarget(e,a.etag,pe(c,i.names.aliases,i.names.identityAliases)),{outcome:`saved`}):{outcome:`conflict`,latest:c}},meta:{skipGlobalErrorToast:!0},onSuccess:(e,t)=>{if(t.openFor===oe.current)switch(e.outcome){case`saved`:C(!1),j({tone:`positive`,text:H.saved,review:!0});return;case`unchanged`:C(!1),j({tone:`positive`,text:H.noChanges,review:!1});return;case`stale`:j({tone:`negative`,text:H.staleDraft,review:!0});return;case`missing`:j({tone:`negative`,text:H.missingFromDraft,review:!0});return;case`conflict`:fe(e.latest),f.refetch();return}},onError:(e,t)=>{t.openFor===oe.current&&(R(e)?(fe(null),f.refetch().then(e=>{e.isSuccess&&fe(ue(e.data))})):j({tone:`negative`,text:H.failed,review:!1}))}}),ge=(0,V.jsx)(u,{to:`/projects/$projectName/portfolio`,params:{projectName:e},className:`text-link underline-offset-2 hover:underline`,children:H.review}),K=n.aliases.length+m.length;return(0,V.jsxs)(`section`,{"aria-labelledby":`property-names`,className:`page-section-divider`,children:[(0,V.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,V.jsx)(`h2`,{id:`property-names`,className:`text-heading-16 text-heading`,children:H.heading}),(0,V.jsx)(A,{text:H.help})]}),(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,V.jsxs)(`p`,{className:`supporting-copy`,children:[K,` `,K===1?`name`:`names`]}),c&&!x?(0,V.jsx)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,disabled:!v,onClick:L,children:H.edit}):null]})]}),k?(0,V.jsxs)(`p`,{role:k.tone===`negative`?`alert`:`status`,className:`mb-3 text-copy-14 ${k.tone===`negative`?`text-negative`:`text-positive`}`,children:[k.text,k.review?(0,V.jsxs)(V.Fragment,{children:[` `,ge]}):null]}):te&&!x?(0,V.jsxs)(`p`,{role:`status`,className:`mb-3 text-copy-14 text-caution`,children:[H.pending,` `,ge]}):null,x?(0,V.jsxs)(`form`,{className:`space-y-4`,"aria-label":`Edit names`,onSubmit:e=>{e.preventDefault(),!W.isPending&&W.mutate({names:{aliases:P,identityAliases:se},base:D,openFor:M})},children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{htmlFor:`${l}-names`,className:`block text-label-14-strong text-heading`,children:H.names}),(0,V.jsx)(`p`,{id:`${l}-names-hint`,className:`text-copy-14 text-secondary`,children:H.namesHint}),(0,V.jsx)(`textarea`,{id:`${l}-names`,className:`mt-1 min-h-24 w-full rounded-md border border-strong bg-transparent px-3 py-2 text-copy-14 text-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400`,"aria-describedby":`${l}-names-hint${F.length?` ${l}-names-issues`:``}`,value:w,onChange:e=>ie(e.target.value)}),(0,V.jsx)(he,{id:`${l}-names-issues`,issues:F}),P.length===0?(0,V.jsx)(`p`,{className:`mt-2 text-copy-14 text-caution`,children:H.noNames}):null]}),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`label`,{htmlFor:`${l}-qualified`,className:`block text-label-14-strong text-heading`,children:H.qualifiedNames}),(0,V.jsx)(`p`,{id:`${l}-qualified-hint`,className:`text-copy-14 text-secondary`,children:H.qualifiedHint}),(0,V.jsx)(`textarea`,{id:`${l}-qualified`,className:`mt-1 min-h-20 w-full rounded-md border border-strong bg-transparent px-3 py-2 text-copy-14 text-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400`,"aria-describedby":`${l}-qualified-hint ${l}-qualified-note${le.length?` ${l}-qualified-issues`:``}`,value:T,onChange:e=>E(e.target.value)}),(0,V.jsx)(he,{id:`${l}-qualified-issues`,issues:le}),(0,V.jsx)(`p`,{id:`${l}-qualified-note`,className:`mt-2 max-w-3xl text-copy-14 text-secondary`,children:H.qualifiedNote})]}),(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:H.draftOnly}),(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,V.jsx)(de,{type:`submit`,className:`h-11 px-4 text-label-14 md:h-11`,disabled:W.isPending,children:W.isPending?H.saving:H.save}),(0,V.jsx)(_,{type:`button`,variant:`ghost`,className:`h-11 px-4 text-button-14 md:h-11`,disabled:W.isPending,onClick:()=>{C(!1),j(null)},children:H.cancel})]})]}):K===0?(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:H.noNames}):(0,V.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[n.aliases.length>0?(0,V.jsx)(me,{label:H.names,names:n.aliases}):null,m.length>0?(0,V.jsx)(me,{label:H.qualifiedNames,names:m}):null]})]})}var K=50,q={branded:{headline:`When they know your name`,technical:`Branded queries`},"non-brand":{headline:`When they don't`,technical:`Non-brand queries`}},_e={plan_v1:`Setup update required`,no_completed_run:`No completed measurement yet`,no_population:`No queries of this type are assigned`,evidence_incomplete:`Source evidence is incomplete`,identity_ambiguous:x,not_applicable:`Not applicable for this Property`},ve={complete:{label:`Measured`,tone:`positive`},partial:{label:`Partly measured`,tone:`caution`},running:{label:`Measuring now`,tone:`neutral`},queued:{label:`Measurement queued`,tone:`neutral`},failed:{label:`Measurement failed`,tone:`negative`},not_measured:{label:`Not measured`,tone:`neutral`}},J={assigned:{label:`Matches this Property`,tone:`positive`},sibling:{label:`Matches another Property`,tone:`caution`},ownedUnmapped:{label:`Site URL not in a Property`,tone:`caution`},external:{label:`External URL`,tone:`neutral`},ambiguous:{label:`Matches multiple Properties`,tone:`caution`},invalid:{label:`Invalid URL`,tone:`negative`}};function Y(e){return[...e].sort((e,t)=>Number(t.classification===`assigned`)-Number(e.classification===`assigned`))}function ye(e){return`${e.expectedSlotId}:${e.usageEdgeId}`}function be({row:e}){return e.mentioned===null?(0,V.jsxs)(`span`,{className:`inline-flex flex-col items-start gap-0.5`,children:[(0,V.jsx)(v,{tone:`neutral`,children:`Not measured`}),(0,V.jsx)(`span`,{className:`text-label-12 text-muted`,children:`No mention signal for this Property`})]}):!e.mentioned&&e.mentionIdentity===`wrong-subject`?(0,V.jsxs)(`span`,{className:`inline-flex flex-col items-start gap-0.5`,children:[(0,V.jsx)(v,{tone:`neutral`,children:`Not mentioned`}),(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-label-12 text-muted`,children:[F.label,(0,V.jsx)(A,{text:F.property})]})]}):(0,V.jsx)(v,{tone:e.mentioned?`positive`:`neutral`,children:e.mentioned?`Mentioned`:`Not mentioned`})}var xe=`—`;function Se({row:e}){return e.cited===null?(0,V.jsxs)(`span`,{className:`inline-flex flex-col items-start gap-0.5`,children:[(0,V.jsx)(v,{tone:`neutral`,children:`Not measured`}),(0,V.jsx)(`span`,{className:`text-label-12 text-muted`,children:`Sources were not fully captured`})]}):(0,V.jsx)(v,{tone:e.cited?`positive`:`neutral`,children:e.cited?`Cited`:`Not cited`})}function Ce({row:e}){return e.cited===null&&e.sources.length===0?(0,V.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,children:`The sources for this answer were not fully captured, so none can be shown.`}):e.sources.length===0?(0,V.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,children:`This answer returned no source URLs at all.`}):(0,V.jsxs)(`details`,{className:`mt-2`,"data-answer-sources":!0,children:[(0,V.jsxs)(`summary`,{className:`min-h-11 cursor-pointer py-3 text-label-14 text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400`,children:[j,` (`,e.sources.length,`)`]}),(0,V.jsx)(`div`,{className:`overflow-x-auto`,children:(0,V.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,V.jsxs)(`caption`,{className:`sr-only`,children:[`Source URLs for `,e.queryText]}),(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`Match`}),(0,V.jsx)(`th`,{children:`URL`})]})}),(0,V.jsx)(`tbody`,{children:Y(e.sources).map(e=>(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`td`,{children:(0,V.jsx)(v,{tone:J[e.classification].tone,children:J[e.classification].label})}),(0,V.jsx)(`td`,{children:(0,V.jsx)(I,{url:e.sourceUrl})})]},e.sourceUrl))})]})})]})}function we({project:e,targetKey:t,resultId:n}){let r=a({...T({client:h,path:{name:e},query:{targetKey:t,resultId:n}})});if(r.isPending)return(0,V.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,role:`status`,"aria-live":`polite`,children:`Loading the answer…`});if(r.isError)return(0,V.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,role:`alert`,children:`Could not load this answer.`});let i=r.data?.answer;return i==null||i.trim()===``?(0,V.jsx)(`p`,{className:`py-2 text-copy-14 text-secondary`,children:`This answer was measured, but its text was not stored.`}):(0,V.jsx)(`div`,{className:`py-2`,children:(0,V.jsx)(N,{headingLevel:4,copyable:!0,children:i})})}function Te(e){return _e[e.reason]??`Not measured`}function X({metric:e,signal:t,emphasis:n=!1}){if(e.state===`unavailable`)return(0,V.jsxs)(`span`,{className:`inline-flex flex-col gap-0.5`,children:[(0,V.jsx)(`span`,{className:n?`text-label-18-strong text-secondary`:`text-label-14-strong text-secondary`,children:`Not measured`}),(0,V.jsx)(`span`,{className:`text-label-14 text-secondary`,children:Te(e)})]});let r=m(e.value),i=e.numerator===void 0||e.denominator===void 0?null:`${e.numerator} of ${e.denominator}`,a=b(e,t);return(0,V.jsxs)(`span`,{className:`inline-flex flex-col gap-0.5 tabular-nums`,children:[(0,V.jsx)(`span`,{className:n?`text-label-18-strong text-heading`:`text-label-14-strong text-primary`,children:r}),i?(0,V.jsx)(`span`,{className:`text-label-12 text-muted`,children:i}):null,a?(0,V.jsx)(`span`,{className:`-ml-2 flex`,children:(0,V.jsx)(A,{tone:`caution`,placement:`bottom`,label:a.label,text:a.text})}):null]})}function Ee(e,t,n){return E({client:h,path:{name:e},query:{scope:`property`,targetKey:t,queryClass:n}})}function De(e){return e?.properties.items.at(0)}function Oe({measuredAt:e,unmeasuredReason:t,queryClass:n}){let r=e===void 0?null:e===null?`No completed check yet`:`Measured ${O(k(e))}`;return r===null&&t===void 0?null:(0,V.jsxs)(`p`,{className:`supporting-copy`,children:[[r,t].filter(Boolean).join(` · `),r!==null&&t===void 0?` · ${q[n].technical.toLocaleLowerCase()} only`:``]})}function ke({project:e,groups:t}){return t.length===0?null:(0,V.jsxs)(`section`,{"aria-labelledby":`property-market`,className:`page-section-divider`,children:[(0,V.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Competitive comparison`}),(0,V.jsxs)(`h2`,{id:`property-market`,className:`text-heading-16 text-heading`,children:[`Measured at the market level`,(0,V.jsx)(A,{text:`Competitors are attached to a market rather than to a single Property, because one building has nobody to be compared against. Share of voice and competitor pressure are reported for the market this Property sits in.`})]})]}),(0,V.jsx)(_,{asChild:!0,type:`button`,size:`sm`,variant:`outline`,children:(0,V.jsx)(u,{to:`/projects/$projectName`,params:{projectName:e},search:e=>P(M(e),{measurementScope:`project`}),children:`Open measurement overview`})})]}),(0,V.jsx)(`ul`,{className:`flex flex-wrap gap-2`,children:t.map(e=>(0,V.jsxs)(`li`,{className:`rounded-md border border-default px-3 py-1.5 text-label-14 text-strong`,children:[e.label,(0,V.jsxs)(`span`,{className:`ml-2 text-label-12 text-muted`,children:[e.competitors.length,` `,e.competitors.length===1?`competitor`:`competitors`]})]},e.stableKey))})]})}function Z({label:e,metric:t,signal:n,failed:r=!1}){if(t===void 0)return(0,V.jsxs)(`div`,{className:`aeo-hero-row`,children:[(0,V.jsx)(`p`,{className:`aeo-hero-row-label`,children:e}),(0,V.jsx)(`p`,{className:`aeo-hero-row-value text-copy-16-strong text-secondary`,children:r?`Unavailable`:`…`}),r?(0,V.jsx)(`div`,{}):(0,V.jsx)(`div`,{className:`aeo-hero-row-bar`,"aria-hidden":`true`}),(0,V.jsx)(`p`,{className:`aeo-hero-row-detail`,children:r?`Could not be loaded`:`Loading`})]});if(t.state===`unavailable`){let n=Te(t);return(0,V.jsxs)(`div`,{className:`aeo-hero-row`,children:[(0,V.jsx)(`p`,{className:`aeo-hero-row-label`,children:e}),(0,V.jsx)(`p`,{className:`aeo-hero-row-value text-copy-16-strong text-secondary`,children:`Not measured`}),(0,V.jsx)(`div`,{}),(0,V.jsx)(`p`,{className:`aeo-hero-row-detail`,children:n===`Not measured`?``:n})]})}let{figure:i,sign:a}=y(m(t.value)),o=t.numerator===void 0||t.denominator===void 0?null:`${t.numerator} of ${t.denominator}`,s=b(t,n);return(0,V.jsxs)(`div`,{className:`aeo-hero-row`,children:[(0,V.jsx)(`p`,{className:`aeo-hero-row-label`,children:e}),(0,V.jsxs)(`p`,{className:`aeo-hero-row-value text-heading`,children:[i,a?(0,V.jsx)(`span`,{className:`text-faint`,children:a}):null]}),(0,V.jsx)(`div`,{className:`aeo-hero-row-bar`,"aria-hidden":`true`,children:(0,V.jsx)(`div`,{className:`metric-card-bar-fill progress-fill-neutral`,style:{width:`${t.value*100}%`}})}),(0,V.jsxs)(`p`,{className:`aeo-hero-row-detail tabular-nums`,children:[o??``,s?(0,V.jsx)(`span`,{className:`block`,children:(0,V.jsx)(A,{tone:`caution`,placement:`bottom`,label:s.label,text:s.text})}):null]})]})}function Ae({branded:e,nonBrand:t,brandedFailed:n=!1,nonBrandFailed:r=!1}){return(0,V.jsxs)(`section`,{"aria-labelledby":`property-coverage-hero`,children:[(0,V.jsx)(`h2`,{id:`property-coverage-hero`,className:`sr-only`,children:`Coverage for this Property`}),(0,V.jsxs)(`div`,{className:`space-y-5`,children:[(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Non-brand · the demand to earn`}),(0,V.jsx)(Z,{label:`Mentioned`,metric:t?.mentionCoverage,signal:`mentioned`,failed:r}),(0,V.jsx)(Z,{label:`Cited`,metric:t?.citationCoverage,signal:`cited`,failed:r})]}),(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Branded · already named`}),(0,V.jsx)(Z,{label:`Mentioned`,metric:e?.mentionCoverage,signal:`mentioned`,failed:n}),(0,V.jsx)(Z,{label:`Cited`,metric:e?.citationCoverage,signal:`cited`,failed:n})]})]})]})}function je({branded:e,nonBrand:t,brandedError:n,nonBrandError:r,onRetry:i}){return(0,V.jsxs)(`section`,{"aria-labelledby":`property-brand-contrast`,children:[(0,V.jsx)(`div`,{className:`section-head section-head-inline`,children:(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`The gap`}),(0,V.jsxs)(`h2`,{id:`property-brand-contrast`,className:`text-heading-16 text-heading`,children:[`Named versus not named`,(0,V.jsx)(A,{text:`Branded queries already contain your name, so an answer engine has an easy path back to you. Non-brand queries describe the need instead, and that is the demand you have to earn. Each row is measured only over the queries assigned to this Property in that class; a class with no assigned query reads Not measured rather than 0%.`})]})]})}),(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,V.jsxs)(`table`,{className:`evidence-table min-w-[560px]`,children:[(0,V.jsx)(`caption`,{className:`sr-only`,children:`Mention and citation coverage for this Property, split by query class`}),(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`Query type`}),(0,V.jsx)(`th`,{children:`Mentioned in the answer`}),(0,V.jsx)(`th`,{children:`Cited as a source`})]})}),(0,V.jsx)(`tbody`,{children:[{queryClass:`branded`,row:e,isError:n},{queryClass:`non-brand`,row:t,isError:r}].map(({queryClass:e,row:t,isError:n})=>(0,V.jsxs)(`tr`,{children:[(0,V.jsxs)(`td`,{children:[(0,V.jsx)(`span`,{className:`block text-label-14-strong text-heading`,children:q[e].headline}),(0,V.jsx)(`span`,{className:`mt-0.5 block text-label-12 text-muted`,children:q[e].technical}),t&&n?(0,V.jsxs)(`span`,{className:`mt-2 flex flex-wrap items-center gap-2 text-label-14 text-caution`,children:[(0,V.jsx)(`span`,{role:`status`,children:`Refresh failed.`}),(0,V.jsxs)(_,{type:`button`,size:`sm`,variant:`ghost`,className:`h-11 px-3 text-button-14 md:h-11`,onClick:()=>i(e),children:[`Retry `,q[e].technical.toLocaleLowerCase()]})]}):null]}),t?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`td`,{children:(0,V.jsx)(X,{metric:t.mentionCoverage,signal:`mentioned`,emphasis:!0})}),(0,V.jsx)(`td`,{children:(0,V.jsx)(X,{metric:t.citationCoverage,signal:`cited`,emphasis:!0})})]}):n?(0,V.jsx)(`td`,{colSpan:2,children:(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,V.jsxs)(`span`,{role:`alert`,children:[`Could not load `,q[e].technical.toLocaleLowerCase(),`.`]}),(0,V.jsxs)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,onClick:()=>i(e),children:[`Retry `,q[e].technical.toLocaleLowerCase()]})]})}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`td`,{children:(0,V.jsx)(`span`,{className:`text-label-14 text-secondary`,children:`Loading…`})}),(0,V.jsx)(`td`,{children:(0,V.jsx)(`span`,{className:`text-label-14 text-secondary`,children:`Loading…`})})]})]},e))})]})})]})}function Me({row:e,queryClass:t,isError:n}){return(0,V.jsxs)(`section`,{"aria-labelledby":`property-providers`,className:`page-section-divider`,children:[(0,V.jsx)(`div`,{className:`section-head section-head-inline`,children:(0,V.jsx)(`div`,{children:(0,V.jsxs)(`h2`,{id:`property-providers`,className:`text-heading-16 text-heading`,children:[`Which engines answer for this Property`,(0,V.jsx)(A,{text:`Each row is measured over the queries that engine actually answered for this Property, so the rows are a split of the same population rather than parts that add up to the Property total. An engine that answered nothing for this Property is absent instead of shown at 0%.`})]})})}),e===void 0&&n?(0,V.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`Details for `,q[t].technical.toLocaleLowerCase(),` are unavailable. Retry that query type above.`]}):e===void 0?(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Loading…`}):e.providers.length===0?(0,V.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`No answer engine has measured `,q[t].technical.toLocaleLowerCase(),` for this Property.`,e.mentionCoverage.state===`unavailable`?` ${Te(e.mentionCoverage)}.`:``]}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,V.jsxs)(`table`,{className:`evidence-table min-w-[520px]`,children:[(0,V.jsx)(`caption`,{className:`sr-only`,children:`Per-engine mention and citation coverage`}),(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`Engine`}),(0,V.jsx)(`th`,{children:`Mentioned`}),(0,V.jsx)(`th`,{children:`Cited`})]})}),(0,V.jsx)(`tbody`,{children:e.providers.map(e=>(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`td`,{className:`text-label-14-strong text-heading`,children:e.provider}),(0,V.jsx)(`td`,{children:(0,V.jsx)(X,{metric:e.mentionCoverage,signal:`mentioned`})}),(0,V.jsx)(`td`,{children:(0,V.jsx)(X,{metric:e.citationCoverage,signal:`cited`})})]},e.provider))})]})})]})}function Ne(e){let t=e.questions.join(` · `);return e.questionsTruncated?`${t} +${e.questionTotal-e.questions.length} more`:t}function Pe({project:e,targetKey:t,queryClass:n}){let r=a({...D({client:h,path:{name:e},query:{targetKey:t,queryClass:n}})});if(r.isPending||r.isError)return null;let i=r.data?.competitors??[],o=r.data?.basis;return(0,V.jsxs)(`section`,{"aria-labelledby":`property-named-instead`,className:`page-section-divider`,children:[(0,V.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,V.jsx)(`div`,{children:(0,V.jsxs)(`h2`,{id:`property-named-instead`,className:`text-heading-16 text-heading`,children:[`Named instead of this Property`,(0,V.jsx)(A,{text:`Counted from the answers that did not name this Property, so a name here is one an engine recommended in its place. Occurrences count answers, not positions: an engine naming the same rival in two answers counts twice, and one naming it twice in a single answer counts once.`})]})}),i.length>0?(0,V.jsxs)(`p`,{className:`supporting-copy`,children:[r.data?.total??i.length,` named`]}):null]}),i.length===0?(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`No rival was named in the answers this Property missed. Nothing to compete with here yet.`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,V.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,V.jsx)(`caption`,{className:`sr-only`,children:`Names the engines gave instead of this Property`}),(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`Named`}),(0,V.jsx)(`th`,{children:`Answers`}),(0,V.jsx)(`th`,{children:`Engines`}),(0,V.jsx)(`th`,{children:`Queries`})]})}),(0,V.jsx)(`tbody`,{children:i.map(e=>(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`td`,{className:`text-strong`,children:e.name}),(0,V.jsx)(`td`,{className:`tabular-nums text-secondary`,children:e.occurrences}),(0,V.jsxs)(`td`,{className:`text-secondary`,children:[e.providers.join(`, `),e.providersTruncated?` +${e.providerTotal-e.providers.length}`:``]}),(0,V.jsx)(`td`,{className:`text-right`,children:(0,V.jsxs)(`span`,{className:`inline-flex items-center justify-end gap-1`,children:[(0,V.jsx)(`span`,{className:`tabular-nums text-secondary`,children:e.questionTotal}),(0,V.jsx)(A,{text:Ne(e)})]})})]},e.name))})]})}),o?.state===`available`?(0,V.jsxs)(`p`,{className:`supporting-copy mt-2`,children:[o.targetMissResults,` of `,o.answeredResults,` answers to `,q[n].technical.toLocaleLowerCase(),` did not name this Property.`]}):null]})]})}function Fe({questions:e,queryClass:t}){return(0,V.jsxs)(`section`,{"aria-labelledby":`property-questions`,className:`page-section-divider`,children:[(0,V.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,V.jsx)(`div`,{children:(0,V.jsxs)(`h2`,{id:`property-questions`,className:`text-heading-16 text-heading`,children:[q[t].technical,` assigned to this Property`]})}),(0,V.jsxs)(`p`,{className:`supporting-copy`,children:[e.length,` assigned`]})]}),e.length===0?(0,V.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`No `,q[t].technical.toLocaleLowerCase(),` are assigned. Add one in advanced measurement setup to measure this class.`]}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,V.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,V.jsx)(`caption`,{className:`sr-only`,children:`Queries assigned to this Property`}),(0,V.jsx)(`thead`,{children:(0,V.jsx)(`tr`,{children:(0,V.jsx)(`th`,{children:`Query`})})}),(0,V.jsx)(`tbody`,{children:e.map(e=>(0,V.jsx)(`tr`,{children:(0,V.jsx)(`td`,{className:`text-secondary`,children:e})},e))})]})})]})}function Ie({urls:e}){return(0,V.jsxs)(`section`,{"aria-labelledby":`property-urls`,className:`page-section-divider`,children:[(0,V.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,V.jsx)(`div`,{children:(0,V.jsxs)(`h2`,{id:`property-urls`,className:`text-heading-16 text-heading`,children:[`URLs that count as this Property`,(0,V.jsx)(A,{text:`A cited source URL is credited to this Property when it matches one of these. The most specific matcher wins, so a URL covered by two Properties at the same specificity is flagged for review instead of being credited to either.`})]})}),(0,V.jsxs)(`p`,{className:`supporting-copy`,children:[e.length,` configured`]})]}),e.length===0?(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`No URLs are configured for this Property.`}):(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,V.jsxs)(`table`,{className:`evidence-table min-w-[420px]`,children:[(0,V.jsx)(`caption`,{className:`sr-only`,children:`URL matchers configured for this Property`}),(0,V.jsx)(`thead`,{children:(0,V.jsx)(`tr`,{children:(0,V.jsx)(`th`,{children:`URL`})})}),(0,V.jsx)(`tbody`,{children:e.map(e=>(0,V.jsx)(`tr`,{children:(0,V.jsx)(`td`,{className:`break-all text-secondary`,children:e})},e))})]})})]})}var Q={heading:`Cited on other queries`,help:`Answers to queries assigned to other properties that still cited one of this Property’s own pages. This Property was not measured on those queries, so these answers are not in its Mentioned or Cited rates.`,notCounted:`not in this Property’s rates`,empty:`No answer to a query assigned elsewhere cited this Property’s pages in the displayed measurement.`,loadError:`Citations from other queries could not be loaded.`,partlySaved:`Sources partly saved`};function Le({project:e,targetKey:t,queryClass:n,runId:r,targetLabels:i}){let[a,o]=(0,B.useState)(new Set),s={client:h,path:{name:e},query:{targetKey:t,queryClass:n,shape:ee[`other-queries`],limit:K,...r?{runId:r}:{}}},l=c({...w(s),initialPageParam:s,getNextPageParam:e=>e.otherQueries?.nextCursor?{path:s.path,query:{...s.query,cursor:e.otherQueries.nextCursor}}:void 0}),d=l.data?.pages??[];if(d[0]?.measurement.state===`not_measured`)return null;let f=d.flatMap(e=>e.otherQueries?.items??[]),p=d[0]?.otherQueries?.totalEstimate??f.length,m=e=>`${e.expectedSlotId}:${e.queryClass}`,te=q[n].technical.toLocaleLowerCase();return(0,V.jsxs)(`section`,{"aria-labelledby":`property-other-queries`,className:`page-section-divider`,children:[(0,V.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,V.jsx)(`h2`,{id:`property-other-queries`,className:`text-heading-16 text-heading`,children:Q.heading}),(0,V.jsx)(A,{text:Q.help})]}),l.data?(0,V.jsxs)(`p`,{className:`supporting-copy`,children:[p,` `,p===1?`answer`:`answers`,` · `,te,` · `,Q.notCounted]}):null]}),l.isPending?(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Loading…`}):l.isError&&f.length===0?(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,V.jsx)(`span`,{role:`alert`,children:Q.loadError}),(0,V.jsx)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,onClick:()=>{l.refetch()},children:`Retry`})]}):f.length===0?(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:Q.empty}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`overflow-x-auto rounded-md border border-default`,children:(0,V.jsxs)(`table`,{className:`evidence-table min-w-[640px]`,children:[(0,V.jsx)(`caption`,{className:`sr-only`,children:`Answers to other properties’ queries that cited this Property’s pages`}),(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`Query`}),(0,V.jsx)(`th`,{children:`Assigned to`}),(0,V.jsx)(`th`,{children:`Pages cited`}),(0,V.jsx)(`th`,{children:(0,V.jsx)(`span`,{className:`sr-only`,children:`Answer`})})]})}),(0,V.jsx)(`tbody`,{children:f.map(t=>{let n=m(t),r=a.has(n),s=`property-other-query-${encodeURIComponent(n)}`;return(0,V.jsxs)(B.Fragment,{children:[(0,V.jsxs)(`tr`,{children:[(0,V.jsxs)(`td`,{className:`text-secondary`,children:[(0,V.jsx)(`span`,{className:`block text-label-14-strong text-heading`,children:t.queryText}),(0,V.jsx)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:[t.provider,t.location].filter(Boolean).join(` · `)})]}),(0,V.jsx)(`td`,{children:(0,V.jsx)(`ul`,{className:`space-y-1`,children:t.assignedTargetKeys.map(t=>(0,V.jsx)(`li`,{children:(0,V.jsx)(u,{to:`/projects/$projectName/properties/$targetKey`,params:{projectName:e,targetKey:t},search:M,className:`text-label-14 text-link hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400`,children:i.get(t)??t})},t))})}),(0,V.jsxs)(`td`,{children:[(0,V.jsx)(`ul`,{className:`space-y-1`,children:t.sources.map(e=>(0,V.jsx)(`li`,{className:`min-w-0`,children:(0,V.jsx)(I,{url:e.sourceUrl})},e.sourceUrl))}),t.sourcesTruncated?(0,V.jsxs)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:[t.sourceCount,` pages in total`]}):null,t.evidenceComplete?null:(0,V.jsx)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:Q.partlySaved})]}),(0,V.jsx)(`td`,{className:`text-right`,children:(0,V.jsx)(_,{type:`button`,size:`sm`,variant:`ghost`,className:`h-auto pointer-coarse:min-h-11 max-w-full whitespace-normal py-2 text-left md:h-auto`,"aria-expanded":r,"aria-label":r?`Hide the answer for ${t.queryText}`:`Read the answer for ${t.queryText}`,"aria-controls":r?s:void 0,onClick:()=>o(e=>{let t=new Set(e);return t.delete(n)||t.add(n),t}),children:r?`Hide answer`:`Read answer`})})]}),r?(0,V.jsx)(`tr`,{children:(0,V.jsx)(`td`,{id:s,colSpan:4,className:`bg-surface-subtle px-4`,children:(0,V.jsx)(we,{project:e,targetKey:t.assignedTargetKeys[0],resultId:t.observationId})})}):null]},n)})})]})}),l.hasNextPage?(0,V.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,V.jsxs)(`span`,{children:[`Showing `,f.length,` of `,p]}),(0,V.jsx)(_,{size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,disabled:l.isFetchingNextPage,onClick:()=>{l.fetchNextPage()},children:l.isFetchingNextPage?`Loading…`:`Show ${K} more`})]}):null]})]})}function Re(e,t){let n=[e.marketKey?t??`the selected market`:null,e.provider?`the ${e.provider} answer engine`:null,e.model?`the ${e.model} model`:null,e.location?`location ${e.location}`:null,e.from||e.to?`a date range`:null,e.measurementRunId?`a saved check`:null].filter(e=>e!==null);return n.length===0?null:`AI Visibility is filtered to ${n.join(`, `)}. This page shows the latest measurement for ${L.allMarkets.toLocaleLowerCase()} and answer engines.`}function ze(){let{projectName:e,targetKey:t}=l({strict:!1}),r=o(),i=s({strict:!1}),d=(0,B.useMemo)(()=>se(i),[i]),[p,m]=(0,B.useState)(new Set),g=e??``,y=t??``,b=!!g&&!!y,x=(0,B.useMemo)(()=>ce(`portfolio`,ue(te())),[]),S=b&&x,{canWrite:re}=ne(),T=a({...ie({client:h,path:{name:g}}),enabled:S}),E=T.data?.active?.plan,D=E?.schemaVersion===2?E:null,O=d.queryClass===`branded`||d.queryClass===`non-brand`?d.queryClass:null,k=e=>D?.assignments.some(t=>t.targetKey===y&&t.queryClass===e)??!1,N=O??(!k(`non-brand`)&&k(`branded`)?`branded`:`non-brand`);(0,B.useEffect)(()=>{D&&!O&&r({to:`.`,replace:!0,search:e=>P(e,{queryClass:N})})},[D,O,N,r]);let F=a({...Ee(g,y,`branded`),enabled:S}),I=a({...Ee(g,y,`non-brand`),enabled:S}),de=De(F.data),L=De(I.data),R=N===`branded`?F.data:I.data,z=N===`branded`?de:L,H=(N===`branded`?F.isError:I.isError)&&z===void 0,U=R?.measurement.displayedRunId;le(g,{view:`property`,selection:{mode:`advanced`,scope:`property`,scopeKey:y,queryClass:N,limit:10,...U?{runId:U}:{}}});let W=z?.mentionCoverage.state===`unavailable`?Te(z.mentionCoverage):void 0,G=R===void 0?void 0:R.measurement.completedAt??null,pe=R!==void 0&&(R.measurement.state===`not_measured`||R.nextAction.kind===`run_measurement`),me=e=>P(M(e),{measurementScope:`property`,measurementScopeKey:y,queryClass:N,measurementRunId:void 0,measurementRevision:void 0,measurementTo:void 0}),he=a({...C({client:h,path:{name:g},query:ae(se(me(i)))}),enabled:S&&pe,retry:!1}).data,_e=he!==void 0&&he.selection.measurement.measuredRevision!==null&&(he.populations.find(e=>e.queryClass===N)?.summary.queryCount??0)>0,J={client:h,path:{name:g},query:{targetKey:y,queryClass:N,shape:ee.answers,limit:K,...U?{runId:U}:{}}},Y=c({...w(J),enabled:S&&R!==void 0,initialPageParam:J,getNextPageParam:e=>e.answers?.nextCursor?{path:J.path,query:{...J.query,cursor:e.answers.nextCursor}}:void 0}),X=T.data?.active??null,Z=X?.plan.schemaVersion===2?X.plan:null,Ne=X!==null&&Z===null,Q=Z?.targets.find(e=>e.stableKey===y)??null,ze=Re(d,Z?.reportingScopes?.find(e=>e.stableKey===d.marketKey)?.label),Be=(0,B.useMemo)(()=>{if(!Z)return[];let e=new Map(Z.querySnapshots.map(e=>[e.queryId,e.queryText]));return[...new Set(Z.assignments.filter(e=>e.targetKey===y&&e.queryClass===N).flatMap(t=>{let n=e.get(t.queryId);return n===void 0?[]:[n]}))].sort((e,t)=>e.localeCompare(t))},[Z,y,N]),Ve=(0,B.useMemo)(()=>Q?.urlMatchers.map(fe)??[],[Q]),He=(0,B.useMemo)(()=>new Map((Z?.targets??[]).map(e=>[e.stableKey,e.label])),[Z]),Ue=(0,B.useMemo)(()=>Z?.groups.filter(e=>e.targetKeys.includes(y))??[],[Z,y]),$=(0,B.useMemo)(()=>(Y.data?.pages??[]).flatMap(e=>e.answers?.items??[]),[Y.data]),We=Y.data?.pages[0]?.answers?.totalEstimate??$.length,Ge=(Y.data?.pages??[]).length>0&&(Y.data?.pages??[]).every(e=>e.answers===void 0),Ke=Y.data?.pages[0]?.measurement.state,qe=(0,V.jsxs)(u,{to:`/projects/$projectName`,params:{projectName:g},search:M,className:`inline-flex items-center gap-1 text-label-12 text-muted hover:text-strong`,children:[(0,V.jsx)(n,{className:`size-3.5`,"aria-hidden":`true`}),`Back to AI Visibility`]});if(!b)return(0,V.jsx)(`div`,{className:`page-container`,children:(0,V.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`Missing project name or Property key in URL.`})});if(!x)return(0,V.jsxs)(`div`,{className:`page-container space-y-3`,children:[qe,(0,V.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`This view is not available here.`})]});if(T.isPending&&!T.isError)return(0,V.jsx)(`div`,{className:`page-container`,children:(0,V.jsxs)(`div`,{role:`status`,"aria-live":`polite`,children:[(0,V.jsx)(`span`,{className:`sr-only`,children:`Loading Property`}),(0,V.jsx)(`div`,{className:`h-32 animate-pulse rounded-md bg-surface-subtle`,"aria-hidden":`true`})]})});let Je=T.isError&&T.data===void 0,Ye=F.isError&&F.data===void 0,Xe=I.isError&&I.data===void 0;return Je||Ye&&Xe?(0,V.jsxs)(`div`,{className:`page-container space-y-3`,children:[qe,(0,V.jsx)(`p`,{role:`alert`,className:`text-copy-14 text-negative`,children:`Could not load this Property.`}),(0,V.jsx)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,onClick:()=>{T.refetch(),F.refetch(),I.refetch()},children:`Try again`})]}):!Z||!Q?(0,V.jsxs)(`div`,{className:`page-container space-y-3`,children:[qe,(0,V.jsx)(`p`,{role:`status`,className:`text-copy-14 text-secondary`,children:Z?`This Property is not in the published setup. It may have been renamed or removed.`:`A Property page needs a published advanced measurement setup. Republish setup from the project Portfolio tab.`}),(0,V.jsx)(_,{asChild:!0,type:`button`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,children:(0,V.jsx)(u,{to:`/projects/$projectName/portfolio`,params:{projectName:g},children:re?Ne?`Republish setup`:`Open measurement setup`:`View measurement setup`})})]}):(0,V.jsxs)(`div`,{className:`page-container space-y-8`,children:[(0,V.jsxs)(`div`,{className:`page-header`,children:[(0,V.jsxs)(`div`,{className:`page-header-left`,children:[qe,(0,V.jsx)(`h1`,{className:`page-title mt-2`,children:Q.label}),(0,V.jsxs)(`p`,{className:`page-subtitle`,children:[`Property in `,g,ze?(0,V.jsxs)(V.Fragment,{children:[` · Filters not applied `,(0,V.jsx)(A,{text:ze})]}):null]})]}),(0,V.jsxs)(`div`,{className:`page-header-right`,children:[R?(0,V.jsx)(v,{tone:ve[R.measurement.state].tone,children:ve[R.measurement.state].label}):null,z&&z.flags>0?(0,V.jsxs)(v,{tone:`caution`,children:[z.flags,` flagged`]}):null]})]}),(0,V.jsx)(Ae,{branded:de,nonBrand:L,brandedFailed:Ye,nonBrandFailed:Xe}),(0,V.jsx)(je,{branded:de,nonBrand:L,brandedError:F.isError,nonBrandError:I.isError,onRetry:e=>{e===`branded`?F.refetch():I.refetch()}}),pe?(0,V.jsxs)(`section`,{className:`flex flex-wrap items-center justify-between gap-3 border-y border-default py-4`,"aria-label":`Measurement next step`,children:[(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:f()?oe:re?`Run a measurement from the project overview to collect this Property’s coverage and source evidence.${_e?` AI Visibility still shows the last results.`:``}`:`This Property needs a new measurement before coverage and source evidence are available.`}),(0,V.jsx)(_,{asChild:!0,type:`button`,className:`h-11 px-4 text-button-14 md:h-11`,children:(0,V.jsx)(u,{to:`/projects/$projectName`,params:{projectName:g},search:_e?me:M,children:_e?`See the last results`:re?`Go to AI Visibility`:`View AI Visibility`})})]}):null,(0,V.jsxs)(`div`,{className:`flex flex-wrap items-end gap-4 border-y border-default py-4`,children:[(0,V.jsxs)(`div`,{className:`space-y-1`,children:[(0,V.jsx)(`label`,{htmlFor:`property-query-class`,className:`block text-label-14-strong text-heading`,children:`Query type`}),(0,V.jsxs)(`select`,{id:`property-query-class`,value:N,onChange:e=>{let t=e.target.value===`branded`?`branded`:`non-brand`;r({to:`.`,search:e=>P(e,{queryClass:t})})},className:`h-11 rounded-md border border-default bg-surface px-3 text-label-14 text-primary focus:outline-none focus:ring-2 focus:ring-mono-400`,children:[(0,V.jsx)(`option`,{value:`non-brand`,children:q[`non-brand`].technical}),(0,V.jsx)(`option`,{value:`branded`,children:q.branded.technical})]})]}),(0,V.jsx)(Oe,{measuredAt:G,unmeasuredReason:W,queryClass:N})]}),(0,V.jsx)(Me,{row:z,queryClass:N,isError:H}),(0,V.jsx)(Pe,{project:g,targetKey:y,queryClass:N}),(0,V.jsx)(Fe,{questions:Be,queryClass:N}),(0,V.jsx)(ge,{projectName:g,targetKey:y,published:Q,activeRevision:X.revision,publishedBrandNames:Z.identities.projectBrand.names}),(0,V.jsx)(Ie,{urls:Ve}),(0,V.jsx)(ke,{project:g,groups:Ue}),(0,V.jsxs)(`section`,{"aria-labelledby":`property-evidence`,className:`page-section-divider`,children:[(0,V.jsxs)(`div`,{className:`section-head section-head-inline`,children:[(0,V.jsx)(`div`,{children:(0,V.jsxs)(`h2`,{id:`property-evidence`,className:`text-heading-16 text-heading`,children:[`Answers the engines gave`,(0,V.jsx)(A,{text:`One row per answer an engine gave for the queries assigned to this Property in the displayed measurement. Mentioned and cited are independent: an answer can name this Property without linking it, or link it without naming it. Answers that did neither are listed first, because those are what a gap is made of. Where the answer text was not stored the mention reads Not measured, never a zero. Open a row to read what the engine actually said, followed by the source URLs it returned, this Property's own first. The answer is where a miss becomes actionable: a query this Property was not named in may still have named a sibling building.`})]})}),$.length>0?(0,V.jsxs)(`p`,{className:`supporting-copy`,children:[$.length,` of `,We]}):null]}),H?(0,V.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`Evidence for `,q[N].technical.toLocaleLowerCase(),` is unavailable. Retry that query type above.`]}):Y.isPending&&$.length===0?(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Loading evidence…`}):Y.isError&&$.length===0?(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,V.jsx)(`span`,{role:`alert`,children:`Evidence could not be loaded.`}),(0,V.jsx)(_,{type:`button`,size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,onClick:()=>{Y.refetch()},children:`Retry evidence`})]}):Ke===`not_measured`?(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:f()?oe:`Not measured yet. Run a measurement to collect the answers for this Property.`}):Ge?(0,V.jsx)(`p`,{role:`alert`,className:`text-copy-14 text-caution`,children:`This measurement was returned in an older format, so the answers cannot be shown here. The numbers above are unaffected.`}):$.length===0?(0,V.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`No answers matched this Property in the displayed measurement.`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`div`,{className:`property-answer-table-container overflow-x-auto rounded-md border border-default`,children:(0,V.jsxs)(`table`,{className:`evidence-table property-evidence-table`,children:[(0,V.jsx)(`caption`,{className:`sr-only`,children:`Answers measured for this Property`}),(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{children:[(0,V.jsx)(`th`,{children:`Query`}),(0,V.jsx)(`th`,{children:`Mentioned in the answer`}),(0,V.jsx)(`th`,{children:`Cited as a source`}),(0,V.jsx)(`th`,{children:`Sources`}),(0,V.jsx)(`th`,{children:(0,V.jsx)(`span`,{className:`sr-only`,children:`Sources detail`})})]})}),(0,V.jsx)(`tbody`,{children:$.map(e=>{let t=ye(e),n=p.has(t),r=`property-answer-${encodeURIComponent(t)}`;return(0,V.jsxs)(B.Fragment,{children:[(0,V.jsxs)(`tr`,{className:`property-answer-summary`,children:[(0,V.jsxs)(`td`,{className:`text-secondary`,children:[(0,V.jsx)(`h3`,{className:`text-heading-14 text-heading`,children:e.queryText}),(0,V.jsx)(`span`,{className:`mt-1 block text-label-12 text-muted`,children:[e.provider,e.location].filter(Boolean).join(` · `)}),e.historical||e.bridged?(0,V.jsx)(`span`,{className:`mt-1 flex`,children:(0,V.jsx)(v,{tone:`caution`,children:`Historical`})}):null]}),(0,V.jsxs)(`td`,{children:[(0,V.jsx)(`span`,{className:`property-evidence-mobile-label`,"aria-hidden":`true`,children:`Mentioned`}),(0,V.jsx)(be,{row:e})]}),(0,V.jsxs)(`td`,{children:[(0,V.jsx)(`span`,{className:`property-evidence-mobile-label`,"aria-hidden":`true`,children:`Cited`}),(0,V.jsx)(Se,{row:e})]}),(0,V.jsxs)(`td`,{className:`tabular-nums text-secondary`,children:[(0,V.jsx)(`span`,{className:`property-evidence-mobile-label`,"aria-hidden":`true`,children:j}),e.cited===null?xe:e.sources.length]}),(0,V.jsx)(`td`,{className:`text-right`,children:(0,V.jsx)(_,{type:`button`,size:`sm`,variant:`ghost`,className:`h-auto pointer-coarse:min-h-11 max-w-full whitespace-normal py-2 text-left md:h-auto`,"aria-expanded":n,"aria-label":n?`Hide the answer for ${e.queryText}`:`Read the answer for ${e.queryText}`,"aria-controls":n?r:void 0,onClick:()=>m(e=>{let n=new Set(e);return n.delete(t)||n.add(t),n}),children:n?`Hide answer`:`Read answer`})})]}),n?(0,V.jsx)(`tr`,{className:`property-answer-detail`,children:(0,V.jsxs)(`td`,{id:r,colSpan:5,className:`bg-surface-subtle px-4`,children:[(0,V.jsx)(we,{project:g,targetKey:y,resultId:e.observationId}),(0,V.jsx)(Ce,{row:e})]})}):null]},t)})})]})}),Y.hasNextPage?(0,V.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3 text-label-14 text-secondary`,children:[(0,V.jsxs)(`span`,{children:[`Showing `,$.length,` of `,We]}),Y.isFetchNextPageError?(0,V.jsx)(`span`,{role:`alert`,children:`Could not load more evidence.`}):null,(0,V.jsx)(_,{size:`sm`,variant:`outline`,className:`h-11 px-4 text-button-14 md:h-11`,disabled:Y.isFetchingNextPage,onClick:()=>{Y.fetchNextPage()},children:Y.isFetchingNextPage?`Loading…`:Y.isFetchNextPageError?`Retry more evidence`:`Show ${K} more`})]}):null]})]}),R?(0,V.jsx)(Le,{project:g,targetKey:y,queryClass:N,runId:U,targetLabels:He}):null]})}export{J as EVIDENCE_LABELS,ze as MeasurementPropertyPage,Q as OTHER_QUERIES_COPY};
|